@vellumai/assistant 0.8.8-dev.202606071734.db66b83 → 0.8.8-dev.202606071935.547b6d2

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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/src/__tests__/approval-cascade.test.ts +1 -0
  3. package/src/__tests__/compaction-events.test.ts +1 -0
  4. package/src/__tests__/conversation-abort-tool-results.test.ts +1 -0
  5. package/src/__tests__/conversation-agent-loop-inference-profile.test.ts +1 -0
  6. package/src/__tests__/conversation-agent-loop-overflow.test.ts +13 -0
  7. package/src/__tests__/conversation-agent-loop.test.ts +15 -0
  8. package/src/__tests__/conversation-confirmation-signals.test.ts +1 -0
  9. package/src/__tests__/conversation-process-callsite.test.ts +1 -0
  10. package/src/__tests__/conversation-provider-retry-repair.test.ts +1 -0
  11. package/src/__tests__/conversation-queue.test.ts +1 -0
  12. package/src/__tests__/conversation-runtime-assembly.test.ts +125 -45
  13. package/src/__tests__/conversation-runtime-workspace.test.ts +20 -6
  14. package/src/__tests__/conversation-slash-queue.test.ts +1 -0
  15. package/src/__tests__/conversation-slash-unknown.test.ts +1 -0
  16. package/src/__tests__/conversation-speed-override.test.ts +1 -0
  17. package/src/__tests__/conversation-workspace-cache-state.test.ts +1 -0
  18. package/src/__tests__/conversation-workspace-injection.test.ts +1 -0
  19. package/src/__tests__/conversation-workspace-tool-tracking.test.ts +1 -0
  20. package/src/__tests__/injector-chain.test.ts +11 -5
  21. package/src/__tests__/injector-disk-pressure.test.ts +5 -5
  22. package/src/__tests__/injector-pkb-v2-silenced.test.ts +2 -2
  23. package/src/__tests__/injector-v3-suppression.test.ts +4 -4
  24. package/src/daemon/conversation-agent-loop.ts +31 -62
  25. package/src/daemon/conversation-runtime-assembly.ts +63 -40
  26. package/src/daemon/conversation.ts +1 -6
  27. package/src/plugins/defaults/memory-retrieval/hooks/post-compact.ts +36 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/assistant",
