UNPKG

@stll/folio-agents

Version:

Framework-neutral LLM tool layer over folio's ai-edits engine: function-calling tools so an agent can read and mutate .docx documents through @stll/folio-core.

90 lines • 2.88 kB
import { FOLIO_TEXT_RANGE_JSON_SCHEMA } from "./operation-schema.js"; import { FolioAITextRangeHandle, FolioDocumentSectionHandle, FolioDocumentStoryHandle } from "@stll/folio-core/server"; export declare const FOLIO_STORY_HANDLE_JSON_SCHEMA: { readonly type: "object"; readonly properties: { readonly type: { readonly type: "string"; readonly enum: readonly ["main", "header", "footer", "footnote", "endnote"]; }; readonly relationshipId: { readonly type: "string"; }; readonly noteId: { readonly type: "integer"; }; }; readonly required: readonly ["type"]; readonly additionalProperties: false; }; export declare const FOLIO_SECTION_HANDLE_JSON_SCHEMA: { readonly type: "object"; readonly properties: { readonly type: { readonly type: "string"; readonly enum: readonly ["headingSection"]; }; readonly story: { readonly type: "string"; readonly enum: readonly ["main"]; }; readonly headingBlockId: { readonly type: "string"; }; readonly headingTextHash: { readonly type: "string"; }; readonly headingLevel: { readonly type: "integer"; readonly minimum: 1; readonly maximum: 9; }; }; readonly required: readonly ["type", "story", "headingBlockId", "headingTextHash", "headingLevel"]; readonly additionalProperties: false; }; export declare const FOLIO_SCOPED_HANDLE_JSON_SCHEMA: { readonly type: "object"; readonly properties: { readonly type: { readonly type: "string"; readonly enum: readonly ["main", "header", "footer", "footnote", "endnote", "headingSection"]; }; readonly story: { readonly type: "string"; readonly enum: readonly ["main"]; }; readonly relationshipId: { readonly type: "string"; }; readonly noteId: { readonly type: "integer"; }; readonly headingBlockId: { readonly type: "string"; }; readonly headingTextHash: { readonly type: "string"; }; readonly headingLevel: { readonly type: "integer"; readonly minimum: 1; readonly maximum: 9; }; }; readonly required: readonly ["type"]; readonly additionalProperties: false; }; export declare const FOLIO_COMMENT_ID_JSON_SCHEMA: { readonly type: "string"; readonly description: "The comment id string from `read_comments`."; }; export type FolioAgentCommentId = { raw: string; numeric: number; }; export declare const decodeSectionHandle: (value: unknown) => FolioDocumentSectionHandle | null; export declare const decodeStoryHandle: (value: unknown) => FolioDocumentStoryHandle | null; export declare const decodeMainStoryTextRangeHandle: (value: unknown) => FolioAITextRangeHandle | null; export declare const decodeCommentId: (value: unknown) => FolioAgentCommentId | null; export { FOLIO_TEXT_RANGE_JSON_SCHEMA };