fix(tauri): update @reserved annotations + remove dead SaaS client methods
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

- Update 9 @reserved → @connected for commands with frontend consumers:
  zclaw_status, zclaw_start, zclaw_stop, zclaw_restart, zclaw_doctor,
  viking_add_with_metadata, viking_store_with_summaries,
  trigger_execute, scheduled_task_create
- Remove 10 dead SaaS client methods with zero callers:
  healthCheck, listDevices (saas-client.ts)
  getRelayTask, getUsage/relay (saas-relay.ts)
  listPrompts, getPrompt, listPromptVersions, getPromptVersion (saas-prompt.ts)
  getPlan, getUsage/billing (saas-billing.ts)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-04-05 00:22:45 +08:00
parent ac24d15bab
commit f846f3d632
8 changed files with 9 additions and 105 deletions

View File

@@ -89,17 +89,12 @@ import type {
TotpResultResponse,
SaaSModelInfo,
SaaSConfigItem,
DeviceInfo,
SyncConfigRequest,
ConfigDiffResponse,
ConfigSyncResult,
SaaSErrorResponse,
RelayTaskInfo,
UsageStats,
PromptCheckResult,
PromptTemplateInfo,
PromptVersionInfo,
PaginatedResponse,
AgentTemplateAvailable,
AgentTemplateFull,
AgentConfigFromTemplate,
@@ -310,21 +305,6 @@ export class SaaSClient {
throw new SaaSApiError(0, 'UNKNOWN', '请求失败');
}
// --- Health ---
/**
* Quick connectivity check against the SaaS backend.
*/
async healthCheck(): Promise<boolean> {
try {
await this.request<unknown>('GET', '/api/health', undefined, 5000);
return true;
} catch (e) {
saasLog.debug('Health check failed', { error: e });
return false;
}
}
// --- Device Endpoints ---
/**
@@ -353,14 +333,6 @@ export class SaaSClient {
});
}
/**
* List devices registered for the current account.
*/
async listDevices(): Promise<DeviceInfo[]> {
const res = await this.request<{ items: DeviceInfo[] }>('GET', '/api/v1/devices');
return res.items;
}
// --- Model Endpoints ---
/**
@@ -490,17 +462,11 @@ export interface SaaSClient {
// --- Relay (saas-relay.ts) ---
listRelayTasks(query?: { status?: string; page?: number; page_size?: number }): Promise<RelayTaskInfo[]>;
getRelayTask(taskId: string): Promise<RelayTaskInfo>;
retryRelayTask(taskId: string): Promise<{ ok: boolean; task_id: string }>;
chatCompletion(body: unknown, signal?: AbortSignal): Promise<Response>;
getUsage(params?: { from?: string; to?: string; provider_id?: string; model_id?: string }): Promise<UsageStats>;
// --- Prompt OTA (saas-prompt.ts) ---
checkPromptUpdates(deviceId: string, currentVersions: Record<string, number>): Promise<PromptCheckResult>;
listPrompts(params?: { category?: string; source?: string; status?: string; page?: number; page_size?: number }): Promise<PaginatedResponse<PromptTemplateInfo>>;
getPrompt(name: string): Promise<PromptTemplateInfo>;
listPromptVersions(name: string): Promise<PromptVersionInfo[]>;
getPromptVersion(name: string, version: number): Promise<PromptVersionInfo>;
// --- Telemetry (saas-telemetry.ts) ---
reportTelemetry(data: {
@@ -531,9 +497,7 @@ export interface SaaSClient {
incrementUsageDimension(dimension: string, count?: number): Promise<import('./saas-billing').UsageIncrementResult>;
reportUsageFireAndForget(dimension: string, count?: number): void;
listPlans(): Promise<import('./saas-types').BillingPlan[]>;
getPlan(planId: string): Promise<import('./saas-types').BillingPlan>;
getSubscription(): Promise<import('./saas-types').SubscriptionInfo>;
getUsage(): Promise<import('./saas-types').UsageQuota>;
createPayment(data: import('./saas-types').CreatePaymentRequest): Promise<import('./saas-types').PaymentResult>;
getPaymentStatus(paymentId: string): Promise<import('./saas-types').PaymentStatus>;
}