3
- "version": "0.8.8-dev.202606071734.db66b83",
3
+ "version": "0.8.8-dev.202606071935.547b6d2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -176,6 +176,7 @@ mock.module("../memory/retriever.js", () => ({
176
176
  mock.module("../context/window-manager.js", () => ({
177
177
  ContextWindowManager: class {
178
178
  constructor() {}
179
+ updateConfig() {}
179
180
  shouldCompact() {
180
181
  return { needed: false, estimatedTokens: 0 };
181
182
  }
@@ -192,6 +192,7 @@ mock.module("../context/window-manager.js", () => ({
192
192
  nonPersistedPrefixCount = 0;
193
193
  summaryIsInjected = false;
194
194
  constructor() {}
195
+ updateConfig() {}
195
196
  shouldCompact() {
196
197
  return { needed: false, estimatedTokens: 0 };
197
198
  }
@@ -170,6 +170,7 @@ mock.module("../memory/retriever.js", () => ({
170
170
  mock.module("../context/window-manager.js", () => ({
171
171
  ContextWindowManager: class {
172
172
  constructor() {}
173
+ updateConfig() {}
173
174
  shouldCompact() {
174
175
  return { needed: false, estimatedTokens: 0 };
175
176
  }
@@ -431,6 +431,7 @@ function makeCtx(
431
431
  systemPrompt: "system prompt",
432
432
 
433
433
  contextWindowManager: {
434
+ updateConfig: () => {},
434
435
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
435
436
  maybeCompact: async () => ({ compacted: false }),
436
437
  } as unknown as Conversation["contextWindowManager"],
@@ -497,6 +497,7 @@ function makeCtx(
497
497
  systemPrompt: "system prompt",
498
498
 
499
499
  contextWindowManager: {
500
+ updateConfig: () => {},
500
501
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
501
502
  maybeCompact: async () => ({ compacted: false }),
502
503
  } as unknown as Conversation["contextWindowManager"],
@@ -762,6 +763,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
762
763
  isError: false,
763
764
  }),
764
765
  contextWindowManager: {
766
+ updateConfig: () => {},
765
767
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
766
768
  maybeCompact: async () => ({ compacted: false }),
767
769
  } as unknown as Conversation["contextWindowManager"],
@@ -836,6 +838,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
836
838
  const ctx = makeCtx({
837
839
  loopProvider: provider,
838
840
  contextWindowManager: {
841
+ updateConfig: () => {},
839
842
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
840
843
  maybeCompact: async () => ({ compacted: false }),
841
844
  } as unknown as Conversation["contextWindowManager"],
@@ -912,6 +915,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
912
915
  const ctx = makeCtx({
913
916
  loopProvider: provider,
914
917
  contextWindowManager: {
918
+ updateConfig: () => {},
915
919
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
916
920
  maybeCompact: async () => ({ compacted: false }),
917
921
  } as unknown as Conversation["contextWindowManager"],
@@ -999,6 +1003,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
999
1003
  loopProvider: provider,
1000
1004
  messages: longHistory,
1001
1005
  contextWindowManager: {
1006
+ updateConfig: () => {},
1002
1007
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1003
1008
  maybeCompact: async () => ({ compacted: false }),
1004
1009
  } as unknown as Conversation["contextWindowManager"],
@@ -1081,6 +1086,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
1081
1086
  isError: false,
1082
1087
  }),
1083
1088
  contextWindowManager: {
1089
+ updateConfig: () => {},
1084
1090
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1085
1091
  maybeCompact: async (
1086
1092
  _msgs: Message[],
@@ -1181,6 +1187,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
1181
1187
  isError: false,
1182
1188
  }),
1183
1189
  contextWindowManager: {
1190
+ updateConfig: () => {},
1184
1191
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1185
1192
  maybeCompact: async () => {
1186
1193
  compactionCalled = true;
@@ -1287,6 +1294,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
1287
1294
  isError: false,
1288
1295
  }),
1289
1296
  contextWindowManager: {
1297
+ updateConfig: () => {},
1290
1298
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1291
1299
  maybeCompact: async () => {
1292
1300
  compactionCalled = true;
@@ -1404,6 +1412,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
1404
1412
  ],
1405
1413
  toolExecutor: async () => ({ content: "output", isError: false }),
1406
1414
  contextWindowManager: {
1415
+ updateConfig: () => {},
1407
1416
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1408
1417
  maybeCompact: async () => {
1409
1418
  compactionCallCount++;
@@ -1512,6 +1521,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
1512
1521
  ],
1513
1522
  toolExecutor: async () => ({ content: "output", isError: false }),
1514
1523
  contextWindowManager: {
1524
+ updateConfig: () => {},
1515
1525
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1516
1526
  maybeCompact: async () => {
1517
1527
  compactionCallCount++;
@@ -1627,6 +1637,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
1627
1637
  ],
1628
1638
  toolExecutor: async () => ({ content: "output", isError: false }),
1629
1639
  contextWindowManager: {
1640
+ updateConfig: () => {},
1630
1641
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1631
1642
  // Under the new architecture (Compaction Re-homing Arc, Bullet 1)
1632
1643
  // the retry budget lives inside `ContextWindowManager._maybeCompact`,
@@ -1772,6 +1783,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
1772
1783
  const ctx = makeCtx({
1773
1784
  providerResponses: [textResponse("done")],
1774
1785
  contextWindowManager: {
1786
+ updateConfig: () => {},
1775
1787
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1776
1788
  maybeCompact: async () => ({ compacted: false }),
1777
1789
  } as unknown as Conversation["contextWindowManager"],
@@ -1875,6 +1887,7 @@ describe("session-agent-loop overflow recovery (JARVIS-110)", () => {
1875
1887
  ],
1876
1888
  toolExecutor: async () => ({ content: "output", isError: false }),
1877
1889
  contextWindowManager: {
1890
+ updateConfig: () => {},
1878
1891
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1879
1892
  maybeCompact: async (
1880
1893
  _msgs: Message[],
@@ -617,6 +617,7 @@ function makeCtx(
617
617
  systemPrompt: "system prompt",
618
618
 
619
619
  contextWindowManager: {
620
+ updateConfig: () => {},
620
621
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
621
622
  maybeCompact: async () => ({ compacted: false }),
622
623
  } as unknown as Conversation["contextWindowManager"],
@@ -1640,6 +1641,7 @@ describe("session-agent-loop", () => {
1640
1641
  const ctx = makeCtx({
1641
1642
  loopProvider: provider,
1642
1643
  contextWindowManager: {
1644
+ updateConfig: () => {},
1643
1645
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1644
1646
  maybeCompact: async () => ({ compacted: false }),
1645
1647
  } as unknown as Conversation["contextWindowManager"],
@@ -1661,6 +1663,7 @@ describe("session-agent-loop", () => {
1661
1663
  const ctx = makeCtx({
1662
1664
  providerResponses: [new Error("context_length_exceeded")],
1663
1665
  contextWindowManager: {
1666
+ updateConfig: () => {},
1664
1667
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1665
1668
  // Compaction succeeds but context is still too large
1666
1669
  maybeCompact: async () => ({
@@ -1720,6 +1723,7 @@ describe("session-agent-loop", () => {
1720
1723
  const ctx = makeCtx({
1721
1724
  loopProvider: provider,
1722
1725
  contextWindowManager: {
1726
+ updateConfig: () => {},
1723
1727
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1724
1728
  maybeCompact: async () => ({ compacted: false }),
1725
1729
  } as unknown as Conversation["contextWindowManager"],
@@ -1769,6 +1773,7 @@ describe("session-agent-loop", () => {
1769
1773
  ],
1770
1774
  hasNoClient: true,
1771
1775
  contextWindowManager: {
1776
+ updateConfig: () => {},
1772
1777
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1773
1778
  maybeCompact: async () => ({
1774
1779
  compacted: true,
@@ -1869,6 +1874,7 @@ describe("session-agent-loop", () => {
1869
1874
  toolExecutor: async () => ({ content: "data", isError: false }),
1870
1875
  hasNoClient: true,
1871
1876
  contextWindowManager: {
1877
+ updateConfig: () => {},
1872
1878
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1873
1879
  maybeCompact: async () => ({
1874
1880
  compacted: true,
@@ -1954,6 +1960,7 @@ describe("session-agent-loop", () => {
1954
1960
  const ctx = makeCtx({
1955
1961
  providerResponses: [new Error("context_length_exceeded")],
1956
1962
  contextWindowManager: {
1963
+ updateConfig: () => {},
1957
1964
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1958
1965
  maybeCompact: async () => ({ compacted: false }),
1959
1966
  } as unknown as Conversation["contextWindowManager"],
@@ -1992,6 +1999,7 @@ describe("session-agent-loop", () => {
1992
1999
  const ctx = makeCtx({
1993
2000
  loopProvider: provider,
1994
2001
  contextWindowManager: {
2002
+ updateConfig: () => {},
1995
2003
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
1996
2004
  maybeCompact: async () => ({ compacted: false }),
1997
2005
  } as unknown as Conversation["contextWindowManager"],
@@ -2683,6 +2691,7 @@ describe("session-agent-loop", () => {
2683
2691
  textResponse("retry succeeded"),
2684
2692
  ],
2685
2693
  contextWindowManager: {
2694
+ updateConfig: () => {},
2686
2695
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
2687
2696
  maybeCompact: async () => ({ compacted: false }),
2688
2697
  } as unknown as Conversation["contextWindowManager"],
@@ -3195,6 +3204,7 @@ describe("session-agent-loop", () => {
3195
3204
  assistantMessageChannel: "slack" as const,
3196
3205
  }),
3197
3206
  contextWindowManager: {
3207
+ updateConfig: () => {},
3198
3208
  shouldCompact: (messages: Message[]) => {
3199
3209
  shouldCompactInputs.push(messages);
3200
3210
  return { needed: true, estimatedTokens: 95_000 };
@@ -3327,6 +3337,7 @@ describe("session-agent-loop", () => {
3327
3337
  assistantMessageChannel: "slack" as const,
3328
3338
  }),
3329
3339
  contextWindowManager: {
3340
+ updateConfig: () => {},
3330
3341
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
3331
3342
  maybeCompact: async () => ({ compacted: false }),
3332
3343
  } as unknown as Conversation["contextWindowManager"],
@@ -3446,6 +3457,7 @@ describe("session-agent-loop", () => {
3446
3457
  assistantMessageChannel: "slack" as const,
3447
3458
  }),
3448
3459
  contextWindowManager: {
3460
+ updateConfig: () => {},
3449
3461
  shouldCompact: () => ({ needed: true, estimatedTokens: 120_000 }),
3450
3462
  maybeCompact: async (messages: Message[]) => {
3451
3463
  expect(messages).toBe(renderedSlackMessages);
@@ -3569,6 +3581,7 @@ describe("session-agent-loop", () => {
3569
3581
  assistantMessageChannel: "slack" as const,
3570
3582
  }),
3571
3583
  contextWindowManager: {
3584
+ updateConfig: () => {},
3572
3585
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
3573
3586
  maybeCompact: async (messages: Message[]) => {
3574
3587
  maybeCompactInputs.push(messages);
@@ -3936,6 +3949,7 @@ describe("session-agent-loop", () => {
3936
3949
  ],
3937
3950
  toolExecutor: async () => ({ content: "ok", isError: false }),
3938
3951
  contextWindowManager: {
3952
+ updateConfig: () => {},
3939
3953
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
3940
3954
  maybeCompact: async () => ({ compacted: false }),
3941
3955
  } as unknown as Conversation["contextWindowManager"],
@@ -3985,6 +3999,7 @@ describe("session-agent-loop", () => {
3985
3999
  ],
3986
4000
  toolExecutor: async () => ({ content: "ok", isError: false }),
3987
4001
  contextWindowManager: {
4002
+ updateConfig: () => {},
3988
4003
  shouldCompact: () => ({ needed: false, estimatedTokens: 0 }),
3989
4004
  maybeCompact: async () => ({ compacted: false }),
3990
4005
  } as unknown as Conversation["contextWindowManager"],
@@ -167,6 +167,7 @@ mock.module("../memory/retriever.js", () => ({
167
167
  mock.module("../context/window-manager.js", () => ({
168
168
  ContextWindowManager: class {
169
169
  constructor() {}
170
+ updateConfig() {}
170
171
  shouldCompact() {
171
172
  return { needed: false, estimatedTokens: 0 };
172
173
  }
@@ -253,6 +253,7 @@ mock.module("../agent/loop.js", () => ({
253
253
  mock.module("../context/window-manager.js", () => ({
254
254
  ContextWindowManager: class {
255
255
  constructor() {}
256
+ updateConfig() {}
256
257
  shouldCompact() {
257
258
  return { needed: false, estimatedTokens: 0 };
258
259
  }
@@ -221,6 +221,7 @@ let forceCompactionEnabled = false;
221
221
  mock.module("../context/window-manager.js", () => ({
222
222
  ContextWindowManager: class {
223
223
  constructor() {}
224
+ updateConfig() {}
224
225
  shouldCompact() {
225
226
  return { needed: false, estimatedTokens: 0 };
226
227
  }
@@ -265,6 +265,7 @@ mock.module("../memory/retriever.js", () => ({
265
265
  mock.module("../context/window-manager.js", () => ({
266
266
  ContextWindowManager: class {
267
267
  constructor() {}
268
+ updateConfig() {}
268
269
  shouldCompact() {
269
270
  return { needed: false, estimatedTokens: 0 };
270
271
  }