@melra/sdk 0.3.0-alpha.14 → 0.3.0-alpha.16
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 +14 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -9
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -108,6 +108,20 @@ cleartext it is readable by anything on the path. Put TLS in front and use
|
|
|
108
108
|
network, pass `allowInsecureHttp: true`. A wrong token fails `connect()` with
|
|
109
109
|
`melra_unauthorized`.
|
|
110
110
|
|
|
111
|
+
`execute()` and `advanceWorkflow()` wait up to 36 minutes for the server: a
|
|
112
|
+
task's 15-minute budget cap, then up to 20 built-in evidence reads of a minute
|
|
113
|
+
each. So the SDK does not give up on an effect the server is still running. Set
|
|
114
|
+
`runTimeoutMs` in `connect()`, in whole milliseconds up to 2147483647, for what
|
|
115
|
+
that does not cover:
|
|
116
|
+
|
|
117
|
+
- custom verifiers and `file_hash` on a very large file, which have no time limit;
|
|
118
|
+
- an `advanceWorkflow()` call that runs several tasks in turn: a loop's or a
|
|
119
|
+
branch's steps, or, when a step fails, every compensation.
|
|
120
|
+
|
|
121
|
+
The wait is per call, not per task. After a timeout, read the task or the run
|
|
122
|
+
(`status()`, `workflowStatus()`) before acting on it: the server may still be at
|
|
123
|
+
work.
|
|
124
|
+
|
|
111
125
|
## Workflows
|
|
112
126
|
|
|
113
127
|
`planWorkflow`, `advanceWorkflow`, `workflowStatus`, `cancelWorkflow`, and
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,19 @@ import { type WorkflowAdvanceResult, type WorkflowDefinitionInput, type Workflow
|
|
|
2
2
|
interface ClientIdentity {
|
|
3
3
|
clientName?: string;
|
|
4
4
|
clientVersion?: string;
|
|
5
|
+
/**
|
|
6
|
+
* How long `execute()` and `advanceWorkflow()` wait for the server, in whole
|
|
7
|
+
* milliseconds from 1 to 2 147 483 647. The default, 36 minutes, covers a
|
|
8
|
+
* task's budget (15 minutes at most) and then its built-in evidence reads (20
|
|
9
|
+
* predicates of up to a minute each), so the client does not give up on an
|
|
10
|
+
* effect the server is still running and may still verify. Raise it for what
|
|
11
|
+
* that does not cover: custom verifiers and `file_hash` on a very large file,
|
|
12
|
+
* which have no time limit, and an `advanceWorkflow()` call that runs several
|
|
13
|
+
* tasks in turn (a loop's or a branch's steps, or, when a step fails, every
|
|
14
|
+
* compensation). After a timeout, read the task or the run before acting on
|
|
15
|
+
* it: the server may still be at work.
|
|
16
|
+
*/
|
|
17
|
+
runTimeoutMs?: number;
|
|
5
18
|
}
|
|
6
19
|
/** Spawn `melra serve` (or `command`) as a child and speak MCP over stdio. */
|
|
7
20
|
export interface MelraStdioOptions extends ClientIdentity {
|
|
@@ -38,8 +51,14 @@ export type MelraClientOptions = (MelraStdioOptions & Without<"url" | "socketPat
|
|
|
38
51
|
export declare function parseMelraToolResult(result: unknown): Record<string, unknown>;
|
|
39
52
|
export declare class MelraClient {
|
|
40
53
|
private readonly client;
|
|
54
|
+
private readonly runTimeoutMs;
|
|
41
55
|
private constructor();
|
|
42
56
|
static connect(options?: MelraClientOptions): Promise<MelraClient>;
|
|
57
|
+
/**
|
|
58
|
+
* `long` for the two calls that run effects: the MCP client otherwise gives
|
|
59
|
+
* up after 60 s, while the server goes on running the task and may verify
|
|
60
|
+
* it, and a caller who reads that error as a failure runs it again.
|
|
61
|
+
*/
|
|
43
62
|
private call;
|
|
44
63
|
capabilities(): Promise<Record<string, unknown>>;
|
|
45
64
|
plan(request: TaskRequestInput): Promise<Record<string, unknown>>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAQL,KAAK,qBAA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C;IAW3B,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAOxD,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAOxD,eAAe,CACnB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GACrC,OAAO,CAAC,WAAW,CAAC;IAOjB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAU7B"}
|
package/dist/index.js
CHANGED
|
@@ -2,9 +2,16 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
4
4
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
5
|
-
import { StreamableHTTPError } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
5
|
+
import { StreamableHTTPClientTransport, StreamableHTTPError, } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
6
6
|
import { httpTransport, socketTransport } from "./remote.js";
|
|
7
7
|
import { WorkflowAdvanceInputSchema, WorkflowAdvanceResultSchema, WorkflowControlInputSchema, WorkflowDefinitionSchema, WorkflowIdInputSchema, WorkflowRunSchema, TaskRequestSchema, } from "@melra/protocol";
|
|
8
|
+
/**
|
|
9
|
+
* `budget.maxDurationMs`'s cap, then 20 evidence predicates at the 60 s probe
|
|
10
|
+
* cap (verification is not timed by the budget), with a minute to answer in.
|
|
11
|
+
*/
|
|
12
|
+
const RUN_TIMEOUT_MS = 900_000 + 20 * 60_000 + 60_000;
|
|
13
|
+
/** Node's timer ceiling: past it, as for 0, NaN or a negative, a timer fires at once. */
|
|
14
|
+
const MAX_TIMEOUT_MS = 2_147_483_647;
|
|
8
15
|
export function parseMelraToolResult(result) {
|
|
9
16
|
const response = result;
|
|
10
17
|
const text = response.content?.find((item) => item.type === "text")?.text;
|
|
@@ -17,8 +24,8 @@ export function parseMelraToolResult(result) {
|
|
|
17
24
|
/**
|
|
18
25
|
* The settings of this process worth passing to a stdio server it spawns:
|
|
19
26
|
* where its state and policy live, and a stricter mode. Not the ones that
|
|
20
|
-
* would redirect or widen it: MELRA_SOCKET
|
|
21
|
-
*
|
|
27
|
+
* would redirect or widen it: MELRA_SOCKET moved older versions of `melra
|
|
28
|
+
* serve` off stdio, so connecting hung; MELRA_UNHINGED unconfines it, with a banner nobody reads; and an
|
|
22
29
|
* explicit `cwd` decides the workspace over an inherited MELRA_WORKSPACE.
|
|
23
30
|
* Pass any of those in `env` to mean them.
|
|
24
31
|
*/
|
|
@@ -28,12 +35,31 @@ function melraSettings(environment, cwd) {
|
|
|
28
35
|
names.push("MELRA_WORKSPACE");
|
|
29
36
|
return Object.fromEntries(names.flatMap((name) => (environment[name] === undefined ? [] : [[name, environment[name]]])));
|
|
30
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Ends an HTTP or socket session, waiting at most two seconds: a server that
|
|
40
|
+
* never answers the DELETE held close() for minutes, or for good over a
|
|
41
|
+
* socket. client.close() then aborts the request, which shares its signal.
|
|
42
|
+
*/
|
|
43
|
+
async function endSession(transport) {
|
|
44
|
+
await Promise.race([
|
|
45
|
+
transport.terminateSession().catch(() => undefined),
|
|
46
|
+
new Promise((settled) => setTimeout(settled, 2_000).unref()),
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
31
49
|
export class MelraClient {
|
|
32
50
|
client;
|
|
33
|
-
|
|
51
|
+
runTimeoutMs;
|
|
52
|
+
constructor(client, runTimeoutMs) {
|
|
34
53
|
this.client = client;
|
|
54
|
+
this.runTimeoutMs = runTimeoutMs;
|
|
35
55
|
}
|
|
36
56
|
static async connect(options = {}) {
|
|
57
|
+
// Anything else becomes a timer that fires in a millisecond, so every
|
|
58
|
+
// execute() would report a timeout while the server ran the effect.
|
|
59
|
+
const runTimeoutMs = options.runTimeoutMs ?? RUN_TIMEOUT_MS;
|
|
60
|
+
if (!Number.isInteger(runTimeoutMs) || runTimeoutMs < 1 || runTimeoutMs > MAX_TIMEOUT_MS) {
|
|
61
|
+
throw new Error(`melra_run_timeout_invalid: runTimeoutMs must be a whole number of milliseconds from 1 to ${MAX_TIMEOUT_MS}`);
|
|
62
|
+
}
|
|
37
63
|
const transport = options.url !== undefined
|
|
38
64
|
? httpTransport(options.url, options.token, options.allowInsecureHttp === true)
|
|
39
65
|
: options.socketPath !== undefined
|
|
@@ -52,6 +78,15 @@ export class MelraClient {
|
|
|
52
78
|
name: options.clientName ?? "melra-sdk",
|
|
53
79
|
version: options.clientVersion ?? "0.1.0",
|
|
54
80
|
});
|
|
81
|
+
// Read, so a server with a lot to say never blocks on a full pipe, and
|
|
82
|
+
// kept, so one that refuses to start says why: a bad policy, an unwritable
|
|
83
|
+
// MELRA_HOME and a missing node:sqlite all read "Connection closed".
|
|
84
|
+
let said = "";
|
|
85
|
+
if (transport instanceof StdioClientTransport) {
|
|
86
|
+
transport.stderr?.on("data", (chunk) => {
|
|
87
|
+
said = (said + chunk.toString("utf8")).slice(-2_000);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
55
90
|
try {
|
|
56
91
|
await client.connect(transport);
|
|
57
92
|
}
|
|
@@ -62,12 +97,25 @@ export class MelraClient {
|
|
|
62
97
|
if (error instanceof StreamableHTTPError && error.code === 401) {
|
|
63
98
|
throw new Error("melra_unauthorized: the server refused the token; use the one `melra serve` printed or MELRA_HTTP_TOKEN", { cause: error });
|
|
64
99
|
}
|
|
100
|
+
if (transport instanceof StdioClientTransport) {
|
|
101
|
+
// Its last words can land a moment after the transport reports the close.
|
|
102
|
+
await new Promise((settled) => setTimeout(settled, 50));
|
|
103
|
+
if (said.trim() !== "") {
|
|
104
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
105
|
+
throw new Error(`${reason}; the server said: ${said.trim()}`, { cause: error });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
65
108
|
throw error;
|
|
66
109
|
}
|
|
67
|
-
return new MelraClient(client);
|
|
110
|
+
return new MelraClient(client, runTimeoutMs);
|
|
68
111
|
}
|
|
69
|
-
|
|
70
|
-
|
|
112
|
+
/**
|
|
113
|
+
* `long` for the two calls that run effects: the MCP client otherwise gives
|
|
114
|
+
* up after 60 s, while the server goes on running the task and may verify
|
|
115
|
+
* it, and a caller who reads that error as a failure runs it again.
|
|
116
|
+
*/
|
|
117
|
+
async call(name, args, long = false) {
|
|
118
|
+
return parseMelraToolResult(await this.client.callTool({ name, arguments: args }, undefined, long ? { timeout: this.runTimeoutMs } : undefined));
|
|
71
119
|
}
|
|
72
120
|
async capabilities() {
|
|
73
121
|
return await this.call("melra_capabilities", {});
|
|
@@ -84,7 +132,7 @@ export class MelraClient {
|
|
|
84
132
|
return await this.call("melra_execute", {
|
|
85
133
|
taskId,
|
|
86
134
|
...(approval === undefined ? {} : { approval }),
|
|
87
|
-
});
|
|
135
|
+
}, true);
|
|
88
136
|
}
|
|
89
137
|
async status(taskId) {
|
|
90
138
|
return await this.call("melra_task_status", { taskId });
|
|
@@ -117,7 +165,7 @@ export class MelraClient {
|
|
|
117
165
|
approvals,
|
|
118
166
|
inputs,
|
|
119
167
|
});
|
|
120
|
-
return WorkflowAdvanceResultSchema.parse(await this.call("melra_workflow_advance", parsed));
|
|
168
|
+
return WorkflowAdvanceResultSchema.parse(await this.call("melra_workflow_advance", parsed, true));
|
|
121
169
|
}
|
|
122
170
|
async workflowStatus(workflowId) {
|
|
123
171
|
const parsed = WorkflowIdInputSchema.parse({ workflowId });
|
|
@@ -132,6 +180,13 @@ export class MelraClient {
|
|
|
132
180
|
return WorkflowRunSchema.parse(await this.call("melra_workflow_control", parsed));
|
|
133
181
|
}
|
|
134
182
|
async close() {
|
|
183
|
+
// Over HTTP or a socket the session lives on the server until it is ended;
|
|
184
|
+
// closing the client only aborts its requests. Best effort: a server that
|
|
185
|
+
// is already gone has no session left to end.
|
|
186
|
+
const transport = this.client.transport;
|
|
187
|
+
if (transport instanceof StreamableHTTPClientTransport) {
|
|
188
|
+
await endSession(transport);
|
|
189
|
+
}
|
|
135
190
|
await this.client.close();
|
|
136
191
|
}
|
|
137
192
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,sCAAsC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,sCAAsC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,6BAA6B,EAC7B,mBAAmB,GACpB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAOlB,MAAM,iBAAiB,CAAC;AAoBzB;;;GAGG;AACH,MAAM,cAAc,GAAG,OAAO,GAAG,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD,yFAAyF;AACzF,MAAM,cAAc,GAAG,aAAa,CAAC;AA+CrC,MAAM,UAAU,oBAAoB,CAAC,MAAe;IAClD,MAAM,QAAQ,GAAG,MAGhB,CAAC;IACF,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,EAAE,IAAI,CAAC;IAC1E,IAAI,IAAI,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,2B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AAC,UAAkB;QACrC,MAAM,MAAM,GAAG,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;QAC3D,OAAO,iBAAiB,CAAC,KAAK,CAC5B,MAAM,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,MAAM,CAAC,CACjD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,UAAkB;QACrC,MAAM,MAAM,GAAG,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;QAC3D,OAAO,iBAAiB,CAAC,KAAK,CAC5B,MAAM,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,MAAM,CAAC,CACjD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,UAAkB,EAClB,MAAsC;QAEtC,MAAM,MAAM,GAAG,0BAA0B,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC;QACxE,OAAO,iBAAiB,CAAC,KAAK,CAC5B,MAAM,IAAI,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAClD,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,KAAK;QACT,2EAA2E;QAC3E,0EAA0E;QAC1E,8CAA8C;QAC9C,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QACxC,IAAI,SAAS,YAAY,6BAA6B,EAAE,CAAC;YACvD,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC;QAC9B,CAAC;QACD,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@melra/sdk",
|
|
3
|
-
"version": "0.3.0-alpha.
|
|
3
|
+
"version": "0.3.0-alpha.16",
|
|
4
4
|
"description": "TypeScript task and workflow client SDK for MELRA.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@modelcontextprotocol/sdk": "1.32.1",
|
|
25
|
-
"@melra/protocol": "0.3.0-alpha.
|
|
25
|
+
"@melra/protocol": "0.3.0-alpha.16"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@melra/server": "0.3.0-alpha.
|
|
28
|
+
"@melra/server": "0.3.0-alpha.16"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"build": "tsc -p tsconfig.json",
|