@autorag/librarian 2.6.0 → 2.6.2
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/agent/agent.d.ts +16 -0
- package/dist/agent/index.d.ts +2 -1
- package/dist/agent/query-peer-tool.d.ts +48 -0
- package/dist/cli/config.d.ts +2 -0
- package/dist/cli/index.js +1660 -1186
- package/dist/core.js +1785 -1312
- package/dist/dupey/filter.d.ts +1 -1
- package/dist/index.js +1787 -1312
- package/dist/mirror/index-store.d.ts +1 -1
- package/dist/mirror/index.d.ts +1 -1
- package/dist/mirror/sync.d.ts +3 -0
- package/dist/p2p/approval-store.d.ts +1 -0
- package/dist/p2p/simplex-query-store.d.ts +44 -0
- package/dist/p2p/simplex-server.d.ts +7 -2
- package/dist/p2p/simplex-transport.d.ts +7 -0
- package/package.json +1 -1
- package/skills/autorag/SKILL.md +8 -0
- package/skills/autorag-setup/SKILL.md +7 -0
package/dist/agent/agent.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ import type { ResultFeedback } from "../memory/memory.js";
|
|
|
9
9
|
import { type MinSyncSyncResult, type MinSyncVectorMethodOptions } from "../minsync/index.js";
|
|
10
10
|
import { type ParsedMirrorSyncResult } from "../mirror/sync.js";
|
|
11
11
|
import type { PolicyResolver } from "../p2p/policy-filter.js";
|
|
12
|
+
import type { SimplexQueryState } from "../p2p/simplex-query-store.js";
|
|
13
|
+
import { type SimplexTransport } from "../p2p/simplex-transport.js";
|
|
14
|
+
import type { PeerQueryResponse } from "../p2p/wire.js";
|
|
12
15
|
import { type DefaultParserRegistryOptions } from "../parser/index.js";
|
|
13
16
|
import { RetrievalEngine } from "../retrieval/engine.js";
|
|
14
17
|
import { RetrievalMethodRegistry } from "../retrieval/registry.js";
|
|
@@ -118,6 +121,12 @@ export interface AutoRAGThinkingOptions {
|
|
|
118
121
|
/** Thinking level for the verification/finalization phase. Default "high". */
|
|
119
122
|
readonly final?: AutoRAGThinkingLevel;
|
|
120
123
|
}
|
|
124
|
+
export interface PeerQueryOptions {
|
|
125
|
+
readonly port?: number;
|
|
126
|
+
readonly simplexDbPrefix?: string;
|
|
127
|
+
readonly openTransport?: () => Promise<SimplexTransport>;
|
|
128
|
+
readonly onResponse?: (state: SimplexQueryState, response: PeerQueryResponse) => void;
|
|
129
|
+
}
|
|
121
130
|
export interface AutoRAGAgentOptions {
|
|
122
131
|
model?: Model<Api>;
|
|
123
132
|
apiKey?: string;
|
|
@@ -149,6 +158,7 @@ export interface AutoRAGAgentOptions {
|
|
|
149
158
|
parserOptions?: DefaultParserRegistryOptions;
|
|
150
159
|
dupey?: DupeyCliOptions | false;
|
|
151
160
|
excludeExactDuplicates?: boolean;
|
|
161
|
+
excludePaths?: readonly string[];
|
|
152
162
|
datasourceSkills?: readonly DatasourceSkill[];
|
|
153
163
|
datasourceAccess?: DatasourceAccessContextOptions;
|
|
154
164
|
/** Non-fatal diagnostics from config/agent construction (e.g. skipped unknown datasources). */
|
|
@@ -157,6 +167,11 @@ export interface AutoRAGAgentOptions {
|
|
|
157
167
|
searchTimeoutMs?: number;
|
|
158
168
|
/** Maximum number of retrieval/tool executions allowed in one search. */
|
|
159
169
|
maxSearchToolCalls?: number;
|
|
170
|
+
/**
|
|
171
|
+
* Outbound SimpleX queries to trusted peer AutoRAG agents. Remote sessions
|
|
172
|
+
* never receive this tool.
|
|
173
|
+
*/
|
|
174
|
+
peerQuery?: PeerQueryOptions | false;
|
|
160
175
|
/** Restrict the agent to retrieval and result-emission tools for remote runs. */
|
|
161
176
|
remoteSession?: boolean;
|
|
162
177
|
/** Two-phase progressive answers with per-phase thinking control. Default enabled. */
|
|
@@ -228,6 +243,7 @@ export declare class AutoRAGAgent {
|
|
|
228
243
|
private readonly parserOptions;
|
|
229
244
|
private readonly dupeyOptions;
|
|
230
245
|
private readonly excludeExactDuplicates;
|
|
246
|
+
private readonly excludePaths;
|
|
231
247
|
private readonly baseSystemPromptConfig;
|
|
232
248
|
private readonly droppedCallerToolNames;
|
|
233
249
|
private readonly searchTimeoutMs;
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export type { AutoRAGAgentOptions, AutoRefreshOptions } from "./agent.js";
|
|
1
|
+
export type { AutoRAGAgentOptions, AutoRefreshOptions, PeerQueryOptions } from "./agent.js";
|
|
2
2
|
export { AutoRAGAgent } from "./agent.js";
|
|
3
3
|
export { buildDatasourceSkillsPrompt, createLoadDatasourceSkillTool, type DatasourceSkillProvider, datasourceSkillLocation, formatDatasourceSkillInvocation, LOAD_DATASOURCE_SKILL_TOOL_NAME, type LoadDatasourceSkillDetails, toDatasourceAgentSkill, } from "./datasource-skill.js";
|
|
4
4
|
export { createScanDuplicateDocumentsTool, SCAN_DUPLICATE_DOCUMENTS_TOOL_NAME, type ScanDuplicateDocumentsDetails, type ScanDuplicateDocumentsProvider, } from "./dupey-tool.js";
|
|
5
5
|
export type { AutoRAGEmittedResult, AutoRAGMappingEntry, AutoRAGResultsDetails, } from "./emit-results-tool.js";
|
|
6
6
|
export { createEmitResultsTool, EMIT_AUTORAG_RESULTS_TOOL_NAME, emitResultsSchema, } from "./emit-results-tool.js";
|
|
7
7
|
export { createJikjiFindTool, JIKJI_FIND_TOOL_NAME, type JikjiFindDetails, type JikjiFindPerRootPolicy, type JikjiFindProvider, type JikjiFindProviderResult, type MergedJikjiPolicy, } from "./jikji-find-tool.js";
|
|
8
|
+
export { createQueryPeerAgentTool, QUERY_PEER_AGENT_TOOL_NAME, type QueryPeerAgentDetails, type QueryPeerAgentResult, type QueryPeerAgentToolOptions, } from "./query-peer-tool.js";
|
|
8
9
|
export { createSearchAllDocumentsTool, SEARCH_ALL_DOCUMENTS_TOOL_NAME, type SearchAllDocumentsDetails, type SearchAllDocumentsProvider, type SearchAllDocumentsResult, } from "./search-all-tool.js";
|
|
9
10
|
export type { SearchDocumentDiagnostic, SearchDocumentDiagnosticCode, SearchDocumentDiagnosticSeverity, SearchDocumentEvidence, SearchDocumentResult, SearchDocumentsResponse, SearchDocumentsStreamEvent, SearchDocumentWarning, } from "./search-documents.js";
|
|
10
11
|
export { createSearchMinSyncDocumentsTool, SEARCH_MINSYNC_DOCUMENTS_TOOL_NAME, type SearchMinSyncDocumentsDetails, } from "./search-minsync-tool.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
|
2
|
+
import { Type } from "typebox";
|
|
3
|
+
import { type SimplexQueryState } from "../p2p/simplex-query-store.js";
|
|
4
|
+
import type { SimplexTransport } from "../p2p/simplex-transport.js";
|
|
5
|
+
import type { PeerQueryResponse } from "../p2p/wire.js";
|
|
6
|
+
export declare const QUERY_PEER_AGENT_TOOL_NAME = "query_peer_agent";
|
|
7
|
+
declare const queryPeerAgentSchema: Type.TObject<{
|
|
8
|
+
alias: Type.TString;
|
|
9
|
+
query: Type.TString;
|
|
10
|
+
topK: Type.TOptional<Type.TInteger>;
|
|
11
|
+
scope: Type.TOptional<Type.TString>;
|
|
12
|
+
}>;
|
|
13
|
+
export interface QueryPeerAgentResult {
|
|
14
|
+
readonly number: number;
|
|
15
|
+
readonly title: string;
|
|
16
|
+
readonly summary: string;
|
|
17
|
+
readonly source: string;
|
|
18
|
+
readonly excerpt: string;
|
|
19
|
+
}
|
|
20
|
+
export interface QueryPeerAgentDetails {
|
|
21
|
+
readonly method: "query_peer_agent";
|
|
22
|
+
readonly ok: boolean;
|
|
23
|
+
readonly alias: string;
|
|
24
|
+
readonly contactId?: number;
|
|
25
|
+
readonly pendingId?: string;
|
|
26
|
+
readonly expiresAt?: string;
|
|
27
|
+
readonly status?: "ok" | "rejected" | "pending";
|
|
28
|
+
readonly answer?: string;
|
|
29
|
+
readonly results?: readonly QueryPeerAgentResult[];
|
|
30
|
+
readonly diagnostics?: PeerQueryResponse["diagnostics"];
|
|
31
|
+
readonly fileCount?: number;
|
|
32
|
+
readonly message?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface QueryPeerAgentToolOptions {
|
|
35
|
+
readonly workspacePath: string;
|
|
36
|
+
readonly openTransport: () => Promise<SimplexTransport>;
|
|
37
|
+
readonly fastTimeoutMs?: number;
|
|
38
|
+
readonly autoStart?: boolean;
|
|
39
|
+
readonly sessionId?: () => string | undefined;
|
|
40
|
+
readonly onResponse?: (state: SimplexQueryState, response: PeerQueryResponse) => void;
|
|
41
|
+
readonly onExpired?: (state: SimplexQueryState) => void;
|
|
42
|
+
}
|
|
43
|
+
export interface QueryPeerAgentTool extends AgentTool<typeof queryPeerAgentSchema, QueryPeerAgentDetails> {
|
|
44
|
+
readonly ready: Promise<void>;
|
|
45
|
+
close(): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export declare function createQueryPeerAgentTool(options: QueryPeerAgentToolOptions): QueryPeerAgentTool;
|
|
48
|
+
export {};
|
package/dist/cli/config.d.ts
CHANGED
|
@@ -111,6 +111,8 @@ export interface CliConfig {
|
|
|
111
111
|
timeoutMs?: number;
|
|
112
112
|
};
|
|
113
113
|
excludeExactDuplicates?: boolean;
|
|
114
|
+
/** Absolute or workspace-relative files/directories omitted from local indexing. */
|
|
115
|
+
excludePaths?: string[];
|
|
114
116
|
/** Trusted datasource skill configuration (skill name → config). */
|
|
115
117
|
datasources?: DatasourcesConfig;
|
|
116
118
|
/** Trusted datasource allow-tags/allow-scopes. Absent ⇒ default-deny. */
|