@mokuhub/mokutab-shared 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -251,6 +251,16 @@ declare const CORE_TOOL_NAMES: {
251
251
  SWITCH_PROFILE: string;
252
252
  };
253
253
  };
254
+ /**
255
+ * Core tools that change nothing: not the page, not the browser, not the
256
+ * bridge's own state. Served with readOnlyHint, which lets a client run them
257
+ * side by side and repeat one after a dropped connection. A tool that can
258
+ * navigate (chrome_get_web_content with url), move a tab (chrome_screenshot),
259
+ * consume a buffer (chrome_console) or run caller code is not on the list.
260
+ */
261
+ declare const CORE_READ_ONLY_TOOL_NAMES: readonly string[];
262
+ /** Core tools whose whole job is to remove something. Served with destructiveHint. */
263
+ declare const CORE_DESTRUCTIVE_TOOL_NAMES: readonly string[];
254
264
  declare const CORE_TOOL_SCHEMAS: Tool[];
255
265
 
256
266
  /**
@@ -273,6 +283,10 @@ interface ToolModule {
273
283
  * is on.
274
284
  */
275
285
  aliases?: Readonly<Record<string, string>>;
286
+ /** Tools that change nothing: served with readOnlyHint. */
287
+ readOnlyTools?: readonly string[];
288
+ /** Tools whose whole job is to remove something: served with destructiveHint. */
289
+ destructiveTools?: readonly string[];
276
290
  }
277
291
  /** Refusal for a call to a tool whose module is switched off. Same wording on both sides. */
278
292
  declare function moduleOffMessage(module: Pick<ToolModule, 'id' | 'title'>, tool: string): string;
@@ -424,6 +438,34 @@ declare const WORKATO_INSTRUCTIONS: string;
424
438
  */
425
439
  declare const WORKATO_TOOL_ALIASES: Readonly<Record<string, string>>;
426
440
 
441
+ /**
442
+ * What kind of call each Workato tool is. Plain name lists, with no schema
443
+ * behind them, so the extension can import one without the catalogue.
444
+ */
445
+ /**
446
+ * Tools that change nothing in Workato and nothing in the page. Served with
447
+ * readOnlyHint. Absent on purpose: workato_deploy_plan (opens a draft
448
+ * deployment), workato_step_schema (apply_to writes a step),
449
+ * workato_properties (reads and writes), workato_operation_status (finishes an
450
+ * interrupted operation), workato_lcap_page_validate (its render check opens
451
+ * and closes a tab), and the tools that run caller-chosen requests, queries or
452
+ * actions.
453
+ *
454
+ * The hint is about Workato and the page. A read tool still writes the local
455
+ * file a caller names in out_file, so a client must not take the hint as
456
+ * leave to skip its own check of the arguments.
457
+ */
458
+ declare const WORKATO_READ_ONLY_TOOL_NAMES: readonly string[];
459
+ /** Tools whose whole job is to remove something. Served with destructiveHint. */
460
+ declare const WORKATO_DESTRUCTIVE_TOOL_NAMES: readonly string[];
461
+ /**
462
+ * Read-only tools that are nothing but fetches made from the page: several of
463
+ * them may run on one tab at once. The extension's per-tab queue lets these
464
+ * overlap each other and still keeps them apart from every call that drives
465
+ * the page.
466
+ */
467
+ declare const WORKATO_TAB_SHARED_TOOL_NAMES: readonly string[];
468
+
427
469
  /**
428
470
  * The id and title on their own, for code that needs no schemas (the
429
471
  * extension): its bundler keeps a whole object literal when one property is
@@ -688,4 +730,4 @@ declare function sanitizeText(text: string): {
688
730
  */
689
731
  declare function isSensitiveKey(key: string): boolean;
690
732
 
691
- export { CORE_TOOL_NAMES, CORE_TOOL_SCHEMAS, DEFAULT_MAX_OUTPUT_BYTES, DEFAULT_SERVER_PORT, type ElementPickerRequest, type ElementPickerResult, type ElementPickerResultItem, HOST_NAME, MODULES, type ModuleStateEntry, type ModulesStatePayload, type NativeMessage, NativeMessageType, type OutputSanitizerOptions, type PickedElement, type PickedElementPoint, type PickedElementRect, RAW_MAX_OUTPUT_BYTES, type SanitizedOutput, TOOL_NAMES, TOOL_SCHEMAS, type ToolModule, WORKATO_INSTRUCTIONS, WORKATO_MODULE, WORKATO_MODULE_ID, WORKATO_MODULE_TITLE, WORKATO_TOOL_ALIASES, WORKATO_TOOL_NAMES, WORKATO_TOOL_SCHEMAS, aliasDescription, aliasOffMessage, formatRawOutput, isSensitiveKey, moduleOfTool, moduleOffMessage, sanitizeAndLimitOutput, sanitizeText };
733
+ export { CORE_DESTRUCTIVE_TOOL_NAMES, CORE_READ_ONLY_TOOL_NAMES, CORE_TOOL_NAMES, CORE_TOOL_SCHEMAS, DEFAULT_MAX_OUTPUT_BYTES, DEFAULT_SERVER_PORT, type ElementPickerRequest, type ElementPickerResult, type ElementPickerResultItem, HOST_NAME, MODULES, type ModuleStateEntry, type ModulesStatePayload, type NativeMessage, NativeMessageType, type OutputSanitizerOptions, type PickedElement, type PickedElementPoint, type PickedElementRect, RAW_MAX_OUTPUT_BYTES, type SanitizedOutput, TOOL_NAMES, TOOL_SCHEMAS, type ToolModule, WORKATO_DESTRUCTIVE_TOOL_NAMES, WORKATO_INSTRUCTIONS, WORKATO_MODULE, WORKATO_MODULE_ID, WORKATO_MODULE_TITLE, WORKATO_READ_ONLY_TOOL_NAMES, WORKATO_TAB_SHARED_TOOL_NAMES, WORKATO_TOOL_ALIASES, WORKATO_TOOL_NAMES, WORKATO_TOOL_SCHEMAS, aliasDescription, aliasOffMessage, formatRawOutput, isSensitiveKey, moduleOfTool, moduleOffMessage, sanitizeAndLimitOutput, sanitizeText };
package/dist/index.d.ts CHANGED
@@ -251,6 +251,16 @@ declare const CORE_TOOL_NAMES: {
251
251
  SWITCH_PROFILE: string;
252
252
  };
