@chatpanel/sdk 0.30.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -495,12 +495,25 @@ export interface ExtractResponse {
495
495
  scanned?: boolean;
496
496
  /** Present on a page call. */
497
497
  page?: number;
498
- /** The page's text, on a page call. May be empty. */
498
+ /** The page's text, on a page call. May be empty. With `markdown`, headings are Markdown (`## Section`). */
499
499
  text?: string;
500
+ /** The pages' headings are written as Markdown (`##`, `###` …) — a PDF's headings found by size, by its own outline and by numbered titles; its running headers and footers are left out of the text. Absent: plain text. */
501
+ markdown?: boolean;
502
+ /** Per page, the page number printed on it (`'17'`, `'iv'`), read from its running header or footer; `null` where none is printed. Index 0 is page 1. */
503
+ labels?: Array<string | null>;
504
+ /** The document's own outline (a PDF's bookmarks), two levels deep. */
505
+ outline?: Array<ExtractOutlineEntry>;
500
506
  /** `chatpanel-extract`. */
501
507
  provider: string;
502
508
  ms: number;
503
509
  }
510
+ export interface ExtractOutlineEntry {
511
+ title: string;
512
+ /** The page it points at (1-based); 0 when it points nowhere. */
513
+ page: number;
514
+ /** 1 for a top-level entry, 2 under it. */
515
+ level: number;
516
+ }
504
517
  export interface ExtractContextRequest {
505
518
  /** The question the documents are read for — its content words pick the pages of a long document. */
506
519
  question: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatpanel/sdk",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Typed client for the local ChatPanel gateway — chat through the privacy proxy, search the user's history, read and write memory, follow team runs. Zero dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",