UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

23 lines • 2.29 kB
import type { NotionAccessor } from '../../accessor/notion.ts'; import { type ByteSource } from '../../io/types.ts'; import type { DirListing, FileStat, PathSpec } from '../../types.ts'; import { BaseVFS } from '../base.ts'; import type { Handed } from '../types.ts'; export declare const VFS_MD = "```text\n{prefix}\n pages/ # the page tree\n <page-title>__<page-id>/\n page.json\n <child-page-title>__<child-id>/\n page.json\n databases/ # shared databases\n <database-title>__<database-id>/\n database.json\n <data-source-title>__<data-source-id>/\n data_source.json\n rows.jsonl\n```\n\n- `page.json` holds the page's metadata, its body rendered as Markdown\n and its raw blocks (nested blocks under `children`).\n- A database is a container plus one or more data sources.\n `database.json` holds the container's identity and its `data_sources`\n stubs, `data_source.json` the typed property schema, and `rows.jsonl`\n the rows, one JSON line each: the row page's `page.json` without the\n body, plus `path`, that `page.json`'s path below the data source\n directory. Row directories are not listed; open one by its path.\n- Titles are sanitized. Don't construct paths: `ls` the parent\n directory, or take a row's `path` from `rows.jsonl`.\n- `ntn` takes ids as positional operands, not flags:\n `ntn pages get <page-id>`, `ntn datasources query <data-source-id>`,\n `ntn datasources resolve <database-id>`."; /** * Notion's functions over its accessor, which the node and browser * packages build over their own transport. */ export declare class NotionVFS extends BaseVFS<NotionAccessor> { readonly handed: { readonly readdir: readonly ["entry", "parent"]; readonly read: readonly ["parent"]; readonly firstLines: readonly ["parent"]; readonly stat: readonly ["entry", "parent"]; }; readdir(path: PathSpec, handed?: Handed): Promise<FileStat[] | DirListing>; read(path: PathSpec, handed?: Handed): Promise<ByteSource>; firstLines(path: PathSpec, n: number, handed?: Handed): Promise<Uint8Array | null>; stat(path: PathSpec, handed?: Handed): Promise<FileStat>; } //# sourceMappingURL=notion.d.ts.map