@anuma/sdk 3.12.1 → 3.12.2

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.
@@ -15825,7 +15825,6 @@ function createAutoExtractor(options) {
15825
15825
  return true;
15826
15826
  }
15827
15827
  function drainPending() {
15828
- if (disposed) return;
15829
15828
  for (const [conversationId, state] of conversations) {
15830
15829
  if (state.pending) {
15831
15830
  const messages = state.pending;
@@ -15840,7 +15839,7 @@ function createAutoExtractor(options) {
15840
15839
  isProcessing: () => inflight > 0,
15841
15840
  dispose: () => {
15842
15841
  disposed = true;
15843
- for (const state of conversations.values()) state.pending = void 0;
15842
+ if (inflight === 0) drainPending();
15844
15843
  }
15845
15844
  };
15846
15845
  }
@@ -6632,7 +6632,11 @@ interface AutoExtractor {
6632
6632
  processTurn(messages: AutoExtractMessage[], conversationId?: string): boolean;
6633
6633
  /** True while a turn's extraction is in flight. */
6634
6634
  isProcessing(): boolean;
6635
- /** Stop accepting new turns. In-flight work continues to completion. */
6635
+ /**
6636
+ * Stop accepting new turns. In-flight work continues to completion, and any
6637
+ * turn already queued (coalesced while an extraction was in flight) is still
6638
+ * flushed — never dropped — so a turn sent right before unmount isn't lost.
6639
+ */
6636
6640
  dispose(): void;
6637
6641
  }
6638
6642
  /**
@@ -6632,7 +6632,11 @@ interface AutoExtractor {
6632
6632
  processTurn(messages: AutoExtractMessage[], conversationId?: string): boolean;
6633
6633
  /** True while a turn's extraction is in flight. */
6634
6634
  isProcessing(): boolean;
6635
- /** Stop accepting new turns. In-flight work continues to completion. */
6635
+ /**
6636
+ * Stop accepting new turns. In-flight work continues to completion, and any
6637
+ * turn already queued (coalesced while an extraction was in flight) is still
6638
+ * flushed — never dropped — so a turn sent right before unmount isn't lost.
6639
+ */
6636
6640
  dispose(): void;
6637
6641
  }
6638
6642
  /**
@@ -7368,7 +7368,6 @@ function createAutoExtractor(options) {
7368
7368
  return true;
7369
7369
  }
7370
7370
  function drainPending() {
7371
- if (disposed) return;
7372
7371
  for (const [conversationId, state] of conversations) {
7373
7372
  if (state.pending) {
7374
7373
  const messages = state.pending;
@@ -7383,7 +7382,7 @@ function createAutoExtractor(options) {
7383
7382
  isProcessing: () => inflight > 0,
7384
7383
  dispose: () => {
7385
7384
  disposed = true;
7386
- for (const state of conversations.values()) state.pending = void 0;
7385
+ if (inflight === 0) drainPending();
7387
7386
  }
7388
7387
  };
7389
7388
  }
@@ -17142,7 +17142,6 @@ function createAutoExtractor(options) {
17142
17142
  return true;
17143
17143
  }
17144
17144
  function drainPending() {
17145
- if (disposed) return;
17146
17145
  for (const [conversationId, state] of conversations) {
17147
17146
  if (state.pending) {
17148
17147
  const messages = state.pending;
@@ -17157,7 +17156,7 @@ function createAutoExtractor(options) {
17157
17156
  isProcessing: () => inflight > 0,
17158
17157
  dispose: () => {
17159
17158
  disposed = true;
17160
- for (const state of conversations.values()) state.pending = void 0;
17159
+ if (inflight === 0) drainPending();
17161
17160
  }
17162
17161
  };
17163
17162
  }
@@ -7859,7 +7859,11 @@ interface AutoExtractor {
7859
7859
  processTurn(messages: AutoExtractMessage[], conversationId?: string): boolean;
7860
7860
  /** True while a turn's extraction is in flight. */
7861
7861
  isProcessing(): boolean;
7862
- /** Stop accepting new turns. In-flight work continues to completion. */
7862
+ /**
7863
+ * Stop accepting new turns. In-flight work continues to completion, and any
7864
+ * turn already queued (coalesced while an extraction was in flight) is still
7865
+ * flushed — never dropped — so a turn sent right before unmount isn't lost.
7866
+ */
7863
7867
  dispose(): void;
7864
7868
  }
7865
7869
  /**
@@ -7859,7 +7859,11 @@ interface AutoExtractor {
7859
7859
  processTurn(messages: AutoExtractMessage[], conversationId?: string): boolean;
7860
7860
  /** True while a turn's extraction is in flight. */
7861
7861
  isProcessing(): boolean;
