@mindstudio-ai/agent 0.1.119 → 0.1.121
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/cli.js +62 -13
- package/dist/index.d.ts +56 -5
- package/dist/index.js +58 -7
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +62 -13
- package/llms.txt +6 -1
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -1903,6 +1903,9 @@ await Policies.search('ERR-7741X', { mode: 'lexical' });
|
|
|
1903
1903
|
await Policies.add(buffer, { filename: 'policy.pdf', contentType: 'application/pdf', metadata: { department: 'legal' } });
|
|
1904
1904
|
const docs = await Policies.documents();
|
|
1905
1905
|
|
|
1906
|
+
// walk a large corpus (a page at a time behind the scenes) to build your own index of it
|
|
1907
|
+
for await (const doc of Policies.allDocuments()) { /* doc.id, doc.metadata, doc.status */ }
|
|
1908
|
+
|
|
1906
1909
|
// introspection — what is in the corpus, and how one document was split
|
|
1907
1910
|
const { chunkCount, pipeline } = await Policies.stats(); // counts + the config actually in effect
|
|
1908
1911
|
const chunks = await Policies.chunks(docs[0].id); // why a document does or doesn't match
|
|
@@ -1920,7 +1923,9 @@ Search is deterministic for a fixed corpus and configuration — same query, sam
|
|
|
1920
1923
|
|
|
1921
1924
|
`search()` throws `index_warming` (HTTP 503) when a large corpus's index is being reloaded after an eviction — a minute or two, in the background. It means loading, not empty: tell the user the knowledge base is warming up and retry shortly. Small corpora reload inside the search and never raise it; sources on dedicated capacity are never evicted.
|
|
1922
1925
|
|
|
1923
|
-
|
|
1926
|
+
On dedicated capacity `search()` throws `index_building` (HTTP 503) instead, while a bulk load runs and while the index is built after one: the index is built once at the end of a load rather than behind every write, and the message carries "N of M vectors indexed". Handle it like `index_warming` — the knowledge base is being built, never empty; say so and retry later.
|
|
1927
|
+
|
|
1928
|
+
Other methods: `stats()`, `documents()` (the first thousand, or `documents({ ids })` to poll what `add` returned), `documentsPage({ cursor?, limit? })` and `allDocuments()` (walk a corpus of any size, oldest first — how an app builds its own timeline or index of a big source after ingest, in a background task), `chunks(documentId, {vectors?})`, `remove(documentId)`, `removeWhere(selector)`, `ensure(name?)` (rarely needed — `add` and `search` create-on-reference), and `DataSource.contentHash(bytes)` to check for an existing document before adding.
|
|
1924
1929
|
|
|
1925
1930
|
`removeWhere({ metadata?, filename?, documentIds?, externalIdPrefix? })` removes every matching document (vectors, row and bytes) in pages of a thousand and returns `{ deleted, remaining }`. Chunk-level filter fields and an empty selector are refused; deleting a whole source is an owner operation (`remy-admin datasources delete`), not something app code does.
|
|
1926
1931
|
|