@opengeni/db 0.27.11 → 0.28.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.
package/dist/index.d.ts CHANGED
@@ -3493,7 +3493,6 @@ export declare function applyContextCompaction(db: Database, input: {
3493
3493
  expectedAttemptId: string;
3494
3494
  replacementItems: Array<Record<string, unknown>>;
3495
3495
  summaryItem: Record<string, unknown>;
3496
- replacementInputTokens: number;
3497
3496
  clearRequestedCompaction?: boolean;
3498
3497
  eventPayload?: Record<string, unknown>;
3499
3498
  }): Promise<ApplyContextCompactionResult>;
@@ -3558,8 +3557,9 @@ export declare function recordSkippedContextCompaction(db: Database, input: {
3558
3557
  */
3559
3558
  export declare function nextSessionHistoryPosition(db: Database, workspaceId: string, sessionId: string): Promise<number>;
3560
3559
  /**
3561
- * Record the actual input-token count of the most recent turn's final model
3562
- * call, for the next turn's pre-read compaction trigger.
3560
+ * Replace the input-token count for the most recent authoritative terminal
3561
+ * response. Null means that response supplied no usable final-call count, so
3562
+ * the next turn must not reuse an older response's value for compaction.
3563
3563
  */
3564
3564
  export declare function setSessionLastInputTokensForTurnAttempt(db: Database, input: {
3565
3565
  workspaceId: string;
@@ -3567,7 +3567,7 @@ export declare function setSessionLastInputTokensForTurnAttempt(db: Database, in
3567
3567
  turnId: string;
3568
3568
  expectedExecutionGeneration: number;
3569
3569
  expectedAttemptId: string;
3570
- lastInputTokens: number;
3570
+ lastInputTokens: number | null;
3571
3571
  }): Promise<boolean>;
3572
3572
  /** The neutral boundary left as the sole active history row after a clear. */
3573
3573
  export declare function clearedContextMarkerItem(): Record<string, unknown>;
@@ -3593,8 +3593,8 @@ export declare class SessionContextBusyError extends Error {
3593
3593
  * reserved for an approval that paused mid-turn, and the API forbids a
3594
3594
  * clear while such an approval or active turn exists.
3595
3595
  *
3596
- * Also resets last_input_tokens to 0 so the next turn's compaction trigger
3597
- * starts fresh against the now-short context.
3596
+ * Also clears last_input_tokens because no provider has observed the new
3597
+ * context yet.
3598
3598
  *
3599
3599
  * Idempotent: a re-run supersedes the (now sole, already-marker) active row,
3600
3600
  * inserts another marker at the next position. The post-condition (one active
@@ -6568,3 +6568,4 @@ export declare function buildConnectionTokenResolver(db: Database, settings: Set
6568
6568
  export { withCodexTokenDeadline, type CodexAccountUsageSnapshot, type CodexAuthDeps, type CodexCredentialForRun, type CodexCredentialTokens, type CodexRateLimitResetCreditsAccountResult, type CodexTokenDeadlineClock, type CodexTokenDeadlineOptions, } from "./codex-token-resolver";
6569
6569
  export { buildHostConnectionTokenResolver, ConnectionRefreshHttpError, HostMcpCredentialBindingError, HostMcpCredentialScopeError, isPrivateAddress, normalizeBearerScheme, refreshOAuthConnectionCredential, type ConnectionBrokerDeps, type ConnectionCredentialForBroker, type ConnectionCredentialLookupInput, type ConnectionStatusGuard, type ConnectionTokenRefreshInput, type ConnectionTokenResolverOptions, type HostMcpCredentialResolverContext, type PermanentConnectionRefreshFailure, type RefreshTransportOptions, type ResolveConnectionCredentialInput, type ResolveConnectionCredentialResult, } from "./connection-token-resolver";
6570
6570
  export * from "./workspace-artifacts";
6571
+ export * from "./transcription-recordings";