@cerebriline/core 4.100.241 → 4.100.243
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/document-reader-child.js +23 -0
- package/dist/extensions/tools/executors/document/ocr.d.ts +5 -0
- package/dist/extensions/tools/executors/document/read-job.d.ts +68 -0
- package/dist/extensions/tools/executors/document/read-process.d.ts +52 -0
- package/dist/extensions/tools/executors/document/read-protocol.d.ts +65 -0
- package/dist/extensions/tools/executors/document/recognition.d.ts +2 -9
- package/dist/extensions/tools/executors/document-extract.d.ts +33 -5
- package/dist/extensions/tools/librarian-tools.d.ts +2 -5
- package/dist/hub/daemon/entry.js +582 -580
- package/dist/hub/index.js +567 -565
- package/dist/index.js +711 -707
- package/dist/runtime/orchestration/runtime-builder.d.ts +13 -0
- package/dist/runtime/orchestration/session-runtime.d.ts +2 -0
- package/dist/runtime/safety/loop-detection.d.ts +13 -0
- package/dist/services/retrieval/catalogue.d.ts +29 -2
- package/dist/services/retrieval/running-heads.d.ts +38 -0
- package/package.json +4 -4
|
@@ -8,6 +8,19 @@ export declare function createTeamName(): string;
|
|
|
8
8
|
* nodes agents are actually placed on.
|
|
9
9
|
*/
|
|
10
10
|
export declare function resolveSessionAgentNodes(config: CoreSessionConfig): NonNullable<CoreSessionConfig["agentNodes"]>;
|
|
11
|
+
/**
|
|
12
|
+
* What to tell a model that calls a delegation tool this session withholds.
|
|
13
|
+
*
|
|
14
|
+
* The rejection it got before named every tool on offer and no cause, so it
|
|
15
|
+
* read as a transient failure and the same call came back. This says why, what
|
|
16
|
+
* to do instead, and that asking again will not change the answer.
|
|
17
|
+
*/
|
|
18
|
+
export declare function describeWithheldDelegationTools(input: {
|
|
19
|
+
offered: readonly string[];
|
|
20
|
+
subagentsEnabled: boolean;
|
|
21
|
+
serialised: boolean;
|
|
22
|
+
multipleNodes: boolean;
|
|
23
|
+
}): Record<string, string>;
|
|
11
24
|
export declare class DefaultRuntimeBuilder implements RuntimeBuilder {
|
|
12
25
|
private readonly teamRuntimeEntries;
|
|
13
26
|
build(input: RuntimeBuilderInput): Promise<RuntimeEnvironment>;
|
|
@@ -38,6 +38,8 @@ export interface BuiltRuntime {
|
|
|
38
38
|
configuredAgents?: readonly ConfiguredAgentConfig[];
|
|
39
39
|
extensions?: AgentConfig["extensions"];
|
|
40
40
|
completionPolicy?: AgentConfig["completionPolicy"];
|
|
41
|
+
/** Why a tool this session withholds is absent, by tool name. */
|
|
42
|
+
unavailableToolReasons?: Record<string, string>;
|
|
41
43
|
registerLeadAgent?: (agent: LeadAgentHandle) => void;
|
|
42
44
|
shutdown: (reason: string) => Promise<void> | void;
|
|
43
45
|
}
|
|
@@ -106,6 +106,19 @@ export declare const POLLING_TOOL_NAMES: ReadonlySet<string>;
|
|
|
106
106
|
* real revision.
|
|
107
107
|
*/
|
|
108
108
|
export declare function loopResultSignature(output: unknown): string;
|
|
109
|
+
/**
|
|
110
|
+
* A call that moves its own subject, so the same arguments ask a new question
|
|
111
|
+
* every time: `browser` `scroll_down` shows the next viewport, and reading a
|
|
112
|
+
* long page is that one call sent again and again. The consecutive rule's
|
|
113
|
+
* premise -- "the arguments have not changed, so neither will the result" --
|
|
114
|
+
* is false for it. Reported 2026-10-09: seven scrolls down one dashboard, a
|
|
115
|
+
* different screenshot after each, and the run stopped at the seventh.
|
|
116
|
+
*
|
|
117
|
+
* Only the consecutive rule is lifted. The answer is still compared, so a
|
|
118
|
+
* scroll that has reached the end of the page -- same screenshot, same console
|
|
119
|
+
* -- is caught by the no-progress cycle like any other call.
|
|
120
|
+
*/
|
|
121
|
+
export declare function callMovesItsOwnSubject(call: LoopDetectionCall): boolean;
|
|
109
122
|
export interface LoopCheckResult {
|
|
110
123
|
softWarning: boolean;
|
|
111
124
|
hardEscalation: boolean;
|
|
@@ -117,7 +117,9 @@ export interface BookImage {
|
|
|
117
117
|
export interface SourceImageInput {
|
|
118
118
|
/** The name the source's text links it by: `images/<file>`. */
|
|
119
119
|
file: string;
|
|
120
|
-
|
|
120
|
+
/** The picture's bytes, or `path`: a file holding them, read when it is filed. */
|
|
121
|
+
data?: Uint8Array;
|
|
122
|
+
path?: string;
|
|
121
123
|
mediaType: string;
|
|
122
124
|
width?: number;
|
|
123
125
|
height?: number;
|
|
@@ -151,8 +153,13 @@ export interface BookMatch {
|
|
|
151
153
|
book: LibraryBook;
|
|
152
154
|
source?: BookSource;
|
|
153
155
|
reason: "same file" | "same link" | "same isbn" | "same title and author" | "same title" | "similar text";
|
|
154
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* The share of the text the two have in common, 0 to 1: for "similar
|
|
158
|
+
* text", and for a title match when both have text to compare.
|
|
159
|
+
*/
|
|
155
160
|
similarity?: number;
|
|
161
|
+
/** The running heads of `source`, when it has pages: what document it is. */
|
|
162
|
+
runningHeads?: string[];
|
|
156
163
|
}
|
|
157
164
|
export interface FindSimilarInput {
|
|
158
165
|
sha256?: string;
|
|
@@ -172,7 +179,21 @@ export type ExportScope = {
|
|
|
172
179
|
shelfId: number;
|
|
173
180
|
} | {
|
|
174
181
|
bookId: number;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Whatever was ticked, together: whole sections, whole shelves and single
|
|
185
|
+
* books, from anywhere in the Library. A section or shelf brings
|
|
186
|
+
* everything on it; a book alone brings its shelf and section with only
|
|
187
|
+
* that book on them.
|
|
188
|
+
*/
|
|
189
|
+
| {
|
|
190
|
+
selection: ExportSelection;
|
|
175
191
|
};
|
|
192
|
+
export interface ExportSelection {
|
|
193
|
+
sectionIds?: readonly number[];
|
|
194
|
+
shelfIds?: readonly number[];
|
|
195
|
+
bookIds?: readonly number[];
|
|
196
|
+
}
|
|
176
197
|
export interface ExportResult {
|
|
177
198
|
file: string;
|
|
178
199
|
books: number;
|
|
@@ -349,6 +370,12 @@ export declare class Catalogue {
|
|
|
349
370
|
* trash are included, and say so.
|
|
350
371
|
*/
|
|
351
372
|
findSimilar(input: FindSimilarInput): BookMatch[];
|
|
373
|
+
/**
|
|
374
|
+
* A source's running heads. Kept in its metadata from when it was added;
|
|
375
|
+
* a source added before that has them read from its text once, here, and
|
|
376
|
+
* kept. Empty for a source with no pages, or no text left to read.
|
|
377
|
+
*/
|
|
378
|
+
private sourceRunningHeads;
|
|
352
379
|
private bookFile;
|
|
353
380
|
/** Write `book.json`: what the folder is, for a person and for import. */
|
|
354
381
|
writeBookFile(bookId: number): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A document's running heads: the lines printed on most of its pages, and
|
|
3
|
+
* what they say about which document it is.
|
|
4
|
+
*
|
|
5
|
+
* Text in common says two documents are related, not that one is a version of
|
|
6
|
+
* the other. Measured on a folder of AMD's processor manuals: two Processor
|
|
7
|
+
* Programming References for different processors share 77% of their five-word
|
|
8
|
+
* runs, more than two revisions of one revision guide (68%), because whole
|
|
9
|
+
* register chapters are reused from product to product. No threshold on the
|
|
10
|
+
* text separates them. The running head does: "55803 Rev 0.54 - Sep 12, 2019
|
|
11
|
+
* PPR for AMD Family 17h Model 31h B0" against "56176 Rev 3.06 - Jul 17, 2019
|
|
12
|
+
* PPR for AMD Family 17h Model 71h B0". Between revisions of one document only
|
|
13
|
+
* the revision and the date change; between two documents the number and the
|
|
14
|
+
* subject do.
|
|
15
|
+
*
|
|
16
|
+
* So the head is not stripped as boilerplate: it is read as the document's
|
|
17
|
+
* name. Only its identifying part is compared -- the tokens that carry a
|
|
18
|
+
* digit, once revision numbers and dates are taken out -- because the words
|
|
19
|
+
* around them ("AMD64 Technology", "PPR for AMD Family") are shared by a
|
|
20
|
+
* whole series.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* The lines that repeat, word for word, on most pages. A page number printed
|
|
24
|
+
* on the same line makes it differ from page to page, so it drops out; a
|
|
25
|
+
* table heading that recurs is kept, and carries no identity (see below).
|
|
26
|
+
* Empty for a document without pages: an ebook has none to repeat on.
|
|
27
|
+
*/
|
|
28
|
+
export declare function runningHeads(markdown: string): string[];
|
|
29
|
+
/** What the running heads say the document is, as sorted tokens; empty if they say nothing. */
|
|
30
|
+
export declare function documentIdentity(heads: readonly string[]): string[];
|
|
31
|
+
/**
|
|
32
|
+
* Whether two documents are the same one by their running heads: true when
|
|
33
|
+
* the identities match, false when both have one and they differ, undefined
|
|
34
|
+
* when either says nothing -- then the text and the title decide, as before.
|
|
35
|
+
*/
|
|
36
|
+
export declare function sameDocument(a: readonly string[] | undefined, b: readonly string[] | undefined): boolean | undefined;
|
|
37
|
+
/** The head that names the document, for a message: the first with an identity. */
|
|
38
|
+
export declare function namingHead(heads: readonly string[] | undefined): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerebriline/core",
|
|
3
3
|
"description": "Cerebriline Core SDK for Node Runtime",
|
|
4
|
-
"version": "4.100.
|
|
4
|
+
"version": "4.100.243",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/mann1x/cline.git",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"ws": "^8.20.0",
|
|
70
70
|
"yaml": "^2.8.2",
|
|
71
71
|
"zod": "^4.3.6",
|
|
72
|
-
"@cerebriline/agents": "4.100.
|
|
73
|
-
"@cerebriline/llms": "4.100.
|
|
74
|
-
"@cerebriline/shared": "4.100.
|
|
72
|
+
"@cerebriline/agents": "4.100.243",
|
|
73
|
+
"@cerebriline/llms": "4.100.243",
|
|
74
|
+
"@cerebriline/shared": "4.100.243"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"posthog-node": "^5.8.0"
|