CoAgent8 - Source API
    Preparing search index...

    Function paginateHistory

    • Renders a bounded page of public events without reading or writing storage.

      Parameters

      • h: History

        Validated snapshot whose ownership has already been checked.

      • handle: string

        Exact session handle bound into continuation cursors.

      • Optionalcursor: string

        Optional revision-bound base64url cursor, at most 512 characters.

      • limit: number = 50

        Maximum events, 1..100; defaults to 50.

      Returns {
          events: (
              ConversationEvent & {
                  fragment?: {
                      complete: boolean;
                      offsetBytes: number;
                      totalBytes: number;
                  };
              }
          )[];
          nextCursor: string
          | null;
          revision: string;
          schemaVersion: number;
          sessionHandle: string;
      }

      Events, safe UTF-8 fragments, and an opaque continuation cursor.

      On malformed cursor, changed revision or invalid page size.

      Metadata and text jointly consume the 240 KiB serialized page budget.