253
253
  };
254
+ /**
255
+ * Core tools that change nothing: not the page, not the browser, not the
256
+ * bridge's own state. Served with readOnlyHint, which lets a client run them
257
+ * side by side and repeat one after a dropped connection. A tool that can
258
+ * navigate (chrome_get_web_content with url), move a tab (chrome_screenshot),
259
+ * consume a buffer (chrome_console) or run caller code is not on the list.
260
+ */
261
+ declare const CORE_READ_ONLY_TOOL_NAMES: readonly string[];
262
+ /** Core tools whose whole job is to remove something. Served with destructiveHint. */
263
+ declare const CORE_DESTRUCTIVE_TOOL_NAMES: readonly string[];
254
264
  declare const CORE_TOOL_SCHEMAS: Tool[];
255
265
 
256
266
  /**
@@ -273,6 +283,10 @@ interface ToolModule {
273
283
  * is on.
274
284
  */
275
285
  aliases?: Readonly<Record<string, string>>;
286
+ /** Tools that change nothing: served with readOnlyHint. */
287
+ readOnlyTools?: readonly string[];
288
+ /** Tools whose whole job is to remove something: served with destructiveHint. */
289
+ destructiveTools?: readonly string[];
276
290
  }
277
291
  /** Refusal for a call to a tool whose module is switched off. Same wording on both sides. */
278
292
  declare function moduleOffMessage(module: Pick<ToolModule, 'id' | 'title'>, tool: string): string;
@@ -424,6 +438,34 @@ declare const WORKATO_INSTRUCTIONS: string;
424
438
  */
425
439
  declare const WORKATO_TOOL_ALIASES: Readonly<Record<string, string>>;
426
440
 
441
+ /**
442
+ * What kind of call each Workato tool is. Plain name lists, with no schema
443
+ * behind them, so the extension can import one without the catalogue.
444
+ */
445
+ /**
446
+ * Tools that change nothing in Workato and nothing in the page. Served with
447
+ * readOnlyHint. Absent on purpose: workato_deploy_plan (opens a draft
448
+ * deployment), workato_step_schema (apply_to writes a step),
449
+ * workato_properties (reads and writes), workato_operation_status (finishes an
450
+ * interrupted operation), workato_lcap_page_validate (its render check opens
451
+ * and closes a tab), and the tools that run caller-chosen requests, queries or
452
+ * actions.
453
+ *
454
+ * The hint is about Workato and the page. A read tool still writes the local
455
+ * file a caller names in out_file, so a client must not take the hint as
456
+ * leave to skip its own check of the arguments.
457
+ */
458
+ declare const WORKATO_READ_ONLY_TOOL_NAMES: readonly string[];
459
+ /** Tools whose whole job is to remove something. Served with destructiveHint. */
460
+ declare const WORKATO_DESTRUCTIVE_TOOL_NAMES: readonly string[];
461
+ /**
462
+ * Read-only tools that are nothing but fetches made from the page: several of
463
+ * them may run on one tab at once. The extension's per-tab queue lets these
464
+ * overlap each other and still keeps them apart from every call that drives
465
+ * the page.
466
+ */
467
+ declare const WORKATO_TAB_SHARED_TOOL_NAMES: readonly string[];
468
+
427
469
  /**
428
470
  * The id and title on their own, for code that needs no schemas (the
429
471
  * extension): its bundler keeps a whole object literal when one property is
@@ -688,4 +730,4 @@ declare function sanitizeText(text: string): {
688
730
  */
689
731
  declare function isSensitiveKey(key: string): boolean;
690
732
 
691
- export { CORE_TOOL_NAMES, CORE_TOOL_SCHEMAS, DEFAULT_MAX_OUTPUT_BYTES, DEFAULT_SERVER_PORT, type ElementPickerRequest, type ElementPickerResult, type ElementPickerResultItem, HOST_NAME, MODULES, type ModuleStateEntry, type ModulesStatePayload, type NativeMessage, NativeMessageType, type OutputSanitizerOptions, type PickedElement, type PickedElementPoint, type PickedElementRect, RAW_MAX_OUTPUT_BYTES, type SanitizedOutput, TOOL_NAMES, TOOL_SCHEMAS, type ToolModule, WORKATO_INSTRUCTIONS, WORKATO_MODULE, WORKATO_MODULE_ID, WORKATO_MODULE_TITLE, WORKATO_TOOL_ALIASES, WORKATO_TOOL_NAMES, WORKATO_TOOL_SCHEMAS, aliasDescription, aliasOffMessage, formatRawOutput, isSensitiveKey, moduleOfTool, moduleOffMessage, sanitizeAndLimitOutput, sanitizeText };
733
+ export { CORE_DESTRUCTIVE_TOOL_NAMES, CORE_READ_ONLY_TOOL_NAMES, CORE_TOOL_NAMES, CORE_TOOL_SCHEMAS, DEFAULT_MAX_OUTPUT_BYTES, DEFAULT_SERVER_PORT, type ElementPickerRequest, type ElementPickerResult, type ElementPickerResultItem, HOST_NAME, MODULES, type ModuleStateEntry, type ModulesStatePayload, type NativeMessage, NativeMessageType, type OutputSanitizerOptions, type PickedElement, type PickedElementPoint, type PickedElementRect, RAW_MAX_OUTPUT_BYTES, type SanitizedOutput, TOOL_NAMES, TOOL_SCHEMAS, type ToolModule, WORKATO_DESTRUCTIVE_TOOL_NAMES, WORKATO_INSTRUCTIONS, WORKATO_MODULE, WORKATO_MODULE_ID, WORKATO_MODULE_TITLE, WORKATO_READ_ONLY_TOOL_NAMES, WORKATO_TAB_SHARED_TOOL_NAMES, WORKATO_TOOL_ALIASES, WORKATO_TOOL_NAMES, WORKATO_TOOL_SCHEMAS, aliasDescription, aliasOffMessage, formatRawOutput, isSensitiveKey, moduleOfTool, moduleOffMessage, sanitizeAndLimitOutput, sanitizeText };
package/dist/index.js CHANGED
@@ -20,6 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ CORE_DESTRUCTIVE_TOOL_NAMES: () => CORE_DESTRUCTIVE_TOOL_NAMES,
24
+ CORE_READ_ONLY_TOOL_NAMES: () => CORE_READ_ONLY_TOOL_NAMES,
23
25
  CORE_TOOL_NAMES: () => CORE_TOOL_NAMES,
