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