feat(05-01): budget enforcement types, schemas, IPC channels, and database CRUD
- Add BudgetPolicyRecord, BudgetIncidentRecord, BudgetStatusSummary types - Add 6 IPC channels for budget operations in contracts.ts - Add Zod schemas for all budget payloads - Add DesktopApi entries for budget methods - Add database CRUD: saveBudgetPolicy, deleteBudgetPolicy, listBudgetPolicies, getBudgetPolicy, getActivePoliciesForRun, getSpentInWindow (cents aggregation), upsertBudgetIncident (D-08 dedup), resolveIncidentsForPolicy, resolveWarnIncidentsForPolicy, autoCloseExpiredIncidents - Update recordRunCompletion to include project_id in cost_entries INSERT - Add migration 18: convert agent budgetMonthlyUsd to budget_policies rows - Add preload bridge stubs for budget IPC channels Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
245eb4ccf3
commit
3a68cfa707
4 files changed
+408
-3
No files matched your search
@@ -95,6 +95,12 @@ const api: DesktopApi = {
|
||||
listAgentSkills: (companyId, agentId) =>
|
||||
ipcRenderer.invoke(IPC_CHANNELS.listAgentSkills, { companyId, agentId }),
|
||||
listWakeupRequests: (input) => ipcRenderer.invoke(IPC_CHANNELS.listWakeupRequests, input),
|
||||
saveBudgetPolicy: (input) => ipcRenderer.invoke(IPC_CHANNELS.saveBudgetPolicy, input),
|
||||
deleteBudgetPolicy: (input) => ipcRenderer.invoke(IPC_CHANNELS.deleteBudgetPolicy, input),
|
||||
listBudgetPolicies: (companyId) => ipcRenderer.invoke(IPC_CHANNELS.listBudgetPolicies, companyId),
|
||||
listBudgetIncidents: (input) => ipcRenderer.invoke(IPC_CHANNELS.listBudgetIncidents, input),
|
||||
resolveBudgetIncident: (input) => ipcRenderer.invoke(IPC_CHANNELS.resolveBudgetIncident, input),
|
||||
getBudgetStatus: (companyId) => ipcRenderer.invoke(IPC_CHANNELS.getBudgetStatus, companyId),
|
||||
recoveryRetry: (taskId: string, agentId: string, companyId: string) =>
|
||||
ipcRenderer.invoke("recovery:retry", { taskId, agentId, companyId }),
|
||||
recoveryDismiss: (taskId: string) =>
|
||||
|
||||
Reference in new issue
Block a user