24
26
  CORE_TOOL_SCHEMAS: () => CORE_TOOL_SCHEMAS,
25
27
  DEFAULT_MAX_OUTPUT_BYTES: () => DEFAULT_MAX_OUTPUT_BYTES,
@@ -30,10 +32,13 @@ __export(index_exports, {
30
32
  RAW_MAX_OUTPUT_BYTES: () => RAW_MAX_OUTPUT_BYTES,
31
33
  TOOL_NAMES: () => TOOL_NAMES,
32
34
  TOOL_SCHEMAS: () => TOOL_SCHEMAS,
35
+ WORKATO_DESTRUCTIVE_TOOL_NAMES: () => WORKATO_DESTRUCTIVE_TOOL_NAMES,
33
36
  WORKATO_INSTRUCTIONS: () => WORKATO_INSTRUCTIONS,
34
37
  WORKATO_MODULE: () => WORKATO_MODULE,
35
38
  WORKATO_MODULE_ID: () => WORKATO_MODULE_ID,
36
39
  WORKATO_MODULE_TITLE: () => WORKATO_MODULE_TITLE,
40
+ WORKATO_READ_ONLY_TOOL_NAMES: () => WORKATO_READ_ONLY_TOOL_NAMES,
41
+ WORKATO_TAB_SHARED_TOOL_NAMES: () => WORKATO_TAB_SHARED_TOOL_NAMES,
37
42
  WORKATO_TOOL_ALIASES: () => WORKATO_TOOL_ALIASES,
38
43
  WORKATO_TOOL_NAMES: () => WORKATO_TOOL_NAMES,
39
44
  WORKATO_TOOL_SCHEMAS: () => WORKATO_TOOL_SCHEMAS,
@@ -151,10 +156,32 @@ var CORE_TOOL_NAMES = {
151
156
  SWITCH_PROFILE: "chrome_switch_profile"
152
157
  }
153
158
  };
159
+ var CORE_READ_ONLY_TOOL_NAMES = [
160
+ "get_windows_and_tabs",
161
+ "chrome_list_profiles",
162
+ "chrome_bridge_info",
163
+ "chrome_history",
164
+ "chrome_bookmark_search",
165
+ "chrome_snapshot",
166
+ "chrome_snapshot_wait_for",
167
+ "chrome_read_page",
168
+ "chrome_search_page",
169
+ "chrome_find_elements",
170
+ "chrome_watch_list",
171
+ "chrome_watch_events",
172
+ "chrome_fn_list",
173
+ "chrome_fn_get",
174
+ "chrome_fn_runs",
175
+ "performance_analyze_insight"
176
+ ];
177
+ var CORE_DESTRUCTIVE_TOOL_NAMES = [
178
+ "chrome_close_tabs",
179
+ "chrome_bookmark_delete"
180
+ ];
154
181
  var CORE_TOOL_SCHEMAS = [
155
182
  {
156
183
  name: CORE_TOOL_NAMES.BROWSER.GET_WINDOWS_AND_TABS,
157
- description: 'Get all currently open browser windows and tabs. Pass filter to return only tabs whose URL or title contains the substring (e.g. filter:"workato") \u2014 strongly preferred when looking for a specific app tab, so unrelated personal tabs never enter the context.',
184
+ description: 'Get all currently open browser windows and tabs. Pass filter to return only tabs whose URL or title contains the substring (e.g. filter:"workato"): strongly preferred when looking for a specific app tab, so unrelated personal tabs never enter the context. Returns {windowCount, tabCount, windows: [{windowId, tabs: [{tabId, url, title, active}]}]}.',
158
185
  inputSchema: {
159
186
  type: "object",
160
187
  properties: {
@@ -618,7 +645,7 @@ Tip: If the returned elements do not include the specific element you need, use
618
645
  },
619
646
  {
620
647
  name: CORE_TOOL_NAMES.BROWSER.LEASE_TAB,
621
- description: "Get a tab of your own for parallel work: several agents sharing one MCP server and one Chrome profile must each lease a tab and pass the returned `lease` on every browser call, instead of relying on the active tab. Opens the tab in a separate, unfocused agents window. Screenshots that need a visible tab move a hidden agents-window tab to a window of its own by themselves; own_window:true (that window up front) is still the choice for chrome_computer mouse/keyboard input, which a hidden tab drops. The bridge turns `lease` into the right profile and tabId, never activates or focuses the tab, and while this MCP session holds any lease it REFUSES tab-targeting calls that carry neither `lease` nor tabId. Calls on the same tab run one at a time. Leases end with chrome_release_tab, when the tab is closed, or after 30 minutes unused. Returns {lease, tabId, windowId, profile}.",
648
+ description: "Get a tab of your own for parallel work: several agents sharing one Chrome profile (in one MCP session or in several) must each lease a tab and pass the returned `lease` on every browser call, instead of relying on the active tab. Opens the tab in a separate, unfocused agents window. Screenshots that need a visible tab move a hidden agents-window tab to a window of its own by themselves; own_window:true (that window up front) is still the choice for chrome_computer mouse/keyboard input, which a hidden tab drops. The bridge turns `lease` into the right profile and tabId, never activates or focuses the tab, and while this MCP session holds any lease it REFUSES tab-targeting calls that carry neither `lease` nor tabId. A leased tab is off limits to every other MCP session of this bridge: a call that names it without the lease is refused (TabLeased), and a Workato call that names no tab never picks it. Whoever passes the lease uses the tab. Calls that drive a page run one at a time per tab; read-only Workato calls overlap. Leases end with chrome_release_tab, when the tab is closed, or after 30 minutes unused. Returns {lease, tabId, windowId, profile}.",
622
649
  inputSchema: {
623
650
  type: "object",
624
651
  properties: {
@@ -1887,7 +1914,7 @@ Tip: If the returned elements do not include the specific element you need, use
1887
1914
  },
1888
1915
  {
1889
1916
  name: CORE_TOOL_NAMES.BRIDGE.LIST_PROFILES,
1890
- description: 'List all currently active/connected Chrome profiles (e.g. "prod", "staging", "dev") and see which one is selected for this MCP session, if any. Also returns session_context: the profile, tab, host, workspace and environment this session is pinned to (null when nothing is pinned, in which case calls follow the bridge default profile).',
1917
+ description: `List all currently active/connected Chrome profiles (e.g. "prod", "staging", "dev") and see which one is selected for this MCP session, if any. Also returns session_context: the profile, tab, host, workspace and environment this session is pinned to (null when nothing is pinned, in which case calls follow the bridge default profile). Returns {active_profile, session_profile, session_tab_id, session_context, server_default_profile, connected_profiles, leases, routing_note}. leases holds this session's leases with their token, and the tabs other sessions leased without one (other_session: true): tabs to stay away from.`,
1891
1918
  inputSchema: {
1892
1919
  type: "object",
1893
1920
  properties: {},
@@ -2957,7 +2984,7 @@ Use workato_pull_recipe when the step is already known, and workato_recipe_step_
2957
2984
  },
2958
2985
  {
2959
2986
  name: WORKATO_TOOL_NAMES.WORKATO.LIST_FOLDERS,
2960
- description: "List the full Workato project/folder tree (GET /folders?projects_mode=true). Top-level entries are project root folders: their `id` is the folder id to use as parent_id (create/move folder) or folder_id (move recipe), and `project_id` is the owning project's id. Each node reports flow_count/active_flow_count (recipes) plus non-zero asset counts under `counts`, and nested `children`. Slim by default; totals holds account-wide asset counters. THE tool to call before creating/moving folders or recipes: it is the source of folder ids. Read-only. Requires an open Workato tab.",
2987
+ description: "List the full Workato project/folder tree (GET /folders?projects_mode=true). Top-level entries are project root folders: their `id` is the folder id to use as parent_id (create/move folder) or folder_id (move recipe), and `project_id` is the owning project's id. Each node reports flow_count/active_flow_count (recipes) plus non-zero asset counts under `counts`, and nested `children`. Slim by default; totals holds account-wide asset counters. THE tool to call before creating/moving folders or recipes: it is the source of folder ids. Returns {project_count, projects}. Read-only. Requires an open Workato tab.",
2961
2988
  inputSchema: {
2962
2989
  type: "object",
2963
2990
  properties: {
@@ -3438,7 +3465,7 @@ Use workato_pull_recipe when the step is already known, and workato_recipe_step_
3438
3465
  },
3439
3466
  {
3440
3467
  name: WORKATO_TOOL_NAMES.WORKATO.LIST_JOBS,
3441
- description: "List and SEARCH jobs for a Workato recipe. Auto-walks Workato's cursor pagination. Two searches, combinable: `query` is the SERVER one and matches a contiguous, case-insensitive substring of the job id or of a custom job-report column value ONLY (not the error text, not column labels, and never an erased job); `match` is a LOCAL scan of every job the walk sees, over id / title / error / report columns, as exact, substring or regex. Date range: started_from / started_to (ISO, or YYYY-MM-DD widened to the whole day) in `timezone` (default UTC); started_at takes only the fixed presets. Two budgets: `limit` caps matches RETURNED, `scan_budget` caps jobs SCANNED. Every response carries `coverage` (scanned, matched, erased_seen, window, complete, next_cursor, retention_boundary_reached) and a `summary` sentence: zero matches from an incomplete scan is NOT evidence of none, so resume with cursor=next_cursor. ERASED jobs (retention swept) stay listed with erased:true, title/report null and no error: unavailable, not empty. The walk stops after 3 consecutive erased jobs because that boundary is workspace-wide and everything older is erased too (stop_on_erased:false to keep going). Report columns come back with their configured labels, all of them, plus report_columns. `fields` projects the slim job. Requires an open Workato tab.",
3468
+ description: "List and SEARCH jobs for a Workato recipe. Auto-walks Workato's cursor pagination. Two searches, combinable: `query` is the SERVER one and matches a contiguous, case-insensitive substring of the job id or of a custom job-report column value ONLY (not the error text, not column labels, and never an erased job); `match` is a LOCAL scan of every job the walk sees, over id / title / error / report columns, as exact, substring or regex. Date range: started_from / started_to (ISO, or YYYY-MM-DD widened to the whole day) in `timezone` (default UTC); started_at takes only the fixed presets. Two budgets: `limit` caps matches RETURNED, `scan_budget` caps jobs SCANNED. Every response carries `coverage` (scanned, matched, erased_seen, window, complete, next_cursor, retention_boundary_reached) and a `summary` sentence: zero matches from an incomplete scan is NOT evidence of none, so resume with cursor=next_cursor. ERASED jobs (retention swept) stay listed with erased:true, title/report null and no error: unavailable, not empty. The walk stops after 3 consecutive erased jobs because that boundary is workspace-wide and everything older is erased too (stop_on_erased:false to keep going). Report columns come back with their configured labels, all of them, plus report_columns. `fields` projects the slim job. Returns {total, succeeded, failed, jobs, coverage, next_cursor, report_columns}. Requires an open Workato tab.",
3442
3469
  inputSchema: {
3443
3470
  type: "object",
3444
3471
  properties: {
@@ -4615,7 +4642,7 @@ connection_id must be a real connection id: an adapter name (logger, workato_pub
4615
4642
  },
4616
4643
  {
4617
4644
  name: WORKATO_TOOL_NAMES.WORKATO_LOOKUP.TABLES_LIST,
4618
- description: "List all Workato lookup tables visible to the signed-in user (GET /lookup_tables.json). Returns a slim shape: [{id, name, entry_count, updated_at}]. Requires an open logged-in Workato tab (uses the session pinned tab or first Workato app tab, never whatever tab is focused).",
4645
+ description: "List all Workato lookup tables visible to the signed-in user (GET /lookup_tables.json). Returns {headline, items: [{id, name, entry_count, updated_at}]}. Requires an open logged-in Workato tab (uses the session pinned tab or first Workato app tab, never whatever tab is focused).",
4619
4646
  inputSchema: {
4620
4647
  type: "object",
4621
4648
  properties: {
@@ -4872,7 +4899,7 @@ connection_id must be a real connection id: an adapter name (logger, workato_pub
4872
4899
  },
4873
4900
  {
4874
4901
  name: WORKATO_TOOL_NAMES.WORKATO_DATA_TABLE.TABLES_LIST,
4875
- description: "List Workato Data Tables in a project folder (GET /web_api/mixed_assets.json filtered to data-table assets). Data Tables are the newer relational store (distinct from the older Lookup Tables at /lookup_tables/). Returns a slim shape: [{id, name, folder_id, total_entries_count, updated_at}]. If folder_id is omitted, the tool falls back to the folder visible in the current Workato URL (best-effort). Prerequisite: the active tab must be a logged-in Workato page.",
4902
+ description: "List Workato Data Tables in a project folder (GET /web_api/mixed_assets.json filtered to data-table assets). Data Tables are the newer relational store (distinct from the older Lookup Tables at /lookup_tables/). Returns {tables: [{id, name, folder_id, total_entries_count, updated_at}], page, per_page, count, folder_id}. If folder_id is omitted, the tool falls back to the folder visible in the current Workato URL (best-effort). Prerequisite: the active tab must be a logged-in Workato page.",
4876
4903
  inputSchema: {
4877
4904
  type: "object",
4878
4905
  properties: {
@@ -5317,7 +5344,7 @@ connection_id must be a real connection id: an adapter name (logger, workato_pub
5317
5344
  },
5318
5345
  {
5319
5346
  name: WORKATO_TOOL_NAMES.WORKATO_LCAP.APPS_LIST,
5320
- description: "List the Workflow Apps (LCAP) in the current workspace: id, name, project_id, unique_id, live. Read-only. There is no endpoint that lists the PAGES in an app - page ids come from the builder URL (app.workato.com/lcap/pages/<id>) or the project's asset view. Requires an open Workato tab in the right workspace.",
5347
+ description: "List the Workflow Apps (LCAP) in the current workspace. Returns {app_count, apps: [{id, name, project_id, unique_id, live}]}. Read-only. There is no endpoint that lists the PAGES in an app - page ids come from the builder URL (app.workato.com/lcap/pages/<id>) or the project's asset view. Requires an open Workato tab in the right workspace.",
5321
5348
  inputSchema: {
5322
5349
  type: "object",
5323
5350
  properties: {
@@ -5570,6 +5597,52 @@ connection_id must be a real connection id: an adapter name (logger, workato_pub
5570
5597
  }
5571
5598
  ];
5572
5599
 
5600
+ // src/modules/workato/tool-kinds.ts
5601
+ var WORKATO_READ_ONLY_TOOL_NAMES = [
5602
+ "workato_whoami",
5603
+ "workato_session_context",
5604
+ "workato_pull_recipe",
5605
+ "workato_recipe_grep",
5606
+ "workato_recipe_status",
5607
+ "workato_recipe_version_diff",
5608
+ "workato_recipe_validate",
5609
+ "workato_recipe_callers",
5610
+ "workato_recipe_connections",
5611
+ "workato_recipe_step_search",
5612
+ "workato_job_trace",
5613
+ "workato_list_jobs",
5614
+ "workato_search_recipes",
5615
+ "workato_search_connections",
5616
+ "workato_get_connection",
5617
+ "workato_deployments_list",
5618
+ "workato_list_folders",
5619
+ "workato_adapter_meta",
5620
+ "workato_apps_list",
5621
+ "workato_pick_list",
5622
+ "workato_datapill",
5623
+ "workato_lookup_tables_list",
5624
+ "workato_lookup_table_get",
5625
+ "workato_lookup_table_row_search",
5626
+ "workato_data_tables_list",
5627
+ "workato_data_table_get",
5628
+ "workato_data_table_row_list",
5629
+ "workato_lcap_apps_list",
5630
+ "workato_lcap_page_get",
5631
+ "workato_ui_list_steps"
5632
+ ];
5633
+ var WORKATO_DESTRUCTIVE_TOOL_NAMES = [
5634
+ "workato_delete_recipe",
5635
+ "workato_delete_folder",
5636
+ "workato_lookup_table_delete",
5637
+ "workato_lookup_table_row_delete",
5638
+ "workato_data_table_delete",
5639
+ "workato_data_table_delete_column",
5640
+ "workato_data_table_row_delete",
5641
+ "workato_lcap_page_delete"
5642
+ ];
5643
+ var DOM_READERS = ["workato_ui_list_steps"];
5644
+ var WORKATO_TAB_SHARED_TOOL_NAMES = /* @__PURE__ */ WORKATO_READ_ONLY_TOOL_NAMES.filter((name) => !DOM_READERS.includes(name));
5645
+
5573
5646
  // src/modules/workato/index.ts
5574
5647
  var WORKATO_MODULE_ID = "workato";
5575
5648
  var WORKATO_MODULE_TITLE = "Workato";
@@ -5578,7 +5651,9 @@ var WORKATO_MODULE = {
5578
5651
  title: WORKATO_MODULE_TITLE,
5579
5652
  tools: WORKATO_TOOL_SCHEMAS,
5580
5653
  instructions: WORKATO_INSTRUCTIONS,
5581
- aliases: WORKATO_TOOL_ALIASES
5654
+ aliases: WORKATO_TOOL_ALIASES,
5655
+ readOnlyTools: WORKATO_READ_ONLY_TOOL_NAMES,
5656
+ destructiveTools: WORKATO_DESTRUCTIVE_TOOL_NAMES
5582
5657
  };
5583
5658
 
5584
5659
  // src/modules/index.ts
@@ -5881,6 +5956,8 @@ function normalizePositiveInt(value, fallback) {
5881
5956
  }
5882
5957
  // Annotate the CommonJS export names for ESM import in node:
5883
5958
  0 && (module.exports = {
5959
+ CORE_DESTRUCTIVE_TOOL_NAMES,
5960
+ CORE_READ_ONLY_TOOL_NAMES,
5884
5961
  CORE_TOOL_NAMES,
5885
5962
  CORE_TOOL_SCHEMAS,
5886
5963
  DEFAULT_MAX_OUTPUT_BYTES,
@@ -5891,10 +5968,13 @@ function normalizePositiveInt(value, fallback) {
5891
5968
  RAW_MAX_OUTPUT_BYTES,
5892
5969
  TOOL_NAMES,
5893
5970
  TOOL_SCHEMAS,
5971
+ WORKATO_DESTRUCTIVE_TOOL_NAMES,
5894
5972
  WORKATO_INSTRUCTIONS,
5895
5973
  WORKATO_MODULE,
5896
5974
  WORKATO_MODULE_ID,
5897
5975
  WORKATO_MODULE_TITLE,
5976
+ WORKATO_READ_ONLY_TOOL_NAMES,
5977
+ WORKATO_TAB_SHARED_TOOL_NAMES,
5898
5978
  WORKATO_TOOL_ALIASES,
5899
5979
  WORKATO_TOOL_NAMES,
5900
5980
  WORKATO_TOOL_SCHEMAS,
package/dist/index.mjs CHANGED
@@ -101,10 +101,32 @@ var CORE_TOOL_NAMES = {
101
101
  SWITCH_PROFILE: "chrome_switch_profile"
102
102
  }
103
103
  };
104
+ var CORE_READ_ONLY_TOOL_NAMES = [
105
+ "get_windows_and_tabs",
106
+ "chrome_list_profiles",
107
+ "chrome_bridge_info",
108
+ "chrome_history",
109
+ "chrome_bookmark_search",
110
+ "chrome_snapshot",
111
+ "chrome_snapshot_wait_for",
112
+ "chrome_read_page",
113
+ "chrome_search_page",
114
+ "chrome_find_elements",
115
+ "chrome_watch_list",
116
+ "chrome_watch_events",
117
+ "chrome_fn_list",
118
+ "chrome_fn_get",
119
+ "chrome_fn_runs",
120
+ "performance_analyze_insight"
121
+ ];
122
+ var CORE_DESTRUCTIVE_TOOL_NAMES = [
123
+ "chrome_close_tabs",
124
+ "chrome_bookmark_delete"
125
+ ];
104
126
  var CORE_TOOL_SCHEMAS = [
105
127
  {
106
128
  name: CORE_TOOL_NAMES.BROWSER.GET_WINDOWS_AND_TABS,
107
- description: 'Get all currently open browser windows and tabs. Pass filter to return only tabs whose URL or title contains the substring (e.g. filter:"workato") \u2014 strongly preferred when looking for a specific app tab, so unrelated personal tabs never enter the context.',
129
+ description: 'Get all currently open browser windows and tabs. Pass filter to return only tabs whose URL or title contains the substring (e.g. filter:"workato"): strongly preferred when looking for a specific app tab, so unrelated personal tabs never enter the context. Returns {windowCount, tabCount, windows: [{windowId, tabs: [{tabId, url, title, active}]}]}.',
108
130
  inputSchema: {
109
131
  type: "object",
110
132
  properties: {
@@ -568,7 +590,7 @@ Tip: If the returned elements do not include the specific element you need, use
568
590
  },
569
591
  {
570
592
  name: CORE_TOOL_NAMES.BROWSER.LEASE_TAB,
571
- description: "Get a tab of your own for parallel work: several agents sharing one MCP server and one Chrome profile must each lease a tab and pass the returned `lease` on every browser call, instead of relying on the active tab. Opens the tab in a separate, unfocused agents window. Screenshots that need a visible tab move a hidden agents-window tab to a window of its own by themselves; own_window:true (that window up front) is still the choice for chrome_computer mouse/keyboard input, which a hidden tab drops. The bridge turns `lease` into the right profile and tabId, never activates or focuses the tab, and while this MCP session holds any lease it REFUSES tab-targeting calls that carry neither `lease` nor tabId. Calls on the same tab run one at a time. Leases end with chrome_release_tab, when the tab is closed, or after 30 minutes unused. Returns {lease, tabId, windowId, profile}.",
593
+ description: "Get a tab of your own for parallel work: several agents sharing one Chrome profile (in one MCP session or in several) must each lease a tab and pass the returned `lease` on every browser call, instead of relying on the active tab. Opens the tab in a separate, unfocused agents window. Screenshots that need a visible tab move a hidden agents-window tab to a window of its own by themselves; own_window:true (that window up front) is still the choice for chrome_computer mouse/keyboard input, which a hidden tab drops. The bridge turns `lease` into the right profile and tabId, never activates or focuses the tab, and while this MCP session holds any lease it REFUSES tab-targeting calls that carry neither `lease` nor tabId. A leased tab is off limits to every other MCP session of this bridge: a call that names it without the lease is refused (TabLeased), and a Workato call that names no tab never picks it. Whoever passes the lease uses the tab. Calls that drive a page run one at a time per tab; read-only Workato calls overlap. Leases end with chrome_release_tab, when the tab is closed, or after 30 minutes unused. Returns {lease, tabId, windowId, profile}.",
572
594
  inputSchema: {
573
595
  type: "object",
574
596
  properties: {
@@ -1837,7 +1859,7 @@ Tip: If the returned elements do not include the specific element you need, use
1837
1859
  },
1838
1860
  {
1839
1861
  name: CORE_TOOL_NAMES.BRIDGE.LIST_PROFILES,
1840
- description: 'List all currently active/connected Chrome profiles (e.g. "prod", "staging", "dev") and see which one is selected for this MCP session, if any. Also returns session_context: the profile, tab, host, workspace and environment this session is pinned to (null when nothing is pinned, in which case calls follow the bridge default profile).',
1862
+ description: `List all currently active/connected Chrome profiles (e.g. "prod", "staging", "dev") and see which one is selected for this MCP session, if any. Also returns session_context: the profile, tab, host, workspace and environment this session is pinned to (null when nothing is pinned, in which case calls follow the bridge default profile). Returns {active_profile, session_profile, session_tab_id, session_context, server_default_profile, connected_profiles, leases, routing_note}. leases holds this session's leases with their token, and the tabs other sessions leased without one (other_session: true): tabs to stay away from.`,
1841
1863
  inputSchema: {
1842
1864
  type: "object",
1843
1865
  properties: {},
@@ -2907,7 +2929,7 @@ Use workato_pull_recipe when the step is already known, and workato_recipe_step_
2907
2929
  },
2908
2930
  {
2909
2931
  name: WORKATO_TOOL_NAMES.WORKATO.LIST_FOLDERS,
2910
- description: "List the full Workato project/folder tree (GET /folders?projects_mode=true). Top-level entries are project root folders: their `id` is the folder id to use as parent_id (create/move folder) or folder_id (move recipe), and `project_id` is the owning project's id. Each node reports flow_count/active_flow_count (recipes) plus non-zero asset counts under `counts`, and nested `children`. Slim by default; totals holds account-wide asset counters. THE tool to call before creating/moving folders or recipes: it is the source of folder ids. Read-only. Requires an open Workato tab.",
2932
+ description: "List the full Workato project/folder tree (GET /folders?projects_mode=true). Top-level entries are project root folders: their `id` is the folder id to use as parent_id (create/move folder) or folder_id (move recipe), and `project_id` is the owning project's id. Each node reports flow_count/active_flow_count (recipes) plus non-zero asset counts under `counts`, and nested `children`. Slim by default; totals holds account-wide asset counters. THE tool to call before creating/moving folders or recipes: it is the source of folder ids. Returns {project_count, projects}. Read-only. Requires an open Workato tab.",
2911
2933
  inputSchema: {
2912
2934
  type: "object",
2913
2935
  properties: {
@@ -3388,7 +3410,7 @@ Use workato_pull_recipe when the step is already known, and workato_recipe_step_
3388
3410
  },
3389
3411
  {
3390
3412
  name: WORKATO_TOOL_NAMES.WORKATO.LIST_JOBS,
3391
- description: "List and SEARCH jobs for a Workato recipe. Auto-walks Workato's cursor pagination. Two searches, combinable: `query` is the SERVER one and matches a contiguous, case-insensitive substring of the job id or of a custom job-report column value ONLY (not the error text, not column labels, and never an erased job); `match` is a LOCAL scan of every job the walk sees, over id / title / error / report columns, as exact, substring or regex. Date range: started_from / started_to (ISO, or YYYY-MM-DD widened to the whole day) in `timezone` (default UTC); started_at takes only the fixed presets. Two budgets: `limit` caps matches RETURNED, `scan_budget` caps jobs SCANNED. Every response carries `coverage` (scanned, matched, erased_seen, window, complete, next_cursor, retention_boundary_reached) and a `summary` sentence: zero matches from an incomplete scan is NOT evidence of none, so resume with cursor=next_cursor. ERASED jobs (retention swept) stay listed with erased:true, title/report null and no error: unavailable, not empty. The walk stops after 3 consecutive erased jobs because that boundary is workspace-wide and everything older is erased too (stop_on_erased:false to keep going). Report columns come back with their configured labels, all of them, plus report_columns. `fields` projects the slim job. Requires an open Workato tab.",
3413
+ description: "List and SEARCH jobs for a Workato recipe. Auto-walks Workato's cursor pagination. Two searches, combinable: `query` is the SERVER one and matches a contiguous, case-insensitive substring of the job id or of a custom job-report column value ONLY (not the error text, not column labels, and never an erased job); `match` is a LOCAL scan of every job the walk sees, over id / title / error / report columns, as exact, substring or regex. Date range: started_from / started_to (ISO, or YYYY-MM-DD widened to the whole day) in `timezone` (default UTC); started_at takes only the fixed presets. Two budgets: `limit` caps matches RETURNED, `scan_budget` caps jobs SCANNED. Every response carries `coverage` (scanned, matched, erased_seen, window, complete, next_cursor, retention_boundary_reached) and a `summary` sentence: zero matches from an incomplete scan is NOT evidence of none, so resume with cursor=next_cursor. ERASED jobs (retention swept) stay listed with erased:true, title/report null and no error: unavailable, not empty. The walk stops after 3 consecutive erased jobs because that boundary is workspace-wide and everything older is erased too (stop_on_erased:false to keep going). Report columns come back with their configured labels, all of them, plus report_columns. `fields` projects the slim job. Returns {total, succeeded, failed, jobs, coverage, next_cursor, report_columns}. Requires an open Workato tab.",
3392
3414
  inputSchema: {
3393
3415
  type: "object",
3394
3416
  properties: {
@@ -4565,7 +4587,7 @@ connection_id must be a real connection id: an adapter name (logger, workato_pub
4565
4587
  },
4566
4588
  {
4567
4589
  name: WORKATO_TOOL_NAMES.WORKATO_LOOKUP.TABLES_LIST,
4568
- description: "List all Workato lookup tables visible to the signed-in user (GET /lookup_tables.json). Returns a slim shape: [{id, name, entry_count, updated_at}]. Requires an open logged-in Workato tab (uses the session pinned tab or first Workato app tab, never whatever tab is focused).",
4590
+ description: "List all Workato lookup tables visible to the signed-in user (GET /lookup_tables.json). Returns {headline, items: [{id, name, entry_count, updated_at}]}. Requires an open logged-in Workato tab (uses the session pinned tab or first Workato app tab, never whatever tab is focused).",
4569
4591
  inputSchema: {
4570
4592
  type: "object",
4571
4593
  properties: {
@@ -4822,7 +4844,7 @@ connection_id must be a real connection id: an adapter name (logger, workato_pub
4822
4844
  },
4823
4845
  {
4824
4846
  name: WORKATO_TOOL_NAMES.WORKATO_DATA_TABLE.TABLES_LIST,
4825
- description: "List Workato Data Tables in a project folder (GET /web_api/mixed_assets.json filtered to data-table assets). Data Tables are the newer relational store (distinct from the older Lookup Tables at /lookup_tables/). Returns a slim shape: [{id, name, folder_id, total_entries_count, updated_at}]. If folder_id is omitted, the tool falls back to the folder visible in the current Workato URL (best-effort). Prerequisite: the active tab must be a logged-in Workato page.",
4847
+ description: "List Workato Data Tables in a project folder (GET /web_api/mixed_assets.json filtered to data-table assets). Data Tables are the newer relational store (distinct from the older Lookup Tables at /lookup_tables/). Returns {tables: [{id, name, folder_id, total_entries_count, updated_at}], page, per_page, count, folder_id}. If folder_id is omitted, the tool falls back to the folder visible in the current Workato URL (best-effort). Prerequisite: the active tab must be a logged-in Workato page.",
4826
4848
  inputSchema: {
4827
4849
  type: "object",
4828
4850
  properties: {
@@ -5267,7 +5289,7 @@ connection_id must be a real connection id: an adapter name (logger, workato_pub
5267
5289
  },
5268
5290
  {
5269
5291
  name: WORKATO_TOOL_NAMES.WORKATO_LCAP.APPS_LIST,
5270
- description: "List the Workflow Apps (LCAP) in the current workspace: id, name, project_id, unique_id, live. Read-only. There is no endpoint that lists the PAGES in an app - page ids come from the builder URL (app.workato.com/lcap/pages/<id>) or the project's asset view. Requires an open Workato tab in the right workspace.",
5292
+ description: "List the Workflow Apps (LCAP) in the current workspace. Returns {app_count, apps: [{id, name, project_id, unique_id, live}]}. Read-only. There is no endpoint that lists the PAGES in an app - page ids come from the builder URL (app.workato.com/lcap/pages/<id>) or the project's asset view. Requires an open Workato tab in the right workspace.",
5271
5293
  inputSchema: {
5272
5294
  type: "object",
5273
5295
  properties: {
@@ -5520,6 +5542,52 @@ connection_id must be a real connection id: an adapter name (logger, workato_pub
5520
5542
  }
5521
5543
  ];
5522
5544
 
5545
+ // src/modules/workato/tool-kinds.ts
5546
+ var WORKATO_READ_ONLY_TOOL_NAMES = [
5547
+ "workato_whoami",
5548
+ "workato_session_context",
5549
+ "workato_pull_recipe",
5550
+ "workato_recipe_grep",
5551
+ "workato_recipe_status",
5552
+ "workato_recipe_version_diff",
5553
+ "workato_recipe_validate",
5554
+ "workato_recipe_callers",
5555
+ "workato_recipe_connections",
5556
+ "workato_recipe_step_search",
5557
+ "workato_job_trace",
5558
+ "workato_list_jobs",
5559
+ "workato_search_recipes",
5560
+ "workato_search_connections",
5561
+ "workato_get_connection",
5562
+ "workato_deployments_list",
5563
+ "workato_list_folders",
5564
+ "workato_adapter_meta",
5565
+ "workato_apps_list",
5566
+ "workato_pick_list",
5567
+ "workato_datapill",
5568
+ "workato_lookup_tables_list",
5569
+ "workato_lookup_table_get",
5570
+ "workato_lookup_table_row_search",
5571
+ "workato_data_tables_list",
5572
+ "workato_data_table_get",
5573
+ "workato_data_table_row_list",
5574
+ "workato_lcap_apps_list",
5575
+ "workato_lcap_page_get",
5576
+ "workato_ui_list_steps"
5577
+ ];
5578
+ var WORKATO_DESTRUCTIVE_TOOL_NAMES = [
5579
+ "workato_delete_recipe",
5580
+ "workato_delete_folder",
5581
+ "workato_lookup_table_delete",
5582
+ "workato_lookup_table_row_delete",
5583
+ "workato_data_table_delete",
5584
+ "workato_data_table_delete_column",
5585
+ "workato_data_table_row_delete",
5586
+ "workato_lcap_page_delete"
5587
+ ];
5588
+ var DOM_READERS = ["workato_ui_list_steps"];
5589
+ var WORKATO_TAB_SHARED_TOOL_NAMES = /* @__PURE__ */ WORKATO_READ_ONLY_TOOL_NAMES.filter((name) => !DOM_READERS.includes(name));
5590
+
5523
5591
  // src/modules/workato/index.ts
5524
5592
  var WORKATO_MODULE_ID = "workato";
5525
5593
  var WORKATO_MODULE_TITLE = "Workato";
@@ -5528,7 +5596,9 @@ var WORKATO_MODULE = {
5528
5596
  title: WORKATO_MODULE_TITLE,
5529
5597
  tools: WORKATO_TOOL_SCHEMAS,
5530
5598
  instructions: WORKATO_INSTRUCTIONS,
5531
- aliases: WORKATO_TOOL_ALIASES
5599
+ aliases: WORKATO_TOOL_ALIASES,
5600
+ readOnlyTools: WORKATO_READ_ONLY_TOOL_NAMES,
5601
+ destructiveTools: WORKATO_DESTRUCTIVE_TOOL_NAMES
5532
5602
  };
5533
5603
 
5534
5604
  // src/modules/index.ts
@@ -5830,6 +5900,8 @@ function normalizePositiveInt(value, fallback) {
5830
5900
  return Math.max(1, n);
5831
5901
  }
5832
5902
  export {
5903
+ CORE_DESTRUCTIVE_TOOL_NAMES,
5904
+ CORE_READ_ONLY_TOOL_NAMES,
5833
5905
  CORE_TOOL_NAMES,
5834
5906
  CORE_TOOL_SCHEMAS,
5835
5907
  DEFAULT_MAX_OUTPUT_BYTES,
@@ -5840,10 +5912,13 @@ export {
5840
5912
  RAW_MAX_OUTPUT_BYTES,
5841
5913
  TOOL_NAMES,
5842
5914
  TOOL_SCHEMAS,
5915
+ WORKATO_DESTRUCTIVE_TOOL_NAMES,
5843
5916
  WORKATO_INSTRUCTIONS,
5844
5917
  WORKATO_MODULE,
5845
5918
  WORKATO_MODULE_ID,
5846
5919
  WORKATO_MODULE_TITLE,
5920
+ WORKATO_READ_ONLY_TOOL_NAMES,
5921
+ WORKATO_TAB_SHARED_TOOL_NAMES,
5847
5922
  WORKATO_TOOL_ALIASES,
5848
5923
  WORKATO_TOOL_NAMES,
5849
5924
  WORKATO_TOOL_SCHEMAS,
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@mokuhub/mokutab-shared",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Tool schemas shared by the MokuTab bridge and Chrome extension",
5
5
  "author": "Roman Chikalenko <chikalenkor@gmail.com>",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "git+https://github.com/MokuHub/MokuTab.git",
9
+ "url": "git+https://github.com/MokuTeam/MokuTab.git",
10
10
  "directory": "packages/shared"
11
11
  },
12
- "homepage": "https://github.com/MokuHub/MokuTab#readme",
12
+ "homepage": "https://github.com/MokuTeam/MokuTab#readme",
13
13
  "bugs": {
14
- "url": "https://github.com/MokuHub/MokuTab/issues"
14
+ "url": "https://github.com/MokuTeam/MokuTab/issues"
15
15
  },
16
16
  "publishConfig": {
17
17
  "access": "public"