@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/cli.js CHANGED
@@ -7631,7 +7631,33 @@ function findCachedToolOutputByIdempotencyKey(params) {
7631
7631
  }
7632
7632
 
7633
7633
  // src/runtime-kernel/tools/toolContextRuntime.ts
7634
- var runtimeBindings = /* @__PURE__ */ new WeakMap();
7634
+ var TOOL_CONTEXT_RUNTIME_BINDINGS_KEY = /* @__PURE__ */ Symbol.for(
7635
+ "@linnlabs/linnkit/tool-context-runtime-bindings/v1"
7636
+ );
7637
+ function isRuntimeBindingRegistry(value) {
7638
+ return value instanceof WeakMap;
7639
+ }
7640
+ function resolveRuntimeBindingRegistry() {
7641
+ const existing = Reflect.get(globalThis, TOOL_CONTEXT_RUNTIME_BINDINGS_KEY);
7642
+ if (existing !== void 0) {
7643
+ if (!isRuntimeBindingRegistry(existing)) {
7644
+ throw new Error("Linnkit ToolContext runtime binding registry has an incompatible owner.");
7645
+ }
7646
+ return existing;
7647
+ }
7648
+ const registry = /* @__PURE__ */ new WeakMap();
7649
+ const installed = Reflect.defineProperty(globalThis, TOOL_CONTEXT_RUNTIME_BINDINGS_KEY, {
7650
+ value: registry,
7651
+ configurable: false,
7652
+ enumerable: false,
7653
+ writable: false
7654
+ });
7655
+ if (!installed) {
7656
+ throw new Error("Cannot install Linnkit ToolContext runtime binding registry.");
7657
+ }
7658
+ return registry;
7659
+ }
7660
+ var runtimeBindings = resolveRuntimeBindingRegistry();
7635
7661
  function toEventSource(source) {
7636
7662
  if (typeof source === "function") {
7637
7663
  return source;