@mantyx/sdk 2026.10.2 → 2026.11.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/CHANGELOG.md +4 -0
- package/dist/a2a-server.js +1 -1
- package/dist/{chunk-ZGBSE23M.js → chunk-FDIMGXOL.js} +17 -0
- package/dist/client.d.ts +13 -0
- package/dist/decisions.d.ts +106 -0
- package/dist/index.cjs +18 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/version.d.ts +1 -1
- package/docs/agent-runs-protocol.md +12 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ and new releases use calendar versions (`YYYY.M.RELEASE`). Historical versions r
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
### Decisions
|
|
9
|
+
|
|
10
|
+
- Add inline decision execution, decision-model discovery, and execution history APIs.
|
|
11
|
+
|
|
8
12
|
### Added
|
|
9
13
|
|
|
10
14
|
- Configure a fallback model for ephemeral runs and sessions. MANTYX preserves
|
package/dist/a2a-server.js
CHANGED
|
@@ -742,6 +742,23 @@ var MantyxClient = class {
|
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
744
|
// -------------------------------------------------------------- Models
|
|
745
|
+
/** List decision-capable models and exact workspace connection ids. */
|
|
746
|
+
async listDecisionModels() {
|
|
747
|
+
return this.request({ method: "GET", path: "/decisions/models" });
|
|
748
|
+
}
|
|
749
|
+
/** Evaluate inline questions. No chat session or saved definition is created. */
|
|
750
|
+
async runDecision(spec) {
|
|
751
|
+
return this.request({ method: "POST", path: "/decisions", body: spec });
|
|
752
|
+
}
|
|
753
|
+
async listDecisionRuns(options = {}) {
|
|
754
|
+
return this.request({ method: "GET", path: "/decisions/runs", query: options });
|
|
755
|
+
}
|
|
756
|
+
async getDecisionRun(runId) {
|
|
757
|
+
return this.request({ method: "GET", path: `/decisions/runs/${encodeURIComponent(runId)}` });
|
|
758
|
+
}
|
|
759
|
+
async deleteDecisionRun(runId) {
|
|
760
|
+
return this.request({ method: "DELETE", path: `/decisions/runs/${encodeURIComponent(runId)}` });
|
|
761
|
+
}
|
|
745
762
|
async listModels() {
|
|
746
763
|
return this.request({
|
|
747
764
|
method: "GET",
|
package/dist/client.d.ts
CHANGED
|
@@ -1107,6 +1107,19 @@ export declare class MantyxClient {
|
|
|
1107
1107
|
tokenSource: TokenSource | null;
|
|
1108
1108
|
};
|
|
1109
1109
|
constructor(opts: MantyxClientOptions);
|
|
1110
|
+
/** List decision-capable models and exact workspace connection ids. */
|
|
1111
|
+
listDecisionModels(): Promise<{
|
|
1112
|
+
models: import("./decisions.js").DecisionModelInfo[];
|
|
1113
|
+
}>;
|
|
1114
|
+
/** Evaluate inline questions. No chat session or saved definition is created. */
|
|
1115
|
+
runDecision(spec: import("./decisions.js").DecisionRequest): Promise<import("./decisions.js").DecisionResult>;
|
|
1116
|
+
listDecisionRuns(options?: {
|
|
1117
|
+
limit?: number;
|
|
1118
|
+
cursor?: string;
|
|
1119
|
+
status?: "running" | "completed" | "failed";
|
|
1120
|
+
}): Promise<import("./decisions.js").DecisionRunList>;
|
|
1121
|
+
getDecisionRun(runId: string): Promise<import("./decisions.js").DecisionRunDetail>;
|
|
1122
|
+
deleteDecisionRun(runId: string): Promise<void>;
|
|
1110
1123
|
listModels(): Promise<ModelCatalog>;
|
|
1111
1124
|
runAgent(spec: RunSpec): Promise<RunResult>;
|
|
1112
1125
|
/**
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/** Inline decision calls. These do not create saved agents or decision definitions. */
|
|
2
|
+
export type DecisionQuestion = {
|
|
3
|
+
name: string;
|
|
4
|
+
type: "predicate";
|
|
5
|
+
instructions: string;
|
|
6
|
+
} | {
|
|
7
|
+
name: string;
|
|
8
|
+
type: "choice";
|
|
9
|
+
instructions: string;
|
|
10
|
+
choices: {
|
|
11
|
+
value: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
}[];
|
|
14
|
+
} | {
|
|
15
|
+
name: string;
|
|
16
|
+
type: "score";
|
|
17
|
+
instructions: string;
|
|
18
|
+
levels: {
|
|
19
|
+
label: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
23
|
+
export interface DecisionRequest {
|
|
24
|
+
/** Use an exact id returned by listDecisionModels(). */
|
|
25
|
+
modelId: string;
|
|
26
|
+
input: string | Record<string, unknown> | unknown[];
|
|
27
|
+
questions: DecisionQuestion[];
|
|
28
|
+
metadata?: Record<string, string>;
|
|
29
|
+
}
|
|
30
|
+
export type DecisionAnswer = {
|
|
31
|
+
type: "predicate";
|
|
32
|
+
probability: number;
|
|
33
|
+
} | {
|
|
34
|
+
type: "choice";
|
|
35
|
+
value: string;
|
|
36
|
+
confidence?: number;
|
|
37
|
+
probabilities: {
|
|
38
|
+
value: string;
|
|
39
|
+
probability: number;
|
|
40
|
+
}[];
|
|
41
|
+
} | {
|
|
42
|
+
type: "score";
|
|
43
|
+
value: number;
|
|
44
|
+
confidence?: number;
|
|
45
|
+
probabilities: {
|
|
46
|
+
value: number;
|
|
47
|
+
label: string;
|
|
48
|
+
probability: number;
|
|
49
|
+
}[];
|
|
50
|
+
} | {
|
|
51
|
+
type: "refusal";
|
|
52
|
+
};
|
|
53
|
+
export interface DecisionResult {
|
|
54
|
+
runId: string;
|
|
55
|
+
status: "completed";
|
|
56
|
+
answers: Record<string, DecisionAnswer>;
|
|
57
|
+
model: {
|
|
58
|
+
id: string;
|
|
59
|
+
provider: "openai" | "openrouter";
|
|
60
|
+
requested: string;
|
|
61
|
+
resolved: string;
|
|
62
|
+
};
|
|
63
|
+
usage: {
|
|
64
|
+
inputTokens: number;
|
|
65
|
+
cachedTokens: number;
|
|
66
|
+
outputTokens: number;
|
|
67
|
+
costUsd: number | null;
|
|
68
|
+
};
|
|
69
|
+
durationMs: number;
|
|
70
|
+
}
|
|
71
|
+
export interface DecisionModelInfo {
|
|
72
|
+
id: string;
|
|
73
|
+
label: string;
|
|
74
|
+
provider: "openai" | "openrouter";
|
|
75
|
+
vendorModelId: string;
|
|
76
|
+
connectionName: string;
|
|
77
|
+
source: "workspace_provider";
|
|
78
|
+
maxQuestions: number;
|
|
79
|
+
questionTypes: ("predicate" | "choice" | "score")[];
|
|
80
|
+
}
|
|
81
|
+
export interface DecisionRunSummary {
|
|
82
|
+
metadata?: Record<string, string>;
|
|
83
|
+
id: string;
|
|
84
|
+
source: "sdk" | "playground";
|
|
85
|
+
status: "running" | "completed" | "failed";
|
|
86
|
+
provider: string;
|
|
87
|
+
requestedModel: string;
|
|
88
|
+
resolvedModel: string | null;
|
|
89
|
+
connectionName: string;
|
|
90
|
+
definitionHash: string;
|
|
91
|
+
durationMs: number | null;
|
|
92
|
+
error: string | null;
|
|
93
|
+
errorCode: string | null;
|
|
94
|
+
createdAt: string;
|
|
95
|
+
completedAt: string | null;
|
|
96
|
+
}
|
|
97
|
+
export interface DecisionRunDetail extends DecisionRunSummary {
|
|
98
|
+
modelId: string;
|
|
99
|
+
request: DecisionRequest;
|
|
100
|
+
response: DecisionResult | null;
|
|
101
|
+
providerRequestId: string | null;
|
|
102
|
+
}
|
|
103
|
+
export interface DecisionRunList {
|
|
104
|
+
runs: DecisionRunSummary[];
|
|
105
|
+
nextCursor: string | null;
|
|
106
|
+
}
|
package/dist/index.cjs
CHANGED
|
@@ -816,6 +816,23 @@ var MantyxClient = class {
|
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
818
|
// -------------------------------------------------------------- Models
|
|
819
|
+
/** List decision-capable models and exact workspace connection ids. */
|
|
820
|
+
async listDecisionModels() {
|
|
821
|
+
return this.request({ method: "GET", path: "/decisions/models" });
|
|
822
|
+
}
|
|
823
|
+
/** Evaluate inline questions. No chat session or saved definition is created. */
|
|
824
|
+
async runDecision(spec) {
|
|
825
|
+
return this.request({ method: "POST", path: "/decisions", body: spec });
|
|
826
|
+
}
|
|
827
|
+
async listDecisionRuns(options = {}) {
|
|
828
|
+
return this.request({ method: "GET", path: "/decisions/runs", query: options });
|
|
829
|
+
}
|
|
830
|
+
async getDecisionRun(runId) {
|
|
831
|
+
return this.request({ method: "GET", path: `/decisions/runs/${encodeURIComponent(runId)}` });
|
|
832
|
+
}
|
|
833
|
+
async deleteDecisionRun(runId) {
|
|
834
|
+
return this.request({ method: "DELETE", path: `/decisions/runs/${encodeURIComponent(runId)}` });
|
|
835
|
+
}
|
|
819
836
|
async listModels() {
|
|
820
837
|
return this.request({
|
|
821
838
|
method: "GET",
|
|
@@ -2745,7 +2762,7 @@ async function runComputerUse(opts) {
|
|
|
2745
2762
|
}
|
|
2746
2763
|
|
|
2747
2764
|
// src/version.ts
|
|
2748
|
-
var SDK_VERSION = "2026.
|
|
2765
|
+
var SDK_VERSION = "2026.11.1";
|
|
2749
2766
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2750
2767
|
0 && (module.exports = {
|
|
2751
2768
|
AgentSession,
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
*
|
|
34
34
|
* console.log(result.text);
|
|
35
35
|
*/
|
|
36
|
+
export type { DecisionQuestion, DecisionRequest, DecisionAnswer, DecisionResult, DecisionModelInfo, DecisionRunSummary, DecisionRunDetail, DecisionRunList } from "./decisions.js";
|
|
36
37
|
export { MantyxClient, AgentSession, DEFAULT_BASE_URL, parseRunOutput, planOnly, taskPlanFromEventData, inputFileAttachment, inputFileUrlAttachment, } from "./client.js";
|
|
37
38
|
export type { MantyxClientOptions, ModelInfo, ModelCatalog, AgentSpecBase, RunSpec, SessionSpec, OutputSchema, OutputSchemaValue, LoopDetection, ToolBudget, ToolBudgets, Supervisor, SupervisorAction, SupervisorPhase, ReasoningTrigger, PlanOptions, PlanMode, PlanSpec, TaskPlan, TaskPlanStep, TaskPlanStepStatus, TaskPlanTransition, RunResult, RunTokenUsage, RunModelInfo, RunEvent, RunEventBase, AssistantDeltaEvent, ThinkingDeltaEvent, AssistantMessageEvent, ModelFallbackEvent, UserMessageEvent, InputFileAttachment, InputFileUrlAttachment, MessageAttachment, InputFileAttachmentMetadata, InputFileUrlAttachmentMetadata, AttachmentMetadata, ConversationMessage, ServerToolResultEvent, LocalToolCallEvent, LocalToolResultInEvent, LoopDetectedEvent, ToolBudgetExceededEvent, SupervisorEvent, TaskPlanEvent, ResultEvent, ErrorEvent, CancelledEvent, SessionInfo, SessionSummary, SessionListResult, SessionEventsPage, LocalHandlers, RunFeedbackVerdict, RunFeedbackInput, RunFeedbackResult, EvalRunStatus, InlineEvalCaseSpec, InlineEvalDatasetSpec, AgentEvalOverrides, CreateEvalRunRequest, EvalDatasetSummary, EvalDatasetList, EvalCase, EvalDatasetDetail, EvalRunAccepted, EvalRunSummary, EvalCaseResult, EvalRunDetail, EvalRunList, EvalRunCompareSide, EvalRunCompareCase, EvalRunCompare, EvalRunEvent, ListEvalRunsOptions, RunEvalOptions, } from "./client.js";
|
|
38
39
|
export { defineLocalTool, mantyxTool, mantyxPluginTool, mantyxA2A, defineLocalA2A, mantyxMcp, defineLocalMcp, isLocalTool, isLocalA2ATool, isLocalMcpServer, } from "./tools.js";
|
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-FDIMGXOL.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.
|
|
606
|
+
var SDK_VERSION = "2026.11.1";
|
|
607
607
|
export {
|
|
608
608
|
AgentSession,
|
|
609
609
|
COMPUTER_USE_ACTIONS,
|
package/dist/version.d.ts
CHANGED
|
@@ -1853,3 +1853,15 @@ A reference SDK should:
|
|
|
1853
1853
|
The npm package [`@mantyx/sdk`](https://www.npmjs.com/package/@mantyx/sdk) and the Go module
|
|
1854
1854
|
[`github.com/mantyx/mantyx-go-sdk`](https://github.com/mantyx/mantyx-go-sdk) are reference implementations of this protocol
|
|
1855
1855
|
(maintained in the official **mantyx-sdk** repositories).
|
|
1856
|
+
|
|
1857
|
+
|
|
1858
|
+
## Inline decisions
|
|
1859
|
+
|
|
1860
|
+
Decisions run synchronously through `POST /decisions` alongside the agent-runs
|
|
1861
|
+
surface. Discover connection-specific models with `GET /decisions/models`; inspect
|
|
1862
|
+
and delete terminal runs through `/decisions/runs`. These use `models:read`,
|
|
1863
|
+
`runs:read`, and `runs:write` OAuth scopes and the same workspace API-key
|
|
1864
|
+
authentication. Questions are inline; there is no saved decision registry.
|
|
1865
|
+
|
|
1866
|
+
See the [decision guide](https://mantyx-io.github.io/mantyx-sdk/docs/decisions/)
|
|
1867
|
+
for request types, normalized answers, SDK examples, and execution semantics.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mantyx/sdk",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.11.1",
|
|
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",
|