No JSDoc comment in source yet.
API
@Component()
export class UsageRecorder implements UsageRecording {
@Use() private readonly usage!: UsageStore;
@Use() private readonly clock!: Clock;
@Use() private readonly projects!: Projects;
async record(ctx: UsageContext, msg: AmspRecord, source: "stream" | "standalone" = "stream"): Promise<void>;
}Dependencies & Wiring
Extracted from class decoratorsMethods (1)
record
async record(ctx: UsageContext, msg: AmspRecord, source: "stream" | "standalone" = "stream"): Promise<void>Standalone usage — a request beside the Session's own (its title, or a tool request through
ProjectModelRequests) — never touches the Session's request bookkeeping: its token_usage is
one row, and its failed request_end one 0-token row with the status, even while the Session's
own request or compaction is in flight. ctx.purpose is written to the row as it is.
@paramctx
UsageContext@parammsg
AmspRecord@paramsource?
"stream" | "standalone"@returns
Promise<void>