@temporalio/langsmith 1.24.0 → 2.0.0-rc.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.
@@ -12,10 +12,13 @@
12
12
  */
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.interceptors = interceptors;
15
+ const run_trees_1 = require("langsmith/run_trees");
15
16
  const traceable_1 = require("langsmith/singletons/traceable");
16
17
  const workflow_1 = require("@temporalio/workflow");
17
18
  const propagation_1 = require("./propagation");
18
19
  const run_tree_1 = require("./run-tree");
20
+ const routing_1 = require("./routing");
21
+ const workflow_run_tree_1 = require("./workflow-run-tree");
19
22
  function readConfig() {
20
23
  try {
21
24
  if (typeof __TEMPORAL_LANGSMITH_CONFIG__ === 'string') {
@@ -29,53 +32,61 @@ function readConfig() {
29
32
  }
30
33
  traceable_1.AsyncLocalStorageProviderSingleton.initializeGlobalInstance(new globalThis.AsyncLocalStorage());
31
34
  const sharedStore = traceable_1.AsyncLocalStorageProviderSingleton.getInstance();
32
- /** Reconstruct the propagated parent run from a Payload-keyed header map. */
33
- function reconstructParent(headers) {
34
- return (0, run_tree_1.runTreeFromContext)((0, propagation_1.readContextHeader)(headers));
35
- }
36
35
  /**
37
- * Re-wrap a reconstructed (plain) parent so its `createChild` produces
38
- * replay-safe children. Carries the same id/trace/dotted so descendants parent
39
- * under the real propagated run; never emitted itself.
36
+ * Reconstruct the propagated parent run from a Payload-keyed header map. A header naming no destination takes
37
+ * `config.destination`, as LangSmith would take its env defaults outside the isolate. This plugin never propagates a
38
+ * run with no destination (see {@link runHeaders}), so such a header comes from an older release; if the Worker has
39
+ * no destination either, LangSmith fills in `"default"` for it here.
40
40
  */
41
- function asReplaySafeParent(parent, generateNewUuid4) {
42
- if (!parent) {
43
- return undefined;
44
- }
45
- return new run_tree_1.ReplaySafeRunTree({
46
- name: parent.name,
47
- run_type: parent.run_type,
48
- id: parent.id,
49
- trace_id: parent.trace_id,
50
- dotted_order: parent.dotted_order,
51
- parent_run_id: parent.parent_run_id,
52
- project_name: parent.project_name,
53
- }, generateNewUuid4);
41
+ function reconstructParent(headers, config, readOnly) {
42
+ const context = (0, propagation_1.readContextHeader)(headers);
43
+ return (0, workflow_run_tree_1.workflowRunTreeContext)(config, () => (0, run_tree_1.runTreeFromContext)(context, config.destination), readOnly);
44
+ }
45
+ /** The `RunTree.end` arguments for a Workflow run whose handler threw `err`; continue-as-new isn't an error. */
46
+ function workflowThrownEnd(err) {
47
+ if ((0, workflow_1.isCancellation)(err))
48
+ return [(0, run_tree_1.statusOutputs)('cancelled'), undefined];
49
+ return err instanceof workflow_1.ContinueAsNew ? [(0, run_tree_1.statusOutputs)('continued_as_new'), undefined] : (0, run_tree_1.thrownEnd)(err);
50
+ }
51
+ /** Keep the incoming parent ambient when a Temporal run has no destination. */
52
+ function bodyAmbient(run, parent) {
53
+ return (0, run_tree_1.isUntraced)(run) ? parent ?? run : run;
54
54
  }
55
55
  /**
56
- * A placeholder parent for the no-propagated-parent case. Installed as the ambient
57
- * so a workflow-body `traceable` always nests via `createChild`; never emitted,
58
- * and its children are independent roots (see {@link _RootReplaySafeRunTreeFactory}).
56
+ * Emit a short-lived marker run as a child of `parent`. With no destination in `config` the marker has none either,
57
+ * but it's built and awaited all the same: the isolate's awaits, and so the order of its commands, must not depend
58
+ * on the Worker's env, or a history recorded under one env fails to replay under another.
59
59
  */
60
- function placeholderRoot(generateNewUuid4) {
61
- return new run_tree_1._RootReplaySafeRunTreeFactory({ name: (0, workflow_1.workflowInfo)().workflowType, run_type: run_tree_1.RUN_TYPE.CHAIN }, generateNewUuid4);
62
- }
63
- /** Emit a short-lived marker run as a child of `parent`. */
64
- async function emitMarker(parent, name, inputs) {
65
- const marker = parent.createChild({ name, run_type: run_tree_1.RUN_TYPE.CHAIN, inputs });
66
- await (0, run_tree_1.emitMarkerRun)(marker);
67
- return marker;
60
+ async function emitMarker(config, parent, name) {
61
+ const marker = parent.createChild({
62
+ name,
63
+ run_type: run_tree_1.RUN_TYPE.CHAIN,
64
+ tags: config.tags,
65
+ extra: { metadata: { ...config.metadata } },
66
+ });
67
+ if (config.destination === undefined)
68
+ (0, run_tree_1.suppressRun)(marker);
69
+ if (!marker.tracingEnabled)
70
+ return;
71
+ await marker.postRun();
72
+ await marker.end((0, run_tree_1.statusOutputs)('ok'));
73
+ await marker.patchRun();
68
74
  }
69
- function buildReplaySafeRunTree(config, params) {
70
- return new run_tree_1.ReplaySafeRunTree({
71
- name: params.name,
72
- run_type: params.runType,
73
- parent_run: params.parent,
74
- project_name: config.projectName,
75
+ function buildWorkflowRunTree(config, name, parent) {
76
+ const { workflowId, runId } = (0, workflow_1.workflowInfo)();
77
+ const run = new run_trees_1.RunTree({
78
+ name,
79
+ run_type: run_tree_1.RUN_TYPE.CHAIN,
80
+ parent_run: parent,
81
+ parent_run_id: parent?.id,
82
+ ...(0, routing_1.destination)(parent, config.destination),
83
+ replicas: parent?.replicas ?? config.replicas,
75
84
  tags: config.tags,
76
- extra: { metadata: (0, propagation_1.scrubSensitive)(config.metadata) ?? {} },
77
- inputs: params.inputs,
78
- }, params.generateNewUuid4);
85
+ extra: { metadata: { ...config.metadata, temporalWorkflowID: workflowId, temporalRunID: runId } },
86
+ });
87
+ if (config.destination === undefined)
88
+ (0, run_tree_1.suppressRun)(run);
89
+ return run;
79
90
  }
80
91
  class LangSmithWorkflowInbound {
81
92
  config;
@@ -83,101 +94,59 @@ class LangSmithWorkflowInbound {
83
94
  this.config = config;
84
95
  }
85
96
  async execute(input, next) {
86
- const parent = reconstructParent(input.headers);
87
- return this.runInbound((0, run_tree_1.runWorkflowRunName)((0, workflow_1.workflowInfo)().workflowType), run_tree_1.RUN_TYPE.CHAIN, parent, { args: input.args }, () => next(input));
97
+ return this.runInbound((0, run_tree_1.runWorkflowRunName)((0, workflow_1.workflowInfo)().workflowType), input.headers, () => next(input));
88
98
  }
89
99
  async handleSignal(input, next) {
90
- const parent = reconstructParent(input.headers);
91
- await this.runInbound((0, run_tree_1.handleSignalRunName)(input.signalName), run_tree_1.RUN_TYPE.CHAIN, parent, { args: input.args }, () => next(input));
100
+ await this.runInbound((0, run_tree_1.handleSignalRunName)(input.signalName), input.headers, () => next(input));
92
101
  }
93
102
  async handleQuery(input, next) {
94
103
  if ((0, propagation_1.isInternalQuery)(input.queryName)) {
95
104
  return next(input);
96
105
  }
97
- const parent = reconstructParent(input.headers);
98
- return this.runInbound((0, run_tree_1.handleQueryRunName)(input.queryName), run_tree_1.RUN_TYPE.CHAIN, parent, { args: input.args }, () => next(input),
99
- // Read-only: mint run ids from the nondeterministic unsafe random source so the
100
- // handler never draws from the Workflow main PRNG (which a clean replay would not advance).
101
- (0, workflow_1.workflowInfo)().unsafe.random.uuid4);
106
+ return this.runInbound((0, run_tree_1.handleQueryRunName)(input.queryName), input.headers, () => next(input), true);
102
107
  }
103
108
  async handleUpdate(input, next) {
104
- const parent = reconstructParent(input.headers);
105
- return this.runInbound((0, run_tree_1.handleUpdateRunName)(input.name), run_tree_1.RUN_TYPE.CHAIN, parent, { args: input.args }, () => next(input));
109
+ return this.runInbound((0, run_tree_1.handleUpdateRunName)(input.name), input.headers, () => next(input));
106
110
  }
107
111
  validateUpdate(input, next) {
108
- // Read-only: mint run ids from the nondeterministic unsafe random source so the validator
109
- // never draws from the Workflow main PRNG (which a clean replay would not advance).
110
- const generateNewUuid4 = (0, workflow_1.workflowInfo)().unsafe.random.uuid4;
111
- if (!this.config.addTemporalRuns) {
112
- // Propagation only: install the reconstructed parent (or a placeholder parent
113
- // when none was propagated, to keep a validator-body `traceable` off the
114
- // no-parent `crypto` path) so the validator body nests under the update's
115
- // trace.
116
- const ambient = asReplaySafeParent(reconstructParent(input.headers), generateNewUuid4) ?? placeholderRoot(generateNewUuid4);
117
- sharedStore.run(ambient, () => next(input));
118
- return;
119
- }
120
- const run = buildReplaySafeRunTree(this.config, {
121
- name: (0, run_tree_1.validateUpdateRunName)(input.name),
122
- runType: run_tree_1.RUN_TYPE.CHAIN,
123
- parent: asReplaySafeParent(reconstructParent(input.headers), generateNewUuid4),
124
- inputs: { args: input.args },
125
- generateNewUuid4,
126
- });
127
- // Validators are synchronous and must not be made async; emit start/end
128
- // around the synchronous call, with the run installed as the active store so
129
- // a `traceable` in the validator body nests under it.
130
- void run.postRun();
131
- try {
132
- sharedStore.run(run, () => next(input));
133
- void run.end({});
134
- }
135
- catch (err) {
136
- void run.end(undefined, (0, run_tree_1.describeError)(err));
137
- void run.patchRun();
138
- throw err;
139
- }
140
- void run.patchRun();
112
+ const parent = reconstructParent(input.headers, this.config, true);
113
+ (0, workflow_run_tree_1.workflowRunTreeContext)(this.config, () => {
114
+ if (!this.config.addTemporalRuns) {
115
+ sharedStore.run(parent, () => next(input));
116
+ return;
117
+ }
118
+ const run = buildWorkflowRunTree(this.config, (0, run_tree_1.validateUpdateRunName)(input.name), parent);
119
+ void run.postRun();
120
+ let end = [(0, run_tree_1.statusOutputs)('ok'), undefined];
121
+ try {
122
+ sharedStore.run(bodyAmbient(run, parent), () => next(input));
123
+ }
124
+ catch (err) {
125
+ end = workflowThrownEnd(err);
126
+ throw err;
127
+ }
128
+ finally {
129
+ void run.end(...end);
130
+ void run.patchRun();
131
+ }
132
+ }, true);
141
133
  }
142
134
  /**
143
- * Open the inbound run, install it as the active run for the whole `next`
135
+ * Open the inbound run, install it (see {@link bodyAmbient}) as the active run for the whole `next`
144
136
  * async scope, and close it. The real ALS scopes the run to this branch, so a
145
137
  * handler running concurrently with the workflow body never leaks its run into
146
138
  * the body's context.
147
139
  */
148
- async runInbound(name, runType, parent, inputs, next, generateNewUuid4) {
149
- if (!this.config.addTemporalRuns) {
150
- // Propagation only: install the reconstructed parent as the active run so
151
- // user `traceable` runs nest under it; never emit a Temporal-operation run.
152
- // With no propagated parent, install a placeholder parent instead of
153
- // `undefined` so a workflow-body `traceable` takes LangSmith's
154
- // `createChild` branch (deterministic id) rather than the no-parent branch
155
- // that mints a uuid via `crypto`, which the isolate lacks.
156
- const ambient = asReplaySafeParent(parent, generateNewUuid4) ?? placeholderRoot(generateNewUuid4);
157
- return sharedStore.run(ambient, next);
158
- }
159
- const run = buildReplaySafeRunTree(this.config, {
160
- name,
161
- runType,
162
- parent: asReplaySafeParent(parent, generateNewUuid4),
163
- inputs,
164
- generateNewUuid4,
165
- });
166
- void run.postRun();
167
- const body = async () => {
168
- try {
169
- const result = await next();
170
- await run.end((0, run_tree_1.asOutputs)(result));
171
- await run.patchRun();
172
- return result;
173
- }
174
- catch (err) {
175
- await run.end(undefined, (0, run_tree_1.describeError)(err));
176
- await run.patchRun();
177
- throw err;
140
+ async runInbound(name, headers, next, readOnly = false) {
141
+ const parent = reconstructParent(headers, this.config, readOnly);
142
+ return (0, workflow_run_tree_1.workflowRunTreeContext)(this.config, () => {
143
+ if (!this.config.addTemporalRuns) {
144
+ return sharedStore.run(parent, next);
178
145
  }
179
- };
180
- return sharedStore.run(run, body);
146
+ const run = buildWorkflowRunTree(this.config, name, parent);
147
+ void run.postRun();
148
+ return sharedStore.run(bodyAmbient(run, parent), () => (0, run_tree_1.wrapWithRun)(run, next, workflowThrownEnd));
149
+ }, readOnly);
181
150
  }
182
151
  }
183
152
  class LangSmithWorkflowOutbound {
@@ -186,56 +155,39 @@ class LangSmithWorkflowOutbound {
186
155
  this.config = config;
187
156
  }
188
157
  async scheduleActivity(input, next) {
189
- return this.peerMarker((0, run_tree_1.startActivityRunName)(input.activityType), input, (headers) => next({ ...input, headers }));
158
+ return this.withHeaders((0, run_tree_1.startActivityRunName)(input.activityType), input, next);
190
159
  }
191
160
  async scheduleLocalActivity(input, next) {
192
- return this.peerMarker((0, run_tree_1.startActivityRunName)(input.activityType), input, (headers) => next({ ...input, headers }));
161
+ return this.withHeaders((0, run_tree_1.startActivityRunName)(input.activityType), input, next);
193
162
  }
194
163
  async startChildWorkflowExecution(input, next) {
195
- return this.peerMarker((0, run_tree_1.startChildWorkflowRunName)(input.workflowType), input, (headers) => next({ ...input, headers }));
164
+ return this.withHeaders((0, run_tree_1.startChildWorkflowRunName)(input.workflowType), input, next);
196
165
  }
197
166
  continueAsNew(input, next) {
198
- // Don't propagate a placeholder root: it is never emitted, so the successor's
199
- // runs would dangle under a nonexistent parent. Let it install its own.
200
- const ambient = sharedStore.getStore();
201
- const context = ambient instanceof run_tree_1._RootReplaySafeRunTreeFactory ? undefined : (0, run_tree_1.runHeaders)(ambient);
202
- const headers = (0, propagation_1.withContextHeader)(input.headers, context);
203
- return next({ ...input, headers });
167
+ return next({ ...input, headers: (0, propagation_1.withContextHeader)(input.headers, (0, run_tree_1.runHeaders)(sharedStore.getStore())) });
204
168
  }
205
169
  async signalWorkflow(input, next) {
206
- const isChild = input.target.type === 'child';
207
- const name = isChild
170
+ const name = input.target.type === 'child'
208
171
  ? (0, run_tree_1.signalChildWorkflowRunName)(input.signalName)
209
172
  : (0, run_tree_1.signalExternalWorkflowRunName)(input.signalName);
210
- return this.parentMarker(name, input, (headers) => next({ ...input, headers }));
173
+ return this.withHeaders(name, input, next);
211
174
  }
212
175
  async startNexusOperation(input, next) {
213
- const ambient = sharedStore.getStore();
214
- if (this.config.addTemporalRuns && ambient instanceof run_tree_1.ReplaySafeRunTree) {
215
- await emitMarker(ambient, (0, run_tree_1.startNexusOperationRunName)(input.service, input.operation), {});
216
- }
217
- const ctx = (0, run_tree_1.runHeaders)(ambient);
218
- const headers = ctx ? { ...input.headers, [propagation_1.HEADER_KEY]: (0, propagation_1.encodeContextString)(ctx) } : input.headers;
219
- return next({ ...input, headers });
176
+ return this.traceOutbound((0, run_tree_1.startNexusOperationRunName)(input.service, input.operation), (context) => {
177
+ const headers = context ? { ...input.headers, [propagation_1.HEADER_KEY]: (0, propagation_1.encodeContextString)(context) } : input.headers;
178
+ return next({ ...input, headers });
179
+ });
220
180
  }
221
- /** Sibling-marker operations: marker is a peer of the remote run; propagate ambient. */
222
- async peerMarker(name, input, next) {
181
+ /** Emit the marker, then pass `call` the caller's context, so the remote run is the marker's sibling. */
182
+ async traceOutbound(name, call) {
223
183
  const ambient = sharedStore.getStore();
224
- if (this.config.addTemporalRuns && ambient instanceof run_tree_1.ReplaySafeRunTree) {
225
- await emitMarker(ambient, name, { args: input.args ?? [] });
184
+ if (this.config.addTemporalRuns && ambient !== undefined) {
185
+ await emitMarker(this.config, ambient, name);
226
186
  }
227
- const headers = (0, propagation_1.withContextHeader)(input.headers, (0, run_tree_1.runHeaders)(ambient));
228
- return next(headers);
187
+ return call((0, run_tree_1.runHeaders)(ambient));
229
188
  }
230
- /** Parent-marker operations: remote handler nests under the marker; propagate marker. */
231
- async parentMarker(name, input, next) {
232
- const ambient = sharedStore.getStore();
233
- let propagate = ambient;
234
- if (this.config.addTemporalRuns && ambient instanceof run_tree_1.ReplaySafeRunTree) {
235
- propagate = await emitMarker(ambient, name, { args: input.args ?? [] });
236
- }
237
- const headers = (0, propagation_1.withContextHeader)(input.headers, (0, run_tree_1.runHeaders)(propagate));
238
- return next(headers);
189
+ withHeaders(name, input, next) {
190
+ return this.traceOutbound(name, (context) => next({ ...input, headers: (0, propagation_1.withContextHeader)(input.headers, context) }));
239
191
  }
240
192
  }
241
193
  /**
@@ -246,6 +198,7 @@ class LangSmithWorkflowOutbound {
246
198
  */
247
199
  function interceptors() {
248
200
  const config = readConfig();
201
+ (0, workflow_run_tree_1.installRunTreeOverrides)();
249
202
  return {
250
203
  inbound: [new LangSmithWorkflowInbound(config)],
251
204
  outbound: [new LangSmithWorkflowOutbound(config)],
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-interceptors.js","sourceRoot":"","sources":["../src/workflow-interceptors.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAiaH,oCAMC;AApaD,8DAAoF;AASpF,mDAY8B;AAC9B,+CAOuB;AACvB,yCAmBoB;AAqBpB,SAAS,UAAU;IACjB,IAAI,CAAC;QACH,IAAI,OAAO,6BAA6B,KAAK,QAAQ,EAAE,CAAC;YACtD,OAAO,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAA4B,CAAC;QAC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reeOverrides } from './run-tree';
3
+ import type { WorkflowLangSmithConfig } from './workflow-interceptors';
4
+ export declare function workflowRunTreeContext<T>(config: WorkflowLangSmithConfig, fn: () => T, readOnly?: boolean): T;
5
+ /** Preserve native root/child selection, ordering, and replica inheritance. */
6
+ export declare const WORKFLOW_RUN_TREE_OVERRIDES: RunTreeOverrides;
7
+ export declare function installRunTreeOverrides(): void;
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ /** Native LangSmith lifecycle overrides, scoped to this plugin's workflow handlers. */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.WORKFLOW_RUN_TREE_OVERRIDES = void 0;
5
+ exports.workflowRunTreeContext = workflowRunTreeContext;
6
+ exports.installRunTreeOverrides = installRunTreeOverrides;
7
+ const node_async_hooks_1 = require("node:async_hooks");
8
+ const uuid_1 = require("uuid");
9
+ const workflow_1 = require("@temporalio/workflow");
10
+ const run_tree_1 = require("./run-tree");
11
+ const sinks_1 = require("./sinks");
12
+ const LANGSMITH_RUN_TREE_STREAM = 'package-langsmith-tracing';
13
+ // The bundle rewrites `node:async_hooks` to the AsyncLocalStorage the SDK injects into the sandbox.
14
+ const context = new node_async_hooks_1.AsyncLocalStorage();
15
+ function workflowRunTreeContext(config, fn, readOnly = false) {
16
+ return context.run({ config, readOnly }, fn);
17
+ }
18
+ function runId(readOnly) {
19
+ const bytes = new Uint8Array(16);
20
+ if (readOnly) {
21
+ const { unsafe } = (0, workflow_1.workflowInfo)();
22
+ return (0, uuid_1.v7)({ msecs: unsafe.now(), random: unsafe.random.fillRandom(bytes) });
23
+ }
24
+ return (0, uuid_1.v7)({ msecs: Date.now(), random: (0, workflow_1.getRandomStream)(LANGSMITH_RUN_TREE_STREAM).fill(bytes) });
25
+ }
26
+ function workerOrServerTime() {
27
+ const { unsafe } = (0, workflow_1.workflowInfo)();
28
+ return unsafe.isReplayingHistoryEvents ? Date.now() : unsafe.now();
29
+ }
30
+ // Every write inside a workflow is routed through a sink instead of this client.
31
+ const NOOP_CLIENT = {
32
+ createRun: async () => { },
33
+ updateRun: async () => { },
34
+ };
35
+ // LangSmith calls getDefaultConfig and _resolveAddressing from its constructor. Patching them also covers
36
+ // RunTree aliases imported before installation, including its own createChild.
37
+ /** Preserve native root/child selection, ordering, and replica inheritance. */
38
+ exports.WORKFLOW_RUN_TREE_OVERRIDES = {
39
+ statics: {
40
+ getDefaultConfig: (original) => function (...args) {
41
+ const defaults = original.apply(this, args);
42
+ const active = context.getStore();
43
+ if (!active)
44
+ return defaults;
45
+ return {
46
+ ...defaults,
47
+ id: runId(active.readOnly),
48
+ start_time: workerOrServerTime(),
49
+ replicas: active.config.replicas,
50
+ // Keep traceable's awaits independent of the worker's destination env.
51
+ tracingEnabled: true,
52
+ };
53
+ },
54
+ getSharedClient: (original) => function (...args) {
55
+ return context.getStore() ? NOOP_CLIENT : original.apply(this, args);
56
+ },
57
+ },
58
+ methods: {
59
+ _resolveAddressing: (original) => function (config, ...args) {
60
+ const active = context.getStore();
61
+ if (!active)
62
+ return original.call(this, config, ...args);
63
+ const selected = config.project_name || config.address ? config : { ...config, ...active.config.destination };
64
+ original.call(this, selected, ...args);
65
+ if (!selected.project_name && !selected.address)
66
+ (0, run_tree_1.suppressRun)(this);
67
+ // A run with no parent and no propagated trace starts a new trace, which LangSmith's env gates.
68
+ if (!config.parent_run && !config.trace_id && active.config.tracingEnabled === false)
69
+ (0, run_tree_1.suppressRun)(this);
70
+ // A child of an untraced run stays untraced, whether built by createChild or `new RunTree({ parent_run })`.
71
+ if (config.parent_run && (0, run_tree_1.isUntraced)(config.parent_run))
72
+ (0, run_tree_1.suppressRun)(this);
73
+ },
74
+ end: (original) => async function (outputs, error, endTime, ...args) {
75
+ if (context.getStore() && endTime === undefined)
76
+ endTime = workerOrServerTime();
77
+ return original.call(this, outputs, error, endTime, ...args);
78
+ },
79
+ postRun: (original) => async function (excludeChildRuns = true, ...args) {
80
+ if (!context.getStore())
81
+ return original.call(this, excludeChildRuns, ...args);
82
+ // Native traceable can defer asynchronous input processing until postRun.
83
+ if (this._awaitInputsOnPost) {
84
+ this.inputs = await this.inputs;
85
+ }
86
+ if (!(0, workflow_1.workflowInfo)().unsafe.isReplayingHistoryEvents && !(0, run_tree_1.isUntraced)(this)) {
87
+ (0, workflow_1.proxySinks)()[sinks_1.LANGSMITH_SINK_NAME].createRun((0, run_tree_1.serializeRun)(this));
88
+ }
89
+ if (!excludeChildRuns) {
90
+ for (const child of this.child_runs)
91
+ await child.postRun(false);
92
+ }
93
+ this.child_runs = [];
94
+ },
95
+ patchRun: (original) => async function (options, ...args) {
96
+ if (!context.getStore())
97
+ return original.call(this, options, ...args);
98
+ if (!(0, workflow_1.workflowInfo)().unsafe.isReplayingHistoryEvents && !(0, run_tree_1.isUntraced)(this)) {
99
+ (0, workflow_1.proxySinks)()[sinks_1.LANGSMITH_SINK_NAME].updateRun((0, run_tree_1.serializeRun)(this), options);
100
+ }
101
+ this.child_runs = [];
102
+ },
103
+ },
104
+ };
105
+ let installed = false;
106
+ function installRunTreeOverrides() {
107
+ if (installed)
108
+ return;
109
+ (0, run_tree_1.patchRunTree)(exports.WORKFLOW_RUN_TREE_OVERRIDES);
110
+ installed = true;
111
+ }
112
+ //# sourceMappingURL=workflow-run-tree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-run-tree.js","sourceRoot":"","sources":["../src/workflow-run-tree.ts"],"names":[],"mappings":";AAAA,uFAAuF;;;AAsBvF,wDAMC;AA8FD,0DAIC;AA5HD,uDAAqD;AAIrD,+BAAoC;AACpC,mDAAiF;AACjF,yCAAwG;AACxG,mCAAmE;AAGnE,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AAO9D,oGAAoG;AACpG,MAAM,OAAO,GAAG,IAAI,oCAAiB,EAA0B,CAAC;AAEhE,SAAgB,sBAAsB,CACpC,MAA+B,EAC/B,EAAW,EACX,QAAQ,GAAG,KAAK;IAEhB,OAAO,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE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BAAgB,EAAE,CAAC;gBACtB,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,UAAU;oBAAE,MAAM,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAClE,CAAC;YACD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACvB,CAAC;QACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CACrB,KAAK,WAA0B,OAA4C,EAAE,GAAG,IAAe;YAC7F,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;gBAAE,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;YACtE,IAAI,CAAC,IAAA,uBAAY,GAAE,CAAC,MAAM,CAAC,wBAAwB,IAAI,CAAC,IAAA,qBAAU,EAAC,IAAI,CAAC,EAAE,CAAC;gBACzE,IAAA,qBAAU,GAAkB,CAAC,2BAAmB,CAAC,CAAC,SAAS,CAAC,IAAA,uBAAY,EAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;YAC3F,CAAC;YACD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACvB,CAAC;KACJ;CACF,CAAC;AAEF,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAgB,uBAAuB;IACrC,IAAI,SAAS;QAAE,OAAO;IACtB,IAAA,uBAAY,EAAC,mCAA2B,CAAC,CAAC;IAC1C,SAAS,GAAG,IAAI,CAAC;AACnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temporalio/langsmith",
3
- "version": "1.24.0",
3
+ "version": "2.0.0-rc.1",
4
4
  "description": "Temporal LangSmith observability integration package",
5
5
  "main": "lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -13,6 +13,7 @@
13
13
  },
14
14
  "ava": {
15
15
  "files": [
16
+ "./lib/__tests__/**/*.test.js",
16
17
  "./lib/__tests__/test-*.js"
17
18
  ],
18
19
  "timeout": "120s",
@@ -44,34 +45,49 @@
44
45
  "author": "Temporal Technologies Inc. <sdk@temporal.io>",
45
46
  "license": "MIT",
46
47
  "dependencies": {
47
- "@temporalio/activity": "1.24.0",
48
- "@temporalio/client": "1.24.0",
49
- "@temporalio/common": "1.24.0",
50
- "@temporalio/plugin": "1.24.0",
51
- "@temporalio/worker": "1.24.0",
52
- "@temporalio/workflow": "1.24.0"
48
+ "@temporalio/activity": "^1.24.0",
49
+ "@temporalio/client": "^1.24.0",
50
+ "@temporalio/common": "^1.24.0",
51
+ "@temporalio/plugin": "^1.24.0",
52
+ "@temporalio/worker": "^1.24.0",
53
+ "@temporalio/workflow": "^1.24.0",
54
+ "uuid": "^11.1.0"
53
55
  },
54
56
  "peerDependencies": {
55
- "langsmith": "^0.7.9"
57
+ "langsmith": ">=0.10.13 <0.11.0",
58
+ "long": "^5.3.2",
59
+ "protobufjs": "^8.7.1"
56
60
  },
57
61
  "devDependencies": {
58
- "@temporalio/testing": "1.24.0",
62
+ "@temporalio/testing": "^1.24.0",
59
63
  "ava": "^5.3.1",
60
- "langsmith": "^0.7.9",
61
- "nexus-rpc": "^0.0.3"
64
+ "langsmith": ">=0.10.13 <0.11.0",
65
+ "long": "^5.3.2",
66
+ "nexus-rpc": "^0.0.3",
67
+ "protobufjs": "^8.7.1",
68
+ "@tsconfig/node20": "^20.1.4",
69
+ "@types/node": "^20.19.39",
70
+ "typescript": "^5.9.3",
71
+ "tsx": "^4.20.6",
72
+ "eslint": "^9.26.0",
73
+ "@eslint/js": "^9.26.0",
74
+ "typescript-eslint": "^8.10.0",
75
+ "eslint-plugin-import": "^2.31.0",
76
+ "eslint-import-resolver-typescript": "^3.6.1",
77
+ "eslint-config-prettier": "^9.1.0"
62
78
  },
63
79
  "engines": {
64
- "node": ">= 20.3.0"
80
+ "node": ">=22.12.0"
65
81
  },
66
82
  "bugs": {
67
- "url": "https://github.com/temporalio/sdk-typescript/issues"
83
+ "url": "https://github.com/temporalio/ai-integrations/issues"
68
84
  },
69
85
  "repository": {
70
86
  "type": "git",
71
- "url": "git+https://github.com/temporalio/sdk-typescript.git",
72
- "directory": "contrib/langsmith"
87
+ "url": "git+https://github.com/temporalio/ai-integrations.git",
88
+ "directory": "typescript/langsmith"
73
89
  },
74
- "homepage": "https://github.com/temporalio/sdk-typescript/tree/main/contrib/langsmith",
90
+ "homepage": "https://github.com/temporalio/ai-integrations/tree/main/typescript/langsmith",
75
91
  "publishConfig": {
76
92
  "access": "public"
77
93
  },
@@ -79,10 +95,13 @@
79
95
  "src",
80
96
  "lib",
81
97
  "!src/__tests__",
82
- "!lib/__tests__"
98
+ "!lib/__tests__",
99
+ "LICENSE"
83
100
  ],
84
101
  "scripts": {
85
102
  "build": "tsc --build",
86
- "test": "tsx ../../scripts/ava-ci.ts ./lib/__tests__/test-*.js"
103
+ "lint": "pnpm run build && eslint --config ../_shared/eslint.config.mjs src",
104
+ "test": "ava",
105
+ "pack": "pnpm pack --pack-destination dist"
87
106
  }
88
107
  }