@vibecontrols/plugin-sdk 2026.1108.1 → 2026.1110.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/audit/index.d.ts +7 -13
- package/dist/audit/index.js +13 -14
- package/dist/broadcast/index.d.ts +6 -12
- package/dist/broadcast/index.js +8 -9
- package/dist/cli/index.d.ts +7 -72
- package/dist/cli/index.js +1 -104
- package/dist/cli-CGyu31Cn.js +104 -0
- package/dist/config/index.d.ts +18 -24
- package/dist/config/index.js +56 -61
- package/dist/context/index.d.ts +26 -32
- package/dist/context/index.js +33 -21
- package/dist/contract/index.d.ts +2 -413
- package/dist/contract/index.js +11 -12
- package/dist/host/fs-safety.d.ts +13 -17
- package/dist/host/fs-safety.js +223 -217
- package/dist/host/os.d.ts +2 -68
- package/dist/host/os.js +15 -7
- package/dist/host/paths.d.ts +2 -36
- package/dist/host/paths.js +44 -44
- package/dist/host/request-security.d.ts +6 -7
- package/dist/host/request-security.js +26 -14
- package/dist/http/index.d.ts +23 -25
- package/dist/http/index.js +60 -65
- package/dist/index-BM4zNXSR.d.ts +25 -0
- package/dist/index-D946chPf.d.ts +410 -0
- package/dist/index-Q_hnxaN_.d.ts +60 -0
- package/dist/index.d.ts +44 -18
- package/dist/index.js +16 -749
- package/dist/install/index.d.ts +46 -50
- package/dist/install/index.js +269 -189
- package/dist/lifecycle/index.d.ts +24 -30
- package/dist/lifecycle/index.js +18 -30
- package/dist/log/index.d.ts +10 -15
- package/dist/log/index.js +19 -20
- package/dist/os-DoFa9kjr.d.ts +67 -0
- package/dist/paths-h28H4Xeb.d.ts +35 -0
- package/dist/providers/index.d.ts +50 -56
- package/dist/providers/index.js +101 -126
- package/dist/routes/index.d.ts +22 -28
- package/dist/routes/index.js +80 -72
- package/dist/storage/index.d.ts +2 -38
- package/dist/storage/index.js +1 -67
- package/dist/storage-DkNBaJHC.js +64 -0
- package/dist/subprocess/index.d.ts +5 -11
- package/dist/subprocess/index.js +85 -56
- package/dist/telemetry/index.d.ts +15 -21
- package/dist/telemetry/index.js +35 -36
- package/dist/testing/index.d.ts +6 -28
- package/dist/testing/index.js +87 -88
- package/package.json +8 -8
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { HostServices, PluginNukeContext, NukeResult } from '../contract/index.js';
|
|
2
|
-
import '../host/os.js';
|
|
3
|
-
import '../host/paths.js';
|
|
4
|
-
|
|
5
1
|
/**
|
|
6
2
|
* @vibecontrols/plugin-sdk/lifecycle
|
|
7
3
|
*
|
|
@@ -11,31 +7,29 @@ import '../host/paths.js';
|
|
|
11
7
|
*
|
|
12
8
|
* Cross-platform: pure JS, no fs / spawn.
|
|
13
9
|
*/
|
|
14
|
-
|
|
15
|
-
interface LifecycleSpec {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
import { c as PluginNukeContext, o as NukeResult, r as HostServices } from "../index-D946chPf.js";
|
|
11
|
+
export interface LifecycleSpec {
|
|
12
|
+
/** Plugin name — used for telemetry tagging + skip log messages. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Optional init handler — called with hostServices on onServerStart. */
|
|
15
|
+
onInit?: (hostServices: HostServices) => void | Promise<void>;
|
|
16
|
+
/** Optional shutdown handler — called with hostServices on onServerStop. */
|
|
17
|
+
onShutdown?: (hostServices: HostServices) => void | Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Optional nuke handler — called with hostServices + ctx on `vibe nuke`,
|
|
20
|
+
* BEFORE the plugin is uninstalled and while the daemon is still up. Use it
|
|
21
|
+
* to reap the plugin's own detached processes, binaries, and persisted
|
|
22
|
+
* state. Honour `ctx.dryRun`.
|
|
23
|
+
*/
|
|
24
|
+
onNuke?: (hostServices: HostServices, ctx: PluginNukeContext) => void | NukeResult | Promise<void | NukeResult>;
|
|
25
|
+
/** Telemetry event name to auto-emit on init (after onInit returns). */
|
|
26
|
+
telemetryEventName?: string;
|
|
27
|
+
/** process.platform values the plugin does NOT support — early-return on match. */
|
|
28
|
+
skipPlatforms?: NodeJS.Platform[];
|
|
33
29
|
}
|
|
34
|
-
interface LifecycleHooks {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
export interface LifecycleHooks {
|
|
31
|
+
onServerStart: (app: unknown, hostServices: HostServices) => Promise<void>;
|
|
32
|
+
onServerStop: (hostServices: HostServices) => Promise<void>;
|
|
33
|
+
onNuke: (hostServices: HostServices, ctx: PluginNukeContext) => Promise<void | NukeResult>;
|
|
38
34
|
}
|
|
39
|
-
declare function createLifecycleHooks(spec: LifecycleSpec): LifecycleHooks;
|
|
40
|
-
|
|
41
|
-
export { type LifecycleHooks, type LifecycleSpec, createLifecycleHooks };
|
|
35
|
+
export declare function createLifecycleHooks(spec: LifecycleSpec): LifecycleHooks;
|
package/dist/lifecycle/index.js
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
1
|
// src/lifecycle/index.ts
|
|
2
2
|
function createLifecycleHooks(spec) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
onServerStop: async (hostServices) => {
|
|
21
|
-
if (onShutdown) {
|
|
22
|
-
await onShutdown(hostServices);
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
onNuke: async (hostServices, ctx) => {
|
|
26
|
-
if (onNuke) {
|
|
27
|
-
return onNuke(hostServices, ctx);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
3
|
+
const { name, onInit, onShutdown, onNuke, telemetryEventName, skipPlatforms } = spec;
|
|
4
|
+
return {
|
|
5
|
+
onServerStart: async (_app, hostServices) => {
|
|
6
|
+
if (skipPlatforms && skipPlatforms.includes(process.platform)) {
|
|
7
|
+
process.stderr.write(`[${name}] skipping init on unsupported platform '${process.platform}'\n`);
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (onInit) await onInit(hostServices);
|
|
11
|
+
if (telemetryEventName) hostServices.telemetry?.emit(telemetryEventName, { plugin: name });
|
|
12
|
+
},
|
|
13
|
+
onServerStop: async (hostServices) => {
|
|
14
|
+
if (onShutdown) await onShutdown(hostServices);
|
|
15
|
+
},
|
|
16
|
+
onNuke: async (hostServices, ctx) => {
|
|
17
|
+
if (onNuke) return onNuke(hostServices, ctx);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
31
20
|
}
|
|
32
|
-
|
|
33
21
|
export { createLifecycleHooks };
|
|
34
|
-
|
|
22
|
+
|
|
35
23
|
//# sourceMappingURL=index.js.map
|
package/dist/log/index.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { SdkLogger } from '../contract/index.js';
|
|
2
|
-
import '../host/os.js';
|
|
3
|
-
import '../host/paths.js';
|
|
4
|
-
|
|
5
1
|
/**
|
|
6
2
|
* @vibecontrols/plugin-sdk/log
|
|
7
3
|
*
|
|
@@ -9,16 +5,15 @@ import '../host/paths.js';
|
|
|
9
5
|
* `log.info("started")` instead of `logger.info("my-plugin", "started")`
|
|
10
6
|
* at every call-site. No-op when the underlying logger is absent.
|
|
11
7
|
*/
|
|
12
|
-
|
|
8
|
+
import { m as SdkLogger } from "../index-D946chPf.js";
|
|
13
9
|
type Meta = Record<string, unknown>;
|
|
14
|
-
declare class BoundLogger {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
export declare class BoundLogger {
|
|
11
|
+
private readonly logger;
|
|
12
|
+
private readonly source;
|
|
13
|
+
constructor(logger: SdkLogger | undefined, source: string);
|
|
14
|
+
info(message: string, meta?: Meta): void;
|
|
15
|
+
warn(message: string, meta?: Meta): void;
|
|
16
|
+
error(message: string, meta?: Meta): void;
|
|
17
|
+
debug(message: string, meta?: Meta): void;
|
|
22
18
|
}
|
|
23
|
-
|
|
24
|
-
export { BoundLogger };
|
|
19
|
+
export {};
|
package/dist/log/index.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
// src/log/index.ts
|
|
2
2
|
var BoundLogger = class {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
logger;
|
|
4
|
+
source;
|
|
5
|
+
constructor(logger, source) {
|
|
6
|
+
this.logger = logger;
|
|
7
|
+
this.source = source;
|
|
8
|
+
}
|
|
9
|
+
info(message, meta) {
|
|
10
|
+
this.logger?.info?.(this.source, message, meta);
|
|
11
|
+
}
|
|
12
|
+
warn(message, meta) {
|
|
13
|
+
this.logger?.warn?.(this.source, message, meta);
|
|
14
|
+
}
|
|
15
|
+
error(message, meta) {
|
|
16
|
+
this.logger?.error?.(this.source, message, meta);
|
|
17
|
+
}
|
|
18
|
+
debug(message, meta) {
|
|
19
|
+
this.logger?.debug?.(this.source, message, meta);
|
|
20
|
+
}
|
|
21
21
|
};
|
|
22
|
-
|
|
23
22
|
export { BoundLogger };
|
|
24
|
-
|
|
23
|
+
|
|
25
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibecontrols/plugin-sdk/host/os
|
|
3
|
+
*
|
|
4
|
+
* OS adapter contract — the minimum surface a plugin can rely on for
|
|
5
|
+
* platform-specific operations. The agent supplies a richer implementation
|
|
6
|
+
* (vibecontrols-agent/src/core/os-adapter.ts); this SDK type is intentionally
|
|
7
|
+
* narrow so plugins type-check against the publicly committed contract and
|
|
8
|
+
* the agent stays free to add private members.
|
|
9
|
+
*
|
|
10
|
+
* Every method is optional so plugins must defensively use optional chaining
|
|
11
|
+
* or check presence before invoking — same defensive pattern the rest of
|
|
12
|
+
* HostServices follows.
|
|
13
|
+
*/
|
|
14
|
+
type SupportedPlatform = "linux" | "darwin" | "win32";
|
|
15
|
+
/** Human-readable OS label for operator-facing messages. */
|
|
16
|
+
type PlatformLabel = "macOS" | "Windows" | "Linux" | "WSL";
|
|
17
|
+
interface OsAdapter {
|
|
18
|
+
readonly platform?: SupportedPlatform;
|
|
19
|
+
readonly isWSL?: boolean;
|
|
20
|
+
readonly homeDir?: string;
|
|
21
|
+
readonly tmpDir?: string;
|
|
22
|
+
readonly pathSep?: string;
|
|
23
|
+
readonly eol?: string;
|
|
24
|
+
/** Executable suffix ("" on POSIX, ".exe" on Windows). */
|
|
25
|
+
readonly executableSuffix?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the absolute path to a command on PATH, or null when missing.
|
|
28
|
+
* The agent impl resolves against the LIVE `process.env.PATH` (not the
|
|
29
|
+
* startup snapshot Bun.which captures), so a tool installed mid-run is
|
|
30
|
+
* found. Pass `{ refreshPath: true }` to force re-reading the live PATH.
|
|
31
|
+
*/
|
|
32
|
+
which?(cmd: string, opts?: {
|
|
33
|
+
refreshPath?: boolean;
|
|
34
|
+
}): string | null;
|
|
35
|
+
isProcessAlive?(pid: number): boolean;
|
|
36
|
+
killProcessTree?(pid: number, signal: NodeJS.Signals): boolean;
|
|
37
|
+
listChildPids?(parentPid: number): number[];
|
|
38
|
+
/** npm global *bin* dir (`.../bin`) — where global executables land. */
|
|
39
|
+
npmGlobalBin?(): string | null;
|
|
40
|
+
/** npm global *root* dir (output of `npm root -g`) — where global packages install. */
|
|
41
|
+
npmGlobalRoot?(): string | null;
|
|
42
|
+
bunGlobalBin?(): string | null;
|
|
43
|
+
/** Quote a string for inclusion in a shell command on this OS. */
|
|
44
|
+
shellQuote?(value: string): string;
|
|
45
|
+
shellInvocation?(): {
|
|
46
|
+
cmd: string;
|
|
47
|
+
flag: string;
|
|
48
|
+
};
|
|
49
|
+
/** Build a Bun.spawn argv that runs a shell pipeline through the native shell. */
|
|
50
|
+
shellArgv?(script: string): string[];
|
|
51
|
+
processGroupSpawnOpts?(): Record<string, unknown>;
|
|
52
|
+
/** Human-readable OS label ("macOS"/"Windows"/"Linux"/"WSL") for messages. */
|
|
53
|
+
platformLabel?(): PlatformLabel;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Pure helper: human-readable OS label. Use in operator-facing strings instead
|
|
57
|
+
* of inlining `process.platform === "win32" ? "Windows" : ...` ternaries.
|
|
58
|
+
*/
|
|
59
|
+
declare function platformLabel(p?: NodeJS.Platform, isWSL?: boolean): PlatformLabel;
|
|
60
|
+
/**
|
|
61
|
+
* Pure helper: pick the platform-appropriate manual-install instruction from a
|
|
62
|
+
* per-OS recipe map. Replaces the per-plugin `ttydManualInstall()` /
|
|
63
|
+
* `tmuxManualInstall()` platform switches that were copy-pasted across plugins.
|
|
64
|
+
* Falls back to the `linux` recipe when the current platform has no entry.
|
|
65
|
+
*/
|
|
66
|
+
declare function manualInstallHint(recipes: Partial<Record<SupportedPlatform, string>>, p?: NodeJS.Platform): string;
|
|
67
|
+
export { platformLabel as a, manualInstallHint as i, PlatformLabel as n, SupportedPlatform as r, OsAdapter as t };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibecontrols/plugin-sdk/host/paths
|
|
3
|
+
*
|
|
4
|
+
* Cross-platform path helpers. Plugins that need an XDG-style directory or
|
|
5
|
+
* a platform-correct executable name should import from here rather than
|
|
6
|
+
* hand-rolling `process.platform === "win32" ? "...exe" : "..."` ternaries
|
|
7
|
+
* or `process.env.HOME ?? "."` fallbacks (the latter is broken on Windows,
|
|
8
|
+
* where USERPROFILE is the canonical variable).
|
|
9
|
+
*
|
|
10
|
+
* The exports are pure functions backed by `node:os` + `node:path`, so they
|
|
11
|
+
* work without any host wiring. The agent supplies HostServices.paths as a
|
|
12
|
+
* field for forward-compat, but plugins can also import the default `paths`
|
|
13
|
+
* const directly when the host hasn't injected one.
|
|
14
|
+
*/
|
|
15
|
+
interface PathHelpers {
|
|
16
|
+
/** OS-correct user home (`HOME` on POSIX, `USERPROFILE` on Windows). */
|
|
17
|
+
homeDir(): string;
|
|
18
|
+
/**
|
|
19
|
+
* OS-correct per-app config directory:
|
|
20
|
+
* linux: `$XDG_CONFIG_HOME/<scope>` or `~/.config/<scope>`
|
|
21
|
+
* darwin: `~/Library/Application Support/<scope>`
|
|
22
|
+
* win32: `%APPDATA%\<scope>`
|
|
23
|
+
*/
|
|
24
|
+
configDir(scope: string): string;
|
|
25
|
+
/** Same shape as configDir but for cache (`~/.cache`, `~/Library/Caches`, `%LOCALAPPDATA%\<scope>\Cache`). */
|
|
26
|
+
cacheDir(scope: string): string;
|
|
27
|
+
/** Same shape as configDir but for state/data (`~/.local/share`, `~/Library/Application Support`, `%LOCALAPPDATA%\<scope>`). */
|
|
28
|
+
dataDir(scope: string): string;
|
|
29
|
+
/** OS-correct temp dir (`/tmp`, `%TEMP%` on Windows). */
|
|
30
|
+
tmpDir(): string;
|
|
31
|
+
/** Returns the executable name with `.exe` appended on Windows, unchanged elsewhere. */
|
|
32
|
+
exeName(base: string): string;
|
|
33
|
+
}
|
|
34
|
+
declare const paths: PathHelpers;
|
|
35
|
+
export { paths as n, PathHelpers as t };
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { HostServices, ServiceRegistry, SupportedOS, MetaProviderRef } from '../contract/index.js';
|
|
2
|
-
import { ContextProvider } from '../context/index.js';
|
|
3
|
-
import '../host/os.js';
|
|
4
|
-
import '../host/paths.js';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* @vibecontrols/plugin-sdk/providers
|
|
8
3
|
*
|
|
@@ -10,13 +5,14 @@ import '../host/paths.js';
|
|
|
10
5
|
* `register` and consumer plugins call `get` / `list`. Every method is a
|
|
11
6
|
* graceful no-op when the host has no registry.
|
|
12
7
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
import { _ as SupportedOS, a as MetaProviderRef, h as ServiceRegistry, r as HostServices } from "../index-D946chPf.js";
|
|
9
|
+
import { ContextProvider } from "../context/index.js";
|
|
10
|
+
export interface CliContribution {
|
|
11
|
+
statusSections?: unknown[];
|
|
12
|
+
doctorChecks?: unknown[];
|
|
17
13
|
}
|
|
18
14
|
/** Map `process.platform` onto the SDK's `SupportedOS` union (defaults to linux). */
|
|
19
|
-
declare function currentSupportedOS(p?: NodeJS.Platform): SupportedOS;
|
|
15
|
+
export declare function currentSupportedOS(p?: NodeJS.Platform): SupportedOS;
|
|
20
16
|
/**
|
|
21
17
|
* The single, shared META→provider provisioning sequence. A META plugin calls
|
|
22
18
|
* this from its `provisionProviders` hook with its own `metaProviders`; the
|
|
@@ -32,49 +28,47 @@ declare function currentSupportedOS(p?: NodeJS.Platform): SupportedOS;
|
|
|
32
28
|
* Best-effort and isolated per provider — one provider failing never aborts the
|
|
33
29
|
* others, so a META degrades gracefully rather than blocking boot.
|
|
34
30
|
*/
|
|
35
|
-
declare function provisionMetaProviders(host: HostServices, metaProviders: ReadonlyArray<MetaProviderRef> | undefined, platform?: SupportedOS): Promise<void>;
|
|
36
|
-
declare class ProviderRegistry {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export { type CliContribution, ProviderRegistry, currentSupportedOS, provisionMetaProviders };
|
|
31
|
+
export declare function provisionMetaProviders(host: HostServices, metaProviders: ReadonlyArray<MetaProviderRef> | undefined, platform?: SupportedOS): Promise<void>;
|
|
32
|
+
export declare class ProviderRegistry {
|
|
33
|
+
private readonly hostServices?;
|
|
34
|
+
constructor(hostServices?: HostServices | undefined);
|
|
35
|
+
/**
|
|
36
|
+
* Register a context provider. Convenience wrapper for the standalone
|
|
37
|
+
* `registerContextProvider` helper exported from `@vibecontrols/plugin-sdk/context`.
|
|
38
|
+
*/
|
|
39
|
+
registerContextProvider(provider: ContextProvider): void;
|
|
40
|
+
/** List every registered context provider. */
|
|
41
|
+
listContextProviders(): ContextProvider[];
|
|
42
|
+
/** Resolve a context provider by name. */
|
|
43
|
+
getContextProvider(name: string): ContextProvider | undefined;
|
|
44
|
+
getServiceRegistry(): ServiceRegistry | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Register a provider implementation (session / tunnel / ai) on the
|
|
47
|
+
* agent's per-type provider registry. Maps onto the agent's
|
|
48
|
+
* `registerProvider(type, provider, pluginName)` shape.
|
|
49
|
+
*/
|
|
50
|
+
registerProvider<T>(type: string, name: string, provider: T): void;
|
|
51
|
+
/**
|
|
52
|
+
* Resolve a provider for a given type. With one argument, returns the
|
|
53
|
+
* default-resolved provider (matching the agent's
|
|
54
|
+
* `serviceRegistry.getProvider<T>(type)` shape). With two arguments,
|
|
55
|
+
* resolves a *specific* provider by `(type, name)` via the agent's
|
|
56
|
+
* `getProviderByName` — which is what consumers like session-manager
|
|
57
|
+
* actually want when iterating registered providers.
|
|
58
|
+
*
|
|
59
|
+
* Previously the two-argument form bug-existed: it
|
|
60
|
+
* verified the name was present in `listProvidersForType` but then
|
|
61
|
+
* returned the type's *default* provider regardless, so every
|
|
62
|
+
* per-name lookup yielded the same object. We now call
|
|
63
|
+
* `getProviderByName` when the host exposes it, and only fall back
|
|
64
|
+
* to the default-resolved getter for hosts that pre-date that
|
|
65
|
+
* method.
|
|
66
|
+
*/
|
|
67
|
+
getProvider<T>(type: string, name?: string): T | undefined;
|
|
68
|
+
listProviders(type: string): string[];
|
|
69
|
+
/**
|
|
70
|
+
* Register a CLI contribution bundle (status sections + doctor checks).
|
|
71
|
+
* No-op when the host doesn't expose `cliContributors`.
|
|
72
|
+
*/
|
|
73
|
+
withCliContribution(contribution: CliContribution): void;
|
|
74
|
+
}
|