@dalmia/calibrate-mcp 0.0.39 → 0.0.41
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/bin/mcp-server.js +633 -551
- package/bin/mcp-server.js.map +28 -26
- package/esm/funcs/agentTestsListRunsForAgent.js +1 -0
- package/esm/funcs/agentTestsListRunsForAgent.js.map +1 -1
- package/esm/landing-page.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/models/agentcreate.d.ts +26 -0
- package/esm/models/agentcreate.d.ts.map +1 -1
- package/esm/models/agentcreate.js +18 -0
- package/esm/models/agentcreate.js.map +1 -1
- package/esm/models/agentresponse.d.ts +26 -0
- package/esm/models/agentresponse.d.ts.map +1 -1
- package/esm/models/agentresponse.js +17 -0
- package/esm/models/agentresponse.js.map +1 -1
- package/esm/models/agentsummary.d.ts +26 -0
- package/esm/models/agentsummary.d.ts.map +1 -1
- package/esm/models/agentsummary.js +17 -0
- package/esm/models/agentsummary.js.map +1 -1
- package/esm/models/agenttestrunlistitem.d.ts +2 -0
- package/esm/models/agenttestrunlistitem.d.ts.map +1 -1
- package/esm/models/agenttestrunlistitem.js +2 -0
- package/esm/models/agenttestrunlistitem.js.map +1 -1
- package/esm/models/bulktestitem.d.ts +2 -1
- package/esm/models/bulktestitem.d.ts.map +1 -1
- package/esm/models/bulktestitem.js +4 -2
- package/esm/models/bulktestitem.js.map +1 -1
- package/esm/models/bulktestupload.d.ts +4 -0
- package/esm/models/bulktestupload.d.ts.map +1 -1
- package/esm/models/bulktestupload.js +5 -2
- package/esm/models/bulktestupload.js.map +1 -1
- package/esm/models/getagenttestrunsagenttestsagentagentuuidrunsgetop.d.ts +1 -0
- package/esm/models/getagenttestrunsagenttestsagentagentuuidrunsgetop.d.ts.map +1 -1
- package/esm/models/getagenttestrunsagenttestsagentagentuuidrunsgetop.js +1 -0
- package/esm/models/getagenttestrunsagenttestsagentagentuuidrunsgetop.js.map +1 -1
- package/esm/models/taskagreementresponse.js +1 -1
- package/esm/models/taskagreementresponse.js.map +1 -1
- package/esm/models/testcreate.d.ts +4 -0
- package/esm/models/testcreate.d.ts.map +1 -1
- package/esm/models/testcreate.js +6 -3
- package/esm/models/testcreate.js.map +1 -1
- package/esm/models/testlistresponse.d.ts +4 -0
- package/esm/models/testlistresponse.d.ts.map +1 -1
- package/esm/models/testlistresponse.js +5 -2
- package/esm/models/testlistresponse.js.map +1 -1
- package/esm/models/testresponse.d.ts +4 -0
- package/esm/models/testresponse.d.ts.map +1 -1
- package/esm/models/testresponse.js +5 -2
- package/esm/models/testresponse.js.map +1 -1
- package/esm/models/testupdate.d.ts +2 -0
- package/esm/models/testupdate.d.ts.map +1 -1
- package/esm/models/testupdate.js +4 -2
- package/esm/models/testupdate.js.map +1 -1
- package/esm/models/traceingest.d.ts +6 -1
- package/esm/models/traceingest.d.ts.map +1 -1
- package/esm/models/traceingest.js +8 -1
- package/esm/models/traceingest.js.map +1 -1
- package/esm/models/tracetoolcall.d.ts +1 -0
- package/esm/models/tracetoolcall.d.ts.map +1 -1
- package/esm/models/tracetoolcall.js +1 -0
- package/esm/models/tracetoolcall.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/agentTestsListRunsForAgent.ts +1 -0
- package/src/landing-page.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/agentcreate.ts +36 -0
- package/src/models/agentresponse.ts +35 -0
- package/src/models/agentsummary.ts +35 -0
- package/src/models/agenttestrunlistitem.ts +6 -0
- package/src/models/bulktestitem.ts +10 -5
- package/src/models/bulktestupload.ts +6 -2
- package/src/models/getagenttestrunsagenttestsagentagentuuidrunsgetop.ts +4 -0
- package/src/models/taskagreementresponse.ts +1 -1
- package/src/models/testcreate.ts +7 -3
- package/src/models/testlistresponse.ts +6 -2
- package/src/models/testresponse.ts +6 -2
- package/src/models/testupdate.ts +4 -2
- package/src/models/traceingest.ts +18 -3
- package/src/models/tracetoolcall.ts +4 -0
package/esm/models/testcreate.js
CHANGED
|
@@ -11,22 +11,25 @@ import { RoutersTestsEvaluatorRef$zodSchema, } from "./routerstestsevaluatorref.
|
|
|
11
11
|
* - `response`: judges the generated reply
|
|
12
12
|
* - `tool_call`: diffs the generated tool calls
|
|
13
13
|
* - `conversation`: judges the full conversation
|
|
14
|
+
* - `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)
|
|
14
15
|
*/
|
|
15
16
|
export const TestCreateType = {
|
|
16
17
|
Response: "response",
|
|
17
18
|
ToolCall: "tool_call",
|
|
18
19
|
Conversation: "conversation",
|
|
20
|
+
General: "general",
|
|
19
21
|
};
|
|
20
22
|
export const TestCreateType$zodSchema = z.enum([
|
|
21
23
|
"response",
|
|
22
24
|
"tool_call",
|
|
23
25
|
"conversation",
|
|
24
|
-
|
|
26
|
+
"general",
|
|
27
|
+
]).describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n- `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)\n");
|
|
25
28
|
export const TestCreate$zodSchema = z.object({
|
|
26
|
-
config: z.record(z.string(), z.any()).nullable().optional().describe("The calibrate test config
|
|
29
|
+
config: z.record(z.string(), z.any()).nullable().optional().describe("The calibrate test config.\n\n- `history`: the conversation up to the agent's turn, required for `response` and `conversation` tests and for a `tool_call` test aimed at a conversational agent. Each item is `{role, content}` with `role` one of `user`, `assistant`, `tool`. A `tool` message also carries `tool_call_id` and `name`.\n- `input`: a standalone prompt with no conversation around it, required for `general` tests and for a `tool_call` test aimed at a `general` agent. A string, not a conversation.\n- `evaluation`: the required `{type, ...}`, where `type` matches the test's `type` below.\n- `settings`: an optional object, e.g. `{\"language\": \"en\"}`.\n\nA `tool_call` test carries exactly one of `history` or `input`, and which one it carries decides the agent it can be linked to.\n\n`evaluation` by test type:\n- `response`: judge the agent's reply, graded by the linked evaluators. `{\"type\": \"response\"}`\n- `conversation`: append the reply and judge the whole conversation. `{\"type\": \"conversation\"}`\n- `tool_call`: diff the agent's tool calls against expected ones. Add `tool_calls`, a list of `{tool, arguments, accept_any_arguments?}`.\n- `general`: judge a standalone, non-conversational input/output pair, graded by the linked evaluators. `{\"type\": \"general\"}`\n\nFor `tool_call`, each expected argument value is one of:\n- `{\"match_type\": \"exact\", \"value\": <any>}`: must equal `value`\n- `{\"match_type\": \"llm_judge\", \"criteria\": \"...\"}`: judged against the criteria\n- `{\"match_type\": \"any\"}`: any value, only checks the argument was passed\n\n`response` / `conversation` example:\n```json\n{\n \"history\": [{\"role\": \"user\", \"content\": \"What is your return policy?\"}],\n \"evaluation\": {\"type\": \"response\"},\n \"settings\": {\"language\": \"en\"}\n}\n```\n\n`tool_call` example, for a conversational agent. Swap `history` for `input` to aim it at a `general` agent:\n```json\n{\n \"history\": [{\"role\": \"user\", \"content\": \"Book room 101 for tomorrow\"}],\n \"evaluation\": {\n \"type\": \"tool_call\",\n \"tool_calls\": [\n {\n \"tool\": \"book_room\",\n \"arguments\": {\n \"room\": {\"match_type\": \"exact\", \"value\": \"101\"},\n \"date\": {\"match_type\": \"llm_judge\", \"criteria\": \"tomorrow's date\"}\n },\n \"accept_any_arguments\": false\n }\n ]\n }\n}\n```\n\n`general` example:\n```json\n{\n \"input\": \"Summarize this article: ...\",\n \"evaluation\": {\"type\": \"general\"},\n \"settings\": {\"language\": \"en\"}\n}\n```\n\nEvaluators are linked via the separate `evaluators` field, not inside `config`.\n\nOmit to create the test with no config and fill it in later via update"),
|
|
27
30
|
evaluators: z.array(RoutersTestsEvaluatorRef$zodSchema).nullable().optional()
|
|
28
31
|
.describe("Evaluators to link. Used by `response` and `conversation` tests"),
|
|
29
32
|
name: z.string().describe("Name of the test, unique within the workspace"),
|
|
30
|
-
type: TestCreateType$zodSchema.describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n"),
|
|
33
|
+
type: TestCreateType$zodSchema.describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n- `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)\n"),
|
|
31
34
|
});
|
|
32
35
|
//# sourceMappingURL=testcreate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testcreate.js","sourceRoot":"","sources":["../../src/models/testcreate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAEL,kCAAkC,GACnC,MAAM,+BAA+B,CAAC;AAEvC
|
|
1
|
+
{"version":3,"file":"testcreate.js","sourceRoot":"","sources":["../../src/models/testcreate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAEL,kCAAkC,GACnC,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,WAAW;IACrB,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,SAAS;CACV,CAAC;AAaX,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC7C,UAAU;IACV,WAAW;IACX,cAAc;IACd,SAAS;CACV,CAAC,CAAC,QAAQ,CACT,8SAA8S,CAC/S,CAAC;AASF,MAAM,CAAC,MAAM,oBAAoB,GAA0B,CAAC,CAAC,MAAM,CAAC;IAClE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAClE,4rFAA4rF,CAC7rF;IACD,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;SAC1E,QAAQ,CACP,iEAAiE,CAClE;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;IAC1E,IAAI,EAAE,wBAAwB,CAAC,QAAQ,CACrC,8SAA8S,CAC/S;CACF,CAAC,CAAC"}
|
|
@@ -9,11 +9,13 @@ import { TestListConfig } from "./testlistconfig.js";
|
|
|
9
9
|
* - `response`: judges the generated reply
|
|
10
10
|
* - `tool_call`: diffs the generated tool calls
|
|
11
11
|
* - `conversation`: judges the full conversation
|
|
12
|
+
* - `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)
|
|
12
13
|
*/
|
|
13
14
|
export declare const TestListResponseType: {
|
|
14
15
|
readonly Response: "response";
|
|
15
16
|
readonly ToolCall: "tool_call";
|
|
16
17
|
readonly Conversation: "conversation";
|
|
18
|
+
readonly General: "general";
|
|
17
19
|
};
|
|
18
20
|
/**
|
|
19
21
|
* What the test judges:
|
|
@@ -23,12 +25,14 @@ export declare const TestListResponseType: {
|
|
|
23
25
|
* - `response`: judges the generated reply
|
|
24
26
|
* - `tool_call`: diffs the generated tool calls
|
|
25
27
|
* - `conversation`: judges the full conversation
|
|
28
|
+
* - `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)
|
|
26
29
|
*/
|
|
27
30
|
export type TestListResponseType = ClosedEnum<typeof TestListResponseType>;
|
|
28
31
|
export declare const TestListResponseType$zodSchema: z.ZodEnum<{
|
|
29
32
|
response: "response";
|
|
30
33
|
tool_call: "tool_call";
|
|
31
34
|
conversation: "conversation";
|
|
35
|
+
general: "general";
|
|
32
36
|
}>;
|
|
33
37
|
/**
|
|
34
38
|
* Trimmed test shape for list/index endpoints. The full config and hydrated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testlistresponse.d.ts","sourceRoot":"","sources":["../../src/models/testlistresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAA4B,MAAM,qBAAqB,CAAC;AAE/E
|
|
1
|
+
{"version":3,"file":"testlistresponse.d.ts","sourceRoot":"","sources":["../../src/models/testlistresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAA4B,MAAM,qBAAqB,CAAC;AAE/E;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;;;;;CAKvB,CAAC;AACX;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE3E,eAAO,MAAM,8BAA8B;;;;;EAO1C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,oBAAoB,CAAC;IAC3B,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAiBlE,CAAC"}
|
|
@@ -11,22 +11,25 @@ import { TestListConfig$zodSchema } from "./testlistconfig.js";
|
|
|
11
11
|
* - `response`: judges the generated reply
|
|
12
12
|
* - `tool_call`: diffs the generated tool calls
|
|
13
13
|
* - `conversation`: judges the full conversation
|
|
14
|
+
* - `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)
|
|
14
15
|
*/
|
|
15
16
|
export const TestListResponseType = {
|
|
16
17
|
Response: "response",
|
|
17
18
|
ToolCall: "tool_call",
|
|
18
19
|
Conversation: "conversation",
|
|
20
|
+
General: "general",
|
|
19
21
|
};
|
|
20
22
|
export const TestListResponseType$zodSchema = z.enum([
|
|
21
23
|
"response",
|
|
22
24
|
"tool_call",
|
|
23
25
|
"conversation",
|
|
24
|
-
|
|
26
|
+
"general",
|
|
27
|
+
]).describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n- `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)\n");
|
|
25
28
|
export const TestListResponse$zodSchema = z.object({
|
|
26
29
|
config: TestListConfig$zodSchema.nullable().optional().describe("Trimmed config carrying only the test's description. Fetch the test by ID for the full config and evaluators"),
|
|
27
30
|
created_at: z.string().describe("When the test was created (ISO 8601 UTC)"),
|
|
28
31
|
name: z.string().describe("Name of the test"),
|
|
29
|
-
type: TestListResponseType$zodSchema.describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n"),
|
|
32
|
+
type: TestListResponseType$zodSchema.describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n- `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)\n"),
|
|
30
33
|
updated_at: z.string().describe("When the test was last updated (ISO 8601 UTC)"),
|
|
31
34
|
uuid: z.string().describe("Unique ID for the test"),
|
|
32
35
|
}).describe("Trimmed test shape for list/index endpoints. The full config and hydrated\nevaluators live on the detail endpoint (`GET /tests/{uuid}`); the list keeps\nonly what list and attach-dropdown views render.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testlistresponse.js","sourceRoot":"","sources":["../../src/models/testlistresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAkB,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/E
|
|
1
|
+
{"version":3,"file":"testlistresponse.js","sourceRoot":"","sources":["../../src/models/testlistresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAkB,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,WAAW;IACrB,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,SAAS;CACV,CAAC;AAaX,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,IAAI,CAAC;IACnD,UAAU;IACV,WAAW;IACX,cAAc;IACd,SAAS;CACV,CAAC,CAAC,QAAQ,CACT,8SAA8S,CAC/S,CAAC;AAkBF,MAAM,CAAC,MAAM,0BAA0B,GAAgC,CAAC,CAAC,MAAM,CAC7E;IACE,MAAM,EAAE,wBAAwB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC7D,8GAA8G,CAC/G;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC3E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IAC7C,IAAI,EAAE,8BAA8B,CAAC,QAAQ,CAC3C,8SAA8S,CAC/S;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAC7B,+CAA+C,CAChD;IACD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;CACpD,CACF,CAAC,QAAQ,CACR,2MAA2M,CAC5M,CAAC"}
|
|
@@ -8,11 +8,13 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
8
8
|
* - `response`: judges the generated reply
|
|
9
9
|
* - `tool_call`: diffs the generated tool calls
|
|
10
10
|
* - `conversation`: judges the full conversation
|
|
11
|
+
* - `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)
|
|
11
12
|
*/
|
|
12
13
|
export declare const TestResponseType: {
|
|
13
14
|
readonly Response: "response";
|
|
14
15
|
readonly ToolCall: "tool_call";
|
|
15
16
|
readonly Conversation: "conversation";
|
|
17
|
+
readonly General: "general";
|
|
16
18
|
};
|
|
17
19
|
/**
|
|
18
20
|
* What the test judges:
|
|
@@ -22,12 +24,14 @@ export declare const TestResponseType: {
|
|
|
22
24
|
* - `response`: judges the generated reply
|
|
23
25
|
* - `tool_call`: diffs the generated tool calls
|
|
24
26
|
* - `conversation`: judges the full conversation
|
|
27
|
+
* - `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)
|
|
25
28
|
*/
|
|
26
29
|
export type TestResponseType = ClosedEnum<typeof TestResponseType>;
|
|
27
30
|
export declare const TestResponseType$zodSchema: z.ZodEnum<{
|
|
28
31
|
response: "response";
|
|
29
32
|
tool_call: "tool_call";
|
|
30
33
|
conversation: "conversation";
|
|
34
|
+
general: "general";
|
|
31
35
|
}>;
|
|
32
36
|
export type TestResponse = {
|
|
33
37
|
uuid: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testresponse.d.ts","sourceRoot":"","sources":["../../src/models/testresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"testresponse.d.ts","sourceRoot":"","sources":["../../src/models/testresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AACX;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEnE,eAAO,MAAM,0BAA0B;;;;;EAOtC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,KAAK,CAAC;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAgBzD,CAAC"}
|
|
@@ -10,23 +10,26 @@ import * as z from "zod";
|
|
|
10
10
|
* - `response`: judges the generated reply
|
|
11
11
|
* - `tool_call`: diffs the generated tool calls
|
|
12
12
|
* - `conversation`: judges the full conversation
|
|
13
|
+
* - `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)
|
|
13
14
|
*/
|
|
14
15
|
export const TestResponseType = {
|
|
15
16
|
Response: "response",
|
|
16
17
|
ToolCall: "tool_call",
|
|
17
18
|
Conversation: "conversation",
|
|
19
|
+
General: "general",
|
|
18
20
|
};
|
|
19
21
|
export const TestResponseType$zodSchema = z.enum([
|
|
20
22
|
"response",
|
|
21
23
|
"tool_call",
|
|
22
24
|
"conversation",
|
|
23
|
-
|
|
25
|
+
"general",
|
|
26
|
+
]).describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n- `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)\n");
|
|
24
27
|
export const TestResponse$zodSchema = z.object({
|
|
25
28
|
config: z.record(z.string(), z.any()).nullable().optional().describe("The stored config: `history`, `evaluation`, and an optional `settings`"),
|
|
26
29
|
created_at: z.string().describe("When the test was created (ISO 8601 UTC)"),
|
|
27
30
|
evaluators: z.array(z.record(z.string(), z.any())).optional().describe("Linked evaluators, resolved to their current live version at read time"),
|
|
28
31
|
name: z.string().describe("Name of the test"),
|
|
29
|
-
type: TestResponseType$zodSchema.describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n"),
|
|
32
|
+
type: TestResponseType$zodSchema.describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n- `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)\n"),
|
|
30
33
|
updated_at: z.string().describe("When the test was last updated (ISO 8601 UTC)"),
|
|
31
34
|
uuid: z.string().describe("Unique ID for the test"),
|
|
32
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testresponse.js","sourceRoot":"","sources":["../../src/models/testresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB
|
|
1
|
+
{"version":3,"file":"testresponse.js","sourceRoot":"","sources":["../../src/models/testresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,WAAW;IACrB,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,SAAS;CACV,CAAC;AAaX,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,IAAI,CAAC;IAC/C,UAAU;IACV,WAAW;IACX,cAAc;IACd,SAAS;CACV,CAAC,CAAC,QAAQ,CACT,8SAA8S,CAC/S,CAAC;AAYF,MAAM,CAAC,MAAM,sBAAsB,GAA4B,CAAC,CAAC,MAAM,CAAC;IACtE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAClE,wEAAwE,CACzE;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC3E,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACpE,wEAAwE,CACzE;IACD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IAC7C,IAAI,EAAE,0BAA0B,CAAC,QAAQ,CACvC,8SAA8S,CAC/S;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAC7B,+CAA+C,CAChD;IACD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;CACpD,CAAC,CAAC"}
|
|
@@ -5,12 +5,14 @@ export declare const TestUpdateType: {
|
|
|
5
5
|
readonly Response: "response";
|
|
6
6
|
readonly ToolCall: "tool_call";
|
|
7
7
|
readonly Conversation: "conversation";
|
|
8
|
+
readonly General: "general";
|
|
8
9
|
};
|
|
9
10
|
export type TestUpdateType = ClosedEnum<typeof TestUpdateType>;
|
|
10
11
|
export declare const TestUpdateType$zodSchema: z.ZodEnum<{
|
|
11
12
|
response: "response";
|
|
12
13
|
tool_call: "tool_call";
|
|
13
14
|
conversation: "conversation";
|
|
15
|
+
general: "general";
|
|
14
16
|
}>;
|
|
15
17
|
export type TestUpdate = {
|
|
16
18
|
name?: string | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testupdate.d.ts","sourceRoot":"","sources":["../../src/models/testupdate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"testupdate.d.ts","sourceRoot":"","sources":["../../src/models/testupdate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAE/D,eAAO,MAAM,wBAAwB;;;;;EAKnC,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,MAAM,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,UAAU,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;CACjE,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAcrD,CAAC"}
|
package/esm/models/testupdate.js
CHANGED
|
@@ -7,17 +7,19 @@ export const TestUpdateType = {
|
|
|
7
7
|
Response: "response",
|
|
8
8
|
ToolCall: "tool_call",
|
|
9
9
|
Conversation: "conversation",
|
|
10
|
+
General: "general",
|
|
10
11
|
};
|
|
11
12
|
export const TestUpdateType$zodSchema = z.enum([
|
|
12
13
|
"response",
|
|
13
14
|
"tool_call",
|
|
14
15
|
"conversation",
|
|
16
|
+
"general",
|
|
15
17
|
]);
|
|
16
18
|
export const TestUpdate$zodSchema = z.object({
|
|
17
|
-
config: z.record(z.string(), z.any()).nullable().optional().describe("The calibrate test config
|
|
19
|
+
config: z.record(z.string(), z.any()).nullable().optional().describe("The calibrate test config.\n\n- `history`: the conversation up to the agent's turn, required for `response` and `conversation` tests and for a `tool_call` test aimed at a conversational agent. Each item is `{role, content}` with `role` one of `user`, `assistant`, `tool`. A `tool` message also carries `tool_call_id` and `name`.\n- `input`: a standalone prompt with no conversation around it, required for `general` tests and for a `tool_call` test aimed at a `general` agent. A string, not a conversation.\n- `evaluation`: the required `{type, ...}`, where `type` matches the test's `type` below.\n- `settings`: an optional object, e.g. `{\"language\": \"en\"}`.\n\nA `tool_call` test carries exactly one of `history` or `input`, and which one it carries decides the agent it can be linked to.\n\n`evaluation` by test type:\n- `response`: judge the agent's reply, graded by the linked evaluators. `{\"type\": \"response\"}`\n- `conversation`: append the reply and judge the whole conversation. `{\"type\": \"conversation\"}`\n- `tool_call`: diff the agent's tool calls against expected ones. Add `tool_calls`, a list of `{tool, arguments, accept_any_arguments?}`.\n- `general`: judge a standalone, non-conversational input/output pair, graded by the linked evaluators. `{\"type\": \"general\"}`\n\nFor `tool_call`, each expected argument value is one of:\n- `{\"match_type\": \"exact\", \"value\": <any>}`: must equal `value`\n- `{\"match_type\": \"llm_judge\", \"criteria\": \"...\"}`: judged against the criteria\n- `{\"match_type\": \"any\"}`: any value, only checks the argument was passed\n\n`response` / `conversation` example:\n```json\n{\n \"history\": [{\"role\": \"user\", \"content\": \"What is your return policy?\"}],\n \"evaluation\": {\"type\": \"response\"},\n \"settings\": {\"language\": \"en\"}\n}\n```\n\n`tool_call` example, for a conversational agent. Swap `history` for `input` to aim it at a `general` agent:\n```json\n{\n \"history\": [{\"role\": \"user\", \"content\": \"Book room 101 for tomorrow\"}],\n \"evaluation\": {\n \"type\": \"tool_call\",\n \"tool_calls\": [\n {\n \"tool\": \"book_room\",\n \"arguments\": {\n \"room\": {\"match_type\": \"exact\", \"value\": \"101\"},\n \"date\": {\"match_type\": \"llm_judge\", \"criteria\": \"tomorrow's date\"}\n },\n \"accept_any_arguments\": false\n }\n ]\n }\n}\n```\n\n`general` example:\n```json\n{\n \"input\": \"Summarize this article: ...\",\n \"evaluation\": {\"type\": \"general\"},\n \"settings\": {\"language\": \"en\"}\n}\n```\n\nEvaluators are linked via the separate `evaluators` field, not inside `config`.\n\nReplaces the stored config. Omit to leave unchanged"),
|
|
18
20
|
evaluators: z.array(RoutersTestsEvaluatorRef$zodSchema).nullable().optional()
|
|
19
21
|
.describe("New evaluator links for the test. Omit to leave unchanged. An empty list clears them, except on `conversation` tests, which must keep at least one"),
|
|
20
22
|
name: z.string().nullable().optional().describe("New test name. Omit to leave unchanged"),
|
|
21
|
-
type: TestUpdateType$zodSchema.nullable().optional().describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n\n\nImmutable. Omit it, or send the current value"),
|
|
23
|
+
type: TestUpdateType$zodSchema.nullable().optional().describe("What the test judges:\n\n- `response`: judges the generated reply\n- `tool_call`: diffs the generated tool calls\n- `conversation`: judges the full conversation\n- `general`: judges a single plain-text input/output pair with no conversation involved (e.g. summarization, extraction, classification)\n\n\nImmutable. Omit it, or send the current value"),
|
|
22
24
|
});
|
|
23
25
|
//# sourceMappingURL=testupdate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testupdate.js","sourceRoot":"","sources":["../../src/models/testupdate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAEL,kCAAkC,GACnC,MAAM,+BAA+B,CAAC;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,WAAW;IACrB,YAAY,EAAE,cAAc;
|
|
1
|
+
{"version":3,"file":"testupdate.js","sourceRoot":"","sources":["../../src/models/testupdate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAEL,kCAAkC,GACnC,MAAM,+BAA+B,CAAC;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,WAAW;IACrB,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,SAAS;CACV,CAAC;AAGX,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC7C,UAAU;IACV,WAAW;IACX,cAAc;IACd,SAAS;CACV,CAAC,CAAC;AASH,MAAM,CAAC,MAAM,oBAAoB,GAA0B,CAAC,CAAC,MAAM,CAAC;IAClE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAClE,yqFAAyqF,CAC1qF;IACD,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;SAC1E,QAAQ,CACP,oJAAoJ,CACrJ;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC7C,wCAAwC,CACzC;IACD,IAAI,EAAE,wBAAwB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC3D,+VAA+V,CAChW;CACF,CAAC,CAAC"}
|
|
@@ -2,11 +2,16 @@ import * as z from "zod";
|
|
|
2
2
|
import { TraceMetadataEntry } from "./tracemetadataentry.js";
|
|
3
3
|
import { TraceOutput } from "./traceoutput.js";
|
|
4
4
|
import { TraceTurn } from "./traceturn.js";
|
|
5
|
+
/**
|
|
6
|
+
* What the agent was given for this turn. For a `general` agent, the standalone prompt as a string. For a `conversation` agent, the history up to the reported output, oldest turn first, in OpenAI chat format
|
|
7
|
+
*/
|
|
8
|
+
export type Input = string | Array<TraceTurn>;
|
|
9
|
+
export declare const Input$zodSchema: z.ZodType<Input>;
|
|
5
10
|
export type TraceIngest = {
|
|
6
11
|
agent_id: string;
|
|
7
12
|
message_id?: string | null | undefined;
|
|
8
13
|
conversation_id?: string | null | undefined;
|
|
9
|
-
input: Array<TraceTurn>;
|
|
14
|
+
input: string | Array<TraceTurn>;
|
|
10
15
|
output: TraceOutput;
|
|
11
16
|
metadata?: Array<TraceMetadataEntry> | null | undefined;
|
|
12
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traceingest.d.ts","sourceRoot":"","sources":["../../src/models/traceingest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,kBAAkB,EAEnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAyB,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAuB,MAAM,gBAAgB,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"traceingest.d.ts","sourceRoot":"","sources":["../../src/models/traceingest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EACL,kBAAkB,EAEnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAyB,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAuB,MAAM,gBAAgB,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAE9C,eAAO,MAAM,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAK5C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;IACjC,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAqBvD,CAAC"}
|
|
@@ -5,10 +5,17 @@ import * as z from "zod";
|
|
|
5
5
|
import { TraceMetadataEntry$zodSchema, } from "./tracemetadataentry.js";
|
|
6
6
|
import { TraceOutput$zodSchema } from "./traceoutput.js";
|
|
7
7
|
import { TraceTurn$zodSchema } from "./traceturn.js";
|
|
8
|
+
export const Input$zodSchema = z.union([
|
|
9
|
+
z.string(),
|
|
10
|
+
z.array(TraceTurn$zodSchema),
|
|
11
|
+
]).describe("What the agent was given for this turn. For a `general` agent, the standalone prompt as a string. For a `conversation` agent, the history up to the reported output, oldest turn first, in OpenAI chat format");
|
|
8
12
|
export const TraceIngest$zodSchema = z.object({
|
|
9
13
|
agent_id: z.string().describe("ID of the agent that produced the turn. Must be an agent in your workspace"),
|
|
10
14
|
conversation_id: z.string().nullable().optional().describe("Your own ID for the conversation this turn belongs to, stored for reference only. Omit if you have none"),
|
|
11
|
-
input: z.
|
|
15
|
+
input: z.union([
|
|
16
|
+
z.string(),
|
|
17
|
+
z.array(TraceTurn$zodSchema),
|
|
18
|
+
]).describe("What the agent was given for this turn. For a `general` agent, the standalone prompt as a string. For a `conversation` agent, the history up to the reported output, oldest turn first, in OpenAI chat format"),
|
|
12
19
|
message_id: z.string().nullable().optional().describe("Your own ID for the last user message in `input`, stored for reference only. Omit if you have none"),
|
|
13
20
|
metadata: z.array(TraceMetadataEntry$zodSchema).nullable().optional()
|
|
14
21
|
.describe("Key-value pairs stored with the trace. Prefer OTel `gen_ai.*` key names where they fit. Omit if you have none"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traceingest.js","sourceRoot":"","sources":["../../src/models/traceingest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAe,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAa,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"traceingest.js","sourceRoot":"","sources":["../../src/models/traceingest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAe,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAa,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAOhE,MAAM,CAAC,MAAM,eAAe,GAAqB,CAAC,CAAC,KAAK,CAAC;IACvD,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC;CAC7B,CAAC,CAAC,QAAQ,CACT,+MAA+M,CAChN,CAAC;AAWF,MAAM,CAAC,MAAM,qBAAqB,GAA2B,CAAC,CAAC,MAAM,CAAC;IACpE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAC3B,4EAA4E,CAC7E;IACD,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACxD,yGAAyG,CAC1G;IACD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;QACb,CAAC,CAAC,MAAM,EAAE;QACV,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC;KAC7B,CAAC,CAAC,QAAQ,CACT,+MAA+M,CAChN;IACD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACnD,oGAAoG,CACrG;IACD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;SAClE,QAAQ,CACP,+GAA+G,CAChH;IACH,MAAM,EAAE,qBAAqB;CAC9B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracetoolcall.d.ts","sourceRoot":"","sources":["../../src/models/tracetoolcall.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"tracetoolcall.d.ts","sourceRoot":"","sources":["../../src/models/tracetoolcall.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,CAAC;IACpD,MAAM,CAAC,EAAE,GAAG,GAAG,SAAS,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAQ3D,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
export const TraceToolCall$zodSchema = z.object({
|
|
6
6
|
arguments: z.record(z.string(), z.any()).nullable().optional().describe("Argument values the agent passed to the tool. Omit when the call had none"),
|
|
7
|
+
output: z.any().optional().describe("What the tool returned for this call. Any JSON value. Omit when you do not record it"),
|
|
7
8
|
tool: z.string().describe("Name of the tool the agent called"),
|
|
8
9
|
});
|
|
9
10
|
//# sourceMappingURL=tracetoolcall.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracetoolcall.js","sourceRoot":"","sources":["../../src/models/tracetoolcall.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tracetoolcall.js","sourceRoot":"","sources":["../../src/models/tracetoolcall.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAQzB,MAAM,CAAC,MAAM,uBAAuB,GAA6B,CAAC,CAAC,MAAM,CAAC;IACxE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACrE,2EAA2E,CAC5E;IACD,MAAM,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjC,sFAAsF,CACvF;IACD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;CAC/D,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/landing-page.ts
CHANGED
|
@@ -930,7 +930,7 @@ http_headers = { "api-key-auth" = "YOUR_API_KEY_AUTH" }`;
|
|
|
930
930
|
<h1>Instructions</h1>
|
|
931
931
|
<p>One-click installation for Claude Desktop users</p>
|
|
932
932
|
<div class="instruction-item">
|
|
933
|
-
<a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.
|
|
933
|
+
<a href="https://github.com/dalmia/calibrate-mcp/releases/download/v0.0.41/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
|
|
934
934
|
📥 Download MCP Bundle
|
|
935
935
|
</a>
|
|
936
936
|
</div>
|
package/src/lib/config.ts
CHANGED
|
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "0.1.0",
|
|
68
|
-
sdkVersion: "0.0.
|
|
68
|
+
sdkVersion: "0.0.41",
|
|
69
69
|
genVersion: "2.915.1",
|
|
70
70
|
userAgent:
|
|
71
|
-
"speakeasy-sdk/mcp-typescript 0.0.
|
|
71
|
+
"speakeasy-sdk/mcp-typescript 0.0.41 2.915.1 0.1.0 @dalmia/calibrate-mcp",
|
|
72
72
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -30,9 +30,41 @@ export const AgentCreateType$zodSchema = z.enum([
|
|
|
30
30
|
"- `agent`: built inside Calibrate\n- `connection`: your existing agent connected to Calibrate",
|
|
31
31
|
);
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* What the agent expects in the request body:
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
*
|
|
38
|
+
* - `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{"messages": [...]}`
|
|
39
|
+
* - `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{"input": "..."}`
|
|
40
|
+
*/
|
|
41
|
+
export const AgentCreateInteractionType = {
|
|
42
|
+
Conversation: "conversation",
|
|
43
|
+
General: "general",
|
|
44
|
+
} as const;
|
|
45
|
+
/**
|
|
46
|
+
* What the agent expects in the request body:
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
*
|
|
50
|
+
* - `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{"messages": [...]}`
|
|
51
|
+
* - `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{"input": "..."}`
|
|
52
|
+
*/
|
|
53
|
+
export type AgentCreateInteractionType = ClosedEnum<
|
|
54
|
+
typeof AgentCreateInteractionType
|
|
55
|
+
>;
|
|
56
|
+
|
|
57
|
+
export const AgentCreateInteractionType$zodSchema = z.enum([
|
|
58
|
+
"conversation",
|
|
59
|
+
"general",
|
|
60
|
+
]).describe(
|
|
61
|
+
"What the agent expects in the request body:\n\n- `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{\"messages\": [...]}`\n- `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{\"input\": \"...\"}`",
|
|
62
|
+
);
|
|
63
|
+
|
|
33
64
|
export type AgentCreate = {
|
|
34
65
|
name: string;
|
|
35
66
|
type?: AgentCreateType | undefined;
|
|
67
|
+
interaction_type?: AgentCreateInteractionType | undefined;
|
|
36
68
|
config?: { [k: string]: any } | null | undefined;
|
|
37
69
|
};
|
|
38
70
|
|
|
@@ -40,6 +72,10 @@ export const AgentCreate$zodSchema: z.ZodType<AgentCreate> = z.object({
|
|
|
40
72
|
config: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
41
73
|
"Agent behavioral config. The keys depend on `type`.\n\n**`type=agent`**, built inside Calibrate:\n- `system_prompt`: the agent's instructions\n- `llm.model`: `provider/model`, e.g. `openai/gpt-4.1` or `google/gemini-2.5-flash`\n- `stt.provider`: `deepgram`, `openai`, `cartesia`, `elevenlabs`, `google`, `sarvam`, or `smallest`\n- `tts.provider`: `cartesia`, `openai`, `google`, `elevenlabs`, `sarvam`, or `smallest`\n- `settings.agent_speaks_first`, `settings.max_assistant_turns`\n- `system_tools.end_call`: let the agent end the call\n- `data_extraction_fields`: `[{name, type, description, required}]`\n\n```json\n{\n \"system_prompt\": \"You are a helpful support agent.\",\n \"llm\": {\"model\": \"openai/gpt-4.1\"},\n \"stt\": {\"provider\": \"deepgram\"},\n \"tts\": {\"provider\": \"elevenlabs\"},\n \"settings\": {\"agent_speaks_first\": true, \"max_assistant_turns\": 50}\n}\n```\n\n**`type=connection`**, your own HTTP endpoint:\n- `agent_url`: public HTTP(S) endpoint your agent is called at\n- `agent_headers`: headers sent on each request, e.g. auth\n- `benchmark_provider`: `openrouter` by default. Other values: `openai`, `google`, `anthropic`, `meta-llama`, `mistralai`, `deepseek`, `x-ai`, `cohere`, `qwen`, or `ai21`\n\n```json\n{\n \"agent_url\": \"https://api.example.com/agent\",\n \"agent_headers\": {\"Authorization\": \"Bearer <token>\"},\n \"benchmark_provider\": \"openrouter\"\n}\n```\n\nFor `type=agent`, omitted keys inherit managed defaults. Omit `config` entirely to use all defaults. For `type=connection`, `config` is stored as-is and must contain `agent_url`",
|
|
42
74
|
),
|
|
75
|
+
interaction_type: AgentCreateInteractionType$zodSchema.default("conversation")
|
|
76
|
+
.describe(
|
|
77
|
+
"What the agent expects in the request body:\n\n- `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{\"messages\": [...]}`\n- `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{\"input\": \"...\"}`",
|
|
78
|
+
),
|
|
43
79
|
name: z.string().describe("Agent name, unique within the workspace"),
|
|
44
80
|
type: AgentCreateType$zodSchema.default("agent").describe(
|
|
45
81
|
"- `agent`: built inside Calibrate\n- `connection`: your existing agent connected to Calibrate",
|
|
@@ -30,10 +30,42 @@ export const AgentResponseType$zodSchema = z.enum([
|
|
|
30
30
|
"- `agent`: built inside Calibrate\n- `connection`: your existing agent connected to Calibrate",
|
|
31
31
|
);
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* What the agent expects in the request body:
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
*
|
|
38
|
+
* - `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{"messages": [...]}`
|
|
39
|
+
* - `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{"input": "..."}`
|
|
40
|
+
*/
|
|
41
|
+
export const AgentResponseInteractionType = {
|
|
42
|
+
Conversation: "conversation",
|
|
43
|
+
General: "general",
|
|
44
|
+
} as const;
|
|
45
|
+
/**
|
|
46
|
+
* What the agent expects in the request body:
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
*
|
|
50
|
+
* - `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{"messages": [...]}`
|
|
51
|
+
* - `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{"input": "..."}`
|
|
52
|
+
*/
|
|
53
|
+
export type AgentResponseInteractionType = ClosedEnum<
|
|
54
|
+
typeof AgentResponseInteractionType
|
|
55
|
+
>;
|
|
56
|
+
|
|
57
|
+
export const AgentResponseInteractionType$zodSchema = z.enum([
|
|
58
|
+
"conversation",
|
|
59
|
+
"general",
|
|
60
|
+
]).describe(
|
|
61
|
+
"What the agent expects in the request body:\n\n- `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{\"messages\": [...]}`\n- `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{\"input\": \"...\"}`",
|
|
62
|
+
);
|
|
63
|
+
|
|
33
64
|
export type AgentResponse = {
|
|
34
65
|
uuid: string;
|
|
35
66
|
name: string;
|
|
36
67
|
type: AgentResponseType;
|
|
68
|
+
interaction_type: AgentResponseInteractionType;
|
|
37
69
|
config?: { [k: string]: any } | null | undefined;
|
|
38
70
|
created_at: string;
|
|
39
71
|
updated_at: string;
|
|
@@ -44,6 +76,9 @@ export const AgentResponse$zodSchema: z.ZodType<AgentResponse> = z.object({
|
|
|
44
76
|
"Agent configuration",
|
|
45
77
|
),
|
|
46
78
|
created_at: z.string().describe("When the agent was created (ISO 8601 UTC)"),
|
|
79
|
+
interaction_type: AgentResponseInteractionType$zodSchema.describe(
|
|
80
|
+
"What the agent expects in the request body:\n\n- `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{\"messages\": [...]}`\n- `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{\"input\": \"...\"}`",
|
|
81
|
+
),
|
|
47
82
|
name: z.string().describe("Name of the agent"),
|
|
48
83
|
type: AgentResponseType$zodSchema.describe(
|
|
49
84
|
"- `agent`: built inside Calibrate\n- `connection`: your existing agent connected to Calibrate",
|
|
@@ -30,10 +30,42 @@ export const AgentSummaryType$zodSchema = z.enum([
|
|
|
30
30
|
"- `agent`: built inside Calibrate\n- `connection`: your existing agent connected to Calibrate",
|
|
31
31
|
);
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* What the agent expects in the request body:
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
*
|
|
38
|
+
* - `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{"messages": [...]}`
|
|
39
|
+
* - `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{"input": "..."}`
|
|
40
|
+
*/
|
|
41
|
+
export const AgentSummaryInteractionType = {
|
|
42
|
+
Conversation: "conversation",
|
|
43
|
+
General: "general",
|
|
44
|
+
} as const;
|
|
45
|
+
/**
|
|
46
|
+
* What the agent expects in the request body:
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
*
|
|
50
|
+
* - `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{"messages": [...]}`
|
|
51
|
+
* - `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{"input": "..."}`
|
|
52
|
+
*/
|
|
53
|
+
export type AgentSummaryInteractionType = ClosedEnum<
|
|
54
|
+
typeof AgentSummaryInteractionType
|
|
55
|
+
>;
|
|
56
|
+
|
|
57
|
+
export const AgentSummaryInteractionType$zodSchema = z.enum([
|
|
58
|
+
"conversation",
|
|
59
|
+
"general",
|
|
60
|
+
]).describe(
|
|
61
|
+
"What the agent expects in the request body:\n\n- `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{\"messages\": [...]}`\n- `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{\"input\": \"...\"}`",
|
|
62
|
+
);
|
|
63
|
+
|
|
33
64
|
export type AgentSummary = {
|
|
34
65
|
uuid: string;
|
|
35
66
|
name: string;
|
|
36
67
|
type: AgentSummaryType;
|
|
68
|
+
interaction_type: AgentSummaryInteractionType;
|
|
37
69
|
created_at: string;
|
|
38
70
|
updated_at: string;
|
|
39
71
|
connection_verified?: boolean | null | undefined;
|
|
@@ -48,6 +80,9 @@ export const AgentSummary$zodSchema: z.ZodType<AgentSummary> = z.object({
|
|
|
48
80
|
has_default_inputs: z.boolean().describe(
|
|
49
81
|
"Whether the agent has custom request fields configured",
|
|
50
82
|
),
|
|
83
|
+
interaction_type: AgentSummaryInteractionType$zodSchema.describe(
|
|
84
|
+
"What the agent expects in the request body:\n\n- `conversation`: a normal back-and-forth agent, answers within an ongoing conversation. Receives `{\"messages\": [...]}`\n- `general`: a one-shot agent, takes a single plain input and produces a single plain output, no conversation. Receives `{\"input\": \"...\"}`",
|
|
85
|
+
),
|
|
51
86
|
name: z.string().describe("Name of the agent"),
|
|
52
87
|
type: AgentSummaryType$zodSchema.describe(
|
|
53
88
|
"- `agent`: built inside Calibrate\n- `connection`: your existing agent connected to Calibrate",
|
|
@@ -48,10 +48,12 @@ export type AgentTestRunListItem = {
|
|
|
48
48
|
name: string;
|
|
49
49
|
status: TaskStatus;
|
|
50
50
|
type: AgentTestRunListItemType;
|
|
51
|
+
created_at: string;
|
|
51
52
|
updated_at: string;
|
|
52
53
|
total_tests?: number | null | undefined;
|
|
53
54
|
passed?: number | null | undefined;
|
|
54
55
|
failed?: number | null | undefined;
|
|
56
|
+
evaluators?: Array<string> | undefined;
|
|
55
57
|
results?: Array<TestRunCaseSummary> | null | undefined;
|
|
56
58
|
latency_ms?: { [k: string]: any } | null | undefined;
|
|
57
59
|
cost?: { [k: string]: any } | null | undefined;
|
|
@@ -67,7 +69,11 @@ export const AgentTestRunListItem$zodSchema: z.ZodType<AgentTestRunListItem> = z
|
|
|
67
69
|
cost: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
68
70
|
"Aggregated cost as `{mean, min, max, count}` (USD)",
|
|
69
71
|
),
|
|
72
|
+
created_at: z.string().describe("When the run was created (ISO 8601 UTC)"),
|
|
70
73
|
error: z.boolean().default(false).describe("True if the run failed"),
|
|
74
|
+
evaluators: z.array(z.string()).optional().describe(
|
|
75
|
+
"Names of the evaluators that judged this run, deduplicated and in display order. `Tool call` is appended when any test in the run was a tool-call test. Empty when the run had no evaluators",
|
|
76
|
+
),
|
|
71
77
|
failed: z.int().nullable().optional().describe(
|
|
72
78
|
"Number of test cases that failed",
|
|
73
79
|
),
|