aismemory 0.6.2 → 0.7.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.
Files changed (42) hide show
  1. package/dist/__tests__/agent-load-persistence.test.js +194 -56
  2. package/dist/__tests__/agent-load-persistence.test.js.map +1 -1
  3. package/dist/__tests__/agent-load-session-override-e2e.test.d.ts +1 -0
  4. package/dist/__tests__/agent-load-session-override-e2e.test.js +214 -0
  5. package/dist/__tests__/agent-load-session-override-e2e.test.js.map +1 -0
  6. package/dist/__tests__/agent-preference.test.d.ts +1 -0
  7. package/dist/__tests__/agent-preference.test.js +173 -0
  8. package/dist/__tests__/agent-preference.test.js.map +1 -0
  9. package/dist/__tests__/device-flow-gate-e2e.test.d.ts +1 -0
  10. package/dist/__tests__/device-flow-gate-e2e.test.js +244 -0
  11. package/dist/__tests__/device-flow-gate-e2e.test.js.map +1 -0
  12. package/dist/__tests__/memory-write-failure.test.js +30 -0
  13. package/dist/__tests__/memory-write-failure.test.js.map +1 -1
  14. package/dist/__tests__/reconnect-survival-e2e.test.d.ts +1 -0
  15. package/dist/__tests__/reconnect-survival-e2e.test.js +248 -0
  16. package/dist/__tests__/reconnect-survival-e2e.test.js.map +1 -0
  17. package/dist/__tests__/silent-renewal-e2e.test.d.ts +1 -0
  18. package/dist/__tests__/silent-renewal-e2e.test.js +249 -0
  19. package/dist/__tests__/silent-renewal-e2e.test.js.map +1 -0
  20. package/dist/__tests__/split-brain-upgrade-e2e.test.d.ts +1 -0
  21. package/dist/__tests__/split-brain-upgrade-e2e.test.js +206 -0
  22. package/dist/__tests__/split-brain-upgrade-e2e.test.js.map +1 -0
  23. package/dist/__tests__/token-manager.test.d.ts +1 -0
  24. package/dist/__tests__/token-manager.test.js +403 -0
  25. package/dist/__tests__/token-manager.test.js.map +1 -0
  26. package/dist/__tests__/token-rejection-reauth-e2e.test.d.ts +1 -0
  27. package/dist/__tests__/token-rejection-reauth-e2e.test.js +219 -0
  28. package/dist/__tests__/token-rejection-reauth-e2e.test.js.map +1 -0
  29. package/dist/agent-preference.d.ts +59 -0
  30. package/dist/agent-preference.js +127 -0
  31. package/dist/agent-preference.js.map +1 -0
  32. package/dist/index.js +129 -51
  33. package/dist/index.js.map +1 -1
  34. package/dist/key-auth.d.ts +8 -0
  35. package/dist/key-auth.js +13 -0
  36. package/dist/key-auth.js.map +1 -1
  37. package/dist/telemetry.d.ts +1 -1
  38. package/dist/telemetry.js.map +1 -1
  39. package/dist/token-manager.d.ts +83 -0
  40. package/dist/token-manager.js +237 -0
  41. package/dist/token-manager.js.map +1 -0
  42. package/package.json +1 -1
