Skip to main content

Type Alias: WikiPageIdProblem

WikiPageIdProblem = "type" | "empty" | "length" | "character" | "segment" | "dot" | "edge" | "reserved" | "outside"

Defined in: packages/agentos/src/cognition/substrate/memory/wiki/WikiPageId.ts:33

Why a wiki page id was refused:

  • 'type': the id is not a string.
  • 'empty': the id is an empty string.
  • 'length': the id is longer than MAX_WIKI_PAGE_ID_LENGTH characters, or a name in it holds more than 200 bytes in UTF-8, the most a name built from data may hold (MAX_PATH_NAME_BYTES in core/utils/pathName).
  • 'character': the id holds a backslash, a colon, one of ", *, <, >, ? and |, or a control character (U+0000 to U+001F, or U+007F), a NUL byte among them. On Windows a backslash separates folders, a colon names a drive or a file's stream, and the other six are refused in a name.
  • 'segment': a name between slashes is empty: the id starts or ends with /, or holds //.
  • 'dot': a name starts with a dot, . and .. among them.
  • 'edge': a name starts or ends with a space, or ends with a dot. Windows drops those from a name, so the name would be another's (entities./x is entities/x there).
  • 'reserved': the id is index in any case, which names the catalog, index.md (on a filesystem that ignores case, INDEX.md is the same file).
  • 'outside': the page's file would not be inside the memory folder.