@autorag/librarian 2.4.1 → 2.5.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.
Files changed (94) hide show
  1. package/NOTICE +68 -0
  2. package/README.md +72 -30
  3. package/dist/agent/agent.d.ts +74 -2
  4. package/dist/agent/emit-results-tool.d.ts +1 -2
  5. package/dist/agent/fast-answer-tool.d.ts +46 -0
  6. package/dist/agent/index.d.ts +1 -1
  7. package/dist/agent/peer-target-tool.d.ts +19 -0
  8. package/dist/agent/search-all-tool.d.ts +3 -0
  9. package/dist/agent/search-datasource-tool.d.ts +3 -0
  10. package/dist/agent/search-documents.d.ts +50 -5
  11. package/dist/agent/search-minsync-tool.d.ts +3 -0
  12. package/dist/agent/system-prompt.d.ts +1 -0
  13. package/dist/cli/commands/duplicates.d.ts +6 -0
  14. package/dist/cli/commands/gateway.d.ts +7 -0
  15. package/dist/cli/commands/lite-refresh.d.ts +10 -0
  16. package/dist/cli/commands/lite-retrieve.d.ts +33 -0
  17. package/dist/cli/commands/lite.d.ts +3 -0
  18. package/dist/cli/commands/models.d.ts +18 -0
  19. package/dist/cli/commands/p2p-policy.d.ts +2 -0
  20. package/dist/cli/commands/p2p.d.ts +7 -0
  21. package/dist/cli/commands/report.d.ts +3 -0
  22. package/dist/cli/commands/serve.d.ts +18 -0
  23. package/dist/cli/commands/setup.d.ts +2 -0
  24. package/dist/cli/commands/status.d.ts +2 -0
  25. package/dist/cli/commands/tui.d.ts +1 -1
  26. package/dist/cli/commands/watch.d.ts +2 -0
  27. package/dist/cli/config.d.ts +20 -0
  28. package/dist/cli/index.js +7911 -2518
  29. package/dist/cli/output.d.ts +6 -0
  30. package/dist/cli/setup.d.ts +59 -0
  31. package/dist/core.d.ts +67 -0
  32. package/dist/core.js +18172 -0
  33. package/dist/datasource/access-context.d.ts +1 -1
  34. package/dist/datasource/connector-skill.d.ts +1 -1
  35. package/dist/datasource/connector.d.ts +1 -1
  36. package/dist/datasource/index.d.ts +0 -1
  37. package/dist/datasource/result-filter.d.ts +1 -1
  38. package/dist/datasource/skills/discrawl/client.d.ts +6 -2
  39. package/dist/datasource/skills/discrawl/index.d.ts +1 -1
  40. package/dist/datasource/skills/discrawl/skill.d.ts +2 -1
  41. package/dist/datasource/skills/discrawl/types.d.ts +22 -0
  42. package/dist/datasource/skills/factory.d.ts +2 -1
  43. package/dist/datasource/skills/katok/client.d.ts +4 -7
  44. package/dist/datasource/skills/katok/types.d.ts +1 -6
  45. package/dist/embedding-runtime/cache.d.ts +21 -0
  46. package/dist/embedding-runtime/gateway.d.ts +27 -0
  47. package/dist/embedding-runtime/index.d.ts +120 -0
  48. package/dist/embedding-runtime/manifest.d.ts +24 -0
  49. package/dist/embedding-runtime/supervisor.d.ts +74 -0
  50. package/dist/embedding-runtime/types.d.ts +66 -0
  51. package/dist/filesystem/source-paths.d.ts +27 -0
  52. package/dist/index.d.ts +2 -1
  53. package/dist/index.js +13214 -8659
  54. package/dist/minsync/client.d.ts +26 -1
  55. package/dist/minsync/embedder-config.d.ts +12 -0
  56. package/dist/minsync/index.d.ts +4 -3
  57. package/dist/minsync/installer.d.ts +7 -1
  58. package/dist/minsync/local-embedder.d.ts +16 -0
  59. package/dist/minsync/method.d.ts +8 -2
  60. package/dist/minsync/types.d.ts +9 -0
  61. package/dist/mirror/index.d.ts +1 -1
  62. package/dist/mirror/paths.d.ts +2 -0
  63. package/dist/mirror/sync.d.ts +1 -0
  64. package/dist/observability/run-log.d.ts +2 -0
  65. package/dist/p2p/approval-store.d.ts +31 -0
  66. package/dist/p2p/egress-gate.d.ts +22 -0
  67. package/dist/p2p/file-sharing.d.ts +33 -0
  68. package/dist/p2p/injection-classifier.d.ts +33 -0
  69. package/dist/p2p/injection-gate.d.ts +37 -0
  70. package/dist/p2p/pii-gate.d.ts +47 -0
  71. package/dist/p2p/policy-filter.d.ts +15 -0
  72. package/dist/p2p/policy.d.ts +77 -0
  73. package/dist/p2p/simplex-server.d.ts +95 -0
  74. package/dist/p2p/simplex-transport.d.ts +38 -0
  75. package/dist/p2p/wire.d.ts +39 -0
  76. package/dist/process/terminate-tree.d.ts +20 -0
  77. package/dist/retrieval/engine.d.ts +123 -0
  78. package/dist/retrieval/index.d.ts +1 -0
  79. package/licenses/apache-2.0.txt +202 -0
  80. package/licenses/embedding-assets.json +104 -0
  81. package/licenses/gemma-notice.txt +24 -0
  82. package/licenses/gemma-section-3.2-flow-down.txt +9 -0
  83. package/licenses/gemma-terms-of-use.html +4750 -0
  84. package/licenses/gemma-terms-of-use.txt +158 -0
  85. package/licenses/llama.cpp-MIT.txt +21 -0
  86. package/licenses/qwen3-embedding-notice.txt +13 -0
  87. package/package.json +19 -10
  88. package/skills/autorag/SKILL.md +16 -6
  89. package/skills/autorag-lite-search/SKILL.md +155 -0
  90. package/skills/autorag-lite-setup/SKILL.md +182 -0
  91. package/skills/autorag-setup/SKILL.md +58 -27
  92. package/dist/datasource/skills/gmail/connector.d.ts +0 -30
  93. package/dist/datasource/skills/gmail/index.d.ts +0 -2
  94. package/dist/datasource/skills/gmail/skill.d.ts +0 -24
