@onkernel/sdk 0.110.0 → 0.112.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.
Files changed (153) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/auth/connections.d.mts +26 -8
  12. package/resources/auth/connections.d.mts.map +1 -1
  13. package/resources/auth/connections.d.ts +26 -8
  14. package/resources/auth/connections.d.ts.map +1 -1
  15. package/resources/browser-pools.d.mts +8 -1
  16. package/resources/browser-pools.d.mts.map +1 -1
  17. package/resources/browser-pools.d.ts +8 -1
  18. package/resources/browser-pools.d.ts.map +1 -1
  19. package/resources/browsers/browsers.d.mts +44 -3
  20. package/resources/browsers/browsers.d.mts.map +1 -1
  21. package/resources/browsers/browsers.d.ts +44 -3
  22. package/resources/browsers/browsers.d.ts.map +1 -1
  23. package/resources/browsers/browsers.js +2 -2
  24. package/resources/browsers/browsers.js.map +1 -1
  25. package/resources/browsers/browsers.mjs +2 -2
  26. package/resources/browsers/browsers.mjs.map +1 -1
  27. package/resources/browsers/index.d.mts +1 -1
  28. package/resources/browsers/index.d.mts.map +1 -1
  29. package/resources/browsers/index.d.ts +1 -1
  30. package/resources/browsers/index.d.ts.map +1 -1
  31. package/resources/browsers/index.js +2 -2
  32. package/resources/browsers/index.js.map +1 -1
  33. package/resources/browsers/index.mjs +1 -1
  34. package/resources/browsers/index.mjs.map +1 -1
  35. package/resources/browsers/telemetry.d.mts +34 -16
  36. package/resources/browsers/telemetry.d.mts.map +1 -1
  37. package/resources/browsers/telemetry.d.ts +34 -16
  38. package/resources/browsers/telemetry.d.ts.map +1 -1
  39. package/resources/browsers/telemetry.js +3 -2
  40. package/resources/browsers/telemetry.js.map +1 -1
  41. package/resources/browsers/telemetry.mjs +3 -2
  42. package/resources/browsers/telemetry.mjs.map +1 -1
  43. package/resources/browsers/webmcp/custom-tools.d.mts +118 -0
  44. package/resources/browsers/webmcp/custom-tools.d.mts.map +1 -0
  45. package/resources/browsers/webmcp/custom-tools.d.ts +118 -0
  46. package/resources/browsers/webmcp/custom-tools.d.ts.map +1 -0
  47. package/resources/browsers/webmcp/custom-tools.js +75 -0
  48. package/resources/browsers/webmcp/custom-tools.js.map +1 -0
  49. package/resources/browsers/webmcp/custom-tools.mjs +71 -0
  50. package/resources/browsers/webmcp/custom-tools.mjs.map +1 -0
  51. package/resources/browsers/webmcp/index.d.mts +3 -0
  52. package/resources/browsers/webmcp/index.d.mts.map +1 -0
  53. package/resources/browsers/webmcp/index.d.ts +3 -0
  54. package/resources/browsers/webmcp/index.d.ts.map +1 -0
  55. package/resources/browsers/webmcp/index.js +9 -0
  56. package/resources/browsers/webmcp/index.js.map +1 -0
  57. package/resources/browsers/webmcp/index.mjs +4 -0
  58. package/resources/browsers/webmcp/index.mjs.map +1 -0
  59. package/resources/browsers/webmcp/webmcp.d.mts +211 -0
  60. package/resources/browsers/webmcp/webmcp.d.mts.map +1 -0
  61. package/resources/browsers/webmcp/webmcp.d.ts +211 -0
  62. package/resources/browsers/webmcp/webmcp.d.ts.map +1 -0
  63. package/resources/browsers/webmcp/webmcp.js +66 -0
  64. package/resources/browsers/webmcp/webmcp.js.map +1 -0
  65. package/resources/browsers/webmcp/webmcp.mjs +61 -0
  66. package/resources/browsers/webmcp/webmcp.mjs.map +1 -0
  67. package/resources/browsers/webmcp.d.mts +1 -157
  68. package/resources/browsers/webmcp.d.mts.map +1 -1
  69. package/resources/browsers/webmcp.d.ts +1 -157
  70. package/resources/browsers/webmcp.d.ts.map +1 -1
  71. package/resources/browsers/webmcp.js +2 -51
  72. package/resources/browsers/webmcp.js.map +1 -1
  73. package/resources/browsers/webmcp.mjs +1 -49
  74. package/resources/browsers/webmcp.mjs.map +1 -1
  75. package/resources/index.d.mts +1 -0
  76. package/resources/index.d.mts.map +1 -1
  77. package/resources/index.d.ts +1 -0
  78. package/resources/index.d.ts.map +1 -1
  79. package/resources/index.js +3 -1
  80. package/resources/index.js.map +1 -1
  81. package/resources/index.mjs +1 -0
  82. package/resources/index.mjs.map +1 -1
  83. package/resources/organization/entitlements.d.mts +15 -0
  84. package/resources/organization/entitlements.d.mts.map +1 -1
  85. package/resources/organization/entitlements.d.ts +15 -0
  86. package/resources/organization/entitlements.d.ts.map +1 -1
  87. package/resources/search/contents.d.mts +267 -0
  88. package/resources/search/contents.d.mts.map +1 -0
  89. package/resources/search/contents.d.ts +267 -0
  90. package/resources/search/contents.d.ts.map +1 -0
  91. package/resources/search/contents.js +31 -0
  92. package/resources/search/contents.js.map +1 -0
  93. package/resources/search/contents.mjs +27 -0
  94. package/resources/search/contents.mjs.map +1 -0
  95. package/resources/search/index.d.mts +4 -0
  96. package/resources/search/index.d.mts.map +1 -0
  97. package/resources/search/index.d.ts +4 -0
  98. package/resources/search/index.d.ts.map +1 -0
  99. package/resources/search/index.js +11 -0
  100. package/resources/search/index.js.map +1 -0
  101. package/resources/search/index.mjs +5 -0
  102. package/resources/search/index.mjs.map +1 -0
  103. package/resources/search/providers.d.mts +141 -0
  104. package/resources/search/providers.d.mts.map +1 -0
  105. package/resources/search/providers.d.ts +141 -0
  106. package/resources/search/providers.d.ts.map +1 -0
  107. package/resources/search/providers.js +25 -0
  108. package/resources/search/providers.js.map +1 -0
  109. package/resources/search/providers.mjs +21 -0
  110. package/resources/search/providers.mjs.map +1 -0
  111. package/resources/search/search.d.mts +1187 -0
  112. package/resources/search/search.d.mts.map +1 -0
  113. package/resources/search/search.d.ts +1187 -0
  114. package/resources/search/search.d.ts.map +1 -0
  115. package/resources/search/search.js +58 -0
  116. package/resources/search/search.js.map +1 -0
  117. package/resources/search/search.mjs +53 -0
  118. package/resources/search/search.mjs.map +1 -0
  119. package/resources/search.d.mts +2 -0
  120. package/resources/search.d.mts.map +1 -0
  121. package/resources/search.d.ts +2 -0
  122. package/resources/search.d.ts.map +1 -0
  123. package/resources/search.js +6 -0
  124. package/resources/search.js.map +1 -0
  125. package/resources/search.mjs +3 -0
  126. package/resources/search.mjs.map +1 -0
  127. package/resources/vaults/items.d.mts +21 -14
  128. package/resources/vaults/items.d.mts.map +1 -1
  129. package/resources/vaults/items.d.ts +21 -14
  130. package/resources/vaults/items.d.ts.map +1 -1
  131. package/src/client.ts +30 -0
  132. package/src/resources/auth/connections.ts +28 -7
  133. package/src/resources/browser-pools.ts +9 -1
  134. package/src/resources/browsers/browsers.ts +65 -13
  135. package/src/resources/browsers/index.ts +4 -1
  136. package/src/resources/browsers/telemetry.ts +68 -16
  137. package/src/resources/browsers/webmcp/custom-tools.ts +160 -0
  138. package/src/resources/browsers/webmcp/index.ts +26 -0
  139. package/src/resources/browsers/webmcp/webmcp.ts +295 -0
  140. package/src/resources/browsers/webmcp.ts +1 -204
  141. package/src/resources/index.ts +12 -0
  142. package/src/resources/organization/entitlements.ts +17 -0
  143. package/src/resources/search/contents.ts +327 -0
  144. package/src/resources/search/index.ts +16 -0
  145. package/src/resources/search/providers.ts +197 -0
  146. package/src/resources/search/search.ts +1496 -0
  147. package/src/resources/search.ts +3 -0
  148. package/src/resources/vaults/items.ts +27 -14
  149. package/src/version.ts +1 -1
  150. package/version.d.mts +1 -1
  151. package/version.d.ts +1 -1
  152. package/version.js +1 -1
  153. package/version.mjs +1 -1
