@cortexkit/pi-anthropic-auth 2.16.4 → 2.16.5
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.js +1 -1
- package/dist/stream.d.ts +1 -1
- package/dist/stream.js +3 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -143,7 +143,7 @@ export default async function cortexKitPiAnthropicAuth(pi, options = {}) {
|
|
|
143
143
|
piForkEffortSnapshots.forget(sessionId);
|
|
144
144
|
workingMessageBySession.delete(sessionId);
|
|
145
145
|
sessionCacheActivity.forget(sessionId);
|
|
146
|
-
forgetPiMessageThread(sessionId);
|
|
146
|
+
forgetPiMessageThread(sessionId, 'session_closed');
|
|
147
147
|
}
|
|
148
148
|
await stopPiCacheKeep();
|
|
149
149
|
await closePiNativeRuntime(storagePath);
|
package/dist/stream.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { type PiQuotaWaitOptions } from './quota-wait.ts';
|
|
|
7
7
|
export declare function beginPiPrimaryTurn(storagePath: string, sessionId?: string): void;
|
|
8
8
|
export declare function endPiPrimaryTurn(storagePath: string, sessionId?: string): void;
|
|
9
9
|
export declare function untrackPiCacheKeepTurn(sessionId?: string): void;
|
|
10
|
-
export declare function forgetPiMessageThread(sessionId: string): void;
|
|
10
|
+
export declare function forgetPiMessageThread(sessionId: string, disposition?: 'session_closed' | 'session_deleted'): void;
|
|
11
11
|
export declare function clearPiStickyQuotaRetries(storagePath: string, sessionId: string): void;
|
|
12
12
|
/** Set or clear the test replacement for the wait between quota usage polls. */
|
|
13
13
|
export declare function __setPiQuotaCallPauseForTest(pause: QuotaManagerOptions['pauseBetweenQuotaCalls']): void;
|
package/dist/stream.js
CHANGED
|
@@ -8,7 +8,7 @@ import { getPiAccountStoragePath } from './paths.js';
|
|
|
8
8
|
import { registerPiPrimeSender } from './prime.js';
|
|
9
9
|
import { markPiAccountHold, withPiQuotaWait, } from './quota-wait.js';
|
|
10
10
|
import { buildPiOAuthMessagesUrl, createPiOAuthModelFetch, fetchPiOAuth, fetchPiStreamResponse, requirePiOAuthOrigin, } from './transport.js';
|
|
11
|
-
const messageThreads =
|
|
11
|
+
const messageThreads = MessageThreadTracker.withTailPersistence('pi');
|
|
12
12
|
const dumpResponseObservers = new WeakMap();
|
|
13
13
|
// Each session owns its lease; storage identifies which host may end it.
|
|
14
14
|
const primaryTurns = new Map();
|
|
@@ -50,8 +50,8 @@ function isPiPrimaryThreadRequest(storagePath, options, origin) {
|
|
|
50
50
|
typeof options.onResponse === 'function' &&
|
|
51
51
|
typeof options.onProviderStreamEvent === 'function');
|
|
52
52
|
}
|
|
53
|
-
export function forgetPiMessageThread(sessionId) {
|
|
54
|
-
messageThreads.forget(sessionId);
|
|
53
|
+
export function forgetPiMessageThread(sessionId, disposition = 'session_deleted') {
|
|
54
|
+
messageThreads.forget(sessionId, disposition);
|
|
55
55
|
}
|
|
56
56
|
/** Dump label for a physical send that failed before any response arrived. */
|
|
57
57
|
const PHYSICAL_SEND_FAILED = 'physical send failed before a response';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/pi-anthropic-auth",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"prepublishOnly": "bun run build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@cortexkit/anthropic-auth-core": "2.16.
|
|
39
|
+
"@cortexkit/anthropic-auth-core": "2.16.5"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@earendil-works/pi-ai": ">=0.86.1 <2",
|