@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/testkit.js CHANGED
@@ -7951,7 +7951,33 @@ var TOOL_CONTEXT_RUNTIME_RESERVED_KEYS = [
7951
7951
  "parentToolCallId",
7952
7952
  "modelInputAdmission"
7953
7953
  ];
7954
- var runtimeBindings = /* @__PURE__ */ new WeakMap();
7954
+ var TOOL_CONTEXT_RUNTIME_BINDINGS_KEY = /* @__PURE__ */ Symbol.for(
7955
+ "@linnlabs/linnkit/tool-context-runtime-bindings/v1"
7956
+ );
7957
+ function isRuntimeBindingRegistry(value) {
7958
+ return value instanceof WeakMap;
7959
+ }
7960
+ function resolveRuntimeBindingRegistry() {
7961
+ const existing = Reflect.get(globalThis, TOOL_CONTEXT_RUNTIME_BINDINGS_KEY);
7962
+ if (existing !== void 0) {
7963
+ if (!isRuntimeBindingRegistry(existing)) {
7964
+ throw new Error("Linnkit ToolContext runtime binding registry has an incompatible owner.");
7965
+ }
7966
+ return existing;
7967
+ }
7968
+ const registry = /* @__PURE__ */ new WeakMap();
7969
+ const installed = Reflect.defineProperty(globalThis, TOOL_CONTEXT_RUNTIME_BINDINGS_KEY, {
7970
+ value: registry,
7971
+ configurable: false,
7972
+ enumerable: false,
7973
+ writable: false
7974
+ });
7975
+ if (!installed) {
7976
+ throw new Error("Cannot install Linnkit ToolContext runtime binding registry.");
7977
+ }
7978
+ return registry;
7979
+ }
7980
+ var runtimeBindings = resolveRuntimeBindingRegistry();
7955
7981
  function toEventSource(source) {
7956
7982
  if (typeof source === "function") {
7957
7983
  return source;