@autorag/librarian 2.6.0 → 2.6.1
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 +14 -0
- package/dist/agent/index.d.ts +2 -1
- package/dist/agent/query-peer-tool.d.ts +48 -0
- package/dist/cli/index.js +1573 -1142
- package/dist/core.js +2855 -2424
- package/dist/index.js +2856 -2424
- 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-setup/SKILL.md +7 -0
|
@@ -19,6 +19,7 @@ export declare class ApprovalTimeoutError extends Error {
|
|
|
19
19
|
export declare class ApprovalAbortedError extends Error {
|
|
20
20
|
constructor(id: string);
|
|
21
21
|
}
|
|
22
|
+
export declare const PEER_REQUEST_TTL_MS: number;
|
|
22
23
|
export declare function savePendingPeerRequest(workspacePath: string, request: PendingPeerRequest): void;
|
|
23
24
|
export declare function loadPendingPeerRequest(workspacePath: string, id: string): PendingPeerRequest | undefined;
|
|
24
25
|
export declare function listPendingPeerRequests(workspacePath: string): PendingPeerRequest[];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { SimplexTransport } from "./simplex-transport.js";
|
|
2
|
+
import { type PeerQueryRequest, type PeerQueryResponse } from "./wire.js";
|
|
3
|
+
export declare const DEFAULT_SIMPLEX_QUERY_FAST_TIMEOUT_MS = 60000;
|
|
4
|
+
export declare const SIMPLEX_QUERY_TTL_MS: number;
|
|
5
|
+
export type SimplexQueryStateStatus = "pending" | "completed" | "expired";
|
|
6
|
+
export interface SimplexQueryState {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly contactId: number;
|
|
9
|
+
readonly request: PeerQueryRequest;
|
|
10
|
+
readonly sessionId?: string;
|
|
11
|
+
readonly createdAt: string;
|
|
12
|
+
readonly expiresAt: string;
|
|
13
|
+
readonly status: SimplexQueryStateStatus;
|
|
14
|
+
readonly response?: PeerQueryResponse;
|
|
15
|
+
readonly completedAt?: string;
|
|
16
|
+
readonly expiredAt?: string;
|
|
17
|
+
readonly diagnostic?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function saveSimplexQueryState(workspacePath: string, state: SimplexQueryState): void;
|
|
20
|
+
export declare function loadSimplexQueryState(workspacePath: string, id: string): SimplexQueryState | undefined;
|
|
21
|
+
export declare function listPendingSimplexQueryStates(workspacePath: string): readonly SimplexQueryState[];
|
|
22
|
+
export declare function completeSimplexQueryState(workspacePath: string, id: string, response: PeerQueryResponse, completedAt: string): SimplexQueryState | undefined;
|
|
23
|
+
export declare function expireSimplexQueryState(workspacePath: string, id: string, expiredAt: string, diagnostic: string): SimplexQueryState | undefined;
|
|
24
|
+
export declare function removeSimplexQueryState(workspacePath: string, id: string): void;
|
|
25
|
+
export type SimplexQueryResult = {
|
|
26
|
+
readonly status: "completed";
|
|
27
|
+
readonly id: string;
|
|
28
|
+
readonly response: PeerQueryResponse;
|
|
29
|
+
} | {
|
|
30
|
+
readonly status: "pending";
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly expiresAt: string;
|
|
33
|
+
};
|
|
34
|
+
export interface SimplexQueryClientOptions {
|
|
35
|
+
readonly fastTimeoutMs?: number;
|
|
36
|
+
readonly now?: () => Date;
|
|
37
|
+
readonly onResponse?: (state: SimplexQueryState, response: PeerQueryResponse) => void;
|
|
38
|
+
readonly onExpired?: (state: SimplexQueryState) => void;
|
|
39
|
+
}
|
|
40
|
+
export interface SimplexQueryClient {
|
|
41
|
+
send(contactId: number, request: PeerQueryRequest, sessionId?: string): Promise<SimplexQueryResult>;
|
|
42
|
+
close(): void;
|
|
43
|
+
}
|
|
44
|
+
export declare function createSimplexQueryClient(transport: SimplexTransport, workspacePath: string, options?: SimplexQueryClientOptions): SimplexQueryClient;
|
|
@@ -4,6 +4,7 @@ import type { RetrievalOptions } from "../retrieval/types.js";
|
|
|
4
4
|
import { type InjectionClassifierModel } from "./injection-classifier.js";
|
|
5
5
|
import { type PolicyQuotas, type PolicyResolution } from "./policy.js";
|
|
6
6
|
import type { PolicyResolver } from "./policy-filter.js";
|
|
7
|
+
import { type SimplexQueryResult, type SimplexQueryState } from "./simplex-query-store.js";
|
|
7
8
|
import { type SimplexContact, type SimplexPeerProfile, type SimplexTransport } from "./simplex-transport.js";
|
|
8
9
|
import { type PeerQueryRequest, type PeerQueryResponse } from "./wire.js";
|
|
9
10
|
/**
|
|
@@ -102,10 +103,14 @@ export declare class QueueFullError extends Error {
|
|
|
102
103
|
}
|
|
103
104
|
export declare function startSimplexPeerServer(options: StartSimplexPeerServerOptions): Promise<SimplexPeerServer>;
|
|
104
105
|
export interface QuerySimplexPeerOptions {
|
|
105
|
-
readonly
|
|
106
|
+
readonly workspacePath: string;
|
|
107
|
+
readonly fastTimeoutMs?: number;
|
|
108
|
+
readonly sessionId?: string;
|
|
109
|
+
readonly onResponse?: (state: SimplexQueryState, response: PeerQueryResponse) => void;
|
|
110
|
+
readonly onExpired?: (state: SimplexQueryState) => void;
|
|
106
111
|
}
|
|
107
112
|
/**
|
|
108
113
|
* Client side of the SimpleX peer wire: send a PeerQueryRequest and await the
|
|
109
114
|
* correlated PeerQueryResponse.
|
|
110
115
|
*/
|
|
111
|
-
export declare function querySimplexPeer(transport: SimplexTransport, contactId: number, request: PeerQueryRequest, options
|
|
116
|
+
export declare function querySimplexPeer(transport: SimplexTransport, contactId: number, request: PeerQueryRequest, options: QuerySimplexPeerOptions): Promise<SimplexQueryResult>;
|
|
@@ -53,3 +53,10 @@ export declare function parseSimplexProfile(value: unknown): SimplexPeerProfile
|
|
|
53
53
|
* bot API. Creates the local user profile if it does not exist yet.
|
|
54
54
|
*/
|
|
55
55
|
export declare function startSimplexChat(options: StartSimplexOptions): Promise<SimplexTransport>;
|
|
56
|
+
export interface OpenPeerQueryTransportOptions extends StartSimplexOptions {
|
|
57
|
+
readonly portOpen?: (port: number) => Promise<boolean>;
|
|
58
|
+
readonly start?: (options: StartSimplexOptions) => Promise<SimplexTransport>;
|
|
59
|
+
readonly attach?: (options: StartSimplexOptions) => Promise<SimplexTransport>;
|
|
60
|
+
}
|
|
61
|
+
export declare function attachSimplexChat(options: StartSimplexOptions): Promise<SimplexTransport>;
|
|
62
|
+
export declare function openPeerQueryTransport(options: OpenPeerQueryTransportOptions): Promise<SimplexTransport>;
|
package/package.json
CHANGED
|
@@ -134,6 +134,13 @@ true). Set `"autoInstall": false` only when managing the binary yourself. Jikji
|
|
|
134
134
|
auto-installs `jikji-cli` through cargo when enabled (`jikji.autoInstall`
|
|
135
135
|
defaults to true; requires the Rust toolchain).
|
|
136
136
|
|
|
137
|
+
Jikji stores its prepared corpus metadata in a hidden `.jikji` directory
|
|
138
|
+
inside each indexed source root — that is Jikji's native index layout and
|
|
139
|
+
intended behavior, not a misplaced artifact. Tell the user before the first
|
|
140
|
+
`refresh` that `<root>/.jikji` will be created inside every approved document
|
|
141
|
+
root (one per root, alongside the documents), and never delete or edit its
|
|
142
|
+
contents; removing it only forces a full Jikji re-prepare on the next refresh.
|
|
143
|
+
|
|
137
144
|
Exact duplicate exclusion is enabled by default. AutoRAG invokes the external
|
|
138
145
|
`dupey` CLI before parsed-mirror indexing, keeps the newest filesystem copy for
|
|
139
146
|
each exact canonical-text hash, and excludes older copies from the mirror.
|