cc-transcript 14.46.21__tar.gz → 14.46.23__tar.gz

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 (261) hide show
  1. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/PKG-INFO +1 -1
  2. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/pyproject.toml +1 -1
  3. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/grep.rs +185 -87
  4. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/scan_grep.rs +14 -21
  5. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/scan_grep_stream.rs +138 -16
  6. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/scan_grep_stream_tests.rs +347 -0
  7. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot.rs +6 -2
  8. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_membership_progress_controls.rs +9 -14
  9. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/toolcall.rs +0 -138
  10. cc_transcript-14.46.23/rust/crates/core/tests/mcp_registry.rs +161 -0
  11. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/tests/persistent_allocation_model.rs +17 -13
  12. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/Cargo.lock +0 -0
  13. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/Cargo.toml +0 -0
  14. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/LICENSE +0 -0
  15. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/README.md +0 -0
  16. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/__init__.py +0 -0
  17. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/__init__.pyi +0 -0
  18. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/_native.pyi +0 -0
  19. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/activity.py +0 -0
  20. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/activity_probe.py +0 -0
  21. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/builders.py +0 -0
  22. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/codex.py +0 -0
  23. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/command.py +0 -0
  24. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/context.py +0 -0
  25. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/corrections.py +0 -0
  26. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/cost.py +0 -0
  27. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/decision_store.py +0 -0
  28. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/decisions.py +0 -0
  29. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/discovery.py +0 -0
  30. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/disktruth.py +0 -0
  31. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/evidence.py +0 -0
  32. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/extract/__init__.py +0 -0
  33. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/extract/correct.py +0 -0
  34. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/facts.py +0 -0
  35. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/filterspec.py +0 -0
  36. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/heartbeats.py +0 -0
  37. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/ids.py +0 -0
  38. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/judge/__init__.py +0 -0
  39. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/judge/llm.py +0 -0
  40. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/judge/similar.py +0 -0
  41. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/judge/verdicts.py +0 -0
  42. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/ledger.py +0 -0
  43. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/literals.py +0 -0
  44. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/mining/__init__.py +0 -0
  45. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/mining/candidates.py +0 -0
  46. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/mining/confidence.py +0 -0
  47. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/mining/engine.py +0 -0
  48. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/mining/formats.py +0 -0
  49. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/mining/sampling.py +0 -0
  50. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/mining/signals.py +0 -0
  51. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/mining/sourcekind.py +0 -0
  52. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/mining/spec.py +0 -0
  53. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/mining/store.py +0 -0
  54. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/models.py +0 -0
  55. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/nlp.py +0 -0
  56. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/notifications.py +0 -0
  57. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/parser.py +0 -0
  58. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/py.typed +0 -0
  59. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/query.py +0 -0
  60. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/render.py +0 -0
  61. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/sentiment/__init__.py +0 -0
  62. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/sentiment/buckets.py +0 -0
  63. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/sentiment/data/afinn-en-165.tsv +0 -0
  64. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/sentiment/data/domain_overrides.tsv +0 -0
  65. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/sentiment/data/en-ewt.udpipe +0 -0
  66. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/sentiment/engine.py +0 -0
  67. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/sentiment/lexicon.py +0 -0
  68. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/sentiment/scorespec.py +0 -0
  69. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/snapshot_schema/config.schema.json +0 -0
  70. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/snapshot_schema/context.schema.json +0 -0
  71. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/snapshot_schema/request.schema.json +0 -0
  72. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/snapshot_schema/response.schema.json +0 -0
  73. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/snapshot_schema/tool_registry.schema.json +0 -0
  74. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/snapshots.py +0 -0
  75. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/synthetic.py +0 -0
  76. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/tools.py +0 -0
  77. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/cc_transcript/watch.py +0 -0
  78. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/Cargo.toml +0 -0
  79. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/blame.rs +0 -0
  80. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/corpus.rs +0 -0
  81. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/corrections.rs +0 -0
  82. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/digest.rs +0 -0
  83. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/facts.rs +0 -0
  84. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/list.rs +0 -0
  85. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/mod.rs +0 -0
  86. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/scratchpad.rs +0 -0
  87. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/show.rs +0 -0
  88. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/slice.rs +0 -0
  89. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/stats.rs +0 -0
  90. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/watch.rs +0 -0
  91. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/index.rs +0 -0
  92. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/lib.rs +0 -0
  93. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/output.rs +0 -0
  94. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/target.rs +0 -0
  95. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/cli/src/timearg.rs +0 -0
  96. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/Cargo.toml +0 -0
  97. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/benches/parse.rs +0 -0
  98. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/benches/render.rs +0 -0
  99. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/benches/toolcall.rs +0 -0
  100. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/build.rs +0 -0
  101. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/activity.rs +0 -0
  102. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/actor.rs +0 -0
  103. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/blame.rs +0 -0
  104. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/buckets.rs +0 -0
  105. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/codex/discovery.rs +0 -0
  106. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/codex/lower.rs +0 -0
  107. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/codex/mod.rs +0 -0
  108. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/codex/parse.rs +0 -0
  109. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/codex/probe.rs +0 -0
  110. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/codex/protocol.rs +0 -0
  111. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/codex/review_continuation.rs +0 -0
  112. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/codex/types.rs +0 -0
  113. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/command.rs +0 -0
  114. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/context.rs +0 -0
  115. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/corrections.rs +0 -0
  116. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/cost.rs +0 -0
  117. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/discovery.rs +0 -0
  118. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/facts.rs +0 -0
  119. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/feedback.rs +0 -0
  120. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/filter.rs +0 -0
  121. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/gateway.rs +0 -0
  122. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/ids.rs +0 -0
  123. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/judge.rs +0 -0
  124. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/lib.rs +0 -0
  125. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/literals/command.rs +0 -0
  126. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/literals/corrections.rs +0 -0
  127. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/literals/feedback.rs +0 -0
  128. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/literals/mining.rs +0 -0
  129. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/literals/mod.rs +0 -0
  130. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/literals/protocol.rs +0 -0
  131. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/mining.rs +0 -0
  132. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/mining_index.rs +0 -0
  133. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/notifications.rs +0 -0
  134. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/parse.rs +0 -0
  135. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/protocol.rs +0 -0
  136. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/pystr.rs +0 -0
  137. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/query.rs +0 -0
  138. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/render.rs +0 -0
  139. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/request_body.rs +0 -0
  140. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/rng.rs +0 -0
  141. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/scan.rs +0 -0
  142. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/scan_checkpoint.rs +0 -0
  143. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/scan_index.rs +0 -0
  144. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/scan_projection.rs +0 -0
  145. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/scan_regressions.rs +0 -0
  146. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/scan_stream.rs +0 -0
  147. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/schema.rs +0 -0
  148. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_activity.rs +0 -0
  149. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_admission_report_tests.rs +0 -0
  150. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_cache.rs +0 -0
  151. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_cache_tests.rs +0 -0
  152. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_catalog.rs +0 -0
  153. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_catalog_owner.rs +0 -0
  154. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_catalog_tests.rs +0 -0
  155. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_codec.rs +0 -0
  156. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_codex_append.rs +0 -0
  157. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_common_borrowed_parent_tests.rs +0 -0
  158. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_compact_codex.rs +0 -0
  159. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_compact_codex_tests.rs +0 -0
  160. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_direct_tail.rs +0 -0
  161. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_direct_tail_tests.rs +0 -0
  162. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_graph_anchor_tests.rs +0 -0
  163. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_graph_validation_tests.rs +0 -0
  164. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_hydrate_budget_tests.rs +0 -0
  165. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_hydration_observations.rs +0 -0
  166. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_index_allocations.rs +0 -0
  167. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_input.rs +0 -0
  168. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_interaction_api.rs +0 -0
  169. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_interaction_api_tests.rs +0 -0
  170. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_interactions.rs +0 -0
  171. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_interactions_tests.rs +0 -0
  172. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_labels.rs +0 -0
  173. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_ledger.rs +0 -0
  174. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_ledger_tests.rs +0 -0
  175. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_load_charge_audit_tests.rs +0 -0
  176. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_load_charge_work_tests.rs +0 -0
  177. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_membership_progress.rs +0 -0
  178. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_membership_progress_tests.rs +0 -0
  179. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_memory.rs +0 -0
  180. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_owned.rs +0 -0
  181. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_persistent.rs +0 -0
  182. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_prepared.rs +0 -0
  183. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_prepared_disk.rs +0 -0
  184. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_prepared_service.rs +0 -0
  185. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_projection.rs +0 -0
  186. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_publication_shared_admission_tests.rs +0 -0
  187. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_query_hydration_tests.rs +0 -0
  188. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_materialization.rs +0 -0
  189. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_projection.rs +0 -0
  190. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_projection_tests.rs +0 -0
  191. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_scope.rs +0 -0
  192. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_scope_tests.rs +0 -0
  193. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_tail_tests.rs +0 -0
  194. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_window.rs +0 -0
  195. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_registered_review_tests.rs +0 -0
  196. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_regressions.rs +0 -0
  197. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_reply_resume_tests.rs +0 -0
  198. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_review.rs +0 -0
  199. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_review_admission_tests.rs +0 -0
  200. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_review_context.rs +0 -0
  201. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_review_reader.rs +0 -0
  202. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_review_source.rs +0 -0
  203. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_root_warm.rs +0 -0
  204. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_sidechain_absence.rs +0 -0
  205. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_sidechain_absence_tests.rs +0 -0
  206. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_sidechain_feed.rs +0 -0
  207. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_sidechain_feed_tests.rs +0 -0
  208. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_skill_demand_controls.rs +0 -0
  209. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_skill_demand_tests.rs +0 -0
  210. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_skill_framing.rs +0 -0
  211. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_skills.rs +0 -0
  212. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_source_cache_index_tests.rs +0 -0
  213. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_spine.rs +0 -0
  214. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_spine_tests.rs +0 -0
  215. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_symlink_proof.rs +0 -0
  216. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_text.rs +0 -0
  217. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/sqlite.rs +0 -0
  218. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/types.rs +0 -0
  219. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/value.rs +0 -0
  220. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/src/watch.rs +0 -0
  221. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/tests/sonic_arena_model.rs +0 -0
  222. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/core/tests/std_allocation_model.rs +0 -0
  223. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/Cargo.toml +0 -0
  224. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/build.rs +0 -0
  225. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/data/command_prefix_pins.tsv +0 -0
  226. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/actor_bridge.rs +0 -0
  227. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/bin/stub_gen.rs +0 -0
  228. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/codex.rs +0 -0
  229. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/command.rs +0 -0
  230. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/context.rs +0 -0
  231. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/corrections.rs +0 -0
  232. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/discovery.rs +0 -0
  233. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/feedback.rs +0 -0
  234. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/judge.rs +0 -0
  235. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/lexicon.rs +0 -0
  236. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/lib.rs +0 -0
  237. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/mining.rs +0 -0
  238. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/nlp.rs +0 -0
  239. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/python.rs +0 -0
  240. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/render.rs +0 -0
  241. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/score.rs +0 -0
  242. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/snapshot_decode.rs +0 -0
  243. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/snapshots.rs +0 -0
  244. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/snapshots_registered_review.rs +0 -0
  245. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/sqlite.rs +0 -0
  246. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/toolcall.rs +0 -0
  247. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/attachment.rs +0 -0
  248. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/blocks.rs +0 -0
  249. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/command.rs +0 -0
  250. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/convert.rs +0 -0
  251. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/dunder.rs +0 -0
  252. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/events.rs +0 -0
  253. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/meta.rs +0 -0
  254. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/mod.rs +0 -0
  255. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/print.rs +0 -0
  256. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/store.rs +0 -0
  257. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/system.rs +0 -0
  258. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/toolcall.rs +0 -0
  259. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/toolresult.rs +0 -0
  260. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/views/transcript.rs +0 -0
  261. {cc_transcript-14.46.21 → cc_transcript-14.46.23}/rust/crates/py/src/watch.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cc-transcript
