Q128: every model call of a run is recorded with its purpose and listed in the run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 20:55:18 -04:00
1 parent 1f484df894
commit 6afd7bef2a
25 files changed
+189 -22

No files matched your search

+3
View File
@@ -1,3 +1,4 @@
import type { RunRequestRecord } from "./provider-runtime-domain";
import type { ApprovalDrift } from "./approval-pin";
import type { DesktopResult } from "./result";
import type { AppSnapshot, SearchResultRecord } from "./domain";
@@ -207,6 +208,8 @@ export interface DesktopApi {
grantConnector(input: GrantConnectorInput): Promise<DesktopResult<AppSnapshot>>;
/** Approved deliverables whose content changed or vanished since approval, checked on disk now. */
approvalDrifts(input: { orgId: string }): Promise<DesktopResult<Record<string, ApprovalDrift>>>;
/** Every model call a task run made, in order: turns, goal audits and model checks. */
runRequests(input: { orgId: string; runId: string }): Promise<DesktopResult<RunRequestRecord[]>>;
revokeConnector(input: RevokeConnectorInput): Promise<DesktopResult<AppSnapshot>>;
search(input: SearchInput): Promise<DesktopResult<SearchResultRecord[]>>;
subscribe(callback: (event: RendererEvent) => void): () => void;
+1
View File
@@ -88,6 +88,7 @@ export const IPC_CHANNELS = {
refreshComposioAccounts: "agentcompany:refresh-composio-accounts",
grantConnector: "agentcompany:grant-connector",
approvalDrifts: "agentcompany:approval-drifts",
runRequests: "agentcompany:run-requests",
revokeConnector: "agentcompany:revoke-connector",
search: "agentcompany:search",
rendererEvent: "agentcompany:renderer-event",
+14
View File
@@ -43,3 +43,17 @@ export function currentProviderUsageWindow(now = new Date()): { start: string; e
const end = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth() + 1, 1));
return { start: start.toISOString(), end: end.toISOString() };
}
/** One model call of a task run, as the run's detail lists it. */
export interface RunRequestRecord {
id: string;
purpose: string;
model: string;
state: string;
errorMessage: string | null;
inputTokens: number | null;
outputTokens: number | null;
costCents: number | null;
createdAt: string;
completedAt: string | null;
}