@ai-matrx/desktop-protocol 0.21.30 → 0.21.31

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/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { z } from "zod";
3
3
  import { UUID_SHAPE_PATTERN } from "@ai-matrx/kit/uuid";
4
4
  var PROTOCOL_MAJOR = 1;
5
- var PROTOCOL_MINOR = 39;
5
+ var PROTOCOL_MINOR = 41;
6
6
  var PROTOCOL_VERSION = `${PROTOCOL_MAJOR}.${PROTOCOL_MINOR}`;
7
7
  var ProtocolVersion = z.string().regex(/^[1-9][0-9]{0,2}\.[0-9]{1,3}$/);
8
8
  var RequestId = z.string().min(1).max(64).regex(/^[A-Za-z0-9_-]+$/);
@@ -394,8 +394,17 @@ var OsPermissionName = z5.enum([
394
394
  "location",
395
395
  "local_network",
396
396
  "bluetooth",
397
- "notifications"
397
+ "notifications",
398
+ // (1.41) Matrx Local's remaining kinds, checked on every OS (its permissions checker): a peer
399
+ // older than 1.41 is never sent these rows (versioning.ts PERMISSIONS_SINCE).
400
+ "reminders",
401
+ "speech_recognition",
402
+ "messages",
403
+ "mail",
404
+ "wifi"
398
405
  ]);
406
+ var OsGrantState = z5.enum(["granted", "denied", "not_determined", "not_applicable"]);
407
+ var OsRequirementName = z5.enum(["secret_storage", "tray", "display_server", "helper_programs", "smart_app_control", "path_length"]);
399
408
  var SysinfoGetParams = z5.strictObject({});
400
409
  var SysinfoGetResult = z5.strictObject({
401
410
  device_id: DeviceId,
@@ -425,9 +434,20 @@ var SysinfoGetResult = z5.strictObject({
425
434
  z5.strictObject({
426
435
  name: OsPermissionName,
427
436
  state: z5.enum(["granted", "denied", "not_determined", "not_applicable"]),
428
- settings_url: z5.string().max(512).nullable()
437
+ settings_url: z5.string().max(512).nullable(),
438
+ /** (1.41) One short fact when the state alone does not say it ("No camera", "Bluetooth is off"); absent when there is none. */
439
+ detail: z5.string().max(256).optional()
429
440
  })
430
- )
441
+ ),
442
+ /** (1.41) The requirements beyond the grants (OsRequirementName), each read when asked. */
443
+ requirements: z5.array(
444
+ z5.strictObject({
445
+ name: OsRequirementName,
446
+ state: OsGrantState,
447
+ settings_url: z5.string().max(512).nullable(),
448
+ detail: z5.string().max(256).nullable()
449
+ })
450
+ ).optional()
431
451
  });
432
452
  var SysinfoHardwareParams = z5.strictObject({});
