@mantyx/sdk 2026.9.2 → 2026.9.3
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/CHANGELOG.md +4 -1
- package/README.md +0 -4
- package/dist/a2a-server.cjs +0 -2
- package/dist/a2a-server.d.ts +0 -2
- package/dist/a2a-server.js +1 -3
- package/dist/{chunk-XMNAWLMF.js → chunk-G46SVM2Q.js} +0 -3
- package/dist/client.d.ts +0 -9
- package/dist/index.cjs +1 -4
- package/dist/index.js +2 -2
- package/dist/version.d.ts +1 -1
- package/docs/agent-runs-protocol.md +0 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,10 @@ and new releases use calendar versions (`YYYY.M.RELEASE`). Historical versions r
|
|
|
8
8
|
### Added
|
|
9
9
|
|
|
10
10
|
- Cursor-based session pagination and bounded session event pages (SDK PR #9).
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
### Removed
|
|
13
|
+
|
|
14
|
+
- Experimental `newLoop` opt-in for the reviewed harness loop. Agent runs use the existing loop.
|
|
12
15
|
|
|
13
16
|
### Changed
|
|
14
17
|
|
package/README.md
CHANGED
|
@@ -24,10 +24,6 @@ and the messaging-layer reference in [`docs/wire-protocol.md`](./docs/wire-proto
|
|
|
24
24
|
resolved data structures (`a2a_local` Agent Card, `mcp_local` `Tool[]`)
|
|
25
25
|
that this SDK ships.
|
|
26
26
|
|
|
27
|
-
## Harness loop selection
|
|
28
|
-
|
|
29
|
-
Pass `newLoop: true` when running an agent, creating a session, or starting an eval to opt into the reviewed harness loop. Omission keeps external runs on the existing loop. Session turns inherit the session setting; an explicit false overrides it for that turn. Use `session.send(prompt, { newLoop: false })`.
|
|
30
|
-
|
|
31
27
|
## Install
|
|
32
28
|
|
|
33
29
|
```bash
|
package/dist/a2a-server.cjs
CHANGED
|
@@ -348,7 +348,6 @@ function specForRun(spec) {
|
|
|
348
348
|
if (spec.systemPrompt) out.systemPrompt = spec.systemPrompt;
|
|
349
349
|
if (spec.modelId) out.modelId = spec.modelId;
|
|
350
350
|
if (spec.tools) out.tools = spec.tools;
|
|
351
|
-
if (spec.newLoop !== void 0) out.newLoop = spec.newLoop;
|
|
352
351
|
if (spec.reasoningLevel !== void 0) out.reasoningLevel = spec.reasoningLevel;
|
|
353
352
|
if (spec.outputSchema !== void 0) out.outputSchema = spec.outputSchema;
|
|
354
353
|
if (spec.metadata) out.metadata = spec.metadata;
|
|
@@ -362,7 +361,6 @@ function specForSession(spec, contextId) {
|
|
|
362
361
|
if (spec.systemPrompt) out.systemPrompt = spec.systemPrompt;
|
|
363
362
|
if (spec.modelId) out.modelId = spec.modelId;
|
|
364
363
|
if (spec.tools) out.tools = spec.tools;
|
|
365
|
-
if (spec.newLoop !== void 0) out.newLoop = spec.newLoop;
|
|
366
364
|
if (spec.reasoningLevel !== void 0) out.reasoningLevel = spec.reasoningLevel;
|
|
367
365
|
if (spec.outputSchema !== void 0) out.outputSchema = spec.outputSchema;
|
|
368
366
|
const meta = { ...spec.metadata ?? {} };
|
package/dist/a2a-server.d.ts
CHANGED
|
@@ -58,8 +58,6 @@ export interface MantyxAgentSpec {
|
|
|
58
58
|
systemPrompt?: string;
|
|
59
59
|
modelId?: string;
|
|
60
60
|
tools?: ToolRef[];
|
|
61
|
-
/** Opt into the verified loop; omission preserves legacy behavior or session inheritance. */
|
|
62
|
-
newLoop?: boolean;
|
|
63
61
|
reasoningLevel?: ReasoningLevel;
|
|
64
62
|
/**
|
|
65
63
|
* Constrains the model's final assistant text to a JSON document matching
|
package/dist/a2a-server.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MantyxError,
|
|
3
3
|
MantyxRunError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-G46SVM2Q.js";
|
|
5
5
|
|
|
6
6
|
// src/a2a-server.ts
|
|
7
7
|
var MantyxAgentExecutor = class {
|
|
@@ -256,7 +256,6 @@ function specForRun(spec) {
|
|
|
256
256
|
if (spec.systemPrompt) out.systemPrompt = spec.systemPrompt;
|
|
257
257
|
if (spec.modelId) out.modelId = spec.modelId;
|
|
258
258
|
if (spec.tools) out.tools = spec.tools;
|
|
259
|
-
if (spec.newLoop !== void 0) out.newLoop = spec.newLoop;
|
|
260
259
|
if (spec.reasoningLevel !== void 0) out.reasoningLevel = spec.reasoningLevel;
|
|
261
260
|
if (spec.outputSchema !== void 0) out.outputSchema = spec.outputSchema;
|
|
262
261
|
if (spec.metadata) out.metadata = spec.metadata;
|
|
@@ -270,7 +269,6 @@ function specForSession(spec, contextId) {
|
|
|
270
269
|
if (spec.systemPrompt) out.systemPrompt = spec.systemPrompt;
|
|
271
270
|
if (spec.modelId) out.modelId = spec.modelId;
|
|
272
271
|
if (spec.tools) out.tools = spec.tools;
|
|
273
|
-
if (spec.newLoop !== void 0) out.newLoop = spec.newLoop;
|
|
274
272
|
if (spec.reasoningLevel !== void 0) out.reasoningLevel = spec.reasoningLevel;
|
|
275
273
|
if (spec.outputSchema !== void 0) out.outputSchema = spec.outputSchema;
|
|
276
274
|
const meta = { ...spec.metadata ?? {} };
|
|
@@ -1427,7 +1427,6 @@ var AgentSession = class {
|
|
|
1427
1427
|
}
|
|
1428
1428
|
if (this.tools.length > 0) body.tools = serializeToolRefs(this.tools);
|
|
1429
1429
|
if (opts.metadata && Object.keys(opts.metadata).length > 0) body.metadata = opts.metadata;
|
|
1430
|
-
if (opts.newLoop !== void 0) body.newLoop = opts.newLoop;
|
|
1431
1430
|
if (opts.reasoningLevel !== void 0) {
|
|
1432
1431
|
body.reasoningLevel = normalizeReasoningLevel(opts.reasoningLevel);
|
|
1433
1432
|
}
|
|
@@ -1513,7 +1512,6 @@ function serializeAgentSpec(spec, extra = {}) {
|
|
|
1513
1512
|
if (spec.agentId) body.agentId = spec.agentId;
|
|
1514
1513
|
if (spec.name) body.name = spec.name;
|
|
1515
1514
|
if (spec.modelId) body.modelId = spec.modelId;
|
|
1516
|
-
if (spec.newLoop !== void 0) body.newLoop = spec.newLoop;
|
|
1517
1515
|
if (spec.reasoningLevel !== void 0) {
|
|
1518
1516
|
body.reasoningLevel = normalizeReasoningLevel(spec.reasoningLevel);
|
|
1519
1517
|
}
|
|
@@ -1553,7 +1551,6 @@ function serializeCreateEvalRunRequest(spec) {
|
|
|
1553
1551
|
throw new MantyxError("createEvalRun accepts only one of `agentId` or `agent`");
|
|
1554
1552
|
}
|
|
1555
1553
|
const body = {};
|
|
1556
|
-
if (spec.newLoop !== void 0) body.newLoop = spec.newLoop;
|
|
1557
1554
|
if (spec.datasetId) body.datasetId = spec.datasetId;
|
|
1558
1555
|
if (spec.dataset) body.dataset = spec.dataset;
|
|
1559
1556
|
if (spec.agentId) body.agentId = spec.agentId;
|
package/dist/client.d.ts
CHANGED
|
@@ -102,7 +102,6 @@ export interface AgentEvalOverrides {
|
|
|
102
102
|
}
|
|
103
103
|
/** Body for `POST /eval-runs`. Exactly one of `datasetId`/`dataset` and `agentId`/`agent`. */
|
|
104
104
|
export interface CreateEvalRunRequest {
|
|
105
|
-
newLoop?: boolean;
|
|
106
105
|
datasetId?: string;
|
|
107
106
|
dataset?: InlineEvalDatasetSpec;
|
|
108
107
|
agentId?: string;
|
|
@@ -343,8 +342,6 @@ export interface AgentSpecBase {
|
|
|
343
342
|
systemPrompt?: string;
|
|
344
343
|
modelId?: string;
|
|
345
344
|
tools?: ToolRef[];
|
|
346
|
-
/** Opt into the verified loop; omission preserves legacy behavior or session inheritance. */
|
|
347
|
-
newLoop?: boolean;
|
|
348
345
|
/**
|
|
349
346
|
* Provider thinking strength: a string anchor (`"off" | "low" | "medium" |
|
|
350
347
|
* "high"`) or an integer in `0..100` (where `0` explicitly disables provider
|
|
@@ -1259,8 +1256,6 @@ export declare class AgentSession {
|
|
|
1259
1256
|
* Per-message override for `reasoningLevel`. Applies only to this run
|
|
1260
1257
|
* and does not mutate the session's stored value.
|
|
1261
1258
|
*/
|
|
1262
|
-
/** Opt into the verified loop; omission preserves legacy behavior or session inheritance. */
|
|
1263
|
-
newLoop?: boolean;
|
|
1264
1259
|
reasoningLevel?: ReasoningLevel;
|
|
1265
1260
|
/**
|
|
1266
1261
|
* Per-message override for `outputSchema`. Applies only to this run
|
|
@@ -1294,8 +1289,6 @@ export declare class AgentSession {
|
|
|
1294
1289
|
signal?: AbortSignal;
|
|
1295
1290
|
attachments?: MessageAttachment[];
|
|
1296
1291
|
metadata?: Record<string, string>;
|
|
1297
|
-
/** Opt into the verified loop; omission preserves legacy behavior or session inheritance. */
|
|
1298
|
-
newLoop?: boolean;
|
|
1299
1292
|
reasoningLevel?: ReasoningLevel;
|
|
1300
1293
|
outputSchema?: OutputSchema;
|
|
1301
1294
|
loopDetection?: LoopDetection | false;
|
|
@@ -1311,8 +1304,6 @@ export declare class AgentSession {
|
|
|
1311
1304
|
onAssistantDelta?: (s: string) => void;
|
|
1312
1305
|
signal?: AbortSignal;
|
|
1313
1306
|
metadata?: Record<string, string>;
|
|
1314
|
-
/** Opt into the verified loop; omission preserves legacy behavior or session inheritance. */
|
|
1315
|
-
newLoop?: boolean;
|
|
1316
1307
|
reasoningLevel?: ReasoningLevel;
|
|
1317
1308
|
outputSchema?: OutputSchema;
|
|
1318
1309
|
loopDetection?: LoopDetection | false;
|
package/dist/index.cjs
CHANGED
|
@@ -1501,7 +1501,6 @@ var AgentSession = class {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
if (this.tools.length > 0) body.tools = serializeToolRefs(this.tools);
|
|
1503
1503
|
if (opts.metadata && Object.keys(opts.metadata).length > 0) body.metadata = opts.metadata;
|
|
1504
|
-
if (opts.newLoop !== void 0) body.newLoop = opts.newLoop;
|
|
1505
1504
|
if (opts.reasoningLevel !== void 0) {
|
|
1506
1505
|
body.reasoningLevel = normalizeReasoningLevel(opts.reasoningLevel);
|
|
1507
1506
|
}
|
|
@@ -1587,7 +1586,6 @@ function serializeAgentSpec(spec, extra = {}) {
|
|
|
1587
1586
|
if (spec.agentId) body.agentId = spec.agentId;
|
|
1588
1587
|
if (spec.name) body.name = spec.name;
|
|
1589
1588
|
if (spec.modelId) body.modelId = spec.modelId;
|
|
1590
|
-
if (spec.newLoop !== void 0) body.newLoop = spec.newLoop;
|
|
1591
1589
|
if (spec.reasoningLevel !== void 0) {
|
|
1592
1590
|
body.reasoningLevel = normalizeReasoningLevel(spec.reasoningLevel);
|
|
1593
1591
|
}
|
|
@@ -1627,7 +1625,6 @@ function serializeCreateEvalRunRequest(spec) {
|
|
|
1627
1625
|
throw new MantyxError("createEvalRun accepts only one of `agentId` or `agent`");
|
|
1628
1626
|
}
|
|
1629
1627
|
const body = {};
|
|
1630
|
-
if (spec.newLoop !== void 0) body.newLoop = spec.newLoop;
|
|
1631
1628
|
if (spec.datasetId) body.datasetId = spec.datasetId;
|
|
1632
1629
|
if (spec.dataset) body.dataset = spec.dataset;
|
|
1633
1630
|
if (spec.agentId) body.agentId = spec.agentId;
|
|
@@ -2747,7 +2744,7 @@ async function runComputerUse(opts) {
|
|
|
2747
2744
|
}
|
|
2748
2745
|
|
|
2749
2746
|
// src/version.ts
|
|
2750
|
-
var SDK_VERSION = "2026.9.
|
|
2747
|
+
var SDK_VERSION = "2026.9.3";
|
|
2751
2748
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2752
2749
|
0 && (module.exports = {
|
|
2753
2750
|
AgentSession,
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
taskPlanFromEventData,
|
|
28
28
|
toToolParametersWire,
|
|
29
29
|
zodToJsonSchema
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-G46SVM2Q.js";
|
|
31
31
|
|
|
32
32
|
// src/oauth.ts
|
|
33
33
|
var DEFAULT_OAUTH_BASE_URL = "https://app.mantyx.io";
|
|
@@ -603,7 +603,7 @@ async function runComputerUse(opts) {
|
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
// src/version.ts
|
|
606
|
-
var SDK_VERSION = "2026.9.
|
|
606
|
+
var SDK_VERSION = "2026.9.3";
|
|
607
607
|
export {
|
|
608
608
|
AgentSession,
|
|
609
609
|
COMPUTER_USE_ACTIONS,
|
package/dist/version.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Agent Runs — wire protocol
|
|
2
2
|
|
|
3
|
-
See [harness loop opt-in](#harness-loop-opt-in) for `newLoop: true` opt-in, session inheritance, A2A/MCP parameters, and completion-review events.
|
|
4
|
-
|
|
5
3
|
This document specifies the public wire protocol that the MANTYX agent-runs API
|
|
6
4
|
speaks with SDKs. It is the source of truth for anyone implementing a new
|
|
7
5
|
client (Python, Rust, Java…) and is shipped with each first-party SDK so the
|
|
@@ -1826,7 +1824,3 @@ A reference SDK should:
|
|
|
1826
1824
|
The npm package [`@mantyx/sdk`](https://www.npmjs.com/package/@mantyx/sdk) and the Go module
|
|
1827
1825
|
[`github.com/mantyx/mantyx-go-sdk`](https://github.com/mantyx/mantyx-go-sdk) are reference implementations of this protocol
|
|
1828
1826
|
(maintained in the official **mantyx-sdk** repositories).
|
|
1829
|
-
|
|
1830
|
-
## Harness loop opt-in
|
|
1831
|
-
|
|
1832
|
-
External agent runs and new sessions use the existing loop unless `newLoop: true` is supplied. The same optional boolean is supported by eval creation. Session messages inherit the stored session setting when omitted; explicit `false` selects the existing loop for that turn. A2A server wrappers forward the configured selection. Harness events such as `completion_review` and `harness_decision` are available through normal event callbacks.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantyx/sdk",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.3",
|
|
4
4
|
"description": "MANTYX as a hosted agent runtime: define ephemeral agents, mix server-side MANTYX tools with locally-executed tools, run them remotely.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|