@lossrunguru/mcp 0.2.0 → 0.3.1
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/README.md +61 -42
- package/dist/core/errors.js +1 -1
- package/dist/core/errors.js.map +1 -1
- package/dist/core/remote-file.js +104 -0
- package/dist/core/remote-file.js.map +1 -0
- package/dist/core/tools/extract.js +96 -26
- package/dist/core/tools/extract.js.map +1 -1
- package/dist/core/tools/get-claims.js +1 -1
- package/dist/core/tools/get-claims.js.map +1 -1
- package/dist/core/tools/index.js +2 -4
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/unlock.js +1 -1
- package/dist/core/tools/unlock.js.map +1 -1
- package/dist/core/version.js +1 -1
- package/package.json +17 -5
package/README.md
CHANGED
|
@@ -1,23 +1,44 @@
|
|
|
1
1
|
# LossRunGuru MCP server
|
|
2
2
|
|
|
3
|
-
Extract claims from insurance loss runs in your AI assistant. This [
|
|
3
|
+
Extract claims from insurance loss runs in your AI assistant. This [Model Context Protocol](https://modelcontextprotocol.io) server connects Claude, ChatGPT, Claude Code, Cursor, VS Code and other MCP clients to [LossRunGuru](https://lossrunguru.com).
|
|
4
|
+
|
|
5
|
+
Add a PDF, PNG or JPEG loss run (up to 25 MB). LossRunGuru extracts every claim and shows you the claim count and the price before anything is charged. Once you approve, you get the claims back as JSON or CSV (or an Excel file with the local server).
|
|
4
6
|
|
|
5
7
|
Ask your assistant things like:
|
|
6
8
|
|
|
7
|
-
- "
|
|
9
|
+
- "Use LossRunGuru to extract the claims from this loss run. Tell me the claim count and price first and wait for my go-ahead."
|
|
8
10
|
- "How many LossRunGuru credits do I have left?"
|
|
9
|
-
- "Show my last five LossRunGuru extractions."
|
|
11
|
+
- "Show my last five LossRunGuru extractions and the claims from the latest one."
|
|
12
|
+
|
|
13
|
+
> **You need a paid account.** The connector works with a LossRunGuru account that has bought a credit pack. Free credits can't be used through the API or this server.
|
|
14
|
+
>
|
|
15
|
+
> **Unlocking results spends credits.** A loss run is priced by the claims found in it: 1 paid credit per 5 claims, rounded up. `extract_loss_run` never charges. It extracts the document and leaves the result locked, showing the claim count and price. Only `unlock_result` spends credits, and because it's a separate tool, your AI app asks you to approve the paid step on its own.
|
|
16
|
+
|
|
17
|
+
## Ways to connect
|
|
18
|
+
|
|
19
|
+
| You use | How it connects | Sign-in |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Claude (claude.ai, Desktop, mobile) | Hosted server | Sign in to LossRunGuru and approve |
|
|
22
|
+
| ChatGPT | Hosted server | Sign in to LossRunGuru and approve |
|
|
23
|
+
| Claude Code, Cursor, VS Code, other MCP clients | Local server with `npx` | API key |
|
|
24
|
+
|
|
25
|
+
**Hosted or local?** The hosted server runs on lossrunguru.com, so there's nothing to install and no API key: you sign in and approve. It can't read files on your computer, so you attach the loss run (ChatGPT) or upload it through a link (Claude), and claims come back in the conversation as JSON or CSV. The local server runs on your computer with your API key. It reads loss runs straight from disk and can save the claims to a CSV, JSON or Excel file.
|
|
26
|
+
|
|
27
|
+
### Claude (claude.ai, Claude Desktop, mobile)
|
|
28
|
+
|
|
29
|
+
Open **Customize**, then **Connectors**, choose **Add custom connector**, and enter:
|
|
10
30
|
|
|
11
|
-
|
|
31
|
+
```text
|
|
32
|
+
https://lossrunguru.com/v1/mcp
|
|
33
|
+
```
|
|
12
34
|
|
|
13
|
-
|
|
35
|
+
Sign in to LossRunGuru when asked and approve the connection on the consent page. Custom connector availability depends on your Claude plan.
|
|
14
36
|
|
|
15
|
-
|
|
16
|
-
- **Node.js 22 or later** ([download](https://nodejs.org)). Check with `node --version`.
|
|
37
|
+
Claude can't pass files from the chat to a hosted connector. When you ask it to extract a loss run, it gives you an upload link (valid for an hour, sign-in required). Open the link, upload the loss run, then tell Claude it's done.
|
|
17
38
|
|
|
18
|
-
|
|
39
|
+
### ChatGPT
|
|
19
40
|
|
|
20
|
-
|
|
41
|
+
Add the server URL above as an app in ChatGPT (developer mode; menu names change, so see OpenAI's help for the current steps), and approve the connection on LossRunGuru. Then attach a loss run to your message, or use the upload link if ChatGPT gives you one.
|
|
21
42
|
|
|
22
43
|
### Claude Code
|
|
23
44
|
|
|
@@ -33,24 +54,6 @@ claude mcp add lossrunguru --scope user -e LOSSRUNGURU_API_KEY=lrg_live_... -- c
|
|
|
33
54
|
|
|
34
55
|
`--scope user` makes it available in every project. Check it's connected with `claude mcp list`.
|
|
35
56
|
|
|
36
|
-
### Claude Desktop
|
|
37
|
-
|
|
38
|
-
Open **Settings → Developer → Edit Config** and add `lossrunguru` under `mcpServers`:
|
|
39
|
-
|
|
40
|
-
```json
|
|
41
|
-
{
|
|
42
|
-
"mcpServers": {
|
|
43
|
-
"lossrunguru": {
|
|
44
|
-
"command": "npx",
|
|
45
|
-
"args": ["-y", "@lossrunguru/mcp"],
|
|
46
|
-
"env": { "LOSSRUNGURU_API_KEY": "lrg_live_..." }
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
On Windows, if it doesn't start, use `"command": "cmd"` and `"args": ["/c", "npx", "-y", "@lossrunguru/mcp"]`. Save the file and restart Claude Desktop.
|
|
53
|
-
|
|
54
57
|
### Cursor
|
|
55
58
|
|
|
56
59
|
Add this to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` in a project:
|
|
@@ -87,36 +90,51 @@ Add this to `.vscode/mcp.json`. VS Code asks for the key the first time and stor
|
|
|
87
90
|
}
|
|
88
91
|
```
|
|
89
92
|
|
|
93
|
+
### Claude Desktop with an API key
|
|
94
|
+
|
|
95
|
+
You can also run the local server in Claude Desktop. Open **Settings → Developer → Edit Config** and add `lossrunguru` under `mcpServers`, as in the Cursor example above. On Windows, if it doesn't start, use `"command": "cmd"` and `"args": ["/c", "npx", "-y", "@lossrunguru/mcp"]`. Save the file and restart Claude Desktop.
|
|
96
|
+
|
|
90
97
|
### Other clients
|
|
91
98
|
|
|
92
|
-
|
|
99
|
+
Run `npx -y @lossrunguru/mcp` with `LOSSRUNGURU_API_KEY` set in the environment. It speaks MCP over stdio. Requires Node.js 22 or later (`node --version`).
|
|
93
100
|
|
|
94
|
-
|
|
101
|
+
To get a key: in LossRunGuru go to **Dashboard → Settings → API access** and choose **Create API key**. The key is shown once. Keep it private and don't commit config files that contain it. If a key leaks, revoke it in the same place and create a new one.
|
|
95
102
|
|
|
96
103
|
## Tools
|
|
97
104
|
|
|
98
|
-
| Tool | What it does | Spends credits
|
|
105
|
+
| Tool | What it does | Spends credits |
|
|
99
106
|
|---|---|---|
|
|
100
|
-
| `get_account` | Shows your email
|
|
101
|
-
| `extract_loss_run` |
|
|
107
|
+
| `get_account` | Shows your email and remaining paid and free credits. | No |
|
|
108
|
+
| `extract_loss_run` | Extracts the claims from a loss run: an attached file (hosted), a file path (local) or, with nothing attached on the hosted server, an upload link. The result stays locked, with its claim count and price. | No |
|
|
102
109
|
| `unlock_result` | Unlocks a finished extraction once you've agreed to the price. Unlocking the same extraction again never charges twice. | **Yes**: 1 paid credit per 5 claims |
|
|
103
110
|
| `get_extraction` | Shows an extraction's status (processing, locked, completed or failed), claim count and price. | No |
|
|
104
111
|
| `list_extractions` | Lists your extractions, newest first, with filters for status and date. | No |
|
|
105
|
-
| `get_claims` | Gets an unlocked extraction's claims as JSON or CSV.
|
|
112
|
+
| `get_claims` | Gets an unlocked extraction's claims as JSON or CSV. The local server can save them to a CSV, JSON or Excel file with `save_to`; the hosted server returns them inline (cut off after about 40,000 characters, so CSV is the better choice for long loss runs). | No |
|
|
106
113
|
|
|
107
114
|
Only extractions made through the API or this server are visible. Loss runs you uploaded on the LossRunGuru website aren't.
|
|
108
115
|
|
|
109
|
-
Extractions usually take
|
|
116
|
+
Extractions usually take a few minutes. If one is still running when you ask, ask your assistant to check again later with `get_extraction`.
|
|
117
|
+
|
|
118
|
+
## Authentication
|
|
119
|
+
|
|
120
|
+
- **Hosted server** (`https://lossrunguru.com/v1/mcp`, Streamable HTTP): OAuth 2.0 with PKCE. You sign in to LossRunGuru and approve the connection on a consent page, with the scopes `read` and `extract`. You can see and disconnect connected apps under **Dashboard → Settings**. Removing the connector in your AI app alone doesn't disconnect it on LossRunGuru. Claude and ChatGPT are the supported hosted clients today.
|
|
121
|
+
- **Local server** (`npx`): your API key, set as `LOSSRUNGURU_API_KEY`. The key stays on your computer and is sent only to LossRunGuru. Your assistant never sees it.
|
|
122
|
+
|
|
123
|
+
## Pricing
|
|
124
|
+
|
|
125
|
+
Each loss run costs 1 paid credit per 5 claims, rounded up, charged only when you unlock it. Credit packs, with no subscription, are on [lossrunguru.com/pricing](https://lossrunguru.com/pricing). Any pack includes API access and this server.
|
|
110
126
|
|
|
111
127
|
## Troubleshooting
|
|
112
128
|
|
|
113
|
-
**"LOSSRUNGURU_API_KEY is not set"
|
|
129
|
+
**"LOSSRUNGURU_API_KEY is not set"** (local): the key isn't reaching the server. Check it's in the `env` section of your client's config (or the `-e` flag for Claude Code), then restart the client.
|
|
130
|
+
|
|
131
|
+
**"LossRunGuru rejected the API key"** (local): the key is wrong or has been revoked. Create a new one in **Dashboard → Settings → API access**. Keys starting `lrg_test_` only work against the staging environment.
|
|
114
132
|
|
|
115
|
-
**"LossRunGuru
|
|
133
|
+
**"LossRunGuru refused the API key"** (local): API access needs an account that has bought a credit pack.
|
|
116
134
|
|
|
117
|
-
**"
|
|
135
|
+
**"Not enough paid credits"**: when it happens on an unlock, the message says how many credits the extraction needs and how many you have. Only paid credits can be used through the API and this server. The extraction stays locked and waiting, so once you have more credits, ask your assistant to unlock it again; there's no need to extract it again.
|
|
118
136
|
|
|
119
|
-
**"
|
|
137
|
+
**"This app isn't allowed to connect"** (hosted): only Claude and ChatGPT can use the hosted server today. For other clients use the local server with an API key.
|
|
120
138
|
|
|
121
139
|
**"No extraction with id …"**: the id is wrong, or it belongs to a loss run uploaded on the website. Use `list_extractions` to find your extractions.
|
|
122
140
|
|
|
@@ -124,13 +142,13 @@ Extractions usually take one to two minutes. If one is still running when `extra
|
|
|
124
142
|
|
|
125
143
|
**"Unsupported file type" or "over the 25 MB limit"**: LossRunGuru accepts PDF, PNG and JPEG files up to 25 MB. Nothing was uploaded or charged.
|
|
126
144
|
|
|
127
|
-
**The server doesn't start**: check `node --version` shows 22 or later. On Windows, try the `cmd /c` variants above. Error details go to your client's MCP logs.
|
|
145
|
+
**The local server doesn't start**: check `node --version` shows 22 or later. On Windows, try the `cmd /c` variants above. Error details go to your client's MCP logs.
|
|
128
146
|
|
|
129
147
|
## Privacy
|
|
130
148
|
|
|
131
|
-
|
|
149
|
+
Loss runs you extract are uploaded to LossRunGuru for processing. Claims are saved only where you ask (local server) or returned to your conversation (hosted). See the [privacy policy](https://lossrunguru.com/privacy) for what is stored and for how long.
|
|
132
150
|
|
|
133
|
-
## Configuration
|
|
151
|
+
## Configuration (local server)
|
|
134
152
|
|
|
135
153
|
| Variable | Required | Description |
|
|
136
154
|
|---|---|---|
|
|
@@ -152,8 +170,9 @@ npm run test:integration # end-to-end against staging; needs an lrg_test_ key a
|
|
|
152
170
|
|
|
153
171
|
- `src/core/`: API client, error mapping and tool registrations. Transport-agnostic: no `fs`, no `process.env`, no stdio.
|
|
154
172
|
- `src/stdio.ts`: local entrypoint. Reads config from the environment, supplies local file access (`src/local-files.ts`) and connects over stdio.
|
|
173
|
+
- `src/http.ts` and `src/lambda.ts`: the hosted server (`@lossrunguru/mcp/lambda`), a stateless Streamable HTTP handler that exchanges the signed-in user's OAuth token for a short-lived API token.
|
|
155
174
|
|
|
156
|
-
Never write to stdout: it carries the MCP protocol. Log to stderr.
|
|
175
|
+
Never write to stdout in the local server: it carries the MCP protocol. Log to stderr.
|
|
157
176
|
|
|
158
177
|
### Releasing
|
|
159
178
|
|
package/dist/core/errors.js
CHANGED
|
@@ -6,7 +6,7 @@ export function describeError(err, baseUrl) {
|
|
|
6
6
|
const ref = err.requestId ? ` (request id ${err.requestId})` : "";
|
|
7
7
|
switch (err.code) {
|
|
8
8
|
case "INSUFFICIENT_CREDITS":
|
|
9
|
-
return `Not enough LossRunGuru paid credits.
|
|
9
|
+
return `Not enough LossRunGuru paid credits. Nothing was charged.${ref}`;
|
|
10
10
|
case "RATE_LIMITED":
|
|
11
11
|
return err.retryAfterSeconds !== undefined
|
|
12
12
|
? `LossRunGuru rate limit reached. Retry in ${err.retryAfterSeconds} seconds.${ref}`
|
package/dist/core/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,UAAU,aAAa,CAAC,GAAY,EAAE,OAAe;IACzD,IAAI,CAAC,CAAC,GAAG,YAAY,QAAQ,CAAC,EAAE,CAAC;QAC/B,OAAO,qBAAqB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IACjF,CAAC;IACD,MAAM,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAClE,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,sBAAsB;YACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,UAAU,aAAa,CAAC,GAAY,EAAE,OAAe;IACzD,IAAI,CAAC,CAAC,GAAG,YAAY,QAAQ,CAAC,EAAE,CAAC;QAC/B,OAAO,qBAAqB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IACjF,CAAC;IACD,MAAM,GAAG,GAAG,GAAG,CAAC,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
|
+
pdf: { contentType: "application/pdf", extension: ".pdf" },
|
|
5
|
+
png: { contentType: "image/png", extension: ".png" },
|
|
6
|
+
jpg: { contentType: "image/jpeg", extension: ".jpg" },
|
|
7
|
+
jpeg: { contentType: "image/jpeg", extension: ".jpg" },
|
|
8
|
+
};
|
|
9
|
+
export class FileRejected extends Error {
|
|
10
|
+
}
|
|
11
|
+
export async function downloadAttachment(file, maxBytes, fetchImpl) {
|
|
12
|
+
if (!file.download_url) {
|
|
13
|
+
throw new FileRejected("The attached file wasn't passed to this tool, only its id. Ask the user to attach the loss run again.");
|
|
14
|
+
}
|
|
15
|
+
const signal = AbortSignal.timeout(DOWNLOAD_BUDGET_MS);
|
|
16
|
+
const res = await fetchPublic(file.download_url, fetchImpl, signal);
|
|
17
|
+
if (!res.ok)
|
|
18
|
+
throw new FileRejected(`Couldn't download the attached file (HTTP ${res.status}). Ask the user to attach it again.`);
|
|
19
|
+
const declared = Number(res.headers.get("content-length"));
|
|
20
|
+
if (Number.isFinite(declared) && declared > maxBytes)
|
|
21
|
+
throw new FileRejected("The attached file is larger than the 25 MB limit.");
|
|
22
|
+
let data;
|
|
23
|
+
try {
|
|
24
|
+
data = await readCapped(res, maxBytes);
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
if (err instanceof FileRejected)
|
|
28
|
+
throw err;
|
|
29
|
+
throw new FileRejected("Downloading the attached file took too long or was interrupted. Ask the user to attach it again.");
|
|
30
|
+
}
|
|
31
|
+
const type = typeOf(data);
|
|
32
|
+
if (!type)
|
|
33
|
+
throw new FileRejected("The attached file isn't a PDF, PNG or JPEG.");
|
|
34
|
+
const base = (file.file_name ?? "loss-run").replace(/\.[^.]*$/, "") || "loss-run";
|
|
35
|
+
return { name: base + type.extension, contentType: type.contentType, data };
|
|
36
|
+
}
|
|
37
|
+
async function fetchPublic(url, fetchImpl, signal) {
|
|
38
|
+
let current = url;
|
|
39
|
+
for (let hop = 0; hop <= MAX_REDIRECTS; hop++) {
|
|
40
|
+
assertPublicHttps(current);
|
|
41
|
+
let res;
|
|
42
|
+
try {
|
|
43
|
+
res = await fetchImpl(current, { redirect: "manual", signal });
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
throw new FileRejected(`Couldn't download the attached file: ${err instanceof Error ? err.message : String(err)}`);
|
|
47
|
+
}
|
|
48
|
+
const location = res.headers.get("location");
|
|
49
|
+
if (res.status < 300 || res.status >= 400 || !location)
|
|
50
|
+
return res;
|
|
51
|
+
await res.body?.cancel();
|
|
52
|
+
current = new URL(location, current).toString();
|
|
53
|
+
}
|
|
54
|
+
throw new FileRejected("The attached file's download link redirected too many times.");
|
|
55
|
+
}
|
|
56
|
+
function assertPublicHttps(url) {
|
|
57
|
+
let parsed;
|
|
58
|
+
try {
|
|
59
|
+
parsed = new URL(url);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
throw new FileRejected("The attached file's download link isn't a valid URL.");
|
|
63
|
+
}
|
|
64
|
+
const host = parsed.hostname.toLowerCase().replace(/\.+$/, "");
|
|
65
|
+
const ipLiteral = /^[\d.]+$/.test(host) || host.includes(":") || host.startsWith("[");
|
|
66
|
+
if (parsed.protocol !== "https:" || ipLiteral || host === "localhost" || host.endsWith(".localhost") || host.endsWith(".internal")) {
|
|
67
|
+
throw new FileRejected("The attached file's download link must be a public HTTPS URL.");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
async function readCapped(res, maxBytes) {
|
|
71
|
+
const reader = res.body?.getReader();
|
|
72
|
+
if (!reader)
|
|
73
|
+
return new Uint8Array();
|
|
74
|
+
const chunks = [];
|
|
75
|
+
let total = 0;
|
|
76
|
+
for (;;) {
|
|
77
|
+
const { done, value } = await reader.read();
|
|
78
|
+
if (done)
|
|
79
|
+
break;
|
|
80
|
+
total += value.byteLength;
|
|
81
|
+
if (total > maxBytes) {
|
|
82
|
+
await reader.cancel();
|
|
83
|
+
throw new FileRejected("The attached file is larger than the 25 MB limit.");
|
|
84
|
+
}
|
|
85
|
+
chunks.push(value);
|
|
86
|
+
}
|
|
87
|
+
const data = new Uint8Array(total);
|
|
88
|
+
let offset = 0;
|
|
89
|
+
for (const chunk of chunks) {
|
|
90
|
+
data.set(chunk, offset);
|
|
91
|
+
offset += chunk.byteLength;
|
|
92
|
+
}
|
|
93
|
+
return data;
|
|
94
|
+
}
|
|
95
|
+
function typeOf(data) {
|
|
96
|
+
if (data[0] === 0x25 && data[1] === 0x50 && data[2] === 0x44 && data[3] === 0x46)
|
|
97
|
+
return TYPES.pdf;
|
|
98
|
+
if (data[0] === 0x89 && data[1] === 0x50 && data[2] === 0x4e && data[3] === 0x47)
|
|
99
|
+
return TYPES.png;
|
|
100
|
+
if (data[0] === 0xff && data[1] === 0xd8 && data[2] === 0xff)
|
|
101
|
+
return TYPES.jpeg;
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=remote-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-file.js","sourceRoot":"","sources":["../../src/core/remote-file.ts"],"names":[],"mappings":"AAEA,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,MAAM,KAAK,GAA+D;IACxE,GAAG,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,EAAE;IAC1D,GAAG,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE;IACpD,GAAG,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;IACrD,IAAI,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;CACvD,CAAC;AASF,MAAM,OAAO,YAAa,SAAQ,KAAK;CAAG;AAE1C,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAkB,EAAE,QAAgB,EAAE,SAAuB;IACpG,IAAI,CAAC,IAAI,C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CAAC;IACf,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC;IAC7B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,MAAM,CAAC,IAAgB;IAC9B,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC;IACnG,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC;IACnG,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC,IAAI,CAAC;IAChF,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ApiError } from "../client.js";
|
|
3
3
|
import { describeError, safely } from "../errors.js";
|
|
4
|
+
import { downloadAttachment } from "../remote-file.js";
|
|
4
5
|
import { describeExtraction, errorResult, plural } from "./result.js";
|
|
5
6
|
export const MAX_FILE_BYTES = 25 * 1024 * 1024;
|
|
6
7
|
export const MAX_WAIT_SECONDS = 50;
|
|
@@ -11,46 +12,112 @@ const EXTRACT_TIMEOUT_MS = 35_000;
|
|
|
11
12
|
const UPLOAD_TIMEOUT_MS = 90_000;
|
|
12
13
|
const POLL_INTERVAL_MS = 5_000;
|
|
13
14
|
const POLL_REQUEST_ALLOWANCE_MS = 2_000;
|
|
14
|
-
|
|
15
|
+
const attachedFileSchema = z
|
|
16
|
+
.object({
|
|
17
|
+
download_url: z.string(),
|
|
18
|
+
file_id: z.string(),
|
|
19
|
+
mime_type: z.string().optional(),
|
|
20
|
+
file_name: z.string().optional(),
|
|
21
|
+
})
|
|
22
|
+
.describe("The loss run file the user attached in ChatGPT.");
|
|
23
|
+
const NOT_UPLOADED = ["No file has been uploaded for this uploadId", "The upload link expired before a file was uploaded"];
|
|
24
|
+
const SHARED_DESCRIPTION = [
|
|
25
|
+
"The extraction runs in the background and usually takes a few minutes. When it finishes it is priced from the number of claims found (1 paid credit per 5 claims, rounded up) and waits, locked, for the user to approve the cost.",
|
|
26
|
+
"Returns the extraction id. Check it with get_extraction. Once it's locked, tell the user the claim count and cost, and only if they agree call unlock_result; then fetch the claims with get_claims.",
|
|
27
|
+
];
|
|
28
|
+
export function registerExtractTool(server, { api, files, clock, fetch }) {
|
|
29
|
+
if (files) {
|
|
30
|
+
server.registerTool("extract_loss_run", {
|
|
31
|
+
title: "Extract claims from a loss run",
|
|
32
|
+
description: [
|
|
33
|
+
"Upload an insurance loss run (PDF, PNG or JPEG, up to 25 MB) from this computer and extract its claims. This never charges anything.",
|
|
34
|
+
...SHARED_DESCRIPTION,
|
|
35
|
+
"If a call failed or timed out, check list_extractions before uploading the same file again.",
|
|
36
|
+
].join(" "),
|
|
37
|
+
inputSchema: {
|
|
38
|
+
file_path: z.string().min(1).describe("Absolute path to the loss run file on this computer."),
|
|
39
|
+
wait_seconds: z
|
|
40
|
+
.number()
|
|
41
|
+
.int()
|
|
42
|
+
.min(0)
|
|
43
|
+
.max(MAX_WAIT_SECONDS)
|
|
44
|
+
.optional()
|
|
45
|
+
.describe(`How long to wait for the extraction to finish before returning, 0 to ${MAX_WAIT_SECONDS} (default 0).`),
|
|
46
|
+
},
|
|
47
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
48
|
+
}, ({ file_path, wait_seconds }) => safely(api.baseUrl, async () => {
|
|
49
|
+
const startedAt = clock.now();
|
|
50
|
+
let file;
|
|
51
|
+
try {
|
|
52
|
+
file = await files.readInput(file_path, { maxBytes: MAX_FILE_BYTES });
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
return errorResult(`${err instanceof Error ? err.message : String(err)} Nothing was uploaded or charged.`);
|
|
56
|
+
}
|
|
57
|
+
const invalid = checkSize(file);
|
|
58
|
+
if (invalid)
|
|
59
|
+
return invalid;
|
|
60
|
+
const uploadId = await uploadFile(api, clock, file, startedAt);
|
|
61
|
+
return startExtraction(api, clock, uploadId, startedAt + (wait_seconds ?? 0) * 1000);
|
|
62
|
+
}));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
15
65
|
server.registerTool("extract_loss_run", {
|
|
16
66
|
title: "Extract claims from a loss run",
|
|
17
67
|
description: [
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
"If a call failed or timed out, check list_extractions before uploading the same file again.",
|
|
68
|
+
"Extract the claims from an insurance loss run (PDF, PNG or JPEG, up to 25 MB). This never charges anything.",
|
|
69
|
+
"Call it with the attached file, or with upload_id after the user has used an upload link. If the user hasn't attached a file, call it with no arguments to get an upload link for them.",
|
|
70
|
+
...SHARED_DESCRIPTION,
|
|
22
71
|
].join(" "),
|
|
23
72
|
inputSchema: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.
|
|
27
|
-
.
|
|
28
|
-
.min(0)
|
|
29
|
-
.max(MAX_WAIT_SECONDS)
|
|
73
|
+
file: attachedFileSchema.optional(),
|
|
74
|
+
upload_id: z
|
|
75
|
+
.string()
|
|
76
|
+
.min(1)
|
|
30
77
|
.optional()
|
|
31
|
-
.describe(
|
|
78
|
+
.describe("The upload_id from an earlier extract_loss_run upload link, once the user has uploaded their file."),
|
|
32
79
|
},
|
|
33
80
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
34
|
-
|
|
81
|
+
_meta: { "openai/fileParams": ["file"] },
|
|
82
|
+
}, ({ file, upload_id }) => safely(api.baseUrl, async () => {
|
|
35
83
|
const startedAt = clock.now();
|
|
36
|
-
if (
|
|
37
|
-
return
|
|
38
|
-
|
|
84
|
+
if (upload_id)
|
|
85
|
+
return startExtraction(api, clock, upload_id, startedAt, { fromUploadLink: true });
|
|
86
|
+
if (!file)
|
|
87
|
+
return uploadLinkResult(api);
|
|
88
|
+
let input;
|
|
39
89
|
try {
|
|
40
|
-
|
|
90
|
+
input = await downloadAttachment(file, MAX_FILE_BYTES, fetch);
|
|
41
91
|
}
|
|
42
92
|
catch (err) {
|
|
43
93
|
return errorResult(`${err instanceof Error ? err.message : String(err)} Nothing was uploaded or charged.`);
|
|
44
94
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const uploadId = await uploadFile(api, clock, file, startedAt);
|
|
51
|
-
return startExtraction(api, clock, uploadId, startedAt + (wait_seconds ?? 0) * 1000);
|
|
95
|
+
const invalid = checkSize(input);
|
|
96
|
+
if (invalid)
|
|
97
|
+
return invalid;
|
|
98
|
+
const uploadId = await uploadFile(api, clock, input, startedAt);
|
|
99
|
+
return startExtraction(api, clock, uploadId, startedAt);
|
|
52
100
|
}));
|
|
53
101
|
}
|
|
102
|
+
function checkSize(file) {
|
|
103
|
+
if (file.data.byteLength === 0)
|
|
104
|
+
return errorResult(`${file.name} is empty. Nothing was uploaded or charged.`);
|
|
105
|
+
if (file.data.byteLength > MAX_FILE_BYTES)
|
|
106
|
+
return errorResult(`${file.name} is larger than the 25 MB limit. Nothing was uploaded or charged.`);
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
async function uploadLinkResult(api) {
|
|
110
|
+
const upload = await api.requestJson("POST", "/v1/uploads", {
|
|
111
|
+
body: { fileName: "loss-run.pdf", contentType: "application/pdf" },
|
|
112
|
+
});
|
|
113
|
+
const uploadLink = `${api.baseUrl}/dashboard/upload-link?id=${encodeURIComponent(upload.uploadId)}`;
|
|
114
|
+
const text = [
|
|
115
|
+
`No file was attached, so ask the user to upload their loss run here: [Upload your loss run](${uploadLink})`,
|
|
116
|
+
"The link works once, for an hour, and needs them to be signed in to LossRunGuru.",
|
|
117
|
+
`When they say it's uploaded, call extract_loss_run with upload_id ${upload.uploadId}. Nothing has been charged.`,
|
|
118
|
+
].join(" ");
|
|
119
|
+
return { content: [{ type: "text", text }], structuredContent: { uploadId: upload.uploadId, uploadLink } };
|
|
120
|
+
}
|
|
54
121
|
async function uploadFile(api, clock, file, startedAt) {
|
|
55
122
|
const upload = await api.requestJson("POST", "/v1/uploads", {
|
|
56
123
|
body: { fileName: file.name, contentType: file.contentType },
|
|
@@ -59,7 +126,7 @@ async function uploadFile(api, clock, file, startedAt) {
|
|
|
59
126
|
await withRetries(UPLOAD_ATTEMPTS, clock, (err) => isRetryableUpload(err) && clock.now() - startedAt < UPLOAD_RETRY_WINDOW_MS, () => api.putUpload(upload.uploadUrl, uploadHeaders, file.data, UPLOAD_TIMEOUT_MS));
|
|
60
127
|
return upload.uploadId;
|
|
61
128
|
}
|
|
62
|
-
async function startExtraction(api, clock, uploadId, deadline) {
|
|
129
|
+
async function startExtraction(api, clock, uploadId, deadline, options = {}) {
|
|
63
130
|
let extraction;
|
|
64
131
|
try {
|
|
65
132
|
extraction = await withRetries(EXTRACT_ATTEMPTS, clock, isRetryableExtract, () => api.requestJson("POST", "/v1/extractions", {
|
|
@@ -69,6 +136,9 @@ async function startExtraction(api, clock, uploadId, deadline) {
|
|
|
69
136
|
}));
|
|
70
137
|
}
|
|
71
138
|
catch (err) {
|
|
139
|
+
if (options.fromUploadLink && err instanceof ApiError && NOT_UPLOADED.some((m) => err.message.startsWith(m))) {
|
|
140
|
+
return errorResult(`The user hasn't uploaded the file for upload_id ${uploadId} yet. Ask them to open the upload link and upload their loss run, then call extract_loss_run with upload_id ${uploadId} again. If the link is more than an hour old, call extract_loss_run with no arguments for a new one. Nothing has been charged.`);
|
|
141
|
+
}
|
|
72
142
|
if (isSubmissionFailed(err)) {
|
|
73
143
|
return errorResult(`The loss run couldn't be submitted for extraction: ${describeError(err, api.baseUrl)} Try again in a few minutes.`);
|
|
74
144
|
}
|
|
@@ -106,7 +176,7 @@ async function paidBalance(api) {
|
|
|
106
176
|
}
|
|
107
177
|
function balanceNote(balance, required) {
|
|
108
178
|
if (required != null && balance < required) {
|
|
109
|
-
return `The user has only ${plural(balance, "paid credit")}, so
|
|
179
|
+
return `The user has only ${plural(balance, "paid credit")}, so it can't be unlocked until their account has more.`;
|
|
110
180
|
}
|
|
111
181
|
return `The user has ${plural(balance, "paid credit")}.`;
|
|
112
182
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../src/core/tools/extract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAkB,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../../../src/core/tools/extract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAkB,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,EAAmB,MAAM,aAAa,CAAC;AAEvF,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC/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MAAM,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,GAAa;IACtC,OAAO,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC,CAAC;AACvI,CAAC;AAED,SAAS,kBAAkB,CAAC,GAAY;IACtC,OAAO,GAAG,YAAY,QAAQ,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,eAAe,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;AACnJ,CAAC;AAED,SAAS,iBAAiB,CAAC,GAAY;IACrC,OAAO,GAAG,YAAY,QAAQ,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,eAAe,IAAI,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3G,CAAC;AAED,SAAS,kBAAkB,CAAC,GAAY;IACtC,OAAO,GAAG,YAAY,QAAQ,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,gBAAgB,CAAC;AACxF,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAY;IACvC,OAAO,GAAG,YAAY,QAAQ,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;AACrG,CAAC"}
|
|
@@ -37,7 +37,7 @@ export function registerGetClaimsTool(server, { api, files }) {
|
|
|
37
37
|
: ["The claims are returned inline, and results over about 40,000 characters are cut off; CSV is more compact than JSON."]),
|
|
38
38
|
].join(" "),
|
|
39
39
|
inputSchema: (files ? { ...baseFields, ...saveFields } : baseFields),
|
|
40
|
-
annotations: { readOnlyHint:
|
|
40
|
+
annotations: { readOnlyHint: !files, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
41
41
|
}, ({ id, format, save_to, overwrite }) => safely(api.baseUrl, async () => {
|
|
42
42
|
const resolvedFormat = format ?? formatFromPath(save_to);
|
|
43
43
|
if (resolvedFormat === "xlsx" && !(save_to && files)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-claims.js","sourceRoot":"","sources":["../../../src/core/tools/get-claims.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAkB,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,EAAmB,MAAM,aAAa,CAAC;AAEnH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AACvC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACjC,MAAM,UAAU,GAAG,CAAC,CAAC;AAIrB,MAAM,MAAM,GAA2B;IACrC,IAAI,EAAE,kBAAkB;IACxB,GAAG,EAAE,UAAU;IACf,IAAI,EAAE,mEAAmE;CAC1E,CAAC;AAoBF,MAAM,UAAU,GAAG;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qGAAqG,CAAC;IACrJ,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;CACvG,CAAC;AAEF,MAAM,UAAU,qBAAqB,CAAC,MAAiB,EAAE,EAAE,GAAG,EAAE,KAAK,EAAY;IAC/E,MAAM,UAAU,GAAG;QACjB,EAA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AM,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;gBACtB,QAAQ,GAAG,KAAK,CAAC;YACnB,CAAC;iBAAM,CAAC;gBACN,KAAK,IAAI,EAAE,CAAC;YACd,CAAC;QACH,CAAC;aAAM,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACtB,QAAQ,GAAG,IAAI,CAAC;QAClB,CAAC;aAAM,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACtB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChB,KAAK,GAAG,EAAE,CAAC;QACb,CAAC;aAAM,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;YACtC,IAAI,EAAE,KAAK,IAAI,IAAI,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI;gBAAE,CAAC,EAAE,CAAC;YAC/C,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACf,GAAG,GAAG,EAAE,CAAC;YACT,KAAK,GAAG,EAAE,CAAC;QACb,CAAC;aAAM,CAAC;YACN,KAAK,IAAI,EAAE,CAAC;QACd,CAAC;IACH,CAAC;IACD,IAAI,KAAK,KAAK,EAAE,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QAC/B,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/core/tools/index.js
CHANGED
|
@@ -4,10 +4,8 @@ import { registerReadTools } from "./read.js";
|
|
|
4
4
|
import { registerUnlockTool } from "./unlock.js";
|
|
5
5
|
export function registerTools(server, deps) {
|
|
6
6
|
registerReadTools(server, deps);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
registerUnlockTool(server, deps);
|
|
10
|
-
}
|
|
7
|
+
registerExtractTool(server, deps);
|
|
8
|
+
registerUnlockTool(server, deps);
|
|
11
9
|
registerGetClaimsTool(server, deps);
|
|
12
10
|
}
|
|
13
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AASjD,MAAM,UAAU,aAAa,CAAC,MAAiB,EAAE,IAAc;IAC7D,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AASjD,MAAM,UAAU,aAAa,CAAC,MAAiB,EAAE,IAAc;IAC7D,iBAAiB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChC,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAClC,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACjC,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -45,7 +45,7 @@ function shortfallResult(id, err) {
|
|
|
45
45
|
content: [
|
|
46
46
|
{
|
|
47
47
|
type: "text",
|
|
48
|
-
text:
|
|
48
|
+
text: `Not enough paid credits to unlock extraction ${id}.${numbers} Nothing was charged. The extraction stays locked. Tell the user their account doesn't have enough paid credits for it. If they add credits later, call unlock_result with id ${id} again; there's no need to extract it again.`,
|
|
49
49
|
},
|
|
50
50
|
],
|
|
51
51
|
structuredContent: { id, ...details },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlock.js","sourceRoot":"","sources":["../../../src/core/tools/unlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAElG,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAejC,MAAM,UAAU,kBAAkB,CAAC,MAAiB,EAAE,EAAE,GAAG,EAAY;IACrE,MAAM,CAAC,YAAY,CACjB,eAAe,EACf;QACE,KAAK,EAAE,+CAA+C;QACtD,WAAW,EAAE;YACX,2JAA2J;YAC3J,yOAAyO;YACzO,sIAAsI;SACvI,CAAC,IAAI,CAAC,GAAG,CAAC;QACX,WAAW,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,8EAA8E,CAAC,EAAE;QAC/H,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;KACxG,EACD,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAC7D,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,MAAM,CAAC,GAAoB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,uBAAuB,EAAE,KAAK,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,aAAa,QAAQ,CAAC,oBAAoB,sCAAsC,EAAE,uBAAuB,CAAC;IACnM,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,iBAAiB,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,CAAC;AACnF,CAAC;AAED,SAAS,eAAe,CAAC,EAAU,EAAE,GAAa;IAChD,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAc,CAAC;IACjD,MAAM,OAAO,GACX,OAAO,CAAC,eAAe,KAAK,SAAS,IAAI,OAAO,CAAC,gBAAgB,KAAK,SAAS;QAC7E,CAAC,CAAC,aAAa,MAAM,CAAC,OAAO,CAAC,eAAe,EAAE,aAAa,CAAC,qBAAqB,OAAO,CAAC,gBAAgB,GAAG;QAC7G,CAAC,CAAC,EAAE,CAAC;IACT,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,gDAAgD,EAAE,IAAI,OAAO,iLAAiL,EAAE,8CAA8C;aACrS;SACF;QACD,iBAAiB,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE;KACtC,CAAC;AACJ,CAAC"}
|
package/dist/core/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "0.
|
|
1
|
+
export const VERSION = "0.3.1";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lossrunguru/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "MCP server for LossRunGuru: extract claims from loss runs in AI assistants",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Mocsy Inc",
|
|
7
|
-
"homepage": "https://lossrunguru.com",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"url": "git+https://github.com/sortspoke/lossrunguru-mcp.git"
|
|
7
|
+
"homepage": "https://lossrunguru.com/loss-run-api#mcp",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"email": "hello@lossrunguru.com"
|
|
11
10
|
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"mcp",
|
|
13
|
+
"model-context-protocol",
|
|
14
|
+
"loss-run",
|
|
15
|
+
"loss-runs",
|
|
16
|
+
"insurance",
|
|
17
|
+
"claims",
|
|
18
|
+
"underwriting",
|
|
19
|
+
"document-extraction",
|
|
20
|
+
"pdf-to-csv",
|
|
21
|
+
"claude",
|
|
22
|
+
"chatgpt"
|
|
23
|
+
],
|
|
12
24
|
"type": "module",
|
|
13
25
|
"bin": {
|
|
14
26
|
"lossrunguru-mcp": "dist/stdio.js"
|