7862
- /** Stop accepting new turns. In-flight work continues to completion. */
7862
+ /**
7863
+ * Stop accepting new turns. In-flight work continues to completion, and any
7864
+ * turn already queued (coalesced while an extraction was in flight) is still
7865
+ * flushed — never dropped — so a turn sent right before unmount isn't lost.
7866
+ */
7863
7867
  dispose(): void;
7864
7868
  }
7865
7869
  /**
@@ -8185,7 +8185,6 @@ function createAutoExtractor(options) {
8185
8185
  return true;
8186
8186
  }
8187
8187
  function drainPending() {
8188
- if (disposed) return;
8189
8188
  for (const [conversationId, state] of conversations) {
8190
8189
  if (state.pending) {
8191
8190
  const messages = state.pending;
@@ -8200,7 +8199,7 @@ function createAutoExtractor(options) {
8200
8199
  isProcessing: () => inflight > 0,
8201
8200
  dispose: () => {
8202
8201
  disposed = true;
8203
- for (const state of conversations.values()) state.pending = void 0;
8202
+ if (inflight === 0) drainPending();
8204
8203
  }
8205
8204
  };
8206
8205
  }
@@ -28799,7 +28799,6 @@ function createAutoExtractor(options) {
28799
28799
  return true;
28800
28800
  }
28801
28801
  function drainPending() {
28802
- if (disposed) return;
28803
28802
  for (const [conversationId, state] of conversations) {
28804
28803
  if (state.pending) {
28805
28804
  const messages = state.pending;
@@ -28814,7 +28813,7 @@ function createAutoExtractor(options) {
28814
28813
  isProcessing: () => inflight > 0,
28815
28814
  dispose: () => {
28816
28815
  disposed = true;
28817
- for (const state of conversations.values()) state.pending = void 0;
28816
+ if (inflight === 0) drainPending();
28818
28817
  }
28819
28818
  };
28820
28819
  }
@@ -7268,7 +7268,11 @@ interface AutoExtractor {
7268
7268
  processTurn(messages: AutoExtractMessage[], conversationId?: string): boolean;
7269
7269
  /** True while a turn's extraction is in flight. */
7270
7270
  isProcessing(): boolean;
7271
- /** Stop accepting new turns. In-flight work continues to completion. */
7271
+ /**
7272
+ * Stop accepting new turns. In-flight work continues to completion, and any
7273
+ * turn already queued (coalesced while an extraction was in flight) is still
7274
+ * flushed — never dropped — so a turn sent right before unmount isn't lost.
7275
+ */
7272
7276
  dispose(): void;
7273
7277
  }
7274
7278
  /**
@@ -7268,7 +7268,11 @@ interface AutoExtractor {
7268
7268
  processTurn(messages: AutoExtractMessage[], conversationId?: string): boolean;
7269
7269
  /** True while a turn's extraction is in flight. */
7270
7270
  isProcessing(): boolean;
7271
- /** Stop accepting new turns. In-flight work continues to completion. */
7271
+ /**
7272
+ * Stop accepting new turns. In-flight work continues to completion, and any
7273
+ * turn already queued (coalesced while an extraction was in flight) is still
7274
+ * flushed — never dropped — so a turn sent right before unmount isn't lost.
7275
+ */
7272
7276
  dispose(): void;
7273
7277
  }
7274
7278
  /**
@@ -6096,7 +6096,6 @@ function createAutoExtractor(options) {
6096
6096
  return true;
6097
6097
  }
6098
6098
  function drainPending() {
6099
- if (disposed) return;
6100
6099
  for (const [conversationId, state] of conversations) {
6101
6100
  if (state.pending) {
6102
6101
  const messages = state.pending;
@@ -6111,7 +6110,7 @@ function createAutoExtractor(options) {
6111
6110
  isProcessing: () => inflight > 0,
6112
6111
  dispose: () => {
6113
6112
  disposed = true;
6114
- for (const state of conversations.values()) state.pending = void 0;
6113
+ if (inflight === 0) drainPending();
6115
6114
  }
6116
6115
  };
6117
6116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anuma/sdk",
3
- "version": "3.12.1",
3
+ "version": "3.12.2",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -123,6 +123,7 @@
123
123
  "e2e:tools": "vitest run --config vitest.e2e.config.mts",
124
124
  "e2e:compare": "tsx scripts/compare-app-gen-runs.ts",
125
125
  "perf:slides": "vitest run --config vitest.perf.config.mts",
126
+ "perf:memory": "vitest run --config vitest.perf-memory.config.mts",
126
127
  "eval:engine": "tsx test/memory/longmemeval.ts --strategy engine",
127
128
  "eval:vault": "tsx test/memory/longmemeval.ts --strategy vault",
128
129
  "eval:longmemeval": "tsx test/memory/longmemeval.ts",