3
- Version: 14.46.21
3
+ Version: 14.46.23
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Environment :: Console
6
6
  Classifier: Intended Audience :: Developers
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cc-transcript"
3
- version = "14.46.21" # informational — releases stamp the version from the git tag
3
+ version = "14.46.23" # informational — releases stamp the version from the git tag
4
4
  description = "Grep every Claude Code session you've ever run."
5
5
  readme = "README.md"
6
6
  license = "PolyForm-Noncommercial-1.0.0"
@@ -2,7 +2,10 @@ use std::collections::HashMap;
2
2
  use std::os::unix::fs::MetadataExt;
3
3
  use std::path::{Path, PathBuf};
4
4
 
5
- use cc_transcript_core::render::{compact_line, display_path, event_json, transcript_header, Json};
5
+ use cc_transcript_core::filter::event_kind;
6
+ use cc_transcript_core::render::{
7
+ compact_line, display_path, event_json, transcript_header, truncate, Json,
8
+ };
6
9
  use cc_transcript_core::scan::{
7
10
  scan_corpus, Budget, ScanBudget, ScanControl, ScanOutcome, ScanPlan, ScanSession,
8
11
  };
@@ -22,6 +25,7 @@ use crate::DiscoveryOpts;
22
25
  const USAGE: &str = "cc-transcript grep [OPTIONS] PATTERN [PATHS]...";