@@ -0,0 +1,158 @@
1
+ Gemma Terms of Use
2
+
3
+ Source: https://ai.google.dev/gemma/terms
4
+ Retrieved for this compliance bundle on 2026-09-14. The text below is copied from the current source page.
5
+
6
+ The terms below apply to Gemma models listed in the Appendix at bottom of this page. For Gemma 4 terms, see the Gemma 4 license.
7
+
8
+ Last modified: April 1, 2026
9
+
10
+ By using, reproducing, modifying, distributing, performing or displaying any portion or element of Gemma, Model Derivatives including via any Hosted Service, (each as defined below) (collectively, the "Gemma Services") or otherwise accepting the terms of this Agreement, you agree to be bound by this Agreement.
11
+
12
+ Section 1: DEFINITIONS
13
+
14
+ 1.1 Definitions
15
+
16
+ (a) "Agreement" or "Gemma Terms of Use" means these terms and conditions that govern the use, reproduction, Distribution or modification of the Gemma Services and any terms and conditions incorporated by reference.
17
+
18
+ (b) "Distribution" or "Distribute" means any transmission, publication, or other sharing of Gemma or Model Derivatives to a third party, including by providing or making Gemma or its functionality available as a hosted service via API, web access, or any other electronic or remote means ("Hosted Service").
19
+
20
+ (c) "Gemma" means the set of machine learning language models, trained model weights and parameters identified in the Appendix, regardless of the source that you obtained it from.
21
+
22
+ (d) "Google" means Google LLC.
23
+
24
+ (e) "Model Derivatives" means all (i) modifications to Gemma, (ii) works based on Gemma, or (iii) any other machine learning model which is created by transfer of patterns of the weights, parameters, operations, or Output of Gemma, to that model in order to cause that model to perform similarly to Gemma, including distillation methods that use intermediate data representations or methods based on the generation of synthetic data Outputs by Gemma for training that model. For clarity, Outputs are not deemed Model Derivatives.
25
+
26
+ (f) "Output" means the information content output of Gemma or a Model Derivative that results from operating or otherwise using Gemma or the Model Derivative, including via a Hosted Service.
27
+
28
+ 1.2
29
+
30
+ As used in this Agreement, "including" means "including without limitation".
31
+
32
+ Section 2: ELIGIBILITY AND USAGE
33
+
34
+ 2.1 Eligibility
35
+
36
+ You represent and warrant that you have the legal capacity to enter into this Agreement (including being of sufficient age of consent). If you are accessing or using any of the Gemma Services for or on behalf of a legal entity, (a) you are entering into this Agreement on behalf of yourself and that legal entity, (b) you represent and warrant that you have the authority to act on behalf of and bind that entity to this Agreement and (c) references to "you" or "your" in the remainder of this Agreement refers to both you (as an individual) and that entity.
37
+
38
+ 2.2 Use
39
+
40
+ You may use, reproduce, modify, Distribute, perform or display any of the Gemma Services only in accordance with the terms of this Agreement, and must not violate (or encourage or permit anyone else to violate) any term of this Agreement.
41
+
42
+ Section 3: DISTRIBUTION AND RESTRICTIONS
43
+
44
+ 3.1 Distribution and Redistribution
45
+
46
+ You may reproduce or Distribute copies of Gemma or Model Derivatives if you meet all of the following conditions:
47
+
48
+ You must include the use restrictions referenced in Section 3.2 as an enforceable provision in any agreement (e.g., license agreement, terms of use, etc.) governing the use and/or distribution of Gemma or Model Derivatives and you must provide notice to subsequent users you Distribute to that Gemma or Model Derivatives are subject to the use restrictions in Section 3.2.
49
+
50
+ You must provide all third party recipients of Gemma or Model Derivatives a copy of this Agreement.
51
+
52
+ You must cause any modified files to carry prominent notices stating that you modified the files.
53
+
54
+ All Distributions (other than through a Hosted Service) must be accompanied by a "Notice" text file that contains the following notice: "Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms".
55
+
56
+ You may add your own intellectual property statement to your modifications and, except as set forth in this Section, may provide additional or different terms and conditions for use, reproduction, or Distribution of your modifications, or for any such Model Derivatives as a whole, provided your use, reproduction, modification, Distribution, performance, and display of Gemma otherwise complies with the terms and conditions of this Agreement. Any additional or different terms and conditions you impose must not conflict with the terms of this Agreement.
57
+
58
+ 3.2 Use Restrictions
59
+
60
+ You must not use any of the Gemma Services:
61
+
62
+ for the restricted uses set forth in the Gemma Prohibited Use Policy at ai.google.dev/gemma/prohibited_use_policy ("Prohibited Use Policy"), which is hereby incorporated by reference into this Agreement; or
63
+
64
+ in violation of applicable laws and regulations.
65
+
66
+ To the maximum extent permitted by law, Google reserves the right to restrict (remotely or otherwise) usage of any of the Gemma Services that Google reasonably believes are in violation of this Agreement.
67
+
68
+ 3.3 Generated Output
69
+
70
+ Google claims no rights in Outputs you generate using Gemma. You and your users are solely responsible for Outputs and their subsequent uses.
71
+
72
+ Section 4: ADDITIONAL PROVISIONS
73
+
74
+ 4.1 Updates
75
+
76
+ Google may update Gemma from time to time.
77
+
78
+ 4.2 Trademarks
79
+
80
+ Nothing in this Agreement grants you any rights to use Google's trademarks, trade names, logos or to otherwise suggest endorsement or misrepresent the relationship between you and Google. Google reserves any rights not expressly granted herein.
81
+
82
+ 4.3 DISCLAIMER OF WARRANTY
83
+
84
+ UNLESS REQUIRED BY APPLICABLE LAW, THE GEMMA SERVICES, AND OUTPUTS, ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING, REPRODUCING, MODIFYING, PERFORMING, DISPLAYING OR DISTRIBUTING ANY OF THE GEMMA SERVICES OR OUTPUTS AND ASSUME ANY AND ALL RISKS ASSOCIATED WITH YOUR USE OR DISTRIBUTION OF ANY OF THE GEMMA SERVICES OR OUTPUTS AND YOUR EXERCISE OF RIGHTS AND PERMISSIONS UNDER THIS AGREEMENT.
85
+
86
+ 4.4 LIMITATION OF LIABILITY
87
+
88
+ TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY, CONTRACT, OR OTHERWISE, UNLESS REQUIRED BY APPLICABLE LAW, SHALL GOOGLE OR ITS AFFILIATES BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR LOST PROFITS OF ANY KIND ARISING FROM THIS AGREEMENT OR RELATED TO, ANY OF THE GEMMA SERVICES OR OUTPUTS EVEN IF GOOGLE OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
89
+
90
+ 4.5 Term, Termination, and Survival
91
+
92
+ The term of this Agreement will commence upon your acceptance of this Agreement (including acceptance by your use, modification, or Distribution, reproduction, performance or display of any portion or element of the Gemma Services) and will continue in full force and effect until terminated in accordance with the terms of this Agreement. Google may terminate this Agreement if you are in breach of any term of this Agreement. Upon termination of this Agreement, you must delete and cease use and Distribution of all copies of Gemma and Model Derivatives in your possession or control. Sections 1, 2.1, 3.3, 4.2 to 4.9 shall survive the termination of this Agreement.
93
+
94
+ 4.6 Governing Law and Jurisdiction
95
+
96
+ This Agreement will be governed by the laws of the State of California without regard to choice of law principles. The UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The state and federal courts of Santa Clara County, California shall have exclusive jurisdiction of any dispute arising out of this Agreement.
97
+
98
+ 4.7 Severability
99
+
100
+ If any provision of this Agreement is held to be invalid, illegal or unenforceable, the remaining provisions shall be unaffected thereby and remain valid as if such provision had not been set forth herein.
101
+
102
+ 4.8 Entire Agreement
103
+
104
+ This Agreement states all the terms agreed between the parties and supersedes all other agreements between the parties as of the date of acceptance relating to its subject matter.
105
+
106
+ 4.9 No Waiver
107
+
108
+ Google will not be treated as having waived any rights by not exercising (or delaying the exercise of) any rights under this Agreement.
109
+
110
+ Appendix
111
+
112
+ Gemma 1
113
+
114
+ Gemma 1.1
115
+
116
+ Gemma 2
117
+
118
+ Gemma 3
119
+
120
+ Gemma 3n
121
+
122
+ FunctionGemma
123
+
124
+ EmbeddingGemma
125
+
126
+ PaliGemma
127
+
128
+ PaliGemma 2
129
+
130
+ ShieldGemma
131
+
132
+ ShieldGemma 2
133
+
134
+ CodeGemma
135
+
136
+ CodeGemma 1.1
137
+
138
+ Gemma 2 JPN
139
+
140
+ DataGemma RIG
141
+
142
+ DataGemma RAG
143
+
144
+ RecurrentGemma
145
+
146
+ Gemma Scope
147
+
148
+ Gemma-APS
149
+
150
+ T5Gemma
151
+
152
+ VaultGemma
153
+
154
+ FunctionGemma
155
+
156
+ T5Gemma 2
157
+
158
+ TranslateGemma
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-2026 The ggml authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ Qwen3-Embedding-0.6B
2
+
3
+ The Qwen3-Embedding-0.6B model asset is provided under the Apache License, Version 2.0. The pinned GGUF asset is published by Qwen at:
4
+ https://huggingface.co/Qwen/Qwen3-Embedding-0.6B-GGUF
5
+
6
+ Model card and pinned asset revision:
7
+ https://huggingface.co/Qwen/Qwen3-Embedding-0.6B-GGUF/tree/370f27d7550e0def9b39c1f16d3fbaa13aa67728
8
+
9
+ Apache License, Version 2.0:
10
+ https://www.apache.org/licenses/LICENSE-2.0
11
+ The text is also included in licenses/apache-2.0.txt.
12
+
13
+ This notice identifies the model license and provenance. The model weights are not included in the npm package; release jobs fetch the immutable URL in licenses/embedding-assets.json and verify its SHA-256 before staging.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorag/librarian",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "description": "Self-evolving librarian agent on Pi framework with pluggable retrieval methods",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -14,6 +14,10 @@
14
14
  ".": {
15
15
  "types": "./dist/index.d.ts",
16
16
  "default": "./dist/index.js"
17
+ },
18
+ "./core": {
19
+ "types": "./dist/core.d.ts",
20
+ "default": "./dist/core.js"
17
21
  }
