@minicor/mcp-server 2.0.7 → 3.0.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 (88) hide show
  1. package/README.md +29 -2
  2. package/dist/__tests__/helpers.test.js +50 -0
  3. package/dist/__tests__/helpers.test.js.map +1 -1
  4. package/dist/__tests__/state.test.d.ts +2 -0
  5. package/dist/__tests__/state.test.d.ts.map +1 -0
  6. package/dist/__tests__/state.test.js +90 -0
  7. package/dist/__tests__/state.test.js.map +1 -0
  8. package/dist/__tests__/vm-service-client.test.d.ts +2 -0
  9. package/dist/__tests__/vm-service-client.test.d.ts.map +1 -0
  10. package/dist/__tests__/vm-service-client.test.js +80 -0
  11. package/dist/__tests__/vm-service-client.test.js.map +1 -0
  12. package/dist/agent-service-client.d.ts +34 -0
  13. package/dist/agent-service-client.d.ts.map +1 -0
  14. package/dist/agent-service-client.js +64 -0
  15. package/dist/agent-service-client.js.map +1 -0
  16. package/dist/helpers.d.ts +2 -2
  17. package/dist/helpers.d.ts.map +1 -1
  18. package/dist/helpers.js +27 -7
  19. package/dist/helpers.js.map +1 -1
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +13 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/lds-client.d.ts +15 -0
  24. package/dist/lds-client.d.ts.map +1 -1
  25. package/dist/lds-client.js +11 -6
  26. package/dist/lds-client.js.map +1 -1
  27. package/dist/lib.d.ts +36 -0
  28. package/dist/lib.d.ts.map +1 -0
  29. package/dist/lib.js +79 -0
  30. package/dist/lib.js.map +1 -0
  31. package/dist/prompts/build-rpa.d.ts.map +1 -1
  32. package/dist/prompts/build-rpa.js +39 -5
  33. package/dist/prompts/build-rpa.js.map +1 -1
  34. package/dist/state.d.ts +10 -0
  35. package/dist/state.d.ts.map +1 -1
  36. package/dist/state.js +9 -0
  37. package/dist/state.js.map +1 -1
  38. package/dist/tools/{stats.d.ts → agents.d.ts} +1 -1
  39. package/dist/tools/agents.d.ts.map +1 -0
  40. package/dist/tools/agents.js +78 -0
  41. package/dist/tools/agents.js.map +1 -0
  42. package/dist/tools/issues.d.ts.map +1 -1
  43. package/dist/tools/issues.js +12 -9
  44. package/dist/tools/issues.js.map +1 -1
  45. package/dist/tools/vm-rpa.d.ts.map +1 -1
  46. package/dist/tools/vm-rpa.js +71 -30
  47. package/dist/tools/vm-rpa.js.map +1 -1
  48. package/dist/tools/vm.d.ts.map +1 -1
  49. package/dist/tools/vm.js +81 -12
  50. package/dist/tools/vm.js.map +1 -1
  51. package/dist/types.d.ts +3 -0
  52. package/dist/types.d.ts.map +1 -1
  53. package/dist/vm-service-client.d.ts +24 -0
  54. package/dist/vm-service-client.d.ts.map +1 -0
  55. package/dist/vm-service-client.js +23 -0
  56. package/dist/vm-service-client.js.map +1 -0
  57. package/package.json +7 -3
  58. package/dist/browser-client.d.ts +0 -42
  59. package/dist/browser-client.d.ts.map +0 -1
  60. package/dist/browser-client.js +0 -66
  61. package/dist/browser-client.js.map +0 -1
  62. package/dist/prompts/build-browser-rpa.d.ts +0 -3
  63. package/dist/prompts/build-browser-rpa.d.ts.map +0 -1
  64. package/dist/prompts/build-browser-rpa.js +0 -90
  65. package/dist/prompts/build-browser-rpa.js.map +0 -1
  66. package/dist/prompts/build-nerve-rpa.d.ts +0 -3
  67. package/dist/prompts/build-nerve-rpa.d.ts.map +0 -1
  68. package/dist/prompts/build-nerve-rpa.js +0 -148
  69. package/dist/prompts/build-nerve-rpa.js.map +0 -1
  70. package/dist/services.d.ts +0 -61
  71. package/dist/services.d.ts.map +0 -1
  72. package/dist/services.js +0 -249
  73. package/dist/services.js.map +0 -1
  74. package/dist/tools/browser.d.ts +0 -3
  75. package/dist/tools/browser.d.ts.map +0 -1
  76. package/dist/tools/browser.js +0 -254
  77. package/dist/tools/browser.js.map +0 -1
  78. package/dist/tools/cron.d.ts +0 -3
  79. package/dist/tools/cron.d.ts.map +0 -1
  80. package/dist/tools/cron.js +0 -168
  81. package/dist/tools/cron.js.map +0 -1
  82. package/dist/tools/elasticsearch.d.ts +0 -3
  83. package/dist/tools/elasticsearch.d.ts.map +0 -1
  84. package/dist/tools/elasticsearch.js +0 -248
  85. package/dist/tools/elasticsearch.js.map +0 -1
  86. package/dist/tools/stats.d.ts.map +0 -1
  87. package/dist/tools/stats.js +0 -18
  88. package/dist/tools/stats.js.map +0 -1
