@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.
package/dist/index.cjs CHANGED
@@ -8765,7 +8765,33 @@ var TOOL_CONTEXT_RUNTIME_RESERVED_KEYS = [
8765
8765
  "parentToolCallId",
8766
8766
  "modelInputAdmission"
8767
8767
  ];
8768
- var runtimeBindings = /* @__PURE__ */ new WeakMap();
8768
+ var TOOL_CONTEXT_RUNTIME_BINDINGS_KEY = /* @__PURE__ */ Symbol.for(
8769
+ "@linnlabs/linnkit/tool-context-runtime-bindings/v1"
8770
+ );
8771
+ function isRuntimeBindingRegistry(value) {
8772
+ return value instanceof WeakMap;
8773
+ }
8774
+ function resolveRuntimeBindingRegistry() {
8775
+ const existing = Reflect.get(globalThis, TOOL_CONTEXT_RUNTIME_BINDINGS_KEY);
8776
+ if (existing !== void 0) {
8777
+ if (!isRuntimeBindingRegistry(existing)) {
8778
+ throw new Error("Linnkit ToolContext runtime binding registry has an incompatible owner.");
8779
+ }
8780
+ return existing;
8781
+ }
8782
+ const registry = /* @__PURE__ */ new WeakMap();
8783
+ const installed = Reflect.defineProperty(globalThis, TOOL_CONTEXT_RUNTIME_BINDINGS_KEY, {
8784
+ value: registry,
8785
+ configurable: false,
8786
+ enumerable: false,
8787
+ writable: false
8788
+ });
8789
+ if (!installed) {
8790
+ throw new Error("Cannot install Linnkit ToolContext runtime binding registry.");
8791
+ }
8792
+ return registry;
8793
+ }
8794
+ var runtimeBindings = resolveRuntimeBindingRegistry();
8769
8795
  function toEventSource(source) {
8770
8796
  if (typeof source === "function") {
8771
8797
  return source;