@dalmia/calibrate-mcp 0.0.68 → 0.0.70
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 +123 -11
- package/bin/mcp-server.js.map +16 -11
- 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/annotationitempayload.d.ts +4 -1
- package/esm/models/annotationitempayload.d.ts.map +1 -1
- package/esm/models/annotationitempayload.js +5 -1
- package/esm/models/annotationitempayload.js.map +1 -1
- package/esm/models/chatturn.d.ts +18 -0
- package/esm/models/chatturn.d.ts.map +1 -0
- package/esm/models/chatturn.js +25 -0
- package/esm/models/chatturn.js.map +1 -0
- package/esm/models/itemmetadataentry.d.ts +10 -0
- package/esm/models/itemmetadataentry.d.ts.map +1 -0
- package/esm/models/itemmetadataentry.js +10 -0
- package/esm/models/itemmetadataentry.js.map +1 -0
- package/esm/models/itempayload.d.ts +45 -0
- package/esm/models/itempayload.d.ts.map +1 -0
- package/esm/models/itempayload.js +49 -0
- package/esm/models/itempayload.js.map +1 -0
- package/esm/models/itemupdatepayload.d.ts +4 -1
- package/esm/models/itemupdatepayload.d.ts.map +1 -1
- package/esm/models/itemupdatepayload.js +5 -1
- package/esm/models/itemupdatepayload.js.map +1 -1
- package/esm/models/toolcall.d.ts +14 -0
- package/esm/models/toolcall.d.ts.map +1 -0
- package/esm/models/toolcall.js +11 -0
- package/esm/models/toolcall.js.map +1 -0
- package/esm/models/traceingest.d.ts +2 -2
- package/esm/models/traceingest.d.ts.map +1 -1
- package/esm/models/traceingest.js +1 -1
- package/esm/models/traceingest.js.map +1 -1
- package/esm/models/turntext.d.ts +13 -0
- package/esm/models/turntext.d.ts.map +1 -0
- package/esm/models/turntext.js +10 -0
- package/esm/models/turntext.js.map +1 -0
- package/package.json +1 -1
- 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/annotationitempayload.ts +13 -3
- package/src/models/chatturn.ts +54 -0
- package/src/models/itemmetadataentry.ts +18 -0
- package/src/models/itempayload.ts +128 -0
- package/src/models/itemupdatepayload.ts +16 -3
- package/src/models/toolcall.ts +28 -0
- package/src/models/traceingest.ts +2 -2
- package/src/models/turntext.ts +28 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ChatTurn, ChatTurn$zodSchema } from "./chatturn.js";
|
|
7
|
+
import { ToolCall, ToolCall$zodSchema } from "./toolcall.js";
|
|
8
|
+
import { TurnText, TurnText$zodSchema } from "./turntext.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The reply to judge. An empty string when the reply was a tool call. For `llm` tasks
|
|
12
|
+
*/
|
|
13
|
+
export type AgentResponseUnion = TurnText | string;
|
|
14
|
+
|
|
15
|
+
export const AgentResponseUnion$zodSchema: z.ZodType<AgentResponseUnion> = z
|
|
16
|
+
.union([
|
|
17
|
+
TurnText$zodSchema,
|
|
18
|
+
z.string(),
|
|
19
|
+
]).describe(
|
|
20
|
+
"The reply to judge. An empty string when the reply was a tool call. For `llm` tasks",
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The standalone input the agent was given. For `llm-general` tasks
|
|
25
|
+
*/
|
|
26
|
+
export type ItemPayloadInput = TurnText | string;
|
|
27
|
+
|
|
28
|
+
export const ItemPayloadInput$zodSchema: z.ZodType<ItemPayloadInput> = z.union([
|
|
29
|
+
TurnText$zodSchema,
|
|
30
|
+
z.string(),
|
|
31
|
+
]).describe(
|
|
32
|
+
"The standalone input the agent was given. For `llm-general` tasks",
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The output to judge. For `llm-general` tasks
|
|
37
|
+
*/
|
|
38
|
+
export type Output = TurnText | string;
|
|
39
|
+
|
|
40
|
+
export const Output$zodSchema: z.ZodType<Output> = z.union([
|
|
41
|
+
TurnText$zodSchema,
|
|
42
|
+
z.string(),
|
|
43
|
+
]).describe("The output to judge. For `llm-general` tasks");
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* What an annotation item holds. Which fields apply depends on the task type
|
|
47
|
+
*/
|
|
48
|
+
export type ItemPayload = {
|
|
49
|
+
name: string;
|
|
50
|
+
description?: string | null | undefined;
|
|
51
|
+
reference_transcript?: string | null | undefined;
|
|
52
|
+
predicted_transcript?: string | null | undefined;
|
|
53
|
+
text?: string | null | undefined;
|
|
54
|
+
audio_path?: string | null | undefined;
|
|
55
|
+
chat_history?: Array<ChatTurn> | null | undefined;
|
|
56
|
+
agent_response?: TurnText | string | null | undefined;
|
|
57
|
+
input?: TurnText | string | null | undefined;
|
|
58
|
+
output?: TurnText | string | null | undefined;
|
|
59
|
+
transcript?: Array<ChatTurn> | null | undefined;
|
|
60
|
+
tool_calls?: Array<ToolCall> | null | undefined;
|
|
61
|
+
expected_tool_calls?: Array<ToolCall> | null | undefined;
|
|
62
|
+
actual_tool_calls?: Array<ToolCall> | null | undefined;
|
|
63
|
+
evaluator_variables?:
|
|
64
|
+
| { [k: string]: { [k: string]: any } }
|
|
65
|
+
| null
|
|
66
|
+
| undefined;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const ItemPayload$zodSchema: z.ZodType<ItemPayload> = z.object({
|
|
70
|
+
actual_tool_calls: z.array(ToolCall$zodSchema).nullable().optional().describe(
|
|
71
|
+
"Tool calls the agent made. Sending this marks the item as a tool call for a person to judge. For `llm` and `llm-general` tasks",
|
|
72
|
+
),
|
|
73
|
+
agent_response: z.union([
|
|
74
|
+
TurnText$zodSchema,
|
|
75
|
+
z.string(),
|
|
76
|
+
]).nullable().optional().describe(
|
|
77
|
+
"The reply to judge. An empty string when the reply was a tool call. For `llm` tasks",
|
|
78
|
+
),
|
|
79
|
+
audio_path: z.string().nullable().optional().describe(
|
|
80
|
+
"Storage key or `s3://` URI of the audio clip. For `tts` tasks",
|
|
81
|
+
),
|
|
82
|
+
chat_history: z.array(ChatTurn$zodSchema).nullable().optional().describe(
|
|
83
|
+
"The conversation up to the reply being judged, ending at the user turn. For `llm` tasks",
|
|
84
|
+
),
|
|
85
|
+
description: z.string().nullable().optional().describe(
|
|
86
|
+
"A description of the item. For every task type",
|
|
87
|
+
),
|
|
88
|
+
evaluator_variables: z.record(z.string(), z.record(z.string(), z.any()))
|
|
89
|
+
.nullable().optional().describe(
|
|
90
|
+
"Values for each evaluator's `{{\"{{\"}}variable}}` placeholders, keyed by evaluator ID. For `llm`, `llm-general` and `conversation` tasks",
|
|
91
|
+
),
|
|
92
|
+
expected_tool_calls: z.array(ToolCall$zodSchema).nullable().optional()
|
|
93
|
+
.describe(
|
|
94
|
+
"Tool calls the agent should have made. Sending this marks the item as a tool call for a person to judge. For `llm` and `llm-general` tasks",
|
|
95
|
+
),
|
|
96
|
+
input: z.union([
|
|
97
|
+
TurnText$zodSchema,
|
|
98
|
+
z.string(),
|
|
99
|
+
]).nullable().optional().describe(
|
|
100
|
+
"The standalone input the agent was given. For `llm-general` tasks",
|
|
101
|
+
),
|
|
102
|
+
name: z.string().describe(
|
|
103
|
+
"Name of the item, unique within the task. For every task type",
|
|
104
|
+
),
|
|
105
|
+
output: z.union([
|
|
106
|
+
TurnText$zodSchema,
|
|
107
|
+
z.string(),
|
|
108
|
+
]).nullable().optional().describe(
|
|
109
|
+
"The output to judge. For `llm-general` tasks",
|
|
110
|
+
),
|
|
111
|
+
predicted_transcript: z.string().nullable().optional().describe(
|
|
112
|
+
"The transcript to judge. For `stt` tasks",
|
|
113
|
+
),
|
|
114
|
+
reference_transcript: z.string().nullable().optional().describe(
|
|
115
|
+
"The correct transcript. For `stt` tasks",
|
|
116
|
+
),
|
|
117
|
+
text: z.string().nullable().optional().describe(
|
|
118
|
+
"The text that was spoken. For `tts` tasks",
|
|
119
|
+
),
|
|
120
|
+
tool_calls: z.array(ToolCall$zodSchema).nullable().optional().describe(
|
|
121
|
+
"Tool calls the agent made in place of a text reply. With no text reply, sending this marks the item as a tool call for a person to judge. For `llm` and `llm-general` tasks",
|
|
122
|
+
),
|
|
123
|
+
transcript: z.array(ChatTurn$zodSchema).nullable().optional().describe(
|
|
124
|
+
"The full conversation to judge. For `conversation` tasks",
|
|
125
|
+
),
|
|
126
|
+
}).describe(
|
|
127
|
+
"What an annotation item holds. Which fields apply depends on the task type",
|
|
128
|
+
);
|
|
@@ -3,13 +3,26 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import {
|
|
7
|
+
ItemMetadataEntry,
|
|
8
|
+
ItemMetadataEntry$zodSchema,
|
|
9
|
+
} from "./itemmetadataentry.js";
|
|
10
|
+
import { ItemPayload, ItemPayload$zodSchema } from "./itempayload.js";
|
|
6
11
|
|
|
7
|
-
export type ItemUpdatePayload = {
|
|
12
|
+
export type ItemUpdatePayload = {
|
|
13
|
+
uuid: string;
|
|
14
|
+
payload: ItemPayload;
|
|
15
|
+
metadata?: Array<ItemMetadataEntry> | null | undefined;
|
|
16
|
+
};
|
|
8
17
|
|
|
9
18
|
export const ItemUpdatePayload$zodSchema: z.ZodType<ItemUpdatePayload> = z
|
|
10
19
|
.object({
|
|
11
|
-
|
|
12
|
-
|
|
20
|
+
metadata: z.array(ItemMetadataEntry$zodSchema).nullable().optional()
|
|
21
|
+
.describe(
|
|
22
|
+
"Key-value pairs stored with the item and shown beside it on the labelling form. Omit to leave the stored pairs as they are. Send an empty list to clear them",
|
|
23
|
+
),
|
|
24
|
+
payload: ItemPayload$zodSchema.describe(
|
|
25
|
+
"What an annotation item holds. Which fields apply depends on the task type",
|
|
13
26
|
),
|
|
14
27
|
uuid: z.string().describe("ID of the item to update"),
|
|
15
28
|
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* One call to a tool
|
|
9
|
+
*/
|
|
10
|
+
export type ToolCall = {
|
|
11
|
+
tool: string;
|
|
12
|
+
arguments?: { [k: string]: any } | null | undefined;
|
|
13
|
+
output?: any | undefined;
|
|
14
|
+
accept_any_arguments?: boolean | null | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const ToolCall$zodSchema: z.ZodType<ToolCall> = z.object({
|
|
18
|
+
accept_any_arguments: z.boolean().nullable().optional().describe(
|
|
19
|
+
"When `true`, only the tool name had to match and `arguments` was ignored. Carried over from a tool-call test's expected calls",
|
|
20
|
+
),
|
|
21
|
+
arguments: z.record(z.string(), z.any()).nullable().optional().describe(
|
|
22
|
+
"Argument values the agent passed to the tool. Omit when the call had none",
|
|
23
|
+
),
|
|
24
|
+
output: z.any().optional().describe(
|
|
25
|
+
"What the tool returned for this call. Any JSON value. Omit when you do not record it",
|
|
26
|
+
),
|
|
27
|
+
tool: z.string().describe("Name of the tool the agent called"),
|
|
28
|
+
}).describe("One call to a tool");
|
|
@@ -13,9 +13,9 @@ import { TraceTurn, TraceTurn$zodSchema } from "./traceturn.js";
|
|
|
13
13
|
/**
|
|
14
14
|
* 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
|
|
15
15
|
*/
|
|
16
|
-
export type
|
|
16
|
+
export type TraceIngestInput = string | Array<TraceTurn>;
|
|
17
17
|
|
|
18
|
-
export const
|
|
18
|
+
export const TraceIngestInput$zodSchema: z.ZodType<TraceIngestInput> = z.union([
|
|
19
19
|
z.string(),
|
|
20
20
|
z.array(TraceTurn$zodSchema),
|
|
21
21
|
]).describe(
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Text with a display name and other forms of it, sent in place of a plain string
|
|
9
|
+
*/
|
|
10
|
+
export type TurnText = {
|
|
11
|
+
content: string;
|
|
12
|
+
label?: string | null | undefined;
|
|
13
|
+
versions?: { [k: string]: string } | null | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const TurnText$zodSchema: z.ZodType<TurnText> = z.object({
|
|
17
|
+
content: z.string().describe(
|
|
18
|
+
"The text the LLM judge reads and annotators see by default",
|
|
19
|
+
),
|
|
20
|
+
label: z.string().nullable().optional().describe(
|
|
21
|
+
"Display name for the text in `content`, shown to annotators",
|
|
22
|
+
),
|
|
23
|
+
versions: z.record(z.string(), z.string()).nullable().optional().describe(
|
|
24
|
+
"Other forms of the same text, such as a translation or a human rewrite, keyed by the name annotators see for each. Shown to annotators only",
|
|
25
|
+
),
|
|
26
|
+
}).describe(
|
|
27
|
+
"Text with a display name and other forms of it, sent in place of a plain string",
|
|
28
|
+
);
|