@arizeai/phoenix-client 6.10.1 → 6.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -0
- package/dist/esm/__generated__/api/v1.d.ts +254 -2
- package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
- package/dist/esm/jest/index.d.ts +5 -0
- package/dist/esm/jest/index.d.ts.map +1 -0
- package/dist/esm/jest/index.js +49 -0
- package/dist/esm/jest/index.js.map +1 -0
- package/dist/esm/jest/reporter.d.ts +13 -0
- package/dist/esm/jest/reporter.d.ts.map +1 -0
- package/dist/esm/jest/reporter.js +19 -0
- package/dist/esm/jest/reporter.js.map +1 -0
- package/dist/esm/prompts/sdks/toAI.d.ts +2 -2
- package/dist/esm/prompts/sdks/toAI.d.ts.map +1 -1
- package/dist/esm/prompts/sdks/toAI.js.map +1 -1
- package/dist/esm/prompts/sdks/toAnthropic.d.ts +2 -2
- package/dist/esm/prompts/sdks/toAnthropic.d.ts.map +1 -1
- package/dist/esm/prompts/sdks/toAnthropic.js.map +1 -1
- package/dist/esm/prompts/sdks/toOpenAI.d.ts +2 -2
- package/dist/esm/prompts/sdks/toOpenAI.d.ts.map +1 -1
- package/dist/esm/prompts/sdks/toOpenAI.js.map +1 -1
- package/dist/esm/prompts/sdks/toSDK.d.ts +8 -8
- package/dist/esm/prompts/sdks/toSDK.d.ts.map +1 -1
- package/dist/esm/prompts/sdks/toSDK.js.map +1 -1
- package/dist/esm/prompts/sdks/types.d.ts +2 -2
- package/dist/esm/prompts/sdks/types.d.ts.map +1 -1
- package/dist/esm/schemas/llm/anthropic/converters.d.ts +8 -8
- package/dist/esm/schemas/llm/anthropic/messagePartSchemas.d.ts +4 -4
- package/dist/esm/schemas/llm/anthropic/messageSchemas.d.ts +6 -6
- package/dist/esm/schemas/llm/constants.d.ts +3 -3
- package/dist/esm/schemas/llm/converters.d.ts +12 -12
- package/dist/esm/schemas/llm/openai/converters.d.ts +3 -3
- package/dist/esm/schemas/llm/schemas.d.ts +2 -2
- package/dist/esm/testing/acceptance.d.ts +20 -0
- package/dist/esm/testing/acceptance.d.ts.map +1 -0
- package/dist/esm/testing/acceptance.js +129 -0
- package/dist/esm/testing/acceptance.js.map +1 -0
- package/dist/esm/testing/define-api.d.ts +157 -0
- package/dist/esm/testing/define-api.d.ts.map +1 -0
- package/dist/esm/testing/define-api.js +78 -0
- package/dist/esm/testing/define-api.js.map +1 -0
- package/dist/esm/testing/helpers.d.ts +55 -0
- package/dist/esm/testing/helpers.d.ts.map +1 -0
- package/dist/esm/testing/helpers.js +179 -0
- package/dist/esm/testing/helpers.js.map +1 -0
- package/dist/esm/testing/phoenix-test-tracking.d.ts +68 -0
- package/dist/esm/testing/phoenix-test-tracking.d.ts.map +1 -0
- package/dist/esm/testing/phoenix-test-tracking.js +521 -0
- package/dist/esm/testing/phoenix-test-tracking.js.map +1 -0
- package/dist/esm/testing/report-artifacts.d.ts +45 -0
- package/dist/esm/testing/report-artifacts.d.ts.map +1 -0
- package/dist/esm/testing/report-artifacts.js +218 -0
- package/dist/esm/testing/report-artifacts.js.map +1 -0
- package/dist/esm/testing/report-run.d.ts +22 -0
- package/dist/esm/testing/report-run.d.ts.map +1 -0
- package/dist/esm/testing/report-run.js +41 -0
- package/dist/esm/testing/report-run.js.map +1 -0
- package/dist/esm/testing/reporter-format.d.ts +83 -0
- package/dist/esm/testing/reporter-format.d.ts.map +1 -0
- package/dist/esm/testing/reporter-format.js +852 -0
- package/dist/esm/testing/reporter-format.js.map +1 -0
- package/dist/esm/testing/runner.d.ts +31 -0
- package/dist/esm/testing/runner.d.ts.map +1 -0
- package/dist/esm/testing/runner.js +238 -0
- package/dist/esm/testing/runner.js.map +1 -0
- package/dist/esm/testing/state.d.ts +138 -0
- package/dist/esm/testing/state.d.ts.map +1 -0
- package/dist/esm/testing/state.js +31 -0
- package/dist/esm/testing/state.js.map +1 -0
- package/dist/esm/testing/types.d.ts +319 -0
- package/dist/esm/testing/types.d.ts.map +1 -0
- package/dist/esm/testing/types.js +9 -0
- package/dist/esm/testing/types.js.map +1 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/utils/channel.d.ts +7 -7
- package/dist/esm/utils/channel.d.ts.map +1 -1
- package/dist/esm/utils/channel.js +1 -1
- package/dist/esm/utils/channel.js.map +1 -1
- package/dist/esm/utils/formatPromptMessages.d.ts.map +1 -1
- package/dist/esm/utils/getPromptBySelector.d.ts.map +1 -1
- package/dist/esm/utils/promisifyResult.d.ts +1 -1
- package/dist/esm/utils/promisifyResult.d.ts.map +1 -1
- package/dist/esm/utils/promisifyResult.js.map +1 -1
- package/dist/esm/utils/schemaMatches.d.ts +5 -5
- package/dist/esm/utils/schemaMatches.d.ts.map +1 -1
- package/dist/esm/utils/schemaMatches.js.map +1 -1
- package/dist/esm/vitest/index.d.ts +5 -0
- package/dist/esm/vitest/index.d.ts.map +1 -0
- package/dist/esm/vitest/index.js +15 -0
- package/dist/esm/vitest/index.js.map +1 -0
- package/dist/esm/vitest/reporter.d.ts +19 -0
- package/dist/esm/vitest/reporter.d.ts.map +1 -0
- package/dist/esm/vitest/reporter.js +27 -0
- package/dist/esm/vitest/reporter.js.map +1 -0
- package/dist/src/__generated__/api/v1.d.ts +254 -2
- package/dist/src/__generated__/api/v1.d.ts.map +1 -1
- package/dist/src/jest/index.d.ts +5 -0
- package/dist/src/jest/index.d.ts.map +1 -0
- package/dist/src/jest/index.js +58 -0
- package/dist/src/jest/index.js.map +1 -0
- package/dist/src/jest/reporter.d.ts +13 -0
- package/dist/src/jest/reporter.d.ts.map +1 -0
- package/dist/src/jest/reporter.js +23 -0
- package/dist/src/jest/reporter.js.map +1 -0
- package/dist/src/prompts/sdks/toAI.d.ts +2 -2
- package/dist/src/prompts/sdks/toAI.d.ts.map +1 -1
- package/dist/src/prompts/sdks/toAI.js.map +1 -1
- package/dist/src/prompts/sdks/toAnthropic.d.ts +2 -2
- package/dist/src/prompts/sdks/toAnthropic.d.ts.map +1 -1
- package/dist/src/prompts/sdks/toAnthropic.js.map +1 -1
- package/dist/src/prompts/sdks/toOpenAI.d.ts +2 -2
- package/dist/src/prompts/sdks/toOpenAI.d.ts.map +1 -1
- package/dist/src/prompts/sdks/toOpenAI.js.map +1 -1
- package/dist/src/prompts/sdks/toSDK.d.ts +8 -8
- package/dist/src/prompts/sdks/toSDK.d.ts.map +1 -1
- package/dist/src/prompts/sdks/toSDK.js.map +1 -1
- package/dist/src/prompts/sdks/types.d.ts +2 -2
- package/dist/src/prompts/sdks/types.d.ts.map +1 -1
- package/dist/src/schemas/llm/anthropic/converters.d.ts +8 -8
- package/dist/src/schemas/llm/anthropic/messagePartSchemas.d.ts +4 -4
- package/dist/src/schemas/llm/anthropic/messageSchemas.d.ts +6 -6
- package/dist/src/schemas/llm/constants.d.ts +3 -3
- package/dist/src/schemas/llm/converters.d.ts +12 -12
- package/dist/src/schemas/llm/openai/converters.d.ts +3 -3
- package/dist/src/schemas/llm/schemas.d.ts +2 -2
- package/dist/src/testing/acceptance.d.ts +20 -0
- package/dist/src/testing/acceptance.d.ts.map +1 -0
- package/dist/src/testing/acceptance.js +114 -0
- package/dist/src/testing/acceptance.js.map +1 -0
- package/dist/src/testing/define-api.d.ts +157 -0
- package/dist/src/testing/define-api.d.ts.map +1 -0
- package/dist/src/testing/define-api.js +81 -0
- package/dist/src/testing/define-api.js.map +1 -0
- package/dist/src/testing/helpers.d.ts +55 -0
- package/dist/src/testing/helpers.d.ts.map +1 -0
- package/dist/src/testing/helpers.js +182 -0
- package/dist/src/testing/helpers.js.map +1 -0
- package/dist/src/testing/phoenix-test-tracking.d.ts +68 -0
- package/dist/src/testing/phoenix-test-tracking.d.ts.map +1 -0
- package/dist/src/testing/phoenix-test-tracking.js +530 -0
- package/dist/src/testing/phoenix-test-tracking.js.map +1 -0
- package/dist/src/testing/report-artifacts.d.ts +45 -0
- package/dist/src/testing/report-artifacts.d.ts.map +1 -0
- package/dist/src/testing/report-artifacts.js +225 -0
- package/dist/src/testing/report-artifacts.js.map +1 -0
- package/dist/src/testing/report-run.d.ts +22 -0
- package/dist/src/testing/report-run.d.ts.map +1 -0
- package/dist/src/testing/report-run.js +47 -0
- package/dist/src/testing/report-run.js.map +1 -0
- package/dist/src/testing/reporter-format.d.ts +83 -0
- package/dist/src/testing/reporter-format.d.ts.map +1 -0
- package/dist/src/testing/reporter-format.js +870 -0
- package/dist/src/testing/reporter-format.js.map +1 -0
- package/dist/src/testing/runner.d.ts +31 -0
- package/dist/src/testing/runner.d.ts.map +1 -0
- package/dist/src/testing/runner.js +258 -0
- package/dist/src/testing/runner.js.map +1 -0
- package/dist/src/testing/state.d.ts +138 -0
- package/dist/src/testing/state.d.ts.map +1 -0
- package/dist/src/testing/state.js +38 -0
- package/dist/src/testing/state.js.map +1 -0
- package/dist/src/testing/types.d.ts +319 -0
- package/dist/src/testing/types.d.ts.map +1 -0
- package/dist/src/testing/types.js +13 -0
- package/dist/src/testing/types.js.map +1 -0
- package/dist/src/utils/channel.d.ts +7 -7
- package/dist/src/utils/channel.d.ts.map +1 -1
- package/dist/src/utils/channel.js +1 -1
- package/dist/src/utils/channel.js.map +1 -1
- package/dist/src/utils/formatPromptMessages.d.ts.map +1 -1
- package/dist/src/utils/getPromptBySelector.d.ts.map +1 -1
- package/dist/src/utils/promisifyResult.d.ts +1 -1
- package/dist/src/utils/promisifyResult.d.ts.map +1 -1
- package/dist/src/utils/promisifyResult.js.map +1 -1
- package/dist/src/utils/schemaMatches.d.ts +5 -5
- package/dist/src/utils/schemaMatches.d.ts.map +1 -1
- package/dist/src/utils/schemaMatches.js.map +1 -1
- package/dist/src/vitest/index.d.ts +5 -0
- package/dist/src/vitest/index.d.ts.map +1 -0
- package/dist/src/vitest/index.js +23 -0
- package/dist/src/vitest/index.js.map +1 -0
- package/dist/src/vitest/reporter.d.ts +19 -0
- package/dist/src/vitest/reporter.d.ts.map +1 -0
- package/dist/src/vitest/reporter.js +34 -0
- package/dist/src/vitest/reporter.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/ci-evals-annotations.mdx +190 -0
- package/docs/ci-evals-jest.mdx +78 -0
- package/docs/ci-evals-vitest.mdx +240 -0
- package/docs/ci-evals.mdx +263 -0
- package/docs/overview.mdx +9 -1
- package/package.json +49 -17
- package/src/__generated__/api/v1.ts +254 -2
- package/src/jest/index.ts +124 -0
- package/src/jest/reporter.ts +22 -0
- package/src/prompts/sdks/toAI.ts +4 -3
- package/src/prompts/sdks/toAnthropic.ts +4 -3
- package/src/prompts/sdks/toOpenAI.ts +4 -3
- package/src/prompts/sdks/toSDK.ts +16 -11
- package/src/prompts/sdks/types.ts +2 -2
- package/src/testing/acceptance.ts +190 -0
- package/src/testing/define-api.ts +279 -0
- package/src/testing/helpers.ts +251 -0
- package/src/testing/phoenix-test-tracking.ts +637 -0
- package/src/testing/report-artifacts.ts +272 -0
- package/src/testing/report-run.ts +44 -0
- package/src/testing/reporter-format.ts +1072 -0
- package/src/testing/runner.ts +350 -0
- package/src/testing/state.ts +165 -0
- package/src/testing/types.ts +366 -0
- package/src/utils/channel.ts +17 -15
- package/src/utils/promisifyResult.ts +6 -4
- package/src/utils/schemaMatches.ts +12 -10
- package/src/vitest/index.ts +57 -0
- package/src/vitest/reporter.ts +32 -0
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
*
|
|
75
75
|
* @see https://en.wikipedia.org/wiki/Communicating_sequential_processes
|
|
76
76
|
*
|
|
77
|
-
* @template
|
|
77
|
+
* @template Message The type of values sent through the channel
|
|
78
78
|
*
|
|
79
79
|
* @example Safe Producer-Consumer Pattern
|
|
80
80
|
* ```typescript
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
export declare class ChannelError extends Error {
|
|
119
119
|
constructor(message: string, options?: ErrorOptions);
|
|
120
120
|
}
|
|
121
|
-
export declare class Channel<
|
|
121
|
+
export declare class Channel<Message> {
|
|
122
122
|
#private;
|
|
123
123
|
/**
|
|
124
124
|
* Create a new channel with the specified buffer capacity.
|
|
@@ -149,14 +149,14 @@ export declare class Channel<T> {
|
|
|
149
149
|
* @param value - The value to send
|
|
150
150
|
* @throws {ChannelError} If channel is closed
|
|
151
151
|
*/
|
|
152
|
-
send(value:
|
|
152
|
+
send(value: Message): Promise<void>;
|
|
153
153
|
/**
|
|
154
154
|
* Receive a value from the channel
|
|
155
155
|
* Blocks if no value is available until one arrives
|
|
156
156
|
*
|
|
157
157
|
* @returns The received value, or CLOSED symbol if channel is closed and empty
|
|
158
158
|
*/
|
|
159
|
-
receive(): Promise<
|
|
159
|
+
receive(): Promise<Message | typeof CLOSED>;
|
|
160
160
|
/**
|
|
161
161
|
* Try to receive a value without blocking
|
|
162
162
|
* Returns immediately with value or undefined if channel is empty
|
|
@@ -174,7 +174,7 @@ export declare class Channel<T> {
|
|
|
174
174
|
* }
|
|
175
175
|
* ```
|
|
176
176
|
*/
|
|
177
|
-
tryReceive():
|
|
177
|
+
tryReceive(): Message | typeof CLOSED | undefined;
|
|
178
178
|
/**
|
|
179
179
|
* Close the channel
|
|
180
180
|
* No more sends allowed, but remaining values can be received
|
|
@@ -203,7 +203,7 @@ export declare class Channel<T> {
|
|
|
203
203
|
/**
|
|
204
204
|
* Async iterator support for for-await-of loops
|
|
205
205
|
*/
|
|
206
|
-
[Symbol.asyncIterator](): AsyncIterableIterator<
|
|
206
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<Message>;
|
|
207
207
|
}
|
|
208
208
|
/**
|
|
209
209
|
* Special symbol to indicate channel is closed
|
|
@@ -225,5 +225,5 @@ export declare const CLOSED: unique symbol;
|
|
|
225
225
|
* }
|
|
226
226
|
* ```
|
|
227
227
|
*/
|
|
228
|
-
export declare function isClosed<
|
|
228
|
+
export declare function isClosed<Message>(value: Message | typeof CLOSED): value is typeof CLOSED;
|
|
229
229
|
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../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;OAEG;IACH,IAAI,eAAe,IAAI,MAAM,CAE5B;IAED;;OAEG;IACI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,qBAAqB,CAAC,OAAO,CAAC;CAOhE;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,eAAmB,CAAC;AAEvC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAC9B,KAAK,EAAE,OAAO,GAAG,OAAO,MAAM,GAC7B,KAAK,IAAI,OAAO,MAAM,CAExB"}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
*
|
|
75
75
|
* @see https://en.wikipedia.org/wiki/Communicating_sequential_processes
|
|
76
76
|
*
|
|
77
|
-
* @template
|
|
77
|
+
* @template Message The type of values sent through the channel
|
|
78
78
|
*
|
|
79
79
|
* @example Safe Producer-Consumer Pattern
|
|
80
80
|
* ```typescript
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../src/utils/channel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiHG;AAmBH;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAe,EAAE,OAAsB;QACjD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,MAAM,GAAG;IACb,cAAc,EAAE,+BAA+B;IAC/C,oBAAoB,EAAE,uCAAuC;IAC7D,iBAAiB,EAAE,uCAAuC;CACjB,CAAC;AAE5C,MAAM,OAAO,OAAO;IAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../src/utils/channel.ts"],"names":[],"mappings":"A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AC,oBAAoB,CAAC,CAAC;QAC5D,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;QAC3B,OAAO,IAAI,EAAE,CAAC;YACZ,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;YACnC,IAAI,KAAK,KAAK,MAAM;gBAAE,OAAO;YAC7B,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAEvC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,QAAQ,CACtB,KAA8B;IAE9B,OAAO,KAAK,KAAK,MAAM,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatPromptMessages.d.ts","sourceRoot":"","sources":["../../../src/utils/formatPromptMessages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGhF;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,oBAAoB,EAC5B,cAAc,EAAE,iBAAiB,EAAE,EACnC,SAAS,GAAE,SAAc;;;;;;;
|
|
1
|
+
{"version":3,"file":"formatPromptMessages.d.ts","sourceRoot":"","sources":["../../../src/utils/formatPromptMessages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGhF;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,oBAAoB,EAC5B,cAAc,EAAE,iBAAiB,EAAE,EACnC,SAAS,GAAE,SAAc;;;;;;;mBA4DkqqK,uDAAsB;;;;;;;;;IAlBltqK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPromptBySelector.d.ts","sourceRoot":"","sources":["../../../src/utils/getPromptBySelector.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG;IACjD;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,MAAM,EAAE,OAAO,EACf,MAAM,GACP,EAAE,yBAAyB;;
|
|
1
|
+
{"version":3,"file":"getPromptBySelector.d.ts","sourceRoot":"","sources":["../../../src/utils/getPromptBySelector.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG;IACjD;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,MAAM,EAAE,OAAO,EACf,MAAM,GACP,EAAE,yBAAyB;;oBAkDqxzI,uDAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAA0P,uDAAsB;qBAAoD,uDAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UADhq0I"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* If the incoming function returns a promise, return the promise.
|
|
3
3
|
* Otherwise, return a promise that resolves to the incoming function's return value.
|
|
4
4
|
*/
|
|
5
|
-
export declare function promisifyResult<
|
|
5
|
+
export declare function promisifyResult<Result>(result: Result): (Result extends Promise<infer ResolvedValue> ? Promise<ResolvedValue> : never) | (Result extends Promise<unknown> ? never : Promise<Result>);
|
|
6
6
|
//# sourceMappingURL=promisifyResult.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promisifyResult.d.ts","sourceRoot":"","sources":["../../../src/utils/promisifyResult.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"promisifyResult.d.ts","sourceRoot":"","sources":["../../../src/utils/promisifyResult.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,iCAEJ,aAAa,kGAQ9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promisifyResult.js","sourceRoot":"","sources":["../../../src/utils/promisifyResult.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,eAAe,
|
|
1
|
+
{"version":3,"file":"promisifyResult.js","sourceRoot":"","sources":["../../../src/utils/promisifyResult.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAS,MAAc;IACpD,IAAI,MAAM,YAAY,OAAO,EAAE,CAAC;QAC9B,OAAO,MAEE,CAAC;IACZ,CAAC;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAEV,CAAC;AACtB,CAAC"}
|
|
@@ -2,16 +2,16 @@ import type { z } from "zod";
|
|
|
2
2
|
/**
|
|
3
3
|
* Simple utility to check if two types are exactly equivalent
|
|
4
4
|
*/
|
|
5
|
-
export type AssertEqual<
|
|
5
|
+
export type AssertEqual<Actual, Expected> = (<Argument>() => Argument extends Actual ? 1 : 2) extends <Argument>() => Argument extends Expected ? 1 : 2 ? true : false;
|
|
6
6
|
/**
|
|
7
7
|
* Zod utility to check if a schema is defined correctly against a given type
|
|
8
8
|
*
|
|
9
9
|
* @see https://github.com/colinhacks/zod/issues/372#issuecomment-2445439772
|
|
10
10
|
*/
|
|
11
|
-
export declare const schemaMatches: <
|
|
11
|
+
export declare const schemaMatches: <Value>() => <Schema extends z.ZodType<Value, unknown>>(schema: AssertEqual<Schema["_output"], Value> extends true ? Schema : Schema & {
|
|
12
12
|
"types do not match": {
|
|
13
|
-
expected:
|
|
14
|
-
received:
|
|
13
|
+
expected: Value;
|
|
14
|
+
received: Schema["_output"];
|
|
15
15
|
};
|
|
16
|
-
}) =>
|
|
16
|
+
}) => Schema;
|
|
17
17
|
//# sourceMappingURL=schemaMatches.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaMatches.d.ts","sourceRoot":"","sources":["../../../src/utils/schemaMatches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"schemaMatches.d.ts","sourceRoot":"","sources":["../../../src/utils/schemaMatches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,MAAM,EAAE,QAAQ,IACtC,CAAC,CAAC,QAAQ,OAAO,QAAQ,SAAS,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,SAAS,CACxD,QAAQ,OACH,QAAQ,SAAS,QAAQ,GAAG,CAAC,GAAG,CAAC,GACpC,IAAI,GACJ,KAAK,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACvB,KAAK,QACL,MAAM,SAAS,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,EACvC,QAAQ,WAAW,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,IAAI,GACtD,MAAM,GACN,MAAM,GAAG;IACP,oBAAoB,EAAE;QACpB,QAAQ,EAAE,KAAK,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;KAC7B,CAAC;CACH,KACJ,MAEF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaMatches.js","sourceRoot":"","sources":["../../../src/utils/schemaMatches.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schemaMatches.js","sourceRoot":"","sources":["../../../src/utils/schemaMatches.ts"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GACxB,GAAU,EAAE,CACZ,CACE,MAOK,EACG,EAAE;IACV,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { PhoenixDescribe, PhoenixTest, PhoenixTestApi, PhoenixTestEach, } from "../testing/define-api.js";
|
|
2
|
+
export type { AcceptanceCriterion, AcceptanceMetric, AcceptanceResult, Annotation, AnnotatorKind, EvaluationParams, EvaluationResult, Evaluator, EvaluatorResult, KVMap, ReferenceOutput, SuiteConfig, TestArgs, TestConfig, TestEachRow, TestFn, TestParams, TestParamsBase, } from "../testing/types.js";
|
|
3
|
+
export { evaluate, logAnnotation, logOutput, traceEvaluator, } from "../testing/helpers.js";
|
|
4
|
+
export declare const describe: import("./index.js").PhoenixDescribe, test: import("./index.js").PhoenixTest, it: import("./index.js").PhoenixTest;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vitest/index.ts"],"names":[],"mappings":"AAUA,YAAY,EACV,eAAe,EACf,WAAW,EACX,cAAc,EACd,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,KAAK,EACL,eAAe,EACf,WAAW,EACX,QAAQ,EACR,UAAU,EACV,WAAW,EACX,MAAM,EACN,UAAU,EACV,cAAc,GACf,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACT,cAAc,GACf,MAAM,oBAAoB,CAAC;AAa5B,eAAO,MAAQ,QAAQ,+BAAE,IAAI,2BAAE,EAAE,yBAA+B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { afterAll as vitestAfterAll, beforeAll as vitestBeforeAll, describe as vitestDescribe, test as vitestTest, } from "vitest";
|
|
2
|
+
import { createTestApi } from "../testing/define-api.js";
|
|
3
|
+
export { evaluate, logAnnotation, logOutput, traceEvaluator, } from "../testing/helpers.js";
|
|
4
|
+
const hooks = {
|
|
5
|
+
describe: vitestDescribe,
|
|
6
|
+
describeOnly: vitestDescribe.only,
|
|
7
|
+
describeSkip: vitestDescribe.skip,
|
|
8
|
+
test: vitestTest,
|
|
9
|
+
testOnly: vitestTest.only,
|
|
10
|
+
testSkip: vitestTest.skip,
|
|
11
|
+
beforeAll: vitestBeforeAll,
|
|
12
|
+
afterAll: vitestAfterAll,
|
|
13
|
+
};
|
|
14
|
+
export const { describe, test, it } = createTestApi(() => hooks);
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/vitest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,cAAc,EAC1B,SAAS,IAAI,eAAe,EAC5B,QAAQ,IAAI,cAAc,EAC1B,IAAI,IAAI,UAAU,GACnB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AA+BtD,OAAO,EACL,QAAQ,EACR,aAAa,EACb,SAAS,EACT,cAAc,GACf,MAAM,oBAAoB,CAAC;AAE5B,MAAM,KAAK,GAAgB;IACzB,QAAQ,EAAE,cAAc;IACxB,YAAY,EAAE,cAAc,CAAC,IAAI;IACjC,YAAY,EAAE,cAAc,CAAC,IAAI;IACjC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,UAAU,CAAC,IAAI;IACzB,QAAQ,EAAE,UAAU,CAAC,IAAI;IACzB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE,cAAc;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,aAAa,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { formatSuiteSummary, printSuiteSummaries } from "../testing/reporter-format.js";
|
|
2
|
+
/**
|
|
3
|
+
* Vitest reporter for `@arizeai/phoenix-client/vitest`.
|
|
4
|
+
*
|
|
5
|
+
* The reporter does not replace Vitest's default test output. Instead it
|
|
6
|
+
* appends a Phoenix-flavored summary at the end of the run that lists
|
|
7
|
+
* outputs, annotations, and dataset/experiment links for each suite.
|
|
8
|
+
*
|
|
9
|
+
* The class implements the Vitest `Reporter` interface structurally rather
|
|
10
|
+
* than nominally so we don't have to import a CJS type from `vitest/reporters`.
|
|
11
|
+
*/
|
|
12
|
+
export default class PhoenixVitestReporter {
|
|
13
|
+
private readonly report;
|
|
14
|
+
onTestRunStart(): void;
|
|
15
|
+
onTestRunEnd(): void;
|
|
16
|
+
onFinished(): void;
|
|
17
|
+
}
|
|
18
|
+
export { formatSuiteSummary, printSuiteSummaries };
|
|
19
|
+
//# sourceMappingURL=reporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../../../src/vitest/reporter.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAqB;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+B;IAEtD,cAAc,IAAI,IAAI;IAGtB,YAAY,IAAI,IAAI;IAIpB,UAAU,IAAI,IAAI;CAGnB;AAED,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SuiteSummaryReportRun } from "../testing/report-run.js";
|
|
2
|
+
import { formatSuiteSummary, printSuiteSummaries, } from "../testing/reporter-format.js";
|
|
3
|
+
/**
|
|
4
|
+
* Vitest reporter for `@arizeai/phoenix-client/vitest`.
|
|
5
|
+
*
|
|
6
|
+
* The reporter does not replace Vitest's default test output. Instead it
|
|
7
|
+
* appends a Phoenix-flavored summary at the end of the run that lists
|
|
8
|
+
* outputs, annotations, and dataset/experiment links for each suite.
|
|
9
|
+
*
|
|
10
|
+
* The class implements the Vitest `Reporter` interface structurally rather
|
|
11
|
+
* than nominally so we don't have to import a CJS type from `vitest/reporters`.
|
|
12
|
+
*/
|
|
13
|
+
export default class PhoenixVitestReporter {
|
|
14
|
+
report = new SuiteSummaryReportRun();
|
|
15
|
+
onTestRunStart() {
|
|
16
|
+
this.report.begin();
|
|
17
|
+
}
|
|
18
|
+
onTestRunEnd() {
|
|
19
|
+
this.report.finish();
|
|
20
|
+
}
|
|
21
|
+
// Vitest also calls `onFinished` on legacy reporters; alias for safety.
|
|
22
|
+
onFinished() {
|
|
23
|
+
this.report.finish();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export { formatSuiteSummary, printSuiteSummaries };
|
|
27
|
+
//# sourceMappingURL=reporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../src/vitest/reporter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAqB;IACvB,MAAM,GAAG,IAAI,qBAAqB,EAAE,CAAC;IAEtD,cAAc;QACZ,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IACD,YAAY;QACV,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;IACD,wEAAwE;IACxE,UAAU;QACR,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;CACF;AAED,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -387,7 +387,11 @@ export interface paths {
|
|
|
387
387
|
delete: operations["deleteExperiment"];
|
|
388
388
|
options?: never;
|
|
389
389
|
head?: never;
|
|
390
|
-
|
|
390
|
+
/**
|
|
391
|
+
* Update an experiment by ID
|
|
392
|
+
* @description Partially update an experiment's name, description, and/or metadata. Only the fields included in the request body are changed; omitted fields are left as-is. Patching an ephemeral experiment refreshes its last-update timestamp, which extends the window before it is swept away.
|
|
393
|
+
*/
|
|
394
|
+
patch: operations["updateExperiment"];
|
|
391
395
|
trace?: never;
|
|
392
396
|
};
|
|
393
397
|
"/v1/experiments/{experiment_id}/incomplete-runs": {
|
|
@@ -1293,6 +1297,23 @@ export interface paths {
|
|
|
1293
1297
|
patch?: never;
|
|
1294
1298
|
trace?: never;
|
|
1295
1299
|
};
|
|
1300
|
+
"/agents/server/sessions/{session_id}/chat": {
|
|
1301
|
+
parameters: {
|
|
1302
|
+
query?: never;
|
|
1303
|
+
header?: never;
|
|
1304
|
+
path?: never;
|
|
1305
|
+
cookie?: never;
|
|
1306
|
+
};
|
|
1307
|
+
get?: never;
|
|
1308
|
+
put?: never;
|
|
1309
|
+
/** Run Server Agent */
|
|
1310
|
+
post: operations["run_server_agent_agents_server_sessions__session_id__chat_post"];
|
|
1311
|
+
delete?: never;
|
|
1312
|
+
options?: never;
|
|
1313
|
+
head?: never;
|
|
1314
|
+
patch?: never;
|
|
1315
|
+
trace?: never;
|
|
1316
|
+
};
|
|
1296
1317
|
"/agents/{agent_id}/sessions/{session_id}/chat": {
|
|
1297
1318
|
parameters: {
|
|
1298
1319
|
query?: never;
|
|
@@ -1609,7 +1630,7 @@ export interface components {
|
|
|
1609
1630
|
* ChatContext
|
|
1610
1631
|
* @description Discriminated union of every UI-state context the agent understands.
|
|
1611
1632
|
*/
|
|
1612
|
-
ChatContext: components["schemas"]["AppContext"] | components["schemas"]["ProjectContext"] | components["schemas"]["TraceContext"] | components["schemas"]["AgentSpanContext"] | components["schemas"]["PlaygroundContext"] | components["schemas"]["CodeEvaluatorContext"] | components["schemas"]["LlmEvaluatorContext"] | components["schemas"]["DatasetContext"] | components["schemas"]["GraphQLContext"] | components["schemas"]["WebAccessContext"];
|
|
1633
|
+
ChatContext: components["schemas"]["AppContext"] | components["schemas"]["ProjectContext"] | components["schemas"]["TraceContext"] | components["schemas"]["SessionContext"] | components["schemas"]["PromptContext"] | components["schemas"]["PromptVersionContext"] | components["schemas"]["AgentSpanContext"] | components["schemas"]["PlaygroundContext"] | components["schemas"]["CodeEvaluatorContext"] | components["schemas"]["LlmEvaluatorContext"] | components["schemas"]["DatasetContext"] | components["schemas"]["GraphQLContext"] | components["schemas"]["WebAccessContext"] | components["schemas"]["SubagentsContext"];
|
|
1613
1634
|
/**
|
|
1614
1635
|
* ChatRegenerateMessage
|
|
1615
1636
|
* @description Regenerate message extended with Phoenix-specific fields.
|
|
@@ -1636,6 +1657,12 @@ export interface components {
|
|
|
1636
1657
|
* @default false
|
|
1637
1658
|
*/
|
|
1638
1659
|
exportRemoteTraces?: boolean;
|
|
1660
|
+
/**
|
|
1661
|
+
* Attachuserid
|
|
1662
|
+
* @description When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
|
|
1663
|
+
* @default false
|
|
1664
|
+
*/
|
|
1665
|
+
attachUserId?: boolean;
|
|
1639
1666
|
/** Contexts */
|
|
1640
1667
|
contexts?: components["schemas"]["ChatContext"][];
|
|
1641
1668
|
/**
|
|
@@ -1683,6 +1710,12 @@ export interface components {
|
|
|
1683
1710
|
* @default false
|
|
1684
1711
|
*/
|
|
1685
1712
|
exportRemoteTraces?: boolean;
|
|
1713
|
+
/**
|
|
1714
|
+
* Attachuserid
|
|
1715
|
+
* @description When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
|
|
1716
|
+
* @default false
|
|
1717
|
+
*/
|
|
1718
|
+
attachUserId?: boolean;
|
|
1686
1719
|
/** Contexts */
|
|
1687
1720
|
contexts?: components["schemas"]["ChatContext"][];
|
|
1688
1721
|
/**
|
|
@@ -2354,6 +2387,16 @@ export interface components {
|
|
|
2354
2387
|
* @description The ID of the dataset version associated with the experiment
|
|
2355
2388
|
*/
|
|
2356
2389
|
dataset_version_id: string;
|
|
2390
|
+
/**
|
|
2391
|
+
* Name
|
|
2392
|
+
* @description The name of the experiment
|
|
2393
|
+
*/
|
|
2394
|
+
name: string;
|
|
2395
|
+
/**
|
|
2396
|
+
* Description
|
|
2397
|
+
* @description The description of the experiment
|
|
2398
|
+
*/
|
|
2399
|
+
description: string | null;
|
|
2357
2400
|
/**
|
|
2358
2401
|
* Repetitions
|
|
2359
2402
|
* @description Number of times the experiment is repeated
|
|
@@ -3174,6 +3217,7 @@ export interface components {
|
|
|
3174
3217
|
* @default 1
|
|
3175
3218
|
*/
|
|
3176
3219
|
repetitions?: number;
|
|
3220
|
+
nextExperimentScaffold?: components["schemas"]["PlaygroundExperimentScaffoldContext"] | null;
|
|
3177
3221
|
/** Instances */
|
|
3178
3222
|
instances?: components["schemas"]["PlaygroundInstanceContext"][];
|
|
3179
3223
|
/** Evaluators */
|
|
@@ -3218,6 +3262,37 @@ export interface components {
|
|
|
3218
3262
|
/** Isapplied */
|
|
3219
3263
|
isApplied: boolean;
|
|
3220
3264
|
};
|
|
3265
|
+
/**
|
|
3266
|
+
* PlaygroundExperimentScaffoldContext
|
|
3267
|
+
* @description Experiment name/description/metadata the user has staged for the playground's
|
|
3268
|
+
* *next* dataset-backed run, before that run has started.
|
|
3269
|
+
*
|
|
3270
|
+
* The playground UI lets the user pre-set how the next recorded run's experiment
|
|
3271
|
+
* will be named, described, and tagged (via the ``set_playground_experiment_recording``
|
|
3272
|
+
* tool or the recording form). That staged state is surfaced here so the agent can
|
|
3273
|
+
* see what is already set and avoid re-staging it.
|
|
3274
|
+
*
|
|
3275
|
+
* Field semantics:
|
|
3276
|
+
* - ``name`` / ``description``: the staged values, surfaced to the model verbatim,
|
|
3277
|
+
* or ``None`` when the user has not staged them.
|
|
3278
|
+
* - ``has_metadata``: a presence flag, not the value. Only *whether* metadata has
|
|
3279
|
+
* been staged is model-relevant (so the agent knows not to re-attach it); the
|
|
3280
|
+
* metadata object itself is deliberately kept out of the prompt.
|
|
3281
|
+
*
|
|
3282
|
+
* A field left unstaged (``None`` / ``False``) falls back to the server default when
|
|
3283
|
+
* the run starts. The scaffold is consumed once that next run begins.
|
|
3284
|
+
*/
|
|
3285
|
+
PlaygroundExperimentScaffoldContext: {
|
|
3286
|
+
/** Name */
|
|
3287
|
+
name?: string | null;
|
|
3288
|
+
/** Description */
|
|
3289
|
+
description?: string | null;
|
|
3290
|
+
/**
|
|
3291
|
+
* Hasmetadata
|
|
3292
|
+
* @default false
|
|
3293
|
+
*/
|
|
3294
|
+
hasMetadata?: boolean;
|
|
3295
|
+
};
|
|
3221
3296
|
/**
|
|
3222
3297
|
* PlaygroundInstanceContext
|
|
3223
3298
|
* @description One mounted playground instance and its current model selection.
|
|
@@ -3459,6 +3534,19 @@ export interface components {
|
|
|
3459
3534
|
/** Messages */
|
|
3460
3535
|
messages: components["schemas"]["PromptMessage"][];
|
|
3461
3536
|
};
|
|
3537
|
+
/**
|
|
3538
|
+
* PromptContext
|
|
3539
|
+
* @description Prompt the user is currently viewing.
|
|
3540
|
+
*/
|
|
3541
|
+
PromptContext: {
|
|
3542
|
+
/**
|
|
3543
|
+
* @description discriminator enum property added by openapi-typescript
|
|
3544
|
+
* @enum {string}
|
|
3545
|
+
*/
|
|
3546
|
+
type: "prompt";
|
|
3547
|
+
/** Promptnodeid */
|
|
3548
|
+
promptNodeId: string;
|
|
3549
|
+
};
|
|
3462
3550
|
/** PromptData */
|
|
3463
3551
|
PromptData: {
|
|
3464
3552
|
name: components["schemas"]["Identifier"];
|
|
@@ -3959,6 +4047,21 @@ export interface components {
|
|
|
3959
4047
|
/** Id */
|
|
3960
4048
|
id: string;
|
|
3961
4049
|
};
|
|
4050
|
+
/**
|
|
4051
|
+
* PromptVersionContext
|
|
4052
|
+
* @description Prompt version the user is currently viewing.
|
|
4053
|
+
*/
|
|
4054
|
+
PromptVersionContext: {
|
|
4055
|
+
/**
|
|
4056
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4057
|
+
* @enum {string}
|
|
4058
|
+
*/
|
|
4059
|
+
type: "prompt_version";
|
|
4060
|
+
/** Promptnodeid */
|
|
4061
|
+
promptNodeId: string;
|
|
4062
|
+
/** Promptversionnodeid */
|
|
4063
|
+
promptVersionNodeId: string;
|
|
4064
|
+
};
|
|
3962
4065
|
/** PromptVersionData */
|
|
3963
4066
|
PromptVersionData: {
|
|
3964
4067
|
/** Description */
|
|
@@ -4160,6 +4263,21 @@ export interface components {
|
|
|
4160
4263
|
/** Next Cursor */
|
|
4161
4264
|
next_cursor: string | null;
|
|
4162
4265
|
};
|
|
4266
|
+
/**
|
|
4267
|
+
* SessionContext
|
|
4268
|
+
* @description Session the user is currently viewing.
|
|
4269
|
+
*/
|
|
4270
|
+
SessionContext: {
|
|
4271
|
+
/**
|
|
4272
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4273
|
+
* @enum {string}
|
|
4274
|
+
*/
|
|
4275
|
+
type: "session";
|
|
4276
|
+
/** Projectnodeid */
|
|
4277
|
+
projectNodeId: string;
|
|
4278
|
+
/** Sessionnodeid */
|
|
4279
|
+
sessionNodeId: string;
|
|
4280
|
+
};
|
|
4163
4281
|
/** SessionData */
|
|
4164
4282
|
SessionData: {
|
|
4165
4283
|
/** Id */
|
|
@@ -4586,6 +4704,19 @@ export interface components {
|
|
|
4586
4704
|
*/
|
|
4587
4705
|
type?: "step-start";
|
|
4588
4706
|
};
|
|
4707
|
+
/**
|
|
4708
|
+
* SubagentsContext
|
|
4709
|
+
* @description User's per-turn request to expose the subagent-spawning tool.
|
|
4710
|
+
*/
|
|
4711
|
+
SubagentsContext: {
|
|
4712
|
+
/**
|
|
4713
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4714
|
+
* @enum {string}
|
|
4715
|
+
*/
|
|
4716
|
+
type: "subagents";
|
|
4717
|
+
/** Enabled */
|
|
4718
|
+
enabled: boolean;
|
|
4719
|
+
};
|
|
4589
4720
|
/** TextContentPart */
|
|
4590
4721
|
TextContentPart: {
|
|
4591
4722
|
/**
|
|
@@ -5105,6 +5236,33 @@ export interface components {
|
|
|
5105
5236
|
/** Data */
|
|
5106
5237
|
data: components["schemas"]["CategoricalAnnotationConfig"] | components["schemas"]["ContinuousAnnotationConfig"] | components["schemas"]["FreeformAnnotationConfig"];
|
|
5107
5238
|
};
|
|
5239
|
+
/**
|
|
5240
|
+
* UpdateExperimentRequestBody
|
|
5241
|
+
* @description Fields to update on an experiment. Omit a field to leave it unchanged.
|
|
5242
|
+
*/
|
|
5243
|
+
UpdateExperimentRequestBody: {
|
|
5244
|
+
/**
|
|
5245
|
+
* Name
|
|
5246
|
+
* @description New name for the experiment (null is rejected; name is required)
|
|
5247
|
+
*/
|
|
5248
|
+
name?: string | null;
|
|
5249
|
+
/**
|
|
5250
|
+
* Description
|
|
5251
|
+
* @description New description for the experiment (null clears the description)
|
|
5252
|
+
*/
|
|
5253
|
+
description?: string | null;
|
|
5254
|
+
/**
|
|
5255
|
+
* Metadata
|
|
5256
|
+
* @description New metadata object for the experiment (replaces the existing metadata as a whole; null is rejected)
|
|
5257
|
+
*/
|
|
5258
|
+
metadata?: {
|
|
5259
|
+
[key: string]: unknown;
|
|
5260
|
+
} | null;
|
|
5261
|
+
};
|
|
5262
|
+
/** UpdateExperimentResponseBody */
|
|
5263
|
+
UpdateExperimentResponseBody: {
|
|
5264
|
+
data: components["schemas"]["Experiment"];
|
|
5265
|
+
};
|
|
5108
5266
|
/** UpdateProjectRequestBody */
|
|
5109
5267
|
UpdateProjectRequestBody: {
|
|
5110
5268
|
/** Description */
|
|
@@ -5255,6 +5413,12 @@ export interface components {
|
|
|
5255
5413
|
* @default false
|
|
5256
5414
|
*/
|
|
5257
5415
|
exportRemoteTraces?: boolean;
|
|
5416
|
+
/**
|
|
5417
|
+
* Attachuserid
|
|
5418
|
+
* @description When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
|
|
5419
|
+
* @default false
|
|
5420
|
+
*/
|
|
5421
|
+
attachUserId?: boolean;
|
|
5258
5422
|
/** Messages */
|
|
5259
5423
|
messages: components["schemas"]["UIMessage"][];
|
|
5260
5424
|
/** Model */
|
|
@@ -6577,6 +6741,59 @@ export interface operations {
|
|
|
6577
6741
|
};
|
|
6578
6742
|
};
|
|
6579
6743
|
};
|
|
6744
|
+
updateExperiment: {
|
|
6745
|
+
parameters: {
|
|
6746
|
+
query?: never;
|
|
6747
|
+
header?: never;
|
|
6748
|
+
path: {
|
|
6749
|
+
experiment_id: string;
|
|
6750
|
+
};
|
|
6751
|
+
cookie?: never;
|
|
6752
|
+
};
|
|
6753
|
+
requestBody: {
|
|
6754
|
+
content: {
|
|
6755
|
+
"application/json": components["schemas"]["UpdateExperimentRequestBody"];
|
|
6756
|
+
};
|
|
6757
|
+
};
|
|
6758
|
+
responses: {
|
|
6759
|
+
/** @description Experiment updated successfully */
|
|
6760
|
+
200: {
|
|
6761
|
+
headers: {
|
|
6762
|
+
[name: string]: unknown;
|
|
6763
|
+
};
|
|
6764
|
+
content: {
|
|
6765
|
+
"application/json": components["schemas"]["UpdateExperimentResponseBody"];
|
|
6766
|
+
};
|
|
6767
|
+
};
|
|
6768
|
+
/** @description Forbidden */
|
|
6769
|
+
403: {
|
|
6770
|
+
headers: {
|
|
6771
|
+
[name: string]: unknown;
|
|
6772
|
+
};
|
|
6773
|
+
content: {
|
|
6774
|
+
"text/plain": string;
|
|
6775
|
+
};
|
|
6776
|
+
};
|
|
6777
|
+
/** @description Experiment not found */
|
|
6778
|
+
404: {
|
|
6779
|
+
headers: {
|
|
6780
|
+
[name: string]: unknown;
|
|
6781
|
+
};
|
|
6782
|
+
content: {
|
|
6783
|
+
"text/plain": string;
|
|
6784
|
+
};
|
|
6785
|
+
};
|
|
6786
|
+
/** @description Invalid experiment ID or request body */
|
|
6787
|
+
422: {
|
|
6788
|
+
headers: {
|
|
6789
|
+
[name: string]: unknown;
|
|
6790
|
+
};
|
|
6791
|
+
content: {
|
|
6792
|
+
"text/plain": string;
|
|
6793
|
+
};
|
|
6794
|
+
};
|
|
6795
|
+
};
|
|
6796
|
+
};
|
|
6580
6797
|
getIncompleteExperimentRuns: {
|
|
6581
6798
|
parameters: {
|
|
6582
6799
|
query?: {
|
|
@@ -9087,6 +9304,41 @@ export interface operations {
|
|
|
9087
9304
|
};
|
|
9088
9305
|
};
|
|
9089
9306
|
};
|
|
9307
|
+
run_server_agent_agents_server_sessions__session_id__chat_post: {
|
|
9308
|
+
parameters: {
|
|
9309
|
+
query?: never;
|
|
9310
|
+
header?: never;
|
|
9311
|
+
path: {
|
|
9312
|
+
session_id: string;
|
|
9313
|
+
};
|
|
9314
|
+
cookie?: never;
|
|
9315
|
+
};
|
|
9316
|
+
requestBody: {
|
|
9317
|
+
content: {
|
|
9318
|
+
"application/json": components["schemas"]["ChatRequest"];
|
|
9319
|
+
};
|
|
9320
|
+
};
|
|
9321
|
+
responses: {
|
|
9322
|
+
/** @description Successful Response */
|
|
9323
|
+
200: {
|
|
9324
|
+
headers: {
|
|
9325
|
+
[name: string]: unknown;
|
|
9326
|
+
};
|
|
9327
|
+
content: {
|
|
9328
|
+
"application/json": unknown;
|
|
9329
|
+
};
|
|
9330
|
+
};
|
|
9331
|
+
/** @description Validation Error */
|
|
9332
|
+
422: {
|
|
9333
|
+
headers: {
|
|
9334
|
+
[name: string]: unknown;
|
|
9335
|
+
};
|
|
9336
|
+
content: {
|
|
9337
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
9338
|
+
};
|
|
9339
|
+
};
|
|
9340
|
+
};
|
|
9341
|
+
};
|
|
9090
9342
|
chat_agents__agent_id__sessions__session_id__chat_post: {
|
|
9091
9343
|
parameters: {
|
|
9092
9344
|
query?: never;
|