@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.
@@ -7747,7 +7747,33 @@ function findCachedToolOutputByIdempotencyKey(params) {
7747
7747
  }
7748
7748
 
7749
7749
  // src/runtime-kernel/tools/toolContextRuntime.ts
7750
- var runtimeBindings = /* @__PURE__ */ new WeakMap();
7750
+ var TOOL_CONTEXT_RUNTIME_BINDINGS_KEY = /* @__PURE__ */ Symbol.for(
7751
+ "@linnlabs/linnkit/tool-context-runtime-bindings/v1"
7752
+ );
7753
+ function isRuntimeBindingRegistry(value) {
7754
+ return value instanceof WeakMap;
7755
+ }
7756
+ function resolveRuntimeBindingRegistry() {
7757
+ const existing = Reflect.get(globalThis, TOOL_CONTEXT_RUNTIME_BINDINGS_KEY);
7758
+ if (existing !== void 0) {
7759
+ if (!isRuntimeBindingRegistry(existing)) {
7760
+ throw new Error("Linnkit ToolContext runtime binding registry has an incompatible owner.");
7761
+ }
7762
+ return existing;
7763
+ }
7764
+ const registry = /* @__PURE__ */ new WeakMap();
7765
+ const installed = Reflect.defineProperty(globalThis, TOOL_CONTEXT_RUNTIME_BINDINGS_KEY, {
7766
+ value: registry,
7767
+ configurable: false,
7768
+ enumerable: false,
7769
+ writable: false
7770
+ });
7771
+ if (!installed) {
7772
+ throw new Error("Cannot install Linnkit ToolContext runtime binding registry.");
7773
+ }
7774
+ return registry;
7775
+ }
7776
+ var runtimeBindings = resolveRuntimeBindingRegistry();
7751
7777
  function toEventSource(source) {
7752
7778
  if (typeof source === "function") {
7753
7779
  return source;