@burdenoff/fe-libs 2026.1027.14 → 2026.1028.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.
@@ -1,6 +1,6 @@
1
1
  import { AssistantUiCatalogue } from './uiActions/uiCatalogue';
2
2
  import { ClientToolManifestEntry } from '../agent-tools/adapters/assistant';
3
- import { AssistantMode, AssistantPromptPart, AssistantRawMessage, AssistantTokenUsage, AssistantSandboxAuthContext, AssistantArtifact, AssistantSessionInfo, DownloadedAssistantArtifact, StreamAccess } from './types';
3
+ import { AiCreditLedger, AssistantMode, AssistantPromptPart, AssistantRawMessage, AssistantTokenUsage, AssistantSandboxAuthContext, AssistantArtifact, AssistantSessionInfo, DownloadedAssistantArtifact, StreamAccess } from './types';
4
4
  import { SandboxWriteCapabilities, WriteApprovalMode, WriteExecutionState } from './writeProposals';
5
5
  import { WriteReplyKind, WriteReplyOrigin } from './writeReplyBinder';
6
6
  /**
@@ -587,5 +587,20 @@ export declare function downloadAssistantArtifact(sandboxId: string, workspaceId
587
587
  * token; the download is authorised by the sandbox's proxy token.
588
588
  */
589
589
  mode: AssistantMode | undefined, authContext: AssistantSandboxAuthContext): Promise<DownloadedAssistantArtifact>;
590
- export declare function checkAssistantAiCredits(workspaceId: string, authContext: AssistantSandboxAuthContext): Promise<boolean>;
591
- export declare function reportAssistantAiTokenUsage(workspaceId: string, sessionId: string, messageId: string, model: string | undefined, tokens: AssistantTokenUsage, authContext: AssistantSandboxAuthContext): Promise<void>;
590
+ /**
591
+ * The product key to charge through the shared, product-keyed operations in
592
+ * wspace-prompts-svc (BOFF-3732), or null when the product's own service owns
593
+ * the credit mutations. Before the shared operations existed, every product
594
+ * that switched credits on called the one `checkAiCredits` /
595
+ * `reportAiTokenUsage` pair in the supergraph and was billed against that
596
+ * service's quota.
597
+ */
598
+ export declare function sharedAiCreditProduct(product: string | undefined, ledger: AiCreditLedger | undefined): string | null;
599
+ /**
600
+ * Pre-flight AI-credit check. Rejects with QUOTA_EXHAUSTED when the product's
601
+ * budget is spent. `product` + `ledger` select the operations (see
602
+ * `sharedAiCreditProduct`); with no product it is the product-service mutation
603
+ * this function has always called.
604
+ */
605
+ export declare function checkAssistantAiCredits(workspaceId: string, authContext: AssistantSandboxAuthContext, product?: string, ledger?: AiCreditLedger): Promise<boolean>;
606
+ export declare function reportAssistantAiTokenUsage(workspaceId: string, sessionId: string, messageId: string, model: string | undefined, tokens: AssistantTokenUsage, authContext: AssistantSandboxAuthContext, product?: string, ledger?: AiCreditLedger): Promise<void>;