@mind-harness/mh-browser 0.2.6 → 0.2.7

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.
@@ -1,462 +0,0 @@
1
- /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
- import { z } from 'zod'
3
-
4
- import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
5
-
6
- let _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0$schema$value
7
- const _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0$schema = () => (_mind_harness_mh_browser_mhBrowser_locateFor_parameter_0$schema$value ??= z.union([z.literal("chrome"), z.literal("msedge"), z.literal("chromium")]))
8
- let _mind_harness_mh_browser_mhBrowser_locateFor_result$schema$value
9
- const _mind_harness_mh_browser_mhBrowser_locateFor_result$schema = () => (_mind_harness_mh_browser_mhBrowser_locateFor_result$schema$value ??= z.union([z.object({
10
- 'found': z.string(),
11
- }), z.object({
12
- 'missing': z.array(z.object({
13
- 'path': z.string(),
14
- 'reason': z.string(),
15
- })),
16
- })]))
17
- let _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0$schema$value
18
- const _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0$schema = () => (_mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0$schema$value ??= z.string())
19
- let _mind_harness_mh_browser_mhBrowser_revealHandover_result$schema$value
20
- const _mind_harness_mh_browser_mhBrowser_revealHandover_result$schema = () => (_mind_harness_mh_browser_mhBrowser_revealHandover_result$schema$value ??= z.object({
21
- 'status': z.union([z.literal("revealed"), z.literal("not-handing-over"), z.literal("no-tab")]),
22
- }))
23
- let _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0_strict$schema$value
24
- const _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0_strict$schema = () => (_mind_harness_mh_browser_mhBrowser_locateFor_parameter_0_strict$schema$value ??= z.union([z.literal("chrome"), z.literal("msedge"), z.literal("chromium")]))
25
- let _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0_strict$schema$value
26
- const _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0_strict$schema = () => (_mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0_strict$schema$value ??= z.string())
27
-
28
- const $remote = createTypertRemoteInfo({
29
- package: '@mind-harness/mh-browser',
30
- methods: {
31
- 'mhBrowser/locateFor': {
32
- service: 'mhBrowser',
33
- description: 'Where `browser` would be launched from when no path is configured. The configured path is not consulted: the answer is what an empty path uses.',
34
- invocation: { kind: 'direct' },
35
- parameters: [
36
- {
37
- name: 'browser',
38
- source: 'json',
39
- codec: {
40
- mode: 'strict',
41
- typeSymbol: '@mind-harness/mh-browser/location#BrowserName',
42
- create: _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0$schema,
43
- jsonSchema: {"type":"string","enum":["chrome","msedge","chromium"]},
44
- },
45
- strictCodec: {
46
- mode: 'strict',
47
- typeSymbol: '@mind-harness/mh-browser/location#BrowserName',
48
- create: _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0_strict$schema,
49
- jsonSchema: {"type":"string","enum":["chrome","msedge","chromium"]},
50
- },
51
- },
52
- ],
53
- cancellation: { parameter: 'signal' },
54
- result: {
55
- mode: 'strict',
56
- typeSymbol: '@mind-harness/mh-browser/location#BrowserLocation',
57
- create: _mind_harness_mh_browser_mhBrowser_locateFor_result$schema,
58
- jsonSchemaError: 'typert tool schema: selected union branches overlap or have no required discriminator',
59
- },
60
- sourceLocation: {"file":"packages/mh-browser/src/service/service.ts","line":474,"column":9},
61
- },
62
- 'mhBrowser/revealHandover': {
63
- service: 'mhBrowser',
64
- description: 'The person asked to see the page this Session handed over.',
65
- invocation: { kind: 'direct' },
66
- parameters: [
67
- {
68
- name: 'sessionId',
69
- source: 'json',
70
- codec: {
71
- mode: 'strict',
72
- typeSymbol: '@mind-harness/mh-browser#mhBrowser/revealHandover:sessionId',
73
- create: _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0$schema,
74
- jsonSchema: {"type":"string"},
75
- },
76
- strictCodec: {
77
- mode: 'strict',
78
- typeSymbol: '@mind-harness/mh-browser#mhBrowser/revealHandover:sessionId',
79
- create: _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0_strict$schema,
80
- jsonSchema: {"type":"string"},
81
- },
82
- },
83
- ],
84
- cancellation: { parameter: 'signal' },
85
- result: {
86
- mode: 'strict',
87
- typeSymbol: '@mind-harness/mh-browser#mhBrowser/revealHandover:result',
88
- create: _mind_harness_mh_browser_mhBrowser_revealHandover_result$schema,
89
- jsonSchema: {"type":"object","properties":{"status":{"type":"string","enum":["revealed","not-handing-over","no-tab"]}},"required":["status"],"additionalProperties":true},
90
- },
91
- sourceLocation: {"file":"packages/mh-browser/src/service/service.ts","line":734,"column":9},
92
- },
93
- },
94
- }, z)
95
-
96
- export const TYPERT = {
97
- package: '@mind-harness/mh-browser',
98
- face: 'host',
99
- schemas: [
100
- ],
101
- get invocations() { return $remote.descriptors },
102
- model: {
103
- "services": [
104
- {
105
- "description": "Browser service. Launch, windows, tabs, waits, the request channel, and the current representation of each tab. Declared actions and downloads go through the request channel. Person input outside a service dispatch takes the session's browser. `act` returns a snapshot, including on a page that also has an Agent View.",
106
- "summary": "Browser service.",
107
- "tags": [],
108
- "jsDoc": "/**\n * Browser service. Launch, windows, tabs, waits, the request channel, and\n * the current representation of each tab. Declared actions and downloads go\n * through the request channel. Person input outside a service dispatch takes\n * the session's browser. `act` returns a snapshot, including on a page that\n * also has an Agent View.\n */",
109
- "key": "mhBrowser",
110
- "exportName": "MhBrowserService",
111
- "members": [
112
- {
113
- "kind": "method",
114
- "name": "declareAgentViewOrigin",
115
- "signature": "declareAgentViewOrigin(origin: string): void",
116
- "summary": "Remember an origin whose pages offer Agent Views.",
117
- "jsDoc": "/** Remember an origin whose pages offer Agent Views. A missing page does not remove it. */"
118
- },
119
- {
120
- "kind": "method",
121
- "name": "open",
122
- "signature": "async open( owner: string, items: { url: string; waitFor?: WaitFor; snapshot?: boolean }[], signal?: AbortSignal, options?: { reveal?: boolean }, ): Promise<(PageView | PageError)[]>"
123
- },
124
- {
125
- "kind": "method",
126
- "name": "view",
127
- "signature": "async view(owner: string, tab: string, signal?: AbortSignal): Promise<PageView | PageError>"
128
- },
129
- {
130
- "kind": "method",
131
- "name": "rememberPresence",
132
- "signature": "rememberPresence(owner: string, urls: string[]): void",
133
- "summary": "Pages whose current representation is already in the model's presence.",
134
- "jsDoc": "/** Pages whose current representation is already in the model's presence. */"
135
- },
136
- {
137
- "kind": "method",
138
- "name": "presenceList",
139
- "signature": "presenceList(owner: string): HeldPage[]"
140
- },
141
- {
142
- "kind": "method",
143
- "name": "presencePut",
144
- "signature": "presencePut(owner: string, urls: string[], source: PresenceSource): PresenceReceipt[]"
145
- },
146
- {
147
- "kind": "method",
148
- "name": "presenceRemove",
149
- "signature": "presenceRemove(owner: string, urls: string[]): PresenceReceipt[]"
150
- },
151
- {
152
- "kind": "method",
153
- "name": "presenceLoad",
154
- "signature": "presenceLoad( owner: string, folded: { pages: readonly HeldPage[]; removals: readonly PendingOp[] }, ): void",
155
- "summary": "The set the session log folds to; taken once per process.",
156
- "jsDoc": "/** The set the session log folds to; taken once per process. */"
157
- },
158
- {
159
- "kind": "method",
160
- "name": "presenceTakeResume",
161
- "signature": "presenceTakeResume(owner: string): boolean"
162
- },
163
- {
164
- "kind": "method",
165
- "name": "presenceCheck",
166
- "signature": "async presenceCheck( owner: string, which: readonly string[] | 'all', opts?: { baseline?: boolean; replaces?: boolean; force?: boolean; signal?: AbortSignal }, ): Promise<{ text: string; record: PresenceRecord } | undefined>",
167
- "summary": "Re-read presence pages and build the next reminder.",
168
- "jsDoc": "/**\n * Re-read presence pages and build the next reminder.\n * A tab already on the address is read in place. A check that has to open\n * one closes it before returning. Removals are included, and they cause\n * every remaining page to be read so a page kept out by the byte budget\n * can come back. An empty set has nothing to read and does not wait for the\n * browser; a browser that is down makes every page absent.\n */"
169
- },
170
- {
171
- "kind": "method",
172
- "name": "noteWorkspace",
173
- "signature": "noteWorkspace(owner: string, target: WriteTarget): void",
174
- "summary": "Where a download the page starts may be written: the session's writable root, or why it may not write at all.",
175
- "jsDoc": "/**\n * Where a download the page starts may be written: the session's writable\n * root, or why it may not write at all.\n */"
176
- },
177
- {
178
- "kind": "method",
179
- "name": "tabs",
180
- "signature": "tabs(owner: string): TabInfo[]"
181
- },
182
- {
183
- "kind": "method",
184
- "name": "takeClosed",
185
- "signature": "takeClosed(owner: string): string[]"
186
- },
187
- {
188
- "kind": "method",
189
- "name": "windowId",
190
- "signature": "windowId(owner: string, tab: string): Promise<number | undefined>"
191
- },
192
- {
193
- "kind": "method",
194
- "name": "fetch",
195
- "signature": "async fetch( url: string, opts?: { accept?: string; ifNoneMatch?: string; signal?: AbortSignal }, ): Promise<FetchResponseBody | { kind: 'error'; reason: string }>"
196
- },
197
- {
198
- "kind": "method",
199
- "name": "pushPath",
200
- "signature": "async pushPath(owner: string, tab: string, path: string): Promise<void>"
201
- },
202
- {
203
- "kind": "method",
204
- "name": "started",
205
- "signature": "async started(): Promise<void>"
206
- },
207
- {
208
- "kind": "method",
209
- "name": "startForPerson",
210
- "signature": "startForPerson(): Promise<void>",
211
- "summary": "The person asked for the browser: start it if it exited, past the exit limit.",
212
- "jsDoc": "/** The person asked for the browser: start it if it exited, past the exit limit. */"
213
- },
214
- {
215
- "kind": "method",
216
- "name": "[testHooks]",
217
- "signature": "[testHooks](): TestHooks"
218
- },
219
- {
220
- "kind": "method",
221
- "name": "locateFor",
222
- "signature": "@Remote async locateFor(browser: BrowserName, signal?: AbortSignal): Promise<BrowserLocation>",
223
- "summary": "Where `browser` would be launched from when no path is configured.",
224
- "jsDoc": "/**\n * Where `browser` would be launched from when no path is configured.\n * The configured path is not consulted: the answer is what an empty path uses.\n */"
225
- },
226
- {
227
- "kind": "method",
228
- "name": "act",
229
- "signature": "async act(owner: string, tab: string, op: PageOp, signal?: AbortSignal): Promise<PageView>"
230
- },
231
- {
232
- "kind": "method",
233
- "name": "holdHandover",
234
- "signature": "holdHandover(owner: string, tab: string): void"
235
- },
236
- {
237
- "kind": "method",
238
- "name": "releaseHandover",
239
- "signature": "releaseHandover(owner: string): void"
240
- },
241
- {
242
- "kind": "method",
243
- "name": "capture",
244
- "signature": "capture(owner: string, tab: string, signal?: AbortSignal): Promise<Uint8Array | undefined>",
245
- "summary": "`undefined` when no screenshot can be taken now: a dialog is open, or the page refused.",
246
- "jsDoc": "/** `undefined` when no screenshot can be taken now: a dialog is open, or the page refused. */"
247
- },
248
- {
249
- "kind": "method",
250
- "name": "invoke",
251
- "signature": "invoke( owner: string, _page: string, call: InvokeCall, opts?: { signal?: AbortSignal; readFile?: (value: unknown) => Promise<string> }, ): Promise<InvokeSent>"
252
- },
253
- {
254
- "kind": "method",
255
- "name": "download",
256
- "signature": "async download( _owner: string, url: string, root: string, signal?: AbortSignal, ): Promise<Download>",
257
- "summary": "Not queued: it opens no tab, and a long body must not hold up the Session's other calls.",
258
- "jsDoc": "/**\n * Not queued: it opens no tab, and a long body must not hold up the\n * Session's other calls. `root` is the directory the session may write.\n */"
259
- },
260
- {
261
- "kind": "method",
262
- "name": "controlOf",
263
- "signature": "controlOf(owner: string): 'model' | 'person'"
264
- },
265
- {
266
- "kind": "method",
267
- "name": "bindPersonTouch",
268
- "signature": "bindPersonTouch(fn: (owner: string, urls: string[]) => void): () => void",
269
- "summary": "Presence registers this.",
270
- "jsDoc": "/** Presence registers this. A hand-back calls it with the touched presence pages. */"
271
- },
272
- {
273
- "kind": "method",
274
- "name": "handover",
275
- "signature": "handover( owner: string, req: { tab?: string; reason: string }, signal?: AbortSignal, ): Promise<void>",
276
- "summary": "Give the browser to the person.",
277
- "jsDoc": "/**\n * Give the browser to the person. The named tab stays in use until hand-back.\n * This does not wait; the tool waits on the question card.\n */"
278
- },
279
- {
280
- "kind": "method",
281
- "name": "noteSessionTitle",
282
- "signature": "noteSessionTitle(owner: string, title: string): void",
283
- "summary": "Remember the Session title for its tab group.",
284
- "jsDoc": "/** Remember the Session title for its tab group. Empty when the host has none. */"
285
- },
286
- {
287
- "kind": "method",
288
- "name": "bringToFront",
289
- "signature": "async bringToFront(owner: string): Promise<boolean>",
290
- "summary": "Raise the window of this owner's latest tab.",
291
- "jsDoc": "/** Raise the window of this owner's latest tab. False when it has no tab. */"
292
- },
293
- {
294
- "kind": "method",
295
- "name": "revealHandover",
296
- "signature": "@Remote async revealHandover( sessionId: string, signal?: AbortSignal, ): Promise<{ status: 'revealed' | 'not-handing-over' | 'no-tab' }>",
297
- "summary": "The person asked to see the page this Session handed over.",
298
- "jsDoc": "/** The person asked to see the page this Session handed over. */"
299
- },
300
- {
301
- "kind": "method",
302
- "name": "handBack",
303
- "signature": "async handBack(owner: string, note?: string): Promise<HandBack>",
304
- "summary": "The person answered.",
305
- "jsDoc": "/** The person answered. Returns the note, the operation count, and the named tab. */"
306
- },
307
- {
308
- "kind": "method",
309
- "name": "releaseIfHeld",
310
- "signature": "releaseIfHeld(owner: string): void",
311
- "summary": "A stopped handover gives control back.",
312
- "jsDoc": "/** A stopped handover gives control back. A finished hand-back is left alone. */"
313
- },
314
- {
315
- "kind": "method",
316
- "name": "takePersonHandback",
317
- "signature": "takePersonHandback(owner: string): HandBack | undefined",
318
- "summary": "The person took over between turns.",
319
- "jsDoc": "/**\n * The person took over between turns. The next message they send is the\n * hand-back. A handover that is still waiting on its card is not.\n * The addresses are read before a waiting restart closes the pages.\n */"
320
- }
321
- ],
322
- "types": [
323
- {
324
- "name": "ActionResponse",
325
- "declaration": "export interface ActionResponse {\n name: string;\n status?: number;\n location?: string;\n mediaType?: string;\n body?: string;\n bytes?: number;\n lost?: boolean;\n}"
326
- },
327
- {
328
- "name": "BrowserLocation",
329
- "declaration": "export type BrowserLocation = { found: string; } | { missing: BrowserLocationMiss[]; };"
330
- },
331
- {
332
- "name": "BrowserLocationMiss",
333
- "declaration": "export interface BrowserLocationMiss {\n path: string;\n reason: string;\n}"
334
- },
335
- {
336
- "name": "BrowserName",
337
- "declaration": "export type BrowserName = 'chrome' | 'msedge' | 'chromium';"
338
- },
339
- {
340
- "name": "Dialog",
341
- "declaration": "export interface Dialog {\n type: string;\n message: string;\n}"
342
- },
343
- {
344
- "name": "Download",
345
- "declaration": "export type Download = { kind: 'saved'; path: string; url: string; mediaType?: string; bytes: number; sha256: string; observed: string; } | { kind: 'error'; url: string; status?: number; reason: string; };"
346
- },
347
- {
348
- "name": "FetchResponseBody",
349
- "declaration": "export interface FetchResponseBody {\n kind: 'response';\n finalUrl: string;\n status: number;\n mediaType?: string;\n etag?: string;\n link?: string;\n body: Uint8Array;\n}"
350
- },
351
- {
352
- "name": "HandBack",
353
- "declaration": "export interface HandBack extends Taken {\n urls: string[];\n note?: string;\n page?: PageView;\n}"
354
- },
355
- {
356
- "name": "HeldPage",
357
- "declaration": "export interface HeldPage {\n url: string;\n source: PresenceSource;\n state: 'committed' | 'pending';\n order: number;\n seen?: { version?: string; digest: string; observedAt: string; id?: string; } | { absent: string; };\n title?: string;\n representation?: 'agent-view' | 'snapshot';\n body?: string;\n agentViewError?: string;\n fragment?: string;\n requires?: string[];\n viewUrl?: string;\n}"
358
- },
359
- {
360
- "name": "InstalledBrowser",
361
- "declaration": "export type InstalledBrowser = Exclude<BrowserName, 'chromium'>;"
362
- },
363
- {
364
- "name": "InvokeCall",
365
- "declaration": "export interface InvokeCall {\n name: string;\n item?: string;\n input?: Record<string, unknown>;\n shown: { url: string; text: string; };\n}"
366
- },
367
- {
368
- "name": "InvokeSent",
369
- "declaration": "export interface InvokeSent {\n schemaRejected: boolean;\n response?: ActionResponse;\n page: PageView | PageError;\n}"
370
- },
371
- {
372
- "name": "LocateEnv",
373
- "declaration": "export interface LocateEnv {\n platform: NodeJS.Platform;\n env: NodeJS.ProcessEnv;\n home: string;\n access(path: string): PathAccess;\n discover(browser: InstalledBrowser, signal?: AbortSignal): Promise<string[]>;\n}"
374
- },
375
- {
376
- "name": "Modifier",
377
- "declaration": "export type Modifier = 'Alt' | 'Control' | 'ControlOrMeta' | 'Meta' | 'Shift';"
378
- },
379
- {
380
- "name": "PageError",
381
- "declaration": "export interface PageError {\n tab?: TabId;\n url: string;\n reason: string;\n}"
382
- },
383
- {
384
- "name": "PageOp",
385
- "declaration": "export type PageOp = (Target & { kind: 'click'; doubleClick?: boolean; button?: 'left' | 'right' | 'middle'; modifiers?: Modifier[]; }) | (Target & { kind: 'hover'; }) | (Target & { kind: 'select_option'; values: string[]; }) | { kind: 'drag'; startTarget: string; startElement?: string; endTarget: string; endElement?: string; } | (Target & { kind: 'type'; text: string; submit?: boolean; slowly?: boolean; }) | { kind: 'fill_form'; fields: (Target & { name: string; type: 'textbox' | 'checkbox' | 'radio' | 'combobox' | 'slider'; value: string; })[]; } | { kind: 'press_key'; key: string; } | { kind: 'file_upload'; paths?: string[]; } | { kind: 'handle_dialog'; accept: boolean; promptText?: string; } | { kind: 'navigate_back'; } | { kind: 'wait_for'; text?: string; textGone?: string; time?: number; } | { kind: 'snapshot'; target?: string; depth?: number; boxes?: boolean; } | { kind: 'find'; text?: string; regex?: string; maxResults?: number; } | { kind: 'take_screenshot'; element?: string; target?: string; type?: 'png' | 'jpeg' | 'webp'; fullPage?: boolean; scale?: 'css' | 'device'; } | { kind: 'evaluate'; element?: string; target?: string; function: string; callId: string; };"
386
- },
387
- {
388
- "name": "PageView",
389
- "declaration": "export interface PageView {\n tab?: TabId;\n url: string;\n title: string;\n observedAt: string;\n representation: { kind: 'agent-view'; text: string; version?: string; href?: string; } | { kind: 'snapshot'; text: string; agentViewError?: string; agentView?: { version?: string; }; };\n fragment?: string;\n status?: number;\n mediaType?: string;\n body?: string;\n inPresence: boolean;\n headerOnly?: boolean;\n dialog?: Dialog;\n incomplete?: { load: boolean; pendingRequests: number; };\n waited?: { met: 'text' | 'textGone' | 'time' | false; seconds: number; };\n download?: Download;\n summary?: string;\n detail?: string;\n writes?: { method: string; origin: string; fromCall: boolean; count: number; }[];\n shot?: { mediaType: 'image/png' | 'image/jpeg' | 'image/webp'; bytes: Uint8Array; };\n}"
390
- },
391
- {
392
- "name": "PathAccess",
393
- "declaration": "export type PathAccess = 'ok' | { code: string; };"
394
- },
395
- {
396
- "name": "PendingOp",
397
- "declaration": "export interface PendingOp {\n op: 'put' | 'remove';\n url: string;\n}"
398
- },
399
- {
400
- "name": "PresenceEntryRecord",
401
- "declaration": "export interface PresenceEntryRecord {\n op: PresenceOp;\n url: string;\n source: PresenceSource;\n version?: string;\n observedAt: string;\n digest: string;\n id?: string;\n reason?: string;\n}"
402
- },
403
- {
404
- "name": "PresenceOp",
405
- "declaration": "export type PresenceOp = 'present' | 'added' | 'changed' | 'absent' | 'removed';"
406
- },
407
- {
408
- "name": "PresenceReceipt",
409
- "declaration": "export interface PresenceReceipt {\n url: string;\n receipt: 'added (pending)' | 'already in presence' | 'removed (pending)' | 'not in presence';\n}"
410
- },
411
- {
412
- "name": "PresenceRecord",
413
- "declaration": "export interface PresenceRecord {\n kind: 'baseline' | 'delta';\n replaces?: true;\n entries: PresenceEntryRecord[];\n}"
414
- },
415
- {
416
- "name": "PresenceSource",
417
- "declaration": "export type PresenceSource = (typeof PRESENCE_SOURCES)[number];"
418
- },
419
- {
420
- "name": "TabId",
421
- "declaration": "export type TabId = string;"
422
- },
423
- {
424
- "name": "TabInfo",
425
- "declaration": "export interface TabInfo {\n tab: TabId;\n url: string;\n title: string;\n occupied: boolean;\n inPresence: boolean;\n mayHaveChanged: boolean;\n}"
426
- },
427
- {
428
- "name": "Taken",
429
- "declaration": "export interface Taken {\n operations: number;\n tabs: string[];\n from: string;\n to: string;\n tab?: string;\n}"
430
- },
431
- {
432
- "name": "Target",
433
- "declaration": "export interface Target {\n target: string;\n element?: string;\n}"
434
- },
435
- {
436
- "name": "TestHooks",
437
- "declaration": "export interface TestHooks {\n crash(): Promise<void>;\n page(owner: string, tab: string): unknown;\n running(): boolean;\n pages(): unknown[];\n pid(): number | undefined;\n useLocator(env: LocateEnv | undefined): void;\n}"
438
- },
439
- {
440
- "name": "WaitFor",
441
- "declaration": "export interface WaitFor {\n text?: string;\n textGone?: string;\n time?: number;\n}"
442
- },
443
- {
444
- "name": "WriteTarget",
445
- "declaration": "export type WriteTarget = { root: string; } | { denied: string; code: 'SANDBOX_DENIED' | 'NO_WORKSPACE'; };"
446
- }
447
- ]
448
- }
449
- ],
450
- "events": [
451
- {
452
- "description": "Volatile config was committed on this plugin fiber. Paths are key arrays.",
453
- "summary": "Volatile config was committed on this plugin fiber.",
454
- "tags": [],
455
- "jsDoc": "/** Volatile config was committed on this plugin fiber. Paths are key arrays. */",
456
- "name": "loader/volatile-update",
457
- "signature": "'loader/volatile-update'(paths: readonly (readonly string[])[]): void"
458
- }
459
- ],
460
- "objects": []
461
- },
462
- }
@@ -1,28 +0,0 @@
1
- /* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
2
- import type {
3
- RemoteResult,
4
- TypertRemoteInfo,
5
- TypertRemoteMethod,
6
- } from '@deepseek-ai/dsh-typert-protocol'
7
- import type { BrowserLocation, BrowserName } from '@mind-harness/mh-browser/location'
8
-
9
- declare module '@deepseek-ai/dsh-typert-protocol' {
10
- interface TypertRemoteNamespace$6d6842726f77736572 {
11
- locateFor: (browser: BrowserName, signal?: AbortSignal) => Promise<RemoteResult<BrowserLocation>>
12
- revealHandover: (sessionId: string, signal?: AbortSignal) => Promise<RemoteResult<{ status: 'revealed' | 'not-handing-over' | 'no-tab'; }>>
13
- }
14
- interface TypertRemoteMap {
15
- 'mhBrowser/locateFor': (browser: BrowserName, signal?: AbortSignal) => Promise<RemoteResult<BrowserLocation>>
16
- 'mhBrowser/revealHandover': (sessionId: string, signal?: AbortSignal) => Promise<RemoteResult<{ status: 'revealed' | 'not-handing-over' | 'no-tab'; }>>
17
- }
18
- interface TypertRemoteNamespaceMap {
19
- 'mhBrowser': TypertRemoteNamespace$6d6842726f77736572
20
- }
21
- }
22
-
23
- export declare const TYPERT_REMOTE: TypertRemoteInfo<{
24
- readonly 'mhBrowser/locateFor': TypertRemoteMethod<{ readonly 'browser': BrowserName }, BrowserLocation>
25
- readonly 'mhBrowser/revealHandover': TypertRemoteMethod<{ readonly 'sessionId': string }, { status: 'revealed' | 'not-handing-over' | 'no-tab'; }>
26
- }>
27
- export default TYPERT_REMOTE
28
- //# sourceMappingURL=typert.remote-client.d.ts.map
@@ -1,96 +0,0 @@
1
- /* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
2
- import { z } from 'zod'
3
-
4
- import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
5
-
6
- let _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0$schema$value
7
- const _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0$schema = () => (_mind_harness_mh_browser_mhBrowser_locateFor_parameter_0$schema$value ??= z.union([z.literal("chrome"), z.literal("msedge"), z.literal("chromium")]))
8
- let _mind_harness_mh_browser_mhBrowser_locateFor_result$schema$value
9
- const _mind_harness_mh_browser_mhBrowser_locateFor_result$schema = () => (_mind_harness_mh_browser_mhBrowser_locateFor_result$schema$value ??= z.union([z.object({
10
- 'found': z.string(),
11
- }), z.object({
12
- 'missing': z.array(z.object({
13
- 'path': z.string(),
14
- 'reason': z.string(),
15
- })),
16
- })]))
17
- let _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0$schema$value
18
- const _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0$schema = () => (_mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0$schema$value ??= z.string())
19
- let _mind_harness_mh_browser_mhBrowser_revealHandover_result$schema$value
20
- const _mind_harness_mh_browser_mhBrowser_revealHandover_result$schema = () => (_mind_harness_mh_browser_mhBrowser_revealHandover_result$schema$value ??= z.object({
21
- 'status': z.union([z.literal("revealed"), z.literal("not-handing-over"), z.literal("no-tab")]),
22
- }))
23
- let _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0_strict$schema$value
24
- const _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0_strict$schema = () => (_mind_harness_mh_browser_mhBrowser_locateFor_parameter_0_strict$schema$value ??= z.union([z.literal("chrome"), z.literal("msedge"), z.literal("chromium")]))
25
- let _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0_strict$schema$value
26
- const _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0_strict$schema = () => (_mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0_strict$schema$value ??= z.string())
27
-
28
- export const TYPERT_REMOTE = createTypertRemoteInfo({
29
- package: '@mind-harness/mh-browser',
30
- methods: {
31
- 'mhBrowser/locateFor': {
32
- service: 'mhBrowser',
33
- description: 'Where `browser` would be launched from when no path is configured. The configured path is not consulted: the answer is what an empty path uses.',
34
- invocation: { kind: 'direct' },
35
- parameters: [
36
- {
37
- name: 'browser',
38
- source: 'json',
39
- codec: {
40
- mode: 'strict',
41
- typeSymbol: '@mind-harness/mh-browser/location#BrowserName',
42
- create: _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0$schema,
43
- jsonSchema: {"type":"string","enum":["chrome","msedge","chromium"]},
44
- },
45
- strictCodec: {
46
- mode: 'strict',
47
- typeSymbol: '@mind-harness/mh-browser/location#BrowserName',
48
- create: _mind_harness_mh_browser_mhBrowser_locateFor_parameter_0_strict$schema,
49
- jsonSchema: {"type":"string","enum":["chrome","msedge","chromium"]},
50
- },
51
- },
52
- ],
53
- cancellation: { parameter: 'signal' },
54
- result: {
55
- mode: 'strict',
56
- typeSymbol: '@mind-harness/mh-browser/location#BrowserLocation',
57
- create: _mind_harness_mh_browser_mhBrowser_locateFor_result$schema,
58
- jsonSchemaError: 'typert tool schema: selected union branches overlap or have no required discriminator',
59
- },
60
- sourceLocation: {"file":"packages/mh-browser/src/service/service.ts","line":474,"column":9},
61
- },
62
- 'mhBrowser/revealHandover': {
63
- service: 'mhBrowser',
64
- description: 'The person asked to see the page this Session handed over.',
65
- invocation: { kind: 'direct' },
66
- parameters: [
67
- {
68
- name: 'sessionId',
69
- source: 'json',
70
- codec: {
71
- mode: 'strict',
72
- typeSymbol: '@mind-harness/mh-browser#mhBrowser/revealHandover:sessionId',
73
- create: _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0$schema,
74
- jsonSchema: {"type":"string"},
75
- },
76
- strictCodec: {
77
- mode: 'strict',
78
- typeSymbol: '@mind-harness/mh-browser#mhBrowser/revealHandover:sessionId',
79
- create: _mind_harness_mh_browser_mhBrowser_revealHandover_parameter_0_strict$schema,
80
- jsonSchema: {"type":"string"},
81
- },
82
- },
83
- ],
84
- cancellation: { parameter: 'signal' },
85
- result: {
86
- mode: 'strict',
87
- typeSymbol: '@mind-harness/mh-browser#mhBrowser/revealHandover:result',
88
- create: _mind_harness_mh_browser_mhBrowser_revealHandover_result$schema,
89
- jsonSchema: {"type":"object","properties":{"status":{"type":"string","enum":["revealed","not-handing-over","no-tab"]}},"required":["status"],"additionalProperties":true},
90
- },
91
- sourceLocation: {"file":"packages/mh-browser/src/service/service.ts","line":734,"column":9},
92
- },
93
- },
94
- }, z)
95
-
96
- export default TYPERT_REMOTE