@linnlabs/linnkit 0.31.0 → 0.31.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.
@@ -7769,7 +7769,33 @@ var TOOL_CONTEXT_RUNTIME_RESERVED_KEYS = [
7769
7769
  "parentToolCallId",
7770
7770
  "modelInputAdmission"
7771
7771
  ];
7772
- var runtimeBindings = /* @__PURE__ */ new WeakMap();
7772
+ var TOOL_CONTEXT_RUNTIME_BINDINGS_KEY = /* @__PURE__ */ Symbol.for(
7773
+ "@linnlabs/linnkit/tool-context-runtime-bindings/v1"
7774
+ );
7775
+ function isRuntimeBindingRegistry(value) {
7776
+ return value instanceof WeakMap;
7777
+ }
7778
+ function resolveRuntimeBindingRegistry() {
7779
+ const existing = Reflect.get(globalThis, TOOL_CONTEXT_RUNTIME_BINDINGS_KEY);
7780
+ if (existing !== void 0) {
7781
+ if (!isRuntimeBindingRegistry(existing)) {
7782
+ throw new Error("Linnkit ToolContext runtime binding registry has an incompatible owner.");
7783
+ }
7784
+ return existing;
7785
+ }
7786
+ const registry = /* @__PURE__ */ new WeakMap();
7787
+ const installed = Reflect.defineProperty(globalThis, TOOL_CONTEXT_RUNTIME_BINDINGS_KEY, {
7788
+ value: registry,
7789
+ configurable: false,
7790
+ enumerable: false,
7791
+ writable: false
7792
+ });
7793
+ if (!installed) {
7794
+ throw new Error("Cannot install Linnkit ToolContext runtime binding registry.");
7795
+ }
7796
+ return registry;
7797
+ }
7798
+ var runtimeBindings = resolveRuntimeBindingRegistry();
7773
7799
  function toEventSource(source) {
7774
7800
  if (typeof source === "function") {
7775
7801
  return source;