@fs/mycroft 0.2.0 → 0.3.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 (52) hide show
  1. package/README.md +23 -0
  2. package/dist/batch-embedder-6IIWAZPW.js +14 -0
  3. package/dist/batch-embedder-6IIWAZPW.js.map +1 -0
  4. package/dist/batch-embedder-7DGZAQKL.js +14 -0
  5. package/dist/batch-embedder-7DGZAQKL.js.map +1 -0
  6. package/dist/batch-embedder-IZDBS3IL.js +13 -0
  7. package/dist/batch-embedder-IZDBS3IL.js.map +1 -0
  8. package/dist/batch-embedder-LYCZDYI4.js +15 -0
  9. package/dist/batch-embedder-LYCZDYI4.js.map +1 -0
  10. package/dist/batch-embedder-RHKD2OJD.js +14 -0
  11. package/dist/batch-embedder-RHKD2OJD.js.map +1 -0
  12. package/dist/batch-embedder-VQZUI7R6.js +14 -0
  13. package/dist/batch-embedder-VQZUI7R6.js.map +1 -0
  14. package/dist/batch-embedder-ZJZLNLOK.js +14 -0
  15. package/dist/batch-embedder-ZJZLNLOK.js.map +1 -0
  16. package/dist/batch-summarizer-7MCT4HJB.js +14 -0
  17. package/dist/batch-summarizer-7MCT4HJB.js.map +1 -0
  18. package/dist/batch-summarizer-BMIBVFAE.js +14 -0
  19. package/dist/batch-summarizer-BMIBVFAE.js.map +1 -0
  20. package/dist/chunk-35EO53CC.js +8058 -0
  21. package/dist/chunk-35EO53CC.js.map +1 -0
  22. package/dist/chunk-57ZGGKEF.js +8060 -0
  23. package/dist/chunk-57ZGGKEF.js.map +1 -0
  24. package/dist/chunk-6DLQHHCC.js +249 -0
  25. package/dist/chunk-6DLQHHCC.js.map +1 -0
  26. package/dist/chunk-7CO4PMU5.js +92 -0
  27. package/dist/chunk-7CO4PMU5.js.map +1 -0
  28. package/dist/chunk-7DUQNGEK.js +253 -0
  29. package/dist/chunk-7DUQNGEK.js.map +1 -0
  30. package/dist/chunk-7IPX4MKA.js +4637 -0
  31. package/dist/chunk-7IPX4MKA.js.map +1 -0
  32. package/dist/chunk-7NLMBXXY.js +6438 -0
  33. package/dist/chunk-7NLMBXXY.js.map +1 -0
  34. package/dist/chunk-BR2PM6D3.js +11047 -0
  35. package/dist/chunk-BR2PM6D3.js.map +1 -0
  36. package/dist/chunk-KGG7WEYE.js +162 -0
  37. package/dist/chunk-KGG7WEYE.js.map +1 -0
  38. package/dist/chunk-QRDUQX63.js +256 -0
  39. package/dist/chunk-QRDUQX63.js.map +1 -0
  40. package/dist/chunk-R3FOJK5A.js +2088 -0
  41. package/dist/chunk-R3FOJK5A.js.map +1 -0
  42. package/dist/chunk-XXO66RCF.js +94 -0
  43. package/dist/chunk-XXO66RCF.js.map +1 -0
  44. package/dist/cli.js +638 -179
  45. package/dist/cli.js.map +1 -1
  46. package/dist/fileFromPath-FLANAQWT.js +128 -0
  47. package/dist/fileFromPath-FLANAQWT.js.map +1 -0
  48. package/dist/main-36PRDAPE.js +1857 -0
  49. package/dist/main-36PRDAPE.js.map +1 -0
  50. package/dist/main-B3QJZGLU.js +1859 -0
  51. package/dist/main-B3QJZGLU.js.map +1 -0
  52. package/package.json +7 -1
