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