@@ -1,90 +0,0 @@
1
- import { z } from "zod";
2
- export function register({ server }) {
3
- server.prompt("build-browser-rpa-workflow", "Iteratively build a browser-based RPA workflow using the Laminar Browser RPA service. Guides you through creating a browser session, performing actions, extracting data, and saving each step as a Laminar workflow flow.", {
4
- workspaceId: z.string().describe("Laminar workspace ID"),
5
- task: z
6
- .string()
7
- .describe("Description of what to automate (e.g. 'Log into athenaHealth, navigate to patient chart, extract insurance info')"),
8
- targetUrl: z
9
- .string()
10
- .describe("Starting URL for the web application"),
11
- workflowId: z
12
- .string()
13
- .optional()
14
- .describe("Existing workflow ID to add steps to (omit to create a new workflow)"),
15
- }, async ({ workspaceId, task, targetUrl, workflowId }) => ({
16
- messages: [
17
- {
18
- role: "user",
19
- content: {
20
- type: "text",
21
- text: `You are building a browser-based RPA workflow on the Laminar platform. Your goal is to automate web application interactions using the Browser RPA session API.
22
-
23
- ## Task
24
- ${task}
25
-
26
- ## Target URL
27
- ${targetUrl}
28
-
29
- ## Workspace
30
- ID: ${workspaceId}${workflowId ? `\nExisting workflow ID: ${workflowId} (add steps to this workflow)` : "\nCreate a new workflow for this automation."}
31
-
32
- ## How Browser RPA Works
33
-
34
- The Browser RPA service provides a session-based API:
35
- 1. **Create Session** — starts a browser instance, returns a sessionId
36
- 2. **Act** — sends natural-language actions (e.g. "click the login button", "type hello@example.com in the email field")
37
- 3. **Extract** — extracts data from the current page via natural-language instructions
38
- 4. **Screenshot** — captures the current browser state
39
- 5. **Close Session** — cleans up
40
-
41
- ## Procedure
42
-
43
- ### 1. Connect to Browser RPA Service
44
- Call \`browser_connect\` with the service base URL and bearer token. Ask the user if not known.
45
-
46
- ### 2. Create a Browser Session
47
- Call \`browser_create_session\` to get a sessionId.
48
-
49
- ### 3. Iterative Build Loop — For EACH step:
50
-
51
- **a. ACT — Perform the browser action**
52
- - Call \`browser_act\` with a natural-language description of what to do
53
- - Be specific: "navigate to ${targetUrl}", "click the Submit button", "type 'john@example.com' into the email input field"
54
-
55
- **b. VERIFY — Confirm the action worked**
56
- - Call \`browser_screenshot\` to see the current state
57
- - If the action didn't produce the expected result, retry with a more specific instruction
58
-
59
- **c. EXTRACT — Get data if needed**
60
- - Call \`browser_extract\` with instructions like "extract the patient name and date of birth"
61
- - This returns structured data from the page
62
-
63
- **d. SAVE — Persist as a workflow step**
64
- - Call \`create_browser_rpa_flow\` with the action type and payload
65
- - For the first step, use actionType "create_session"
66
- - For navigation/interaction steps, use actionType "act"
67
- - For data extraction steps, use actionType "extract"
68
- - For cleanup, use actionType "close_session"
69
-
70
- ### 4. End-to-End Validation
71
- - Run the full workflow via \`execute_workflow\`
72
- - Verify the final state
73
-
74
- ### 5. Iterate with the User
75
- - Present the completed workflow
76
- - Make adjustments as needed
77
-
78
- ## Important Rules
79
- - **Always verify actions with screenshots** before saving
80
- - **Use \`create_browser_rpa_flow\`** to save steps — it generates the correct \`lam.httpRequest\` wrapper
81
- - **Use \`{{config.variables}}\`** for credentials (bearerToken, baseUrl, etc.)
82
- - **Be specific in actions** — natural language should be unambiguous
83
- - **Handle 2FA/MFA** — if login requires verification codes, use waitForInput patterns
84
- - **One action per step** — keep steps focused and debuggable`,
85
- },
86
- },
87
- ],
88
- }));
89
- }
90
- //# sourceMappingURL=build-browser-rpa.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-browser-rpa.js","sourceRoot":"","sources":["../../src/prompts/build-browser-rpa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,QAAQ,CAAC,EAAE,MAAM,EAAY;IAC3C,MAAM,CAAC,MAAM,CACX,4BAA4B,EAC5B,4NAA4N,EAC5N;QACE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QACxD,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,CACP,mHAAmH,CACpH;QACH,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,QAAQ,CAAC,sCAAsC,CAAC;QACnD,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,sEAAsE,CAAC;KACpF,EACD,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QACvD,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE;;;EAGhB,IAAI;;;EAGJ,SAAS;;;MAGL,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,2BAA2B,UAAU,+BAA+B,CAAC,CAAC,CAAC,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;8BAuBxH,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8DA+BuB;iBACnD;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { ToolDeps } from "../types.js";
2
- export declare function register({ server }: ToolDeps): void;
3
- //# sourceMappingURL=build-nerve-rpa.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-nerve-rpa.d.ts","sourceRoot":"","sources":["../../src/prompts/build-nerve-rpa.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,QAAQ,QAsJ5C"}
@@ -1,148 +0,0 @@
1
- import { z } from "zod";
2
- export function register({ server }) {
3
- server.prompt("build-nerve-rpa-workflow", "Build an RPA workflow using NERVE's atomic operations: annotated screenshots, element clicking/typing, CDP browser control, OCR, and self-healing. Optimized for NERVE (not legacy LDS).", {
4
- workspaceId: z.string().describe("Laminar workspace ID"),
5
- task: z.string().describe("What to automate"),
6
- appName: z.string().describe("Target application name"),
7
- workflowId: z.string().optional().describe("Existing workflow ID to add steps to"),
8
- }, async ({ workspaceId, task, appName, workflowId }) => ({
9
- messages: [
10
- {
11
- role: "user",
12
- content: {
13
- type: "text",
14
- text: `You are building an RPA workflow using NERVE on the Laminar platform. NERVE gives you direct atomic control over the Windows desktop — you do NOT need to write Python scripts for simple interactions.
15
-
16
- ## Task
17
- ${task}
18
-
19
- ## Target Application
20
- ${appName}
21
-
22
- ## Workspace
23
- ID: ${workspaceId}${workflowId ? `\nExisting workflow ID: ${workflowId}` : "\nCreate a new workflow for this automation."}
24
-
25
- ## How NERVE Works
26
-
27
- NERVE runs on the VM and exposes the full OS via HTTP APIs. When you call \`vm_connect\`, check the \`capabilities\` array in the response to see what's available.
28
-
29
- Key capabilities:
30
- - \`annotated_screenshots\` — X-Ray Vision: screenshot with numbered element overlays
31
- - \`ui_tree_cache\` — Persistent accessibility tree
32
- - \`atomic_input\` — Click/type/invoke by element ID
33
- - \`script_execution\` — Run Python scripts
34
- - \`cdp\` — Chrome DevTools Protocol for browser control
35
- - \`ocr\` / \`template_matching\` — For Citrix/pixel-based apps
36
- - \`self_healing\` — Pause on error + intervention
37
-
38
- ## Step 1: Connect and Survey
39
-
40
- 1. \`vm_connect\` — connect to the VM
41
- 2. Check \`capabilities\` in the response
42
- 3. \`vm_annotated_screenshot\` — see the desktop with numbered elements
43
- 4. \`vm_system_info\` — get OS, RAM, CPU info
44
- 5. \`vm_processes\` — see what's running
45
-
46
- ## Step 2: Understand the UI
47
-
48
- Use the annotated screenshot to understand the screen. Each interactive element has a number:
49
- \`\`\`
50
- [1] Username field (Edit)
51
- [2] Password field (Edit)
52
- [3] OK button (Button)
53
- [4] Cancel button (Button)
54
- \`\`\`
55
-
56
- For deeper inspection:
57
- - \`vm_inspect_ui\` mode \`element_tree\` — full accessibility tree
58
- - \`vm_inspect_ui\` mode \`element_at_point\` — inspect specific coordinates
59
-
60
- ## Step 3: Interact with Atomic Operations
61
-
62
- **DO NOT write Python scripts for simple click/type operations.** Use atomic tools:
63
-
64
- - \`vm_click_element\` {element_id: 3} — click element #3 from annotated screenshot
65
- - \`vm_type_into_element\` {element_id: 1, text: "admin"} — type into element #1
66
- - \`vm_set_value\` {element_id: 2, value: "password"} — set value directly
67
- - \`vm_invoke_element\` {element_id: 3} — invoke button via accessibility pattern
68
- - \`vm_shell\` {command: "Start-Process notepad"} — run commands
69
-
70
- After each action, take another \`vm_annotated_screenshot\` to verify it worked.
71
-
72
- ## Step 4: For Web Apps — Use CDP
73
-
74
- If the target is a browser or Electron app:
75
-
76
- 1. \`cdp_connect\` — connect to Chrome/Edge DevTools
77
- 2. \`cdp_dom\` — get the full DOM tree
78
- 3. \`cdp_query\` {selector: "#username"} — find elements by CSS
79
- 4. \`cdp_click\` {selector: "#login-btn"} — click via DOM
80
- 5. \`cdp_type\` {selector: "#email", text: "user@example.com"} — type via DOM
81
- 6. \`cdp_js\` — execute arbitrary JavaScript
82
- 7. \`cdp_network\` — see API calls the app makes
83
-
84
- CDP is MORE RELIABLE than screen-based automation for web apps.
85
-
86
- ## Step 5: For Citrix / Legacy Apps — Use OCR + Template Matching
87
-
88
- When there's no accessibility tree (Citrix, RDP, custom-rendered apps):
89
-
90
- 1. \`vm_ocr\` {x, y, width, height} — read text from a screen region
91
- 2. \`vm_template_match\` {template_b64: "..."} — find a visual element
92
- 3. \`vm_wait_for_text\` {text: "Login", region: {...}} — wait for text to appear
93
- 4. \`vm_wait_for_change\` {region: {...}} — wait for visual change (replaces sleep)
94
- 5. \`vm_region_ocr\` {regions: [...]} — batch OCR multiple fields
95
- 6. Click by coordinates from template match results
96
-
97
- ## Step 6: Build Production Scripts
98
-
99
- Once you understand the UI and have tested atomic operations, consolidate into Python scripts for production:
100
-
101
- 1. Write a Python script that performs the full sequence
102
- 2. Test with \`debug_rpa_step\` — returns before/after screenshots + timeline
103
- 3. Save with \`create_rpa_flow\` — wraps Python in Laminar workflow format
104
-
105
- ## Step 7: Self-Healing Pattern
106
-
107
- For robust automations, enable self-healing:
108
-
109
- 1. Execute with \`on_error: "pause"\` — script pauses at failure instead of crashing
110
- 2. \`vm_failure_context\` — get screenshot, UI tree, error details at failure point
111
- 3. \`vm_annotated_screenshot\` — see current screen state
112
- 4. Fix with atomic operations (\`vm_click_element\`, etc.)
113
- 5. Resume execution
114
-
115
- ## Step 8: End-to-End Validation
116
-
117
- 1. \`execute_workflow\` to run the full sequence
118
- 2. \`vm_annotated_screenshot\` to verify final state
119
- 3. \`vm_execution_timeline\` to review frame-by-frame what happened
120
- 4. \`diagnose_execution\` if anything fails
121
-
122
- ## Data Extraction Priority
123
-
124
- When you need to READ data from the screen:
125
-
126
- 1. **Accessibility tree** — \`vm_inspect_ui\` with \`element_tree\` (most reliable)
127
- 2. **Focused element** — Tab through fields, read via \`vm_inspect_ui\` \`focused_element\`
128
- 3. **Clipboard** — Click field, Ctrl+A, Ctrl+C, then \`vm_read_clipboard\`
129
- 4. **OCR** — \`vm_ocr\` on a specific region
130
- 5. **CDP extraction** — \`cdp_js\` to read DOM values (for web apps)
131
- 6. **Region screenshot** — \`vm_screenshot\` of a specific area (last resort)
132
-
133
- ## Key Rules
134
-
135
- - **Annotated screenshots FIRST** — always start by seeing the screen with element IDs
136
- - **Atomic ops for exploration** — use click/type tools to test, scripts for production
137
- - **Verify after every action** — take another annotated screenshot
138
- - **Never hardcode coordinates** — use element IDs or accessibility patterns
139
- - **Use wait_for_text/wait_for_change** — never use time.sleep() for synchronization
140
- - **Use \`create_rpa_flow\`** to save steps — never construct JS wrappers manually
141
- - **Use \`{{config.variables}}\`** for secrets — never hardcode credentials
142
- `,
143
- },
144
- },
145
- ],
146
- }));
147
- }
148
- //# sourceMappingURL=build-nerve-rpa.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-nerve-rpa.js","sourceRoot":"","sources":["../../src/prompts/build-nerve-rpa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,QAAQ,CAAC,EAAE,MAAM,EAAY;IAC3C,MAAM,CAAC,MAAM,CACX,0BAA0B,EAC1B,0LAA0L,EAC1L;QACE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QACxD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QAC7C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;QACvD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;KACnF,EACD,KAAK,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QACrD,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE;;;EAGhB,IAAI;;;EAGJ,OAAO;;;MAGH,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,2BAA2B,UAAU,EAAE,CAAC,CAAC,CAAC,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuHxH;iBACU;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,61 +0,0 @@
1
- /**
2
- * Optional service clients: Elasticsearch + CRON.
3
- * Only instantiated when configured — otherwise tools degrade gracefully.
4
- */
5
- import type { ElasticsearchConfig, CronConfig } from "./config.js";
6
- export interface ESSearchParams {
7
- workspaceId: string;
8
- workflowId?: string;
9
- workflowIds?: string[];
10
- query?: string;
11
- startDate?: string;
12
- endDate?: string;
13
- status?: string;
14
- includeGlobalObject?: boolean;
15
- rawQuery?: string;
16
- fuzzy?: boolean;
17
- size?: number;
18
- from?: number;
19
- }
20
- export declare class ElasticsearchService {
21
- private endpoint;
22
- private apiKey;
23
- private indexName;
24
- constructor(config: ElasticsearchConfig);
25
- private esRequest;
26
- search(params: ESSearchParams): Promise<{
27
- warning?: string | undefined;
28
- hits: any;
29
- total: any;
30
- took: any;
31
- }>;
32
- private formatResults;
33
- }
34
- export declare class CronService {
35
- private apiBase;
36
- private apiKey;
37
- constructor(config: CronConfig);
38
- private request;
39
- listJobs(workflowId?: string): Promise<any[]>;
40
- getJob(jobId: string): Promise<any>;
41
- createJob(job: {
42
- name: string;
43
- schedule: string;
44
- url: string;
45
- body?: Record<string, any>;
46
- enabled?: boolean;
47
- max_runs?: number | null;
48
- is_temporary?: boolean;
49
- }): Promise<any>;
50
- updateJob(jobId: string, updates: {
51
- name?: string;
52
- schedule?: string;
53
- url?: string;
54
- body?: Record<string, any>;
55
- enabled?: boolean;
56
- }): Promise<any>;
57
- toggleJob(jobId: string): Promise<any>;
58
- deleteJob(jobId: string): Promise<void>;
59
- triggerJob(jobId: string): Promise<void>;
60
- }
61
- //# sourceMappingURL=services.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../src/services.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAOnE,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,C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AAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;IAUG,SAAS,CAAC,KAAK,EAAE,MAAM;IAKvB,SAAS,CAAC,KAAK,EAAE,MAAM;IAIvB,UAAU,CAAC,KAAK,EAAE,MAAM;CAG/B"}
package/dist/services.js DELETED
@@ -1,249 +0,0 @@
1
- /**
2
- * Optional service clients: Elasticsearch + CRON.
3
- * Only instantiated when configured — otherwise tools degrade gracefully.
4
- */
5
- const DEFAULT_ES_INDEX = "search-workflow-executions";
6
- const DEFAULT_CRON_BASE = "https://cron.laminar.run";
7
- export class ElasticsearchService {
8
- endpoint;
9
- apiKey;
10
- indexName;
11
- constructor(config) {
12
- this.endpoint = config.endpoint.replace(/\/$/, "");
13
- this.apiKey = config.apiKey;
14
- this.indexName = config.indexName || DEFAULT_ES_INDEX;
15
- }
16
- async esRequest(body) {
17
- const res = await fetch(`${this.endpoint}/${this.indexName}/_search`, {
18
- method: "POST",
19
- headers: {
20
- "Content-Type": "application/json",
21
- Authorization: `ApiKey ${this.apiKey}`,
22
- },
23
- body: JSON.stringify(body),
24
- });
25
- if (!res.ok) {
26
- const err = await res.text().catch(() => "");
27
- throw new Error(`Elasticsearch (${res.status}): ${err}`);
28
- }
29
- return res.json();
30
- }
31
- async search(params) {
32
- const { workspaceId, workflowId, workflowIds, query, startDate, endDate, status, includeGlobalObject = false, rawQuery, fuzzy = false, size = 20, from = 0, } = params;
33
- let searchBody;
34
- if (rawQuery) {
35
- const parsed = JSON.parse(rawQuery);
36
- if (!parsed.query)
37
- parsed.query = { bool: { must: [] } };
38
- if (!parsed.query.bool)
39
- parsed.query = { bool: { must: [parsed.query] } };
40
- if (!parsed.query.bool.must)
41
- parsed.query.bool.must = [];
42
- if (!JSON.stringify(parsed).includes(`"workspaceId":"${workspaceId}"`)) {
43
- parsed.query.bool.must.push({ term: { workspaceId } });
44
- }
45
- searchBody = { ...parsed, size, from };
46
- }
47
- else {
48
- const esQuery = {
49
- bool: { must: [{ term: { workspaceId } }], filter: [] },
50
- };
51
- if (workflowId) {
52
- esQuery.bool.must.push({ term: { workflowId } });
53
- }
54
- else if (workflowIds?.length) {
55
- esQuery.bool.must.push({ terms: { workflowId: workflowIds } });
56
- }
57
- if (status)
58
- esQuery.bool.must.push({ term: { status } });
59
- if (startDate || endDate) {
60
- const range = {};
61
- if (startDate)
62
- range.gte = startDate;
63
- if (endDate)
64
- range.lte = endDate;
65
- esQuery.bool.filter.push({ range: { startedAt: range } });
66
- }
67
- if (query?.trim()) {
68
- const q = query.trim();
69
- const nested = {
70
- nested: {
71
- path: "flows",
72
- query: {
73
- multi_match: {
74
- query: q,
75
- fields: [
76
- "flows.log^4",
77
- "flows.response^3",
78
- "flows.program^2",
79
- "flows.transformation^2",
80
- "flows.flowName^3",
81
- ],
82
- type: "best_fields",
83
- operator: fuzzy ? "OR" : "AND",
84
- ...(fuzzy ? { fuzziness: "AUTO" } : {}),
85
- },
86
- },
87
- inner_hits: {
88
- size: 10,
89
- highlight: {
90
- fields: {
91
- "flows.log": { fragment_size: 300, number_of_fragments: 3 },
92
- "flows.response": {
93
- fragment_size: 200,
94
- number_of_fragments: 2,
95
- },
96
- "flows.program": {
97
- fragment_size: 150,
98
- number_of_fragments: 1,
99
- },
100
- "flows.transformation": {
101
- fragment_size: 150,
102
- number_of_fragments: 1,
103
- },
104
- },
105
- pre_tags: [">>"],
106
- post_tags: ["<<"],
107
- },
108
- },
109
- },
110
- };
111
- if (includeGlobalObject) {
112
- esQuery.bool.must.push({
113
- bool: {
114
- should: [
115
- nested,
116
- {
117
- match: {
118
- globalJson: {
119
- query: q,
120
- operator: fuzzy ? "OR" : "AND",
121
- ...(fuzzy ? { fuzziness: "AUTO" } : {}),
122
- boost: 1,
123
- },
124
- },
125
- },
126
- ],
127
- minimum_should_match: 1,
128
- },
129
- });
130
- }
131
- else {
132
- esQuery.bool.must.push(nested);
133
- }
134
- }
135
- searchBody = {
136
- query: esQuery,
137
- sort: ["_score", { startedAt: { order: "desc" } }],
138
- size,
139
- from,
140
- };
141
- }
142
- const data = await this.esRequest(searchBody);
143
- // Retry without highlighting on shard failures
144
- if (data._shards?.failed > 0 &&
145
- !data.hits?.hits?.length &&
146
- (data.hits?.total?.value || 0) > 0) {
147
- try {
148
- const retry = await this.esRequest({
149
- ...searchBody,
150
- highlight: undefined,
151
- });
152
- if (retry.hits?.hits?.length) {
153
- return this.formatResults(retry, true);
154
- }
155
- }
156
- catch { }
157
- }
158
- return this.formatResults(data, false);
159
- }
160
- formatResults(data, noHighlight) {
161
- return {
162
- hits: (data.hits?.hits || []).map((hit) => ({
163
- id: hit._id,
164
- score: hit._score,
165
- workflowId: hit._source?.workflowId,
166
- workflowName: hit._source?.workflowName,
167
- executionId: hit._source?.executionId,
168
- status: hit._source?.status,
169
- startedAt: hit._source?.startedAt,
170
- endedAt: hit._source?.endedAt,
171
- highlight: hit.highlight || {},
172
- inner_hits: hit.inner_hits || {},
173
- })),
174
- total: data.hits?.total?.value || data.hits?.total || 0,
175
- took: data.took,
176
- ...(noHighlight && {
177
- warning: "Results loaded without highlighting due to large fields",
178
- }),
179
- ...(data._shards?.failed > 0 &&
180
- !noHighlight && {
181
- warning: "Some results may be missing due to large field values",
182
- }),
183
- };
184
- }
185
- }
186
- // ── CRON ──────────────────────────────────────────────────────
187
- export class CronService {
188
- apiBase;
189
- apiKey;
190
- constructor(config) {
191
- this.apiBase = (config.apiBase || DEFAULT_CRON_BASE).replace(/\/$/, "");
192
- this.apiKey = config.apiKey;
193
- }
194
- async request(method, endpoint, data) {
195
- const res = await fetch(`${this.apiBase}/${endpoint}`, {
196
- method,
197
- headers: {
198
- "Content-Type": "application/json",
199
- "X-API-Key": this.apiKey,
200
- },
201
- body: data ? JSON.stringify(data) : undefined,
202
- });
203
- if (!res.ok) {
204
- const errText = await res.text().catch(() => "");
205
- let msg;
206
- try {
207
- msg = JSON.parse(errText).error || errText;
208
- }
209
- catch {
210
- msg = errText;
211
- }
212
- throw new Error(msg || `CRON API ${method} ${endpoint} failed (${res.status})`);
213
- }
214
- if (method === "DELETE")
215
- return true;
216
- return res.json();
217
- }
218
- async listJobs(workflowId) {
219
- if (workflowId) {
220
- const d = await this.request("GET", `api/workflows/${workflowId}/jobs`);
221
- return d.jobs || [];
222
- }
223
- const d = await this.request("GET", "api/jobs");
224
- return d.jobs || [];
225
- }
226
- async getJob(jobId) {
227
- const d = await this.request("GET", `api/jobs/${jobId}`);
228
- return d.job;
229
- }
230
- async createJob(job) {
231
- const d = await this.request("POST", "api/jobs", job);
232
- return this.getJob(d.job_id);
233
- }
234
- async updateJob(jobId, updates) {
235
- const d = await this.request("PUT", `api/jobs/${jobId}`, updates);
236
- return d.job;
237
- }
238
- async toggleJob(jobId) {
239
- const cur = await this.getJob(jobId);
240
- return this.updateJob(jobId, { enabled: !cur.enabled });
241
- }
242
- async deleteJob(jobId) {
243
- await this.request("DELETE", `api/jobs/${jobId}`);
244
- }
245
- async triggerJob(jobId) {
246
- await this.request("POST", `api/jobs/${jobId}/trigger`);
247
- }
248
- }
249
- //# sourceMappingURL=services.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"services.js","sourceRoot":"","sources":["../src/services.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,gBAAgB,GAAG,4BAA4B,CAAC;AACtD,MAAM,iBAAiB,GAAG,0BAA0B,CAAC;AAmBrD,MAAM,OAAO,oBAAoB;IACvB,QAAQ,CAAS;IACjB,MAAM,CAAS;IACf,SAAS,CAAS;IAE1B,YAAY,MAA2B;QACrC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,gBAAgB,CAAC;IACxD,CAAC;IAEO,KAAK,CAAC,SAAS,CAA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,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,KAAa;QAC3B,MAAM,IAAI,CAAC,OAAO,CAAO,QAAQ,EAAE,YAAY,KAAK,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,KAAa;QAC5B,MAAM,IAAI,CAAC,OAAO,CAAO,MAAM,EAAE,YAAY,KAAK,UAAU,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -1,3 +0,0 @@
1
- import type { ToolDeps } from "../types.js";
2
- export declare function register(deps: ToolDeps): void;
3
- //# sourceMappingURL=browser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/tools/browser.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAiC5C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,QAyRtC"}