@arizeai/phoenix-client 6.8.1 → 6.9.0
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 +77 -0
- package/dist/esm/__generated__/api/v1.d.ts +30 -15
- package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
- package/dist/esm/constants/serverRequirements.d.ts +1 -0
- package/dist/esm/constants/serverRequirements.d.ts.map +1 -1
- package/dist/esm/constants/serverRequirements.js +7 -0
- package/dist/esm/constants/serverRequirements.js.map +1 -1
- package/dist/esm/sessions/addSessionNote.d.ts +45 -0
- package/dist/esm/sessions/addSessionNote.d.ts.map +1 -0
- package/dist/esm/sessions/addSessionNote.js +45 -0
- package/dist/esm/sessions/addSessionNote.js.map +1 -0
- package/dist/esm/sessions/index.d.ts +1 -0
- package/dist/esm/sessions/index.d.ts.map +1 -1
- package/dist/esm/sessions/index.js +1 -0
- package/dist/esm/sessions/index.js.map +1 -1
- package/dist/esm/spans/addSpanNote.d.ts +5 -3
- package/dist/esm/spans/addSpanNote.d.ts.map +1 -1
- package/dist/esm/spans/addSpanNote.js +7 -4
- package/dist/esm/spans/addSpanNote.js.map +1 -1
- package/dist/esm/traces/addTraceAnnotation.d.ts +43 -0
- package/dist/esm/traces/addTraceAnnotation.d.ts.map +1 -0
- package/dist/esm/traces/addTraceAnnotation.js +43 -0
- package/dist/esm/traces/addTraceAnnotation.js.map +1 -0
- package/dist/esm/traces/addTraceNote.d.ts +5 -2
- package/dist/esm/traces/addTraceNote.d.ts.map +1 -1
- package/dist/esm/traces/addTraceNote.js +7 -3
- package/dist/esm/traces/addTraceNote.js.map +1 -1
- package/dist/esm/traces/index.d.ts +3 -0
- package/dist/esm/traces/index.d.ts.map +1 -1
- package/dist/esm/traces/index.js +2 -0
- package/dist/esm/traces/index.js.map +1 -1
- package/dist/esm/traces/logTraceAnnotations.d.ts +53 -0
- package/dist/esm/traces/logTraceAnnotations.d.ts.map +1 -0
- package/dist/esm/traces/logTraceAnnotations.js +50 -0
- package/dist/esm/traces/logTraceAnnotations.js.map +1 -0
- package/dist/esm/traces/types.d.ts +24 -0
- package/dist/esm/traces/types.d.ts.map +1 -0
- package/dist/esm/traces/types.js +38 -0
- package/dist/esm/traces/types.js.map +1 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/utils/apiErrorUtils.d.ts +2 -0
- package/dist/esm/utils/apiErrorUtils.d.ts.map +1 -0
- package/dist/esm/utils/apiErrorUtils.js +19 -0
- package/dist/esm/utils/apiErrorUtils.js.map +1 -0
- package/dist/esm/utils/formatPromptMessages.d.ts.map +1 -1
- package/dist/esm/utils/getPromptBySelector.d.ts.map +1 -1
- package/dist/src/__generated__/api/v1.d.ts +30 -15
- package/dist/src/__generated__/api/v1.d.ts.map +1 -1
- package/dist/src/constants/serverRequirements.d.ts +1 -0
- package/dist/src/constants/serverRequirements.d.ts.map +1 -1
- package/dist/src/constants/serverRequirements.js +8 -1
- package/dist/src/constants/serverRequirements.js.map +1 -1
- package/dist/src/sessions/addSessionNote.d.ts +45 -0
- package/dist/src/sessions/addSessionNote.d.ts.map +1 -0
- package/dist/src/sessions/addSessionNote.js +48 -0
- package/dist/src/sessions/addSessionNote.js.map +1 -0
- package/dist/src/sessions/index.d.ts +1 -0
- package/dist/src/sessions/index.d.ts.map +1 -1
- package/dist/src/sessions/index.js +1 -0
- package/dist/src/sessions/index.js.map +1 -1
- package/dist/src/spans/addSpanNote.d.ts +5 -3
- package/dist/src/spans/addSpanNote.d.ts.map +1 -1
- package/dist/src/spans/addSpanNote.js +7 -4
- package/dist/src/spans/addSpanNote.js.map +1 -1
- package/dist/src/traces/addTraceAnnotation.d.ts +43 -0
- package/dist/src/traces/addTraceAnnotation.d.ts.map +1 -0
- package/dist/src/traces/addTraceAnnotation.js +47 -0
- package/dist/src/traces/addTraceAnnotation.js.map +1 -0
- package/dist/src/traces/addTraceNote.d.ts +5 -2
- package/dist/src/traces/addTraceNote.d.ts.map +1 -1
- package/dist/src/traces/addTraceNote.js +7 -3
- package/dist/src/traces/addTraceNote.js.map +1 -1
- package/dist/src/traces/index.d.ts +3 -0
- package/dist/src/traces/index.d.ts.map +1 -1
- package/dist/src/traces/index.js +2 -0
- package/dist/src/traces/index.js.map +1 -1
- package/dist/src/traces/logTraceAnnotations.d.ts +53 -0
- package/dist/src/traces/logTraceAnnotations.d.ts.map +1 -0
- package/dist/src/traces/logTraceAnnotations.js +53 -0
- package/dist/src/traces/logTraceAnnotations.js.map +1 -0
- package/dist/src/traces/types.d.ts +24 -0
- package/dist/src/traces/types.d.ts.map +1 -0
- package/dist/src/traces/types.js +42 -0
- package/dist/src/traces/types.js.map +1 -0
- package/dist/src/utils/apiErrorUtils.d.ts +2 -0
- package/dist/src/utils/apiErrorUtils.d.ts.map +1 -0
- package/dist/src/utils/apiErrorUtils.js +22 -0
- package/dist/src/utils/apiErrorUtils.js.map +1 -0
- package/dist/src/utils/formatPromptMessages.d.ts.map +1 -1
- package/dist/src/utils/getPromptBySelector.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/__generated__/api/v1.ts +30 -15
- package/src/constants/serverRequirements.ts +8 -0
- package/src/sessions/addSessionNote.ts +74 -0
- package/src/sessions/index.ts +1 -0
- package/src/spans/addSpanNote.ts +7 -4
- package/src/traces/addTraceAnnotation.ts +65 -0
- package/src/traces/addTraceNote.ts +7 -3
- package/src/traces/index.ts +3 -0
- package/src/traces/logTraceAnnotations.ts +75 -0
- package/src/traces/types.ts +72 -0
- package/src/utils/apiErrorUtils.ts +17 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiErrorUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/apiErrorUtils.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAgBrD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function formatApiError(error) {
|
|
2
|
+
if (typeof error === "string") {
|
|
3
|
+
return error;
|
|
4
|
+
}
|
|
5
|
+
if (error && typeof error === "object") {
|
|
6
|
+
const errorWithDetail = error;
|
|
7
|
+
if (typeof errorWithDetail.detail === "string") {
|
|
8
|
+
return errorWithDetail.detail;
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
return JSON.stringify(error);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return String(error);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return String(error);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=apiErrorUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiErrorUtils.js","sourceRoot":"","sources":["../../../src/utils/apiErrorUtils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,eAAe,GAAG,KAA6B,CAAC;QACtD,IAAI,OAAO,eAAe,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/C,OAAO,eAAe,CAAC,MAAM,CAAC;QAChC,CAAC;QACD,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,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;;;;;;;mBA4DghnH,uDAAsB;;;;;;;;;IAlBhknH"}
|
|
@@ -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;;oBAkDi5gG,uDAAsB;;cAAkI,uDAAsB,yBAAwB,uDAAsB;mBAAoD,uDAAsB;qBAAoD,uDAAsB;2BAAqG,uDAAsB,uCAAsC,uDAAsB,4CAA2C,uDAAsB,0CAAyC,uDAAsB,uCAAsC,uDAAsB,yCAAwC,uDAAsB,oCAAmC,uDAAsB,uCAAsC,uDAAsB,oCAAmC,uDAAsB,yCAAwC,uDAAsB,0CAAyC,uDAAsB,qCAAoC,uDAAsB,yCAAwC,uDAAsB,2CAA0C,uDAAsB;YAA2D,uDAAsB;sBAAwF,uDAAsB;;UAD/2jG"}
|
|
@@ -66,7 +66,10 @@ export interface paths {
|
|
|
66
66
|
path?: never;
|
|
67
67
|
cookie?: never;
|
|
68
68
|
};
|
|
69
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Get span annotations filtered by span_ids and/or identifier.
|
|
71
|
+
* @description Return span annotations for a project, filtered by `span_ids`, `identifier`, or both. At least one of `span_ids` or `identifier` must be supplied. When both are supplied, results are the AND-intersection of the two filters.
|
|
72
|
+
*/
|
|
70
73
|
get: operations["listSpanAnnotationsBySpanIds"];
|
|
71
74
|
put?: never;
|
|
72
75
|
post?: never;
|
|
@@ -83,7 +86,10 @@ export interface paths {
|
|
|
83
86
|
path?: never;
|
|
84
87
|
cookie?: never;
|
|
85
88
|
};
|
|
86
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Get trace annotations filtered by trace_ids and/or identifier.
|
|
91
|
+
* @description Return trace annotations for a project, filtered by `trace_ids`, `identifier`, or both. At least one of `trace_ids` or `identifier` must be supplied. When both are supplied, results are the AND-intersection of the two filters.
|
|
92
|
+
*/
|
|
87
93
|
get: operations["listTraceAnnotationsByTraceIds"];
|
|
88
94
|
put?: never;
|
|
89
95
|
post?: never;
|
|
@@ -100,7 +106,10 @@ export interface paths {
|
|
|
100
106
|
path?: never;
|
|
101
107
|
cookie?: never;
|
|
102
108
|
};
|
|
103
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Get session annotations filtered by session_ids and/or identifier.
|
|
111
|
+
* @description Return session annotations for a project, filtered by `session_ids`, `identifier`, or both. At least one of `session_ids` or `identifier` must be supplied. When both are supplied, results are the AND-intersection of the two filters.
|
|
112
|
+
*/
|
|
104
113
|
get: operations["listSessionAnnotationsBySessionIds"];
|
|
105
114
|
put?: never;
|
|
106
115
|
post?: never;
|
|
@@ -485,7 +494,7 @@ export interface paths {
|
|
|
485
494
|
put?: never;
|
|
486
495
|
/**
|
|
487
496
|
* Create a trace note
|
|
488
|
-
* @description Add a note annotation to a trace.
|
|
497
|
+
* @description Add a note annotation to a trace. Each call appends a new note with an auto-generated UUIDv4 identifier, so multiple notes accumulate on the same trace. Structured annotations, by contrast, are keyed by (name, trace_id, identifier) — re-writing the same key overwrites the existing annotation, so to keep multiple structured annotations with the same name on a trace you must supply distinct identifiers.
|
|
489
498
|
*/
|
|
490
499
|
post: operations["createTraceNote"];
|
|
491
500
|
delete?: never;
|
|
@@ -590,7 +599,7 @@ export interface paths {
|
|
|
590
599
|
put?: never;
|
|
591
600
|
/**
|
|
592
601
|
* Create a span note
|
|
593
|
-
* @description Add a note annotation to a span.
|
|
602
|
+
* @description Add a note annotation to a span. Each call appends a new note with an auto-generated UUIDv4 identifier, so multiple notes accumulate on the same span. Structured annotations, by contrast, are keyed by (name, span_id, identifier) — re-writing the same key overwrites the existing annotation, so to keep multiple structured annotations with the same name on a span you must supply distinct identifiers.
|
|
594
603
|
*/
|
|
595
604
|
post: operations["createSpanNote"];
|
|
596
605
|
delete?: never;
|
|
@@ -941,7 +950,7 @@ export interface paths {
|
|
|
941
950
|
put?: never;
|
|
942
951
|
/**
|
|
943
952
|
* Create a session note
|
|
944
|
-
* @description Add a note annotation to a session.
|
|
953
|
+
* @description Add a note annotation to a session. Each call appends a new note with an auto-generated UUIDv4 identifier, so multiple notes accumulate on the same session. Structured annotations, by contrast, are keyed by (name, session_id, identifier) — re-writing the same key overwrites the existing annotation, so to keep multiple structured annotations with the same name on a session you must supply distinct identifiers.
|
|
945
954
|
*/
|
|
946
955
|
post: operations["createSessionNote"];
|
|
947
956
|
delete?: never;
|
|
@@ -3966,9 +3975,11 @@ export interface operations {
|
|
|
3966
3975
|
};
|
|
3967
3976
|
listSpanAnnotationsBySpanIds: {
|
|
3968
3977
|
parameters: {
|
|
3969
|
-
query
|
|
3970
|
-
/** @description
|
|
3971
|
-
span_ids
|
|
3978
|
+
query?: {
|
|
3979
|
+
/** @description Optional list of span ids to fetch annotations for. If omitted, `identifier` must be supplied. */
|
|
3980
|
+
span_ids?: string[] | null;
|
|
3981
|
+
/** @description Optional list of annotation identifiers to filter by. Each value must be non-empty. If omitted, `span_ids` must be supplied. When combined with `span_ids`, results are the AND-intersection of both filters. */
|
|
3982
|
+
identifier?: string[] | null;
|
|
3972
3983
|
/** @description Optional list of annotation names to include. If provided, only annotations with these names will be returned. 'note' annotations are excluded by default unless explicitly included in this list. */
|
|
3973
3984
|
include_annotation_names?: string[] | null;
|
|
3974
3985
|
/** @description Optional list of annotation names to exclude from results. */
|
|
@@ -4027,9 +4038,11 @@ export interface operations {
|
|
|
4027
4038
|
};
|
|
4028
4039
|
listTraceAnnotationsByTraceIds: {
|
|
4029
4040
|
parameters: {
|
|
4030
|
-
query
|
|
4031
|
-
/** @description
|
|
4032
|
-
trace_ids
|
|
4041
|
+
query?: {
|
|
4042
|
+
/** @description Optional list of trace ids to fetch annotations for. If omitted, `identifier` must be supplied. */
|
|
4043
|
+
trace_ids?: string[] | null;
|
|
4044
|
+
/** @description Optional list of annotation identifiers to filter by. Each value must be non-empty. If omitted, `trace_ids` must be supplied. When combined with `trace_ids`, results are the AND-intersection of both filters. */
|
|
4045
|
+
identifier?: string[] | null;
|
|
4033
4046
|
/** @description Optional list of annotation names to include. If provided, only annotations with these names will be returned. 'note' annotations are excluded by default unless explicitly included in this list. */
|
|
4034
4047
|
include_annotation_names?: string[] | null;
|
|
4035
4048
|
/** @description Optional list of annotation names to exclude from results. */
|
|
@@ -4088,9 +4101,11 @@ export interface operations {
|
|
|
4088
4101
|
};
|
|
4089
4102
|
listSessionAnnotationsBySessionIds: {
|
|
4090
4103
|
parameters: {
|
|
4091
|
-
query
|
|
4092
|
-
/** @description
|
|
4093
|
-
session_ids
|
|
4104
|
+
query?: {
|
|
4105
|
+
/** @description Optional list of session ids to fetch annotations for. If omitted, `identifier` must be supplied. */
|
|
4106
|
+
session_ids?: string[] | null;
|
|
4107
|
+
/** @description Optional list of annotation identifiers to filter by. Each value must be non-empty. If omitted, `session_ids` must be supplied. When combined with `session_ids`, results are the AND-intersection of both filters. */
|
|
4108
|
+
identifier?: string[] | null;
|
|
4094
4109
|
/** @description Optional list of annotation names to include. If provided, only annotations with these names will be returned. 'note' annotations are excluded by default unless explicitly included in this list. */
|
|
4095
4110
|
include_annotation_names?: string[] | null;
|
|
4096
4111
|
/** @description Optional list of annotation names to exclude from results. */
|