23
26
  const HELP_PATH: &str = "cc-transcript grep";
24
27
  const DEFAULT_MAX_MATCHES: usize = 20;
28
+ const PREVIEW_WIDTH: usize = 100;
25
29
 
26
30
  #[derive(clap::Args, Default)]
27
31
  pub struct ScanOptions {
@@ -184,18 +188,46 @@ fn stopped(outcome: &ScanOutcome) -> bool {
184
188
  struct Emitter {
185
189
  out: Out,
186
190
  scan_json: bool,
191
+ unit: &'static str,
187
192
  first: bool,
188
193
  exit: Option<i32>,
189
194
  limits: WorkLimits,
190
195
  timeout_ms: u64,
196
+ whole_bytes: usize,
197
+ cut: Option<Tally>,
198
+ left_out: Option<Tally>,
199
+ }
200
+
201
+ #[derive(Clone, Copy)]
202
+ struct Tally {
203
+ first: usize,
204
+ lines: usize,
205
+ }
206
+
207
+ impl Tally {
208
+ fn add(tally: &mut Option<Self>, at: usize) {
209
+ tally
210
+ .get_or_insert(Self {
211
+ first: at,
212
+ lines: 0,
213
+ })
214
+ .lines += 1;
215
+ }
216
+
217
+ fn describe(&self, done: &str, unit: &str) -> String {
218
+ match self.lines {
219
+ 1 => format!("{done} 1 line at {unit} {}", self.first),
220
+ n => format!("{done} {n} lines from {unit} {} on", self.first),
221
+ }
222
+ }
191
223
  }
192
224
 
193
225
  impl Emitter {
194
226
  fn new(
195
227
  scan_json: bool,
228
+ unit: &'static str,
196
229
  timeout_ms: u64,
197
230
  budget: &mut ScanBudget,
198
- _cancel: &Cancellation,
199
231
  ) -> Result<Self, CliExit> {
200
232
  let mut out = Out::new();
201
233
  if scan_json {
@@ -210,26 +242,42 @@ impl Emitter {
210
242
  Ok(Self {
211
243
  out,
212
244
  scan_json,
245
+ unit,
213
246
  first: true,
214
247
  exit: None,
215
248
  limits: budget.limits,
216
249
  timeout_ms,
250
+ whole_bytes: budget.progress.output_bytes,
251
+ cut: None,
252
+ left_out: None,
217
253
  })
218
254
  }
219
255
 
220
256
  fn emit(
221
257
  &mut self,
258
+ at: usize,
222
259
  line: String,
260
+ cut: impl FnOnce(usize) -> Option<String>,
223
261
  budget: &mut ScanBudget,
224
262
  cancel: &Cancellation,
225
263
  ) -> Result<(), SnapshotError> {
226
- budget.charge_output(line.len().saturating_add(2), cancel)?;
227
- self.write(line)
228
- }
229
-
230
- fn summary(&mut self, line: String, budget: &mut ScanBudget) -> Result<(), SnapshotError> {
231
- budget.reserve_output(line.len().saturating_add(2))?;
232
- self.write(line)
264
+ budget.checkpoint(cancel)?;
265
+ let charge = line.len().saturating_add(2);
266
+ self.whole_bytes = self.whole_bytes.saturating_add(charge);
267
+ if self.left_out.is_none() {
268
+ let left = budget.remaining().max_output_bytes;
269
+ if charge <= left {
270
+ budget.reserve_output(charge)?;
271
+ return self.write(line);
272
+ }
273
+ if let Some(short) = cut(line.len()).filter(|short| short.len() + 2 <= left) {
274
+ budget.reserve_output(short.len() + 2)?;
275
+ Tally::add(&mut self.cut, at);
276
+ return self.write(short);
277
+ }
278
+ }
279
+ Tally::add(&mut self.left_out, at);
280
+ Ok(())
233
281
  }
234
282
 
235
283
  fn write(&mut self, line: String) -> Result<(), SnapshotError> {
@@ -261,6 +309,22 @@ impl Emitter {
261
309
  self.out.line(&format!("],{}", &status[1..]))?;
262
310
  }
263
311
  self.out.finish()?;
312
+ let fitted: Vec<_> = [
313
+ self.cut.map(|cut| cut.describe("shortened", self.unit)),
314
+ self.left_out
315
+ .map(|left_out| left_out.describe("left out", self.unit)),
316
+ ]
317
+ .into_iter()
318
+ .flatten()
319
+ .collect();
320
+ if !fitted.is_empty() {
321
+ eline(&format!(
322
+ "warning: --max-output-bytes {} {}; raise it to {} to print every line whole",
323
+ self.limits.max_output_bytes,
324
+ fitted.join(" and "),
325
+ self.whole_bytes,
326
+ ));
327
+ }
264
328
  if let Some(reason) = &outcome.reason {
265
329
  if let Some(scope) = reason.strip_prefix("result_limit") {
266
330
  eline(&format!("warning: stopped at --max-matches {}; more matches may exist — raise it, or pass --max-matches 0 for no cap",counts.first().copied().unwrap_or(0)));
@@ -268,13 +332,10 @@ impl Emitter {
268
332
  eline(&format!("warning: partial view: {scope}"));
269
333
  }
270
334
  } else {
271
- match outcome.budget {
272
- Some(budget) => eline(&format!(
273
- "warning: scan incomplete: {reason}; {}",
274
- raise(budget, &self.limits, self.timeout_ms)
275
- )),
276
- None => eline(&format!("warning: scan incomplete: {reason}")),
277
- }
335
+ let hint = outcome.budget.map_or_else(String::new, |budget| {
336
+ format!("; {}", raise(budget, &self.limits, self.timeout_ms))
337
+ });
338
+ eline(&format!("warning: scan incomplete: {reason}{hint}"));
278
339
  return Err(CliExit(3));
279
340
  }
280
341
  }
@@ -370,12 +431,7 @@ pub fn run(args: GrepArgs) -> Result<(), CliExit> {
370
431
  return Err(usage_error(USAGE, HELP_PATH, &error.reason))
371
432
  }
372
433
  Err(error) => {
373
- let emitter = Emitter::new(
374
- args.scan_json,
375
- timeout_ms,
376
- &mut session.budget,
377
- &Cancellation::default(),
378
- )?;
434
+ let emitter = Emitter::new(args.scan_json, "event", timeout_ms, &mut session.budget)?;
379
435
  return emitter.finish(
380
436
  &failed_outcome(error, &session.budget),
381
437
  &vec![0; args.patterns.len() + 1],
@@ -408,24 +464,20 @@ pub fn run(args: GrepArgs) -> Result<(), CliExit> {
408
464
  let checkpoints = checkpoints();
409
465
  let mut render = Render {
410
466
  args: &args,
411
- emitter: Emitter::new(args.scan_json, timeout_ms, &mut session.budget, &cancel)?,
467
+ emitter: Emitter::new(args.scan_json, "event", timeout_ms, &mut session.budget)?,
412
468
  files: 0,
413
469
  };
414
- if reducer.streams() {
415
- reducer.survey(plan.sources(), session.budget.limits.deadline_unix_ms);
416
- }
470
+ reducer.survey(plan.sources(), session.budget.limits.deadline_unix_ms);
417
471
  let mut outcome = session.each_source(&plan, |session, path| {
418
- if reducer.streams() {
419
- if let Some(control) = reducer.scan_stream(
420
- path,
421
- !structured,
422
- (!reducer.prefilters()).then_some(&checkpoints),
423
- &mut session.budget,
424
- &cancel,
425
- |event, budget, cancel| render.event(path, event, budget, cancel),
426
- )? {
427
- return Ok(control);
428
- }
472
+ if let Some(control) = reducer.scan_stream(
473
+ path,
474
+ !structured,
475
+ reducer.caches().then_some(&checkpoints),
476
+ &mut session.budget,
477
+ &cancel,
478
+ |event, budget, cancel| render.event(path, event, budget, cancel),
479
+ )? {
480
+ return Ok(control);
429
481
  }
430
482
  session.visit_snapshot(path, &mut |path, snapshot, budget, cancel| {
431
483
  let result = reducer.scan_source(snapshot, budget, cancel)?;
@@ -469,14 +521,11 @@ pub fn run(args: GrepArgs) -> Result<(), CliExit> {
469
521
  } else {
470
522
  ""
471
523
  };
472
- if let Err(error) = render.emitter.summary(
473
- format!(
474
- "{} files, {} matches{partial}{note}{validated}",
475
- render.files,
476
- counts.iter().sum::<usize>()
477
- ),
478
- &mut session.budget,
479
- ) {
524
+ if let Err(error) = render.emitter.write(format!(
525
+ "{} files, {} matches{partial}{note}{validated}",
526
+ render.files,
527
+ counts.iter().sum::<usize>()
528
+ )) {
480
529
  if !stopped(&outcome) {
481
530
  outcome.complete = false;
482
531
  (outcome.reason, outcome.budget) = session.budget.explain(error);
@@ -506,37 +555,38 @@ impl Render<'_> {
506
555
  if event.opens_source {
507
556
  self.files += 1;
508
557
  if !structured {
509
- self.emitter
510
- .emit(transcript_header(&path.to_string_lossy()), budget, cancel)?;
558
+ self.emitter.emit(
559
+ event.index,
560
+ transcript_header(&path.to_string_lossy()),
561
+ |_| None,
562
+ budget,
563
+ cancel,
564
+ )?;
511
565
  }
512
566
  }
513
567
  if !structured && args.context > 0 && event.opens_window && !event.opens_source {
514
- self.emitter.emit("--".to_owned(), budget, cancel)?;
568
+ self.emitter
569
+ .emit(event.index, "--".to_owned(), |_| None, budget, cancel)?;
515
570
  }
516
571
  let _render_staging = event.preflight_render(budget, cancel)?;
517
- let line = if structured {
572
+ let range = format!("--range {}:{}", event.index, event.index + 1);
573
+ if structured {
518
574
  let Json::Obj(mut fields) = event_json(event.index, event.entry) else {
519
575
  unreachable!("event_json object")
520
576
  };
521
- fields.insert(
522
- 0,
523
- (
524
- "path".into(),
525
- Json::Str(path.to_string_lossy().into_owned()),
526
- ),
527
- );
577
+ let mut tags = Vec::new();
528
578
  if event.pattern_ids.is_none() {
529
- fields.push(("context".into(), Json::Bool(true)));
579
+ tags.push(("context".into(), Json::Bool(true)));
530
580
  }
531
581
  if args.with_result {
532
582
  let results = result_fields(event.entry, event.results);
533
583
  if !results.is_empty() {
534
- fields.push(("results".into(), Json::Obj(results)));
584
+ tags.push(("results".into(), Json::Obj(results)));
535
585
  }
536
586
  }
537
587
  if args.scan_json {
538
- fields.push(("generation".into(), Json::Str(event.generation.to_owned())));
539
- fields.push((
588
+ tags.push(("generation".into(), Json::Str(event.generation.to_owned())));
589
+ tags.push((
540
590
  "pattern_ids".into(),
541
591
  Json::Arr(
542
592
  event
@@ -546,13 +596,39 @@ impl Render<'_> {
546
596
  ),
547
597
  ));
548
598
  }
549
- Json::Obj(fields).dumps()
550
- } else {
599
+ let path = path.to_string_lossy().into_owned();
600
+ fields.insert(0, ("path".into(), Json::Str(path.clone())));
601
+ fields.extend(tags.iter().cloned());
602
+ return self.emitter.emit(
603
+ event.index,
604
+ Json::Obj(fields).dumps(),
605
+ |bytes| {
606
+ let show = format!("cc-transcript show {path} {range} --json");
607
+ let mut cut = vec![
608
+ ("path".into(), Json::Str(path)),
609
+ ("i".into(), Json::UInt(event.index as u64)),
610
+ ("kind".into(), Json::Str(event_kind(event.entry).to_owned())),
611
+ (
612
+ "cut".into(),
613
+ Json::Obj(vec![
614
+ ("bytes".into(), Json::UInt(bytes as u64)),
615
+ ("show".into(), Json::Str(show)),
616
+ ]),
617
+ ),
618
+ ];
619
+ cut.extend(tags);
620
+ Some(Json::Obj(cut).dumps())
621
+ },
622
+ budget,
623
+ cancel,
624
+ );
625
+ }
626
+ let render = |width| {
551
627
  let mut line = compact_line(
552
628
  event.index,
553
629
  event.entry,
554
630
  event.names,
555
- args.width,
631
+ width,
556
632
  false,
557
633
  args.uuids,
558
634
  );
@@ -561,10 +637,29 @@ impl Render<'_> {
561
637
  }
562
638
  line
563
639
  };
564
- self.emitter.emit(line, budget, cancel)
640
+ self.emitter.emit(
641
+ event.index,
642
+ render(args.width),
643
+ |bytes| {
644
+ Some(cut_line(
645
+ render(PREVIEW_WIDTH),
646
+ bytes,
647
+ &format!(
648
+ "cc-transcript show {} {range} --width 0",
649
+ display_path(&path.to_string_lossy())
650
+ ),
651
+ ))
652
+ },
653
+ budget,
654
+ cancel,
655
+ )
565
656
  }
566
657
  }
567
658
 
659
+ fn cut_line(preview: String, bytes: usize, whole: &str) -> String {
660
+ format!("{preview} [cut from {bytes} bytes; read it whole with {whole}]")
661
+ }
662
+
568
663
  fn run_over_corpus(
569
664
  store: &NativeStore,
570
665
  args: &GrepArgs,
@@ -580,19 +675,14 @@ fn run_over_corpus(
580
675
  return Err(usage_error(USAGE, HELP_PATH, &error.reason))
581
676
  }
582
677
  Err(error) => {
583
- let emitter = Emitter::new(
584
- args.scan_json,
585
- timeout_ms,
586
- &mut budget,
587
- &Cancellation::default(),
588
- )?;
678
+ let emitter = Emitter::new(args.scan_json, "corpus line", timeout_ms, &mut budget)?;
589
679
  return emitter.finish(
590
680
  &failed_outcome(error, &budget),
591
681
  &vec![0; args.patterns.len() + 1],
592
682
  );
593
683
  }
594
684
  };
595
- let mut emitter = Emitter::new(args.scan_json, timeout_ms, &mut budget, &cancel)?;
685
+ let mut emitter = Emitter::new(args.scan_json, "corpus line", timeout_ms, &mut budget)?;
596
686
  let mut outcome = scan_corpus(
597
687
  path,
598
688
  &mut budget,
@@ -608,24 +698,35 @@ fn run_over_corpus(
608
698
  } else {
609
699
  line.len().saturating_add(2)
610
700
  };
611
- if render_bound > budget.remaining().max_output_bytes {
612
- return Err(SnapshotError::new(
613
- Status::OutputLimit,
614
- "corpus match exceeds remaining output budget",
615
- ));
616
- }
617
701
  let _render_staging = budget.reserve_staging(render_bound, cancel)?;
618
702
  budget.charge_projection(
619
703
  line.len().saturating_add(path.as_os_str().len()),
620
704
  0,
621
705
  cancel,
622
706
  )?;
707
+ let shown = path.to_string_lossy();
623
708
  let rendered = if args.scan_json {
624
- sonic_rs::to_string(&json!({"path":path.to_string_lossy().as_ref(),"line":line_number,"text":line,"pattern_ids":ids})).map_err(|e|SnapshotError::new(Status::OutputLimit,e.to_string()))?
709
+ sonic_rs::to_string(&json!({"path":shown.as_ref(),"line":line_number,"text":line,"pattern_ids":&ids})).map_err(|e|SnapshotError::new(Status::OutputLimit,e.to_string()))?
625
710
  } else {
626
711
  line.to_owned()
627
712
  };
628
- emitter.emit(rendered, budget, cancel)?;
713
+ emitter.emit(
714
+ line_number,
715
+ rendered,
716
+ |bytes| {
717
+ Some(if args.scan_json {
718
+ sonic_rs::to_string(&json!({"path":shown.as_ref(),"line":line_number,"cut":{"bytes":bytes,"show":format!("sed -n {line_number}p {shown}")},"pattern_ids":&ids})).expect("corpus cut record serializes")
719
+ } else {
720
+ cut_line(
721
+ truncate(line, PREVIEW_WIDTH),
722
+ bytes,
723
+ &format!("sed -n {line_number}p {}", display_path(&shown)),
724
+ )
725
+ })
726
+ },
727
+ budget,
728
+ cancel,
729
+ )?;
629
730
  }
630
731
  Ok(reducer.satisfied())
631
732
  },
@@ -641,14 +742,11 @@ fn run_over_corpus(
641
742
  } else {
642
743
  ""
643
744
  };
644
- if let Err(error) = emitter.summary(
645
- format!(
646
- "{} matches in {}{partial}",
647
- counts.iter().sum::<usize>(),
648
- display_path(&path.to_string_lossy())
649
- ),
650
- &mut budget,
651
- ) {
745
+ if let Err(error) = emitter.write(format!(
746
+ "{} matches in {}{partial}",
747
+ counts.iter().sum::<usize>(),
748
+ display_path(&path.to_string_lossy())
749
+ )) {
652
750
  if !stopped(&outcome) {
653
751
  outcome.complete = false;
654
752
  (outcome.reason, outcome.budget) = budget.explain(error);
@@ -536,12 +536,8 @@ impl<'store> GrepReducer<'store> {
536
536
  Ok(output)
537
537
  }
538
538
 
539
- pub fn streams(&self) -> bool {
540
- !self.options.errors && !self.options.with_result
541
- }
542
-
543
- pub fn prefilters(&self) -> bool {
544
- self.prefilter.is_some()
539
+ pub fn caches(&self) -> bool {
540
+ self.prefilter.is_none() && !self.options.errors && !self.options.with_result
545
541
  }
546
542
 
547
543
  fn matches(
@@ -764,12 +760,6 @@ fn preflight_render<'store>(
764
760
  .saturating_mul(8),
765
761
  );
766
762
  }
767
- if bytes > budget.remaining().max_output_bytes {
768
- return Err(SnapshotError::new(
769
- Status::OutputLimit,
770
- "event render exceeds remaining output budget",
771
- ));
772
- }
773
763
  let staging = budget.reserve_staging(bytes, cancel)?;
774
764
  let projected = crate::snapshot_codec::encoded_size(
775
765
  &crate::snapshot_codec::EventWire::new(index, entry),
@@ -1137,7 +1127,7 @@ mod tests {
1137
1127
  }
1138
1128
 
1139
1129
  #[test]
1140
- fn context_render_rejects_output_before_producer_is_visited() {
1130
+ fn context_render_leaves_the_output_cap_to_the_rendered_line() {
1141
1131
  let source = snapshot(&[user("hit"), user(&"x".repeat(32768))]);
1142
1132
  let owner = crate::snapshot::NativeStore::new(&json!({})).unwrap();
1143
1133
  let mut budget = budget(&owner);
@@ -1148,15 +1138,18 @@ mod tests {
1148
1138
  .scan_source(&source, &mut budget, &Cancellation::default())
1149
1139
  .unwrap();
1150
1140
  budget.limits.max_output_bytes = 1024;
1151
- let mut visited = false;
1152
- let admission = result
1141
+ let output = budget.progress.output_bytes;
1142
+ let _staging = result
1153
1143
  .preflight_render(&source, 1, &mut budget, &Cancellation::default())
1154
- .map(|_staging| {
1155
- visited = true;
1156
- haystack(source.entry(1), true, true, true)
1157
- });
1158
- assert_eq!(admission.err().unwrap().status, Status::OutputLimit);
1159
- assert!(!visited);
1144
+ .unwrap();
1145
+ assert_eq!(budget.progress.output_bytes, output);
1146
+ assert_eq!(
1147
+ budget
1148
+ .charge_output(1025, &Cancellation::default())
1149
+ .unwrap_err()
1150
+ .status,
1151
+ Status::OutputLimit
1152
+ );
1160
1153
  }
1161
1154
 
1162
1155
  #[test]