@dxos/compute - v0.16.0
    Preparing search index...

    Function testTraceService

    • Builds a TraceService layer that wraps each write into a fresh Message and forwards it to the provided TraceSink. Intended for tests and lightweight fixtures.

      Options:

      • meta: stamped on every emitted message (defaults to {}).
      • clock: timestamp source (defaults to Date.now). Pass a monotonic counter in tests to make event ordering deterministic when many writes happen in the same millisecond.

      Parameters

      • opts: {
            clock?: () => number;
            meta?: {
                conversation?: Ref<Unknown>;
                parentPid?: string;
                parentThread?: string;
                pid?: string;
                processName?: string;
                runId?: string;
                runtimeName?: string & Brand<"@dxos/compute/Trace/RuntimeName">;
                space?: string;
                thread?: string;
                toolCallId?: string;
                trigger?: Ref<Trigger.Trigger & OfKind<Object> & Unknown>;
            };
        } = {}

      Returns Layer<TraceService, never, TraceSink>