18
22
  },
19
23
  "bin": {
@@ -22,31 +26,35 @@
22
26
  "files": [
23
27
  "dist",
24
28
  "skills",
25
- "README.md"
29
+ "README.md",
30
+ "NOTICE",
31
+ "licenses"
26
32
  ],
27
33
  "publishConfig": {
28
34
  "access": "public"
29
35
  },
30
36
  "scripts": {
31
- "build": "bun build src/index.ts src/cli/index.ts --outdir dist --target node --packages external && tsc -p tsconfig.build.json && node scripts/fixup-dts.mjs",
37
+ "build": "bun build src/index.ts src/core.ts src/cli/index.ts --outdir dist --target node --packages external && tsc -p tsconfig.build.json && node scripts/fixup-dts.mjs",
32
38
  "prepublishOnly": "bun run typecheck && bun run build",
33
39
  "prepare": "bun run build",
34
40
  "test": "node scripts/run-test-files.mjs",
35
41
  "test:windows": "node scripts/run-test-files.mjs",
36
42
  "check": "biome check --write .",
37
43
  "lint": "biome check .",
38
- "typecheck": "tsc --noEmit"
44
+ "typecheck": "tsc --noEmit",
45
+ "check:embedding-manifest": "node scripts/check-embedding-manifest.mjs",
46
+ "supply-chain": "bun scripts/supply-chain/evaluate.ts gate --sbom sbom.local.cdx.json"
39
47
  },
40
48
  "engines": {
41
49
  "node": ">=24.0.0"
42
50
  },
43
51
  "dependencies": {
44
- "@earendil-works/pi-agent-core": "^0.84.4",
45
- "@earendil-works/pi-ai": "^0.84.4",
46
- "@earendil-works/pi-coding-agent": "0.84.4",
47
- "@earendil-works/pi-tui": "0.84.4",
52
+ "@earendil-works/pi-agent-core": "^0.85.1",
53
+ "@earendil-works/pi-ai": "^0.85.1",
54
+ "@earendil-works/pi-coding-agent": "0.85.1",
55
+ "@earendil-works/pi-tui": "0.85.1",
48
56
  "@opendataloader/pdf": "^2.5.7",
49
- "@rhwp/core": "0.8.4",
57
+ "@rhwp/core": "0.8.6",
50
58
  "chardet": "^2.2.0",
51
59
  "fast-xml-parser": "^5.11.1",
52
60
  "iconv-lite": "^0.7.3",
@@ -63,7 +71,8 @@
63
71
  "@biomejs/biome": "2.5.12",
64
72
  "@types/mailparser": "^3.4.6",
65
73
  "@types/node": "^26.4.1",
74
+ "@types/ws": "^8.18.1",
66
75
  "typescript": "^7.0.2",
67
- "vitest": "^4.1.11"
76
+ "vitest": "^5.0.0"
68
77
  }
69
78
  }
