feat(cloud): enforce host governance budgets
Tests / Test passed: 662

This commit is contained in:
2026-07-13 22:56:31 +08:00
parent 2cd314b183
commit b4803f90e6
28 changed files with 1311 additions and 14 deletions
+38
View File
@@ -96,3 +96,41 @@ export interface CloudUser {
updated_at: string;
last_login_at: string | null;
}
export interface UserListResponse {
items: CloudUser[];
limit: number;
offset: number;
}
export interface DeviceTarget {
host_id: string;
device_id: string;
}
export interface UserSubmissionPolicy {
user_id: string;
revision: number;
submission_enabled: boolean;
allowed_host_ids: string[] | null;
allowed_device_targets: DeviceTarget[] | null;
updated_at: string;
}
export interface HostGovernancePolicy {
host_id: string;
revision: number;
self_submission_enabled: boolean;
max_active_tasks: number | null;
daily_token_budget: number | null;
updated_at: string;
}
export interface HostTokenUsageSummary {
host_id: string;
usage_day: string;
daily_token_budget: number | null;
used_tokens: number;
reserved_tokens: number;
remaining_tokens: number | null;
}