@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.
- package/dist/shared/assistant/api.d.ts +18 -3
- package/dist/shared/assistant/api.js +215 -183
- package/dist/shared/assistant/createSandboxAssistantTransport.js +2 -2
- package/dist/shared/assistant/index.d.ts +1 -0
- package/dist/shared/assistant/operations.d.ts +8 -0
- package/dist/shared/assistant/operations.js +2 -2
- package/dist/shared/assistant/productAiCredits.d.ts +28 -0
- package/dist/shared/assistant/productAiCredits.js +64 -0
- package/dist/shared/assistant/types.d.ts +15 -0
- package/dist/shared/pages/AiPage.js +92 -66
- package/dist/shared/pages/ai/BreakdownPanel.d.ts +6 -0
- package/dist/shared/pages/ai/BreakdownPanel.js +117 -0
- package/dist/shared/pages/ai/CreditsPanel.d.ts +10 -0
- package/dist/shared/pages/ai/CreditsPanel.js +64 -0
- package/dist/shared/pages/ai/contracts.d.ts +35 -0
- package/dist/shared/pages/ai/contracts.js +93 -1
- package/dist/shared-assistant.js +310 -309
- package/package.json +1 -1
|
@@ -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
|
-
|
|
591
|
-
|
|
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>;
|