@xbbg/langgraph 1.4.5 → 1.4.9

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/LICENSE CHANGED
@@ -175,7 +175,7 @@
175
175
 
176
176
  END OF TERMS AND CONDITIONS
177
177
 
178
- Copyright 2019 Alpha x1
178
+ Copyright 2019 xbbg contributors
179
179
 
180
180
  Licensed under the Apache License, Version 2.0 (the "License");
181
181
  you may not use this file except in compliance with the License.
package/dist/index.js CHANGED
@@ -1810,14 +1810,28 @@ function createBloombergExtToolsForResolver(resolver) {
1810
1810
  function createBloombergExtTools(options = {}) {
1811
1811
  return createBloombergExtToolsForResolver(createCoreResolver(options));
1812
1812
  }
1813
- var REFERENCE_FORMATS = ["long", "long_typed", "long_metadata"];
1814
- var HISTORICAL_FORMATS = [
1815
- "long",
1816
- "long_typed",
1817
- "long_metadata",
1818
- "semi_long",
1819
- "wide"
1813
+
1814
+ // src/_defs_gen.ts
1815
+ var FORMATS = ["long", "long_typed", "long_metadata", "semi_long"];
1816
+ var FORMAT_BY_NAME = {
1817
+ LONG: "long",
1818
+ LONG_TYPED: "long_typed",
1819
+ LONG_WITH_METADATA: "long_metadata"};
1820
+ var OVERFLOW_POLICIES = ["block", "drop_newest"];
1821
+ var OVERFLOW_POLICY_DEFAULT = "drop_newest";
1822
+ var OVERFLOW_POLICY_VALUES = "block, drop_newest";
1823
+ var OVERFLOW_POLICY_DOCS = {
1824
+ block: "Retry within a short bounded window on Bloomberg's callback thread, then flag a slow consumer and drop the update.",
1825
+ drop_newest: "Drop the newest update as soon as the buffer is full; never stalls Bloomberg's callback thread."
1826
+ };
1827
+
1828
+ // src/schemas.ts
1829
+ var REFERENCE_FORMATS = [
1830
+ FORMAT_BY_NAME.LONG,
1831
+ FORMAT_BY_NAME.LONG_TYPED,
1832
+ FORMAT_BY_NAME.LONG_WITH_METADATA
1820
1833
  ];
1834
+ var HISTORICAL_FORMATS = FORMATS;
1821
1835
  var ISO_DATE_RE = /^\d{4}-\d{2}-\d{2}$/u;
1822
1836
  var BBG_DATE_RE = /^\d{8}$/u;
1823
1837
  var AMBIGUOUS_DATE_RE = /^\d{1,2}[-/]\d{1,2}[-/]\d{2,4}([T \D]|$)/u;
@@ -2046,6 +2060,18 @@ function historicalFormat(tool2) {
2046
2060
  })
2047
2061
  }).optional();
2048
2062
  }
2063
+ function overflowPolicy(tool2) {
2064
+ const semantics = OVERFLOW_POLICIES.map(
2065
+ (policy) => `${policy} - ${OVERFLOW_POLICY_DOCS[policy]}`
2066
+ ).join(" ");
2067
+ return z__namespace.enum(OVERFLOW_POLICIES, {
2068
+ errorMap: () => ({
2069
+ message: `${tool2}: overflowPolicy must be one of ${OVERFLOW_POLICY_VALUES}`
2070
+ })
2071
+ }).optional().describe(
2072
+ `What the stream does when updates arrive faster than they are collected. ${semantics} Omit to use ${OVERFLOW_POLICY_DEFAULT}.`
2073
+ );
2074
+ }
2049
2075
  function createBdpSchema(options) {
2050
2076
  const tool2 = "xbbg_bdp";
2051
2077
  return z__namespace.object({
@@ -2091,7 +2117,7 @@ function createBdhSchema(options) {
2091
2117
  '["<FIELD>"]'
2092
2118
  ).describe("Bloomberg historical field mnemonics supplied by the user."),
2093
2119
  format: historicalFormat(tool2).describe(
2094
- "Historical JSON output shape. Use wide only when the user asks for a table by date."
2120
+ "Historical JSON output shape. Use semi_long only when the user asks for a table by date."
2095
2121
  ),
2096
2122
  kwargs: primitiveMap(tool2, "kwargs").describe(
2097
2123
  "Advanced Bloomberg request kwargs as flat string/number/boolean values only."
@@ -2457,7 +2483,7 @@ function snapshotControlFields(tool2, options) {
2457
2483
  options.maxStringChars,
2458
2484
  '["interval=5"]'
2459
2485
  ).optional().describe("Advanced Bloomberg subscription options."),
2460
- overflowPolicy: nonEmptyString2(tool2, "overflowPolicy", options.maxStringChars, "drop_oldest").optional().describe("Optional stream overflow policy."),
2486
+ overflowPolicy: overflowPolicy(tool2),
2461
2487
  streamCapacity: z__namespace.number().int().positive().optional().describe("Optional stream capacity."),
2462
2488
  timeoutMs: z__namespace.number().int().positive().max(options.maxStreamWaitMs, `${tool2}: timeoutMs can be at most ${options.maxStreamWaitMs}.`).optional().default(options.maxStreamWaitMs).describe("Maximum total wait in milliseconds before unsubscribing.")
2463
2489
  };