@@ -0,0 +1,237 @@
1
+ /**
2
+ * TokenManager: owns all in-memory token state for the aismemory client.
3
+ *
4
+ * - First `getCredentials()` authenticates and resolves agent identity;
5
+ * concurrent callers during that first acquire share one in-flight promise.
6
+ * - A renewal is scheduled at 75% of the token's TTL. On success the
7
+ * token/expiresAt swap in place — identity (agentId/tenantId) is resolved
8
+ * once, on the very first acquire, and never re-resolved.
9
+ * - Renewal failures retry with exponential backoff (5s → 10s → 20s ...
10
+ * capped at 300s, ±20% jitter) while the current token remains valid.
11
+ * Backoff state (retryDelayMs/lastAttemptAt/lastError) is shared between
12
+ * the background renewal loop and any on-demand `getCredentials()` call
13
+ * made while the token is expired, so a burst of sequential calls during
14
+ * an outage makes at most one fresh authenticate() attempt per backoff
15
+ * window instead of one per call.
16
+ * - Once the current token hits its hard expiry with renewal still failing,
17
+ * `getCredentials()` rejects with `AisUnreachableError` until the next
18
+ * successful renewal — retries never stop, and recovery needs no restart.
19
+ * - No code path ever serializes the token to disk; it lives only in the
20
+ * closure state below for the process lifetime.
21
+ * - `invalidate()` drops the current token (without touching backoff state,
22
+ * unless `{ resetBackoff: true }` is passed) so a caller that discovers the
23
+ * server rejected it mid-session — e.g. a 401 from a JWT_SECRET rotation,
24
+ * CORBOT-A5BBD580 — can force the next `getCredentials()` to acquire a
25
+ * fresh one instead of re-serving the rejected token. `resetBackoff: true`
26
+ * additionally clears any escalated backoff window, so a server-rejection
27
+ * that arrives mid-outage (after prior renewal failures already escalated
28
+ * retryDelayMs) still re-proves immediately instead of being held behind
29
+ * the stale backoff gate (CORBOT-4F7CAA8E).
30
+ * - The background renewal loop and the on-demand backoff gate in
31
+ * `getCredentials()` are driven off the SAME single-flight `inFlight`
32
+ * promise and the same jittered `nextAttemptAt` timestamp — computed once
33
+ * per failure — so a caller can never race the timer into a second,
34
+ * concurrent `authenticate()` call, and a failed attempt is recorded into
35
+ * backoff state exactly once no matter how many callers were waiting on it
36
+ * (CORBOT-4F7CAA8E).
37
+ */
38
+ /**
39
+ * Thrown by `getCredentials()` once the current token has hard-expired and
40
+ * background renewal is still failing. Renewal keeps retrying in the
41
+ * background; the next successful renewal makes `getCredentials()` resolve
42
+ * again with no restart required.
43
+ */
44
+ export class AisUnreachableError extends Error {
45
+ }
46
+ const RENEW_FRACTION = 0.75;
47
+ const BACKOFF_BASE_MS = 5_000;
48
+ const BACKOFF_CAP_MS = 300_000;
49
+ export function createTokenManager(opts) {
50
+ const now = opts.now ?? Date.now;
51
+ let current = null;
52
+ // Tracked separately from `current` so `invalidate()` (which drops
53
+ // `current` to force a fresh acquire) does not also make `acquire()`
54
+ // re-resolve identity — identity is resolved once, on the very first
55
+ // acquire, and never re-resolved for the life of the manager (see module
56
+ // docstring). Set once, alongside `current`, on the first successful
57
+ // acquire; never cleared.
58
+ let resolvedIdentity = null;
59
+ let inFlight = null;
60
+ let timer = null;
61
+ let retryDelayMs = 0;
62
+ let lastAttemptAt = 0;
63
+ // Absolute timestamp of the next permitted attempt, computed ONCE per
64
+ // failure (in recordFailure) as `lastAttemptAt + jitter(retryDelayMs)`.
65
+ // Both the background retry timer (renew()'s reschedule) and the on-demand
66
+ // gate in getCredentials() key off this SAME value, so they can never
67
+ // disagree about when the next attempt is due (CORBOT-4F7CAA8E / F1).
68
+ let nextAttemptAt = 0;
69
+ let hardExpiryEmitted = false;
70
+ let stopped = false;
71
+ let lastError = '';
72
+ function jitter(ms) {
73
+ return Math.round(ms * (0.8 + Math.random() * 0.4));
74
+ }
75
+ function schedule(delayMs, fn) {
76
+ if (stopped)
77
+ return;
78
+ if (timer)
79
+ clearTimeout(timer);
80
+ timer = setTimeout(fn, delayMs);
81
+ timer.unref?.();
82
+ }
83
+ function scheduleRenewal(expiresAt) {
84
+ const ttlMs = new Date(expiresAt).getTime() - now();
85
+ // Floored at 30s (not 1s): a very short or skewed TTL must not turn
86
+ // renewal into a near-1Hz hammer on the auth endpoint (F7).
87
+ schedule(Math.max(30_000, Math.floor(ttlMs * RENEW_FRACTION)), () => {
88
+ void renew();
89
+ });
90
+ }
91
+ /**
92
+ * Records a failed authenticate/resolveIdentity attempt into the shared
93
+ * backoff state. Called exactly once per failed attempt — from the single
94
+ * `.catch` on the shared `inFlight` promise in `acquireShared()` — no
95
+ * matter how many callers (getCredentials() waiters, or the background
96
+ * renewal loop) were waiting on that attempt (F2a). Escalates
97
+ * retryDelayMs, computes the jittered `nextAttemptAt` gate/schedule value
98
+ * once, emits `renew.retry`, and — once — the `renew.hard_expiry` event
99
+ * when the current token has passed hard expiry.
100
+ */
101
+ function recordFailure(err) {
102
+ lastError = err instanceof Error ? err.message : String(err);
103
+ lastAttemptAt = now();
104
+ retryDelayMs = retryDelayMs === 0 ? BACKOFF_BASE_MS : Math.min(retryDelayMs * 2, BACKOFF_CAP_MS);
105
+ nextAttemptAt = lastAttemptAt + jitter(retryDelayMs);
106
+ opts.onEvent?.('renew.retry', lastError);
107
+ if (current && new Date(current.expiresAt).getTime() <= now() && !hardExpiryEmitted) {
108
+ hardExpiryEmitted = true;
109
+ opts.onEvent?.('renew.hard_expiry', lastError);
110
+ }
111
+ }
112
+ async function acquire() {
113
+ const fresh = await opts.authenticate();
114
+ const expiresAtMs = new Date(fresh.expiresAt).getTime();
115
+ if (!Number.isFinite(expiresAtMs)) {
116
+ throw new Error(`TokenManager.acquire(): authenticate() returned an invalid expiresAt: ${JSON.stringify(fresh.expiresAt)}`);
117
+ }
118
+ if (expiresAtMs <= now()) {
119
+ throw new Error(`TokenManager.acquire(): authenticate() returned an expiresAt in the past: ${JSON.stringify(fresh.expiresAt)}`);
120
+ }
121
+ // Identity is resolved only on the very first acquire; every later
122
+ // acquire (renewal, or a re-acquire after invalidate()) reuses the
123
+ // cached agentId/tenantId.
124
+ let agentId;
125
+ let tenantId;
126
+ if (resolvedIdentity) {
127
+ agentId = resolvedIdentity.agentId;
128
+ tenantId = resolvedIdentity.tenantId;
129
+ }
130
+ else {
131
+ const ids = await opts.resolveIdentity(fresh.token);
132
+ agentId = ids.agentId;
133
+ tenantId = ids.tenantId;
134
+ resolvedIdentity = { agentId, tenantId };
135
+ }
136
+ current = { token: fresh.token, expiresAt: fresh.expiresAt, agentId, tenantId };
137
+ retryDelayMs = 0;
138
+ nextAttemptAt = 0;
139
+ hardExpiryEmitted = false;
140
+ scheduleRenewal(fresh.expiresAt);
141
+ return current;
142
+ }
143
+ /**
144
+ * Starts (or joins) the single in-flight acquire attempt. Both the
145
+ * background renewal loop (`renew()`) and an on-demand `getCredentials()`
146
+ * call on a missing/expired token route through this — so there is never
147
+ * more than one concurrent `authenticate()` call, and a failure is
148
+ * recorded into backoff state exactly once, by this function's own
149
+ * `.catch`, regardless of how many callers are awaiting the same flight
150
+ * (F1, F2a). A failure also schedules the next background retry here, so
151
+ * that retry loop starts even from a failed FIRST acquire — not only from
152
+ * a renewal failure (F3).
153
+ */
154
+ function acquireShared() {
155
+ if (!inFlight) {
156
+ inFlight = acquire()
157
+ .catch((err) => {
158
+ recordFailure(err);
159
+ schedule(Math.max(0, nextAttemptAt - now()), () => {
160
+ void renew();
161
+ });
162
+ throw err;
163
+ })
164
+ .finally(() => {
165
+ inFlight = null;
166
+ });
167
+ }
168
+ return inFlight;
169
+ }
170
+ async function renew() {
171
+ try {
172
+ await acquireShared();
173
+ opts.onEvent?.('renew.success');
174
+ }
175
+ catch {
176
+ // Failure already recorded and the next retry already scheduled by
177
+ // acquireShared()'s own .catch — nothing left to do here.
178
+ }
179
+ }
180
+ return {
181
+ async getCredentials() {
182
+ if (current && new Date(current.expiresAt).getTime() > now()) {
183
+ return current;
184
+ }
185
+ // The current token is missing or expired. If a prior attempt (from
186
+ // here or from the background renewal loop) failed and we're still
187
+ // inside its jittered backoff window, don't make a fresh attempt —
188
+ // that would let a burst of sequential calls (e.g. several tool calls
189
+ // in one MCP chat turn) each hammer the auth endpoint during an
190
+ // outage, racing the properly-backed-off background timer and
191
+ // defeating the point of backoff. Fail fast with the last known error
192
+ // instead; the background timer (or the next call after the window
193
+ // elapses) makes the next real attempt. Skipped once a flight is
194
+ // already in progress — join it instead of gating it.
195
+ if (!inFlight && nextAttemptAt > 0 && now() < nextAttemptAt) {
196
+ throw new AisUnreachableError(`AIS unreachable — renewing automatically; no action needed. Last error: ${lastError}`);
197
+ }
198
+ try {
199
+ return await acquireShared();
200
+ }
201
+ catch {
202
+ throw new AisUnreachableError(`AIS unreachable — renewing automatically; no action needed. Last error: ${lastError}`);
203
+ }
204
+ },
205
+ /**
206
+ * Drops the current token so the next `getCredentials()` must acquire a
207
+ * fresh one — used when the server itself rejects a still-time-valid
208
+ * token (e.g. a mid-session JWT_SECRET rotation, CORBOT-A5BBD580).
209
+ * By default this does NOT touch backoff bookkeeping (`retryDelayMs` /
210
+ * `lastAttemptAt` / `nextAttemptAt`): a server that keeps rejecting
211
+ * tokens must not turn into an unthrottled hammer on the auth endpoint —
212
+ * the shared-backoff-window gate in `getCredentials()` still applies.
213
+ * Pass `{ resetBackoff: true }` when the caller has independent evidence
214
+ * the server is reachable right now (e.g. it just returned the 401 this
215
+ * invalidate() is responding to) — this clears the backoff window so the
216
+ * re-prove is not held behind a stale gate computed from unrelated prior
217
+ * failures (F2b). Does not cancel or reschedule the background renewal
218
+ * timer; a successful next acquire reschedules renewal exactly as it
219
+ * does today.
220
+ */
221
+ invalidate(invalidateOpts) {
222
+ current = null;
223
+ if (invalidateOpts?.resetBackoff) {
224
+ retryDelayMs = 0;
225
+ lastAttemptAt = 0;
226
+ nextAttemptAt = 0;
227
+ hardExpiryEmitted = false;
228
+ }
229
+ },
230
+ stop() {
231
+ stopped = true;
232
+ if (timer)
233
+ clearTimeout(timer);
234
+ },
235
+ };
236
+ }
237
+ //# sourceMappingURL=token-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-manager.js","sourceRoot":"","sources":["../src/token-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAUH;;;;;GAKG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;CAAG;AAYjD,MAAM,cAAc,GAAG,IAAI,CAAC;AAC5B,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,MAAM,cAAc,GAAG,OAAO,CAAC;AAc/B,MAAM,UAAU,kBAAkB,CAAC,IAAsB;IAKvD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC;IACjC,IAAI,OAAO,GAA8B,IAAI,CAAC;IAC9C,mEAAmE;IACnE,qEAAqE;IACrE,qEAAqE;IACrE,yEAAyE;IACzE,qEAAqE;IACrE,0BAA0B;IAC1B,IAAI,gBAAgB,GAAiD,IAAI,CAAC;IAC1E,IAAI,QAAQ,GAAuC,IAAI,CAAC;IACxD,IAAI,KAAK,GAAyC,IAAI,CAAC;IACvD,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,aAAa,GAAG,CAAC,CAAC;IACtB,sEAAsE;IACtE,wEAAwE;IACxE,2EAA2E;IAC3E,sEAAsE;IACtE,sEAAsE;IACtE,IAAI,aAAa,GAAG,CAAC,CAAC;IACtB,IAAI,iBAAiB,GAAG,KAAK,CAAC;IAC9B,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,SAAS,MAAM,CAAC,EAAU;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,GA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E,gEAAgE;YAChE,8DAA8D;YAC9D,sEAAsE;YACtE,mEAAmE;YACnE,iEAAiE;YACjE,sDAAsD;YACtD,IAAI,CAAC,QAAQ,IAAI,aAAa,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,aAAa,EAAE,CAAC;gBAC5D,MAAM,IAAI,mBAAmB,CAC3B,2EAA2E,SAAS,EAAE,CACvF,CAAC;YACJ,CAAC;YACD,IAAI,CAAC;gBACH,OAAO,MAAM,aAAa,EAAE,CAAC;YAC/B,CAAC;YAAC,MAAM,CAAC;gBACP,MAAM,IAAI,mBAAmB,CAC3B,2EAA2E,SAAS,EAAE,CACvF,CAAC;YACJ,CAAC;QACH,CAAC;QACD;;;;;;;;;;;;;;;WAeG;QACH,UAAU,CAAC,cAA+B;YACxC,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,cAAc,EAAE,YAAY,EAAE,CAAC;gBACjC,YAAY,GAAG,CAAC,CAAC;gBACjB,aAAa,GAAG,CAAC,CAAC;gBAClB,aAAa,GAAG,CAAC,CAAC;gBAClB,iBAAiB,GAAG,KAAK,CAAC;YAC5B,CAAC;QACH,CAAC;QACD,IAAI;YACF,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,KAAK;gBAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aismemory",
3
- "version": "0.6.2",
3
+ "version": "0.7.1",
4
4
  "description": "Persistent memory for AI agents. MCP server that connects to Agent Identity Service.",
5
5
  "mcpName": "ai.agentsandswarms/ais-memory",
6
6
  "type": "module",