@@ -0,0 +1,211 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import * as CustomToolsAPI from "./custom-tools.js";
3
+ import { AddRequest, CustomToolAddParams, CustomToolRemoveParams, CustomTools, CustomToolsResponse, Definition, Match } from "./custom-tools.js";
4
+ import { APIPromise } from "../../../core/api-promise.js";
5
+ import { RequestOptions } from "../../../internal/request-options.js";
6
+ /**
7
+ * Discover and invoke native page tools across the browser instance.
8
+ */
9
+ export declare class Webmcp extends APIResource {
10
+ customTools: CustomToolsAPI.CustomTools;
11
+ /**
12
+ * Invokes the exact live registration identified by tool_ref. Non-autosubmit
13
+ * declarative form tools return after their fields are populated with an
14
+ * awaiting_submission status. Other tools wait for a terminal result, including
15
+ * across navigation. Inspect a populated form, obtain any required confirmation,
16
+ * then submit through Playwright or computer interaction without invoking the tool
17
+ * again. If the tab or embedded frame disappears, or the request times out after
18
+ * invocation begins, the response reports outcome_unknown and the tool is not
19
+ * retried. CDP-backed custom tool outputs above 240 KiB return an error rather
20
+ * than a truncated result.
21
+ *
22
+ * @example
23
+ * ```ts
24
+ * const invocationResult =
25
+ * await client.browsers.webmcp.invokeTool(
26
+ * 'htzv5orfit78e1m2biiifpbv',
27
+ * {
28
+ * input: { foo: 'bar' },
29
+ * tool_ref: 'x',
30
+ * },
31
+ * );
32
+ * ```
33
+ */
34
+ invokeTool(idOrName: string, body: WebmcpInvokeToolParams, options?: RequestOptions): APIPromise<InvocationResult>;
35
+ /**
36
+ * Returns a snapshot of native and custom WebMCP tools available across every open
37
+ * tab and embedded frame in the browser. Each tool includes an opaque tool_ref for
38
+ * invoking that exact live registration, nested tool metadata, and source
39
+ * information. Custom tools include their generated ID, namespace, and CDP
40
+ * target_id in source. Tools disappear when their document closes or navigates
41
+ * away. Use exclude_custom to return only page-provided tools.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const toolsResponse =
46
+ * await client.browsers.webmcp.listTools(
47
+ * 'htzv5orfit78e1m2biiifpbv',
48
+ * );
49
+ * ```
50
+ */
51
+ listTools(idOrName: string, query?: WebmcpListToolsParams | null | undefined, options?: RequestOptions): APIPromise<ToolsResponse>;
52
+ }
53
+ export interface CustomToolSource {
54
+ id: string;
55
+ namespace: string;
56
+ }
57
+ export interface InvocationFailure {
58
+ code: 'outcome_unknown';
59
+ message: string;
60
+ invocation_id?: string;
61
+ }
62
+ export interface InvocationResult {
63
+ invocation_id: string;
64
+ /**
65
+ * awaiting_submission means a non-autosubmit declarative form was populated but
66
+ * not submitted. Inspect the form, obtain any required confirmation, then submit
67
+ * through Playwright or computer interaction without invoking the tool again. The
68
+ * other statuses are terminal results.
69
+ */
70
+ status: 'completed' | 'canceled' | 'error' | 'awaiting_submission';
71
+ error_text?: string;
72
+ /**
73
+ * Untrusted page-provided output. Callers must treat it as potentially malicious
74
+ * input.
75
+ */
76
+ output?: unknown;
77
+ }
78
+ export interface InvokeRequest {
79
+ /**
80
+ * Tool input, limited to 1 MiB after JSON serialization.
81
+ */
82
+ input: {
83
+ [key: string]: unknown;
84
+ };
85
+ tool_ref: string;
86
+ timeout_sec?: number;
87
+ }
88
+ export interface Tool {
89
+ source: ToolSource;
90
+ /**
91
+ * Tool metadata follows the
92
+ * [MCP Tool definition](https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool)
93
+ * and the
94
+ * [WebMCP RegisteredTool definition](https://webmachinelearning.github.io/webmcp/#dictdef-registeredtool).
95
+ * outputSchema is optional for page and custom tools.
96
+ */
97
+ tool: ToolMetadata;
98
+ /**
99
+ * Opaque reference for invoking this exact live registration. It becomes invalid
100
+ * when its document or browser process is replaced.
101
+ */
102
+ tool_ref: string;
103
+ }
104
+ /**
105
+ * Tool-provided behavioral hints from the
106
+ * [MCP tool specification](https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool)
107
+ * and the
108
+ * [WebMCP ToolAnnotations definition](https://webmachinelearning.github.io/webmcp/#dictdef-toolannotations).
109
+ * These hints are untrusted and are not enforced by Kernel.
110
+ */
111
+ export interface ToolAnnotations {
112
+ autosubmit?: boolean;
113
+ consequentialHint?: boolean;
114
+ destructiveHint?: boolean;
115
+ idempotentHint?: boolean;
116
+ openWorldHint?: boolean;
117
+ readOnlyHint?: boolean;
118
+ untrustedContentHint?: boolean;
119
+ }
120
+ export interface ToolFrame {
121
+ /**
122
+ * Monotonically increasing identifier for this embedded frame during the current
123
+ * browser process.
124
+ */
125
+ frame_id: number;
126
+ /**
127
+ * Current frame URL with the fragment omitted.
128
+ */
129
+ url: string;
130
+ }
131
+ /**
132
+ * Tool metadata follows the
133
+ * [MCP Tool definition](https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool)
134
+ * and the
135
+ * [WebMCP RegisteredTool definition](https://webmachinelearning.github.io/webmcp/#dictdef-registeredtool).
136
+ * outputSchema is optional for page and custom tools.
137
+ */
138
+ export interface ToolMetadata {
139
+ description: string;
140
+ inputSchema: {
141
+ [key: string]: unknown;
142
+ };
143
+ name: string;
144
+ /**
145
+ * Tool-provided behavioral hints from the
146
+ * [MCP tool specification](https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool)
147
+ * and the
148
+ * [WebMCP ToolAnnotations definition](https://webmachinelearning.github.io/webmcp/#dictdef-toolannotations).
149
+ * These hints are untrusted and are not enforced by Kernel.
150
+ */
151
+ annotations?: ToolAnnotations;
152
+ outputSchema?: {
153
+ [key: string]: unknown;
154
+ };
155
+ title?: string;
156
+ }
157
+ export interface ToolSource {
158
+ /**
159
+ * Embedded frame that registered the tool, or null when the top-level page
160
+ * registered it.
161
+ */
162
+ frame: ToolFrame | null;
163
+ /**
164
+ * Current title of the top-level page.
165
+ */
166
+ page_title: string;
167
+ /**
168
+ * Current URL of the top-level page with the fragment omitted.
169
+ */
170
+ page_url: string;
171
+ /**
172
+ * Monotonically increasing identifier for the tab during the current browser
173
+ * process.
174
+ */
175
+ tab_id: number;
176
+ /**
177
+ * Monotonically increasing identifier for the browser window during the current
178
+ * browser process.
179
+ */
180
+ window_id: number;
181
+ custom?: CustomToolSource;
182
+ /**
183
+ * CDP target ID for a custom tool's registration tab; omitted for page-provided
184
+ * tools.
185
+ */
186
+ target_id?: string;
187
+ }
188
+ export interface ToolsResponse {
189
+ tools: Array<Tool>;
190
+ }
191
+ export interface WebmcpInvokeToolParams {
192
+ /**
193
+ * Tool input, limited to 1 MiB after JSON serialization.
194
+ */
195
+ input: {
196
+ [key: string]: unknown;
197
+ };
198
+ tool_ref: string;
199
+ timeout_sec?: number;
200
+ }
201
+ export interface WebmcpListToolsParams {
202
+ /**
203
+ * Exclude custom tools when true.
204
+ */
205
+ exclude_custom?: boolean;
206
+ }
207
+ export declare namespace Webmcp {
208
+ export { type CustomToolSource as CustomToolSource, type InvocationFailure as InvocationFailure, type InvocationResult as InvocationResult, type InvokeRequest as InvokeRequest, type Tool as Tool, type ToolAnnotations as ToolAnnotations, type ToolFrame as ToolFrame, type ToolMetadata as ToolMetadata, type ToolSource as ToolSource, type ToolsResponse as ToolsResponse, type WebmcpInvokeToolParams as WebmcpInvokeToolParams, type WebmcpListToolsParams as WebmcpListToolsParams, };
209
+ export { CustomTools as CustomTools, type AddRequest as AddRequest, type CustomToolsResponse as CustomToolsResponse, type Definition as Definition, type Match as Match, type CustomToolAddParams as CustomToolAddParams, type CustomToolRemoveParams as CustomToolRemoveParams, };
210
+ }
211
+ //# sourceMappingURL=webmcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webmcp.d.ts","sourceRoot":"","sources":["../../../src/resources/browsers/webmcp/webmcp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,cAAc,0BAAuB;AACjD,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,KAAK,EACN,0BAAuB;AACxB,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IAEvF;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;IAI/B;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CACP,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,qBAAqB,GAAG,I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AAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Webmcp = void 0;
5
+ const tslib_1 = require("../../../internal/tslib.js");
6
+ const resource_1 = require("../../../core/resource.js");
7
+ const CustomToolsAPI = tslib_1.__importStar(require("./custom-tools.js"));
8
+ const custom_tools_1 = require("./custom-tools.js");
9
+ const path_1 = require("../../../internal/utils/path.js");
10
+ /**
11
+ * Discover and invoke native page tools across the browser instance.
12
+ */
13
+ class Webmcp extends resource_1.APIResource {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.customTools = new CustomToolsAPI.CustomTools(this._client);
17
+ }
18
+ /**
19
+ * Invokes the exact live registration identified by tool_ref. Non-autosubmit
20
+ * declarative form tools return after their fields are populated with an
21
+ * awaiting_submission status. Other tools wait for a terminal result, including
22
+ * across navigation. Inspect a populated form, obtain any required confirmation,
23
+ * then submit through Playwright or computer interaction without invoking the tool
24
+ * again. If the tab or embedded frame disappears, or the request times out after
25
+ * invocation begins, the response reports outcome_unknown and the tool is not
26
+ * retried. CDP-backed custom tool outputs above 240 KiB return an error rather
27
+ * than a truncated result.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const invocationResult =
32
+ * await client.browsers.webmcp.invokeTool(
33
+ * 'htzv5orfit78e1m2biiifpbv',
34
+ * {
35
+ * input: { foo: 'bar' },
36
+ * tool_ref: 'x',
37
+ * },
38
+ * );
39
+ * ```
40
+ */
41
+ invokeTool(idOrName, body, options) {
42
+ return this._client.post((0, path_1.path) `/browsers/${idOrName}/webmcp/invoke`, { body, ...options });
43
+ }
44
+ /**
45
+ * Returns a snapshot of native and custom WebMCP tools available across every open
46
+ * tab and embedded frame in the browser. Each tool includes an opaque tool_ref for
47
+ * invoking that exact live registration, nested tool metadata, and source
48
+ * information. Custom tools include their generated ID, namespace, and CDP
49
+ * target_id in source. Tools disappear when their document closes or navigates
50
+ * away. Use exclude_custom to return only page-provided tools.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const toolsResponse =
55
+ * await client.browsers.webmcp.listTools(
56
+ * 'htzv5orfit78e1m2biiifpbv',
57
+ * );
58
+ * ```
59
+ */
60
+ listTools(idOrName, query = {}, options) {
61
+ return this._client.get((0, path_1.path) `/browsers/${idOrName}/webmcp/tools`, { query, ...options });
62
+ }
63
+ }
64
+ exports.Webmcp = Webmcp;
65
+ Webmcp.CustomTools = custom_tools_1.CustomTools;
66
+ //# sourceMappingURL=webmcp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webmcp.js","sourceRoot":"","sources":["../../../src/resources/browsers/webmcp/webmcp.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,0EAAiD;AACjD,oDAQwB;AAGxB,0DAAoD;AAEpD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAwDzF,CAAC;IAtDC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAU,CACR,QAAgB,EAChB,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,QAAQ,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CACP,QAAgB,EAChB,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,QAAQ,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AAzDD,wBAyDC;AA8LD,MAAM,CAAC,WAAW,GAAG,0BAAW,CAAC"}
@@ -0,0 +1,61 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ import * as CustomToolsAPI from "./custom-tools.mjs";
4
+ import { CustomTools, } from "./custom-tools.mjs";
5
+ import { path } from "../../../internal/utils/path.mjs";
6
+ /**
7
+ * Discover and invoke native page tools across the browser instance.
8
+ */
9
+ export class Webmcp extends APIResource {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.customTools = new CustomToolsAPI.CustomTools(this._client);
13
+ }
14
+ /**
15
+ * Invokes the exact live registration identified by tool_ref. Non-autosubmit
16
+ * declarative form tools return after their fields are populated with an
17
+ * awaiting_submission status. Other tools wait for a terminal result, including
18
+ * across navigation. Inspect a populated form, obtain any required confirmation,
19
+ * then submit through Playwright or computer interaction without invoking the tool
20
+ * again. If the tab or embedded frame disappears, or the request times out after
21
+ * invocation begins, the response reports outcome_unknown and the tool is not
22
+ * retried. CDP-backed custom tool outputs above 240 KiB return an error rather
23
+ * than a truncated result.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const invocationResult =
28
+ * await client.browsers.webmcp.invokeTool(
29
+ * 'htzv5orfit78e1m2biiifpbv',
30
+ * {
31
+ * input: { foo: 'bar' },
32
+ * tool_ref: 'x',
33
+ * },
34
+ * );
35
+ * ```
36
+ */
37
+ invokeTool(idOrName, body, options) {
38
+ return this._client.post(path `/browsers/${idOrName}/webmcp/invoke`, { body, ...options });
39
+ }
40
+ /**
41
+ * Returns a snapshot of native and custom WebMCP tools available across every open
42
+ * tab and embedded frame in the browser. Each tool includes an opaque tool_ref for
43
+ * invoking that exact live registration, nested tool metadata, and source
44
+ * information. Custom tools include their generated ID, namespace, and CDP
45
+ * target_id in source. Tools disappear when their document closes or navigates
46
+ * away. Use exclude_custom to return only page-provided tools.
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * const toolsResponse =
51
+ * await client.browsers.webmcp.listTools(
52
+ * 'htzv5orfit78e1m2biiifpbv',
53
+ * );
54
+ * ```
55
+ */
56
+ listTools(idOrName, query = {}, options) {
57
+ return this._client.get(path `/browsers/${idOrName}/webmcp/tools`, { query, ...options });
58
+ }
59
+ }
60
+ Webmcp.CustomTools = CustomTools;
61
+ //# sourceMappingURL=webmcp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webmcp.mjs","sourceRoot":"","sources":["../../../src/resources/browsers/webmcp/webmcp.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,cAAc,2BAAuB;AACjD,OAAO,EAIL,WAAW,GAIZ,2BAAuB;AAGxB,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAwDzF,CAAC;IAtDC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAU,CACR,QAAgB,EAChB,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,QAAQ,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CACP,QAAgB,EAChB,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,QAAQ,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AA8LD,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -1,158 +1,2 @@
1
- import { APIResource } from "../../core/resource.mjs";
2
- import { APIPromise } from "../../core/api-promise.mjs";
3
- import { RequestOptions } from "../../internal/request-options.mjs";
4
- /**
5
- * Discover and invoke native page tools across the browser instance.
6
- */
7
- export declare class Webmcp extends APIResource {
8
- /**
9
- * Invokes the exact live registration identified by tool_ref. Non-autosubmit
10
- * declarative form tools return after their fields are populated with an
11
- * awaiting_submission status. Other tools wait for a terminal result, including
12
- * across navigation. Inspect a populated form, obtain any required confirmation,
13
- * then submit through Playwright or computer interaction without invoking the tool
14
- * again. If the tab or embedded frame disappears, or the request times out after
15
- * invocation begins, the response reports outcome_unknown and the tool is not
16
- * retried.
17
- *
18
- * @example
19
- * ```ts
20
- * const invocationResult =
21
- * await client.browsers.webmcp.invokeTool(
22
- * 'htzv5orfit78e1m2biiifpbv',
23
- * {
24
- * input: { foo: 'bar' },
25
- * tool_ref: 'x',
26
- * },
27
- * );
28
- * ```
29
- */
30
- invokeTool(idOrName: string, body: WebmcpInvokeToolParams, options?: RequestOptions): APIPromise<InvocationResult>;
31
- /**
32
- * Returns a snapshot of native WebMCP tools available across every open tab and
33
- * embedded frame in the browser. Each tool includes an opaque tool_ref for
34
- * invoking that exact live registration. Tools disappear when their document
35
- * closes or navigates away.
36
- *
37
- * @example
38
- * ```ts
39
- * const toolsResponse =
40
- * await client.browsers.webmcp.listTools(
41
- * 'htzv5orfit78e1m2biiifpbv',
42
- * );
43
- * ```
44
- */
45
- listTools(idOrName: string, options?: RequestOptions): APIPromise<ToolsResponse>;
46
- }
47
- export interface InvocationFailure {
48
- code: 'outcome_unknown';
49
- message: string;
50
- invocation_id?: string;
51
- }
52
- export interface InvocationResult {
53
- invocation_id: string;
54
- /**
55
- * awaiting_submission means a non-autosubmit declarative form was populated but
56
- * not submitted. Inspect the form, obtain any required confirmation, then submit
57
- * through Playwright or computer interaction without invoking the tool again. The
58
- * other statuses are terminal results.
59
- */
60
- status: 'completed' | 'canceled' | 'error' | 'awaiting_submission';
61
- error_text?: string;
62
- /**
63
- * Untrusted page-provided output. Callers must treat it as potentially malicious
64
- * input.
65
- */
66
- output?: unknown;
67
- }
68
- export interface InvokeRequest {
69
- /**
70
- * Tool input, limited to 1 MiB after JSON serialization.
71
- */
72
- input: {
73
- [key: string]: unknown;
74
- };
75
- tool_ref: string;
76
- timeout_sec?: number;
77
- }
78
- export interface Tool {
79
- description: string;
80
- input_schema: {
81
- [key: string]: unknown;
82
- };
83
- name: string;
84
- source: ToolSource;
85
- /**
86
- * Opaque reference for invoking this exact live registration. It becomes invalid
87
- * when its document or browser process is replaced.
88
- */
89
- tool_ref: string;
90
- /**
91
- * Page-provided behavioral hints. These values are untrusted and are not enforced
92
- * by Kernel.
93
- */
94
- annotations?: ToolAnnotations;
95
- }
96
- /**
97
- * Page-provided behavioral hints. These values are untrusted and are not enforced
98
- * by Kernel.
99
- */
100
- export interface ToolAnnotations {
101
- autosubmit: boolean;
102
- consequential: boolean;
103
- read_only: boolean;
104
- untrusted_content: boolean;
105
- }
106
- export interface ToolFrame {
107
- /**
108
- * Monotonically increasing identifier for this embedded frame during the current
109
- * browser process.
110
- */
111
- frame_id: number;
112
- /**
113
- * Current frame URL with the fragment omitted.
114
- */
115
- url: string;
116
- }
117
- export interface ToolSource {
118
- /**
119
- * Embedded frame that registered the tool, or null when the top-level page
120
- * registered it.
121
- */
122
- frame: ToolFrame | null;
123
- /**
124
- * Current title of the top-level page.
125
- */
126
- page_title: string;
127
- /**
128
- * Current URL of the top-level page with the fragment omitted.
129
- */
130
- page_url: string;
131
- /**
132
- * Monotonically increasing identifier for the tab during the current browser
133
- * process.
134
- */
135
- tab_id: number;
136
- /**
137
- * Monotonically increasing identifier for the browser window during the current
138
- * browser process.
139
- */
140
- window_id: number;
141
- }
142
- export interface ToolsResponse {
143
- tools: Array<Tool>;
144
- }
145
- export interface WebmcpInvokeToolParams {
146
- /**
147
- * Tool input, limited to 1 MiB after JSON serialization.
148
- */
149
- input: {
150
- [key: string]: unknown;
151
- };
152
- tool_ref: string;
153
- timeout_sec?: number;
154
- }
155
- export declare namespace Webmcp {
156
- export { type InvocationFailure as InvocationFailure, type InvocationResult as InvocationResult, type InvokeRequest as InvokeRequest, type Tool as Tool, type ToolAnnotations as ToolAnnotations, type ToolFrame as ToolFrame, type ToolSource as ToolSource, type ToolsResponse as ToolsResponse, type WebmcpInvokeToolParams as WebmcpInvokeToolParams, };
157
- }
1
+ export * from "./webmcp/index.mjs";
158
2
  //# sourceMappingURL=webmcp.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webmcp.d.mts","sourceRoot":"","sources":["../../src/resources/browsers/webmcp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;IAI/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IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAElC,QAAQ,EAAE,MAAM,CAAC;IAEjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
