@stll/folio-agents 0.6.1 → 0.8.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.
- package/dist/execute.js +50 -5
- package/dist/operation-schema.d.ts +615 -25
- package/dist/operation-schema.js +154 -8
- package/dist/parse.d.ts +14 -1
- package/dist/parse.js +149 -10
- package/dist/tools.js +52 -21
- package/dist/types.d.ts +14 -4
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FolioAITextRangeHandle, FolioDocumentOperationIssue, FolioDocumentOperationReceipt, FolioDocumentOutlineEntry, FolioDocumentSectionHandle, FolioDocumentStoryHandle } from "@stll/folio-core/server";
|
|
1
|
+
import { FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FolioAITextRangeHandle, FolioDocumentOperationIssue, FolioDocumentOperationReceipt, FolioDocumentOutlineEntry, FolioDocumentSectionHandle, FolioDocumentStoryHandle, FolioReviewChange } from "@stll/folio-core/server";
|
|
2
2
|
|
|
3
3
|
//#region src/types.d.ts
|
|
4
4
|
/**
|
|
@@ -58,6 +58,15 @@ type FolioAgentBlock = {
|
|
|
58
58
|
blockId: string;
|
|
59
59
|
kind: string;
|
|
60
60
|
text: string;
|
|
61
|
+
/**
|
|
62
|
+
* Normalized-text hash of this block at read time. Echo it back as
|
|
63
|
+
* `precondition.blockTextHash` on a `suggest_changes` / `add_comment`
|
|
64
|
+
* operation targeting this block so the apply call is guarded against
|
|
65
|
+
* edits made to the document between this read and that apply — without
|
|
66
|
+
* it, only same-call staleness within one `suggest_changes` batch is
|
|
67
|
+
* caught.
|
|
68
|
+
*/
|
|
69
|
+
blockTextHash: string;
|
|
61
70
|
};
|
|
62
71
|
/** One main-story `find_text` match. Existing consumers can keep using its block and range directly. */
|
|
63
72
|
type FolioAgentTextMatch = {
|
|
@@ -65,7 +74,8 @@ type FolioAgentTextMatch = {
|
|
|
65
74
|
story?: {
|
|
66
75
|
type: "main";
|
|
67
76
|
};
|
|
68
|
-
blockId: string; /**
|
|
77
|
+
blockId: string; /** Normalized-text hash of the whole containing block; see {@link FolioAgentBlock.blockTextHash}. */
|
|
78
|
+
blockTextHash: string; /** Stable handle that can be passed directly to `show_in_document` or a range operation. */
|
|
69
79
|
range: FolioAITextRangeHandle; /** 0-based index of this occurrence within its block. */
|
|
70
80
|
occurrenceInBlock: number; /** Real rendered page when a live paginated surface supplies it. */
|
|
71
81
|
page?: number;
|
|
@@ -136,10 +146,10 @@ type FolioAgentComment = {
|
|
|
136
146
|
quote: string;
|
|
137
147
|
replies: FolioAgentCommentReply[];
|
|
138
148
|
};
|
|
139
|
-
/** A pending tracked change
|
|
149
|
+
/** A pending tracked change, shaped to match {@link FolioDocxReviewer.getChanges}. */
|
|
140
150
|
type FolioAgentChange = {
|
|
141
151
|
id: string;
|
|
142
|
-
type: "
|
|
152
|
+
type: FolioReviewChange["type"];
|
|
143
153
|
author: string;
|
|
144
154
|
text: string;
|
|
145
155
|
blockId: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/folio-agents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "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.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"test": "bun test src"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@stll/folio-core": "^0.
|
|
57
|
+
"@stll/folio-core": "^0.12.0"
|
|
58
58
|
},
|
|
59
59
|
"main": "./dist/index.js",
|
|
60
60
|
"types": "./dist/index.d.ts"
|