@mind-harness/mh-browser 0.2.4 → 0.2.6
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/extension/manifest.json +1 -1
- package/lib/client.cjs +772 -51
- package/lib/index.js +944 -316
- package/lib/typert.host.js +88 -4
- package/lib/typert.remote-client.d.ts +4 -0
- package/lib/typert.remote-client.js +45 -1
- package/lib/types/client.d.ts +15 -1
- package/lib/types/config.d.ts +23 -10
- package/lib/types/index.d.ts +23 -2
- package/lib/types/locales.d.ts +22 -0
- package/lib/types/location.d.ts +12 -0
- package/lib/types/location.js +3 -0
- package/lib/types/service/abortable.d.ts +24 -0
- package/lib/types/service/browser.d.ts +11 -5
- package/lib/types/service/control.d.ts +5 -0
- package/lib/types/service/extension.d.ts +7 -6
- package/lib/types/service/locate.d.ts +65 -0
- package/lib/types/service/service.d.ts +34 -3
- package/lib/types/service/test-hooks.d.ts +3 -0
- package/lib/types/service/windows.d.ts +10 -3
- package/lib/types/settings-form.d.ts +142 -0
- package/lib/types/settings.d.ts +121 -0
- package/lib/types/tools/given.d.ts +5 -0
- package/lib/types/typeprobe.d.ts +49 -0
- package/package.json +10 -2
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
3
3
|
import type { BrowserConfig } from '../config.ts';
|
|
4
|
+
import type { BrowserLocation } from '../location.ts';
|
|
4
5
|
import type { HeldPage, PresenceReceipt, PresenceRecord, PresenceSource } from '../presence/record.ts';
|
|
5
6
|
import type { PendingOp } from '../presence/fold.ts';
|
|
6
|
-
import type { Download, FetchResponseBody, InvokeCall, InvokeSent, PageError, PageOp, PageView, TabInfo, WaitFor } from '../types.ts';
|
|
7
|
+
import type { BrowserName, Download, FetchResponseBody, InvokeCall, InvokeSent, PageError, PageOp, PageView, TabInfo, WaitFor } from '../types.ts';
|
|
7
8
|
import { type Taken } from './control.ts';
|
|
8
9
|
import { testHooks, type TestHooks } from './test-hooks.ts';
|
|
9
10
|
declare module '@deepseek-ai/cordis' {
|
|
10
11
|
interface Context {
|
|
11
12
|
mhBrowser: MhBrowserService;
|
|
12
13
|
}
|
|
14
|
+
interface Events {
|
|
15
|
+
/** Volatile config was committed on this plugin fiber. Paths are key arrays. */
|
|
16
|
+
'loader/volatile-update'(paths: readonly (readonly string[])[]): void;
|
|
17
|
+
}
|
|
13
18
|
}
|
|
14
19
|
export type WriteTarget = {
|
|
15
20
|
root: string;
|
|
@@ -30,13 +35,23 @@ export interface HandBack extends Taken {
|
|
|
30
35
|
* also has an Agent View.
|
|
31
36
|
*/
|
|
32
37
|
export declare class MhBrowserService extends TypertRemoteService {
|
|
33
|
-
static Config: import("@deepseek-ai/schemastery").default<BrowserConfig>;
|
|
34
38
|
private readonly windows;
|
|
35
|
-
private readonly
|
|
39
|
+
private readonly headless;
|
|
40
|
+
private readonly profileDir;
|
|
41
|
+
private readonly browserName;
|
|
42
|
+
private readonly executablePath;
|
|
43
|
+
/** Tests replace the machine lookup. Unset uses this machine. */
|
|
44
|
+
private locator;
|
|
36
45
|
private context;
|
|
37
46
|
private readonly pids;
|
|
38
47
|
private ready;
|
|
39
48
|
private closing;
|
|
49
|
+
/** A browser restart was requested and has not run yet. */
|
|
50
|
+
private relaunchWanted;
|
|
51
|
+
/** Counts browser and path changes. A start that sampled the latest one clears the restart. */
|
|
52
|
+
private configEpoch;
|
|
53
|
+
/** The running browser is being closed so the new configuration can start. */
|
|
54
|
+
private replacing;
|
|
40
55
|
/** The browser is not running. The next call that needs a page starts it. */
|
|
41
56
|
private exited;
|
|
42
57
|
private readonly exits;
|
|
@@ -112,6 +127,11 @@ export declare class MhBrowserService extends TypertRemoteService {
|
|
|
112
127
|
/** The person asked for the browser: start it if it exited, past the exit limit. */
|
|
113
128
|
startForPerson(): Promise<void>;
|
|
114
129
|
[testHooks](): TestHooks;
|
|
130
|
+
/**
|
|
131
|
+
* Where `browser` would be launched from when no path is configured.
|
|
132
|
+
* The configured path is not consulted: the answer is what an empty path uses.
|
|
133
|
+
*/
|
|
134
|
+
locateFor(browser: BrowserName, signal?: AbortSignal): Promise<BrowserLocation>;
|
|
115
135
|
act(owner: string, tab: string, op: PageOp, signal?: AbortSignal): Promise<PageView>;
|
|
116
136
|
holdHandover(owner: string, tab: string): void;
|
|
117
137
|
releaseHandover(owner: string): void;
|
|
@@ -152,6 +172,7 @@ export declare class MhBrowserService extends TypertRemoteService {
|
|
|
152
172
|
/**
|
|
153
173
|
* The person took over between turns. The next message they send is the
|
|
154
174
|
* hand-back. A handover that is still waiting on its card is not.
|
|
175
|
+
* The addresses are read before a waiting restart closes the pages.
|
|
155
176
|
*/
|
|
156
177
|
takePersonHandback(owner: string): HandBack | undefined;
|
|
157
178
|
/**
|
|
@@ -243,5 +264,15 @@ export declare class MhBrowserService extends TypertRemoteService {
|
|
|
243
264
|
private presenceUrls;
|
|
244
265
|
private snapshotNamed;
|
|
245
266
|
private exclusive;
|
|
267
|
+
private launchChoice;
|
|
268
|
+
private locateEnv;
|
|
269
|
+
private idle;
|
|
270
|
+
/**
|
|
271
|
+
* Close and start again when a configuration change is waiting and nothing
|
|
272
|
+
* is using the browser. A browser that is not running keeps the new values
|
|
273
|
+
* for the next start. The close is not counted as a crash.
|
|
274
|
+
*/
|
|
275
|
+
private relaunchIfIdle;
|
|
276
|
+
private replaceBrowser;
|
|
246
277
|
}
|
|
247
278
|
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LocateEnv } from './locate.ts';
|
|
1
2
|
/** Key of the hooks tests use to crash the browser and reach a live page. Not exported by the package. */
|
|
2
3
|
export declare const testHooks: unique symbol;
|
|
3
4
|
export interface TestHooks {
|
|
@@ -9,5 +10,7 @@ export interface TestHooks {
|
|
|
9
10
|
pages(): unknown[];
|
|
10
11
|
/** The main browser process id recorded at start. */
|
|
11
12
|
pid(): number | undefined;
|
|
13
|
+
/** Use this lookup instead of the machine's. `undefined` restores the machine. */
|
|
14
|
+
useLocator(env: LocateEnv | undefined): void;
|
|
12
15
|
}
|
|
13
16
|
//# sourceMappingURL=test-hooks.d.ts.map
|
|
@@ -114,7 +114,7 @@ export declare class Windows {
|
|
|
114
114
|
/** The tab touched most recently, for raising the window the person asked to see. */
|
|
115
115
|
latest(owner: OwnerId): LiveTab | undefined;
|
|
116
116
|
/** Make this tab the current one in its window. Does not raise the browser. */
|
|
117
|
-
activate(tab: LiveTab): Promise<void>;
|
|
117
|
+
activate(tab: LiveTab, signal?: AbortSignal): Promise<void>;
|
|
118
118
|
/** Group title for the person. Empty until a title is known. */
|
|
119
119
|
setTitle(owner: OwnerId, title: string): void;
|
|
120
120
|
/** A handover in progress prefixes the group title and recolors it. */
|
|
@@ -126,15 +126,17 @@ export declare class Windows {
|
|
|
126
126
|
* use the extension. Without a window, later pages use `window.open` from
|
|
127
127
|
* an isolated world so they stay in that window.
|
|
128
128
|
*/
|
|
129
|
-
openBlank(owner: OwnerId): Promise<LiveTab>;
|
|
129
|
+
openBlank(owner: OwnerId, signal?: AbortSignal): Promise<LiveTab>;
|
|
130
130
|
private createTab;
|
|
131
131
|
private keep;
|
|
132
|
+
/** The page from a create, or close it when this wait is abandoned. */
|
|
133
|
+
private claimedPage;
|
|
132
134
|
/**
|
|
133
135
|
* Close one tab. `note` is listed in the next `<tabs>` block. A tab the
|
|
134
136
|
* model was never shown (an Agent View discovered on a new tab) omits it.
|
|
135
137
|
*/
|
|
136
138
|
closeTab(tab: LiveTab, note?: string): Promise<void>;
|
|
137
|
-
closeOwner(owner: OwnerId): Promise<void>;
|
|
139
|
+
closeOwner(owner: OwnerId, signal?: AbortSignal): Promise<void>;
|
|
138
140
|
private closePage;
|
|
139
141
|
/** A tab leaves the registry. The window closes with its last tab. */
|
|
140
142
|
private forget;
|
|
@@ -176,5 +178,10 @@ export declare class Windows {
|
|
|
176
178
|
private dropSession;
|
|
177
179
|
private targetIdOf;
|
|
178
180
|
private windowIdOf;
|
|
181
|
+
private pageSession;
|
|
182
|
+
private cdp;
|
|
183
|
+
/** Close a page that may no longer answer. A stall ends at `CLOSE_MS`. */
|
|
184
|
+
private shutdown;
|
|
185
|
+
private shutdownSession;
|
|
179
186
|
}
|
|
180
187
|
//# sourceMappingURL=windows.d.ts.map
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A staged settings form drawn by this plugin. It follows the host's settings
|
|
4
|
+
* form: edits stay local until Save, leaving the page drops them, and a field
|
|
5
|
+
* is overridden while the user layer carries it. Styles use host theme tokens
|
|
6
|
+
* only, so the page matches the host without loading its components.
|
|
7
|
+
*/
|
|
8
|
+
/** What `ctx.configForms.get()` serves for one Host entry. */
|
|
9
|
+
export interface SettingsFormScopeSnapshot<T> {
|
|
10
|
+
status: 'loading' | 'ready' | 'unavailable';
|
|
11
|
+
value: T | undefined;
|
|
12
|
+
/** The layer a cleared field falls back to. */
|
|
13
|
+
base: unknown;
|
|
14
|
+
/** The user layer as stored. A field present here is overridden. */
|
|
15
|
+
user: unknown;
|
|
16
|
+
writable: boolean;
|
|
17
|
+
revision: number | undefined;
|
|
18
|
+
}
|
|
19
|
+
export type SettingsFormPathOp = {
|
|
20
|
+
op: 'set';
|
|
21
|
+
path: readonly string[];
|
|
22
|
+
value: unknown;
|
|
23
|
+
} | {
|
|
24
|
+
op: 'unset';
|
|
25
|
+
path: readonly string[];
|
|
26
|
+
};
|
|
27
|
+
export interface SettingsFormScope<T> {
|
|
28
|
+
getSnapshot(): SettingsFormScopeSnapshot<T>;
|
|
29
|
+
subscribe(listener: () => void): () => void;
|
|
30
|
+
/** One revision-fenced write. Resolves to whether the Host accepted it. */
|
|
31
|
+
mutate(ops: readonly SettingsFormPathOp[], expectedRevision?: number): Promise<boolean>;
|
|
32
|
+
}
|
|
33
|
+
export type FieldWrite = {
|
|
34
|
+
kind: 'set';
|
|
35
|
+
value: unknown;
|
|
36
|
+
} | {
|
|
37
|
+
kind: 'clear';
|
|
38
|
+
};
|
|
39
|
+
export interface FieldSpec {
|
|
40
|
+
field: string;
|
|
41
|
+
/** Stored value as draft text. */
|
|
42
|
+
format: (value: unknown) => string;
|
|
43
|
+
/** The write a draft stages. Undefined blocks the save. */
|
|
44
|
+
parse: (text: string) => FieldWrite | undefined;
|
|
45
|
+
}
|
|
46
|
+
export interface FieldState {
|
|
47
|
+
text: string;
|
|
48
|
+
/** Saving would leave this field in the user layer. */
|
|
49
|
+
overridden: boolean;
|
|
50
|
+
invalid: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface FormShell {
|
|
53
|
+
available: boolean;
|
|
54
|
+
writable: boolean;
|
|
55
|
+
dirty: boolean;
|
|
56
|
+
invalid: boolean;
|
|
57
|
+
saving: boolean;
|
|
58
|
+
/** The last save did not land. Cleared by the next edit or save. */
|
|
59
|
+
failed: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface FormLabels {
|
|
62
|
+
unavailable: string;
|
|
63
|
+
readOnly: string;
|
|
64
|
+
saveFailed: string;
|
|
65
|
+
discard: string;
|
|
66
|
+
save: string;
|
|
67
|
+
saving: string;
|
|
68
|
+
}
|
|
69
|
+
export interface Store<S> {
|
|
70
|
+
getSnapshot(): S;
|
|
71
|
+
subscribe(listener: () => void): () => void;
|
|
72
|
+
}
|
|
73
|
+
/** Drafts over one entry's fields, written together on save. */
|
|
74
|
+
export declare class StagedForm<T> {
|
|
75
|
+
private readonly scope;
|
|
76
|
+
private readonly specs;
|
|
77
|
+
private readonly staged;
|
|
78
|
+
private readonly listeners;
|
|
79
|
+
private baseline;
|
|
80
|
+
private saving;
|
|
81
|
+
private failed;
|
|
82
|
+
private readonly unsubscribe;
|
|
83
|
+
constructor(scope: SettingsFormScope<T>, specs: readonly FieldSpec[]);
|
|
84
|
+
/** A store over `project`, rebuilt whenever the entry or a draft changes. */
|
|
85
|
+
bind<S>(project: () => S): Store<S>;
|
|
86
|
+
shell(): FormShell;
|
|
87
|
+
field(field: string): FieldState;
|
|
88
|
+
edit(field: string, text: string): void;
|
|
89
|
+
/** Stage removing the field from the user layer. The draft shows what it falls back to. */
|
|
90
|
+
reset(field: string): void;
|
|
91
|
+
discard(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Write every staged edit. A save the Host refuses keeps the drafts, and the
|
|
94
|
+
* next save is fenced on what the Host holds now, so trying again can land.
|
|
95
|
+
*/
|
|
96
|
+
save(): Promise<void>;
|
|
97
|
+
dispose(): void;
|
|
98
|
+
private plan;
|
|
99
|
+
private stage;
|
|
100
|
+
private spec;
|
|
101
|
+
private read;
|
|
102
|
+
private stored;
|
|
103
|
+
private publish;
|
|
104
|
+
}
|
|
105
|
+
/** Free text. An empty draft clears the field. */
|
|
106
|
+
export declare function textField(field: string): FieldSpec;
|
|
107
|
+
/** The page frame: read-only notice, the fields, and Save. Unmounting drops every draft. */
|
|
108
|
+
export declare function SettingsFrame(props: {
|
|
109
|
+
labels: FormLabels;
|
|
110
|
+
state: FormShell;
|
|
111
|
+
onSave: () => void;
|
|
112
|
+
onDiscard: () => void;
|
|
113
|
+
children?: ReactNode;
|
|
114
|
+
}): ReactElement;
|
|
115
|
+
export interface FieldProps extends FieldState {
|
|
116
|
+
id: string;
|
|
117
|
+
label: string;
|
|
118
|
+
hint?: string;
|
|
119
|
+
overriddenLabel: string;
|
|
120
|
+
resetLabel: string;
|
|
121
|
+
/** Shown instead of the hint while the draft is invalid. A field that cannot be invalid omits it. */
|
|
122
|
+
invalidLabel?: string;
|
|
123
|
+
disabled: boolean;
|
|
124
|
+
/** Text behind the information button beside the label. */
|
|
125
|
+
help?: {
|
|
126
|
+
label: string;
|
|
127
|
+
content: ReactNode;
|
|
128
|
+
};
|
|
129
|
+
onReset: () => void;
|
|
130
|
+
}
|
|
131
|
+
export declare function TextField(props: FieldProps & {
|
|
132
|
+
placeholder?: string;
|
|
133
|
+
onEdit: (text: string) => void;
|
|
134
|
+
}): ReactElement;
|
|
135
|
+
export declare function ChoiceField(props: FieldProps & {
|
|
136
|
+
options: readonly {
|
|
137
|
+
value: string;
|
|
138
|
+
label: string;
|
|
139
|
+
}[];
|
|
140
|
+
onEdit: (value: string) => void;
|
|
141
|
+
}): ReactElement;
|
|
142
|
+
//# sourceMappingURL=settings-form.d.ts.map
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
import { type Translate } from './locales.ts';
|
|
3
|
+
import { type FieldState, type FieldWrite, type FormShell, type SettingsFormScope } from './settings-form.ts';
|
|
4
|
+
/** Loader row id, and the settings namespace for that row. */
|
|
5
|
+
export declare const ENTRY_ID = "mh-browser";
|
|
6
|
+
/** `plugins.row.config` key: the bundle package, then the row id. */
|
|
7
|
+
export declare const ROW_KEY = "@mind-harness/mh-bundle#mh-browser";
|
|
8
|
+
export declare const BROWSER_CHOICES: readonly ["chrome", "msedge", "chromium"];
|
|
9
|
+
export type BrowserChoice = (typeof BROWSER_CHOICES)[number];
|
|
10
|
+
/** Matches the host's `BrowserLocation`. The client bundle cannot import the host file. */
|
|
11
|
+
export type BrowserLocation = {
|
|
12
|
+
found: string;
|
|
13
|
+
} | {
|
|
14
|
+
missing: {
|
|
15
|
+
path: string;
|
|
16
|
+
reason: string;
|
|
17
|
+
}[];
|
|
18
|
+
};
|
|
19
|
+
export type LocateResult = {
|
|
20
|
+
ok: true;
|
|
21
|
+
value: BrowserLocation;
|
|
22
|
+
} | {
|
|
23
|
+
ok: false;
|
|
24
|
+
error: {
|
|
25
|
+
code: string;
|
|
26
|
+
message: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type LocateFor = (browser: BrowserChoice, signal?: AbortSignal) => Promise<LocateResult>;
|
|
30
|
+
export type LookupView = {
|
|
31
|
+
status: 'loading';
|
|
32
|
+
} | {
|
|
33
|
+
status: 'found';
|
|
34
|
+
path: string;
|
|
35
|
+
} | {
|
|
36
|
+
status: 'missing';
|
|
37
|
+
tried: {
|
|
38
|
+
path: string;
|
|
39
|
+
reason: string;
|
|
40
|
+
}[];
|
|
41
|
+
} | {
|
|
42
|
+
status: 'failed';
|
|
43
|
+
};
|
|
44
|
+
/** The host entry's config. Only these two fields are edited here. */
|
|
45
|
+
export interface BrowserSettingsConfig {
|
|
46
|
+
browser?: string;
|
|
47
|
+
executablePath?: string;
|
|
48
|
+
}
|
|
49
|
+
interface BrowserState extends FormShell {
|
|
50
|
+
browser: FieldState;
|
|
51
|
+
executablePath: FieldState;
|
|
52
|
+
}
|
|
53
|
+
interface ConfigForms {
|
|
54
|
+
get<T>(entryId: string): SettingsFormScope<T>;
|
|
55
|
+
}
|
|
56
|
+
export interface SettingsHost {
|
|
57
|
+
slots: {
|
|
58
|
+
inject(name: string, register: () => unknown): unknown;
|
|
59
|
+
register(options: {
|
|
60
|
+
name: string;
|
|
61
|
+
key: string;
|
|
62
|
+
locale: string;
|
|
63
|
+
}, component: (props: {
|
|
64
|
+
t: Translate;
|
|
65
|
+
view?: 'summary' | 'page';
|
|
66
|
+
}) => ReactElement | null): () => void;
|
|
67
|
+
};
|
|
68
|
+
configForms: ConfigForms;
|
|
69
|
+
remote: {
|
|
70
|
+
mhBrowser: {
|
|
71
|
+
locateFor: LocateFor;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
effect(execute: () => () => void): unknown;
|
|
75
|
+
}
|
|
76
|
+
/** Empty text clears the field. Anything else must be absolute, or start with `~`. */
|
|
77
|
+
export declare function parseExecutable(text: string): FieldWrite | undefined;
|
|
78
|
+
/** Placeholder for an empty path field: the path an empty value would use. */
|
|
79
|
+
export declare function pathPlaceholder(lookup: LookupView, browser: BrowserChoice, t: Translate): string | undefined;
|
|
80
|
+
/** The full path, or every place that was tried. Absent while looking or after a failed lookup. */
|
|
81
|
+
export declare function pathHelpText(lookup: LookupView, t: Translate): string | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* One browser name's lookup, kept until the settings page unmounts.
|
|
84
|
+
* A newer lookup cancels the one still running.
|
|
85
|
+
*/
|
|
86
|
+
export declare class ExecutableLookup {
|
|
87
|
+
private readonly locate;
|
|
88
|
+
private readonly cache;
|
|
89
|
+
private inflight;
|
|
90
|
+
private controller;
|
|
91
|
+
private readonly listeners;
|
|
92
|
+
constructor(locate: LocateFor);
|
|
93
|
+
subscribe: (listener: () => void) => (() => void);
|
|
94
|
+
/** Cached answer for `browser`, or loading when that answer is not in yet. */
|
|
95
|
+
view(browser: BrowserChoice): LookupView;
|
|
96
|
+
watch(browser: BrowserChoice): void;
|
|
97
|
+
dispose(): void;
|
|
98
|
+
private publish;
|
|
99
|
+
}
|
|
100
|
+
/** Staged browser choice and path. A save the host accepts restarts the browser when it is idle. */
|
|
101
|
+
export declare class BrowserForm {
|
|
102
|
+
private readonly form;
|
|
103
|
+
readonly lookup: ExecutableLookup;
|
|
104
|
+
readonly state: {
|
|
105
|
+
getSnapshot(): BrowserState;
|
|
106
|
+
subscribe(listener: () => void): () => void;
|
|
107
|
+
};
|
|
108
|
+
constructor(scope: SettingsFormScope<BrowserSettingsConfig>, locate: LocateFor);
|
|
109
|
+
edit(field: 'browser' | 'executablePath', text: string): void;
|
|
110
|
+
reset(field: 'browser' | 'executablePath'): void;
|
|
111
|
+
save(): void;
|
|
112
|
+
discard(): void;
|
|
113
|
+
dispose(): void;
|
|
114
|
+
}
|
|
115
|
+
export declare function registerSettings(ctx: SettingsHost): void;
|
|
116
|
+
export declare function BrowserSettings(props: {
|
|
117
|
+
t: Translate;
|
|
118
|
+
form: BrowserForm;
|
|
119
|
+
}): ReactElement;
|
|
120
|
+
export {};
|
|
121
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** A string the caller gave. Blank is the same as omitting it; the text itself is kept. */
|
|
2
|
+
export declare function givenString(value: unknown): string | undefined;
|
|
3
|
+
/** Seconds to wait. Zero is the same as omitting it; any other number is kept. */
|
|
4
|
+
export declare function givenTime(value: unknown): number | undefined;
|
|
5
|
+
//# sourceMappingURL=given.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Volatile } from '@deepseek-ai/cordis';
|
|
2
|
+
import z from '@deepseek-ai/schemastery';
|
|
3
|
+
interface Full {
|
|
4
|
+
presence: {
|
|
5
|
+
maxBytes: number;
|
|
6
|
+
};
|
|
7
|
+
browser: Volatile<'chrome' | 'msedge' | 'chromium'>;
|
|
8
|
+
executablePath: Volatile<string | undefined>;
|
|
9
|
+
profileDir?: string;
|
|
10
|
+
headless: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const full: z<Full>;
|
|
13
|
+
declare const oldShape: z<Schemastery.ObjectS<NoInfer<{
|
|
14
|
+
browser: z<"chrome" | "msedge" | "chromium", "chrome" | "msedge" | "chromium", "defined">;
|
|
15
|
+
profileDir: z<string, string, "plain">;
|
|
16
|
+
headless: z<boolean, boolean, "defined">;
|
|
17
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
18
|
+
browser: z<"chrome" | "msedge" | "chromium", "chrome" | "msedge" | "chromium", "defined">;
|
|
19
|
+
profileDir: z<string, string, "plain">;
|
|
20
|
+
headless: z<boolean, boolean, "defined">;
|
|
21
|
+
}>>, "plain">;
|
|
22
|
+
declare const newShape: z<Schemastery.ObjectS<NoInfer<{
|
|
23
|
+
browser: z<"chrome" | "msedge" | "chromium", "chrome" | "msedge" | "chromium", "volatile-defined">;
|
|
24
|
+
executablePath: z<string, string, "volatile">;
|
|
25
|
+
profileDir: z<string, string, "plain">;
|
|
26
|
+
headless: z<boolean, boolean, "defined">;
|
|
27
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
28
|
+
browser: z<"chrome" | "msedge" | "chromium", "chrome" | "msedge" | "chromium", "volatile-defined">;
|
|
29
|
+
executablePath: z<string, string, "volatile">;
|
|
30
|
+
profileDir: z<string, string, "plain">;
|
|
31
|
+
headless: z<boolean, boolean, "defined">;
|
|
32
|
+
}>>, "plain">;
|
|
33
|
+
type Old = ReturnType<typeof oldShape>;
|
|
34
|
+
type New = ReturnType<typeof newShape>;
|
|
35
|
+
export type Probe = {
|
|
36
|
+
oldProfile: Old['profileDir'];
|
|
37
|
+
oldBrowser: Old['browser'];
|
|
38
|
+
newProfile: New['profileDir'];
|
|
39
|
+
newBrowser: New['browser'];
|
|
40
|
+
newPath: New['executablePath'];
|
|
41
|
+
oldKeys: keyof Old;
|
|
42
|
+
newKeys: keyof New;
|
|
43
|
+
};
|
|
44
|
+
export declare const showOldProfile: Old['profileDir'];
|
|
45
|
+
export declare const showNewProfile: New['profileDir'];
|
|
46
|
+
export declare const showNewPath: New['executablePath'];
|
|
47
|
+
export declare const showNewBrowser: New['browser'];
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=typeprobe.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mind-harness/mh-browser",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Opens pages in a real browser for the agent, keeps chosen Agent Views in context, and hands the browser to you when a person is needed.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"files": [
|
|
7
7
|
"lib/index.js",
|
|
8
8
|
"lib/types/representation/agent-view.js",
|
|
9
|
+
"lib/types/location.js",
|
|
9
10
|
"lib/types/**/*.d.ts",
|
|
10
11
|
"lib/typert.host.js",
|
|
11
12
|
"lib/typert.host.d.ts",
|
|
@@ -29,6 +30,10 @@
|
|
|
29
30
|
"types": "./lib/types/representation/agent-view.d.ts",
|
|
30
31
|
"default": "./lib/types/representation/agent-view.js"
|
|
31
32
|
},
|
|
33
|
+
"./location": {
|
|
34
|
+
"types": "./lib/types/location.d.ts",
|
|
35
|
+
"default": "./lib/types/location.js"
|
|
36
|
+
},
|
|
32
37
|
"./typert": {
|
|
33
38
|
"types": "./lib/typert.host.d.ts",
|
|
34
39
|
"default": "./lib/typert.host.js"
|
|
@@ -60,6 +65,7 @@
|
|
|
60
65
|
"@deepseek-ai/dsh-agent-loop-testkit": "^0.2.2-rc.1",
|
|
61
66
|
"@deepseek-ai/dsh-attachment": "^0.2.2-rc.1",
|
|
62
67
|
"@deepseek-ai/dsh-browser-use": "^0.2.2-rc.1",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.1",
|
|
63
69
|
"@deepseek-ai/dsh-home-paths": "^0.2.2-rc.1",
|
|
64
70
|
"@deepseek-ai/dsh-llm": "^0.2.2-rc.1",
|
|
65
71
|
"@deepseek-ai/dsh-llm-mock-server": "^0.2.2-rc.1",
|
|
@@ -77,6 +83,7 @@
|
|
|
77
83
|
},
|
|
78
84
|
"peerDependencies": {
|
|
79
85
|
"@deepseek-ai/cordis": "^4.1.0",
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.2-rc.1 <0.2.3-0",
|
|
80
87
|
"@deepseek-ai/dsh-home-paths": ">=0.2.2-rc.1 <0.2.3-0",
|
|
81
88
|
"@deepseek-ai/dsh-llm": ">=0.2.2-rc.1 <0.2.3-0",
|
|
82
89
|
"@deepseek-ai/dsh-tools": ">=0.2.2-rc.1 <0.2.3-0",
|
|
@@ -94,7 +101,8 @@
|
|
|
94
101
|
"platform": "web",
|
|
95
102
|
"inject": [
|
|
96
103
|
"@deepseek-ai/dsh-client-locale",
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-conversation"
|
|
104
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
105
|
+
"@deepseek-ai/dsh-client-ui-settings"
|
|
98
106
|
]
|
|
99
107
|
}
|
|
100
108
|
},
|