@autorag/librarian 2.12.0 → 2.13.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/README.md +8 -3
- package/dist/agent/agent.d.ts +84 -44
- package/dist/agent/answer-guidelines.d.ts +18 -1
- package/dist/agent/current-date.d.ts +10 -0
- package/dist/agent/datasource-skill.d.ts +2 -2
- package/dist/agent/environment-prompt.d.ts +20 -0
- package/dist/agent/evidence-ledger.d.ts +4 -2
- package/dist/agent/location-claims.d.ts +14 -0
- package/dist/agent/packaged-skill.d.ts +19 -0
- package/dist/agent/query-routing.d.ts +80 -26
- package/dist/agent/results.d.ts +10 -2
- package/dist/agent/search-documents.d.ts +6 -1
- package/dist/agent/self-config.d.ts +4 -4
- package/dist/agent/skill-invocation.d.ts +17 -0
- package/dist/agent/user-requests.d.ts +2 -2
- package/dist/cli/commands/evidence.d.ts +2 -0
- package/dist/cli/index.js +10572 -9994
- package/dist/cli/setup.d.ts +2 -0
- package/dist/core.js +21531 -21024
- package/dist/datasource/crawler-skill.d.ts +1 -0
- package/dist/datasource/index.d.ts +1 -1
- package/dist/datasource/sidecar/methods.d.ts +8 -1
- package/dist/datasource/skills/clawgallery/skill.d.ts +4 -0
- package/dist/datasource/skills/discrawl/skill.d.ts +5 -0
- package/dist/datasource/skills/factory.d.ts +5 -1
- package/dist/datasource/skills/lazykatok/index.d.ts +1 -1
- package/dist/datasource/skills/lazykatok/methods.d.ts +5 -5
- package/dist/datasource/skills/lazykatok/skill.d.ts +1 -0
- package/dist/datasource/skills/mailcrawl/skill.d.ts +1 -0
- package/dist/index.js +21621 -21063
- package/dist/mcp/index.js +21618 -21061
- package/dist/memory/memory.d.ts +4 -1
- package/dist/mirror/atomic-write.d.ts +16 -1
- package/dist/mirror/sync.d.ts +2 -0
- package/dist/profiles.js +11311 -10804
- package/dist/retrieval/chunk-location.d.ts +28 -0
- package/dist/retrieval/fallback.d.ts +24 -0
- package/dist/retrieval/index.d.ts +1 -0
- package/dist/retrieval/types.d.ts +16 -0
- package/internal-skills/organize/SKILL.md +43 -0
- package/package.json +2 -1
- package/skills/autorag/SKILL.md +18 -7
- package/skills/autorag-setup/SKILL.md +7 -5
|
@@ -9,7 +9,7 @@ export type SearchDocumentDiagnosticSeverity = "info" | "warning" | "error";
|
|
|
9
9
|
* (#21/#22) does not require another source-breaking type change; codes not yet
|
|
10
10
|
* emitted are still valid members.
|
|
11
11
|
*/
|
|
12
|
-
export type SearchDocumentDiagnosticCode = "empty-query" | "no-verified-results" | "unknown-warning" | "caller-tool-dropped" | "minsync-staging-excluded" | "minsync-file-skipped" | "minsync-sync-failed" | "minsync-lock-held" | "embedder-unavailable" | "embedding-identity-mismatch" | "lexical-tokenizer-unavailable" | "parser-skipped" | "parser-failed" | "parser-crashed" | "source-vanished" | "source-unreadable" | "source-read-failed" | "mirror-write-failed" | "parser-warning" | "duplicate-excluded" | "unsupported-file" | "stale-index" | "deleted-mirror" | "search-root-unavailable" | "mass-delete-suppressed" | "walk-truncated" | "directory-unreadable" | "pdf-extract-thin" | "retrieval-method-failed" | "rerank-failed" | "jikji-unavailable" | "jikji-prepare-failed" | "jikji-find-failed" | "everything-index-failed" | "fsearch-index-failed" | "fsearch-binary-missing" | "refresh-failed" | "refresh-interrupted" | "watch-failed" | "watch-limited" | "unknown-datasource-skill" | "no-final-answer" | "model-request-failed" | "tool-call-burst" | "query-routed" | "query-route-fallback" | "query-decomposition-failed" | "follow-up-skipped" | "follow-up-check-fallback" | "datasources-selected" | "datasource-selection-fallback" | "citation-without-result" | "citation-irrelevant" | "citation-relevance-fallback" | "evidence-judged" | "evidence-judgment-fallback" | "memory-search-fallback" | "self-config-unavailable" | "self-config-rolled-back" | "embedding-unavailable";
|
|
12
|
+
export type SearchDocumentDiagnosticCode = "empty-query" | "no-verified-results" | "unknown-warning" | "caller-tool-dropped" | "minsync-staging-excluded" | "minsync-file-skipped" | "minsync-sync-failed" | "minsync-lock-held" | "embedder-unavailable" | "embedding-identity-mismatch" | "lexical-tokenizer-unavailable" | "parser-skipped" | "parser-failed" | "parser-crashed" | "source-vanished" | "source-unreadable" | "source-read-failed" | "mirror-write-failed" | "parser-warning" | "duplicate-excluded" | "unsupported-file" | "stale-index" | "deleted-mirror" | "search-root-unavailable" | "mass-delete-suppressed" | "walk-truncated" | "directory-unreadable" | "pdf-extract-thin" | "retrieval-method-failed" | "rerank-failed" | "jikji-unavailable" | "jikji-prepare-failed" | "jikji-find-failed" | "everything-index-failed" | "fsearch-index-failed" | "fsearch-binary-missing" | "refresh-failed" | "refresh-interrupted" | "watch-failed" | "watch-limited" | "unknown-datasource-skill" | "no-final-answer" | "model-request-failed" | "tool-call-burst" | "query-routed" | "query-route-fallback" | "query-decomposition-failed" | "follow-up-skipped" | "follow-up-check-fallback" | "datasources-selected" | "datasource-selection-fallback" | "web-datasource-id-taken" | "web-search-failed" | "citation-without-result" | "line-reference-unverified" | "citation-irrelevant" | "citation-relevance-fallback" | "evidence-judged" | "evidence-judgment-fallback" | "memory-search-fallback" | "self-config-unavailable" | "self-config-rolled-back" | "organize-skill-unavailable" | "embedding-unavailable";
|
|
13
13
|
export interface SearchDocumentDiagnostic {
|
|
14
14
|
readonly code: SearchDocumentDiagnosticCode;
|
|
15
15
|
readonly severity: SearchDocumentDiagnosticSeverity;
|
|
@@ -19,7 +19,12 @@ export interface SearchDocumentDiagnostic {
|
|
|
19
19
|
}
|
|
20
20
|
export interface SearchDocumentEvidence {
|
|
21
21
|
readonly excerpt: string;
|
|
22
|
+
/** First line of the chunk in its parsed document, measured by the harness. */
|
|
22
23
|
readonly lineNumber?: number;
|
|
24
|
+
/** Last line of the chunk in its parsed document. */
|
|
25
|
+
readonly lineEnd?: number;
|
|
26
|
+
/** Article or heading the chunk sits in. */
|
|
27
|
+
readonly section?: string;
|
|
23
28
|
}
|
|
24
29
|
export interface SearchDocumentResult {
|
|
25
30
|
readonly number: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PackagedAgentSkill } from "./packaged-skill.js";
|
|
1
2
|
/**
|
|
2
3
|
* Host opt-in for agent self-configuration: the Jev `config` branch, where the
|
|
3
4
|
* agent edits its own settings with the full `autorag-setup` skill in hand.
|
|
@@ -5,7 +6,7 @@
|
|
|
5
6
|
export interface SelfConfigOptions {
|
|
6
7
|
/** The active AutoRAG config file the agent may read and edit. */
|
|
7
8
|
readonly configPath: string;
|
|
8
|
-
/** Override for the `autorag-setup`
|
|
9
|
+
/** Override for the packaged `autorag-setup` skill file; defaults to the packaged skill. */
|
|
9
10
|
readonly skillPath?: string;
|
|
10
11
|
/**
|
|
11
12
|
* Check the config file after a config turn changed it. Resolves to a
|
|
@@ -14,13 +15,12 @@ export interface SelfConfigOptions {
|
|
|
14
15
|
*/
|
|
15
16
|
readonly validate?: (configPath: string) => Promise<string | undefined>;
|
|
16
17
|
}
|
|
17
|
-
/** Full text of the `autorag-setup` skill with its YAML front matter removed. */
|
|
18
|
-
export declare function loadSetupSkill(skillPath?: string): string;
|
|
19
18
|
export interface SelfConfigPromptInput {
|
|
20
19
|
readonly query: string;
|
|
21
20
|
readonly configPath: string;
|
|
22
21
|
readonly agentDir: string;
|
|
23
|
-
|
|
22
|
+
/** The loaded `autorag-setup` skill, embedded as a `<skill …>` invocation. */
|
|
23
|
+
readonly skill: PackagedAgentSkill;
|
|
24
24
|
/** True when `manage_automations` is available: file-triggered automations are then in scope. */
|
|
25
25
|
readonly automations?: boolean;
|
|
26
26
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `<skill name="…" location="…">…</skill>` invocation block AutoRAG embeds
|
|
3
|
+
* in a turn prompt: the shape pi uses for its file-backed skills, with a
|
|
4
|
+
* path-opaque `location`. AutoRAG loads skills that have no path the model
|
|
5
|
+
* should resolve against (datasource skills and its own packaged skills), so
|
|
6
|
+
* the location names the skill without exposing a real filesystem path.
|
|
7
|
+
*/
|
|
8
|
+
export interface SkillInvocation {
|
|
9
|
+
/** Skill name, as listed in the prompt's skill listing. */
|
|
10
|
+
readonly name: string;
|
|
11
|
+
/** Opaque, path-free location: `datasource://<name>` or `autorag-skill://<name>`. */
|
|
12
|
+
readonly location: string;
|
|
13
|
+
/** Full skill instructions. */
|
|
14
|
+
readonly content: string;
|
|
15
|
+
}
|
|
16
|
+
/** Render one skill's full instructions in the shared invocation shape. */
|
|
17
|
+
export declare function formatSkillInvocation(skill: SkillInvocation): string;
|
|
@@ -13,8 +13,8 @@ export interface UserRequest {
|
|
|
13
13
|
type SaveEntry = (request: UserRequest) => void;
|
|
14
14
|
/**
|
|
15
15
|
* What the user has said in this conversation, in order, exactly as typed: the first question, every
|
|
16
|
-
* follow-up, every steer. AutoRAG's own phase prompts (fast answer, verification,
|
|
17
|
-
* continuation) never enter it, because it is fed where the user's words arrive, not from the transcript.
|
|
16
|
+
* follow-up, every steer. AutoRAG's own phase prompts (fast answer, verification, the extra/organize/config
|
|
17
|
+
* turn, steer continuation) never enter it, because it is fed where the user's words arrive, not from the transcript.
|
|
18
18
|
*
|
|
19
19
|
* It is not truncated here. Whoever consumes it fits it to its own limit.
|
|
20
20
|
*/
|
|
@@ -9,6 +9,8 @@ interface EvidenceView {
|
|
|
9
9
|
readonly retrievalResultId?: string;
|
|
10
10
|
readonly chunkIndex?: number;
|
|
11
11
|
readonly lineNumber?: number;
|
|
12
|
+
readonly lineEnd?: number;
|
|
13
|
+
readonly section?: string;
|
|
12
14
|
readonly metadata?: Record<string, unknown>;
|
|
13
15
|
}
|
|
14
16
|
export declare function evidenceFor(schema: MemorySchema, sessionId: string, resultNumber?: number): {
|