dsh-reference-anything 0.2.0
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/LICENSE +22 -0
- package/NOTICE.md +54 -0
- package/README.md +228 -0
- package/cordis.patch.yml +63 -0
- package/images/logo.png +0 -0
- package/lib/client/index.d.ts +3 -0
- package/lib/client.js +18151 -0
- package/lib/contract.d.ts +300 -0
- package/lib/contract.js +102 -0
- package/lib/errors.d.ts +56 -0
- package/lib/errors.js +21 -0
- package/lib/host.d.ts +102 -0
- package/lib/host.js +55 -0
- package/lib/index.d.ts +83 -0
- package/lib/index.js +153 -0
- package/lib/opencli.d.ts +116 -0
- package/lib/opencli.js +356 -0
- package/lib/reference.d.ts +49 -0
- package/lib/reference.js +228 -0
- package/lib/render.d.ts +101 -0
- package/lib/render.js +250 -0
- package/lib/retain.d.ts +35 -0
- package/lib/retain.js +116 -0
- package/lib/search.d.ts +75 -0
- package/lib/search.js +126 -0
- package/lib/serialize.d.ts +22 -0
- package/lib/serialize.js +24 -0
- package/lib/sources/file.d.ts +100 -0
- package/lib/sources/file.js +236 -0
- package/lib/sources/web-chat/index.d.ts +114 -0
- package/lib/sources/web-chat/index.js +359 -0
- package/lib/store/spec.d.ts +312 -0
- package/lib/store/spec.js +94 -0
- package/lib/store/store.d.ts +189 -0
- package/lib/store/store.js +638 -0
- package/lib/sync/index.d.ts +91 -0
- package/lib/sync/index.js +425 -0
- package/lib/tool.d.ts +62 -0
- package/lib/tool.js +364 -0
- package/lib/typert.d.ts +2 -0
- package/lib/typert.js +34 -0
- package/lib/types.d.ts +215 -0
- package/lib/types.js +12 -0
- package/lib/uri-codec.d.ts +5 -0
- package/lib/uri-codec.js +39 -0
- package/lib/uri.d.ts +59 -0
- package/lib/uri.js +86 -0
- package/lib/web.d.ts +4 -0
- package/lib/web.js +11 -0
- package/lib/window.d.ts +23 -0
- package/lib/window.js +35 -0
- package/lib/wire.d.ts +117 -0
- package/lib/wire.js +49 -0
- package/lib/workspace.d.ts +18 -0
- package/lib/workspace.js +81 -0
- package/opencli-plugin/chatgpt.js +125 -0
- package/opencli-plugin/claude.js +134 -0
- package/opencli-plugin/common.js +307 -0
- package/opencli-plugin/deepseek.js +152 -0
- package/opencli-plugin/gemini.js +165 -0
- package/opencli-plugin/grok.js +123 -0
- package/opencli-plugin/kimi.js +123 -0
- package/opencli-plugin/opencli-plugin.json +6 -0
- package/opencli-plugin/package.json +8 -0
- package/opencli-plugin/since-guard.js +45 -0
- package/package.json +180 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ctx.references` — the registry of sources that can name and read material
|
|
3
|
+
* held outside this session.
|
|
4
|
+
*
|
|
5
|
+
* Unlike a seam that selects one configured backend per capability, this one
|
|
6
|
+
* dispatches per call: every reference carries the id of the source that owns
|
|
7
|
+
* it, so a single session can hold references into a browser chat, an exported
|
|
8
|
+
* file, and another agent's log at the same time.
|
|
9
|
+
*
|
|
10
|
+
* @module dsh-reference-anything
|
|
11
|
+
*/
|
|
12
|
+
import { Context, Service } from '@deepseek-ai/cordis';
|
|
13
|
+
import z from '@deepseek-ai/schemastery';
|
|
14
|
+
import type { ReferenceRef, ReferenceSnapshot, ReferenceSource, ReferenceSummary, ReferenceWindow } from './types.ts';
|
|
15
|
+
export type * from './types.ts';
|
|
16
|
+
export { ReferenceAnythingError, type ReferenceErrorCode } from './errors.ts';
|
|
17
|
+
export { REFERENCE_SCHEME, decodeReferenceUri, encodeReferenceUri, formatReferenceMention, mayContainReference, parseReferenceText, type ParsedReferenceText, } from './uri.ts';
|
|
18
|
+
/** Fan-out cap applied to discovery when a caller names no limit of its own. */
|
|
19
|
+
export declare const DEFAULT_LIST_LIMIT = 20;
|
|
20
|
+
declare module '@deepseek-ai/cordis' {
|
|
21
|
+
interface Context {
|
|
22
|
+
references: ReferenceRuntime;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Deployment settings for reference discovery. */
|
|
26
|
+
export interface Config {
|
|
27
|
+
/**
|
|
28
|
+
* Maximum items discovery returns across all sources combined. Varies by
|
|
29
|
+
* deployment: a browser host may have fifty open conversations where a
|
|
30
|
+
* directory of exports has three.
|
|
31
|
+
*/
|
|
32
|
+
listLimit?: number;
|
|
33
|
+
}
|
|
34
|
+
/** Runtime schema for {@link Config}. */
|
|
35
|
+
export declare const Config: z<Config>;
|
|
36
|
+
/** Registry and dispatcher for {@link ReferenceSource} implementations. */
|
|
37
|
+
export default class ReferenceRuntime extends Service {
|
|
38
|
+
static Config: z<Config>;
|
|
39
|
+
private readonly sources;
|
|
40
|
+
private readonly grants;
|
|
41
|
+
private readonly listLimit;
|
|
42
|
+
/**
|
|
43
|
+
* @param ctx - the mounting context.
|
|
44
|
+
* @param config - validated deployment settings.
|
|
45
|
+
*/
|
|
46
|
+
constructor(ctx: Context, config?: Config);
|
|
47
|
+
/**
|
|
48
|
+
* Add one source to the registry.
|
|
49
|
+
* @param source - the implementation to register; its `id` must be unused.
|
|
50
|
+
* @returns a disposer that removes it again.
|
|
51
|
+
*/
|
|
52
|
+
registerSource(source: ReferenceSource): () => void;
|
|
53
|
+
/** @returns the registered source ids, in registration order. */
|
|
54
|
+
sourceIds(): string[];
|
|
55
|
+
/** Authorize one task to read a Web conversation named by its user or discovery tool. */
|
|
56
|
+
grant(sessionId: string, ref: ReferenceRef): void;
|
|
57
|
+
/** Enforce that a Web conversation URI originated in this task's mention/list surface. */
|
|
58
|
+
assertGranted(sessionId: string | undefined, ref: ReferenceRef): void;
|
|
59
|
+
/** Release task-local grants when a host knows the task is gone. */
|
|
60
|
+
revoke(sessionId: string): void;
|
|
61
|
+
/**
|
|
62
|
+
* Discover referenceable items across every available source.
|
|
63
|
+
*
|
|
64
|
+
* One source failing does not fail discovery — a broken browser attachment
|
|
65
|
+
* should not hide the exported files sitting on disk. Every available source
|
|
66
|
+
* failing does, because that is indistinguishable from a broken deployment
|
|
67
|
+
* and returning an empty list would present it as "you have no conversations".
|
|
68
|
+
* @param query - case-insensitive substring; empty means "the most relevant items".
|
|
69
|
+
* @param limit - maximum items overall; defaults to the configured `listLimit`.
|
|
70
|
+
* @param signal - cancellation from the caller.
|
|
71
|
+
* @returns matching items, capped at `limit`.
|
|
72
|
+
*/
|
|
73
|
+
list(query?: string, limit?: number, signal?: AbortSignal): Promise<ReferenceSummary[]>;
|
|
74
|
+
/**
|
|
75
|
+
* Read one window of turns from a reference.
|
|
76
|
+
* @param ref - the reference to resolve; its `source` selects the owning implementation.
|
|
77
|
+
* @param window - which turns to return.
|
|
78
|
+
* @param signal - cancellation from the caller.
|
|
79
|
+
* @returns the requested turns and their position in the conversation.
|
|
80
|
+
*/
|
|
81
|
+
read(ref: ReferenceRef, window: ReferenceWindow, signal?: AbortSignal): Promise<ReferenceSnapshot>;
|
|
82
|
+
private availableSources;
|
|
83
|
+
}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ctx.references` — the registry of sources that can name and read material
|
|
3
|
+
* held outside this session.
|
|
4
|
+
*
|
|
5
|
+
* Unlike a seam that selects one configured backend per capability, this one
|
|
6
|
+
* dispatches per call: every reference carries the id of the source that owns
|
|
7
|
+
* it, so a single session can hold references into a browser chat, an exported
|
|
8
|
+
* file, and another agent's log at the same time.
|
|
9
|
+
*
|
|
10
|
+
* @module dsh-reference-anything
|
|
11
|
+
*/
|
|
12
|
+
import { Context, Service } from '@deepseek-ai/cordis';
|
|
13
|
+
import z from '@deepseek-ai/schemastery';
|
|
14
|
+
import { ReferenceAnythingError } from "./errors.js";
|
|
15
|
+
export { ReferenceAnythingError } from "./errors.js";
|
|
16
|
+
export { REFERENCE_SCHEME, decodeReferenceUri, encodeReferenceUri, formatReferenceMention, mayContainReference, parseReferenceText, } from "./uri.js";
|
|
17
|
+
/** Fan-out cap applied to discovery when a caller names no limit of its own. */
|
|
18
|
+
export const DEFAULT_LIST_LIMIT = 20;
|
|
19
|
+
/** Runtime schema for {@link Config}. */
|
|
20
|
+
export const Config = z.object({
|
|
21
|
+
listLimit: z.number().step(1).min(1).default(DEFAULT_LIST_LIMIT),
|
|
22
|
+
});
|
|
23
|
+
/** Registry and dispatcher for {@link ReferenceSource} implementations. */
|
|
24
|
+
export default class ReferenceRuntime extends Service {
|
|
25
|
+
static Config = Config;
|
|
26
|
+
sources = new Map();
|
|
27
|
+
grants = new Map();
|
|
28
|
+
listLimit;
|
|
29
|
+
/**
|
|
30
|
+
* @param ctx - the mounting context.
|
|
31
|
+
* @param config - validated deployment settings.
|
|
32
|
+
*/
|
|
33
|
+
constructor(ctx, config = {}) {
|
|
34
|
+
super(ctx, 'references');
|
|
35
|
+
this.listLimit = config.listLimit ?? DEFAULT_LIST_LIMIT;
|
|
36
|
+
ctx.on('session/disposed', session => { this.revoke(String(session.id)); });
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Add one source to the registry.
|
|
40
|
+
* @param source - the implementation to register; its `id` must be unused.
|
|
41
|
+
* @returns a disposer that removes it again.
|
|
42
|
+
*/
|
|
43
|
+
registerSource(source) {
|
|
44
|
+
if (this.sources.has(source.id)) {
|
|
45
|
+
throw new ReferenceAnythingError(`a reference source with id ${JSON.stringify(source.id)} is already registered`, 'SOURCE_DUPLICATE');
|
|
46
|
+
}
|
|
47
|
+
const sources = this.sources;
|
|
48
|
+
const dispose = this.ctx.effect(function* () {
|
|
49
|
+
sources.set(source.id, source);
|
|
50
|
+
yield () => sources.delete(source.id);
|
|
51
|
+
}, 'references.registerSource()');
|
|
52
|
+
// ctx.effect's disposer resolves a promise; this API is synchronous
|
|
53
|
+
// fire-and-forget, so the settled promise is discarded.
|
|
54
|
+
return () => void dispose();
|
|
55
|
+
}
|
|
56
|
+
/** @returns the registered source ids, in registration order. */
|
|
57
|
+
sourceIds() {
|
|
58
|
+
return [...this.sources.keys()];
|
|
59
|
+
}
|
|
60
|
+
/** Authorize one task to read a Web conversation named by its user or discovery tool. */
|
|
61
|
+
grant(sessionId, ref) {
|
|
62
|
+
if (ref.source !== 'web-chat')
|
|
63
|
+
return;
|
|
64
|
+
const values = this.grants.get(sessionId) ?? new Set();
|
|
65
|
+
values.add(ref.id);
|
|
66
|
+
this.grants.set(sessionId, values);
|
|
67
|
+
}
|
|
68
|
+
/** Enforce that a Web conversation URI originated in this task's mention/list surface. */
|
|
69
|
+
assertGranted(sessionId, ref) {
|
|
70
|
+
if (ref.source !== 'web-chat')
|
|
71
|
+
return;
|
|
72
|
+
if (!sessionId || !this.grants.get(sessionId)?.has(ref.id)) {
|
|
73
|
+
throw new ReferenceAnythingError('this task has not been granted access to that conversation reference', 'CONVERSATION_REFERENCE_NOT_GRANTED');
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/** Release task-local grants when a host knows the task is gone. */
|
|
77
|
+
revoke(sessionId) { this.grants.delete(sessionId); }
|
|
78
|
+
/**
|
|
79
|
+
* Discover referenceable items across every available source.
|
|
80
|
+
*
|
|
81
|
+
* One source failing does not fail discovery — a broken browser attachment
|
|
82
|
+
* should not hide the exported files sitting on disk. Every available source
|
|
83
|
+
* failing does, because that is indistinguishable from a broken deployment
|
|
84
|
+
* and returning an empty list would present it as "you have no conversations".
|
|
85
|
+
* @param query - case-insensitive substring; empty means "the most relevant items".
|
|
86
|
+
* @param limit - maximum items overall; defaults to the configured `listLimit`.
|
|
87
|
+
* @param signal - cancellation from the caller.
|
|
88
|
+
* @returns matching items, capped at `limit`.
|
|
89
|
+
*/
|
|
90
|
+
async list(query = '', limit = this.listLimit, signal) {
|
|
91
|
+
throwIfCancelled(signal);
|
|
92
|
+
const available = await this.availableSources(signal);
|
|
93
|
+
if (available.length === 0)
|
|
94
|
+
return [];
|
|
95
|
+
const settled = await Promise.allSettled(available.map(source => source.list(query, limit, signal)));
|
|
96
|
+
throwIfCancelled(signal);
|
|
97
|
+
const failures = settled.filter(result => result.status === 'rejected');
|
|
98
|
+
if (failures.length === available.length) {
|
|
99
|
+
throw new ReferenceAnythingError(`every available reference source failed to list (${available.map(s => s.id).join(', ')})`, 'REFERENCE_READ_FAILED', { cause: failures[0]?.reason });
|
|
100
|
+
}
|
|
101
|
+
return settled
|
|
102
|
+
.flatMap(result => result.status === 'fulfilled' ? result.value : [])
|
|
103
|
+
.slice(0, limit);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Read one window of turns from a reference.
|
|
107
|
+
* @param ref - the reference to resolve; its `source` selects the owning implementation.
|
|
108
|
+
* @param window - which turns to return.
|
|
109
|
+
* @param signal - cancellation from the caller.
|
|
110
|
+
* @returns the requested turns and their position in the conversation.
|
|
111
|
+
*/
|
|
112
|
+
async read(ref, window, signal) {
|
|
113
|
+
throwIfCancelled(signal);
|
|
114
|
+
const source = this.sources.get(ref.source);
|
|
115
|
+
if (source === undefined) {
|
|
116
|
+
throw new ReferenceAnythingError(`no reference source named ${JSON.stringify(ref.source)} is registered`, 'SOURCE_UNKNOWN');
|
|
117
|
+
}
|
|
118
|
+
if (!await source.available()) {
|
|
119
|
+
throw new ReferenceAnythingError(`reference source ${JSON.stringify(ref.source)} is not currently usable`, 'SOURCE_UNAVAILABLE');
|
|
120
|
+
}
|
|
121
|
+
throwIfCancelled(signal);
|
|
122
|
+
try {
|
|
123
|
+
return await source.read(ref, window, signal);
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
if (error instanceof ReferenceAnythingError)
|
|
127
|
+
throw error;
|
|
128
|
+
throwIfCancelled(signal);
|
|
129
|
+
throw new ReferenceAnythingError(`reference source ${JSON.stringify(ref.source)} failed to read ${JSON.stringify(ref.id)}`, 'REFERENCE_READ_FAILED', { cause: error });
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async availableSources(signal) {
|
|
133
|
+
const sources = [...this.sources.values()];
|
|
134
|
+
const checks = await Promise.all(sources.map(async (source) => {
|
|
135
|
+
try {
|
|
136
|
+
return await source.available();
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
// `available()` is documented as a cheap local check. One that throws
|
|
140
|
+
// is broken, not merely unusable, and treating it as unavailable keeps
|
|
141
|
+
// the rest of discovery working.
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
}));
|
|
145
|
+
throwIfCancelled(signal);
|
|
146
|
+
return sources.filter((_source, index) => checks[index] === true);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function throwIfCancelled(signal) {
|
|
150
|
+
if (signal?.aborted !== true)
|
|
151
|
+
return;
|
|
152
|
+
throw new ReferenceAnythingError('reference lookup was cancelled', 'REFERENCE_CANCELLED', { cause: signal.reason });
|
|
153
|
+
}
|
package/lib/opencli.d.ts
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { ChatProvider } from './store/spec.ts';
|
|
2
|
+
import type { ProviderConversationRow, ProviderTurnRow } from './store/store.ts';
|
|
3
|
+
export declare const MIN_OPENCLI_VERSION = "1.8.6";
|
|
4
|
+
export declare const MIN_ADAPTER_VERSION = "0.2.0";
|
|
5
|
+
export declare const OPENCLI_NPM_PACKAGE = "@jackwener/opencli";
|
|
6
|
+
export type OpenCliErrorCode = 'EXTENSION_NOT_CONNECTED' | 'PROVIDER_TIMEOUT' | 'PROVIDER_NOT_LOGGED_IN' | 'PROVIDER_ACCOUNT_MISMATCH' | 'OPENCLI_CONFIGURATION' | 'OPENCLI_OUTPUT_TOO_LARGE' | 'OPENCLI_FAILED' | 'OPENCLI_INSTALL_FAILED';
|
|
7
|
+
export declare class OpenCliError extends Error {
|
|
8
|
+
readonly code: OpenCliErrorCode;
|
|
9
|
+
constructor(message: string, code: OpenCliErrorCode, options?: ErrorOptions);
|
|
10
|
+
}
|
|
11
|
+
export interface OpenCliRunnerOptions {
|
|
12
|
+
executable?: string;
|
|
13
|
+
/** Fixed argv placed before OpenCLI arguments; useful for a Node-hosted wrapper or tests. */
|
|
14
|
+
prefixArgs?: readonly string[];
|
|
15
|
+
profile?: string;
|
|
16
|
+
timeoutMs?: number;
|
|
17
|
+
maxStdoutBytes?: number;
|
|
18
|
+
}
|
|
19
|
+
/** Connection state of the Browser Bridge browser extension, mirroring `opencli daemon status`. */
|
|
20
|
+
export type ExtensionState = 'connected' | 'disconnected' | 'profile-required' | 'profile-disconnected' | 'daemon-offline';
|
|
21
|
+
export interface OpenCliHealth {
|
|
22
|
+
version: string;
|
|
23
|
+
/** Raw `opencli daemon status` output, kept for display and debugging. */
|
|
24
|
+
daemon: string;
|
|
25
|
+
pluginInstalled: boolean;
|
|
26
|
+
daemonRunning: boolean;
|
|
27
|
+
extensionConnected: boolean;
|
|
28
|
+
extensionState: ExtensionState;
|
|
29
|
+
extensionVersion?: string;
|
|
30
|
+
profileCount?: number;
|
|
31
|
+
opencliCompatible: boolean;
|
|
32
|
+
daemonVersion?: string;
|
|
33
|
+
daemonStale: boolean;
|
|
34
|
+
connectivityOk: boolean;
|
|
35
|
+
pluginVersion?: string;
|
|
36
|
+
adapterCommandsReady: boolean;
|
|
37
|
+
adapterCompatible: boolean;
|
|
38
|
+
versionError?: string;
|
|
39
|
+
daemonError?: string;
|
|
40
|
+
pluginError?: string;
|
|
41
|
+
doctorError?: string;
|
|
42
|
+
}
|
|
43
|
+
/** Result returned to the settings page after searching for an executable. */
|
|
44
|
+
export interface OpenCliDiscovery {
|
|
45
|
+
found: boolean;
|
|
46
|
+
executable: string;
|
|
47
|
+
version: string;
|
|
48
|
+
error?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface DaemonStatus {
|
|
51
|
+
daemonRunning: boolean;
|
|
52
|
+
extensionState: ExtensionState;
|
|
53
|
+
extensionConnected: boolean;
|
|
54
|
+
extensionVersion?: string;
|
|
55
|
+
profileCount?: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Parse the human-readable `opencli daemon status` output into structured
|
|
59
|
+
* bridge state. Empty output — including a probe failure — degrades to
|
|
60
|
+
* `daemon-offline` rather than throwing, so one broken probe never hides the
|
|
61
|
+
* rest of the viability panel.
|
|
62
|
+
*/
|
|
63
|
+
export declare function parseDaemonStatus(output: string): DaemonStatus;
|
|
64
|
+
export interface BrowserProfile {
|
|
65
|
+
id: string;
|
|
66
|
+
alias?: string;
|
|
67
|
+
connected: boolean;
|
|
68
|
+
isDefault: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface ProviderIndex {
|
|
71
|
+
accountScope: string;
|
|
72
|
+
sinceApplied: string;
|
|
73
|
+
rows: ProviderConversationRow[];
|
|
74
|
+
}
|
|
75
|
+
export declare class OpenCliRunner {
|
|
76
|
+
readonly executable: string;
|
|
77
|
+
readonly profile: string;
|
|
78
|
+
readonly prefixArgs: readonly string[];
|
|
79
|
+
readonly timeoutMs: number;
|
|
80
|
+
readonly maxStdoutBytes: number;
|
|
81
|
+
constructor(options?: OpenCliRunnerOptions);
|
|
82
|
+
whoami(provider: ChatProvider, signal?: AbortSignal): Promise<string>;
|
|
83
|
+
/**
|
|
84
|
+
* List a provider's conversations.
|
|
85
|
+
* @param provider - which provider to list.
|
|
86
|
+
* @param signal - cancellation from the caller.
|
|
87
|
+
* @param since - ISO instant the adapter may stop paging at. Best-effort:
|
|
88
|
+
* adapters that page in an order they cannot vouch for ignore it, and one
|
|
89
|
+
* installed before the flag existed is retried without it rather than
|
|
90
|
+
* failing the pass.
|
|
91
|
+
* @returns the listed conversations.
|
|
92
|
+
*/
|
|
93
|
+
history(provider: ChatProvider, signal?: AbortSignal, since?: string): Promise<ProviderConversationRow[]>;
|
|
94
|
+
/** Resolve account identity and history through one OpenCLI browser command. */
|
|
95
|
+
syncIndex(provider: ChatProvider, signal?: AbortSignal, since?: string, accountScope?: string): Promise<ProviderIndex>;
|
|
96
|
+
detail(provider: ChatProvider, id: string, signal?: AbortSignal, accountScope?: string): Promise<ProviderTurnRow[]>;
|
|
97
|
+
attachment(provider: ChatProvider, locator: string, output: string, maxBytes: number, signal?: AbortSignal): Promise<Record<string, unknown>>;
|
|
98
|
+
health(signal?: AbortSignal): Promise<OpenCliHealth>;
|
|
99
|
+
/** Lightweight executable validation used by automatic path discovery. */
|
|
100
|
+
version(signal?: AbortSignal): Promise<string>;
|
|
101
|
+
/** Confirm the executable also exposes OpenCLI's plugin command, not merely a semver-looking --version. */
|
|
102
|
+
verifyInstallation(signal?: AbortSignal): Promise<void>;
|
|
103
|
+
profiles(signal?: AbortSignal): Promise<BrowserProfile[]>;
|
|
104
|
+
installPlugin(pluginUrl: string, signal?: AbortSignal): Promise<void>;
|
|
105
|
+
restartDaemon(signal?: AbortSignal): Promise<void>;
|
|
106
|
+
private probe;
|
|
107
|
+
private historyRows;
|
|
108
|
+
private json;
|
|
109
|
+
private raw;
|
|
110
|
+
}
|
|
111
|
+
/** Locate a working OpenCLI without asking a command-line newcomer for PATH details. */
|
|
112
|
+
export declare function discoverOpenCli(configured?: string, signal?: AbortSignal): Promise<OpenCliDiscovery>;
|
|
113
|
+
/** Install or upgrade the supported OpenCLI package through this Node runtime's npm. */
|
|
114
|
+
export declare function installOpenCli(signal?: AbortSignal): Promise<OpenCliDiscovery>;
|
|
115
|
+
/** Numeric semver comparison for the stable x.y.z versions OpenCLI publishes. */
|
|
116
|
+
export declare function versionAtLeast(value: string, minimum: string): boolean;
|