feat(cloud): report planner transport status
This commit is contained in:
@@ -63,6 +63,7 @@ export interface HostRecord {
|
||||
host_id: string;
|
||||
address: string | null;
|
||||
last_seen_at: string;
|
||||
planner_transport: "direct" | "cloud";
|
||||
}
|
||||
|
||||
export type PluginEntryPointKind = "driver" | "tool" | "skill";
|
||||
|
||||
@@ -61,6 +61,9 @@ const hostUsageEvents = ref<TokenUsageEvent[]>([]);
|
||||
const selectedUser = computed(
|
||||
() => users.value.find((user) => user.id === selectedUserId.value) ?? null,
|
||||
);
|
||||
const selectedHost = computed(
|
||||
() => hosts.value.find((host) => host.host_id === selectedHostId.value) ?? null,
|
||||
);
|
||||
const deviceKey = (device: Pick<DeviceRecord, "host_id" | "device_id">) =>
|
||||
`${device.host_id}\u0000${device.device_id}`;
|
||||
|
||||
@@ -386,7 +389,10 @@ onMounted(() => void refresh());
|
||||
<label>Daily Cloud-proxy token budget <input v-model="hostDailyTokenBudget" inputmode="numeric" placeholder="Unlimited" /></label>
|
||||
</div>
|
||||
<div class="actions"><button class="primary" :disabled="saving || !selectedHostId" @click="saveHostPolicy">Save Host policy {{ hostPolicyRevision === null ? "" : `(revision ${hostPolicyRevision})` }}</button></div>
|
||||
<p v-if="hostUsage" class="muted">
|
||||
<p v-if="selectedHost?.planner_transport === 'direct'" class="muted">
|
||||
Direct provider transport: unmetered. Cloud cannot enforce or verify this Host's token budget.
|
||||
</p>
|
||||
<p v-else-if="hostUsage" class="muted">
|
||||
{{ hostUsage.usage_day }}: used {{ hostUsage.used_tokens }}, reserved {{ hostUsage.reserved_tokens }},
|
||||
remaining {{ hostUsage.remaining_tokens ?? "unmetered" }} tokens.
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user