433
453
  var SysinfoHardwareResult = z5.strictObject({
@@ -1866,10 +1886,12 @@ var GitCloneParams = z19.strictObject({
1866
1886
  });
1867
1887
 
1868
1888
  // src/schema/web.ts
1889
+ import { UUID_SHAPE_PATTERN as UUID_SHAPE_PATTERN4 } from "@ai-matrx/kit/uuid";
1869
1890
  import { z as z20 } from "zod";
1870
1891
  var WEB_MAX_TEXT_CHARS = 524288;
1871
1892
  var WebUrl = z20.string().min(1).max(8192).regex(/^https?:\/\//);
1872
1893
  var WebText = z20.string().max(WEB_MAX_TEXT_CHARS);
1894
+ var OrgId = z20.string().regex(UUID_SHAPE_PATTERN4);
1873
1895
  var WebHeader = z20.strictObject({ name: z20.string().min(1).max(256), value: z20.string().max(8192) });
1874
1896
  var WebFetchParams = z20.strictObject({
1875
1897
  url: WebUrl,
@@ -1891,10 +1913,65 @@ var WebFetchResult = z20.strictObject({
1891
1913
  bytes: nonNegInt,
1892
1914
  elapsed_ms: nonNegInt
1893
1915
  });
1916
+ var WebAttachTarget = z20.strictObject({
1917
+ entity_type: z20.string().min(1).max(64),
1918
+ entity_id: z20.string().min(1).max(128),
1919
+ label: z20.string().max(200).optional()
1920
+ });
1921
+ var WebLand = z20.strictObject({
1922
+ /** The organization the page is saved in; absent: this computer's active organization. */
1923
+ organization_id: OrgId.optional(),
1924
+ /** Keep it: AI processing starts (chunks, search). Unkept pages are saved and wait. */
1925
+ keep: z20.boolean().default(false),
1926
+ attach_to: z20.array(WebAttachTarget).max(8).default([])
1927
+ });
1928
+ var WebNotSavedReason = z20.enum([
1929
+ /** Nobody is signed in on this computer. Saved on sign-in. */
1930
+ "signed_out",
1931
+ /** AI Matrx could not be reached. Retried on its own. */
1932
+ "offline",
1933
+ /** AI Matrx refused it (the message says why). Kept until the person retries or discards it. */
1934
+ "rejected",
1935
+ /** Waiting its turn behind other pages (retried on its own). */
1936
+ "queued"
1937
+ ]);
1938
+ var WebSourceNotice = z20.strictObject({ code: z20.string().max(120), message: z20.string().max(2e3), remedy: z20.string().max(120) });
1939
+ var WebSourceState = z20.discriminatedUnion("state", [
1940
+ z20.strictObject({
1941
+ state: z20.literal("saved"),
1942
+ processed_document_id: z20.string().min(1).max(64),
1943
+ source_id: z20.string().min(1).max(128),
1944
+ /** The page was already saved and nothing changed ("Already saved, no change"). */
1945
+ reused_existing: z20.boolean(),
1946
+ /** The page changed: this is a new version of that Source. */
1947
+ new_version_of: z20.string().max(64).nullable(),
1948
+ kept: z20.boolean(),
1949
+ intelligence: z20.enum(["queued", "deferred", "never"]),
1950
+ /** The original page as captured, kept by AI Matrx (null: the organization keeps none). */
1951
+ original_file_id: z20.string().max(128).nullable(),
1952
+ /** The organization it was saved in. */
1953
+ organization_id: OrgId,
1954
+ notices: z20.array(WebSourceNotice).max(20)
1955
+ }),
1956
+ z20.strictObject({
1957
+ state: z20.literal("not_saved"),
1958
+ outbox_id: z20.string().min(1).max(64),
1959
+ reason: WebNotSavedReason,
1960
+ message: z20.string().max(2e3)
1961
+ })
1962
+ ]);
1894
1963
  var WebScrapeParams = z20.strictObject({
1895
1964
  urls: z20.array(WebUrl).min(1).max(20),
1896
1965
  use_cache: z20.boolean().default(true),
1897
- get_links: z20.boolean().default(false)
1966
+ get_links: z20.boolean().default(false),
1967
+ /**
1968
+ * Since 1.38. `auto` (absent): this computer's scraper (HTTP, its browser only when a page needs
1969
+ * it). `browser`: this computer's own browser renders every page. `server`: AI Matrx's servers
1970
+ * read it (their connection, not this computer's; saved there as a web capture).
1971
+ */
1972
+ engine: z20.enum(["auto", "browser", "server"]).optional(),
1973
+ /** Since 1.38: where the pages are saved (see WebLand). */
1974
+ land: WebLand.optional()
1898
1975
  });
1899
1976
  var WebScrapePage = z20.strictObject({
1900
1977
  url: z20.string(),
@@ -1909,7 +1986,9 @@ var WebScrapePage = z20.strictObject({
1909
1986
  /** Why the page failed (blocked, timeout, not found…), in the scraper's words; null when ok. */
1910
1987
  error: z20.string().nullable(),
1911
1988
  /** How the page was fetched (http, browser, cache). */
1912
- via: z20.string().nullable()
1989
+ via: z20.string().nullable(),
1990
+ /** Since 1.38: the page's Source (absent from a 1.37 core, and for a page that failed). */
1991
+ source: WebSourceState.optional()
1913
1992
  });
1914
1993
  var WebScrapeResult = z20.strictObject({ pages: z20.array(WebScrapePage), elapsed_ms: nonNegInt });
1915
1994
  var WebSearchParams = z20.strictObject({
@@ -1933,7 +2012,9 @@ var WebBrowserFetchParams = z20.strictObject({
1933
2012
  wait_for: z20.string().max(1024).optional(),
1934
2013
  wait_timeout_ms: z20.int().min(100).max(12e4).default(3e4),
1935
2014
  /** true: readable text; false: the rendered HTML. */
1936
- extract_text: z20.boolean().default(true)
2015
+ extract_text: z20.boolean().default(true),
2016
+ /** Since 1.38: where the rendered page is saved (see WebLand). */
2017
+ land: WebLand.optional()
1937
2018
  });
1938
2019
  var WebBrowserFetchResult = z20.strictObject({
1939
2020
  url: z20.string(),
@@ -1941,7 +2022,137 @@ var WebBrowserFetchResult = z20.strictObject({
1941
2022
  title: z20.string().nullable(),
1942
2023
  content: WebText,
1943
2024
  truncated: z20.boolean(),
1944
- elapsed_ms: nonNegInt
2025
+ elapsed_ms: nonNegInt,
2026
+ /** Since 1.38: the rendered page's Source (absent from a 1.37 core). */
2027
+ source: WebSourceState.optional()
2028
+ });
2029
+ var ToolsParseFile = z20.strictObject({
2030
+ /** Absolute path of the gzipped JSON the core reads, saves and then removes. */
2031
+ path: z20.string().min(1).max(4096),
2032
+ bytes: nonNegInt
2033
+ });
2034
+ var ToolsWebScrapeParams = z20.strictObject({
2035
+ urls: z20.array(WebUrl).min(1).max(20),
2036
+ use_cache: z20.boolean().default(true),
2037
+ get_links: z20.boolean().default(false),
2038
+ /** `browser`: render every page in this computer's browser, then parse it. */
2039
+ engine: z20.enum(["auto", "browser"]).default("auto"),
2040
+ /** Pages read at once (desktop.web/scrape_concurrency). */
2041
+ concurrency: z20.int().min(1).max(20).default(5),
2042
+ /** The wait between pages from the same site (desktop.web/request_delay_ms). */
2043
+ delay_ms: z20.int().min(0).max(3e4).default(0),
2044
+ /** Where the parse files go (the core's spool folder). */
2045
+ spool_dir: z20.string().min(1).max(4096)
2046
+ });
2047
+ var ToolsWebScrapePage = z20.strictObject({
2048
+ page: WebScrapePage,
2049
+ /** The page's whole parse, for the door; null when the page failed or had no words. */
2050
+ parse: ToolsParseFile.nullable(),
2051
+ /** The page as fetched, for research (rendered HTML or the HTTP body); null when not kept. */
2052
+ html: ToolsParseFile.nullable()
2053
+ });
2054
+ var ToolsWebScrapeResult = z20.strictObject({ pages: z20.array(ToolsWebScrapePage), elapsed_ms: nonNegInt });
2055
+ var ToolsWebBrowserFetchParams = z20.strictObject({
2056
+ url: WebUrl,
2057
+ wait_for: z20.string().max(1024).optional(),
2058
+ wait_timeout_ms: z20.int().min(100).max(12e4).default(3e4),
2059
+ extract_text: z20.boolean().default(true),
2060
+ spool_dir: z20.string().min(1).max(4096)
2061
+ });
2062
+ var ToolsWebBrowserFetchResult = z20.strictObject({ result: WebBrowserFetchResult, parse: ToolsParseFile.nullable() });
2063
+ var WebRuntimeStateName = z20.enum(["not_installed", "installing", "installed", "failed"]);
2064
+ var WebRuntimeParams = z20.strictObject({});
2065
+ var WebRuntimeState = z20.strictObject({
2066
+ state: WebRuntimeStateName,
2067
+ /** Why it failed, in the installer's words; null otherwise. */
2068
+ error: z20.string().max(2e3).nullable(),
2069
+ /** Bytes the browser takes on this computer (its packages and Chromium); null when unknown. */
2070
+ size_bytes: nonNegInt.nullable(),
2071
+ /** Whether it can show a window while it works (false: only the headless shell is installed). */
2072
+ can_show_window: z20.boolean()
2073
+ });
2074
+ var WebOutboxItem = z20.strictObject({
2075
+ outbox_id: z20.string().min(1).max(64),
2076
+ url: z20.string().max(8192),
2077
+ title: z20.string().max(500).nullable(),
2078
+ organization_id: OrgId.nullable(),
2079
+ reason: WebNotSavedReason,
2080
+ message: z20.string().max(2e3),
2081
+ attempts: nonNegInt,
2082
+ created_at_ms: nonNegInt,
2083
+ last_attempt_at_ms: nonNegInt.nullable(),
2084
+ bytes: nonNegInt
2085
+ });
2086
+ var WebOutboxListParams = z20.strictObject({});
2087
+ var WebOutboxListResult = z20.strictObject({
2088
+ items: z20.array(WebOutboxItem),
2089
+ bytes: nonNegInt,
2090
+ /** The most the outbox holds; past it the oldest pages are dropped (and the log says so). */
2091
+ cap_bytes: nonNegInt
2092
+ });
2093
+ var WebOutboxRetryParams = z20.strictObject({ outbox_id: z20.string().min(1).max(64).optional() });
2094
+ var WebOutboxRetryResult = z20.strictObject({ saved: nonNegInt, waiting: nonNegInt });
2095
+ var WebOutboxDiscardParams = z20.strictObject({ outbox_id: z20.string().min(1).max(64) });
2096
+ var WebOutboxDiscardResult = z20.strictObject({ discarded: z20.boolean() });
2097
+ var WebLogVia = z20.enum(["this_computer", "browser", "server"]);
2098
+ var WebLogCaller = z20.enum(["person", "agent", "research", "phone", "other"]);
2099
+ var WebLogResult = z20.enum(["saved", "not_saved", "failed", "blocked", "read"]);
2100
+ var WebLogEntry = z20.strictObject({
2101
+ id: z20.string().min(1).max(64),
2102
+ at_ms: nonNegInt,
2103
+ caller: WebLogCaller,
2104
+ url: z20.string().max(8192),
2105
+ title: z20.string().max(500).nullable(),
2106
+ result: WebLogResult,
2107
+ /** One sentence: why it failed or was blocked, or the save's notice. Never page text. */
2108
+ detail: z20.string().max(1e3).nullable(),
2109
+ via: WebLogVia,
2110
+ duration_ms: nonNegInt,
2111
+ processed_document_id: z20.string().max(64).nullable()
2112
+ });
2113
+ var WebLogListParams = z20.strictObject({ since_ms: nonNegInt.optional(), limit: z20.int().min(1).max(1e3).default(200) });
2114
+ var WebLogListResult = z20.strictObject({ entries: z20.array(WebLogEntry) });
2115
+ var WebLogClearParams = z20.strictObject({});
2116
+ var WebLogClearResult = z20.strictObject({ cleared: nonNegInt });
2117
+ var WebProgressEvent = z20.strictObject({
2118
+ request_id: RequestId,
2119
+ phase: z20.enum(["installing", "fetching", "saving"]),
2120
+ done: nonNegInt,
2121
+ total: nonNegInt
2122
+ });
2123
+ var WebResearchItemState = z20.enum(["waiting", "fetching", "saved", "thin", "failed", "cannot_edit", "blocked"]);
2124
+ var WebResearchItem = z20.strictObject({
2125
+ topic_id: z20.string().min(1).max(64),
2126
+ topic_name: z20.string().max(500),
2127
+ source_id: z20.string().min(1).max(64),
2128
+ url: z20.string().max(8192),
2129
+ title: z20.string().max(500).nullable(),
2130
+ /** The capture level this computer would try (1 quick, 2 scroll); 3+ is the extension's. */
2131
+ level: z20.int().min(1).max(4),
2132
+ last_failure: z20.string().max(1e3).nullable(),
2133
+ state: WebResearchItemState,
2134
+ /** One sentence after a fetch: what happened. */
2135
+ message: z20.string().max(1e3).nullable()
2136
+ });
2137
+ var WebResearchQueueParams = z20.strictObject({ topic_id: z20.string().min(1).max(64).optional() });
2138
+ var WebResearchQueueResult = z20.strictObject({
2139
+ state: z20.enum(["ready", "signed_out", "unavailable"]),
2140
+ problem: z20.string().max(1e3).nullable(),
2141
+ /** L1/L2 items on topics this person can edit: what this computer can fetch. */
2142
+ items: z20.array(WebResearchItem),
2143
+ /** Items on topics the person can view but not add to (shown, never fetched). */
2144
+ view_only: nonNegInt
2145
+ });
2146
+ var WebResearchFetchParams = z20.strictObject({
2147
+ topic_id: z20.string().min(1).max(64).optional(),
2148
+ source_ids: z20.array(z20.string().min(1).max(64)).max(200).optional()
2149
+ });
2150
+ var WebResearchFetchResult = z20.strictObject({
2151
+ items: z20.array(WebResearchItem),
2152
+ saved: nonNegInt,
2153
+ thin: nonNegInt,
2154
+ failed: nonNegInt,
2155
+ cannot_edit: nonNegInt
1945
2156
  });
1946
2157
  var ToolsServiceProgress = z20.strictObject({ phase: z20.enum(["fetching", "installing"]), done: nonNegInt, total: nonNegInt });
1947
2158
 
@@ -1979,7 +2190,27 @@ var SystemSettingsPane = z21.enum([
1979
2190
  "storage",
1980
2191
  "system_report",
1981
2192
  /** (1.35) Privacy & Security › Microphone: where the person allows Matrx 2 the microphone. */
1982
- "microphone"
2193
+ "microphone",
2194
+ // (1.41) Each other privacy grant's own page (Settings › Permissions and privacy's buttons), named
2195
+ // as sysinfo's OsPermissionName so a row opens its pane by its own name. A 1.40 core refuses these
2196
+ // as INVALID_PARAMS, so a client asks only a 1.41 core for them.
2197
+ "full_disk_access",
2198
+ "accessibility",
2199
+ "screen_recording",
2200
+ "camera",
2201
+ "automation",
2202
+ "contacts",
2203
+ "calendars",
2204
+ "reminders",
2205
+ "photos",
2206
+ "location",
2207
+ "local_network",
2208
+ "bluetooth",
2209
+ "wifi",
2210
+ "notifications",
2211
+ "speech_recognition",
2212
+ "messages",
2213
+ "mail"
1983
2214
  ]);
1984
2215
  var SystemOpenSettingsParams = z21.strictObject({ pane: SystemSettingsPane });
1985
2216
  var SystemOpenSettingsResult = z21.strictObject({ pane: SystemSettingsPane });
@@ -2685,10 +2916,10 @@ var ExecJobListResult = z31.strictObject({ jobs: z31.array(ExecJobInfo).max(64)
2685
2916
 
2686
2917
  // src/schema/coding.ts
2687
2918
  import { z as z32 } from "zod";
2688
- import { UUID_SHAPE_PATTERN as UUID_SHAPE_PATTERN4 } from "@ai-matrx/kit/uuid";
2919
+ import { UUID_SHAPE_PATTERN as UUID_SHAPE_PATTERN5 } from "@ai-matrx/kit/uuid";
2689
2920
  var CodingServiceCredentials = z32.strictObject({
2690
2921
  access_token: z32.string().min(16).max(16384),
2691
- user_id: z32.string().regex(UUID_SHAPE_PATTERN4),
2922
+ user_id: z32.string().regex(UUID_SHAPE_PATTERN5),
2692
2923
  /** The AI Matrx server this app talks to (production, or a local server on the nightly copy). */
2693
2924
  server_url: z32.string().min(1).max(2048).regex(/^https?:\/\/[^\s/?#]+(\/[^\s?#]*)?$/)
2694
2925
  });
@@ -4013,6 +4244,16 @@ var OPS = {
4013
4244
  "web.scrape": { params: WebScrapeParams, result: WebScrapeResult, kind: "unary", since: "1.22", errors: ["INVALID_PARAMS", "TIMEOUT", "RESOURCE_BUSY", "AUTH_REQUIRED", "INTERNAL"] },
4014
4245
  "web.search": { params: WebSearchParams, result: WebSearchResult, kind: "unary", since: "1.22", errors: ["INVALID_PARAMS", "TIMEOUT", "RESOURCE_BUSY", "AUTH_REQUIRED", "INTERNAL"] },
4015
4246
  "web.fetch_with_browser": { params: WebBrowserFetchParams, result: WebBrowserFetchResult, kind: "unary", since: "1.22", errors: ["INVALID_PARAMS", "TIMEOUT", "RESOURCE_BUSY", "AUTH_REQUIRED", "INTERNAL"] },
4247
+ "web.runtime.state": { params: WebRuntimeParams, result: WebRuntimeState, kind: "unary", since: "1.40", errors: ["INTERNAL"] },
4248
+ "web.runtime.install": { params: WebRuntimeParams, result: WebRuntimeState, kind: "unary", since: "1.40", errors: ["TIMEOUT", "RESOURCE_BUSY", "CANCELLED", "INTERNAL"] },
4249
+ "web.runtime.remove": { params: WebRuntimeParams, result: WebRuntimeState, kind: "unary", since: "1.40", errors: ["RESOURCE_BUSY", "INTERNAL"] },
4250
+ "web.outbox.list": { params: WebOutboxListParams, result: WebOutboxListResult, kind: "unary", since: "1.40", errors: ["INTERNAL"] },
4251
+ "web.outbox.retry": { params: WebOutboxRetryParams, result: WebOutboxRetryResult, kind: "unary", since: "1.40", errors: ["NOT_FOUND", "AUTH_REQUIRED", "INTERNAL"] },
4252
+ "web.outbox.discard": { params: WebOutboxDiscardParams, result: WebOutboxDiscardResult, kind: "unary", since: "1.40", errors: ["NOT_FOUND", "INTERNAL"] },
4253
+ "web.log.list": { params: WebLogListParams, result: WebLogListResult, kind: "unary", since: "1.40", errors: ["INVALID_PARAMS"] },
4254
+ "web.log.clear": { params: WebLogClearParams, result: WebLogClearResult, kind: "unary", since: "1.40", errors: ["INTERNAL"] },
4255
+ "web.research.queue": { params: WebResearchQueueParams, result: WebResearchQueueResult, kind: "unary", since: "1.40", errors: ["INVALID_PARAMS", "INTERNAL"] },
4256
+ "web.research.fetch": { params: WebResearchFetchParams, result: WebResearchFetchResult, kind: "unary", since: "1.40", errors: ["INVALID_PARAMS", "AUTH_REQUIRED", "RESOURCE_BUSY", "CANCELLED", "INTERNAL"] },
4016
4257
  // 1.23: the signed-in person's own agents and Vault, read as them (the desktop's Agents library and Vault).
4017
4258
  "account.agents.list": { params: AccountAgentsListParams, result: AccountAgentsListResult, kind: "unary", since: "1.23", errors: ["INTERNAL"] },
4018
4259
  "account.vault.list": { params: AccountVaultListParams, result: AccountVaultListResult, kind: "unary", since: "1.23", errors: ["INTERNAL"] },
@@ -4103,7 +4344,9 @@ var EVENTS = {
4103
4344
  "diag.errors.changed": DiagErrorsChangedEvent,
4104
4345
  "browser.invoke": BrowserInvokeEvent,
4105
4346
  "browser.sessions_changed": BrowserSessionsChangedEvent,
4106
- "browser.progress": BrowserProgressEvent
4347
+ "browser.progress": BrowserProgressEvent,
4348
+ "web.log.entry": WebLogEntry,
4349
+ "web.progress": WebProgressEvent
4107
4350
  };
4108
4351
  var SERVICES = {
4109
4352
  ml: {
@@ -4129,9 +4372,12 @@ var SERVICES = {
4129
4372
  progress: ToolsServiceProgress,
4130
4373
  ops: {
4131
4374
  "tools.web_fetch": { params: WebFetchParams, result: WebFetchResult },
4132
- "tools.web_scrape": { params: WebScrapeParams, result: WebScrapeResult },
4375
+ "tools.web_scrape": { params: ToolsWebScrapeParams, result: ToolsWebScrapeResult },
4133
4376
  "tools.web_search": { params: ToolsWebSearchParams, result: WebSearchResult },
4134
- "tools.web_browser_fetch": { params: WebBrowserFetchParams, result: WebBrowserFetchResult }
4377
+ "tools.web_browser_fetch": { params: ToolsWebBrowserFetchParams, result: ToolsWebBrowserFetchResult },
4378
+ "tools.web_runtime_state": { params: WebRuntimeParams, result: WebRuntimeState },
4379
+ "tools.web_runtime_install": { params: WebRuntimeParams, result: WebRuntimeState },
4380
+ "tools.web_runtime_remove": { params: WebRuntimeParams, result: WebRuntimeState }
4135
4381
  }
4136
4382
  }
4137
4383
  };
@@ -4164,7 +4410,9 @@ var NAMED_SCHEMAS = {
4164
4410
  RelayMsg,
4165
4411
  ClientToCoreMsg,
4166
4412
  CoreToClientMsg,
4413
+ OsGrantState,
4167
4414
  OsPermissionName,
4415
+ OsRequirementName,
4168
4416
  SysinfoGetParams,
4169
4417
  SysinfoGetResult,
4170
4418
  SysinfoHardwareParams,
@@ -4653,6 +4901,42 @@ var NAMED_SCHEMAS = {
4653
4901
  ToolsWebSearchParams,
4654
4902
  WebBrowserFetchParams,
4655
4903
  WebBrowserFetchResult,
4904
+ WebAttachTarget,
4905
+ WebLand,
4906
+ WebNotSavedReason,
4907
+ WebSourceNotice,
4908
+ WebSourceState,
4909
+ ToolsParseFile,
4910
+ ToolsWebScrapeParams,
4911
+ ToolsWebScrapePage,
4912
+ ToolsWebScrapeResult,
4913
+ ToolsWebBrowserFetchParams,
4914
+ ToolsWebBrowserFetchResult,
4915
+ WebRuntimeStateName,
4916
+ WebRuntimeParams,
4917
+ WebRuntimeState,
4918
+ WebOutboxItem,
4919
+ WebOutboxListParams,
4920
+ WebOutboxListResult,
4921
+ WebOutboxRetryParams,
4922
+ WebOutboxRetryResult,
4923
+ WebOutboxDiscardParams,
4924
+ WebOutboxDiscardResult,
4925
+ WebLogVia,
4926
+ WebLogCaller,
4927
+ WebLogResult,
4928
+ WebLogEntry,
4929
+ WebLogListParams,
4930
+ WebLogListResult,
4931
+ WebLogClearParams,
4932
+ WebLogClearResult,
4933
+ WebProgressEvent,
4934
+ WebResearchItemState,
4935
+ WebResearchItem,
4936
+ WebResearchQueueParams,
4937
+ WebResearchQueueResult,
4938
+ WebResearchFetchParams,
4939
+ WebResearchFetchResult,
4656
4940
  ToolsServiceProgress,
4657
4941
  AccountRowId,
4658
4942
  AccountReadState,
@@ -4862,7 +5146,13 @@ var FIELDS_SINCE = {
4862
5146
  AppsProjectsToWindowParams: { pin: "1.32", chat_ids: "1.36", take_off_from: "1.36" },
4863
5147
  AppsProjectsToWindowResult: { pin: "1.32" },
4864
5148
  AppsChatsTitlesCheckResult: { stale_windows: "1.33" },
4865
- AccountAgent: { tags: "1.39", model_id: "1.39", access_level: "1.39", organization_id: "1.39", origin: "1.39", is_archived: "1.39", orchestra: "1.39" }
5149
+ AccountAgent: { tags: "1.39", model_id: "1.39", access_level: "1.39", organization_id: "1.39", origin: "1.39", is_archived: "1.39", orchestra: "1.39" },
5150
+ WebScrapeParams: { engine: "1.40", land: "1.40" },
5151
+ WebScrapePage: { source: "1.40" },
5152
+ WebBrowserFetchParams: { land: "1.40" },
5153
+ WebBrowserFetchResult: { source: "1.40" },
5154
+ SysinfoGetResult: { requirements: "1.41" },
5155
+ "SysinfoGetResult.permissions[]": { detail: "1.41" }
4866
5156
  };
4867
5157
  var NULL_SINCE = {
4868
5158
  "RelayDeviceStatusEvent.since_ms": { since: "1.1", olderPeersGet: 0 }
@@ -4882,6 +5172,25 @@ var REASONS_SINCE = {
4882
5172
  awaiting_confirmation: "1.28",
4883
5173
  tool_disabled_on_device: "1.34"
4884
5174
  };
5175
+ var PERMISSIONS_SINCE = {
5176
+ reminders: "1.41",
5177
+ speech_recognition: "1.41",
5178
+ messages: "1.41",
5179
+ mail: "1.41",
5180
+ wifi: "1.41"
5181
+ };
5182
+ function permissionsForPeer(value, version) {
5183
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
5184
+ const body = value;
5185
+ if (!Array.isArray(body.permissions)) return value;
5186
+ const since = PERMISSIONS_SINCE;
5187
+ const kept = body.permissions.filter((p) => {
5188
+ const name = p?.name;
5189
+ const added = typeof name === "string" ? since[name] : void 0;
5190
+ return !added || knows(version, added);
5191
+ });
5192
+ return kept.length === body.permissions.length ? value : { ...body, permissions: kept };
5193
+ }
4885
5194
  function statusForPeer(status, version) {
4886
5195
  const rule = NULL_SINCE["RelayDeviceStatusEvent.since_ms"];
4887
5196
  return status.since_ms === null && !knows(version, rule.since) ? { ...status, since_ms: rule.olderPeersGet } : status;
@@ -4926,7 +5235,9 @@ var RESULT_PATH = /* @__PURE__ */ new Map([
4926
5235
  ["apps.chats.list", "AppsChatsListResult"],
4927
5236
  ["apps.accounts.usage", "AppsAccountsUsageResult"],
4928
5237
  ["apps.accounts.resets", "AppsAccountsResetsResult"],
4929
- ["apps.windows.update_state", "AppsWindowsUpdateStateResult"]
5238
+ ["apps.windows.update_state", "AppsWindowsUpdateStateResult"],
5239
+ ["web.fetch_with_browser", "WebBrowserFetchResult"],
5240
+ ["sysinfo.get", "SysinfoGetResult"]
4930
5241
  ]);
4931
5242
  var NESTED_RESULTS = /* @__PURE__ */ new Map([
4932
5243
  ["apps.chats.list", [["chats", "ChatRow"]]],
@@ -4939,7 +5250,9 @@ var NESTED_RESULTS = /* @__PURE__ */ new Map([
4939
5250
  ["apps.accounts.usage", [["accounts", "AccountUsage"]]],
4940
5251
  ["resources.snapshot", [["disks", "ResourcesDisk"]]],
4941
5252
  ["stack.state", [["servers", "StackServer"]]],
4942
- ["account.agents.list", [["agents", "AccountAgent"]]]
5253
+ ["account.agents.list", [["agents", "AccountAgent"]]],
5254
+ ["web.scrape", [["pages", "WebScrapePage"]]],
5255
+ ["sysinfo.get", [["permissions", "SysinfoGetResult.permissions[]"]]]
4943
5256
  ]);
4944
5257
  function stripNested(value, nested, version) {
4945
5258
  if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
@@ -4981,7 +5294,8 @@ function forPeer(op, part, value, version) {
4981
5294
  const windowKey = op ? WINDOW_RESULTS.get(op) : void 0;
4982
5295
  if (windowKey) return stripWindows(value, windowKey, version);
4983
5296
  const path = op ? RESULT_PATH.get(op) : void 0;
4984
- const top = path ? strip(value, FIELDS_SINCE[path], version) : value;
5297
+ const known = op === "sysinfo.get" ? permissionsForPeer(value, version) : value;
5298
+ const top = path ? strip(known, FIELDS_SINCE[path], version) : known;
4985
5299
  const nested = op ? NESTED_RESULTS.get(op) : void 0;
4986
5300
  return nested ? stripNested(top, nested, version) : top;
4987
5301
  }
@@ -5000,7 +5314,7 @@ function forPeer(op, part, value, version) {
5000
5314
  var VERSIONED_RESULT_OPS = [.../* @__PURE__ */ new Set([...RESULT_PATH.keys(), ...WINDOW_RESULTS.keys(), ...NESTED_RESULTS.keys()])];
5001
5315
 
5002
5316
  // src/contract.ts
5003
- var CONTRACT_SHA256 = "542bc69319741eea52154d413b4fe974ee5a56f7aef351e78b866b0562e82753";
5317
+ var CONTRACT_SHA256 = "a2ea77f45ed3f5421e4c722442205e48fce2bbc5bccc892b54403304eca55443";
5004
5318
 
5005
5319
  // src/close-policy.ts
5006
5320
  var CLOSE_RULES = {
@@ -5902,7 +6216,10 @@ export {
5902
6216
  NotesWriteResult,
5903
6217
  OPS,
5904
6218
  OpDescriptor,
6219
+ OsGrantState,
5905
6220
  OsPermissionName,
6221
+ OsRequirementName,
6222
+ PERMISSIONS_SINCE,
5906
6223
  PING_TEXT,
5907
6224
  PONG_TEXT,
5908
6225
  PROTOCOL_MAJOR,
@@ -6080,7 +6397,13 @@ export {
6080
6397
  ToolPlatform,
6081
6398
  ToolResultsFile,
6082
6399
  ToolTransport,
6400
+ ToolsParseFile,
6083
6401
  ToolsServiceProgress,
6402
+ ToolsWebBrowserFetchParams,
6403
+ ToolsWebBrowserFetchResult,
6404
+ ToolsWebScrapePage,
6405
+ ToolsWebScrapeParams,
6406
+ ToolsWebScrapeResult,
6084
6407
  ToolsWebSearchParams,
6085
6408
  TranscriptSegment,
6086
6409
  TranscriptionModelId,
@@ -6090,11 +6413,39 @@ export {
6090
6413
  VaultItemKind,
6091
6414
  VaultItemSummary,
6092
6415
  WEB_MAX_TEXT_CHARS,
6416
+ WebAttachTarget,
6093
6417
  WebBrowserFetchParams,
6094
6418
  WebBrowserFetchResult,
6095
6419
  WebFetchParams,
6096
6420
  WebFetchResult,
6097
6421
  WebHeader,
6422
+ WebLand,
6423
+ WebLogCaller,
6424
+ WebLogClearParams,
6425
+ WebLogClearResult,
6426
+ WebLogEntry,
6427
+ WebLogListParams,
6428
+ WebLogListResult,
6429
+ WebLogResult,
6430
+ WebLogVia,
6431
+ WebNotSavedReason,
6432
+ WebOutboxDiscardParams,
6433
+ WebOutboxDiscardResult,
6434
+ WebOutboxItem,
6435
+ WebOutboxListParams,
6436
+ WebOutboxListResult,
6437
+ WebOutboxRetryParams,
6438
+ WebOutboxRetryResult,
6439
+ WebProgressEvent,
6440
+ WebResearchFetchParams,
6441
+ WebResearchFetchResult,
6442
+ WebResearchItem,
6443
+ WebResearchItemState,
6444
+ WebResearchQueueParams,
6445
+ WebResearchQueueResult,
6446
+ WebRuntimeParams,
6447
+ WebRuntimeState,
6448
+ WebRuntimeStateName,
6098
6449
  WebScrapePage,
6099
6450
  WebScrapeParams,
6100
6451
  WebScrapeResult,
@@ -6102,6 +6453,8 @@ export {
6102
6453
  WebSearchParams,
6103
6454
  WebSearchQueryResult,
6104
6455
  WebSearchResult,
6456
+ WebSourceNotice,
6457
+ WebSourceState,
6105
6458
  Welcome,
6106
6459
  WindowFocusParams,
6107
6460
  WindowFocusResult,