@theokit/gateway 0.16.0 → 0.16.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/index.d.cts CHANGED
@@ -1677,8 +1677,8 @@ declare function redactSecrets(value: unknown): string;
1677
1677
  /** Strategy function: pure mapping from event to agentId string. */
1678
1678
  type AgentIdStrategy = (event: MessageEvent) => string;
1679
1679
  /**
1680
- * Default strategy. Sanitizes `-` to `_` inside ids so the format
1681
- * remains parseable by `-` segments.
1680
+ * Default strategy. Escapes ids (`_` to `__`, `-` to `_d`) so the format
1681
+ * remains splittable on `-` and distinct ids never share a key.
1682
1682
  */
1683
1683
  declare function defaultStrategy(event: MessageEvent): string;
1684
1684
  /**
package/dist/index.d.ts CHANGED
@@ -1677,8 +1677,8 @@ declare function redactSecrets(value: unknown): string;
1677
1677
  /** Strategy function: pure mapping from event to agentId string. */
1678
1678
  type AgentIdStrategy = (event: MessageEvent) => string;
1679
1679
  /**
1680
- * Default strategy. Sanitizes `-` to `_` inside ids so the format
1681
- * remains parseable by `-` segments.
1680
+ * Default strategy. Escapes ids (`_` to `__`, `-` to `_d`) so the format
1681
+ * remains splittable on `-` and distinct ids never share a key.
1682
1682
  */
1683
1683
  declare function defaultStrategy(event: MessageEvent): string;
1684
1684
  /**
package/dist/index.js CHANGED
@@ -1266,7 +1266,7 @@ function defaultStrategy(event) {
1266
1266
  }
1267
1267
  }
1268
1268
  function sanitize(s) {
1269
- return s.replace(/-/g, "_");
1269
+ return s.replace(/_/g, "__").replace(/-/g, "_d");
1270
1270
  }
1271
1271
  var SessionRouter = class {
1272
1272
  constructor(strategy = defaultStrategy) {