1
+ {"version":3,"file":"webmcp.d.mts","sourceRoot":"","sources":["../../src/resources/browsers/webmcp.ts"],"names":[],"mappings":"AAEA,mCAA+B"}
@@ -1,158 +1,2 @@
1
- import { APIResource } from "../../core/resource.js";
2
- import { APIPromise } from "../../core/api-promise.js";
3
- import { RequestOptions } from "../../internal/request-options.js";
4
- /**
5
- * Discover and invoke native page tools across the browser instance.
6
- */
7
- export declare class Webmcp extends APIResource {
8
- /**
9
- * Invokes the exact live registration identified by tool_ref. Non-autosubmit
10
- * declarative form tools return after their fields are populated with an
11
- * awaiting_submission status. Other tools wait for a terminal result, including
12
- * across navigation. Inspect a populated form, obtain any required confirmation,
13
- * then submit through Playwright or computer interaction without invoking the tool
14
- * again. If the tab or embedded frame disappears, or the request times out after
15
- * invocation begins, the response reports outcome_unknown and the tool is not
16
- * retried.
17
- *
18
- * @example
19
- * ```ts
20
- * const invocationResult =
21
- * await client.browsers.webmcp.invokeTool(
22
- * 'htzv5orfit78e1m2biiifpbv',
23
- * {
24
- * input: { foo: 'bar' },
25
- * tool_ref: 'x',
26
- * },
27
- * );
28
- * ```
29
- */
30
- invokeTool(idOrName: string, body: WebmcpInvokeToolParams, options?: RequestOptions): APIPromise<InvocationResult>;
31
- /**
32
- * Returns a snapshot of native WebMCP tools available across every open tab and
33
- * embedded frame in the browser. Each tool includes an opaque tool_ref for
34
- * invoking that exact live registration. Tools disappear when their document
35
- * closes or navigates away.
36
- *
37
- * @example
38
- * ```ts
39
- * const toolsResponse =
40
- * await client.browsers.webmcp.listTools(
41
- * 'htzv5orfit78e1m2biiifpbv',
42
- * );
43
- * ```
44
- */
45
- listTools(idOrName: string, options?: RequestOptions): APIPromise<ToolsResponse>;
46
- }
47
- export interface InvocationFailure {
48
- code: 'outcome_unknown';
49
- message: string;
50
- invocation_id?: string;
51
- }
52
- export interface InvocationResult {
53
- invocation_id: string;
54
- /**
55
- * awaiting_submission means a non-autosubmit declarative form was populated but
56
- * not submitted. Inspect the form, obtain any required confirmation, then submit
57
- * through Playwright or computer interaction without invoking the tool again. The
58
- * other statuses are terminal results.
59
- */
60
- status: 'completed' | 'canceled' | 'error' | 'awaiting_submission';
61
- error_text?: string;
62
- /**
63
- * Untrusted page-provided output. Callers must treat it as potentially malicious
64
- * input.
65
- */
66
- output?: unknown;
67
- }
68
- export interface InvokeRequest {
69
- /**
70
- * Tool input, limited to 1 MiB after JSON serialization.
71
- */
72
- input: {
73
- [key: string]: unknown;
74
- };
75
- tool_ref: string;
76
- timeout_sec?: number;
77
- }
78
- export interface Tool {
79
- description: string;
80
- input_schema: {
81
- [key: string]: unknown;
82
- };
83
- name: string;
84
- source: ToolSource;
85
- /**
86
- * Opaque reference for invoking this exact live registration. It becomes invalid
87
- * when its document or browser process is replaced.
88
- */
89
- tool_ref: string;
90
- /**
91
- * Page-provided behavioral hints. These values are untrusted and are not enforced
92
- * by Kernel.
93
- */
94
- annotations?: ToolAnnotations;
95
- }
96
- /**
97
- * Page-provided behavioral hints. These values are untrusted and are not enforced
98
- * by Kernel.
99
- */
100
- export interface ToolAnnotations {
101
- autosubmit: boolean;
102
- consequential: boolean;
103
- read_only: boolean;
104
- untrusted_content: boolean;
105
- }
106
- export interface ToolFrame {
107
- /**
108
- * Monotonically increasing identifier for this embedded frame during the current
109
- * browser process.
110
- */
111
- frame_id: number;
112
- /**
113
- * Current frame URL with the fragment omitted.
114
- */
115
- url: string;
116
- }
117
- export interface ToolSource {
118
- /**
119
- * Embedded frame that registered the tool, or null when the top-level page
120
- * registered it.
121
- */
122
- frame: ToolFrame | null;
123
- /**
124
- * Current title of the top-level page.
125
- */
126
- page_title: string;
127
- /**
128
- * Current URL of the top-level page with the fragment omitted.
129
- */
130
- page_url: string;
131
- /**
132
- * Monotonically increasing identifier for the tab during the current browser
133
- * process.
134
- */
135
- tab_id: number;
136
- /**
137
- * Monotonically increasing identifier for the browser window during the current
138
- * browser process.
139
- */
140
- window_id: number;
141
- }
142
- export interface ToolsResponse {
143
- tools: Array<Tool>;
144
- }
145
- export interface WebmcpInvokeToolParams {
146
- /**
147
- * Tool input, limited to 1 MiB after JSON serialization.
148
- */
149
- input: {
150
- [key: string]: unknown;
151
- };
152
- tool_ref: string;
153
- timeout_sec?: number;
154
- }
155
- export declare namespace Webmcp {
156
- export { type InvocationFailure as InvocationFailure, type InvocationResult as InvocationResult, type InvokeRequest as InvokeRequest, type Tool as Tool, type ToolAnnotations as ToolAnnotations, type ToolFrame as ToolFrame, type ToolSource as ToolSource, type ToolsResponse as ToolsResponse, type WebmcpInvokeToolParams as WebmcpInvokeToolParams, };
157
- }
1
+ export * from "./webmcp/index.js";
158
2
  //# sourceMappingURL=webmcp.d.ts.map