diff options
Diffstat (limited to 'packages/kernel/src/contracts/runtime.ts')
| -rw-r--r-- | packages/kernel/src/contracts/runtime.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/kernel/src/contracts/runtime.ts b/packages/kernel/src/contracts/runtime.ts index 8917709..b7fe23c 100644 --- a/packages/kernel/src/contracts/runtime.ts +++ b/packages/kernel/src/contracts/runtime.ts @@ -90,6 +90,16 @@ export interface RunTurnInput { * emitted (backward-compatible with callers that don't yet pass a logger). */ readonly logger?: Logger; + + /** + * Optional monotonic-ish clock (milliseconds) for emitting wall-clock timing + * on outward events: per-step `step-complete` (ttft/decode/genTotal), tool + * execution `durationMs` on `tool-result`, and turn `durationMs` on `done`. + * Injected (not ambient) so the runtime stays pure and deterministic in tests. + * If omitted, the runtime emits no such timing (the optional fields stay + * absent) — backward-compatible with callers that don't provide a clock. + */ + readonly now?: () => number; } /** |