@@ -103,21 +103,27 @@ autorag feedback <sessionId> --useful 1,3 --not-useful 2 --json
103
103
  autorag status --json
104
104
  autorag health --json
105
105
  autorag refresh --json
106
- autorag refresh --method bm25,minsync,jikji --json
106
+ autorag refresh --method minsync,jikji --json
107
107
  autorag watch --once --json
108
108
  autorag watch
109
109
  autorag refresh --force --json
110
110
  autorag index rebuild --yes --json
111
- autorag index reset --method bm25 --yes --json
111
+ autorag index reset --method parsed --yes --json
112
112
  autorag memory inspect --json
113
+ autorag tui
114
+ autorag serve --force
115
+ autorag p2p policy list --json
113
116
  ```
114
117
 
115
118
  Prefer a full refresh so parsed mirrors, MinSync, Jikji, and configured
116
119
  datasources stay aligned. `--method` accepts
117
- `parsed,minsync,datasources,jikji,all`. Use it only for deliberate
118
- narrowing. Scheduled maintenance should use non-daemon `autorag watch --once`,
119
- typically every 15–30 minutes, with the same config used by search and no
120
- overlapping runs.
120
+ `parsed,minsync,datasources,jikji,all`. BM25 is a MinSync retrieval mode, not
121
+ a `--method` name. Use `--method` only for deliberate narrowing. Scheduled
122
+ maintenance should use non-daemon `autorag watch --once`, typically every
123
+ 1 hour, with the same config used by search and no overlapping runs.
124
+ `autorag tui` is the shipped beta terminal UI. `autorag serve` / `autorag p2p`
125
+ are opt-in SimpleX peer sharing (disabled until `p2p.enabled` is true, unless
126
+ `--force`).
121
127
 
122
128
  Reset and rebuild commands remove only selected workspace `.autorag` indexes.
123
129
  Never target source documents. `memory inspect` is read-only and path-opaque.
@@ -131,3 +137,7 @@ Never target source documents. `memory inspect` is read-only and path-opaque.
131
137
  - Preserve real source mapping and numbered feedback identifiers.
132
138
  - Prefer `--json --debug` when another agent consumes search output or will
133
139
  call `autorag feedback`.
140
+ - Do not invent CLI commands. `autorag --help` is the command list of record,
141
+ including the shipped `gateway`, `models`, `serve`, `p2p`, `tui`, and `lite`
142
+ commands. See `docs/embedding-runtime.md` for the local embedding runtime
143
+ and gateway setup.
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: autorag-lite-search
3
+ description: Retrieve documents from an indexed AutoRAG Lite corpus without a model, then persist externally curated reports, inspect evidence, and record numbered feedback. Use when the user wants model-free search, scoped or tag-narrowed retrieval, or the report/evidence/feedback workflow over local documents and authorized datasources.
4
+ license: MIT
5
+ ---
6
+
7
+ # AutoRAG Lite search
8
+
9
+ Use this skill when AutoRAG Lite is already configured and indexed, and the
10
+ user wants model-free retrieval, or wants to persist an externally curated
11
+ report, inspect its evidence, or record feedback. Use `autorag-lite-setup`
12
+ when config, indexing, or refresh is missing or broken. Use the `autorag`
13
+ skill when a model-backed curated answer is requested.
14
+
15
+ AutoRAG Lite never mutates sources. Retrieval reads local source documents and
16
+ authorized datasource content; writes go only to workspace `.autorag/` indexes,
17
+ the memory file, and Jikji `.jikji/` caches.
18
+
19
+ ## Preflight
20
+
21
+ Retrieval requires a completed refresh. If `autorag lite retrieve` returns
22
+ exit code 2 with an `index-not-ready` diagnostic, run `autorag lite refresh`
23
+ (or `autorag refresh`) first, then retry. Confirm freshness with:
24
+
25
+ ```bash
26
+ autorag lite status --json
27
+ ```
28
+
29
+ `status` is model-free and path-opaque.
30
+
31
+ ## Retrieve
32
+
33
+ ```bash
34
+ autorag lite retrieve "key findings in the Q3 report" --top-k 5 --json
35
+ ```
36
+
37
+ The JSON envelope is:
38
+
39
+ ```json
40
+ {
41
+ "ok": true,
42
+ "query": "key findings in the Q3 report",
43
+ "results": [
44
+ {
45
+ "number": 1,
46
+ "source": "<opaque source identifier>",
47
+ "method": "minsync",
48
+ "score": 0.83,
49
+ "metadata": {},
50
+ "content": "..."
51
+ }
52
+ ],
53
+ "diagnostics": []
54
+ }
55
+ ```
56
+
57
+ - `--top-k N` must be a positive integer. Invalid values exit with code 2 and
58
+ an `{"ok": false, "error": "..."}` rejection envelope.
59
+ - Before any refresh, the envelope is `{"ok": false, "query": ..., "diagnostics":
60
+ [{"code": "index-not-ready", "severity": "error", ...}]}` with exit code 2.
61
+ - Each result carries a provenance pair: the `source` identity and the
62
+ `method` that produced it. Source identities are source-native: real file
63
+ paths for local files, datasource identities for datasource results. Never
64
+ rewrite, guess, or flatten them.
65
+ - `diagnostics` are path-opaque: `source` is a component or method label,
66
+ never a real filesystem path. Codes include `retrieval-method-failed` and
67
+ `minsync-unavailable`. A degraded component produces a diagnostic, not a
68
+ failed run; check `diagnostics` before trusting an empty result set.
69
+ - `--debug` adds diagnostic detail to human output without printing real
70
+ filesystem paths.
71
+ - Exit codes: 0 on success (results may be empty), 2 for usage, config, or
72
+ not-ready errors, 1 for runtime errors.
73
+
74
+ Retrieval methods run in parallel and merge: parsed mirrors and MinSync
75
+ lexical/vector/hybrid methods, plus configured datasource methods. Jikji is a
76
+ local discovery/indexing preparer, not a retrieval method in the lite registry.
77
+ `--method` selection applies to refresh, not retrieve; retrieval always queries
78
+ every active retrieval method.
79
+
80
+ ## Scope and tag narrowing (default-deny)
81
+
82
+ Datasource access is default-deny from trusted config
83
+ (`datasourceAccess.allowedTags`, `allowedScopes`). Retrieval flags can only
84
+ narrow that access, never widen it:
85
+
86
+ - `--scope SCOPE` narrows datasource retrieval to a requested sub-path; it
87
+ cannot grant access to anything the config does not already allow.
88
+ - `--tags tag1,tag2` further narrows already-authorized datasource results by
89
+ intersecting with configured allowed tags; it never grants new access.
90
+
91
+ ## Persisting a curated report
92
+
93
+ An external agent curates the raw retrieval results, then persists the
94
+ structured report so evidence and feedback commands work against it:
95
+
96
+ ```bash
97
+ autorag lite report "key findings in the Q3 report" --input report.json --json
98
+ cat report.json | autorag lite report "key findings in the Q3 report" --json
99
+ ```
100
+
101
+ The input is the `emit_autorag_results` JSON schema: `answer`, numbered
102
+ `results` (with `number`, `title`, `summary`, `confidence` in `[0, 1]`,
103
+ optional `source`), and a `mapping` whose entries map each result number to
104
+ its `method` and `source`, plus optional `evidenceRefs` and `warnings`.
105
+ Result and mapping numbers must be one-to-one positive integers. Evidence
106
+ confidence values must be in `[0, 1]`. Invalid input exits with code 2 and
107
+ `{"ok": false, "error": "..."}`.
108
+
109
+ `source` values in a report are opaque identifiers carried from retrieval
110
+ output. Report persistence performs no filesystem reads against them; it
111
+ stores the identifiers as given. Preserve the exact source-native identities
112
+ from the retrieve envelope.
113
+
114
+ On success the JSON envelope is:
115
+
116
+ ```json
117
+ {
118
+ "ok": true,
119
+ "sessionId": "<uuid>",
120
+ "query": "key findings in the Q3 report",
121
+ "answer": "...",
122
+ "resultCount": 3
123
+ }
124
+ ```
125
+
126
+ Use the returned `sessionId` for evidence inspection and feedback.
127
+
128
+ ## Evidence and feedback
129
+
130
+ ```bash
131
+ autorag evidence <sessionId> --result 1 --json
132
+ autorag feedback <sessionId> --useful 1,3 --not-useful 2 --json
133
+ ```
134
+
135
+ - `evidence` shows the persisted source, retrieval method, stable evidence ID,
136
+ excerpt or content, and any `chunkIndex`, `lineNumber`, and
137
+ `retrievalResultId` behind a numbered result. Omit `--result` to inspect the
138
+ whole session.
139
+ - `feedback` records numbered usefulness so retrieval memory can learn.
140
+ Numbers refer to the report's result numbers. Supply at least one feedback
141
+ list.
142
+ - Preserve real source mapping and numbered identifiers end to end: retrieve
143
+ output feeds the report, the report's session feeds evidence and feedback.
144
+
145
+ ## Rules
146
+
147
+ - Refresh before retrieval; refresh again when roots change.
148
+ - Use only configured and approved search paths and datasources.
149
+ - Never move, rename, edit, or delete source documents.
150
+ - Never expose provider credentials or authentication payloads.
151
+ - Treat report `source` values as opaque: persist them verbatim, never read
152
+ the filesystem through them.
153
+ - Keep diagnostics path-opaque; do not reconstruct or disclose real paths
154
+ from them.
155
+ - Prefer `--json` whenever another agent consumes the output.
@@ -0,0 +1,182 @@
1
+ ---
2
+ name: autorag-lite-setup
3
+ description: Initialize, index, refresh, and maintain the model-free AutoRAG Lite lifecycle (config, roots, datasources, refresh, watch, status, index reset/rebuild) without configuring any model. Use when autorag lite init/refresh/status is needed, indexes are missing or stale, or the user wants local document indexing without a search model.
4
+ license: MIT
5
+ ---
6
+
7
+ # AutoRAG Lite setup
8
+
9
+ Use this skill when the user wants AutoRAG's indexing lifecycle without a
10
+ model: initialize a config, build and refresh indexes, watch roots, and inspect
11
+ index health. Everything here is model-free. Use `autorag-setup` instead when a
12
+ search model must be configured or repaired. Use `autorag-lite-search` for
13
+ retrieval, reports, evidence, and feedback.
14
+
15
+ ## Safety
16
+
17
+ - Inspect only non-secret config metadata: `searchPaths`, `workspacePath`,
18
+ `memoryPath`, `minSync`, `jikji`, `datasources`, `datasourceAccess`.
19
+ - Never print, copy, migrate, compare, or persist credential values. Store only
20
+ environment-variable names such as `tokenEnv` or `apiKeyEnv`.
21
+ - Never move, rename, edit, or delete source documents. Lite commands write
22
+ indexes only under the configured workspace `.autorag/` directory and
23
+ Jikji's per-source `.jikji/` caches.
24
+ - Do not index system trees, app bundles, caches, credential stores,
25
+ `node_modules`, `.git`, `dist`, `build`, `target`, `.cache`, `.autorag`, or
26
+ `.jikji`.
27
+
28
+ ## Install the CLI if needed
29
+
30
+ The CLI is `@autorag/librarian` (`autorag`). Runtime is Node.js >= 24 or Bun.
31
+
32
+ ```bash
33
+ command -v autorag >/dev/null || bun install -g @autorag/librarian
34
+ autorag lite --help
35
+ ```
36
+
37
+ If Bun is unavailable, `npm install -g @autorag/librarian` is acceptable.
38
+
39
+ ## Initialize a model-free config
40
+
41
+ ```bash
42
+ autorag lite init \
43
+ --search-paths "/path/to/documents,/path/to/notes" \
44
+ --workspace "/path/to/workspace" \
45
+ --memory-path "/path/to/memory.json"
46
+ ```
47
+
48
+ `lite init` writes the configured model-free lifecycle config. Use `--force`
49
+ only when intentionally replacing an existing config. Explicit user paths win;
50
+ otherwise propose one to three document-dense roots and get approval before
51
+ indexing. Supported parsed formats are `md`, `markdown`, `txt`, `text`, `pdf`,
52
+ `docx`, `pptx`, `xlsx`, `xls`, `hwp`, `hwpx`, and `eml`. Legacy `.doc` is not
53
+ a supported parsed format.
54
+
55
+ Config resolution follows the usual order: `--config`, `AUTORAG_CONFIG`,
56
+ `$AUTORAG_HOME/config.json`, or `~/.autorag/config.json`. Environment overrides
57
+ include `AUTORAG_HOME`, `AUTORAG_CONFIG`, `AUTORAG_SEARCH_PATHS`,
58
+ `AUTORAG_WORKSPACE`, and `AUTORAG_MEMORY_PATH`.
59
+
60
+ ## Probe and configure datasources (setup wizard)
61
+
62
+ `autorag lite ui` is still in development — do not recommend it for datasource
63
+ setup. Configure datasources directly in trusted config, wizard-style:
64
+
65
+ 1. Probe every datasource for setup feasibility before asking the user
66
+ anything: the backing CLI exists (`katok`, `discrawl`, `slacrawl`,
67
+ `wacrawl`, `telecrawl`, `notcrawl`, `qmd`, `mailcrawl`, `rclone`), its
68
+ local store or archive is present, and any credentials it needs are
69
+ available as environment variables or in the tool's own external
70
+ configuration.
71
+ 2. Auto-configure every datasource that probes feasible — write its trusted
72
+ `datasources` / `datasourceAccess` entries without asking. For example,
73
+ when Slack (`slacrawl`) and Discord (`discrawl`) are installed, set both up
74
+ automatically.
75
+ 3. Skip every datasource that probes infeasible (for example Notion or
76
+ Telegram when their CLIs are not installed) and always report the skipped
77
+ list to the user, with what is missing for each.
78
+ 4. Set up a skipped datasource only when the user explicitly asks for it:
79
+ install or authenticate the backing CLI first, then configure it.
80
+ 5. E-mail datasources (`mail-export`, `mailcrawl`) matter to most
81
+ users — always probe them and report their status, even when they end up
82
+ skipped.
83
+
84
+ Datasource skills belong in trusted config and remain default-deny.
85
+
86
+ Config keys may be builtin template names (`kakao`, `whatsapp`, `telegram`,
87
+ `slack`, `discord`, `clawgallery`, `notion`, `github`, `cloud-drive`,
88
+ `mail-export`, `mailcrawl`, `obsidian`, `rss`, `spotlight`) or connection
89
+ aliases with `"type": "<template>"`. Unknown names are skipped with an
90
+ `unknown-datasource-skill` warning; they do not fail config resolution.
91
+ `datasourceAccess.allowedTags` and `allowedScopes` narrow trusted access and
92
+ can never grant it. Store only env-var names such as `tokenEnv` or
93
+ `apiKeyEnv`, never credential values.
94
+
95
+ ## Build and refresh indexes
96
+
97
+ ```bash
98
+ autorag lite refresh --json
99
+ autorag lite refresh --method parsed,minsync --json
100
+ autorag lite refresh --full --json
101
+ autorag lite refresh --force --json
102
+ ```
103
+
104
+ - A plain `refresh` is incremental: it syncs parsed mirrors, MinSync, Jikji,
105
+ and configured datasources against what changed.
106
+ - `--full` and `--force` both request a full resync. Use them only when
107
+ incremental refresh is not enough, such as after config changes to roots or
108
+ index settings.
109
+ - `--method <csv>` deliberately narrows the refresh. Valid values are
110
+ `parsed`, `minsync`, `datasources`, `jikji`, and `all`. Omit the flag to run
111
+ all methods. Unknown values are rejected.
112
+ - MinSync and Jikji auto-install on first use by default. If they are missing
113
+ or broken, run a full refresh or return to setup rather than silently
114
+ degrading to lexical-only search.
115
+ - MinSync's default embedder is local EmbeddingGemma (768 dimensions, served
116
+ locally via Ollama): no embedder flags and no API key are needed, and no
117
+ corpus text leaves the machine. During setup, verify the local model is
118
+ available (`ollama pull embeddinggemma` with `ollama serve` running);
119
+ override it only when intentionally using a remote embedder.
120
+ - Exact duplicate exclusion during refresh is enabled by default via the
121
+ external `dupey` CLI. Install dupey during setup when it is missing
122
+ (`command -v dupey || cargo install dupey`) and tell the user the feature is
123
+ available; when installation is impossible, refresh continues without it
124
+ and the user is told duplicate exclusion is off. Set
125
+ `"excludeExactDuplicates": false` to index every copy.
126
+
127
+ Retrieval requires a completed refresh. `autorag lite retrieve` before any
128
+ refresh exits with code 2 and an `index-not-ready` diagnostic; a successful
129
+ refresh is recorded even when the corpus is empty or only a non-parsed method
130
+ was selected. Always refresh first, and refresh again when roots change.
131
+ Jikji is a discovery/indexing preparer, not a lite retrieval method.
132
+
133
+ ## Watch and scheduled freshness
134
+
135
+ ```bash
136
+ autorag lite watch --once --json
137
+ autorag lite watch
138
+ ```
139
+
140
+ Prefer non-daemon `autorag lite watch --once` from cron, launchd, a systemd
141
+ user timer, or Task Scheduler, hourly by default (every 1 hour; shorten only
142
+ when the user asks for fresher indexes). Use the same config as retrieval,
143
+ avoid overlapping runs, and keep logs outside source trees. `--immediate`
144
+ triggers a first refresh on start and `--debounce-ms N` tunes change
145
+ coalescing. Once the schedule is installed, tell the user right away that
146
+ hourly freshness is set up.
147
+
148
+ ## Status and index maintenance
149
+
150
+ ```bash
151
+ autorag lite status --json
152
+ autorag lite health --json
153
+ autorag lite index rebuild --yes --json
154
+ autorag lite index reset --method parsed --yes --json
155
+ autorag lite duplicates --json
156
+ ```
157
+
158
+ - `status` shows path-opaque corpus freshness and index health. `health` is an
159
+ alias of `status`; neither resolves a model.
160
+ - `index reset` and `index rebuild` remove or rebuild only workspace
161
+ `.autorag` indexes selected by `--method`. They never target source
162
+ documents.
163
+ - `duplicates` scans duplicate document families read-only and never deletes
164
+ or moves files.
165
+
166
+ ## Unavailable components and failure handling
167
+
168
+ Missing optional components degrade gracefully: refresh and retrieval continue
169
+ with path-opaque diagnostics such as `minsync-unavailable` or
170
+ `retrieval-method-failed` instead of failing the whole run. Exit codes are 0
171
+ on success, 2 for config or usage errors, and 1 for runtime errors. When a
172
+ component stays unavailable after a full refresh, return to setup rather than
173
+ accepting silently degraded search.
174
+
175
+ ## Completion condition
176
+
177
+ Setup is complete only when the CLI is installed, roots are approved, a
178
+ non-secret model-free config is written, every datasource has been probed and
179
+ the auto-configured and skipped lists reported to the user, dupey is installed
180
+ or its absence reported, `refresh` has built the requested indexes, `status`
181
+ reports healthy indexes, and any requested watch schedule is installed or
182
+ verified with the user told it is active.