@openai/agents-core 0.3.5 → 0.3.6
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/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/items.d.ts +48 -0
- package/dist/memory/session.d.ts +32 -0
- package/dist/memory/session.js +6 -0
- package/dist/memory/session.js.map +1 -1
- package/dist/memory/session.mjs +5 -1
- package/dist/memory/session.mjs.map +1 -1
- package/dist/metadata.js +2 -2
- package/dist/metadata.mjs +2 -2
- package/dist/model.d.ts +3 -2
- package/dist/run.js +23 -0
- package/dist/run.js.map +1 -1
- package/dist/run.mjs +23 -0
- package/dist/run.mjs.map +1 -1
- package/dist/runImplementation.d.ts +2 -2
- package/dist/runImplementation.js +31 -1
- package/dist/runImplementation.js.map +1 -1
- package/dist/runImplementation.mjs +31 -1
- package/dist/runImplementation.mjs.map +1 -1
- package/dist/runState.d.ts +144 -0
- package/dist/runState.js +2 -0
- package/dist/runState.js.map +1 -1
- package/dist/runState.mjs +2 -0
- package/dist/runState.mjs.map +1 -1
- package/dist/shims/mcp-server/node.js +12 -3
- package/dist/shims/mcp-server/node.js.map +1 -1
- package/dist/shims/mcp-server/node.mjs +12 -3
- package/dist/shims/mcp-server/node.mjs.map +1 -1
- package/dist/tool.d.ts +40 -8
- package/dist/tool.js +121 -2
- package/dist/tool.js.map +1 -1
- package/dist/tool.mjs +119 -2
- package/dist/tool.mjs.map +1 -1
- package/dist/tracing/context.js +1 -0
- package/dist/tracing/context.js.map +1 -1
- package/dist/tracing/context.mjs +1 -0
- package/dist/tracing/context.mjs.map +1 -1
- package/dist/tracing/createSpans.d.ts +4 -4
- package/dist/tracing/spans.d.ts +2 -2
- package/dist/types/aliases.d.ts +3 -3
- package/dist/types/protocol.d.ts +171 -0
- package/dist/types/protocol.js +20 -1
- package/dist/types/protocol.js.map +1 -1
- package/dist/types/protocol.mjs +18 -0
- package/dist/types/protocol.mjs.map +1 -1
- package/dist/usage.d.ts +5 -0
- package/dist/usage.js +7 -0
- package/dist/usage.js.map +1 -1
- package/dist/usage.mjs +7 -0
- package/dist/usage.mjs.map +1 -1
- package/dist/utils/serialize.js +11 -0
- package/dist/utils/serialize.js.map +1 -1
- package/dist/utils/serialize.mjs +11 -0
- package/dist/utils/serialize.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/tracing/context.ts"],"names":[],"mappings":";;AAwBA,0CAOC;AAOD,wCAMC;AA0CD,8BAiBC;AASD,4CAgBC;AAOD,
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/tracing/context.ts"],"names":[],"mappings":";;AAwBA,0CAOC;AAOD,wCAMC;AA0CD,8BAiBC;AASD,4CAgBC;AAOD,wCAcC;AAED,4CAOC;AAOD,sDAKC;AASD,kDAMC;AAOD,gDASC;AAzMD,uDAA+D;AAE/D,4CAAoD;AAEpD,yCAA8C;AAQ9C,IAAI,yBAAsE,CAAC;AAE3E,SAAS,2BAA2B;IAClC,yBAAyB,KAAK,IAAI,0BAAiB,EAAgB,CAAC;IACpE,OAAO,yBAAyB,CAAC;AACnC,CAAC;AAED;;;;GAIG;AACH,SAAgB,eAAe;IAC7B,MAAM,YAAY,GAAG,2BAA2B,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC9D,IAAI,YAAY,EAAE,KAAK,EAAE,CAAC;QACxB,OAAO,YAAY,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,SAAgB,cAAc;IAC5B,MAAM,WAAW,GAAG,2BAA2B,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC7D,IAAI,WAAW,EAAE,IAAI,EAAE,CAAC;QACtB,OAAO,WAAW,CAAC,IAAI,CAAC;IAC1B,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,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,SAAoB;IACxD,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,IAAI,WAAW,EAAE,CAAC;QAChB,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,mBAAmB,CAAC,OAAqB;IACvD,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE;QAC7B,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE;QAC3B,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE;KAC5C,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAI,EAAoB;IACxD,MAAM,cAAc,GAAG,2BAA2B,EAAE,CAAC,QAAQ,EAAE,CAAC;IAChE,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,aAAa,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;IAE1D,OAAO,2BAA2B,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAC9D,CAAC"}
|
package/dist/tracing/context.mjs
CHANGED
|
@@ -104,6 +104,7 @@ export function setCurrentSpan(span) {
|
|
|
104
104
|
context.span.previousSpan = context.previousSpan;
|
|
105
105
|
context.previousSpan = context.span;
|
|
106
106
|
}
|
|
107
|
+
span.previousSpan = context.span ?? context.previousSpan;
|
|
107
108
|
context.span = span;
|
|
108
109
|
getContextAsyncLocalStorage().enterWith(context);
|
|
109
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.mjs","sourceRoot":"","sources":["../../src/tracing/context.ts"],"names":[],"mappings":"OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B;OAEvD,EAAE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E,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE;QAC3B,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE;KAC5C,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAI,EAAoB;IACxD,MAAM,cAAc,GAAG,2BAA2B,EAAE,CAAC,QAAQ,EAAE,CAAC;IAChE,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM,aAAa,GAAG,mBAAmB,CAAC,cAAc,CAAC,CAAC;IAE1D,OAAO,2BAA2B,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -125,7 +125,7 @@ export declare function createTranscriptionSpan(options: CreateArgs<Transcriptio
|
|
|
125
125
|
data: {
|
|
126
126
|
input: {
|
|
127
127
|
data: string;
|
|
128
|
-
format: 'pcm' | string;
|
|
128
|
+
format: 'pcm' | (string & {});
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
131
|
}, parent?: Span<any> | Trace): Span<TranscriptionSpanData>;
|
|
@@ -133,7 +133,7 @@ export declare const withTranscriptionSpan: <TOutput>(fn: (span: Span<Transcript
|
|
|
133
133
|
data: {
|
|
134
134
|
input: {
|
|
135
135
|
data: string;
|
|
136
|
-
format: "pcm" | string;
|
|
136
|
+
format: "pcm" | (string & {});
|
|
137
137
|
};
|
|
138
138
|
};
|
|
139
139
|
}, parent?: Trace | Span<any> | undefined) => Promise<TOutput>;
|
|
@@ -144,7 +144,7 @@ export declare function createSpeechSpan(options: CreateArgs<SpeechSpanData> & {
|
|
|
144
144
|
data: {
|
|
145
145
|
output: {
|
|
146
146
|
data: string;
|
|
147
|
-
format: 'pcm' | string;
|
|
147
|
+
format: 'pcm' | (string & {});
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
150
|
}, parent?: Span<any> | Trace): Span<SpeechSpanData>;
|
|
@@ -152,7 +152,7 @@ export declare const withSpeechSpan: <TOutput>(fn: (span: Span<SpeechSpanData>)
|
|
|
152
152
|
data: {
|
|
153
153
|
output: {
|
|
154
154
|
data: string;
|
|
155
|
-
format: "pcm" | string;
|
|
155
|
+
format: "pcm" | (string & {});
|
|
156
156
|
};
|
|
157
157
|
};
|
|
158
158
|
}, parent?: Trace | Span<any> | undefined) => Promise<TOutput>;
|
package/dist/tracing/spans.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export type TranscriptionSpanData = SpanDataBase & {
|
|
|
52
52
|
type: 'transcription';
|
|
53
53
|
input: {
|
|
54
54
|
data: string;
|
|
55
|
-
format: 'pcm' | string;
|
|
55
|
+
format: 'pcm' | (string & {});
|
|
56
56
|
};
|
|
57
57
|
output?: string;
|
|
58
58
|
model?: string;
|
|
@@ -63,7 +63,7 @@ export type SpeechSpanData = SpanDataBase & {
|
|
|
63
63
|
input?: string;
|
|
64
64
|
output: {
|
|
65
65
|
data: string;
|
|
66
|
-
format: 'pcm' | string;
|
|
66
|
+
format: 'pcm' | (string & {});
|
|
67
67
|
};
|
|
68
68
|
model?: string;
|
|
69
69
|
model_config?: Record<string, any>;
|
package/dist/types/aliases.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UserMessageItem, AssistantMessageItem, SystemMessageItem, HostedToolCallItem, FunctionCallItem, ComputerUseCallItem, ShellCallItem, FunctionCallResultItem, ComputerCallResultItem, ShellCallResultItem, ApplyPatchCallItem, ApplyPatchCallResultItem, ReasoningItem, UnknownItem } from './protocol';
|
|
1
|
+
import { UserMessageItem, AssistantMessageItem, SystemMessageItem, HostedToolCallItem, FunctionCallItem, ComputerUseCallItem, ShellCallItem, FunctionCallResultItem, ComputerCallResultItem, ShellCallResultItem, ApplyPatchCallItem, ApplyPatchCallResultItem, ReasoningItem, CompactionItem, UnknownItem } from './protocol';
|
|
2
2
|
/**
|
|
3
3
|
* Context that is being passed around as part of the session is unknown
|
|
4
4
|
*/
|
|
@@ -10,8 +10,8 @@ export type TextOutput = 'text';
|
|
|
10
10
|
/**
|
|
11
11
|
* Agent output items
|
|
12
12
|
*/
|
|
13
|
-
export type AgentOutputItem = UserMessageItem | AssistantMessageItem | SystemMessageItem | HostedToolCallItem | FunctionCallItem | ComputerUseCallItem | ShellCallItem | ApplyPatchCallItem | FunctionCallResultItem | ComputerCallResultItem | ShellCallResultItem | ApplyPatchCallResultItem | ReasoningItem | UnknownItem;
|
|
13
|
+
export type AgentOutputItem = UserMessageItem | AssistantMessageItem | SystemMessageItem | HostedToolCallItem | FunctionCallItem | ComputerUseCallItem | ShellCallItem | ApplyPatchCallItem | FunctionCallResultItem | ComputerCallResultItem | ShellCallResultItem | ApplyPatchCallResultItem | ReasoningItem | CompactionItem | UnknownItem;
|
|
14
14
|
/**
|
|
15
15
|
* Agent input
|
|
16
16
|
*/
|
|
17
|
-
export type AgentInputItem = UserMessageItem | AssistantMessageItem | SystemMessageItem | HostedToolCallItem | FunctionCallItem | ComputerUseCallItem | ShellCallItem | ApplyPatchCallItem | FunctionCallResultItem | ComputerCallResultItem | ShellCallResultItem | ApplyPatchCallResultItem | ReasoningItem | UnknownItem;
|
|
17
|
+
export type AgentInputItem = UserMessageItem | AssistantMessageItem | SystemMessageItem | HostedToolCallItem | FunctionCallItem | ComputerUseCallItem | ShellCallItem | ApplyPatchCallItem | FunctionCallResultItem | ComputerCallResultItem | ShellCallResultItem | ApplyPatchCallResultItem | ReasoningItem | CompactionItem | UnknownItem;
|
package/dist/types/protocol.d.ts
CHANGED
|
@@ -3819,6 +3819,27 @@ export declare const ReasoningItem: z.ZodObject<{
|
|
|
3819
3819
|
}[] | undefined;
|
|
3820
3820
|
}>;
|
|
3821
3821
|
export type ReasoningItem = z.infer<typeof ReasoningItem>;
|
|
3822
|
+
export declare const CompactionItem: z.ZodObject<{
|
|
3823
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
3824
|
+
} & {
|
|
3825
|
+
type: z.ZodLiteral<"compaction">;
|
|
3826
|
+
encrypted_content: z.ZodString;
|
|
3827
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3828
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
3829
|
+
}, "strip", z.ZodTypeAny, {
|
|
3830
|
+
type: "compaction";
|
|
3831
|
+
encrypted_content: string;
|
|
3832
|
+
providerData?: Record<string, any> | undefined;
|
|
3833
|
+
id?: string | undefined;
|
|
3834
|
+
created_by?: string | undefined;
|
|
3835
|
+
}, {
|
|
3836
|
+
type: "compaction";
|
|
3837
|
+
encrypted_content: string;
|
|
3838
|
+
providerData?: Record<string, any> | undefined;
|
|
3839
|
+
id?: string | undefined;
|
|
3840
|
+
created_by?: string | undefined;
|
|
3841
|
+
}>;
|
|
3842
|
+
export type CompactionItem = z.infer<typeof CompactionItem>;
|
|
3822
3843
|
/**
|
|
3823
3844
|
* This is a catch all for items that are not part of the protocol.
|
|
3824
3845
|
*
|
|
@@ -5134,6 +5155,25 @@ export declare const OutputModelItem: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
5134
5155
|
text: string;
|
|
5135
5156
|
providerData?: Record<string, any> | undefined;
|
|
5136
5157
|
}[] | undefined;
|
|
5158
|
+
}>, z.ZodObject<{
|
|
5159
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
5160
|
+
} & {
|
|
5161
|
+
type: z.ZodLiteral<"compaction">;
|
|
5162
|
+
encrypted_content: z.ZodString;
|
|
5163
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5164
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
5165
|
+
}, "strip", z.ZodTypeAny, {
|
|
5166
|
+
type: "compaction";
|
|
5167
|
+
encrypted_content: string;
|
|
5168
|
+
providerData?: Record<string, any> | undefined;
|
|
5169
|
+
id?: string | undefined;
|
|
5170
|
+
created_by?: string | undefined;
|
|
5171
|
+
}, {
|
|
5172
|
+
type: "compaction";
|
|
5173
|
+
encrypted_content: string;
|
|
5174
|
+
providerData?: Record<string, any> | undefined;
|
|
5175
|
+
id?: string | undefined;
|
|
5176
|
+
created_by?: string | undefined;
|
|
5137
5177
|
}>, z.ZodObject<{
|
|
5138
5178
|
/**
|
|
5139
5179
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -6780,6 +6820,25 @@ export declare const ModelItem: z.ZodUnion<[z.ZodObject<{
|
|
|
6780
6820
|
text: string;
|
|
6781
6821
|
providerData?: Record<string, any> | undefined;
|
|
6782
6822
|
}[] | undefined;
|
|
6823
|
+
}>, z.ZodObject<{
|
|
6824
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
6825
|
+
} & {
|
|
6826
|
+
type: z.ZodLiteral<"compaction">;
|
|
6827
|
+
encrypted_content: z.ZodString;
|
|
6828
|
+
id: z.ZodOptional<z.ZodString>;
|
|
6829
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
6830
|
+
}, "strip", z.ZodTypeAny, {
|
|
6831
|
+
type: "compaction";
|
|
6832
|
+
encrypted_content: string;
|
|
6833
|
+
providerData?: Record<string, any> | undefined;
|
|
6834
|
+
id?: string | undefined;
|
|
6835
|
+
created_by?: string | undefined;
|
|
6836
|
+
}, {
|
|
6837
|
+
type: "compaction";
|
|
6838
|
+
encrypted_content: string;
|
|
6839
|
+
providerData?: Record<string, any> | undefined;
|
|
6840
|
+
id?: string | undefined;
|
|
6841
|
+
created_by?: string | undefined;
|
|
6783
6842
|
}>, z.ZodObject<{
|
|
6784
6843
|
/**
|
|
6785
6844
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -6810,18 +6869,21 @@ export declare const RequestUsageData: z.ZodObject<{
|
|
|
6810
6869
|
totalTokens: z.ZodNumber;
|
|
6811
6870
|
inputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
6812
6871
|
outputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
6872
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
6813
6873
|
}, "strip", z.ZodTypeAny, {
|
|
6814
6874
|
inputTokens: number;
|
|
6815
6875
|
outputTokens: number;
|
|
6816
6876
|
totalTokens: number;
|
|
6817
6877
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
6818
6878
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
6879
|
+
endpoint?: string | undefined;
|
|
6819
6880
|
}, {
|
|
6820
6881
|
inputTokens: number;
|
|
6821
6882
|
outputTokens: number;
|
|
6822
6883
|
totalTokens: number;
|
|
6823
6884
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
6824
6885
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
6886
|
+
endpoint?: string | undefined;
|
|
6825
6887
|
}>;
|
|
6826
6888
|
export type RequestUsageData = z.infer<typeof RequestUsageData>;
|
|
6827
6889
|
export declare const UsageData: z.ZodObject<{
|
|
@@ -6837,18 +6899,21 @@ export declare const UsageData: z.ZodObject<{
|
|
|
6837
6899
|
totalTokens: z.ZodNumber;
|
|
6838
6900
|
inputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
6839
6901
|
outputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
6902
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
6840
6903
|
}, "strip", z.ZodTypeAny, {
|
|
6841
6904
|
inputTokens: number;
|
|
6842
6905
|
outputTokens: number;
|
|
6843
6906
|
totalTokens: number;
|
|
6844
6907
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
6845
6908
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
6909
|
+
endpoint?: string | undefined;
|
|
6846
6910
|
}, {
|
|
6847
6911
|
inputTokens: number;
|
|
6848
6912
|
outputTokens: number;
|
|
6849
6913
|
totalTokens: number;
|
|
6850
6914
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
6851
6915
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
6916
|
+
endpoint?: string | undefined;
|
|
6852
6917
|
}>, "many">>;
|
|
6853
6918
|
}, "strip", z.ZodTypeAny, {
|
|
6854
6919
|
inputTokens: number;
|
|
@@ -6863,6 +6928,7 @@ export declare const UsageData: z.ZodObject<{
|
|
|
6863
6928
|
totalTokens: number;
|
|
6864
6929
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
6865
6930
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
6931
|
+
endpoint?: string | undefined;
|
|
6866
6932
|
}[] | undefined;
|
|
6867
6933
|
}, {
|
|
6868
6934
|
inputTokens: number;
|
|
@@ -6877,6 +6943,7 @@ export declare const UsageData: z.ZodObject<{
|
|
|
6877
6943
|
totalTokens: number;
|
|
6878
6944
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
6879
6945
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
6946
|
+
endpoint?: string | undefined;
|
|
6880
6947
|
}[] | undefined;
|
|
6881
6948
|
}>;
|
|
6882
6949
|
export type UsageData = z.infer<typeof UsageData>;
|
|
@@ -6965,18 +7032,21 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
6965
7032
|
totalTokens: z.ZodNumber;
|
|
6966
7033
|
inputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
6967
7034
|
outputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
7035
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
6968
7036
|
}, "strip", z.ZodTypeAny, {
|
|
6969
7037
|
inputTokens: number;
|
|
6970
7038
|
outputTokens: number;
|
|
6971
7039
|
totalTokens: number;
|
|
6972
7040
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
6973
7041
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
7042
|
+
endpoint?: string | undefined;
|
|
6974
7043
|
}, {
|
|
6975
7044
|
inputTokens: number;
|
|
6976
7045
|
outputTokens: number;
|
|
6977
7046
|
totalTokens: number;
|
|
6978
7047
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
6979
7048
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
7049
|
+
endpoint?: string | undefined;
|
|
6980
7050
|
}>, "many">>;
|
|
6981
7051
|
}, "strip", z.ZodTypeAny, {
|
|
6982
7052
|
inputTokens: number;
|
|
@@ -6991,6 +7061,7 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
6991
7061
|
totalTokens: number;
|
|
6992
7062
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
6993
7063
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
7064
|
+
endpoint?: string | undefined;
|
|
6994
7065
|
}[] | undefined;
|
|
6995
7066
|
}, {
|
|
6996
7067
|
inputTokens: number;
|
|
@@ -7005,6 +7076,7 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
7005
7076
|
totalTokens: number;
|
|
7006
7077
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
7007
7078
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
7079
|
+
endpoint?: string | undefined;
|
|
7008
7080
|
}[] | undefined;
|
|
7009
7081
|
}>;
|
|
7010
7082
|
/**
|
|
@@ -8292,6 +8364,25 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
8292
8364
|
text: string;
|
|
8293
8365
|
providerData?: Record<string, any> | undefined;
|
|
8294
8366
|
}[] | undefined;
|
|
8367
|
+
}>, z.ZodObject<{
|
|
8368
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
8369
|
+
} & {
|
|
8370
|
+
type: z.ZodLiteral<"compaction">;
|
|
8371
|
+
encrypted_content: z.ZodString;
|
|
8372
|
+
id: z.ZodOptional<z.ZodString>;
|
|
8373
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
8374
|
+
}, "strip", z.ZodTypeAny, {
|
|
8375
|
+
type: "compaction";
|
|
8376
|
+
encrypted_content: string;
|
|
8377
|
+
providerData?: Record<string, any> | undefined;
|
|
8378
|
+
id?: string | undefined;
|
|
8379
|
+
created_by?: string | undefined;
|
|
8380
|
+
}, {
|
|
8381
|
+
type: "compaction";
|
|
8382
|
+
encrypted_content: string;
|
|
8383
|
+
providerData?: Record<string, any> | undefined;
|
|
8384
|
+
id?: string | undefined;
|
|
8385
|
+
created_by?: string | undefined;
|
|
8295
8386
|
}>, z.ZodObject<{
|
|
8296
8387
|
/**
|
|
8297
8388
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -8536,6 +8627,12 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
8536
8627
|
text: string;
|
|
8537
8628
|
providerData?: Record<string, any> | undefined;
|
|
8538
8629
|
}[] | undefined;
|
|
8630
|
+
} | {
|
|
8631
|
+
type: "compaction";
|
|
8632
|
+
encrypted_content: string;
|
|
8633
|
+
providerData?: Record<string, any> | undefined;
|
|
8634
|
+
id?: string | undefined;
|
|
8635
|
+
created_by?: string | undefined;
|
|
8539
8636
|
} | {
|
|
8540
8637
|
type: "unknown";
|
|
8541
8638
|
providerData?: Record<string, any> | undefined;
|
|
@@ -8554,6 +8651,7 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
8554
8651
|
totalTokens: number;
|
|
8555
8652
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
8556
8653
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
8654
|
+
endpoint?: string | undefined;
|
|
8557
8655
|
}[] | undefined;
|
|
8558
8656
|
};
|
|
8559
8657
|
providerData?: Record<string, any> | undefined;
|
|
@@ -8778,6 +8876,12 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
8778
8876
|
text: string;
|
|
8779
8877
|
providerData?: Record<string, any> | undefined;
|
|
8780
8878
|
}[] | undefined;
|
|
8879
|
+
} | {
|
|
8880
|
+
type: "compaction";
|
|
8881
|
+
encrypted_content: string;
|
|
8882
|
+
providerData?: Record<string, any> | undefined;
|
|
8883
|
+
id?: string | undefined;
|
|
8884
|
+
created_by?: string | undefined;
|
|
8781
8885
|
} | {
|
|
8782
8886
|
type: "unknown";
|
|
8783
8887
|
providerData?: Record<string, any> | undefined;
|
|
@@ -8796,6 +8900,7 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
8796
8900
|
totalTokens: number;
|
|
8797
8901
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
8798
8902
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
8903
|
+
endpoint?: string | undefined;
|
|
8799
8904
|
}[] | undefined;
|
|
8800
8905
|
};
|
|
8801
8906
|
providerData?: Record<string, any> | undefined;
|
|
@@ -9023,6 +9128,12 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
9023
9128
|
text: string;
|
|
9024
9129
|
providerData?: Record<string, any> | undefined;
|
|
9025
9130
|
}[] | undefined;
|
|
9131
|
+
} | {
|
|
9132
|
+
type: "compaction";
|
|
9133
|
+
encrypted_content: string;
|
|
9134
|
+
providerData?: Record<string, any> | undefined;
|
|
9135
|
+
id?: string | undefined;
|
|
9136
|
+
created_by?: string | undefined;
|
|
9026
9137
|
} | {
|
|
9027
9138
|
type: "unknown";
|
|
9028
9139
|
providerData?: Record<string, any> | undefined;
|
|
@@ -9041,6 +9152,7 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
9041
9152
|
totalTokens: number;
|
|
9042
9153
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
9043
9154
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
9155
|
+
endpoint?: string | undefined;
|
|
9044
9156
|
}[] | undefined;
|
|
9045
9157
|
};
|
|
9046
9158
|
providerData?: Record<string, any> | undefined;
|
|
@@ -9269,6 +9381,12 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
9269
9381
|
text: string;
|
|
9270
9382
|
providerData?: Record<string, any> | undefined;
|
|
9271
9383
|
}[] | undefined;
|
|
9384
|
+
} | {
|
|
9385
|
+
type: "compaction";
|
|
9386
|
+
encrypted_content: string;
|
|
9387
|
+
providerData?: Record<string, any> | undefined;
|
|
9388
|
+
id?: string | undefined;
|
|
9389
|
+
created_by?: string | undefined;
|
|
9272
9390
|
} | {
|
|
9273
9391
|
type: "unknown";
|
|
9274
9392
|
providerData?: Record<string, any> | undefined;
|
|
@@ -9287,6 +9405,7 @@ export declare const StreamEventResponseCompleted: z.ZodObject<{
|
|
|
9287
9405
|
totalTokens: number;
|
|
9288
9406
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
9289
9407
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
9408
|
+
endpoint?: string | undefined;
|
|
9290
9409
|
}[] | undefined;
|
|
9291
9410
|
};
|
|
9292
9411
|
providerData?: Record<string, any> | undefined;
|
|
@@ -9375,18 +9494,21 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
9375
9494
|
totalTokens: z.ZodNumber;
|
|
9376
9495
|
inputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
9377
9496
|
outputTokensDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
9497
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
9378
9498
|
}, "strip", z.ZodTypeAny, {
|
|
9379
9499
|
inputTokens: number;
|
|
9380
9500
|
outputTokens: number;
|
|
9381
9501
|
totalTokens: number;
|
|
9382
9502
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
9383
9503
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
9504
|
+
endpoint?: string | undefined;
|
|
9384
9505
|
}, {
|
|
9385
9506
|
inputTokens: number;
|
|
9386
9507
|
outputTokens: number;
|
|
9387
9508
|
totalTokens: number;
|
|
9388
9509
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
9389
9510
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
9511
|
+
endpoint?: string | undefined;
|
|
9390
9512
|
}>, "many">>;
|
|
9391
9513
|
}, "strip", z.ZodTypeAny, {
|
|
9392
9514
|
inputTokens: number;
|
|
@@ -9401,6 +9523,7 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
9401
9523
|
totalTokens: number;
|
|
9402
9524
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
9403
9525
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
9526
|
+
endpoint?: string | undefined;
|
|
9404
9527
|
}[] | undefined;
|
|
9405
9528
|
}, {
|
|
9406
9529
|
inputTokens: number;
|
|
@@ -9415,6 +9538,7 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
9415
9538
|
totalTokens: number;
|
|
9416
9539
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
9417
9540
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
9541
|
+
endpoint?: string | undefined;
|
|
9418
9542
|
}[] | undefined;
|
|
9419
9543
|
}>;
|
|
9420
9544
|
/**
|
|
@@ -10702,6 +10826,25 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
10702
10826
|
text: string;
|
|
10703
10827
|
providerData?: Record<string, any> | undefined;
|
|
10704
10828
|
}[] | undefined;
|
|
10829
|
+
}>, z.ZodObject<{
|
|
10830
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
10831
|
+
} & {
|
|
10832
|
+
type: z.ZodLiteral<"compaction">;
|
|
10833
|
+
encrypted_content: z.ZodString;
|
|
10834
|
+
id: z.ZodOptional<z.ZodString>;
|
|
10835
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
10836
|
+
}, "strip", z.ZodTypeAny, {
|
|
10837
|
+
type: "compaction";
|
|
10838
|
+
encrypted_content: string;
|
|
10839
|
+
providerData?: Record<string, any> | undefined;
|
|
10840
|
+
id?: string | undefined;
|
|
10841
|
+
created_by?: string | undefined;
|
|
10842
|
+
}, {
|
|
10843
|
+
type: "compaction";
|
|
10844
|
+
encrypted_content: string;
|
|
10845
|
+
providerData?: Record<string, any> | undefined;
|
|
10846
|
+
id?: string | undefined;
|
|
10847
|
+
created_by?: string | undefined;
|
|
10705
10848
|
}>, z.ZodObject<{
|
|
10706
10849
|
/**
|
|
10707
10850
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -10946,6 +11089,12 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
10946
11089
|
text: string;
|
|
10947
11090
|
providerData?: Record<string, any> | undefined;
|
|
10948
11091
|
}[] | undefined;
|
|
11092
|
+
} | {
|
|
11093
|
+
type: "compaction";
|
|
11094
|
+
encrypted_content: string;
|
|
11095
|
+
providerData?: Record<string, any> | undefined;
|
|
11096
|
+
id?: string | undefined;
|
|
11097
|
+
created_by?: string | undefined;
|
|
10949
11098
|
} | {
|
|
10950
11099
|
type: "unknown";
|
|
10951
11100
|
providerData?: Record<string, any> | undefined;
|
|
@@ -10964,6 +11113,7 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
10964
11113
|
totalTokens: number;
|
|
10965
11114
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
10966
11115
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
11116
|
+
endpoint?: string | undefined;
|
|
10967
11117
|
}[] | undefined;
|
|
10968
11118
|
};
|
|
10969
11119
|
providerData?: Record<string, any> | undefined;
|
|
@@ -11188,6 +11338,12 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
11188
11338
|
text: string;
|
|
11189
11339
|
providerData?: Record<string, any> | undefined;
|
|
11190
11340
|
}[] | undefined;
|
|
11341
|
+
} | {
|
|
11342
|
+
type: "compaction";
|
|
11343
|
+
encrypted_content: string;
|
|
11344
|
+
providerData?: Record<string, any> | undefined;
|
|
11345
|
+
id?: string | undefined;
|
|
11346
|
+
created_by?: string | undefined;
|
|
11191
11347
|
} | {
|
|
11192
11348
|
type: "unknown";
|
|
11193
11349
|
providerData?: Record<string, any> | undefined;
|
|
@@ -11206,6 +11362,7 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
11206
11362
|
totalTokens: number;
|
|
11207
11363
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
11208
11364
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
11365
|
+
endpoint?: string | undefined;
|
|
11209
11366
|
}[] | undefined;
|
|
11210
11367
|
};
|
|
11211
11368
|
providerData?: Record<string, any> | undefined;
|
|
@@ -11433,6 +11590,12 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
11433
11590
|
text: string;
|
|
11434
11591
|
providerData?: Record<string, any> | undefined;
|
|
11435
11592
|
}[] | undefined;
|
|
11593
|
+
} | {
|
|
11594
|
+
type: "compaction";
|
|
11595
|
+
encrypted_content: string;
|
|
11596
|
+
providerData?: Record<string, any> | undefined;
|
|
11597
|
+
id?: string | undefined;
|
|
11598
|
+
created_by?: string | undefined;
|
|
11436
11599
|
} | {
|
|
11437
11600
|
type: "unknown";
|
|
11438
11601
|
providerData?: Record<string, any> | undefined;
|
|
@@ -11451,6 +11614,7 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
11451
11614
|
totalTokens: number;
|
|
11452
11615
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
11453
11616
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
11617
|
+
endpoint?: string | undefined;
|
|
11454
11618
|
}[] | undefined;
|
|
11455
11619
|
};
|
|
11456
11620
|
providerData?: Record<string, any> | undefined;
|
|
@@ -11679,6 +11843,12 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
11679
11843
|
text: string;
|
|
11680
11844
|
providerData?: Record<string, any> | undefined;
|
|
11681
11845
|
}[] | undefined;
|
|
11846
|
+
} | {
|
|
11847
|
+
type: "compaction";
|
|
11848
|
+
encrypted_content: string;
|
|
11849
|
+
providerData?: Record<string, any> | undefined;
|
|
11850
|
+
id?: string | undefined;
|
|
11851
|
+
created_by?: string | undefined;
|
|
11682
11852
|
} | {
|
|
11683
11853
|
type: "unknown";
|
|
11684
11854
|
providerData?: Record<string, any> | undefined;
|
|
@@ -11697,6 +11867,7 @@ export declare const StreamEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
11697
11867
|
totalTokens: number;
|
|
11698
11868
|
inputTokensDetails?: Record<string, number> | undefined;
|
|
11699
11869
|
outputTokensDetails?: Record<string, number> | undefined;
|
|
11870
|
+
endpoint?: string | undefined;
|
|
11700
11871
|
}[] | undefined;
|
|
11701
11872
|
};
|
|
11702
11873
|
providerData?: Record<string, any> | undefined;
|
package/dist/types/protocol.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.StreamEventGenericItem = exports.StreamEventResponseCompleted = exports.StreamEventResponseStarted = exports.StreamEventTextStream = exports.UsageData = exports.RequestUsageData = exports.ModelItem = exports.OutputModelItem = exports.UnknownItem = exports.CompactionItem = exports.ReasoningItem = exports.ToolCallItem = exports.ApplyPatchCallResultItem = exports.ApplyPatchCallItem = exports.ApplyPatchOperation = exports.ApplyPatchOperationDeleteFile = exports.ApplyPatchOperationUpdateFile = exports.ApplyPatchOperationCreateFile = exports.ShellCallResultItem = exports.ShellCallOutputContent = exports.ShellCallOutcome = exports.ShellCallItem = exports.ShellAction = exports.ComputerCallResultItem = exports.ComputerUseCallItem = exports.FunctionCallResultItem = exports.ToolCallStructuredOutput = exports.ToolCallOutputContent = exports.FunctionCallItem = exports.HostedToolCallItem = exports.MessageItem = exports.UserMessageItem = exports.UserContent = exports.AssistantMessageItem = exports.AssistantContent = exports.computerActions = exports.ComputerToolOutput = exports.ToolOutputFileContent = exports.ToolOutputImage = exports.ToolOutputText = exports.ImageContent = exports.AudioContent = exports.InputFile = exports.InputImage = exports.ReasoningText = exports.InputText = exports.OutputText = exports.Refusal = exports.ItemBase = exports.SharedBase = void 0;
|
|
4
|
+
exports.StreamEvent = void 0;
|
|
4
5
|
const zod_1 = require("zod");
|
|
5
6
|
// ----------------------------
|
|
6
7
|
// Shared base types
|
|
@@ -493,6 +494,21 @@ exports.ReasoningItem = exports.SharedBase.extend({
|
|
|
493
494
|
*/
|
|
494
495
|
rawContent: zod_1.z.array(exports.ReasoningText).optional(),
|
|
495
496
|
});
|
|
497
|
+
exports.CompactionItem = exports.ItemBase.extend({
|
|
498
|
+
type: zod_1.z.literal('compaction'),
|
|
499
|
+
/**
|
|
500
|
+
* Encrypted payload returned by the compaction endpoint.
|
|
501
|
+
*/
|
|
502
|
+
encrypted_content: zod_1.z.string(),
|
|
503
|
+
/**
|
|
504
|
+
* Identifier for the compaction item.
|
|
505
|
+
*/
|
|
506
|
+
id: zod_1.z.string().optional(),
|
|
507
|
+
/**
|
|
508
|
+
* Identifier for the generator of this compaction item.
|
|
509
|
+
*/
|
|
510
|
+
created_by: zod_1.z.string().optional(),
|
|
511
|
+
});
|
|
496
512
|
/**
|
|
497
513
|
* This is a catch all for items that are not part of the protocol.
|
|
498
514
|
*
|
|
@@ -519,6 +535,7 @@ exports.OutputModelItem = zod_1.z.discriminatedUnion('type', [
|
|
|
519
535
|
exports.ShellCallResultItem,
|
|
520
536
|
exports.ApplyPatchCallResultItem,
|
|
521
537
|
exports.ReasoningItem,
|
|
538
|
+
exports.CompactionItem,
|
|
522
539
|
exports.UnknownItem,
|
|
523
540
|
]);
|
|
524
541
|
exports.ModelItem = zod_1.z.union([
|
|
@@ -535,6 +552,7 @@ exports.ModelItem = zod_1.z.union([
|
|
|
535
552
|
exports.ShellCallResultItem,
|
|
536
553
|
exports.ApplyPatchCallResultItem,
|
|
537
554
|
exports.ReasoningItem,
|
|
555
|
+
exports.CompactionItem,
|
|
538
556
|
exports.UnknownItem,
|
|
539
557
|
]);
|
|
540
558
|
// ----------------------------
|
|
@@ -546,6 +564,7 @@ exports.RequestUsageData = zod_1.z.object({
|
|
|
546
564
|
totalTokens: zod_1.z.number(),
|
|
547
565
|
inputTokensDetails: zod_1.z.record(zod_1.z.string(), zod_1.z.number()).optional(),
|
|
548
566
|
outputTokensDetails: zod_1.z.record(zod_1.z.string(), zod_1.z.number()).optional(),
|
|
567
|
+
endpoint: zod_1.z.string().optional(),
|
|
549
568
|
});
|
|
550
569
|
exports.UsageData = zod_1.z.object({
|
|
551
570
|
requests: zod_1.z.number().optional(),
|