@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
|
@@ -8,7 +8,7 @@ export interface ParsedMirrorEntry {
|
|
|
8
8
|
readonly updatedAt: string;
|
|
9
9
|
}
|
|
10
10
|
/** Why refresh deliberately left a source out of the parsed mirror. */
|
|
11
|
-
export type ParsedMirrorSkipReason = "duplicate-excluded" | "parser-skipped" | "parser-failed";
|
|
11
|
+
export type ParsedMirrorSkipReason = "duplicate-excluded" | "user-excluded" | "parser-skipped" | "parser-failed";
|
|
12
12
|
/**
|
|
13
13
|
* A source the last refresh decided not to mirror, pinned to the exact version it
|
|
14
14
|
* decided on. Staleness checks compare against this record instead of re-deriving
|
package/dist/mirror/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export type { ParsedMirrorEntry, ParsedMirrorIndex } from "./index-store.js";
|
|
|
2
2
|
export { emptyMirrorIndex, loadMirrorIndex, saveMirrorIndex } from "./index-store.js";
|
|
3
3
|
export { parsedMirrorIndexPath, parsedMirrorRoot, parsedOutputPath, refreshReadinessPath } from "./paths.js";
|
|
4
4
|
export type { ParsedMirrorDiagnostic, ParsedMirrorDiagnosticCode, ParsedMirrorSyncOptions, ParsedMirrorSyncResult, } from "./sync.js";
|
|
5
|
-
export { DEFAULT_MAX_SOURCE_BYTES, detectMirrorStaleness, syncParsedMirrors } from "./sync.js";
|
|
5
|
+
export { DEFAULT_MAX_SOURCE_BYTES, detectMirrorStaleness, isPathExcluded, syncParsedMirrors } from "./sync.js";
|
package/dist/mirror/sync.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export interface ParsedMirrorSyncOptions {
|
|
|
12
12
|
readonly maxSourceBytes?: number;
|
|
13
13
|
/** Absolute source paths omitted from parsed mirrors (for example exact duplicate copies). */
|
|
14
14
|
readonly excludeSourcePaths?: ReadonlySet<string>;
|
|
15
|
+
/** Absolute source paths or directories omitted by the user. */
|
|
16
|
+
readonly userExcludedSourcePaths?: ReadonlySet<string>;
|
|
15
17
|
}
|
|
16
18
|
export type ParsedMirrorDiagnosticCode = "unsupported-file" | "parser-skipped" | "parser-failed" | "duplicate-excluded" | "deleted-mirror" | "stale-index" | "pdf-extract-thin" | "parser-warning";
|
|
17
19
|
/** Path-opaque refresh diagnostic. `source` is an opaque virtual path, never a real fs path. */
|
|
@@ -42,3 +44,4 @@ export declare function syncParsedMirrors(options: ParsedMirrorSyncOptions): Pro
|
|
|
42
44
|
* getRefreshStatus).
|
|
43
45
|
*/
|
|
44
46
|
export declare function detectMirrorStaleness(options: ParsedMirrorSyncOptions): Promise<ParsedMirrorDiagnostic[]>;
|
|
47
|
+
export declare function isPathExcluded(sourcePath: string, excluded: ReadonlySet<string> | undefined): boolean;
|
|
@@ -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
package/skills/autorag/SKILL.md
CHANGED
|
@@ -41,6 +41,14 @@ near/contains families require human review. Exact duplicate exclusion during
|
|
|
41
41
|
refresh is enabled by default and can be disabled with
|
|
42
42
|
`"excludeExactDuplicates": false` in `config.json`.
|
|
43
43
|
|
|
44
|
+
### Excluding local files from the index
|
|
45
|
+
|
|
46
|
+
`"excludePaths"` in `config.json` lists files or folders (absolute, or relative
|
|
47
|
+
to `workspacePath`) that refresh keeps out of the parsed mirror and MinSync.
|
|
48
|
+
A folder entry excludes everything under it. Removing an entry and running
|
|
49
|
+
`autorag refresh --method minsync` indexes the file again. Excluded sources are
|
|
50
|
+
recorded as `user-excluded` skips, so they are not reported as stale.
|
|
51
|
+
|
|
44
52
|
`status` is model-free and path-opaque. `health` resolves the single model,
|
|
45
53
|
checks credential presence, and normally probes one live completion. If the
|
|
46
54
|
model, authentication, configuration, or indexes are unhealthy, use
|
|
@@ -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.
|