@langchain/langgraph 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/graph/state.cjs +1 -4
- package/dist/graph/state.d.ts +1 -1
- package/dist/graph/state.js +1 -4
- package/dist/pregel/index.cjs +2 -14
- package/dist/pregel/index.d.ts +0 -1
- package/dist/pregel/index.js +2 -14
- package/dist/pregel/types.d.ts +0 -1
- package/package.json +1 -1
package/dist/graph/state.cjs
CHANGED
|
@@ -124,7 +124,7 @@ class StateGraph extends graph_js_1.Graph {
|
|
|
124
124
|
writable: true,
|
|
125
125
|
value: new Map()
|
|
126
126
|
});
|
|
127
|
-
/** @internal */
|
|
127
|
+
/** @internal Used only for typing. */
|
|
128
128
|
Object.defineProperty(this, "_configSchema", {
|
|
129
129
|
enumerable: true,
|
|
130
130
|
configurable: true,
|
|
@@ -259,9 +259,6 @@ class StateGraph extends graph_js_1.Graph {
|
|
|
259
259
|
// create empty compiled graph
|
|
260
260
|
const compiled = new CompiledStateGraph({
|
|
261
261
|
builder: this,
|
|
262
|
-
configKeys: this._configSchema
|
|
263
|
-
? Object.keys(this._configSchema)
|
|
264
|
-
: undefined,
|
|
265
262
|
checkpointer,
|
|
266
263
|
interruptAfter,
|
|
267
264
|
interruptBefore,
|
package/dist/graph/state.d.ts
CHANGED
|
@@ -109,7 +109,7 @@ export declare class StateGraph<SD extends StateDefinition | unknown, S = SD ext
|
|
|
109
109
|
* @internal
|
|
110
110
|
*/
|
|
111
111
|
_schemaDefinitions: Map<any, any>;
|
|
112
|
-
/** @internal */
|
|
112
|
+
/** @internal Used only for typing. */
|
|
113
113
|
_configSchema: C | undefined;
|
|
114
114
|
constructor(fields: SD extends StateDefinition ? SD | AnnotationRoot<SD> | StateGraphArgs<S> | StateGraphArgsWithStateSchema<SD, I, O> | StateGraphArgsWithInputOutputSchemas<SD, O> : StateGraphArgs<S>, configSchema?: AnnotationRoot<C>);
|
|
115
115
|
get allEdges(): Set<[string, string]>;
|
package/dist/graph/state.js
CHANGED
|
@@ -121,7 +121,7 @@ export class StateGraph extends Graph {
|
|
|
121
121
|
writable: true,
|
|
122
122
|
value: new Map()
|
|
123
123
|
});
|
|
124
|
-
/** @internal */
|
|
124
|
+
/** @internal Used only for typing. */
|
|
125
125
|
Object.defineProperty(this, "_configSchema", {
|
|
126
126
|
enumerable: true,
|
|
127
127
|
configurable: true,
|
|
@@ -256,9 +256,6 @@ export class StateGraph extends Graph {
|
|
|
256
256
|
// create empty compiled graph
|
|
257
257
|
const compiled = new CompiledStateGraph({
|
|
258
258
|
builder: this,
|
|
259
|
-
configKeys: this._configSchema
|
|
260
|
-
? Object.keys(this._configSchema)
|
|
261
|
-
: undefined,
|
|
262
259
|
checkpointer,
|
|
263
260
|
interruptAfter,
|
|
264
261
|
interruptBefore,
|
package/dist/pregel/index.cjs
CHANGED
|
@@ -113,12 +113,6 @@ class Pregel extends runnables_1.Runnable {
|
|
|
113
113
|
writable: true,
|
|
114
114
|
value: void 0
|
|
115
115
|
});
|
|
116
|
-
Object.defineProperty(this, "configKeys", {
|
|
117
|
-
enumerable: true,
|
|
118
|
-
configurable: true,
|
|
119
|
-
writable: true,
|
|
120
|
-
value: void 0
|
|
121
|
-
});
|
|
122
116
|
Object.defineProperty(this, "autoValidate", {
|
|
123
117
|
enumerable: true,
|
|
124
118
|
configurable: true,
|
|
@@ -189,7 +183,6 @@ class Pregel extends runnables_1.Runnable {
|
|
|
189
183
|
this.streamMode = streamMode ?? this.streamMode;
|
|
190
184
|
this.inputChannels = fields.inputChannels;
|
|
191
185
|
this.outputChannels = fields.outputChannels;
|
|
192
|
-
this.configKeys = fields.configKeys;
|
|
193
186
|
this.streamChannels = fields.streamChannels ?? this.streamChannels;
|
|
194
187
|
this.interruptAfter = fields.interruptAfter;
|
|
195
188
|
this.interruptBefore = fields.interruptBefore;
|
|
@@ -356,7 +349,8 @@ class Pregel extends runnables_1.Runnable {
|
|
|
356
349
|
}
|
|
357
350
|
// update channels
|
|
358
351
|
const channels = (0, base_js_1.emptyChannels)(this.channels, checkpoint);
|
|
359
|
-
|
|
352
|
+
// Pass `skipManaged: true` as managed values are not used/relevant in update state calls.
|
|
353
|
+
const { managed } = await this.prepareSpecs(config, { skipManaged: true });
|
|
360
354
|
// run all writers of the chosen node
|
|
361
355
|
const writers = this.nodes[asNode].getWriters();
|
|
362
356
|
if (!writers.length) {
|
|
@@ -434,12 +428,6 @@ class Pregel extends runnables_1.Runnable {
|
|
|
434
428
|
else {
|
|
435
429
|
defaultCheckpointer = this.checkpointer;
|
|
436
430
|
}
|
|
437
|
-
if (this.configKeys !== undefined) {
|
|
438
|
-
const newConfigurable = Object.fromEntries(Object.entries(rest.configurable ?? {}).filter(([key]) => {
|
|
439
|
-
return this.configKeys?.includes(key);
|
|
440
|
-
}));
|
|
441
|
-
rest.configurable = newConfigurable;
|
|
442
|
-
}
|
|
443
431
|
return [
|
|
444
432
|
defaultDebug,
|
|
445
433
|
defaultStreamMode,
|
package/dist/pregel/index.d.ts
CHANGED
|
@@ -45,7 +45,6 @@ export declare class Pregel<Nn extends StrRecord<string, PregelNode>, Cc extends
|
|
|
45
45
|
channels: Cc;
|
|
46
46
|
inputChannels: keyof Cc | Array<keyof Cc>;
|
|
47
47
|
outputChannels: keyof Cc | Array<keyof Cc>;
|
|
48
|
-
configKeys?: string[];
|
|
49
48
|
autoValidate: boolean;
|
|
50
49
|
streamMode: StreamMode[];
|
|
51
50
|
streamChannels?: keyof Cc | Array<keyof Cc>;
|
package/dist/pregel/index.js
CHANGED
|
@@ -109,12 +109,6 @@ export class Pregel extends Runnable {
|
|
|
109
109
|
writable: true,
|
|
110
110
|
value: void 0
|
|
111
111
|
});
|
|
112
|
-
Object.defineProperty(this, "configKeys", {
|
|
113
|
-
enumerable: true,
|
|
114
|
-
configurable: true,
|
|
115
|
-
writable: true,
|
|
116
|
-
value: void 0
|
|
117
|
-
});
|
|
118
112
|
Object.defineProperty(this, "autoValidate", {
|
|
119
113
|
enumerable: true,
|
|
120
114
|
configurable: true,
|
|
@@ -185,7 +179,6 @@ export class Pregel extends Runnable {
|
|
|
185
179
|
this.streamMode = streamMode ?? this.streamMode;
|
|
186
180
|
this.inputChannels = fields.inputChannels;
|
|
187
181
|
this.outputChannels = fields.outputChannels;
|
|
188
|
-
this.configKeys = fields.configKeys;
|
|
189
182
|
this.streamChannels = fields.streamChannels ?? this.streamChannels;
|
|
190
183
|
this.interruptAfter = fields.interruptAfter;
|
|
191
184
|
this.interruptBefore = fields.interruptBefore;
|
|
@@ -352,7 +345,8 @@ export class Pregel extends Runnable {
|
|
|
352
345
|
}
|
|
353
346
|
// update channels
|
|
354
347
|
const channels = emptyChannels(this.channels, checkpoint);
|
|
355
|
-
|
|
348
|
+
// Pass `skipManaged: true` as managed values are not used/relevant in update state calls.
|
|
349
|
+
const { managed } = await this.prepareSpecs(config, { skipManaged: true });
|
|
356
350
|
// run all writers of the chosen node
|
|
357
351
|
const writers = this.nodes[asNode].getWriters();
|
|
358
352
|
if (!writers.length) {
|
|
@@ -430,12 +424,6 @@ export class Pregel extends Runnable {
|
|
|
430
424
|
else {
|
|
431
425
|
defaultCheckpointer = this.checkpointer;
|
|
432
426
|
}
|
|
433
|
-
if (this.configKeys !== undefined) {
|
|
434
|
-
const newConfigurable = Object.fromEntries(Object.entries(rest.configurable ?? {}).filter(([key]) => {
|
|
435
|
-
return this.configKeys?.includes(key);
|
|
436
|
-
}));
|
|
437
|
-
rest.configurable = newConfigurable;
|
|
438
|
-
}
|
|
439
427
|
return [
|
|
440
428
|
defaultDebug,
|
|
441
429
|
defaultStreamMode,
|
package/dist/pregel/types.d.ts
CHANGED
|
@@ -26,7 +26,6 @@ export interface PregelInterface<Nn extends StrRecord<string, PregelNode>, Cc ex
|
|
|
26
26
|
streamMode?: StreamMode | StreamMode[];
|
|
27
27
|
inputChannels: keyof Cc | Array<keyof Cc>;
|
|
28
28
|
outputChannels: keyof Cc | Array<keyof Cc>;
|
|
29
|
-
configKeys?: string[];
|
|
30
29
|
/**
|
|
31
30
|
* @default []
|
|
32
31
|
*/
|