show subagent usage and active duration

This commit is contained in:
kingwl
2026-08-02 23:31:24 +08:00
parent baf133d134
commit b30686d634
35 changed files with 438 additions and 88 deletions

View File

@@ -65,6 +65,7 @@ import type { ContinuableSetupContribution } from './activation-setup-registry.t
import { listChildren as listSubagentChildren } from './list-children.ts'
import type { SubagentListEntry } from './list-children.ts'
import { snapshotSubagentDescriptor } from './descriptor.ts'
import { subagentTimingProjectionDefinition } from './projection.ts'
export * from './out-of-process.ts'
export { SubagentRunId } from './types.ts'
@@ -117,6 +118,7 @@ export type {
export type { ContinuableSetupContribution } from './activation-setup-registry.ts'
export type { SubagentListEntry } from './list-children.ts'
export type { SubagentRunEndInfo, SubagentRunInfo } from './types.ts'
export type { SubagentTimingProjection } from './projection-types.ts'
declare module 'cordis' {
interface Context {
@@ -186,6 +188,9 @@ export class SubagentService extends Service {
if (this.continuations === manager) this.continuations = undefined
}, 'subagents.continuationBinding()')
})
ctx.inject(['sessionProjections'], (projectionCtx) => {
projectionCtx.sessionProjections.register(subagentTimingProjectionDefinition)
})
}
/**