package/README.md CHANGED
@@ -21,6 +21,11 @@ Run `mycroft config onboard` first to set everything up, then use the book and c
21
21
  ```bash
22
22
  mycroft book list
23
23
  mycroft book ingest /path/to/book.epub
24
+ mycroft book ingest /path/to/book.epub --summary
25
+ mycroft book ingest /path/to/book.epub --batch
26
+ mycroft book ingest /path/to/book.epub --batch --summary
27
+ mycroft book ingest status <id>
28
+ mycroft book ingest resume <id>
24
29
  mycroft book ask <id> "What is the main conflict?"
25
30
  mycroft chat start <id>
26
31
  mycroft chat ask <session> "What does this foreshadow?"
@@ -30,6 +35,23 @@ mycroft config resolve
30
35
  mycroft config onboard
31
36
  ```
32
37
 
38
+ ## Cost estimates (approximate)
39
+
40
+ These are rough, model-dependent estimates for embeddings + optional summaries. Costs vary by model pricing and book structure. Use this as a directional guide only. Summarization estimates assume `gpt-5-nano` and embeddings assume `text-embedding-3-small`.
41
+
42
+ | Book size | Example | No summaries | With summaries | With summaries (batched) |
43
+ | --- | --- | --- | --- | --- |
44
+ | Small | 200-300 pages | ~$0.002-$0.004 | ~$0.04-$0.08 | ~$0.02-$0.04 |
45
+ | Average novel | 350-450 pages | ~$0.004-$0.006 | ~$0.08-$0.15 | ~$0.04-$0.08 |
46
+ | Large novel | 600-800 pages | ~$0.007-$0.01 | ~$0.15-$0.25 | ~$0.08-$0.13 |
47
+ | Trilogy | 1,500-2,000 pages | ~$0.02-$0.03 | ~$0.30-$0.60 | ~$0.15-$0.30 |
48
+
49
+ Reference point: a ~700 page book (~1,600 chunks) is about ~$0.008 for embeddings only, ~$0.20 with summaries, or ~$0.10 with summaries batched.
50
+
51
+ Use `--summary` to generate per-chapter summaries during ingestion. Summaries improve retrieval quality but are significantly more expensive than embeddings alone (see cost table above). Without `--summary`, ingestion only generates embeddings, which is fast and cheap.
52
+
53
+ Use `--batch` to cut costs by 50% via the OpenAI Batch API. This applies to both embeddings and summaries. Batch jobs may take up to 24 hours to complete. When using `--batch`, the command returns immediately after submitting the job. When combined with `--summary`, the summary batch runs first; once complete, run `resume` to submit the embedding batch. Use `mycroft book ingest status <id>` to check progress, and `mycroft book ingest resume <id>` to advance to the next phase. If a non-batch ingest is interrupted, use the same resume command to continue without re-embedding completed chunks.
54
+
33
55
  ## Local dev
34
56
 
