@atbash/sdk 0.13.2-dev.0 → 0.13.3-dev.0

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.mjs CHANGED
@@ -43010,11 +43010,20 @@ async function rollbackMemory(toId, reason, auth, opts) {
43010
43010
  );
43011
43011
  }
43012
43012
 
43013
+ // src-ts/memory/_json_safe.ts
43014
+ function toJsonSafe(value) {
43015
+ try {
43016
+ return JSON.parse(JSON.stringify(value ?? null));
43017
+ } catch {
43018
+ return null;
43019
+ }
43020
+ }
43021
+
43013
43022
  // src-ts/memory/classifier.ts
43014
43023
  var DEFAULT_MEMORY_WRITE_TOOL_NAMES = native.defaultMemoryWriteToolNames();
43015
43024
  var DEFAULT_MEMORY_PATH_PATTERNS = native.defaultMemoryPathPatterns();
43016
43025
  function classifyMemoryWrite(event, ctx, opts = {}) {
43017
- return native.classifyMemoryWrite(event, ctx, {
43026
+ return native.classifyMemoryWrite(toJsonSafe(event), toJsonSafe(ctx), {
43018
43027
  patterns: opts.patterns ? [...opts.patterns] : void 0,
43019
43028
  toolNames: opts.toolNames ? [...opts.toolNames] : void 0
43020
43029
  });
@@ -43252,7 +43261,7 @@ function defaultPluginLogPath(workspaceDir = process.cwd()) {
43252
43261
  // src-ts/memory/read-classifier.ts
43253
43262
  var DEFAULT_MEMORY_READ_TOOL_NAMES = native.defaultMemoryReadToolNames();
43254
43263
  function classifyMemoryRead(event, ctx, opts = {}) {
43255
- return native.classifyMemoryRead(event, ctx, {
43264
+ return native.classifyMemoryRead(toJsonSafe(event), toJsonSafe(ctx), {
43256
43265
  readToolNames: opts.readToolNames ? [...opts.readToolNames] : void 0,
43257
43266
  patterns: opts.patterns ? [...opts.patterns] : void 0,
43258
43267
  genericReadToolNames: opts.genericReadToolNames ? [...opts.genericReadToolNames] : void 0