@mcpmesh/sdk 2.2.4 → 2.4.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/__tests__/jobs.spec.js +231 -1
- package/dist/__tests__/jobs.spec.js.map +1 -1
- package/dist/__tests__/llm-agent-model-params.test.js +83 -0
- package/dist/__tests__/llm-agent-model-params.test.js.map +1 -1
- package/dist/__tests__/llm-max-iterations.test.d.ts +20 -0
- package/dist/__tests__/llm-max-iterations.test.d.ts.map +1 -0
- package/dist/__tests__/llm-max-iterations.test.js +250 -0
- package/dist/__tests__/llm-max-iterations.test.js.map +1 -0
- package/dist/__tests__/llm-mesh-error-mapping.test.d.ts +16 -0
- package/dist/__tests__/llm-mesh-error-mapping.test.d.ts.map +1 -0
- package/dist/__tests__/llm-mesh-error-mapping.test.js +135 -0
- package/dist/__tests__/llm-mesh-error-mapping.test.js.map +1 -0
- package/dist/__tests__/llm-provider-output-mode.test.d.ts +21 -0
- package/dist/__tests__/llm-provider-output-mode.test.d.ts.map +1 -0
- package/dist/__tests__/llm-provider-output-mode.test.js +115 -0
- package/dist/__tests__/llm-provider-output-mode.test.js.map +1 -0
- package/dist/__tests__/llm-provider-system-synthesis.test.d.ts +20 -0
- package/dist/__tests__/llm-provider-system-synthesis.test.d.ts.map +1 -0
- package/dist/__tests__/llm-provider-system-synthesis.test.js +167 -0
- package/dist/__tests__/llm-provider-system-synthesis.test.js.map +1 -0
- package/dist/__tests__/llm-response-model.test.d.ts +10 -0
- package/dist/__tests__/llm-response-model.test.d.ts.map +1 -0
- package/dist/__tests__/llm-response-model.test.js +92 -0
- package/dist/__tests__/llm-response-model.test.js.map +1 -0
- package/dist/__tests__/proxy-timeout-guard.test.d.ts +12 -0
- package/dist/__tests__/proxy-timeout-guard.test.d.ts.map +1 -0
- package/dist/__tests__/proxy-timeout-guard.test.js +85 -0
- package/dist/__tests__/proxy-timeout-guard.test.js.map +1 -0
- package/dist/__tests__/registry-disconnect-retains-deps.spec.d.ts +2 -0
- package/dist/__tests__/registry-disconnect-retains-deps.spec.d.ts.map +1 -0
- package/dist/__tests__/registry-disconnect-retains-deps.spec.js +101 -0
- package/dist/__tests__/registry-disconnect-retains-deps.spec.js.map +1 -0
- package/dist/__tests__/response-parser.test.js +29 -0
- package/dist/__tests__/response-parser.test.js.map +1 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +4 -0
- package/dist/agent.js.map +1 -1
- package/dist/api-runtime.d.ts.map +1 -1
- package/dist/api-runtime.js +8 -1
- package/dist/api-runtime.js.map +1 -1
- package/dist/express.d.ts.map +1 -1
- package/dist/express.js +8 -1
- package/dist/express.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/jobs.d.ts +191 -0
- package/dist/jobs.d.ts.map +1 -1
- package/dist/jobs.js +198 -1
- package/dist/jobs.js.map +1 -1
- package/dist/llm-agent.d.ts +34 -0
- package/dist/llm-agent.d.ts.map +1 -1
- package/dist/llm-agent.js +239 -434
- package/dist/llm-agent.js.map +1 -1
- package/dist/llm-provider.d.ts +33 -4
- package/dist/llm-provider.d.ts.map +1 -1
- package/dist/llm-provider.js +91 -4
- package/dist/llm-provider.js.map +1 -1
- package/dist/llm.d.ts +1 -1
- package/dist/llm.d.ts.map +1 -1
- package/dist/llm.js +8 -5
- package/dist/llm.js.map +1 -1
- package/dist/provider-handlers/gemini-handler.d.ts.map +1 -1
- package/dist/provider-handlers/gemini-handler.js +2 -14
- package/dist/provider-handlers/gemini-handler.js.map +1 -1
- package/dist/provider-handlers/openai-handler.d.ts.map +1 -1
- package/dist/provider-handlers/openai-handler.js +2 -15
- package/dist/provider-handlers/openai-handler.js.map +1 -1
- package/dist/provider-handlers/provider-handler.d.ts +12 -0
- package/dist/provider-handlers/provider-handler.d.ts.map +1 -1
- package/dist/provider-handlers/provider-handler.js +24 -0
- package/dist/provider-handlers/provider-handler.js.map +1 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +189 -254
- package/dist/proxy.js.map +1 -1
- package/dist/response-parser.d.ts +10 -0
- package/dist/response-parser.d.ts.map +1 -1
- package/dist/response-parser.js +55 -0
- package/dist/response-parser.js.map +1 -1
- package/dist/tracing.d.ts +12 -0
- package/dist/tracing.d.ts.map +1 -1
- package/dist/tracing.js +37 -0
- package/dist/tracing.js.map +1 -1
- package/dist/types.d.ts +10 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/jobs.d.ts
CHANGED
|
@@ -57,6 +57,54 @@ export interface JobEventReceipt {
|
|
|
57
57
|
/** Unix epoch seconds at which the registry created the row. */
|
|
58
58
|
created_at: number;
|
|
59
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Latest job-row snapshot returned by `JobProxy.status` / {@link status}.
|
|
62
|
+
*
|
|
63
|
+
* Matches the registry's OpenAPI `Job` schema field-for-field — the same
|
|
64
|
+
* shape `job_to_json` in `src/runtime/core/src/jobs_napi.rs` produces.
|
|
65
|
+
* Every key is ALWAYS present on the wire: required fields are typed
|
|
66
|
+
* `T`, and Rust `Option<T>` fields are emitted as `T | null` (never
|
|
67
|
+
* absent / `undefined`). The Rust `serde_json::json!` macro the binding
|
|
68
|
+
* uses serialises `None` → `null` for every field unconditionally, so
|
|
69
|
+
* downstream callers can rely on key-presence and only need to null-check
|
|
70
|
+
* the nullable fields.
|
|
71
|
+
*/
|
|
72
|
+
export interface JobStatus {
|
|
73
|
+
/** Server-assigned job UUID. */
|
|
74
|
+
id: string;
|
|
75
|
+
/** Capability the job was submitted against. */
|
|
76
|
+
capability: string;
|
|
77
|
+
/** Instance id of the replica currently holding the lease (if any). */
|
|
78
|
+
owner_instance_id: string | null;
|
|
79
|
+
/** Lifecycle status. */
|
|
80
|
+
status: "working" | "input_required" | "completed" | "failed" | "cancelled";
|
|
81
|
+
/** Latest progress fraction in `[0.0, 1.0]`. */
|
|
82
|
+
progress: number | null;
|
|
83
|
+
/** Latest progress message string. */
|
|
84
|
+
progress_message: string | null;
|
|
85
|
+
/** Terminal result payload (set when `status === "completed"`). */
|
|
86
|
+
result: unknown;
|
|
87
|
+
/** Terminal error reason (set when `status === "failed"` / `"cancelled"`). */
|
|
88
|
+
error: string | null;
|
|
89
|
+
/** Original request payload the job was submitted with. */
|
|
90
|
+
submitted_payload: unknown;
|
|
91
|
+
/** Number of attempts so far (1-indexed). */
|
|
92
|
+
attempt_count: number;
|
|
93
|
+
/** Maximum retries beyond the initial attempt. */
|
|
94
|
+
max_retries: number;
|
|
95
|
+
/** Per-attempt soft timeout in seconds. */
|
|
96
|
+
max_duration: number | null;
|
|
97
|
+
/** Hard ceiling across all attempts, as a unix epoch second. */
|
|
98
|
+
total_deadline: number | null;
|
|
99
|
+
/** Unix epoch second when the current lease expires. */
|
|
100
|
+
lease_expires_at: number | null;
|
|
101
|
+
/** Unix epoch second of the last heartbeat from the owner replica. */
|
|
102
|
+
last_heartbeat_at: number | null;
|
|
103
|
+
/** Unix epoch second the job row was created. */
|
|
104
|
+
submitted_at: number;
|
|
105
|
+
/** Identifier of the agent that submitted the job. */
|
|
106
|
+
submitted_by: string;
|
|
107
|
+
}
|
|
60
108
|
/**
|
|
61
109
|
* The targeted job does not exist (or has been swept) in the registry.
|
|
62
110
|
*
|
|
@@ -218,4 +266,147 @@ export interface SubscribeEventsOptions {
|
|
|
218
266
|
* ```
|
|
219
267
|
*/
|
|
220
268
|
export declare function subscribeEvents(jobId: string, options?: SubscribeEventsOptions): AsyncGenerator<JobEvent, void, unknown>;
|
|
269
|
+
/**
|
|
270
|
+
* Cancel a running job by ID.
|
|
271
|
+
*
|
|
272
|
+
* Convenience helper for callers that hold a `jobId` but do not have a
|
|
273
|
+
* `JobProxy` reference in scope. Constructs (or reuses, via the LRU
|
|
274
|
+
* cache) a transient proxy bound to the current agent's registry URL
|
|
275
|
+
* and forwards the call.
|
|
276
|
+
*
|
|
277
|
+
* Per the registry's idempotency contract, calling `cancel` on a job
|
|
278
|
+
* that is already in a terminal state returns successfully without
|
|
279
|
+
* re-firing cancellation. If the registry surfaces a conflict for
|
|
280
|
+
* some other reason, the facade re-classifies it as
|
|
281
|
+
* {@link JobTerminalError}. The registry forwards the cancel signal to
|
|
282
|
+
* the owner replica via `POST /jobs/{id}/cancel`; the running handler's
|
|
283
|
+
* cancel token fires on the next `await` point, and any outbound
|
|
284
|
+
* `McpMeshTool` proxy calls abort their underlying `fetch`.
|
|
285
|
+
*
|
|
286
|
+
* Mirrors Python's `mesh.jobs.cancel` one-for-one.
|
|
287
|
+
*
|
|
288
|
+
* @param jobId - Target job's server-assigned id.
|
|
289
|
+
* @param reason - Optional human-readable reason recorded against the
|
|
290
|
+
* cancellation. Surfaces in the synthetic
|
|
291
|
+
* `{ type: "cancelled" }` event the registry writes into the job's
|
|
292
|
+
* event log, so a handler parked on `recvEvent(["cancelled"])` can
|
|
293
|
+
* return cleanly with the reason in scope.
|
|
294
|
+
*
|
|
295
|
+
* @throws {@link JobNotFoundError} If the registry doesn't know the
|
|
296
|
+
* job (sweep already removed it, or wrong id).
|
|
297
|
+
* @throws {@link JobTerminalError} If the registry surfaces a conflict
|
|
298
|
+
* for this cancel (e.g. the idempotency contract changes upstream or
|
|
299
|
+
* the registry treats the targeted terminal state as a conflict).
|
|
300
|
+
* @throws Error For transport errors (registry unreachable, 5xx after
|
|
301
|
+
* retries, malformed payload, etc.) — the underlying error message
|
|
302
|
+
* is preserved.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* Cancel a job from a tool that receives the id in its payload:
|
|
306
|
+
* ```ts
|
|
307
|
+
* agent.addTool({
|
|
308
|
+
* name: "abort_workflow",
|
|
309
|
+
* capability: "abort_workflow",
|
|
310
|
+
* parameters: z.object({ jobId: z.string(), reason: z.string() }),
|
|
311
|
+
* execute: async ({ jobId, reason }) => {
|
|
312
|
+
* await mesh.jobs.cancel(jobId, reason);
|
|
313
|
+
* return { cancelled: jobId };
|
|
314
|
+
* },
|
|
315
|
+
* });
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
export declare function cancel(jobId: string, reason?: string): Promise<void>;
|
|
319
|
+
/**
|
|
320
|
+
* Get the current status of a job by ID.
|
|
321
|
+
*
|
|
322
|
+
* Convenience helper for callers that hold a `jobId` but do not have a
|
|
323
|
+
* `JobProxy` reference in scope. Constructs (or reuses, via the LRU
|
|
324
|
+
* cache) a transient proxy bound to the current agent's registry URL
|
|
325
|
+
* and forwards a single `GET /jobs/{id}` to the registry.
|
|
326
|
+
*
|
|
327
|
+
* Mirrors Python's `mesh.jobs.status` one-for-one.
|
|
328
|
+
*
|
|
329
|
+
* @param jobId - Target job's server-assigned id.
|
|
330
|
+
* @returns Job status snapshot — the same shape `JobProxy.status()`
|
|
331
|
+
* returns, mirroring the registry's `Job` schema field-for-field.
|
|
332
|
+
*
|
|
333
|
+
* @throws {@link JobNotFoundError} If the registry doesn't know the
|
|
334
|
+
* job (sweep already removed it, or wrong id).
|
|
335
|
+
* @throws Error For transport errors (registry unreachable, 5xx after
|
|
336
|
+
* retries, malformed payload, etc.) — the underlying error message
|
|
337
|
+
* is preserved.
|
|
338
|
+
*
|
|
339
|
+
* @example
|
|
340
|
+
* Poll a job's progress from outside the producer agent:
|
|
341
|
+
* ```ts
|
|
342
|
+
* agent.addTool({
|
|
343
|
+
* name: "check_progress",
|
|
344
|
+
* capability: "check_progress",
|
|
345
|
+
* parameters: z.object({ jobId: z.string() }),
|
|
346
|
+
* execute: async ({ jobId }) => {
|
|
347
|
+
* const snapshot = await mesh.jobs.status(jobId);
|
|
348
|
+
* return {
|
|
349
|
+
* status: snapshot.status,
|
|
350
|
+
* progress: snapshot.progress,
|
|
351
|
+
* message: snapshot.progress_message,
|
|
352
|
+
* };
|
|
353
|
+
* },
|
|
354
|
+
* });
|
|
355
|
+
* ```
|
|
356
|
+
*/
|
|
357
|
+
export declare function status(jobId: string): Promise<JobStatus>;
|
|
358
|
+
/**
|
|
359
|
+
* Wait for a job to complete and return its result.
|
|
360
|
+
*
|
|
361
|
+
* Convenience helper for callers that hold a `jobId` but do not have a
|
|
362
|
+
* `JobProxy` reference in scope. Constructs (or reuses, via the LRU
|
|
363
|
+
* cache) a transient proxy bound to the current agent's registry URL
|
|
364
|
+
* and polls until the job reaches a terminal state.
|
|
365
|
+
*
|
|
366
|
+
* On success, returns the `result` payload the handler passed to
|
|
367
|
+
* `JobController.complete` — any JSON-shaped value (object / array /
|
|
368
|
+
* primitive). On a non-success terminal (`failed` / `cancelled`) the
|
|
369
|
+
* underlying napi layer rejects with a generic `Error` carrying the
|
|
370
|
+
* Rust `JobError` display string. On `timeoutSecs` expiry the napi
|
|
371
|
+
* layer rejects with an `Error` whose message starts with
|
|
372
|
+
* `"timeout:"` — `translateJobError` does NOT (currently) re-classify
|
|
373
|
+
* this into a typed exception; callers that need to discriminate
|
|
374
|
+
* timeout from other failures should check `err.message.startsWith(
|
|
375
|
+
* "timeout:")`. A typed `TimeoutError` may be added in a future PR
|
|
376
|
+
* if usage warrants it.
|
|
377
|
+
*
|
|
378
|
+
* Mirrors Python's `mesh.jobs.wait` one-for-one.
|
|
379
|
+
*
|
|
380
|
+
* @param jobId - Target job's server-assigned id.
|
|
381
|
+
* @param timeoutSecs - Maximum wait duration in seconds. `undefined` /
|
|
382
|
+
* `null` ≡ no timeout (default) — wait until the job reaches a
|
|
383
|
+
* terminal state. Negative / NaN / infinite values are rejected by
|
|
384
|
+
* the napi layer with a clear `Error` before any registry call.
|
|
385
|
+
* @returns The job's result payload (whatever the handler passed to
|
|
386
|
+
* `complete()`). Shape is application-defined — typically an object,
|
|
387
|
+
* but any JSON-shaped value is valid.
|
|
388
|
+
*
|
|
389
|
+
* @throws {@link JobNotFoundError} If the registry doesn't know the
|
|
390
|
+
* job (sweep already removed it, or wrong id).
|
|
391
|
+
* @throws Error With message prefixed `"timeout:"` if `timeoutSecs`
|
|
392
|
+
* elapses before the job reaches a terminal state.
|
|
393
|
+
* @throws Error If the job reached a non-success terminal state
|
|
394
|
+
* (`failed` / `cancelled`) or for transport errors — the underlying
|
|
395
|
+
* error message is preserved.
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* Submit-then-wait from a tool that doesn't hold the proxy:
|
|
399
|
+
* ```ts
|
|
400
|
+
* agent.addTool({
|
|
401
|
+
* name: "run_to_completion",
|
|
402
|
+
* capability: "run_to_completion",
|
|
403
|
+
* parameters: z.object({ jobId: z.string() }),
|
|
404
|
+
* execute: async ({ jobId }) => {
|
|
405
|
+
* const result = await mesh.jobs.wait(jobId, 300);
|
|
406
|
+
* return { result };
|
|
407
|
+
* },
|
|
408
|
+
* });
|
|
409
|
+
* ```
|
|
410
|
+
*/
|
|
411
|
+
export declare function wait(jobId: string, timeoutSecs?: number): Promise<unknown>;
|
|
221
412
|
//# sourceMappingURL=jobs.d.ts.map
|
package/dist/jobs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../src/jobs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,aAAa,EAAE,OAAO,CAAC;IACvB,iEAAiE;IACjE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,GAA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C,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAuB,eAAe,CACpC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,sBAA2B,GACnC,cAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAmEzC;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAY1E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAY9D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAsB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAYhF"}
|
package/dist/jobs.js
CHANGED
|
@@ -188,7 +188,7 @@ export function _clearProxyCache() {
|
|
|
188
188
|
function resolveRegistryUrl() {
|
|
189
189
|
const url = process.env.MCP_MESH_REGISTRY_URL;
|
|
190
190
|
if (!url) {
|
|
191
|
-
throw new Error("mesh.jobs
|
|
191
|
+
throw new Error("mesh.jobs: MCP_MESH_REGISTRY_URL is not set; " +
|
|
192
192
|
"cannot resolve registry base URL. Ensure the calling " +
|
|
193
193
|
"process is running inside a mesh agent.");
|
|
194
194
|
}
|
|
@@ -360,4 +360,201 @@ export async function* subscribeEvents(jobId, options = {}) {
|
|
|
360
360
|
cursor = nextAfter;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
+
// ---------------------------------------------------------------------------
|
|
364
|
+
// cancel / status / wait — DDDI-clean lifecycle facades (issue #1078)
|
|
365
|
+
// ---------------------------------------------------------------------------
|
|
366
|
+
//
|
|
367
|
+
// Mirror the `postEvent` / `subscribeEvents` pattern: take a `jobId` as
|
|
368
|
+
// the first positional arg, resolve the registry URL internally via
|
|
369
|
+
// `resolveRegistryUrl()`, dispatch through a cached `JobProxy` from
|
|
370
|
+
// `_getOrCreateProxy()`, and re-classify the napi layer's generic
|
|
371
|
+
// `Error` output via `translateJobError`.
|
|
372
|
+
//
|
|
373
|
+
// These exist so callers that hold only a `jobId` (e.g. an Express
|
|
374
|
+
// route handler, a tool body whose request payload carries a stashed
|
|
375
|
+
// id) can operate on the job's lifecycle without constructing a
|
|
376
|
+
// `JobProxy` directly — which would leak `MCP_MESH_REGISTRY_URL`
|
|
377
|
+
// addressing into user code and break the DDDI contract.
|
|
378
|
+
/**
|
|
379
|
+
* Cancel a running job by ID.
|
|
380
|
+
*
|
|
381
|
+
* Convenience helper for callers that hold a `jobId` but do not have a
|
|
382
|
+
* `JobProxy` reference in scope. Constructs (or reuses, via the LRU
|
|
383
|
+
* cache) a transient proxy bound to the current agent's registry URL
|
|
384
|
+
* and forwards the call.
|
|
385
|
+
*
|
|
386
|
+
* Per the registry's idempotency contract, calling `cancel` on a job
|
|
387
|
+
* that is already in a terminal state returns successfully without
|
|
388
|
+
* re-firing cancellation. If the registry surfaces a conflict for
|
|
389
|
+
* some other reason, the facade re-classifies it as
|
|
390
|
+
* {@link JobTerminalError}. The registry forwards the cancel signal to
|
|
391
|
+
* the owner replica via `POST /jobs/{id}/cancel`; the running handler's
|
|
392
|
+
* cancel token fires on the next `await` point, and any outbound
|
|
393
|
+
* `McpMeshTool` proxy calls abort their underlying `fetch`.
|
|
394
|
+
*
|
|
395
|
+
* Mirrors Python's `mesh.jobs.cancel` one-for-one.
|
|
396
|
+
*
|
|
397
|
+
* @param jobId - Target job's server-assigned id.
|
|
398
|
+
* @param reason - Optional human-readable reason recorded against the
|
|
399
|
+
* cancellation. Surfaces in the synthetic
|
|
400
|
+
* `{ type: "cancelled" }` event the registry writes into the job's
|
|
401
|
+
* event log, so a handler parked on `recvEvent(["cancelled"])` can
|
|
402
|
+
* return cleanly with the reason in scope.
|
|
403
|
+
*
|
|
404
|
+
* @throws {@link JobNotFoundError} If the registry doesn't know the
|
|
405
|
+
* job (sweep already removed it, or wrong id).
|
|
406
|
+
* @throws {@link JobTerminalError} If the registry surfaces a conflict
|
|
407
|
+
* for this cancel (e.g. the idempotency contract changes upstream or
|
|
408
|
+
* the registry treats the targeted terminal state as a conflict).
|
|
409
|
+
* @throws Error For transport errors (registry unreachable, 5xx after
|
|
410
|
+
* retries, malformed payload, etc.) — the underlying error message
|
|
411
|
+
* is preserved.
|
|
412
|
+
*
|
|
413
|
+
* @example
|
|
414
|
+
* Cancel a job from a tool that receives the id in its payload:
|
|
415
|
+
* ```ts
|
|
416
|
+
* agent.addTool({
|
|
417
|
+
* name: "abort_workflow",
|
|
418
|
+
* capability: "abort_workflow",
|
|
419
|
+
* parameters: z.object({ jobId: z.string(), reason: z.string() }),
|
|
420
|
+
* execute: async ({ jobId, reason }) => {
|
|
421
|
+
* await mesh.jobs.cancel(jobId, reason);
|
|
422
|
+
* return { cancelled: jobId };
|
|
423
|
+
* },
|
|
424
|
+
* });
|
|
425
|
+
* ```
|
|
426
|
+
*/
|
|
427
|
+
export async function cancel(jobId, reason) {
|
|
428
|
+
const registryUrl = resolveRegistryUrl();
|
|
429
|
+
const proxy = _getOrCreateProxy(registryUrl, jobId);
|
|
430
|
+
try {
|
|
431
|
+
await proxy.cancel(reason ?? null);
|
|
432
|
+
}
|
|
433
|
+
catch (err) {
|
|
434
|
+
const translated = translateJobError(err);
|
|
435
|
+
if (translated !== err) {
|
|
436
|
+
throw translated;
|
|
437
|
+
}
|
|
438
|
+
throw err;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Get the current status of a job by ID.
|
|
443
|
+
*
|
|
444
|
+
* Convenience helper for callers that hold a `jobId` but do not have a
|
|
445
|
+
* `JobProxy` reference in scope. Constructs (or reuses, via the LRU
|
|
446
|
+
* cache) a transient proxy bound to the current agent's registry URL
|
|
447
|
+
* and forwards a single `GET /jobs/{id}` to the registry.
|
|
448
|
+
*
|
|
449
|
+
* Mirrors Python's `mesh.jobs.status` one-for-one.
|
|
450
|
+
*
|
|
451
|
+
* @param jobId - Target job's server-assigned id.
|
|
452
|
+
* @returns Job status snapshot — the same shape `JobProxy.status()`
|
|
453
|
+
* returns, mirroring the registry's `Job` schema field-for-field.
|
|
454
|
+
*
|
|
455
|
+
* @throws {@link JobNotFoundError} If the registry doesn't know the
|
|
456
|
+
* job (sweep already removed it, or wrong id).
|
|
457
|
+
* @throws Error For transport errors (registry unreachable, 5xx after
|
|
458
|
+
* retries, malformed payload, etc.) — the underlying error message
|
|
459
|
+
* is preserved.
|
|
460
|
+
*
|
|
461
|
+
* @example
|
|
462
|
+
* Poll a job's progress from outside the producer agent:
|
|
463
|
+
* ```ts
|
|
464
|
+
* agent.addTool({
|
|
465
|
+
* name: "check_progress",
|
|
466
|
+
* capability: "check_progress",
|
|
467
|
+
* parameters: z.object({ jobId: z.string() }),
|
|
468
|
+
* execute: async ({ jobId }) => {
|
|
469
|
+
* const snapshot = await mesh.jobs.status(jobId);
|
|
470
|
+
* return {
|
|
471
|
+
* status: snapshot.status,
|
|
472
|
+
* progress: snapshot.progress,
|
|
473
|
+
* message: snapshot.progress_message,
|
|
474
|
+
* };
|
|
475
|
+
* },
|
|
476
|
+
* });
|
|
477
|
+
* ```
|
|
478
|
+
*/
|
|
479
|
+
export async function status(jobId) {
|
|
480
|
+
const registryUrl = resolveRegistryUrl();
|
|
481
|
+
const proxy = _getOrCreateProxy(registryUrl, jobId);
|
|
482
|
+
try {
|
|
483
|
+
return (await proxy.status());
|
|
484
|
+
}
|
|
485
|
+
catch (err) {
|
|
486
|
+
const translated = translateJobError(err);
|
|
487
|
+
if (translated !== err) {
|
|
488
|
+
throw translated;
|
|
489
|
+
}
|
|
490
|
+
throw err;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Wait for a job to complete and return its result.
|
|
495
|
+
*
|
|
496
|
+
* Convenience helper for callers that hold a `jobId` but do not have a
|
|
497
|
+
* `JobProxy` reference in scope. Constructs (or reuses, via the LRU
|
|
498
|
+
* cache) a transient proxy bound to the current agent's registry URL
|
|
499
|
+
* and polls until the job reaches a terminal state.
|
|
500
|
+
*
|
|
501
|
+
* On success, returns the `result` payload the handler passed to
|
|
502
|
+
* `JobController.complete` — any JSON-shaped value (object / array /
|
|
503
|
+
* primitive). On a non-success terminal (`failed` / `cancelled`) the
|
|
504
|
+
* underlying napi layer rejects with a generic `Error` carrying the
|
|
505
|
+
* Rust `JobError` display string. On `timeoutSecs` expiry the napi
|
|
506
|
+
* layer rejects with an `Error` whose message starts with
|
|
507
|
+
* `"timeout:"` — `translateJobError` does NOT (currently) re-classify
|
|
508
|
+
* this into a typed exception; callers that need to discriminate
|
|
509
|
+
* timeout from other failures should check `err.message.startsWith(
|
|
510
|
+
* "timeout:")`. A typed `TimeoutError` may be added in a future PR
|
|
511
|
+
* if usage warrants it.
|
|
512
|
+
*
|
|
513
|
+
* Mirrors Python's `mesh.jobs.wait` one-for-one.
|
|
514
|
+
*
|
|
515
|
+
* @param jobId - Target job's server-assigned id.
|
|
516
|
+
* @param timeoutSecs - Maximum wait duration in seconds. `undefined` /
|
|
517
|
+
* `null` ≡ no timeout (default) — wait until the job reaches a
|
|
518
|
+
* terminal state. Negative / NaN / infinite values are rejected by
|
|
519
|
+
* the napi layer with a clear `Error` before any registry call.
|
|
520
|
+
* @returns The job's result payload (whatever the handler passed to
|
|
521
|
+
* `complete()`). Shape is application-defined — typically an object,
|
|
522
|
+
* but any JSON-shaped value is valid.
|
|
523
|
+
*
|
|
524
|
+
* @throws {@link JobNotFoundError} If the registry doesn't know the
|
|
525
|
+
* job (sweep already removed it, or wrong id).
|
|
526
|
+
* @throws Error With message prefixed `"timeout:"` if `timeoutSecs`
|
|
527
|
+
* elapses before the job reaches a terminal state.
|
|
528
|
+
* @throws Error If the job reached a non-success terminal state
|
|
529
|
+
* (`failed` / `cancelled`) or for transport errors — the underlying
|
|
530
|
+
* error message is preserved.
|
|
531
|
+
*
|
|
532
|
+
* @example
|
|
533
|
+
* Submit-then-wait from a tool that doesn't hold the proxy:
|
|
534
|
+
* ```ts
|
|
535
|
+
* agent.addTool({
|
|
536
|
+
* name: "run_to_completion",
|
|
537
|
+
* capability: "run_to_completion",
|
|
538
|
+
* parameters: z.object({ jobId: z.string() }),
|
|
539
|
+
* execute: async ({ jobId }) => {
|
|
540
|
+
* const result = await mesh.jobs.wait(jobId, 300);
|
|
541
|
+
* return { result };
|
|
542
|
+
* },
|
|
543
|
+
* });
|
|
544
|
+
* ```
|
|
545
|
+
*/
|
|
546
|
+
export async function wait(jobId, timeoutSecs) {
|
|
547
|
+
const registryUrl = resolveRegistryUrl();
|
|
548
|
+
const proxy = _getOrCreateProxy(registryUrl, jobId);
|
|
549
|
+
try {
|
|
550
|
+
return await proxy.wait(timeoutSecs ?? null);
|
|
551
|
+
}
|
|
552
|
+
catch (err) {
|
|
553
|
+
const translated = translateJobError(err);
|
|
554
|
+
if (translated !== err) {
|
|
555
|
+
throw translated;
|
|
556
|
+
}
|
|
557
|
+
throw err;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
363
560
|
//# sourceMappingURL=jobs.js.map
|
package/dist/jobs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../src/jobs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../src/jobs.ts"],"names":[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K,GAAG,iBAAiB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACpD,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,KAAK,CAAC,MAAM,EAAE,CAAc,CAAC;IAC7C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC1C,IAAI,UAAU,KAAK,GAAG,EAAE,CAAC;YACvB,MAAM,UAAU,CAAC;QACnB,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI,CAAC,KAAa,EAAE,WAAoB;IAC5D,MAAM,WAAW,GAAG,kBAAkB,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,iBAAiB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACpD,IAAI,CAAC;QACH,OAAO,MAAM,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC;IAC/C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC1C,IAAI,UAAU,KAAK,GAAG,EAAE,CAAC;YACvB,MAAM,UAAU,CAAC;QACnB,CAAC;QACD,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
package/dist/llm-agent.d.ts
CHANGED
|
@@ -93,6 +93,8 @@ export interface LlmProvider {
|
|
|
93
93
|
name: string;
|
|
94
94
|
};
|
|
95
95
|
modelParams?: Record<string, unknown>;
|
|
96
|
+
maxIterations?: number;
|
|
97
|
+
outputMode?: LlmOutputMode;
|
|
96
98
|
}): Promise<LlmCompletionResponse>;
|
|
97
99
|
}
|
|
98
100
|
/**
|
|
@@ -103,6 +105,16 @@ export declare class MeshDelegatedProvider implements LlmProvider {
|
|
|
103
105
|
private functionName;
|
|
104
106
|
private parallelToolCalls;
|
|
105
107
|
constructor(endpoint: string, functionName: string, parallelToolCalls?: boolean);
|
|
108
|
+
/**
|
|
109
|
+
* Build the MeshLlmRequest body shared by complete() and streamComplete().
|
|
110
|
+
*
|
|
111
|
+
* Assembles model_params (with the escape-hatch merge + typed overrides),
|
|
112
|
+
* wraps messages/tools into the MeshLlmRequest, and returns it pre-wrapped
|
|
113
|
+
* in the ``{ request }`` arguments object. Callers inject trace context /
|
|
114
|
+
* propagated headers into ``args`` afterward (per-caller — complete() uses
|
|
115
|
+
* injectTraceAndHeaders, streamComplete() lets streamMcpTool() handle it).
|
|
116
|
+
*/
|
|
117
|
+
private buildMeshLlmRequest;
|
|
106
118
|
complete(model: string, messages: LlmMessage[], tools?: LlmToolDefinition[], options?: {
|
|
107
119
|
maxOutputTokens?: number;
|
|
108
120
|
temperature?: number;
|
|
@@ -113,6 +125,8 @@ export declare class MeshDelegatedProvider implements LlmProvider {
|
|
|
113
125
|
name: string;
|
|
114
126
|
};
|
|
115
127
|
modelParams?: Record<string, unknown>;
|
|
128
|
+
maxIterations?: number;
|
|
129
|
+
outputMode?: LlmOutputMode;
|
|
116
130
|
}): Promise<LlmCompletionResponse>;
|
|
117
131
|
/**
|
|
118
132
|
* Stream chunks from the mesh-delegated provider's streaming variant.
|
|
@@ -137,6 +151,8 @@ export declare class MeshDelegatedProvider implements LlmProvider {
|
|
|
137
151
|
name: string;
|
|
138
152
|
};
|
|
139
153
|
modelParams?: Record<string, unknown>;
|
|
154
|
+
maxIterations?: number;
|
|
155
|
+
outputMode?: LlmOutputMode;
|
|
140
156
|
}): AsyncGenerator<string, void, void>;
|
|
141
157
|
}
|
|
142
158
|
/**
|
|
@@ -148,7 +164,14 @@ export declare class MeshLlmAgent<T = string> {
|
|
|
148
164
|
private _meta;
|
|
149
165
|
private _systemPromptOverride;
|
|
150
166
|
private _parallelLogEmitted;
|
|
167
|
+
private _outputSchema;
|
|
168
|
+
private _outputSchemaSection;
|
|
151
169
|
constructor(config: MeshLlmAgentConfig);
|
|
170
|
+
/**
|
|
171
|
+
* Build (once) the provider output schema from the immutable returnSchema.
|
|
172
|
+
* Returns `undefined` when there is no schema or conversion failed.
|
|
173
|
+
*/
|
|
174
|
+
private getOutputSchema;
|
|
152
175
|
/**
|
|
153
176
|
* Get metadata from the last run.
|
|
154
177
|
*/
|
|
@@ -161,6 +184,17 @@ export declare class MeshLlmAgent<T = string> {
|
|
|
161
184
|
* Get the effective system prompt (override or config).
|
|
162
185
|
*/
|
|
163
186
|
private getSystemPrompt;
|
|
187
|
+
/**
|
|
188
|
+
* Build the initial LlmMessage[] shared by run() and stream():
|
|
189
|
+
* render the system prompt (+ tool schema injection), optionally append the
|
|
190
|
+
* output-schema hint, resolve media inputs, and unwind multi-turn history
|
|
191
|
+
* (attaching resolved media to the last user message).
|
|
192
|
+
*
|
|
193
|
+
* The ONLY behavioral knob is opts.includeOutputSchemaHint:
|
|
194
|
+
* - run() passes `!meshDelegated` (consumer-side schema hint when not delegated).
|
|
195
|
+
* - stream() passes `false` (always mesh-delegated; provider applies formatting).
|
|
196
|
+
*/
|
|
197
|
+
private buildAgentMessages;
|
|
164
198
|
/**
|
|
165
199
|
* Run the agentic loop.
|
|
166
200
|
*
|
package/dist/llm-agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-agent.d.ts","sourceRoot":"","sources":["../src/llm-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAEnC,OAAO,KAAK,EACV,eAAe,EACf,OAAO,EAGP,UAAU,EACV,iBAAiB,EAEjB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,EAEd,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"llm-agent.d.ts","sourceRoot":"","sources":["../src/llm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