langsmith 0.7.9 → 0.7.10
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.
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
type HeaderValue = string | undefined | null;
|
|
2
|
+
declare const brand_privateNullableHeaders: unique symbol;
|
|
3
|
+
/**
|
|
4
|
+
* Users can pass explicit nulls to unset default headers. When we parse them
|
|
5
|
+
* into a standard headers type we need to preserve that information.
|
|
6
|
+
*/
|
|
7
|
+
export type NullableHeaders = {
|
|
8
|
+
/** Brand check, prevent users from creating a NullableHeaders. */
|
|
9
|
+
[brand_privateNullableHeaders]: true;
|
|
10
|
+
/** Parsed headers. */
|
|
11
|
+
values: Headers;
|
|
12
|
+
/** Set of lowercase header names explicitly set to null. */
|
|
13
|
+
nulls: Set<string>;
|
|
14
|
+
};
|
|
2
15
|
export type HeadersLike = Headers | readonly HeaderValue[][] | Record<string, HeaderValue | readonly HeaderValue[]> | undefined | null | NullableHeaders;
|
|
3
16
|
export declare const buildHeaders: (newHeaders: HeadersLike[]) => NullableHeaders;
|
|
4
17
|
export declare const isEmptyHeaders: (headers: HeadersLike) => boolean;
|
|
@@ -23,35 +23,8 @@ type OverloadedParameters<T> = T extends ({
|
|
|
23
23
|
(...args: infer A): unknown;
|
|
24
24
|
(...args: infer B): unknown;
|
|
25
25
|
}) ? A | B : T extends (...args: infer A) => unknown ? A : never;
|
|
26
|
-
/**
|
|
27
|
-
* These imports attempt to get types from a parent package's dependencies.
|
|
28
|
-
* Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which
|
|
29
|
-
* would cause typescript to show types not present at runtime. To avoid this, we import
|
|
30
|
-
* directly from parent node_modules folders.
|
|
31
|
-
*
|
|
32
|
-
* We need to check multiple levels because we don't know what directory structure we'll be in.
|
|
33
|
-
* For example, pnpm generates directories like this:
|
|
34
|
-
* ```
|
|
35
|
-
* node_modules
|
|
36
|
-
* ├── .pnpm
|
|
37
|
-
* │ └── pkg@1.0.0
|
|
38
|
-
* │ └── node_modules
|
|
39
|
-
* │ └── pkg
|
|
40
|
-
* │ └── internal
|
|
41
|
-
* │ └── types.d.ts
|
|
42
|
-
* ├── pkg -> .pnpm/pkg@1.0.0/node_modules/pkg
|
|
43
|
-
* └── undici
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition
|
|
47
|
-
*/
|
|
48
|
-
/** @ts-ignore For users with \@types/node */ type UndiciTypesRequestInit = NotAny<import('../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici-types/index.d.ts').RequestInit>;
|
|
49
|
-
/** @ts-ignore For users with undici */ type UndiciRequestInit = NotAny<import('../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/undici/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/undici/index.d.ts').RequestInit>;
|
|
50
|
-
/** @ts-ignore For users with \@types/bun */ type BunRequestInit = globalThis.FetchRequestInit;
|
|
51
|
-
/** @ts-ignore For users with node-fetch@2 */ type NodeFetch2RequestInit = NotAny<import('../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/@types/node-fetch/index.d.ts').RequestInit>;
|
|
52
|
-
/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ type NodeFetch3RequestInit = NotAny<import('../node_modules/node-fetch').RequestInit> | NotAny<import('../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../node_modules/node-fetch').RequestInit> | NotAny<import('../../../../../../../../../../node_modules/node-fetch').RequestInit>;
|
|
53
26
|
/** @ts-ignore For users who use Deno */ type FetchRequestInit = NonNullable<OverloadedParameters<typeof fetch>[1]>;
|
|
54
|
-
type RequestInits = NotAny<
|
|
27
|
+
type RequestInits = NotAny<RequestInit> | NotAny<FetchRequestInit>;
|
|
55
28
|
/**
|
|
56
29
|
* This type contains `RequestInit` options that may be available on the current runtime,
|
|
57
30
|
* including per-platform extensions like `dispatcher`, `agent`, `client`, etc.
|
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,6 @@ Object.defineProperty(exports, "PromptCache", { enumerable: true, get: function
|
|
|
20
20
|
Object.defineProperty(exports, "configureGlobalPromptCache", { enumerable: true, get: function () { return index_js_1.configureGlobalPromptCache; } });
|
|
21
21
|
Object.defineProperty(exports, "promptCacheSingleton", { enumerable: true, get: function () { return index_js_1.promptCacheSingleton; } });
|
|
22
22
|
// Update using pnpm bump-version
|
|
23
|
-
exports.__version__ = "0.7.
|
|
23
|
+
exports.__version__ = "0.7.10";
|
|
24
24
|
// Metadata key to hide a traced run from LangSmith's Messages View.
|
|
25
25
|
exports.LS_MESSAGE_VIEW_EXCLUDE = "ls_message_view_exclude";
|
package/dist/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export { getDefaultProjectName } from "./utils/project.js";
|
|
|
6
6
|
export { uuid7, uuid7FromTime } from "./uuid.js";
|
|
7
7
|
export { isTracingEnabled } from "./utils/guard.js";
|
|
8
8
|
export { Cache, PromptCache, type CacheConfig, type CacheMetrics, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
|
|
9
|
-
export declare const __version__ = "0.7.
|
|
9
|
+
export declare const __version__ = "0.7.10";
|
|
10
10
|
export declare const LS_MESSAGE_VIEW_EXCLUDE: "ls_message_view_exclude";
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,6 @@ export { uuid7, uuid7FromTime } from "./uuid.js";
|
|
|
6
6
|
export { isTracingEnabled } from "./utils/guard.js";
|
|
7
7
|
export { Cache, PromptCache, configureGlobalPromptCache, promptCacheSingleton, } from "./utils/prompt_cache/index.js";
|
|
8
8
|
// Update using pnpm bump-version
|
|
9
|
-
export const __version__ = "0.7.
|
|
9
|
+
export const __version__ = "0.7.10";
|
|
10
10
|
// Metadata key to hide a traced run from LangSmith's Messages View.
|
|
11
11
|
export const LS_MESSAGE_VIEW_EXCLUDE = "ls_message_view_exclude";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langsmith",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.10",
|
|
4
4
|
"description": "Client library to connect to the LangSmith Observability and Evaluation Platform.",
|
|
5
5
|
"packageManager": "pnpm@10.33.0",
|
|
6
6
|
"files": [
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"main": "./dist/index.js",
|
|
115
115
|
"types": "./dist/index.d.ts",
|
|
116
116
|
"scripts": {
|
|
117
|
-
"build": "pnpm clean && pnpm build:esm && pnpm build:cjs && node scripts/create-entrypoints.js",
|
|
117
|
+
"build": "pnpm clean && pnpm build:esm && pnpm build:cjs && node scripts/create-entrypoints.js && node scripts/fix-openapi-client-declarations.js",
|
|
118
118
|
"build:typedoc": "pnpm build && rm -rf ./_build/api_refs && npx typedoc",
|
|
119
119
|
"bump-version": "node scripts/bump-version.js",
|
|
120
120
|
"check-version": "node scripts/check-version.js",
|