35
57
  ```bash
@@ -74,5 +96,6 @@ CLI overrides:
74
96
  - `--max-chapter <n>`
75
97
  - `--top-k <n>`
76
98
  - `--manual` (interactive chapter selection)
99
+ - `--batch`
77
100
  - `--summary`
78
101
  - `--force`
@@ -0,0 +1,14 @@
1
+ import {
2
+ checkBatchStatus,
3
+ cleanupBatchFiles,
4
+ downloadBatchResults,
5
+ submitBatchEmbeddings
6
+ } from "./chunk-BR2PM6D3.js";
7
+ import "./chunk-R3FOJK5A.js";
8
+ export {
9
+ checkBatchStatus,
10
+ cleanupBatchFiles,
11
+ downloadBatchResults,
12
+ submitBatchEmbeddings
13
+ };
14
+ //# sourceMappingURL=batch-embedder-6IIWAZPW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,14 @@
1
+ import {
2
+ checkBatchStatus,
3
+ cleanupBatchFiles,
4
+ downloadBatchResults,
5
+ submitBatchEmbeddings
6
+ } from "./chunk-7CO4PMU5.js";
7
+ import "./chunk-KGG7WEYE.js";
8
+ export {
9
+ checkBatchStatus,
10
+ cleanupBatchFiles,
11
+ downloadBatchResults,
12
+ submitBatchEmbeddings
13
+ };
14
+ //# sourceMappingURL=batch-embedder-7DGZAQKL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,13 @@
1
+ import {
2
+ checkBatchStatus,
3
+ cleanupBatchFiles,
4
+ downloadBatchResults,
5
+ submitBatchEmbeddings
6
+ } from "./chunk-6DLQHHCC.js";
7
+ export {
8
+ checkBatchStatus,
9
+ cleanupBatchFiles,
10
+ downloadBatchResults,
11
+ submitBatchEmbeddings
12
+ };
13
+ //# sourceMappingURL=batch-embedder-IZDBS3IL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,15 @@
1
+ import {
2
+ checkBatchStatus,
3
+ cleanupBatchFiles,
4
+ downloadBatchResults,
5
+ submitBatchEmbeddings
6
+ } from "./chunk-7NLMBXXY.js";
7
+ import "./chunk-7IPX4MKA.js";
8
+ import "./chunk-R3FOJK5A.js";
9
+ export {
10
+ checkBatchStatus,
11
+ cleanupBatchFiles,
12
+ downloadBatchResults,
13
+ submitBatchEmbeddings
14
+ };
15
+ //# sourceMappingURL=batch-embedder-LYCZDYI4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,14 @@
1
+ import {
2
+ checkBatchStatus,
3
+ cleanupBatchFiles,
4
+ downloadBatchResults,
5
+ submitBatchEmbeddings
6
+ } from "./chunk-57ZGGKEF.js";
7
+ import "./chunk-R3FOJK5A.js";
8
+ export {
9
+ checkBatchStatus,
10
+ cleanupBatchFiles,
11
+ downloadBatchResults,
12
+ submitBatchEmbeddings
13
+ };
14
+ //# sourceMappingURL=batch-embedder-RHKD2OJD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,14 @@
1
+ import {
2
+ checkBatchStatus,
3
+ cleanupBatchFiles,
4
+ downloadBatchResults,
5
+ submitBatchEmbeddings
6
+ } from "./chunk-35EO53CC.js";
7
+ import "./chunk-R3FOJK5A.js";
8
+ export {
9
+ checkBatchStatus,
10
+ cleanupBatchFiles,
11
+ downloadBatchResults,
12
+ submitBatchEmbeddings
13
+ };
14
+ //# sourceMappingURL=batch-embedder-VQZUI7R6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,14 @@
1
+ import {
2
+ checkBatchStatus,
3
+ cleanupBatchFiles,
4
+ downloadBatchResults,
5
+ submitBatchEmbeddings
6
+ } from "./chunk-XXO66RCF.js";
7
+ import "./chunk-KGG7WEYE.js";
8
+ export {
9
+ checkBatchStatus,
10
+ cleanupBatchFiles,
11
+ downloadBatchResults,
12
+ submitBatchEmbeddings
13
+ };
14
+ //# sourceMappingURL=batch-embedder-ZJZLNLOK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,14 @@
1
+ import {
2
+ downloadBatchSummaryResults,
3
+ downloadMergeResults,
4
+ submitBatchSummaries,
5
+ submitMergePass
6
+ } from "./chunk-QRDUQX63.js";
7
+ import "./chunk-KGG7WEYE.js";
8
+ export {
9
+ downloadBatchSummaryResults,
10
+ downloadMergeResults,
11
+ submitBatchSummaries,
12
+ submitMergePass
13
+ };
14
+ //# sourceMappingURL=batch-summarizer-7MCT4HJB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,14 @@
1
+ import {
2
+ downloadBatchSummaryResults,
3
+ downloadMergeResults,
4
+ submitBatchSummaries,
5
+ submitMergePass
6
+ } from "./chunk-7DUQNGEK.js";
7
+ import "./chunk-KGG7WEYE.js";
8
+ export {
9
+ downloadBatchSummaryResults,
10
+ downloadMergeResults,
11
+ submitBatchSummaries,
12
+ submitMergePass
13
+ };
14
+ //# sourceMappingURL=batch-summarizer-BMIBVFAE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}