feat(plugins): add hosted web search client

This commit is contained in:
2026-09-01 02:03:17 +08:00
parent f3874e9070
commit fc68cf2951
9 changed files with 1558 additions and 0 deletions

View File

@@ -192,6 +192,11 @@ function capabilityBilling(value: unknown): CapabilityBillingReceiptV1 | null {
? { mode: 'external_account', status: 'external' }
: null;
}
if (billing.mode === 'platform_metered' && billing.status === 'receipt_unavailable') {
return exactKeys(billing, ['mode', 'status'])
? { mode: 'platform_metered', status: 'receipt_unavailable' }
: null;
}
if (billing.mode !== 'platform_metered' || typeof billing.reserved_points !== 'string'
|| !CAPABILITY_DECIMAL_PATTERN.test(billing.reserved_points)
|| billing.reserved_points.length > 32) return null;

View File

@@ -100,6 +100,11 @@ export type CapabilityBillingReceiptV1 =
actual_points: string;
usage_amount?: number;
unit?: string;
}
| {
/** Main-only projection used when a possibly-dispatched receipt cannot be read. */
mode: 'platform_metered';
status: 'receipt_unavailable';
};
export interface CapabilityResultV1<T = unknown> {