@qodalis/cli 2.0.0-beta.12 → 2.0.0-beta.13
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/assets/cli-panel.css +78 -1
- package/package.json +2 -2
- package/public-api.d.mts +121 -16
- package/public-api.d.ts +121 -16
- package/public-api.js +551 -329
- package/public-api.js.map +1 -1
- package/public-api.mjs +549 -331
- package/public-api.mjs.map +1 -1
- package/wasm/qodalis_cli_wasm_bg.wasm +0 -0
package/assets/cli-panel.css
CHANGED
|
@@ -873,10 +873,25 @@
|
|
|
873
873
|
}
|
|
874
874
|
|
|
875
875
|
.cli-panel-status-item.status-text {
|
|
876
|
-
color: var(--cli-panel-accent, #818cf8);
|
|
877
876
|
max-width: 200px;
|
|
878
877
|
}
|
|
879
878
|
|
|
879
|
+
.cli-panel-status-item.status-text.level-info {
|
|
880
|
+
color: var(--cli-panel-accent, #818cf8);
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
.cli-panel-status-item.status-text.level-success {
|
|
884
|
+
color: var(--cli-status-idle, #3fb950);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
.cli-panel-status-item.status-text.level-warn {
|
|
888
|
+
color: var(--cli-status-running, #f0883e);
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
.cli-panel-status-item.status-text.level-error {
|
|
892
|
+
color: var(--cli-status-error, #f85149);
|
|
893
|
+
}
|
|
894
|
+
|
|
880
895
|
.cli-panel-status-item.status-running {
|
|
881
896
|
color: var(--cli-status-running, #f0883e);
|
|
882
897
|
}
|
|
@@ -893,6 +908,68 @@
|
|
|
893
908
|
background-color: var(--cli-btn-hover-bg, rgba(129, 140, 248, 0.12));
|
|
894
909
|
}
|
|
895
910
|
|
|
911
|
+
/* ─── Compact status indicators (vertical positions) ───── */
|
|
912
|
+
|
|
913
|
+
.cli-panel-status-indicators-compact {
|
|
914
|
+
display: none;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
.cli-panel-wrapper[data-position="left"] .cli-panel-status-indicators-compact,
|
|
918
|
+
.cli-panel-wrapper[data-position="right"] .cli-panel-status-indicators-compact {
|
|
919
|
+
display: flex;
|
|
920
|
+
flex-direction: column;
|
|
921
|
+
align-items: center;
|
|
922
|
+
gap: 10px;
|
|
923
|
+
padding: 12px 0;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
.cli-panel-status-compact-item {
|
|
927
|
+
display: flex;
|
|
928
|
+
align-items: center;
|
|
929
|
+
justify-content: center;
|
|
930
|
+
width: 20px;
|
|
931
|
+
height: 20px;
|
|
932
|
+
cursor: default;
|
|
933
|
+
color: var(--cli-panel-text-secondary, rgba(255, 255, 255, 0.6));
|
|
934
|
+
font-size: 12px;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.cli-panel-status-compact-item.status-clickable {
|
|
938
|
+
cursor: pointer;
|
|
939
|
+
border-radius: 4px;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.cli-panel-status-compact-item.status-clickable:hover {
|
|
943
|
+
background-color: var(--cli-btn-hover-bg, rgba(129, 140, 248, 0.12));
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
.cli-panel-status-compact-item.status-muted {
|
|
947
|
+
color: var(--cli-panel-text-secondary, rgba(255, 255, 255, 0.4));
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
.cli-panel-status-compact-dot {
|
|
951
|
+
width: 6px;
|
|
952
|
+
height: 6px;
|
|
953
|
+
border-radius: 50%;
|
|
954
|
+
flex-shrink: 0;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
.cli-panel-status-compact-dot.level-info {
|
|
958
|
+
background: var(--cli-panel-accent, #818cf8);
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
.cli-panel-status-compact-dot.level-success {
|
|
962
|
+
background: var(--cli-status-idle, #3fb950);
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
.cli-panel-status-compact-dot.level-warn {
|
|
966
|
+
background: var(--cli-status-running, #f0883e);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
.cli-panel-status-compact-dot.level-error {
|
|
970
|
+
background: var(--cli-status-error, #f85149);
|
|
971
|
+
}
|
|
972
|
+
|
|
896
973
|
/* ─── Tab dot ────────────────────────────────────────────── */
|
|
897
974
|
|
|
898
975
|
.cli-panel-tab-dot {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qodalis/cli",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.13",
|
|
4
4
|
"description": "Framework-agnostic CLI engine for @qodalis terminal applications.",
|
|
5
5
|
"author": "Nicolae Lupei, Qodalis Solutions",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"./assets/*": "./assets/*"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@qodalis/cli-core": "2.0.0-beta.
|
|
33
|
+
"@qodalis/cli-core": "2.0.0-beta.13",
|
|
34
34
|
"@xterm/xterm": "^5.5.0",
|
|
35
35
|
"@xterm/addon-fit": "^0.10.0",
|
|
36
36
|
"@xterm/addon-web-links": "^0.11.0",
|
package/public-api.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _qodalis_cli_core from '@qodalis/cli-core';
|
|
2
|
-
import { ICliCommandProcessor, ICliCommandParameterDescriptor, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliManagedInterval, ICliManagedTimer, ICliKeyValueStore, ICliCompletionProvider, ICliFilePickerProvider, CliFullScreenOptions, ICliProcessRegistry, ICliBackgroundService, ICliServiceContext, ICliBackgroundServiceInfo, ICliServiceLogEntry, CliServiceEventHandler, ICliGlobalParameterHandler, CliForegroundColor, CliBackgroundColor, CliProvider, CliTableOptions, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNumberOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliState, CliEngineSnapshot, CliServerConfig, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliServerOutput, CliIcon } from '@qodalis/cli-core';
|
|
2
|
+
import { ICliCommandProcessor, ICliCommandParameterDescriptor, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliHttpClient, ICliNotifier, ICliManagedInterval, ICliManagedTimer, ICliKeyValueStore, ICliCompletionProvider, ICliFilePickerProvider, CliFullScreenOptions, ICliProcessRegistry, ICliBackgroundService, ICliServiceContext, ICliBackgroundServiceInfo, ICliServiceLogEntry, CliServiceEventHandler, ICliGlobalParameterHandler, CliForegroundColor, CliBackgroundColor, CliProvider, CliTableOptions, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNumberOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliHttpRequestOptions, CliNotification, CliState, CliEngineSnapshot, CliServerConfig, ICliServerAuthService, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliServerOutput, CliIcon } from '@qodalis/cli-core';
|
|
3
3
|
export { ICliUserSessionService_TOKEN, ICliUsersStoreService_TOKEN } from '@qodalis/cli-core';
|
|
4
4
|
import { ITheme, Terminal, ITerminalAddon, ITerminalOptions, ITerminalInitOnlyOptions } from '@xterm/xterm';
|
|
5
|
+
import * as rxjs from 'rxjs';
|
|
5
6
|
import { Subject, Observable, Subscription } from 'rxjs';
|
|
6
7
|
import { FitAddon } from '@xterm/addon-fit';
|
|
7
8
|
import { SerializeAddon } from '@xterm/addon-serialize';
|
|
@@ -141,8 +142,18 @@ declare const CliBackgroundServiceRegistry_TOKEN = "cli-background-service-regis
|
|
|
141
142
|
* Used as a key in the service provider to retrieve the package manager.
|
|
142
143
|
*/
|
|
143
144
|
declare const CliPackageManagerService_TOKEN = "cli-package-manager-service";
|
|
145
|
+
/**
|
|
146
|
+
* Framework-agnostic token for the CLI key-value store.
|
|
147
|
+
* Used as a key in the service provider to retrieve the persistent storage.
|
|
148
|
+
*/
|
|
149
|
+
declare const CliKeyValueStore_TOKEN = "cli-key-value-store";
|
|
150
|
+
/**
|
|
151
|
+
* Framework-agnostic token for the syntax highlighter registry.
|
|
152
|
+
* Used as a key in the service provider to retrieve the syntax highlighter registry.
|
|
153
|
+
*/
|
|
154
|
+
declare const SyntaxHighlighterRegistry_TOKEN = "syntax-highlighter-registry";
|
|
144
155
|
|
|
145
|
-
declare const LIBRARY_VERSION = "2.0.0-beta.
|
|
156
|
+
declare const LIBRARY_VERSION = "2.0.0-beta.13";
|
|
146
157
|
declare const API_VERSION = 2;
|
|
147
158
|
|
|
148
159
|
declare class CliAliasCommandProcessor implements ICliCommandProcessor {
|
|
@@ -910,9 +921,8 @@ declare class CliCommandExecutionContext implements ICliExecutionContext {
|
|
|
910
921
|
translator: ICliTranslationService;
|
|
911
922
|
reader: ICliInputReader;
|
|
912
923
|
readonly backgroundServices: ICliBackgroundServiceRegistry;
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
getStatusText(): string | undefined;
|
|
924
|
+
http: ICliHttpClient;
|
|
925
|
+
notifier: ICliNotifier;
|
|
916
926
|
get promptLength(): number;
|
|
917
927
|
set promptLength(value: number);
|
|
918
928
|
get currentLine(): string;
|
|
@@ -1193,6 +1203,8 @@ declare class CliExecutionContext implements ICliExecutionContext, InputModeHost
|
|
|
1193
1203
|
readonly services: ICliServiceProvider;
|
|
1194
1204
|
readonly translator: ICliTranslationService;
|
|
1195
1205
|
readonly backgroundServices: ICliBackgroundServiceRegistry;
|
|
1206
|
+
http: ICliHttpClient;
|
|
1207
|
+
readonly notifier: ICliNotifier;
|
|
1196
1208
|
promptPathProvider?: () => string | null;
|
|
1197
1209
|
readonly completionEngine: CliCompletionEngine;
|
|
1198
1210
|
promptLength: number;
|
|
@@ -1210,11 +1222,6 @@ declare class CliExecutionContext implements ICliExecutionContext, InputModeHost
|
|
|
1210
1222
|
* Set by the command executor at start/end of executeCommand().
|
|
1211
1223
|
*/
|
|
1212
1224
|
isExecuting: boolean;
|
|
1213
|
-
private _statusText?;
|
|
1214
|
-
readonly statusTextChange$: Subject<string | undefined>;
|
|
1215
|
-
setStatusText(text: string): void;
|
|
1216
|
-
clearStatusText(): void;
|
|
1217
|
-
getStatusText(): string | undefined;
|
|
1218
1225
|
readonly lineBuffer: CliLineBuffer;
|
|
1219
1226
|
readonly lineRenderer: CliTerminalLineRenderer;
|
|
1220
1227
|
readonly commandHistory: CliCommandHistory;
|
|
@@ -1557,18 +1564,58 @@ declare function expandEnvironmentVars(command: string, context: ICliExecutionCo
|
|
|
1557
1564
|
* and `get()` returns an array of resolved values.
|
|
1558
1565
|
*/
|
|
1559
1566
|
declare class CliServiceContainer implements ICliServiceProvider {
|
|
1560
|
-
/** Stores single-value providers (resolved
|
|
1567
|
+
/** Stores single-value providers (resolved singletons). */
|
|
1561
1568
|
private readonly services;
|
|
1562
1569
|
/** Stores multi-provider arrays. */
|
|
1563
1570
|
private readonly multiServices;
|
|
1571
|
+
/** Tokens that cannot be overwritten by subsequent `set()` calls. */
|
|
1572
|
+
private readonly sealedTokens;
|
|
1573
|
+
/** Stores provider recipes for transient tokens (re-resolved on every get). */
|
|
1574
|
+
private readonly transientRecipes;
|
|
1564
1575
|
/**
|
|
1565
1576
|
* Retrieve a service by its token.
|
|
1577
|
+
* Returns `undefined` when no provider is registered for the token.
|
|
1578
|
+
* For multi-provider tokens, returns the last registered value (use `getAll` for the full array).
|
|
1566
1579
|
*
|
|
1567
1580
|
* @param token The token used to register the service.
|
|
1568
|
-
* @returns The resolved service instance
|
|
1581
|
+
* @returns The resolved service instance, or `undefined` if not registered.
|
|
1582
|
+
*/
|
|
1583
|
+
get<T>(token: any): T | undefined;
|
|
1584
|
+
/**
|
|
1585
|
+
* Retrieve all registered services for a multi-provider token.
|
|
1586
|
+
* Returns an empty array when no provider is registered for the token.
|
|
1587
|
+
*
|
|
1588
|
+
* @param token The token used to register the service.
|
|
1589
|
+
* @returns Array of all resolved service instances.
|
|
1590
|
+
*/
|
|
1591
|
+
getAll<T>(token: any): T[];
|
|
1592
|
+
/**
|
|
1593
|
+
* Retrieve a service by its token, throwing if not registered.
|
|
1594
|
+
* Use this when the service is required and its absence is a programming error.
|
|
1595
|
+
* For multi-provider tokens, returns the last registered value (use `getAll` for the full array).
|
|
1596
|
+
*
|
|
1597
|
+
* @param token The token used to register the service.
|
|
1598
|
+
* @returns The resolved service instance.
|
|
1569
1599
|
* @throws Error if the token has not been registered.
|
|
1570
1600
|
*/
|
|
1571
|
-
|
|
1601
|
+
getRequired<T>(token: any): T;
|
|
1602
|
+
/**
|
|
1603
|
+
* Check whether a service is registered for the given token.
|
|
1604
|
+
*/
|
|
1605
|
+
has(token: any): boolean;
|
|
1606
|
+
/**
|
|
1607
|
+
* Mark a token as sealed so it cannot be overwritten by future `set()` calls.
|
|
1608
|
+
* Only available on the concrete container — not exposed on `ICliServiceProvider`.
|
|
1609
|
+
*/
|
|
1610
|
+
seal(token: any): void;
|
|
1611
|
+
/**
|
|
1612
|
+
* Mark multiple tokens as sealed at once.
|
|
1613
|
+
*/
|
|
1614
|
+
sealAll(tokens: any[]): void;
|
|
1615
|
+
/**
|
|
1616
|
+
* Check whether a token is sealed.
|
|
1617
|
+
*/
|
|
1618
|
+
isSealed(token: any): boolean;
|
|
1572
1619
|
/**
|
|
1573
1620
|
* Register one or more providers.
|
|
1574
1621
|
*
|
|
@@ -1587,6 +1634,10 @@ declare class CliServiceContainer implements ICliServiceProvider {
|
|
|
1587
1634
|
type: string;
|
|
1588
1635
|
multi: boolean;
|
|
1589
1636
|
}[];
|
|
1637
|
+
/**
|
|
1638
|
+
* Convert a token to a human-readable string for diagnostics/errors.
|
|
1639
|
+
*/
|
|
1640
|
+
private tokenToString;
|
|
1590
1641
|
/**
|
|
1591
1642
|
* Describe a resolved value for diagnostic display.
|
|
1592
1643
|
*/
|
|
@@ -1597,6 +1648,9 @@ declare class CliServiceContainer implements ICliServiceProvider {
|
|
|
1597
1648
|
private registerProvider;
|
|
1598
1649
|
/**
|
|
1599
1650
|
* Resolve a provider definition to a concrete value.
|
|
1651
|
+
*
|
|
1652
|
+
* Note: `deps` are resolved eagerly at registration time, so
|
|
1653
|
+
* dependency tokens must be registered before the provider that needs them.
|
|
1600
1654
|
*/
|
|
1601
1655
|
private resolveProvider;
|
|
1602
1656
|
}
|
|
@@ -1971,6 +2025,49 @@ declare class CliDragDropService implements ICliDragDropService {
|
|
|
1971
2025
|
destroy(): void;
|
|
1972
2026
|
}
|
|
1973
2027
|
|
|
2028
|
+
/**
|
|
2029
|
+
* Default HTTP client implementation.
|
|
2030
|
+
*
|
|
2031
|
+
* Wraps the global `fetch()` and automatically merges an abort signal
|
|
2032
|
+
* so that in-flight requests are cancelled when the user presses Ctrl+C.
|
|
2033
|
+
*
|
|
2034
|
+
* Created per-command by the executor — each instance is bound to the
|
|
2035
|
+
* command's own AbortSignal.
|
|
2036
|
+
*/
|
|
2037
|
+
declare class CliHttpClient implements ICliHttpClient {
|
|
2038
|
+
private readonly signal?;
|
|
2039
|
+
constructor(signal?: AbortSignal | undefined);
|
|
2040
|
+
fetch(url: string, init?: RequestInit): Promise<Response>;
|
|
2041
|
+
get<T = any>(url: string, options?: CliHttpRequestOptions): Promise<T>;
|
|
2042
|
+
post<T = any>(url: string, body?: any, options?: CliHttpRequestOptions): Promise<T>;
|
|
2043
|
+
put<T = any>(url: string, body?: any, options?: CliHttpRequestOptions): Promise<T>;
|
|
2044
|
+
patch<T = any>(url: string, body?: any, options?: CliHttpRequestOptions): Promise<T>;
|
|
2045
|
+
delete<T = any>(url: string, options?: CliHttpRequestOptions): Promise<T>;
|
|
2046
|
+
head(url: string, options?: CliHttpRequestOptions): Promise<Response>;
|
|
2047
|
+
options<T = any>(url: string, options?: CliHttpRequestOptions): Promise<T>;
|
|
2048
|
+
private jsonRequest;
|
|
2049
|
+
private isRawBody;
|
|
2050
|
+
/**
|
|
2051
|
+
* Merge the command signal with any additional signals (caller, timeout).
|
|
2052
|
+
* Uses AbortSignal.any() when available, falls back to a manual composite
|
|
2053
|
+
* controller for older browsers (pre-Chrome 116 / Safari 17.4).
|
|
2054
|
+
*/
|
|
2055
|
+
private mergeSignal;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
declare class CliNotifier implements ICliNotifier {
|
|
2059
|
+
private _current;
|
|
2060
|
+
private readonly _change$;
|
|
2061
|
+
readonly change$: rxjs.Observable<CliNotification | undefined>;
|
|
2062
|
+
get current(): CliNotification | undefined;
|
|
2063
|
+
info(message: string): void;
|
|
2064
|
+
success(message: string): void;
|
|
2065
|
+
warn(message: string): void;
|
|
2066
|
+
error(message: string): void;
|
|
2067
|
+
clear(): void;
|
|
2068
|
+
private set;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
1974
2071
|
declare class OverlayAddon implements ITerminalAddon {
|
|
1975
2072
|
private terminal;
|
|
1976
2073
|
private overlayNode;
|
|
@@ -2218,6 +2315,7 @@ declare class CliServerConnection {
|
|
|
2218
2315
|
private readonly _config;
|
|
2219
2316
|
private readonly _backgroundServices?;
|
|
2220
2317
|
private readonly _logger?;
|
|
2318
|
+
private readonly _authService?;
|
|
2221
2319
|
private _connected;
|
|
2222
2320
|
private _commands;
|
|
2223
2321
|
private _capabilities;
|
|
@@ -2234,12 +2332,18 @@ declare class CliServerConnection {
|
|
|
2234
2332
|
private static readonly HEALTH_CHECK_MAX_ATTEMPTS;
|
|
2235
2333
|
onDisconnect?: () => void;
|
|
2236
2334
|
onReconnected?: () => void;
|
|
2237
|
-
constructor(_config: CliServerConfig, _backgroundServices?: ICliBackgroundServiceRegistry | undefined, _logger?: ICliLogger | undefined);
|
|
2335
|
+
constructor(_config: CliServerConfig, _backgroundServices?: ICliBackgroundServiceRegistry | undefined, _logger?: ICliLogger | undefined, _authService?: ICliServerAuthService | undefined);
|
|
2238
2336
|
get config(): CliServerConfig;
|
|
2239
2337
|
get connected(): boolean;
|
|
2240
2338
|
get commands(): CliServerCommandDescriptor[];
|
|
2241
2339
|
get capabilities(): CliServerCapabilities | null;
|
|
2242
2340
|
get apiVersion(): number;
|
|
2341
|
+
/**
|
|
2342
|
+
* Resolve auth headers for this server connection.
|
|
2343
|
+
* Uses the auth service (which merges config headers with registered
|
|
2344
|
+
* ICliServerAuthTokenProviders), or falls back to config headers directly.
|
|
2345
|
+
*/
|
|
2346
|
+
resolveAuthHeaders(): Record<string, string>;
|
|
2243
2347
|
connect(): Promise<void>;
|
|
2244
2348
|
disconnect(): void;
|
|
2245
2349
|
startHealthCheck(): void;
|
|
@@ -2325,12 +2429,13 @@ declare class CliServerMultiProxyProcessor implements ICliCommandProcessor {
|
|
|
2325
2429
|
declare const CliServerManager_TOKEN = "cli-server-manager";
|
|
2326
2430
|
declare class CliServerManager implements DefaultServerProvider {
|
|
2327
2431
|
private readonly registry;
|
|
2432
|
+
private readonly authService?;
|
|
2328
2433
|
readonly connections: Map<string, CliServerConnection>;
|
|
2329
2434
|
private _logger?;
|
|
2330
2435
|
private _cliLogger?;
|
|
2331
2436
|
private _defaultServer;
|
|
2332
2437
|
private _backgroundServices?;
|
|
2333
|
-
constructor(registry: ICliCommandProcessorRegistry);
|
|
2438
|
+
constructor(registry: ICliCommandProcessorRegistry, authService?: ICliServerAuthService | undefined);
|
|
2334
2439
|
get defaultServer(): string | null;
|
|
2335
2440
|
setDefaultServer(name: string | null): void;
|
|
2336
2441
|
connectAll(servers: CliServerConfig[], logger?: {
|
|
@@ -2527,4 +2632,4 @@ declare function getAccelerator(): ICliWasmAccelerator;
|
|
|
2527
2632
|
*/
|
|
2528
2633
|
declare function isWasmAccelerated(): boolean;
|
|
2529
2634
|
|
|
2530
|
-
export { API_VERSION, CLi_Name_Art, CapturingTerminalWriter, type CdnSourceName, CliAliasCommandProcessor, CliArgsParser, CliBackgroundServiceRegistry_TOKEN, CliBoot, CliCalCommandProcessor, CliCaptureCommandProcessor, CliClearCommandProcessor, CliClipboard, CliClipboardCommandProcessor, CliColorCommandProcessor, CliCommandExecutionContext, CliCommandExecutor, CliCommandHistory, CliCommandHistory_TOKEN, CliCommandProcessorRegistry, CliConfigureCommandProcessor, CliConvertCommandProcessor, CliDebugCommandProcessor, CliDefaultPingServerService, CliDiffCommandProcessor, CliDragDropService, CliEchoCommandProcessor, CliEngine, type CliEngineOptions, CliEnvCommandProcessor, CliEnvironment, CliEvalCommandProcessor, CliExecutionContext, type CliExecutionContextDeps, CliExecutionProcess, CliExportCommandProcessor, CliFeedbackCommandProcessor, CliFontSizeCommandProcessor, CliFullScreenManager, CliHelpCommandProcessor, CliHistoryCommandProcessor, CliHotKeysCommandProcessor, CliHtopCommandProcessor, CliInputReader, CliJsonCommandProcessor, CliKeyValueStore, CliKillCommandProcessor, CliLogger, CliLoremCommandProcessor, CliModuleRegistry_TOKEN, CliNanoCommandProcessor, CliOpenCommandProcessor, CliPackageManagerService, CliPackageManagerService_TOKEN, CliPackagesCommandProcessor, CliPingCommandProcessor, CliProcessRegistry, CliProcessRegistry_TOKEN, CliProcessorsRegistry_TOKEN, CliPsCommandProcessor, CliRandomCommandProcessor, CliScreenCommandProcessor, CliSeqCommandProcessor, CliServerCommandProcessor, CliServerConnection, CliServerManager, CliServerManager_TOKEN, CliServerMultiProxyProcessor, CliServerProxyProcessor, CliServiceContainer, CliServicesCommandProcessor, CliSleepCommandProcessor, CliSnippetCommandProcessor, CliSshCommandProcessor, CliStateStore, CliStateStoreManager, CliStateStoreManager_TOKEN, CliTerminalProgressBar, CliTerminalSpinner, CliTerminalTextAnimator, CliTerminalWriter, CliTestHarness, type CliTestResult, CliThemeCommandProcessor, CliTimeCommandProcessor, CliTimerManager, CliTimestampCommandProcessor, CliUnAliasCommandProcessor, CliUnameCommandProcessor, CliUnsetCommandProcessor, CliUptimeCommandProcessor, CliVersionCommandProcessor, type CliWelcomeMessageConfig, CliYesCommandProcessor, CommandParser, type CommandParserOutput, type CommandPart, type ConfigureState, type DefaultServerProvider, type DiffLine, type DiffType, type ICliEnvironment, ICliEnvironment_TOKEN, type ICliExecutionHost, ICliPingServerService_TOKEN, type ICliStateStoreManager, type ICliWasmAccelerator, type InitializeServicesOptions, type InitializeServicesResult, JsFallbackAccelerator, LIBRARY_VERSION, type MultiProxyEntry, OverlayAddon, type ParsedArg, type ParsedToken, ProcessExitedError, ScriptLoaderService, type TerminalSetupResult, type ThemeState, appendOutputToFile, appendStderrToFile, builtinProcessors, computeDiff, contextGlobalParameter, createServerModule, executeOnServer, expandEnvironmentVars, formatDiff, getAccelerator, getCliNameArt, getGreetingBasedOnTime, getTerminalOptions, groupBy, helpGlobalParameter, hotkeysInfo, initWasmAccelerator, initializeServices, initializeTerminal, isWasmAccelerated, miscProcessors, openLink, reconcileArgs, renderServerResponse, renderSingleOutput, substituteVars, systemProcessors, themeInfos, themes, tryExecuteScript, versionGlobalParameter, waitForLayout, welcomeModule, writeOutputToFile, writeStderrToFile };
|
|
2635
|
+
export { API_VERSION, CLi_Name_Art, CapturingTerminalWriter, type CdnSourceName, CliAliasCommandProcessor, CliArgsParser, CliBackgroundServiceRegistry_TOKEN, CliBoot, CliCalCommandProcessor, CliCaptureCommandProcessor, CliClearCommandProcessor, CliClipboard, CliClipboardCommandProcessor, CliColorCommandProcessor, CliCommandExecutionContext, CliCommandExecutor, CliCommandHistory, CliCommandHistory_TOKEN, CliCommandProcessorRegistry, CliConfigureCommandProcessor, CliConvertCommandProcessor, CliDebugCommandProcessor, CliDefaultPingServerService, CliDiffCommandProcessor, CliDragDropService, CliEchoCommandProcessor, CliEngine, type CliEngineOptions, CliEnvCommandProcessor, CliEnvironment, CliEvalCommandProcessor, CliExecutionContext, type CliExecutionContextDeps, CliExecutionProcess, CliExportCommandProcessor, CliFeedbackCommandProcessor, CliFontSizeCommandProcessor, CliFullScreenManager, CliHelpCommandProcessor, CliHistoryCommandProcessor, CliHotKeysCommandProcessor, CliHtopCommandProcessor, CliHttpClient, CliInputReader, CliJsonCommandProcessor, CliKeyValueStore, CliKeyValueStore_TOKEN, CliKillCommandProcessor, CliLogger, CliLoremCommandProcessor, CliModuleRegistry_TOKEN, CliNanoCommandProcessor, CliNotifier, CliOpenCommandProcessor, CliPackageManagerService, CliPackageManagerService_TOKEN, CliPackagesCommandProcessor, CliPingCommandProcessor, CliProcessRegistry, CliProcessRegistry_TOKEN, CliProcessorsRegistry_TOKEN, CliPsCommandProcessor, CliRandomCommandProcessor, CliScreenCommandProcessor, CliSeqCommandProcessor, CliServerCommandProcessor, CliServerConnection, CliServerManager, CliServerManager_TOKEN, CliServerMultiProxyProcessor, CliServerProxyProcessor, CliServiceContainer, CliServicesCommandProcessor, CliSleepCommandProcessor, CliSnippetCommandProcessor, CliSshCommandProcessor, CliStateStore, CliStateStoreManager, CliStateStoreManager_TOKEN, CliTerminalProgressBar, CliTerminalSpinner, CliTerminalTextAnimator, CliTerminalWriter, CliTestHarness, type CliTestResult, CliThemeCommandProcessor, CliTimeCommandProcessor, CliTimerManager, CliTimestampCommandProcessor, CliUnAliasCommandProcessor, CliUnameCommandProcessor, CliUnsetCommandProcessor, CliUptimeCommandProcessor, CliVersionCommandProcessor, type CliWelcomeMessageConfig, CliYesCommandProcessor, CommandParser, type CommandParserOutput, type CommandPart, type ConfigureState, type DefaultServerProvider, type DiffLine, type DiffType, type ICliEnvironment, ICliEnvironment_TOKEN, type ICliExecutionHost, ICliPingServerService_TOKEN, type ICliStateStoreManager, type ICliWasmAccelerator, type InitializeServicesOptions, type InitializeServicesResult, JsFallbackAccelerator, LIBRARY_VERSION, type MultiProxyEntry, OverlayAddon, type ParsedArg, type ParsedToken, ProcessExitedError, ScriptLoaderService, SyntaxHighlighterRegistry_TOKEN, type TerminalSetupResult, type ThemeState, appendOutputToFile, appendStderrToFile, builtinProcessors, computeDiff, contextGlobalParameter, createServerModule, executeOnServer, expandEnvironmentVars, formatDiff, getAccelerator, getCliNameArt, getGreetingBasedOnTime, getTerminalOptions, groupBy, helpGlobalParameter, hotkeysInfo, initWasmAccelerator, initializeServices, initializeTerminal, isWasmAccelerated, miscProcessors, openLink, reconcileArgs, renderServerResponse, renderSingleOutput, substituteVars, systemProcessors, themeInfos, themes, tryExecuteScript, versionGlobalParameter, waitForLayout, welcomeModule, writeOutputToFile, writeStderrToFile };
|
package/public-api.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _qodalis_cli_core from '@qodalis/cli-core';
|
|
2
|
-
import { ICliCommandProcessor, ICliCommandParameterDescriptor, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliManagedInterval, ICliManagedTimer, ICliKeyValueStore, ICliCompletionProvider, ICliFilePickerProvider, CliFullScreenOptions, ICliProcessRegistry, ICliBackgroundService, ICliServiceContext, ICliBackgroundServiceInfo, ICliServiceLogEntry, CliServiceEventHandler, ICliGlobalParameterHandler, CliForegroundColor, CliBackgroundColor, CliProvider, CliTableOptions, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNumberOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliState, CliEngineSnapshot, CliServerConfig, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliServerOutput, CliIcon } from '@qodalis/cli-core';
|
|
2
|
+
import { ICliCommandProcessor, ICliCommandParameterDescriptor, ICliCommandProcessorRegistry, ICliCommandChildProcessor, CliProcessorMetadata, CliStateConfiguration, ICliExecutionContext, CliProcessCommand, ICliCommandAuthor, CliThemeInfo, ICliExecutionProcess, ICliUserSession, ICliSpinner, ICliPercentageProgressBar, ICliTextAnimator, ICliTerminalWriter, ICliCommandExecutorService, ICliClipboard, ICliStateStore, CliOptions, ICliLogger, ICliServiceProvider, ICliTranslationService, ICliInputReader, ICliBackgroundServiceRegistry, ICliHttpClient, ICliNotifier, ICliManagedInterval, ICliManagedTimer, ICliKeyValueStore, ICliCompletionProvider, ICliFilePickerProvider, CliFullScreenOptions, ICliProcessRegistry, ICliBackgroundService, ICliServiceContext, ICliBackgroundServiceInfo, ICliServiceLogEntry, CliServiceEventHandler, ICliGlobalParameterHandler, CliForegroundColor, CliBackgroundColor, CliProvider, CliTableOptions, CliLogLevel, CliPercentageProgressBarUpdateValueOptions, CliTextAnimatorOptions, ICliModule, CliModuleRegistry, Package, ICliPingServerService, CliLineOptions, CliSelectOption, CliSelectOptions, CliMultiSelectOption, CliMultiSelectOptions, CliNumberOptions, CliDateOptions, CliFilePickerOptions, CliFileResult, ICliProcessRegisterOptions, ICliProcessEntry, ICliDragDropService, CliHttpRequestOptions, CliNotification, CliState, CliEngineSnapshot, CliServerConfig, ICliServerAuthService, CliServerCommandDescriptor, CliServerCapabilities, CliServerResponse, CliServerOutput, CliIcon } from '@qodalis/cli-core';
|
|
3
3
|
export { ICliUserSessionService_TOKEN, ICliUsersStoreService_TOKEN } from '@qodalis/cli-core';
|
|
4
4
|
import { ITheme, Terminal, ITerminalAddon, ITerminalOptions, ITerminalInitOnlyOptions } from '@xterm/xterm';
|
|
5
|
+
import * as rxjs from 'rxjs';
|
|
5
6
|
import { Subject, Observable, Subscription } from 'rxjs';
|
|
6
7
|
import { FitAddon } from '@xterm/addon-fit';
|
|
7
8
|
import { SerializeAddon } from '@xterm/addon-serialize';
|
|
@@ -141,8 +142,18 @@ declare const CliBackgroundServiceRegistry_TOKEN = "cli-background-service-regis
|
|
|
141
142
|
* Used as a key in the service provider to retrieve the package manager.
|
|
142
143
|
*/
|
|
143
144
|
declare const CliPackageManagerService_TOKEN = "cli-package-manager-service";
|
|
145
|
+
/**
|
|
146
|
+
* Framework-agnostic token for the CLI key-value store.
|
|
147
|
+
* Used as a key in the service provider to retrieve the persistent storage.
|
|
148
|
+
*/
|
|
149
|
+
declare const CliKeyValueStore_TOKEN = "cli-key-value-store";
|
|
150
|
+
/**
|
|
151
|
+
* Framework-agnostic token for the syntax highlighter registry.
|
|
152
|
+
* Used as a key in the service provider to retrieve the syntax highlighter registry.
|
|
153
|
+
*/
|
|
154
|
+
declare const SyntaxHighlighterRegistry_TOKEN = "syntax-highlighter-registry";
|
|
144
155
|
|
|
145
|
-
declare const LIBRARY_VERSION = "2.0.0-beta.
|
|
156
|
+
declare const LIBRARY_VERSION = "2.0.0-beta.13";
|
|
146
157
|
declare const API_VERSION = 2;
|
|
147
158
|
|
|
148
159
|
declare class CliAliasCommandProcessor implements ICliCommandProcessor {
|
|
@@ -910,9 +921,8 @@ declare class CliCommandExecutionContext implements ICliExecutionContext {
|
|
|
910
921
|
translator: ICliTranslationService;
|
|
911
922
|
reader: ICliInputReader;
|
|
912
923
|
readonly backgroundServices: ICliBackgroundServiceRegistry;
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
getStatusText(): string | undefined;
|
|
924
|
+
http: ICliHttpClient;
|
|
925
|
+
notifier: ICliNotifier;
|
|
916
926
|
get promptLength(): number;
|
|
917
927
|
set promptLength(value: number);
|
|
918
928
|
get currentLine(): string;
|
|
@@ -1193,6 +1203,8 @@ declare class CliExecutionContext implements ICliExecutionContext, InputModeHost
|
|
|
1193
1203
|
readonly services: ICliServiceProvider;
|
|
1194
1204
|
readonly translator: ICliTranslationService;
|
|
1195
1205
|
readonly backgroundServices: ICliBackgroundServiceRegistry;
|
|
1206
|
+
http: ICliHttpClient;
|
|
1207
|
+
readonly notifier: ICliNotifier;
|
|
1196
1208
|
promptPathProvider?: () => string | null;
|
|
1197
1209
|
readonly completionEngine: CliCompletionEngine;
|
|
1198
1210
|
promptLength: number;
|
|
@@ -1210,11 +1222,6 @@ declare class CliExecutionContext implements ICliExecutionContext, InputModeHost
|
|
|
1210
1222
|
* Set by the command executor at start/end of executeCommand().
|
|
1211
1223
|
*/
|
|
1212
1224
|
isExecuting: boolean;
|
|
1213
|
-
private _statusText?;
|
|
1214
|
-
readonly statusTextChange$: Subject<string | undefined>;
|
|
1215
|
-
setStatusText(text: string): void;
|
|
1216
|
-
clearStatusText(): void;
|
|
1217
|
-
getStatusText(): string | undefined;
|
|
1218
1225
|
readonly lineBuffer: CliLineBuffer;
|
|
1219
1226
|
readonly lineRenderer: CliTerminalLineRenderer;
|
|
1220
1227
|
readonly commandHistory: CliCommandHistory;
|
|
@@ -1557,18 +1564,58 @@ declare function expandEnvironmentVars(command: string, context: ICliExecutionCo
|
|
|
1557
1564
|
* and `get()` returns an array of resolved values.
|
|
1558
1565
|
*/
|
|
1559
1566
|
declare class CliServiceContainer implements ICliServiceProvider {
|
|
1560
|
-
/** Stores single-value providers (resolved
|
|
1567
|
+
/** Stores single-value providers (resolved singletons). */
|
|
1561
1568
|
private readonly services;
|
|
1562
1569
|
/** Stores multi-provider arrays. */
|
|
1563
1570
|
private readonly multiServices;
|
|
1571
|
+
/** Tokens that cannot be overwritten by subsequent `set()` calls. */
|
|
1572
|
+
private readonly sealedTokens;
|
|
1573
|
+
/** Stores provider recipes for transient tokens (re-resolved on every get). */
|
|
1574
|
+
private readonly transientRecipes;
|
|
1564
1575
|
/**
|
|
1565
1576
|
* Retrieve a service by its token.
|
|
1577
|
+
* Returns `undefined` when no provider is registered for the token.
|
|
1578
|
+
* For multi-provider tokens, returns the last registered value (use `getAll` for the full array).
|
|
1566
1579
|
*
|
|
1567
1580
|
* @param token The token used to register the service.
|
|
1568
|
-
* @returns The resolved service instance
|
|
1581
|
+
* @returns The resolved service instance, or `undefined` if not registered.
|
|
1582
|
+
*/
|
|
1583
|
+
get<T>(token: any): T | undefined;
|
|
1584
|
+
/**
|
|
1585
|
+
* Retrieve all registered services for a multi-provider token.
|
|
1586
|
+
* Returns an empty array when no provider is registered for the token.
|
|
1587
|
+
*
|
|
1588
|
+
* @param token The token used to register the service.
|
|
1589
|
+
* @returns Array of all resolved service instances.
|
|
1590
|
+
*/
|
|
1591
|
+
getAll<T>(token: any): T[];
|
|
1592
|
+
/**
|
|
1593
|
+
* Retrieve a service by its token, throwing if not registered.
|
|
1594
|
+
* Use this when the service is required and its absence is a programming error.
|
|
1595
|
+
* For multi-provider tokens, returns the last registered value (use `getAll` for the full array).
|
|
1596
|
+
*
|
|
1597
|
+
* @param token The token used to register the service.
|
|
1598
|
+
* @returns The resolved service instance.
|
|
1569
1599
|
* @throws Error if the token has not been registered.
|
|
1570
1600
|
*/
|
|
1571
|
-
|
|
1601
|
+
getRequired<T>(token: any): T;
|
|
1602
|
+
/**
|
|
1603
|
+
* Check whether a service is registered for the given token.
|
|
1604
|
+
*/
|
|
1605
|
+
has(token: any): boolean;
|
|
1606
|
+
/**
|
|
1607
|
+
* Mark a token as sealed so it cannot be overwritten by future `set()` calls.
|
|
1608
|
+
* Only available on the concrete container — not exposed on `ICliServiceProvider`.
|
|
1609
|
+
*/
|
|
1610
|
+
seal(token: any): void;
|
|
1611
|
+
/**
|
|
1612
|
+
* Mark multiple tokens as sealed at once.
|
|
1613
|
+
*/
|
|
1614
|
+
sealAll(tokens: any[]): void;
|
|
1615
|
+
/**
|
|
1616
|
+
* Check whether a token is sealed.
|
|
1617
|
+
*/
|
|
1618
|
+
isSealed(token: any): boolean;
|
|
1572
1619
|
/**
|
|
1573
1620
|
* Register one or more providers.
|
|
1574
1621
|
*
|
|
@@ -1587,6 +1634,10 @@ declare class CliServiceContainer implements ICliServiceProvider {
|
|
|
1587
1634
|
type: string;
|
|
1588
1635
|
multi: boolean;
|
|
1589
1636
|
}[];
|
|
1637
|
+
/**
|
|
1638
|
+
* Convert a token to a human-readable string for diagnostics/errors.
|
|
1639
|
+
*/
|
|
1640
|
+
private tokenToString;
|
|
1590
1641
|
/**
|
|
1591
1642
|
* Describe a resolved value for diagnostic display.
|
|
1592
1643
|
*/
|
|
@@ -1597,6 +1648,9 @@ declare class CliServiceContainer implements ICliServiceProvider {
|
|
|
1597
1648
|
private registerProvider;
|
|
1598
1649
|
/**
|
|
1599
1650
|
* Resolve a provider definition to a concrete value.
|
|
1651
|
+
*
|
|
1652
|
+
* Note: `deps` are resolved eagerly at registration time, so
|
|
1653
|
+
* dependency tokens must be registered before the provider that needs them.
|
|
1600
1654
|
*/
|
|
1601
1655
|
private resolveProvider;
|
|
1602
1656
|
}
|
|
@@ -1971,6 +2025,49 @@ declare class CliDragDropService implements ICliDragDropService {
|
|
|
1971
2025
|
destroy(): void;
|
|
1972
2026
|
}
|
|
1973
2027
|
|
|
2028
|
+
/**
|
|
2029
|
+
* Default HTTP client implementation.
|
|
2030
|
+
*
|
|
2031
|
+
* Wraps the global `fetch()` and automatically merges an abort signal
|
|
2032
|
+
* so that in-flight requests are cancelled when the user presses Ctrl+C.
|
|
2033
|
+
*
|
|
2034
|
+
* Created per-command by the executor — each instance is bound to the
|
|
2035
|
+
* command's own AbortSignal.
|
|
2036
|
+
*/
|
|
2037
|
+
declare class CliHttpClient implements ICliHttpClient {
|
|
2038
|
+
private readonly signal?;
|
|
2039
|
+
constructor(signal?: AbortSignal | undefined);
|
|
2040
|
+
fetch(url: string, init?: RequestInit): Promise<Response>;
|
|
2041
|
+
get<T = any>(url: string, options?: CliHttpRequestOptions): Promise<T>;
|
|
2042
|
+
post<T = any>(url: string, body?: any, options?: CliHttpRequestOptions): Promise<T>;
|
|
2043
|
+
put<T = any>(url: string, body?: any, options?: CliHttpRequestOptions): Promise<T>;
|
|
2044
|
+
patch<T = any>(url: string, body?: any, options?: CliHttpRequestOptions): Promise<T>;
|
|
2045
|
+
delete<T = any>(url: string, options?: CliHttpRequestOptions): Promise<T>;
|
|
2046
|
+
head(url: string, options?: CliHttpRequestOptions): Promise<Response>;
|
|
2047
|
+
options<T = any>(url: string, options?: CliHttpRequestOptions): Promise<T>;
|
|
2048
|
+
private jsonRequest;
|
|
2049
|
+
private isRawBody;
|
|
2050
|
+
/**
|
|
2051
|
+
* Merge the command signal with any additional signals (caller, timeout).
|
|
2052
|
+
* Uses AbortSignal.any() when available, falls back to a manual composite
|
|
2053
|
+
* controller for older browsers (pre-Chrome 116 / Safari 17.4).
|
|
2054
|
+
*/
|
|
2055
|
+
private mergeSignal;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
declare class CliNotifier implements ICliNotifier {
|
|
2059
|
+
private _current;
|
|
2060
|
+
private readonly _change$;
|
|
2061
|
+
readonly change$: rxjs.Observable<CliNotification | undefined>;
|
|
2062
|
+
get current(): CliNotification | undefined;
|
|
2063
|
+
info(message: string): void;
|
|
2064
|
+
success(message: string): void;
|
|
2065
|
+
warn(message: string): void;
|
|
2066
|
+
error(message: string): void;
|
|
2067
|
+
clear(): void;
|
|
2068
|
+
private set;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
1974
2071
|
declare class OverlayAddon implements ITerminalAddon {
|
|
1975
2072
|
private terminal;
|
|
1976
2073
|
private overlayNode;
|
|
@@ -2218,6 +2315,7 @@ declare class CliServerConnection {
|
|
|
2218
2315
|
private readonly _config;
|
|
2219
2316
|
private readonly _backgroundServices?;
|
|
2220
2317
|
private readonly _logger?;
|
|
2318
|
+
private readonly _authService?;
|
|
2221
2319
|
private _connected;
|
|
2222
2320
|
private _commands;
|
|
2223
2321
|
private _capabilities;
|
|
@@ -2234,12 +2332,18 @@ declare class CliServerConnection {
|
|
|
2234
2332
|
private static readonly HEALTH_CHECK_MAX_ATTEMPTS;
|
|
2235
2333
|
onDisconnect?: () => void;
|
|
2236
2334
|
onReconnected?: () => void;
|
|
2237
|
-
constructor(_config: CliServerConfig, _backgroundServices?: ICliBackgroundServiceRegistry | undefined, _logger?: ICliLogger | undefined);
|
|
2335
|
+
constructor(_config: CliServerConfig, _backgroundServices?: ICliBackgroundServiceRegistry | undefined, _logger?: ICliLogger | undefined, _authService?: ICliServerAuthService | undefined);
|
|
2238
2336
|
get config(): CliServerConfig;
|
|
2239
2337
|
get connected(): boolean;
|
|
2240
2338
|
get commands(): CliServerCommandDescriptor[];
|
|
2241
2339
|
get capabilities(): CliServerCapabilities | null;
|
|
2242
2340
|
get apiVersion(): number;
|
|
2341
|
+
/**
|
|
2342
|
+
* Resolve auth headers for this server connection.
|
|
2343
|
+
* Uses the auth service (which merges config headers with registered
|
|
2344
|
+
* ICliServerAuthTokenProviders), or falls back to config headers directly.
|
|
2345
|
+
*/
|
|
2346
|
+
resolveAuthHeaders(): Record<string, string>;
|
|
2243
2347
|
connect(): Promise<void>;
|
|
2244
2348
|
disconnect(): void;
|
|
2245
2349
|
startHealthCheck(): void;
|
|
@@ -2325,12 +2429,13 @@ declare class CliServerMultiProxyProcessor implements ICliCommandProcessor {
|
|
|
2325
2429
|
declare const CliServerManager_TOKEN = "cli-server-manager";
|
|
2326
2430
|
declare class CliServerManager implements DefaultServerProvider {
|
|
2327
2431
|
private readonly registry;
|
|
2432
|
+
private readonly authService?;
|
|
2328
2433
|
readonly connections: Map<string, CliServerConnection>;
|
|
2329
2434
|
private _logger?;
|
|
2330
2435
|
private _cliLogger?;
|
|
2331
2436
|
private _defaultServer;
|
|
2332
2437
|
private _backgroundServices?;
|
|
2333
|
-
constructor(registry: ICliCommandProcessorRegistry);
|
|
2438
|
+
constructor(registry: ICliCommandProcessorRegistry, authService?: ICliServerAuthService | undefined);
|
|
2334
2439
|
get defaultServer(): string | null;
|
|
2335
2440
|
setDefaultServer(name: string | null): void;
|
|
2336
2441
|
connectAll(servers: CliServerConfig[], logger?: {
|
|
@@ -2527,4 +2632,4 @@ declare function getAccelerator(): ICliWasmAccelerator;
|
|
|
2527
2632
|
*/
|
|
2528
2633
|
declare function isWasmAccelerated(): boolean;
|
|
2529
2634
|
|
|
2530
|
-
export { API_VERSION, CLi_Name_Art, CapturingTerminalWriter, type CdnSourceName, CliAliasCommandProcessor, CliArgsParser, CliBackgroundServiceRegistry_TOKEN, CliBoot, CliCalCommandProcessor, CliCaptureCommandProcessor, CliClearCommandProcessor, CliClipboard, CliClipboardCommandProcessor, CliColorCommandProcessor, CliCommandExecutionContext, CliCommandExecutor, CliCommandHistory, CliCommandHistory_TOKEN, CliCommandProcessorRegistry, CliConfigureCommandProcessor, CliConvertCommandProcessor, CliDebugCommandProcessor, CliDefaultPingServerService, CliDiffCommandProcessor, CliDragDropService, CliEchoCommandProcessor, CliEngine, type CliEngineOptions, CliEnvCommandProcessor, CliEnvironment, CliEvalCommandProcessor, CliExecutionContext, type CliExecutionContextDeps, CliExecutionProcess, CliExportCommandProcessor, CliFeedbackCommandProcessor, CliFontSizeCommandProcessor, CliFullScreenManager, CliHelpCommandProcessor, CliHistoryCommandProcessor, CliHotKeysCommandProcessor, CliHtopCommandProcessor, CliInputReader, CliJsonCommandProcessor, CliKeyValueStore, CliKillCommandProcessor, CliLogger, CliLoremCommandProcessor, CliModuleRegistry_TOKEN, CliNanoCommandProcessor, CliOpenCommandProcessor, CliPackageManagerService, CliPackageManagerService_TOKEN, CliPackagesCommandProcessor, CliPingCommandProcessor, CliProcessRegistry, CliProcessRegistry_TOKEN, CliProcessorsRegistry_TOKEN, CliPsCommandProcessor, CliRandomCommandProcessor, CliScreenCommandProcessor, CliSeqCommandProcessor, CliServerCommandProcessor, CliServerConnection, CliServerManager, CliServerManager_TOKEN, CliServerMultiProxyProcessor, CliServerProxyProcessor, CliServiceContainer, CliServicesCommandProcessor, CliSleepCommandProcessor, CliSnippetCommandProcessor, CliSshCommandProcessor, CliStateStore, CliStateStoreManager, CliStateStoreManager_TOKEN, CliTerminalProgressBar, CliTerminalSpinner, CliTerminalTextAnimator, CliTerminalWriter, CliTestHarness, type CliTestResult, CliThemeCommandProcessor, CliTimeCommandProcessor, CliTimerManager, CliTimestampCommandProcessor, CliUnAliasCommandProcessor, CliUnameCommandProcessor, CliUnsetCommandProcessor, CliUptimeCommandProcessor, CliVersionCommandProcessor, type CliWelcomeMessageConfig, CliYesCommandProcessor, CommandParser, type CommandParserOutput, type CommandPart, type ConfigureState, type DefaultServerProvider, type DiffLine, type DiffType, type ICliEnvironment, ICliEnvironment_TOKEN, type ICliExecutionHost, ICliPingServerService_TOKEN, type ICliStateStoreManager, type ICliWasmAccelerator, type InitializeServicesOptions, type InitializeServicesResult, JsFallbackAccelerator, LIBRARY_VERSION, type MultiProxyEntry, OverlayAddon, type ParsedArg, type ParsedToken, ProcessExitedError, ScriptLoaderService, type TerminalSetupResult, type ThemeState, appendOutputToFile, appendStderrToFile, builtinProcessors, computeDiff, contextGlobalParameter, createServerModule, executeOnServer, expandEnvironmentVars, formatDiff, getAccelerator, getCliNameArt, getGreetingBasedOnTime, getTerminalOptions, groupBy, helpGlobalParameter, hotkeysInfo, initWasmAccelerator, initializeServices, initializeTerminal, isWasmAccelerated, miscProcessors, openLink, reconcileArgs, renderServerResponse, renderSingleOutput, substituteVars, systemProcessors, themeInfos, themes, tryExecuteScript, versionGlobalParameter, waitForLayout, welcomeModule, writeOutputToFile, writeStderrToFile };
|
|
2635
|
+
export { API_VERSION, CLi_Name_Art, CapturingTerminalWriter, type CdnSourceName, CliAliasCommandProcessor, CliArgsParser, CliBackgroundServiceRegistry_TOKEN, CliBoot, CliCalCommandProcessor, CliCaptureCommandProcessor, CliClearCommandProcessor, CliClipboard, CliClipboardCommandProcessor, CliColorCommandProcessor, CliCommandExecutionContext, CliCommandExecutor, CliCommandHistory, CliCommandHistory_TOKEN, CliCommandProcessorRegistry, CliConfigureCommandProcessor, CliConvertCommandProcessor, CliDebugCommandProcessor, CliDefaultPingServerService, CliDiffCommandProcessor, CliDragDropService, CliEchoCommandProcessor, CliEngine, type CliEngineOptions, CliEnvCommandProcessor, CliEnvironment, CliEvalCommandProcessor, CliExecutionContext, type CliExecutionContextDeps, CliExecutionProcess, CliExportCommandProcessor, CliFeedbackCommandProcessor, CliFontSizeCommandProcessor, CliFullScreenManager, CliHelpCommandProcessor, CliHistoryCommandProcessor, CliHotKeysCommandProcessor, CliHtopCommandProcessor, CliHttpClient, CliInputReader, CliJsonCommandProcessor, CliKeyValueStore, CliKeyValueStore_TOKEN, CliKillCommandProcessor, CliLogger, CliLoremCommandProcessor, CliModuleRegistry_TOKEN, CliNanoCommandProcessor, CliNotifier, CliOpenCommandProcessor, CliPackageManagerService, CliPackageManagerService_TOKEN, CliPackagesCommandProcessor, CliPingCommandProcessor, CliProcessRegistry, CliProcessRegistry_TOKEN, CliProcessorsRegistry_TOKEN, CliPsCommandProcessor, CliRandomCommandProcessor, CliScreenCommandProcessor, CliSeqCommandProcessor, CliServerCommandProcessor, CliServerConnection, CliServerManager, CliServerManager_TOKEN, CliServerMultiProxyProcessor, CliServerProxyProcessor, CliServiceContainer, CliServicesCommandProcessor, CliSleepCommandProcessor, CliSnippetCommandProcessor, CliSshCommandProcessor, CliStateStore, CliStateStoreManager, CliStateStoreManager_TOKEN, CliTerminalProgressBar, CliTerminalSpinner, CliTerminalTextAnimator, CliTerminalWriter, CliTestHarness, type CliTestResult, CliThemeCommandProcessor, CliTimeCommandProcessor, CliTimerManager, CliTimestampCommandProcessor, CliUnAliasCommandProcessor, CliUnameCommandProcessor, CliUnsetCommandProcessor, CliUptimeCommandProcessor, CliVersionCommandProcessor, type CliWelcomeMessageConfig, CliYesCommandProcessor, CommandParser, type CommandParserOutput, type CommandPart, type ConfigureState, type DefaultServerProvider, type DiffLine, type DiffType, type ICliEnvironment, ICliEnvironment_TOKEN, type ICliExecutionHost, ICliPingServerService_TOKEN, type ICliStateStoreManager, type ICliWasmAccelerator, type InitializeServicesOptions, type InitializeServicesResult, JsFallbackAccelerator, LIBRARY_VERSION, type MultiProxyEntry, OverlayAddon, type ParsedArg, type ParsedToken, ProcessExitedError, ScriptLoaderService, SyntaxHighlighterRegistry_TOKEN, type TerminalSetupResult, type ThemeState, appendOutputToFile, appendStderrToFile, builtinProcessors, computeDiff, contextGlobalParameter, createServerModule, executeOnServer, expandEnvironmentVars, formatDiff, getAccelerator, getCliNameArt, getGreetingBasedOnTime, getTerminalOptions, groupBy, helpGlobalParameter, hotkeysInfo, initWasmAccelerator, initializeServices, initializeTerminal, isWasmAccelerated, miscProcessors, openLink, reconcileArgs, renderServerResponse, renderSingleOutput, substituteVars, systemProcessors, themeInfos, themes, tryExecuteScript, versionGlobalParameter, waitForLayout, welcomeModule, writeOutputToFile, writeStderrToFile };
|