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