@langchain/langgraph-sdk 1.9.12 → 1.9.14

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 +1 @@
1
- {"version":3,"file":"hitl-interrupt-payload.cjs","names":[],"sources":["../../src/ui/hitl-interrupt-payload.ts"],"sourcesContent":["/**\n * Human-in-the-loop interrupt values from the LangGraph API may use\n * snake_case (Python server) while JS clients and LangChain types expect\n * camelCase. Normalize known HITL fields on interrupt payloads at read time.\n */\n\n/**\n * Copy a plain object and expose both casing styles for a field.\n *\n * camelCase is treated as canonical when both keys are present so newer\n * consumers keep the current behavior while legacy snake_case access still\n * resolves to the same value.\n */\nfunction aliasCasePair(item: unknown, camel: string, snake: string): unknown {\n if (item === null || typeof item !== \"object\" || Array.isArray(item)) {\n return item;\n }\n const o = item as Record<string, unknown>;\n const merged = o[camel] ?? o[snake];\n const next: Record<string, unknown> = { ...o };\n if (merged !== undefined) {\n next[camel] = merged;\n next[snake] = merged;\n }\n return next;\n}\n\nfunction mapArrayAlias(raw: unknown, camel: string, snake: string): unknown {\n if (!Array.isArray(raw)) return raw;\n return raw.map((item) => aliasCasePair(item, camel, snake));\n}\n\n/**\n * If `value` looks like a HITL request object, expose both the new camelCase\n * keys and the deprecated snake_case aliases so older apps keep working while\n * migrating to the new shape.\n */\nexport function normalizeHitlInterruptPayload(value: unknown): unknown {\n if (value === null || typeof value !== \"object\") {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map((v) => normalizeHitlInterruptPayload(v));\n }\n const obj = value as Record<string, unknown>;\n const isHitlLike =\n \"action_requests\" in obj ||\n \"actionRequests\" in obj ||\n \"review_configs\" in obj ||\n \"reviewConfigs\" in obj;\n if (!isHitlLike) {\n return value;\n }\n\n const next: Record<string, unknown> = { ...obj };\n\n const actionRequestsRaw = obj.actionRequests ?? obj.action_requests;\n if (actionRequestsRaw !== undefined) {\n const actionRequests = mapArrayAlias(\n actionRequestsRaw,\n \"name\",\n \"action_name\"\n );\n next.actionRequests = actionRequests;\n next.action_requests = actionRequests;\n }\n const reviewConfigsRaw = obj.reviewConfigs ?? obj.review_configs;\n if (reviewConfigsRaw !== undefined) {\n const reviewConfigs = mapArrayAlias(\n reviewConfigsRaw,\n \"allowedDecisions\",\n \"allowed_decisions\"\n );\n next.reviewConfigs = reviewConfigs;\n next.review_configs = reviewConfigs;\n }\n return next;\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,cAAc,MAAe,OAAe,OAAwB;AAC3E,KAAI,SAAS,QAAQ,OAAO,SAAS,YAAY,MAAM,QAAQ,KAAK,CAClE,QAAO;CAET,MAAM,IAAI;CACV,MAAM,SAAS,EAAE,UAAU,EAAE;CAC7B,MAAM,OAAgC,EAAE,GAAG,GAAG;AAC9C,KAAI,WAAW,KAAA,GAAW;AACxB,OAAK,SAAS;AACd,OAAK,SAAS;;AAEhB,QAAO;;AAGT,SAAS,cAAc,KAAc,OAAe,OAAwB;AAC1E,KAAI,CAAC,MAAM,QAAQ,IAAI,CAAE,QAAO;AAChC,QAAO,IAAI,KAAK,SAAS,cAAc,MAAM,OAAO,MAAM,CAAC;;;;;;;AAQ7D,SAAgB,8BAA8B,OAAyB;AACrE,KAAI,UAAU,QAAQ,OAAO,UAAU,SACrC,QAAO;AAET,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,MAAM,KAAK,MAAM,8BAA8B,EAAE,CAAC;CAE3D,MAAM,MAAM;AAMZ,KAAI,EAJF,qBAAqB,OACrB,oBAAoB,OACpB,oBAAoB,OACpB,mBAAmB,KAEnB,QAAO;CAGT,MAAM,OAAgC,EAAE,GAAG,KAAK;CAEhD,MAAM,oBAAoB,IAAI,kBAAkB,IAAI;AACpD,KAAI,sBAAsB,KAAA,GAAW;EACnC,MAAM,iBAAiB,cACrB,mBACA,QACA,cACD;AACD,OAAK,iBAAiB;AACtB,OAAK,kBAAkB;;CAEzB,MAAM,mBAAmB,IAAI,iBAAiB,IAAI;AAClD,KAAI,qBAAqB,KAAA,GAAW;EAClC,MAAM,gBAAgB,cACpB,kBACA,oBACA,oBACD;AACD,OAAK,gBAAgB;AACrB,OAAK,iBAAiB;;AAExB,QAAO"}
1
+ {"version":3,"file":"hitl-interrupt-payload.cjs","names":[],"sources":["../../src/ui/hitl-interrupt-payload.ts"],"sourcesContent":["/**\n * Human-in-the-loop interrupt values from the LangGraph API may use\n * snake_case (Python server) while JS clients and LangChain types expect\n * camelCase. Normalize known HITL fields on interrupt payloads at read time.\n */\n\n/**\n * Copy a plain object and expose both casing styles for a field.\n *\n * camelCase is treated as canonical when both keys are present so newer\n * consumers keep the current behavior while legacy snake_case access still\n * resolves to the same value.\n */\nfunction aliasCasePair(item: unknown, camel: string, snake: string): unknown {\n if (item === null || typeof item !== \"object\" || Array.isArray(item)) {\n return item;\n }\n const o = item as Record<string, unknown>;\n const merged = o[camel] ?? o[snake];\n const next: Record<string, unknown> = { ...o };\n if (merged !== undefined) {\n next[camel] = merged;\n next[snake] = merged;\n }\n return next;\n}\n\nfunction mapArrayAlias(raw: unknown, camel: string, snake: string): unknown {\n if (!Array.isArray(raw)) return raw;\n return raw.map((item) => aliasCasePair(item, camel, snake));\n}\n\n/**\n * If `value` looks like a HITL request object, expose both the new camelCase\n * keys and the deprecated snake_case aliases so older apps keep working while\n * migrating to the new shape.\n */\nexport function normalizeHitlInterruptPayload(value: unknown): unknown {\n if (value === null || typeof value !== \"object\") {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map((v) => normalizeHitlInterruptPayload(v));\n }\n const obj = value as Record<string, unknown>;\n const isHitlLike =\n \"action_requests\" in obj ||\n \"actionRequests\" in obj ||\n \"review_configs\" in obj ||\n \"reviewConfigs\" in obj;\n if (!isHitlLike) {\n return value;\n }\n\n const next: Record<string, unknown> = { ...obj };\n\n const actionRequestsRaw = obj.actionRequests ?? obj.action_requests;\n if (actionRequestsRaw !== undefined) {\n const actionRequests = mapArrayAlias(\n actionRequestsRaw,\n \"name\",\n \"action_name\"\n );\n next.actionRequests = actionRequests;\n next.action_requests = actionRequests;\n }\n const reviewConfigsRaw = obj.reviewConfigs ?? obj.review_configs;\n if (reviewConfigsRaw !== undefined) {\n const reviewConfigs = mapArrayAlias(\n reviewConfigsRaw,\n \"allowedDecisions\",\n \"allowed_decisions\"\n );\n next.reviewConfigs = reviewConfigs;\n next.review_configs = reviewConfigs;\n }\n return next;\n}\n\nfunction normalizeDecisionForServer(decision: unknown): unknown {\n if (\n decision === null ||\n typeof decision !== \"object\" ||\n Array.isArray(decision)\n ) {\n return decision;\n }\n const obj = decision as Record<string, unknown>;\n if (obj.type !== \"edit\") {\n return decision;\n }\n const edited = obj.editedAction ?? obj.edited_action;\n if (edited === undefined) {\n return decision;\n }\n return {\n ...obj,\n editedAction: edited,\n edited_action: edited,\n };\n}\n\n/**\n * If `value` looks like a HITL resume payload from a JS client, expose both\n * camelCase and snake_case decision fields so Python and JS runtimes accept it.\n */\nexport function normalizeHitlResponseForServer(value: unknown): unknown {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n return value;\n }\n const obj = value as Record<string, unknown>;\n const decisions = obj.decisions;\n if (!Array.isArray(decisions)) {\n return value;\n }\n return {\n ...obj,\n decisions: decisions.map(normalizeDecisionForServer),\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,cAAc,MAAe,OAAe,OAAwB;AAC3E,KAAI,SAAS,QAAQ,OAAO,SAAS,YAAY,MAAM,QAAQ,KAAK,CAClE,QAAO;CAET,MAAM,IAAI;CACV,MAAM,SAAS,EAAE,UAAU,EAAE;CAC7B,MAAM,OAAgC,EAAE,GAAG,GAAG;AAC9C,KAAI,WAAW,KAAA,GAAW;AACxB,OAAK,SAAS;AACd,OAAK,SAAS;;AAEhB,QAAO;;AAGT,SAAS,cAAc,KAAc,OAAe,OAAwB;AAC1E,KAAI,CAAC,MAAM,QAAQ,IAAI,CAAE,QAAO;AAChC,QAAO,IAAI,KAAK,SAAS,cAAc,MAAM,OAAO,MAAM,CAAC;;;;;;;AAQ7D,SAAgB,8BAA8B,OAAyB;AACrE,KAAI,UAAU,QAAQ,OAAO,UAAU,SACrC,QAAO;AAET,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,MAAM,KAAK,MAAM,8BAA8B,EAAE,CAAC;CAE3D,MAAM,MAAM;AAMZ,KAAI,EAJF,qBAAqB,OACrB,oBAAoB,OACpB,oBAAoB,OACpB,mBAAmB,KAEnB,QAAO;CAGT,MAAM,OAAgC,EAAE,GAAG,KAAK;CAEhD,MAAM,oBAAoB,IAAI,kBAAkB,IAAI;AACpD,KAAI,sBAAsB,KAAA,GAAW;EACnC,MAAM,iBAAiB,cACrB,mBACA,QACA,cACD;AACD,OAAK,iBAAiB;AACtB,OAAK,kBAAkB;;CAEzB,MAAM,mBAAmB,IAAI,iBAAiB,IAAI;AAClD,KAAI,qBAAqB,KAAA,GAAW;EAClC,MAAM,gBAAgB,cACpB,kBACA,oBACA,oBACD;AACD,OAAK,gBAAgB;AACrB,OAAK,iBAAiB;;AAExB,QAAO;;AAGT,SAAS,2BAA2B,UAA4B;AAC9D,KACE,aAAa,QACb,OAAO,aAAa,YACpB,MAAM,QAAQ,SAAS,CAEvB,QAAO;CAET,MAAM,MAAM;AACZ,KAAI,IAAI,SAAS,OACf,QAAO;CAET,MAAM,SAAS,IAAI,gBAAgB,IAAI;AACvC,KAAI,WAAW,KAAA,EACb,QAAO;AAET,QAAO;EACL,GAAG;EACH,cAAc;EACd,eAAe;EAChB;;;;;;AAOH,SAAgB,+BAA+B,OAAyB;AACtE,KAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,MAAM,CACrE,QAAO;CAET,MAAM,MAAM;CACZ,MAAM,YAAY,IAAI;AACtB,KAAI,CAAC,MAAM,QAAQ,UAAU,CAC3B,QAAO;AAET,QAAO;EACL,GAAG;EACH,WAAW,UAAU,IAAI,2BAA2B;EACrD"}
@@ -10,6 +10,11 @@
10
10
  * migrating to the new shape.
11
11
  */
12
12
  declare function normalizeHitlInterruptPayload(value: unknown): unknown;
13
+ /**
14
+ * If `value` looks like a HITL resume payload from a JS client, expose both
15
+ * camelCase and snake_case decision fields so Python and JS runtimes accept it.
16
+ */
17
+ declare function normalizeHitlResponseForServer(value: unknown): unknown;
13
18
  //#endregion
14
- export { normalizeHitlInterruptPayload };
19
+ export { normalizeHitlInterruptPayload, normalizeHitlResponseForServer };
15
20
  //# sourceMappingURL=hitl-interrupt-payload.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hitl-interrupt-payload.d.cts","names":[],"sources":["../../src/ui/hitl-interrupt-payload.ts"],"mappings":";;AAqCA;;;;;;;;;iBAAgB,6BAAA,CAA8B,KAAA"}
1
+ {"version":3,"file":"hitl-interrupt-payload.d.cts","names":[],"sources":["../../src/ui/hitl-interrupt-payload.ts"],"mappings":";;AAqCA;;;;;AAqEA;;;;iBArEgB,6BAAA,CAA8B,KAAA;;;;;iBAqE9B,8BAAA,CAA+B,KAAA"}
@@ -10,6 +10,11 @@
10
10
  * migrating to the new shape.
11
11
  */
12
12
  declare function normalizeHitlInterruptPayload(value: unknown): unknown;
13
+ /**
14
+ * If `value` looks like a HITL resume payload from a JS client, expose both
15
+ * camelCase and snake_case decision fields so Python and JS runtimes accept it.
16
+ */
17
+ declare function normalizeHitlResponseForServer(value: unknown): unknown;
13
18
  //#endregion
14
- export { normalizeHitlInterruptPayload };
19
+ export { normalizeHitlInterruptPayload, normalizeHitlResponseForServer };
15
20
  //# sourceMappingURL=hitl-interrupt-payload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hitl-interrupt-payload.d.ts","names":[],"sources":["../../src/ui/hitl-interrupt-payload.ts"],"mappings":";;AAqCA;;;;;;;;;iBAAgB,6BAAA,CAA8B,KAAA"}
1
+ {"version":3,"file":"hitl-interrupt-payload.d.ts","names":[],"sources":["../../src/ui/hitl-interrupt-payload.ts"],"mappings":";;AAqCA;;;;;AAqEA;;;;iBArEgB,6BAAA,CAA8B,KAAA;;;;;iBAqE9B,8BAAA,CAA+B,KAAA"}
@@ -51,7 +51,33 @@ function normalizeHitlInterruptPayload(value) {
51
51
  }
52
52
  return next;
53
53
  }
54
+ function normalizeDecisionForServer(decision) {
55
+ if (decision === null || typeof decision !== "object" || Array.isArray(decision)) return decision;
56
+ const obj = decision;
57
+ if (obj.type !== "edit") return decision;
58
+ const edited = obj.editedAction ?? obj.edited_action;
59
+ if (edited === void 0) return decision;
60
+ return {
61
+ ...obj,
62
+ editedAction: edited,
63
+ edited_action: edited
64
+ };
65
+ }
66
+ /**
67
+ * If `value` looks like a HITL resume payload from a JS client, expose both
68
+ * camelCase and snake_case decision fields so Python and JS runtimes accept it.
69
+ */
70
+ function normalizeHitlResponseForServer(value) {
71
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
72
+ const obj = value;
73
+ const decisions = obj.decisions;
74
+ if (!Array.isArray(decisions)) return value;
75
+ return {
76
+ ...obj,
77
+ decisions: decisions.map(normalizeDecisionForServer)
78
+ };
79
+ }
54
80
  //#endregion
55
- export { normalizeHitlInterruptPayload };
81
+ export { normalizeHitlInterruptPayload, normalizeHitlResponseForServer };
56
82
 
57
83
  //# sourceMappingURL=hitl-interrupt-payload.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hitl-interrupt-payload.js","names":[],"sources":["../../src/ui/hitl-interrupt-payload.ts"],"sourcesContent":["/**\n * Human-in-the-loop interrupt values from the LangGraph API may use\n * snake_case (Python server) while JS clients and LangChain types expect\n * camelCase. Normalize known HITL fields on interrupt payloads at read time.\n */\n\n/**\n * Copy a plain object and expose both casing styles for a field.\n *\n * camelCase is treated as canonical when both keys are present so newer\n * consumers keep the current behavior while legacy snake_case access still\n * resolves to the same value.\n */\nfunction aliasCasePair(item: unknown, camel: string, snake: string): unknown {\n if (item === null || typeof item !== \"object\" || Array.isArray(item)) {\n return item;\n }\n const o = item as Record<string, unknown>;\n const merged = o[camel] ?? o[snake];\n const next: Record<string, unknown> = { ...o };\n if (merged !== undefined) {\n next[camel] = merged;\n next[snake] = merged;\n }\n return next;\n}\n\nfunction mapArrayAlias(raw: unknown, camel: string, snake: string): unknown {\n if (!Array.isArray(raw)) return raw;\n return raw.map((item) => aliasCasePair(item, camel, snake));\n}\n\n/**\n * If `value` looks like a HITL request object, expose both the new camelCase\n * keys and the deprecated snake_case aliases so older apps keep working while\n * migrating to the new shape.\n */\nexport function normalizeHitlInterruptPayload(value: unknown): unknown {\n if (value === null || typeof value !== \"object\") {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map((v) => normalizeHitlInterruptPayload(v));\n }\n const obj = value as Record<string, unknown>;\n const isHitlLike =\n \"action_requests\" in obj ||\n \"actionRequests\" in obj ||\n \"review_configs\" in obj ||\n \"reviewConfigs\" in obj;\n if (!isHitlLike) {\n return value;\n }\n\n const next: Record<string, unknown> = { ...obj };\n\n const actionRequestsRaw = obj.actionRequests ?? obj.action_requests;\n if (actionRequestsRaw !== undefined) {\n const actionRequests = mapArrayAlias(\n actionRequestsRaw,\n \"name\",\n \"action_name\"\n );\n next.actionRequests = actionRequests;\n next.action_requests = actionRequests;\n }\n const reviewConfigsRaw = obj.reviewConfigs ?? obj.review_configs;\n if (reviewConfigsRaw !== undefined) {\n const reviewConfigs = mapArrayAlias(\n reviewConfigsRaw,\n \"allowedDecisions\",\n \"allowed_decisions\"\n );\n next.reviewConfigs = reviewConfigs;\n next.review_configs = reviewConfigs;\n }\n return next;\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,cAAc,MAAe,OAAe,OAAwB;AAC3E,KAAI,SAAS,QAAQ,OAAO,SAAS,YAAY,MAAM,QAAQ,KAAK,CAClE,QAAO;CAET,MAAM,IAAI;CACV,MAAM,SAAS,EAAE,UAAU,EAAE;CAC7B,MAAM,OAAgC,EAAE,GAAG,GAAG;AAC9C,KAAI,WAAW,KAAA,GAAW;AACxB,OAAK,SAAS;AACd,OAAK,SAAS;;AAEhB,QAAO;;AAGT,SAAS,cAAc,KAAc,OAAe,OAAwB;AAC1E,KAAI,CAAC,MAAM,QAAQ,IAAI,CAAE,QAAO;AAChC,QAAO,IAAI,KAAK,SAAS,cAAc,MAAM,OAAO,MAAM,CAAC;;;;;;;AAQ7D,SAAgB,8BAA8B,OAAyB;AACrE,KAAI,UAAU,QAAQ,OAAO,UAAU,SACrC,QAAO;AAET,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,MAAM,KAAK,MAAM,8BAA8B,EAAE,CAAC;CAE3D,MAAM,MAAM;AAMZ,KAAI,EAJF,qBAAqB,OACrB,oBAAoB,OACpB,oBAAoB,OACpB,mBAAmB,KAEnB,QAAO;CAGT,MAAM,OAAgC,EAAE,GAAG,KAAK;CAEhD,MAAM,oBAAoB,IAAI,kBAAkB,IAAI;AACpD,KAAI,sBAAsB,KAAA,GAAW;EACnC,MAAM,iBAAiB,cACrB,mBACA,QACA,cACD;AACD,OAAK,iBAAiB;AACtB,OAAK,kBAAkB;;CAEzB,MAAM,mBAAmB,IAAI,iBAAiB,IAAI;AAClD,KAAI,qBAAqB,KAAA,GAAW;EAClC,MAAM,gBAAgB,cACpB,kBACA,oBACA,oBACD;AACD,OAAK,gBAAgB;AACrB,OAAK,iBAAiB;;AAExB,QAAO"}
1
+ {"version":3,"file":"hitl-interrupt-payload.js","names":[],"sources":["../../src/ui/hitl-interrupt-payload.ts"],"sourcesContent":["/**\n * Human-in-the-loop interrupt values from the LangGraph API may use\n * snake_case (Python server) while JS clients and LangChain types expect\n * camelCase. Normalize known HITL fields on interrupt payloads at read time.\n */\n\n/**\n * Copy a plain object and expose both casing styles for a field.\n *\n * camelCase is treated as canonical when both keys are present so newer\n * consumers keep the current behavior while legacy snake_case access still\n * resolves to the same value.\n */\nfunction aliasCasePair(item: unknown, camel: string, snake: string): unknown {\n if (item === null || typeof item !== \"object\" || Array.isArray(item)) {\n return item;\n }\n const o = item as Record<string, unknown>;\n const merged = o[camel] ?? o[snake];\n const next: Record<string, unknown> = { ...o };\n if (merged !== undefined) {\n next[camel] = merged;\n next[snake] = merged;\n }\n return next;\n}\n\nfunction mapArrayAlias(raw: unknown, camel: string, snake: string): unknown {\n if (!Array.isArray(raw)) return raw;\n return raw.map((item) => aliasCasePair(item, camel, snake));\n}\n\n/**\n * If `value` looks like a HITL request object, expose both the new camelCase\n * keys and the deprecated snake_case aliases so older apps keep working while\n * migrating to the new shape.\n */\nexport function normalizeHitlInterruptPayload(value: unknown): unknown {\n if (value === null || typeof value !== \"object\") {\n return value;\n }\n if (Array.isArray(value)) {\n return value.map((v) => normalizeHitlInterruptPayload(v));\n }\n const obj = value as Record<string, unknown>;\n const isHitlLike =\n \"action_requests\" in obj ||\n \"actionRequests\" in obj ||\n \"review_configs\" in obj ||\n \"reviewConfigs\" in obj;\n if (!isHitlLike) {\n return value;\n }\n\n const next: Record<string, unknown> = { ...obj };\n\n const actionRequestsRaw = obj.actionRequests ?? obj.action_requests;\n if (actionRequestsRaw !== undefined) {\n const actionRequests = mapArrayAlias(\n actionRequestsRaw,\n \"name\",\n \"action_name\"\n );\n next.actionRequests = actionRequests;\n next.action_requests = actionRequests;\n }\n const reviewConfigsRaw = obj.reviewConfigs ?? obj.review_configs;\n if (reviewConfigsRaw !== undefined) {\n const reviewConfigs = mapArrayAlias(\n reviewConfigsRaw,\n \"allowedDecisions\",\n \"allowed_decisions\"\n );\n next.reviewConfigs = reviewConfigs;\n next.review_configs = reviewConfigs;\n }\n return next;\n}\n\nfunction normalizeDecisionForServer(decision: unknown): unknown {\n if (\n decision === null ||\n typeof decision !== \"object\" ||\n Array.isArray(decision)\n ) {\n return decision;\n }\n const obj = decision as Record<string, unknown>;\n if (obj.type !== \"edit\") {\n return decision;\n }\n const edited = obj.editedAction ?? obj.edited_action;\n if (edited === undefined) {\n return decision;\n }\n return {\n ...obj,\n editedAction: edited,\n edited_action: edited,\n };\n}\n\n/**\n * If `value` looks like a HITL resume payload from a JS client, expose both\n * camelCase and snake_case decision fields so Python and JS runtimes accept it.\n */\nexport function normalizeHitlResponseForServer(value: unknown): unknown {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n return value;\n }\n const obj = value as Record<string, unknown>;\n const decisions = obj.decisions;\n if (!Array.isArray(decisions)) {\n return value;\n }\n return {\n ...obj,\n decisions: decisions.map(normalizeDecisionForServer),\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAaA,SAAS,cAAc,MAAe,OAAe,OAAwB;AAC3E,KAAI,SAAS,QAAQ,OAAO,SAAS,YAAY,MAAM,QAAQ,KAAK,CAClE,QAAO;CAET,MAAM,IAAI;CACV,MAAM,SAAS,EAAE,UAAU,EAAE;CAC7B,MAAM,OAAgC,EAAE,GAAG,GAAG;AAC9C,KAAI,WAAW,KAAA,GAAW;AACxB,OAAK,SAAS;AACd,OAAK,SAAS;;AAEhB,QAAO;;AAGT,SAAS,cAAc,KAAc,OAAe,OAAwB;AAC1E,KAAI,CAAC,MAAM,QAAQ,IAAI,CAAE,QAAO;AAChC,QAAO,IAAI,KAAK,SAAS,cAAc,MAAM,OAAO,MAAM,CAAC;;;;;;;AAQ7D,SAAgB,8BAA8B,OAAyB;AACrE,KAAI,UAAU,QAAQ,OAAO,UAAU,SACrC,QAAO;AAET,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,MAAM,KAAK,MAAM,8BAA8B,EAAE,CAAC;CAE3D,MAAM,MAAM;AAMZ,KAAI,EAJF,qBAAqB,OACrB,oBAAoB,OACpB,oBAAoB,OACpB,mBAAmB,KAEnB,QAAO;CAGT,MAAM,OAAgC,EAAE,GAAG,KAAK;CAEhD,MAAM,oBAAoB,IAAI,kBAAkB,IAAI;AACpD,KAAI,sBAAsB,KAAA,GAAW;EACnC,MAAM,iBAAiB,cACrB,mBACA,QACA,cACD;AACD,OAAK,iBAAiB;AACtB,OAAK,kBAAkB;;CAEzB,MAAM,mBAAmB,IAAI,iBAAiB,IAAI;AAClD,KAAI,qBAAqB,KAAA,GAAW;EAClC,MAAM,gBAAgB,cACpB,kBACA,oBACA,oBACD;AACD,OAAK,gBAAgB;AACrB,OAAK,iBAAiB;;AAExB,QAAO;;AAGT,SAAS,2BAA2B,UAA4B;AAC9D,KACE,aAAa,QACb,OAAO,aAAa,YACpB,MAAM,QAAQ,SAAS,CAEvB,QAAO;CAET,MAAM,MAAM;AACZ,KAAI,IAAI,SAAS,OACf,QAAO;CAET,MAAM,SAAS,IAAI,gBAAgB,IAAI;AACvC,KAAI,WAAW,KAAA,EACb,QAAO;AAET,QAAO;EACL,GAAG;EACH,cAAc;EACd,eAAe;EAChB;;;;;;AAOH,SAAgB,+BAA+B,OAAyB;AACtE,KAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,MAAM,CACrE,QAAO;CAET,MAAM,MAAM;CACZ,MAAM,YAAY,IAAI;AACtB,KAAI,CAAC,MAAM,QAAQ,UAAU,CAC3B,QAAO;AAET,QAAO;EACL,GAAG;EACH,WAAW,UAAU,IAAI,2BAA2B;EACrD"}
package/dist/ui/index.cjs CHANGED
@@ -31,6 +31,7 @@ exports.getBranchContext = require_branching.getBranchContext;
31
31
  exports.getMessagesMetadataMap = require_branching.getMessagesMetadataMap;
32
32
  exports.isSubagentNamespace = require_subagents.isSubagentNamespace;
33
33
  exports.normalizeHitlInterruptPayload = require_hitl_interrupt_payload.normalizeHitlInterruptPayload;
34
+ exports.normalizeHitlResponseForServer = require_hitl_interrupt_payload.normalizeHitlResponseForServer;
34
35
  exports.normalizeInterruptForClient = require_interrupts.normalizeInterruptForClient;
35
36
  exports.normalizeInterruptsList = require_interrupts.normalizeInterruptsList;
36
37
  exports.onFinishRequiresThreadState = require_utils.onFinishRequiresThreadState;
@@ -11,9 +11,9 @@ import { SubagentManager, calculateDepthFromNamespace, extractParentIdFromNamesp
11
11
  import { ClassSubagentStreamInterface, ClassToolCallWithResult, WithClassMessages } from "./class-messages.cjs";
12
12
  import { EventStreamEvent, StreamManager } from "./manager.cjs";
13
13
  import { extractInterrupts, normalizeInterruptForClient, normalizeInterruptsList, userFacingInterruptsFromThreadTasks, userFacingInterruptsFromValuesArray } from "./interrupts.cjs";
14
- import { normalizeHitlInterruptPayload } from "./hitl-interrupt-payload.cjs";
14
+ import { normalizeHitlInterruptPayload, normalizeHitlResponseForServer } from "./hitl-interrupt-payload.cjs";
15
15
  import { FetchStreamTransport } from "./transport.cjs";
16
16
  import { filterStream, findLast, onFinishRequiresThreadState, unique } from "./utils.cjs";
17
17
  import { OrchestratorAccessors, StreamOrchestrator } from "./orchestrator.cjs";
18
18
  import { CustomStreamOrchestrator } from "./orchestrator-custom.cjs";
19
- export { AcceptBaseMessages, AgentMiddlewareLike, AgentTypeConfigLike, AnyStreamCustomOptions, AnyStreamOptions, BaseStream, BaseSubagentState, type ClassSubagentStreamInterface, type ClassToolCallWithResult, CompiledSubAgentLike, CustomStreamOrchestrator, CustomSubmitOptions, DeepAgentTypeConfigLike, DefaultSubagentStates, type EventStreamEvent, ExtractAgentConfig, ExtractDeepAgentConfig, ExtractSubAgentMiddleware, ExtractToolCallsFromState, FetchStreamTransport, GetConfigurableType, GetCustomEventType, GetInterruptType, GetToolCallsType, GetUpdateType, type HistoryWithBaseMessages, InferAgentState, InferAgentToolCalls, InferBag, InferDeepAgentSubagents, InferMiddlewareStatesFromArray, InferNodeNames, InferNodeReturnTypes, InferStateType, InferSubagentByName, InferSubagentNames, InferSubagentState, InferSubagentStates, InferToolCalls, IsAgentLike, IsDeepAgentLike, MessageMetadata, MessageTupleManager, type OrchestratorAccessors, PendingRunsTracker, type QueueEntry, type QueueInterface, ResolveStreamInterface, ResolveStreamOptions, RunCallbackMeta, type Sequence, StateRecord, StreamBase, StreamError, StreamManager, StreamOrchestrator, SubAgentLike, SubagentApi, SubagentManager, SubagentStateMap, SubagentStatus, SubagentStream, SubagentStreamInterface, SubagentToolCall, SubmitOptions, UseAgentStream, UseAgentStreamOptions, UseDeepAgentStream, UseDeepAgentStreamOptions, UseStreamCustomOptions, UseStreamOptions, UseStreamThread, UseStreamTransport, UseStreamTransportPayload, type WithClassMessages, calculateDepthFromNamespace, ensureHistoryMessageInstances, ensureMessageInstances, extractInterrupts, extractParentIdFromNamespace, extractToolCallIdFromNamespace, filterStream, findLast, getBranchContext, getMessagesMetadataMap, isSubagentNamespace, normalizeHitlInterruptPayload, normalizeInterruptForClient, normalizeInterruptsList, onFinishRequiresThreadState, toMessageClass, toMessageDict, unique, userFacingInterruptsFromThreadTasks, userFacingInterruptsFromValuesArray };
19
+ export { AcceptBaseMessages, AgentMiddlewareLike, AgentTypeConfigLike, AnyStreamCustomOptions, AnyStreamOptions, BaseStream, BaseSubagentState, type ClassSubagentStreamInterface, type ClassToolCallWithResult, CompiledSubAgentLike, CustomStreamOrchestrator, CustomSubmitOptions, DeepAgentTypeConfigLike, DefaultSubagentStates, type EventStreamEvent, ExtractAgentConfig, ExtractDeepAgentConfig, ExtractSubAgentMiddleware, ExtractToolCallsFromState, FetchStreamTransport, GetConfigurableType, GetCustomEventType, GetInterruptType, GetToolCallsType, GetUpdateType, type HistoryWithBaseMessages, InferAgentState, InferAgentToolCalls, InferBag, InferDeepAgentSubagents, InferMiddlewareStatesFromArray, InferNodeNames, InferNodeReturnTypes, InferStateType, InferSubagentByName, InferSubagentNames, InferSubagentState, InferSubagentStates, InferToolCalls, IsAgentLike, IsDeepAgentLike, MessageMetadata, MessageTupleManager, type OrchestratorAccessors, PendingRunsTracker, type QueueEntry, type QueueInterface, ResolveStreamInterface, ResolveStreamOptions, RunCallbackMeta, type Sequence, StateRecord, StreamBase, StreamError, StreamManager, StreamOrchestrator, SubAgentLike, SubagentApi, SubagentManager, SubagentStateMap, SubagentStatus, SubagentStream, SubagentStreamInterface, SubagentToolCall, SubmitOptions, UseAgentStream, UseAgentStreamOptions, UseDeepAgentStream, UseDeepAgentStreamOptions, UseStreamCustomOptions, UseStreamOptions, UseStreamThread, UseStreamTransport, UseStreamTransportPayload, type WithClassMessages, calculateDepthFromNamespace, ensureHistoryMessageInstances, ensureMessageInstances, extractInterrupts, extractParentIdFromNamespace, extractToolCallIdFromNamespace, filterStream, findLast, getBranchContext, getMessagesMetadataMap, isSubagentNamespace, normalizeHitlInterruptPayload, normalizeHitlResponseForServer, normalizeInterruptForClient, normalizeInterruptsList, onFinishRequiresThreadState, toMessageClass, toMessageDict, unique, userFacingInterruptsFromThreadTasks, userFacingInterruptsFromValuesArray };
@@ -11,9 +11,9 @@ import { SubagentManager, calculateDepthFromNamespace, extractParentIdFromNamesp
11
11
  import { ClassSubagentStreamInterface, ClassToolCallWithResult, WithClassMessages } from "./class-messages.js";
12
12
  import { EventStreamEvent, StreamManager } from "./manager.js";
13
13
  import { extractInterrupts, normalizeInterruptForClient, normalizeInterruptsList, userFacingInterruptsFromThreadTasks, userFacingInterruptsFromValuesArray } from "./interrupts.js";
14
- import { normalizeHitlInterruptPayload } from "./hitl-interrupt-payload.js";
14
+ import { normalizeHitlInterruptPayload, normalizeHitlResponseForServer } from "./hitl-interrupt-payload.js";
15
15
  import { FetchStreamTransport } from "./transport.js";
16
16
  import { filterStream, findLast, onFinishRequiresThreadState, unique } from "./utils.js";
17
17
  import { OrchestratorAccessors, StreamOrchestrator } from "./orchestrator.js";
18
18
  import { CustomStreamOrchestrator } from "./orchestrator-custom.js";
19
- export { AcceptBaseMessages, AgentMiddlewareLike, AgentTypeConfigLike, AnyStreamCustomOptions, AnyStreamOptions, BaseStream, BaseSubagentState, type ClassSubagentStreamInterface, type ClassToolCallWithResult, CompiledSubAgentLike, CustomStreamOrchestrator, CustomSubmitOptions, DeepAgentTypeConfigLike, DefaultSubagentStates, type EventStreamEvent, ExtractAgentConfig, ExtractDeepAgentConfig, ExtractSubAgentMiddleware, ExtractToolCallsFromState, FetchStreamTransport, GetConfigurableType, GetCustomEventType, GetInterruptType, GetToolCallsType, GetUpdateType, type HistoryWithBaseMessages, InferAgentState, InferAgentToolCalls, InferBag, InferDeepAgentSubagents, InferMiddlewareStatesFromArray, InferNodeNames, InferNodeReturnTypes, InferStateType, InferSubagentByName, InferSubagentNames, InferSubagentState, InferSubagentStates, InferToolCalls, IsAgentLike, IsDeepAgentLike, MessageMetadata, MessageTupleManager, type OrchestratorAccessors, PendingRunsTracker, type QueueEntry, type QueueInterface, ResolveStreamInterface, ResolveStreamOptions, RunCallbackMeta, type Sequence, StateRecord, StreamBase, StreamError, StreamManager, StreamOrchestrator, SubAgentLike, SubagentApi, SubagentManager, SubagentStateMap, SubagentStatus, SubagentStream, SubagentStreamInterface, SubagentToolCall, SubmitOptions, UseAgentStream, UseAgentStreamOptions, UseDeepAgentStream, UseDeepAgentStreamOptions, UseStreamCustomOptions, UseStreamOptions, UseStreamThread, UseStreamTransport, UseStreamTransportPayload, type WithClassMessages, calculateDepthFromNamespace, ensureHistoryMessageInstances, ensureMessageInstances, extractInterrupts, extractParentIdFromNamespace, extractToolCallIdFromNamespace, filterStream, findLast, getBranchContext, getMessagesMetadataMap, isSubagentNamespace, normalizeHitlInterruptPayload, normalizeInterruptForClient, normalizeInterruptsList, onFinishRequiresThreadState, toMessageClass, toMessageDict, unique, userFacingInterruptsFromThreadTasks, userFacingInterruptsFromValuesArray };
19
+ export { AcceptBaseMessages, AgentMiddlewareLike, AgentTypeConfigLike, AnyStreamCustomOptions, AnyStreamOptions, BaseStream, BaseSubagentState, type ClassSubagentStreamInterface, type ClassToolCallWithResult, CompiledSubAgentLike, CustomStreamOrchestrator, CustomSubmitOptions, DeepAgentTypeConfigLike, DefaultSubagentStates, type EventStreamEvent, ExtractAgentConfig, ExtractDeepAgentConfig, ExtractSubAgentMiddleware, ExtractToolCallsFromState, FetchStreamTransport, GetConfigurableType, GetCustomEventType, GetInterruptType, GetToolCallsType, GetUpdateType, type HistoryWithBaseMessages, InferAgentState, InferAgentToolCalls, InferBag, InferDeepAgentSubagents, InferMiddlewareStatesFromArray, InferNodeNames, InferNodeReturnTypes, InferStateType, InferSubagentByName, InferSubagentNames, InferSubagentState, InferSubagentStates, InferToolCalls, IsAgentLike, IsDeepAgentLike, MessageMetadata, MessageTupleManager, type OrchestratorAccessors, PendingRunsTracker, type QueueEntry, type QueueInterface, ResolveStreamInterface, ResolveStreamOptions, RunCallbackMeta, type Sequence, StateRecord, StreamBase, StreamError, StreamManager, StreamOrchestrator, SubAgentLike, SubagentApi, SubagentManager, SubagentStateMap, SubagentStatus, SubagentStream, SubagentStreamInterface, SubagentToolCall, SubmitOptions, UseAgentStream, UseAgentStreamOptions, UseDeepAgentStream, UseDeepAgentStreamOptions, UseStreamCustomOptions, UseStreamOptions, UseStreamThread, UseStreamTransport, UseStreamTransportPayload, type WithClassMessages, calculateDepthFromNamespace, ensureHistoryMessageInstances, ensureMessageInstances, extractInterrupts, extractParentIdFromNamespace, extractToolCallIdFromNamespace, filterStream, findLast, getBranchContext, getMessagesMetadataMap, isSubagentNamespace, normalizeHitlInterruptPayload, normalizeHitlResponseForServer, normalizeInterruptForClient, normalizeInterruptsList, onFinishRequiresThreadState, toMessageClass, toMessageDict, unique, userFacingInterruptsFromThreadTasks, userFacingInterruptsFromValuesArray };
package/dist/ui/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MessageTupleManager, ensureHistoryMessageInstances, ensureMessageInstances, toMessageClass, toMessageDict } from "./messages.js";
2
- import { normalizeHitlInterruptPayload } from "./hitl-interrupt-payload.js";
2
+ import { normalizeHitlInterruptPayload, normalizeHitlResponseForServer } from "./hitl-interrupt-payload.js";
3
3
  import { extractInterrupts, normalizeInterruptForClient, normalizeInterruptsList, userFacingInterruptsFromThreadTasks, userFacingInterruptsFromValuesArray } from "./interrupts.js";
4
4
  import { StreamError } from "./errors.js";
5
5
  import { SubagentManager, calculateDepthFromNamespace, extractParentIdFromNamespace, extractToolCallIdFromNamespace, isSubagentNamespace } from "./subagents.js";
@@ -10,4 +10,4 @@ import { FetchStreamTransport } from "./transport.js";
10
10
  import { PendingRunsTracker } from "./queue.js";
11
11
  import { StreamOrchestrator } from "./orchestrator.js";
12
12
  import { CustomStreamOrchestrator } from "./orchestrator-custom.js";
13
- export { CustomStreamOrchestrator, FetchStreamTransport, MessageTupleManager, PendingRunsTracker, StreamError, StreamManager, StreamOrchestrator, SubagentManager, calculateDepthFromNamespace, ensureHistoryMessageInstances, ensureMessageInstances, extractInterrupts, extractParentIdFromNamespace, extractToolCallIdFromNamespace, filterStream, findLast, getBranchContext, getMessagesMetadataMap, isSubagentNamespace, normalizeHitlInterruptPayload, normalizeInterruptForClient, normalizeInterruptsList, onFinishRequiresThreadState, toMessageClass, toMessageDict, unique, userFacingInterruptsFromThreadTasks, userFacingInterruptsFromValuesArray };
13
+ export { CustomStreamOrchestrator, FetchStreamTransport, MessageTupleManager, PendingRunsTracker, StreamError, StreamManager, StreamOrchestrator, SubagentManager, calculateDepthFromNamespace, ensureHistoryMessageInstances, ensureMessageInstances, extractInterrupts, extractParentIdFromNamespace, extractToolCallIdFromNamespace, filterStream, findLast, getBranchContext, getMessagesMetadataMap, isSubagentNamespace, normalizeHitlInterruptPayload, normalizeHitlResponseForServer, normalizeInterruptForClient, normalizeInterruptsList, onFinishRequiresThreadState, toMessageClass, toMessageDict, unique, userFacingInterruptsFromThreadTasks, userFacingInterruptsFromValuesArray };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph-sdk",
3
- "version": "1.9.12",
3
+ "version": "1.9.14",
4
4
  "description": "Client library for interacting with the LangGraph API",
5
5
  "type": "module",
6
6
  "repository": {
@@ -21,17 +21,17 @@
21
21
  "@langchain/scripts": "^0.1.4",
22
22
  "@tsconfig/recommended": "^1.0.2",
23
23
  "@types/node": "^18.15.11",
24
- "@types/react": "^19.2.14",
24
+ "@types/react": "^19.2.16",
25
25
  "@types/react-dom": "^19.2.3",
26
26
  "@types/uuid": "^9.0.1",
27
27
  "deepagents": "^1.8.3",
28
28
  "langchain": "^1.3.5",
29
- "react": "^19.2.4",
30
- "react-dom": "^19.2.4",
31
- "svelte": "^5.55.7",
29
+ "react": "^19.2.7",
30
+ "react-dom": "^19.2.7",
31
+ "svelte": "^5.56.1",
32
32
  "typescript": "^4.9.5 || ^5.4.5",
33
33
  "vitest": "^3.2.4",
34
- "vue": "^3.5.33",
34
+ "vue": "^3.5.35",
35
35
  "zod": "^4.3.5"
36
36
  },
37
37
  "peerDependencies": {