cc-transcript 14.46.22__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.22 → cc_transcript-14.46.23}/PKG-INFO +1 -1
  2. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/pyproject.toml +1 -1
  3. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/grep.rs +154 -77
  4. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/scan_grep_stream_tests.rs +69 -13
  5. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/Cargo.lock +0 -0
  6. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/Cargo.toml +0 -0
  7. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/LICENSE +0 -0
  8. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/README.md +0 -0
  9. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/__init__.py +0 -0
  10. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/__init__.pyi +0 -0
  11. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/_native.pyi +0 -0
  12. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/activity.py +0 -0
  13. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/activity_probe.py +0 -0
  14. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/builders.py +0 -0
  15. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/codex.py +0 -0
  16. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/command.py +0 -0
  17. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/context.py +0 -0
  18. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/corrections.py +0 -0
  19. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/cost.py +0 -0
  20. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/decision_store.py +0 -0
  21. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/decisions.py +0 -0
  22. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/discovery.py +0 -0
  23. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/disktruth.py +0 -0
  24. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/evidence.py +0 -0
  25. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/extract/__init__.py +0 -0
  26. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/extract/correct.py +0 -0
  27. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/facts.py +0 -0
  28. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/filterspec.py +0 -0
  29. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/heartbeats.py +0 -0
  30. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/ids.py +0 -0
  31. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/judge/__init__.py +0 -0
  32. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/judge/llm.py +0 -0
  33. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/judge/similar.py +0 -0
  34. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/judge/verdicts.py +0 -0
  35. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/ledger.py +0 -0
  36. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/literals.py +0 -0
  37. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/mining/__init__.py +0 -0
  38. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/mining/candidates.py +0 -0
  39. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/mining/confidence.py +0 -0
  40. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/mining/engine.py +0 -0
  41. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/mining/formats.py +0 -0
  42. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/mining/sampling.py +0 -0
  43. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/mining/signals.py +0 -0
  44. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/mining/sourcekind.py +0 -0
  45. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/mining/spec.py +0 -0
  46. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/mining/store.py +0 -0
  47. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/models.py +0 -0
  48. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/nlp.py +0 -0
  49. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/notifications.py +0 -0
  50. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/parser.py +0 -0
  51. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/py.typed +0 -0
  52. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/query.py +0 -0
  53. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/render.py +0 -0
  54. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/sentiment/__init__.py +0 -0
  55. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/sentiment/buckets.py +0 -0
  56. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/sentiment/data/afinn-en-165.tsv +0 -0
  57. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/sentiment/data/domain_overrides.tsv +0 -0
  58. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/sentiment/data/en-ewt.udpipe +0 -0
  59. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/sentiment/engine.py +0 -0
  60. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/sentiment/lexicon.py +0 -0
  61. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/sentiment/scorespec.py +0 -0
  62. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/snapshot_schema/config.schema.json +0 -0
  63. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/snapshot_schema/context.schema.json +0 -0
  64. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/snapshot_schema/request.schema.json +0 -0
  65. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/snapshot_schema/response.schema.json +0 -0
  66. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/snapshot_schema/tool_registry.schema.json +0 -0
  67. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/snapshots.py +0 -0
  68. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/synthetic.py +0 -0
  69. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/tools.py +0 -0
  70. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/cc_transcript/watch.py +0 -0
  71. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/Cargo.toml +0 -0
  72. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/blame.rs +0 -0
  73. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/corpus.rs +0 -0
  74. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/corrections.rs +0 -0
  75. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/digest.rs +0 -0
  76. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/facts.rs +0 -0
  77. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/list.rs +0 -0
  78. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/mod.rs +0 -0
  79. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/scratchpad.rs +0 -0
  80. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/show.rs +0 -0
  81. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/slice.rs +0 -0
  82. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/stats.rs +0 -0
  83. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/commands/watch.rs +0 -0
  84. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/index.rs +0 -0
  85. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/lib.rs +0 -0
  86. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/output.rs +0 -0
  87. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/target.rs +0 -0
  88. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/cli/src/timearg.rs +0 -0
  89. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/Cargo.toml +0 -0
  90. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/benches/parse.rs +0 -0
  91. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/benches/render.rs +0 -0
  92. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/benches/toolcall.rs +0 -0
  93. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/build.rs +0 -0
  94. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/activity.rs +0 -0
  95. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/actor.rs +0 -0
  96. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/blame.rs +0 -0
  97. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/buckets.rs +0 -0
  98. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/codex/discovery.rs +0 -0
  99. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/codex/lower.rs +0 -0
  100. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/codex/mod.rs +0 -0
  101. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/codex/parse.rs +0 -0
  102. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/codex/probe.rs +0 -0
  103. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/codex/protocol.rs +0 -0
  104. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/codex/review_continuation.rs +0 -0
  105. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/codex/types.rs +0 -0
  106. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/command.rs +0 -0
  107. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/context.rs +0 -0
  108. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/corrections.rs +0 -0
  109. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/cost.rs +0 -0
  110. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/discovery.rs +0 -0
  111. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/facts.rs +0 -0
  112. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/feedback.rs +0 -0
  113. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/filter.rs +0 -0
  114. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/gateway.rs +0 -0
  115. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/ids.rs +0 -0
  116. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/judge.rs +0 -0
  117. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/lib.rs +0 -0
  118. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/literals/command.rs +0 -0
  119. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/literals/corrections.rs +0 -0
  120. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/literals/feedback.rs +0 -0
  121. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/literals/mining.rs +0 -0
  122. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/literals/mod.rs +0 -0
  123. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/literals/protocol.rs +0 -0
  124. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/mining.rs +0 -0
  125. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/mining_index.rs +0 -0
  126. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/notifications.rs +0 -0
  127. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/parse.rs +0 -0
  128. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/protocol.rs +0 -0
  129. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/pystr.rs +0 -0
  130. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/query.rs +0 -0
  131. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/render.rs +0 -0
  132. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/request_body.rs +0 -0
  133. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/rng.rs +0 -0
  134. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/scan.rs +0 -0
  135. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/scan_checkpoint.rs +0 -0
  136. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/scan_grep.rs +0 -0
  137. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/scan_grep_stream.rs +0 -0
  138. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/scan_index.rs +0 -0
  139. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/scan_projection.rs +0 -0
  140. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/scan_regressions.rs +0 -0
  141. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/scan_stream.rs +0 -0
  142. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/schema.rs +0 -0
  143. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot.rs +0 -0
  144. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_activity.rs +0 -0
  145. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_admission_report_tests.rs +0 -0
  146. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_cache.rs +0 -0
  147. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_cache_tests.rs +0 -0
  148. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_catalog.rs +0 -0
  149. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_catalog_owner.rs +0 -0
  150. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_catalog_tests.rs +0 -0
  151. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_codec.rs +0 -0
  152. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_codex_append.rs +0 -0
  153. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_common_borrowed_parent_tests.rs +0 -0
  154. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_compact_codex.rs +0 -0
  155. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_compact_codex_tests.rs +0 -0
  156. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_direct_tail.rs +0 -0
  157. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_direct_tail_tests.rs +0 -0
  158. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_graph_anchor_tests.rs +0 -0
  159. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_graph_validation_tests.rs +0 -0
  160. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_hydrate_budget_tests.rs +0 -0
  161. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_hydration_observations.rs +0 -0
  162. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_index_allocations.rs +0 -0
  163. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_input.rs +0 -0
  164. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_interaction_api.rs +0 -0
  165. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_interaction_api_tests.rs +0 -0
  166. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_interactions.rs +0 -0
  167. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_interactions_tests.rs +0 -0
  168. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_labels.rs +0 -0
  169. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_ledger.rs +0 -0
  170. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_ledger_tests.rs +0 -0
  171. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_load_charge_audit_tests.rs +0 -0
  172. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_load_charge_work_tests.rs +0 -0
  173. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_membership_progress.rs +0 -0
  174. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_membership_progress_controls.rs +0 -0
  175. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_membership_progress_tests.rs +0 -0
  176. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_memory.rs +0 -0
  177. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_owned.rs +0 -0
  178. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_persistent.rs +0 -0
  179. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_prepared.rs +0 -0
  180. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_prepared_disk.rs +0 -0
  181. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_prepared_service.rs +0 -0
  182. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_projection.rs +0 -0
  183. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_publication_shared_admission_tests.rs +0 -0
  184. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_query_hydration_tests.rs +0 -0
  185. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_materialization.rs +0 -0
  186. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_projection.rs +0 -0
  187. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_projection_tests.rs +0 -0
  188. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_scope.rs +0 -0
  189. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_scope_tests.rs +0 -0
  190. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_tail_tests.rs +0 -0
  191. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_raw_window.rs +0 -0
  192. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_registered_review_tests.rs +0 -0
  193. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_regressions.rs +0 -0
  194. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_reply_resume_tests.rs +0 -0
  195. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_review.rs +0 -0
  196. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_review_admission_tests.rs +0 -0
  197. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_review_context.rs +0 -0
  198. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_review_reader.rs +0 -0
  199. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_review_source.rs +0 -0
  200. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_root_warm.rs +0 -0
  201. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_sidechain_absence.rs +0 -0
  202. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_sidechain_absence_tests.rs +0 -0
  203. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_sidechain_feed.rs +0 -0
  204. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_sidechain_feed_tests.rs +0 -0
  205. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_skill_demand_controls.rs +0 -0
  206. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_skill_demand_tests.rs +0 -0
  207. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_skill_framing.rs +0 -0
  208. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_skills.rs +0 -0
  209. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_source_cache_index_tests.rs +0 -0
  210. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_spine.rs +0 -0
  211. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_spine_tests.rs +0 -0
  212. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_symlink_proof.rs +0 -0
  213. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/snapshot_text.rs +0 -0
  214. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/sqlite.rs +0 -0
  215. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/toolcall.rs +0 -0
  216. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/types.rs +0 -0
  217. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/value.rs +0 -0
  218. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/src/watch.rs +0 -0
  219. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/tests/mcp_registry.rs +0 -0
  220. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/tests/persistent_allocation_model.rs +0 -0
  221. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/tests/sonic_arena_model.rs +0 -0
  222. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/core/tests/std_allocation_model.rs +0 -0
  223. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/Cargo.toml +0 -0
  224. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/build.rs +0 -0
  225. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/data/command_prefix_pins.tsv +0 -0
  226. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/actor_bridge.rs +0 -0
  227. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/bin/stub_gen.rs +0 -0
  228. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/codex.rs +0 -0
  229. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/command.rs +0 -0
  230. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/context.rs +0 -0
  231. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/corrections.rs +0 -0
  232. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/discovery.rs +0 -0
  233. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/feedback.rs +0 -0
  234. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/judge.rs +0 -0
  235. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/lexicon.rs +0 -0
  236. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/lib.rs +0 -0
  237. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/mining.rs +0 -0
  238. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/nlp.rs +0 -0
  239. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/python.rs +0 -0
  240. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/render.rs +0 -0
  241. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/score.rs +0 -0
  242. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/snapshot_decode.rs +0 -0
  243. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/snapshots.rs +0 -0
  244. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/snapshots_registered_review.rs +0 -0
  245. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/sqlite.rs +0 -0
  246. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/toolcall.rs +0 -0
  247. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/attachment.rs +0 -0
  248. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/blocks.rs +0 -0
  249. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/command.rs +0 -0
  250. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/convert.rs +0 -0
  251. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/dunder.rs +0 -0
  252. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/events.rs +0 -0
  253. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/meta.rs +0 -0
  254. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/mod.rs +0 -0
  255. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/print.rs +0 -0
  256. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/store.rs +0 -0
  257. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/system.rs +0 -0
  258. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/toolcall.rs +0 -0
  259. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/toolresult.rs +0 -0
  260. {cc_transcript-14.46.22 → cc_transcript-14.46.23}/rust/crates/py/src/views/transcript.rs +0 -0
  261. {cc_transcript-14.46.22 → 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.22
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.22" # 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,26 +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,
191
- refused: Option<Refused>,
196
+ whole_bytes: usize,
197
+ cut: Option<Tally>,
198
+ left_out: Option<Tally>,
192
199
  }
193
200
 
194
201
  #[derive(Clone, Copy)]
195
- struct Refused {
196
- event: usize,
197
- bytes: usize,
198
- used: usize,
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
+ }
199
223
  }
200
224
 
201
225
  impl Emitter {
202
226
  fn new(
203
227
  scan_json: bool,
228
+ unit: &'static str,
204
229
  timeout_ms: u64,
205
230
  budget: &mut ScanBudget,
206
- _cancel: &Cancellation,
207
231
  ) -> Result<Self, CliExit> {
208
232
  let mut out = Out::new();
209
233
  if scan_json {
@@ -218,41 +242,42 @@ impl Emitter {
218
242
  Ok(Self {
219
243
  out,
220
244
  scan_json,
245
+ unit,
221
246
  first: true,
222
247
  exit: None,
223
248
  limits: budget.limits,
224
249
  timeout_ms,
225
- refused: None,
250
+ whole_bytes: budget.progress.output_bytes,
251
+ cut: None,
252
+ left_out: None,
226
253
  })
227
254
  }
228
255
 
229
256
  fn emit(
230
257
  &mut self,
258
+ at: usize,
231
259
  line: String,
260
+ cut: impl FnOnce(usize) -> Option<String>,
232
261
  budget: &mut ScanBudget,
233
262
  cancel: &Cancellation,
234
263
  ) -> Result<(), SnapshotError> {
235
- budget.charge_output(line.len().saturating_add(2), cancel)?;
236
- self.write(line)
237
- }
238
-
239
- fn emit_event(
240
- &mut self,
241
- event: usize,
242
- line: String,
243
- budget: &mut ScanBudget,
244
- cancel: &Cancellation,
245
- ) -> Result<(), SnapshotError> {
246
- let refused = Refused {
247
- event,
248
- bytes: line.len().saturating_add(2),
249
- used: budget.progress.output_bytes,
250
- };
251
- self.emit(line, budget, cancel).inspect_err(|error| {
252
- if error.status == Status::OutputLimit {
253
- self.refused = Some(refused);
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);
254
272
  }
255
- })
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(())
256
281
  }
257
282
 
258
283
  fn write(&mut self, line: String) -> Result<(), SnapshotError> {
@@ -284,6 +309,22 @@ impl Emitter {
284
309
  self.out.line(&format!("],{}", &status[1..]))?;
285
310
  }
286
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
+ }
287
328
  if let Some(reason) = &outcome.reason {
288
329
  if let Some(scope) = reason.strip_prefix("result_limit") {
289
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)));
@@ -291,15 +332,9 @@ impl Emitter {
291
332
  eline(&format!("warning: partial view: {scope}"));
292
333
  }
293
334
  } else {
294
- let hint = match (outcome.budget, self.refused) {
295
- (Some(Budget::OutputBytes), Some(Refused { event, bytes, used })) => format!(
296
- " at event {event}: its next line is {bytes} bytes and {} remained; raise --max-output-bytes to {} or more",
297
- self.limits.max_output_bytes.saturating_sub(used),
298
- used.saturating_add(bytes),
299
- ),
300
- (Some(budget), _) => format!("; {}", raise(budget, &self.limits, self.timeout_ms)),
301
- (None, _) => String::new(),
302
- };
335
+ let hint = outcome.budget.map_or_else(String::new, |budget| {
336
+ format!("; {}", raise(budget, &self.limits, self.timeout_ms))
337
+ });
303
338
  eline(&format!("warning: scan incomplete: {reason}{hint}"));
304
339
  return Err(CliExit(3));
305
340
  }
@@ -396,12 +431,7 @@ pub fn run(args: GrepArgs) -> Result<(), CliExit> {
396
431
  return Err(usage_error(USAGE, HELP_PATH, &error.reason))
397
432
  }
398
433
  Err(error) => {
399
- let emitter = Emitter::new(
400
- args.scan_json,
401
- timeout_ms,
402
- &mut session.budget,
403
- &Cancellation::default(),
404
- )?;
434
+ let emitter = Emitter::new(args.scan_json, "event", timeout_ms, &mut session.budget)?;
405
435
  return emitter.finish(
406
436
  &failed_outcome(error, &session.budget),
407
437
  &vec![0; args.patterns.len() + 1],
@@ -434,7 +464,7 @@ pub fn run(args: GrepArgs) -> Result<(), CliExit> {
434
464
  let checkpoints = checkpoints();
435
465
  let mut render = Render {
436
466
  args: &args,
437
- 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)?,
438
468
  files: 0,
439
469
  };
440
470
  reducer.survey(plan.sources(), session.budget.limits.deadline_unix_ms);
@@ -525,9 +555,10 @@ impl Render<'_> {
525
555
  if event.opens_source {
526
556
  self.files += 1;
527
557
  if !structured {
528
- self.emitter.emit_event(
558
+ self.emitter.emit(
529
559
  event.index,
530
560
  transcript_header(&path.to_string_lossy()),
561
+ |_| None,
531
562
  budget,
532
563
  cancel,
533
564
  )?;
@@ -535,32 +566,27 @@ impl Render<'_> {
535
566
  }
536
567
  if !structured && args.context > 0 && event.opens_window && !event.opens_source {
537
568
  self.emitter
538
- .emit_event(event.index, "--".to_owned(), budget, cancel)?;
569
+ .emit(event.index, "--".to_owned(), |_| None, budget, cancel)?;
539
570
  }
540
571
  let _render_staging = event.preflight_render(budget, cancel)?;
541
- let line = if structured {
572
+ let range = format!("--range {}:{}", event.index, event.index + 1);
573
+ if structured {
542
574
  let Json::Obj(mut fields) = event_json(event.index, event.entry) else {
543
575
  unreachable!("event_json object")
544
576
  };
545
- fields.insert(
546
- 0,
547
- (
548
- "path".into(),
549
- Json::Str(path.to_string_lossy().into_owned()),
550
- ),
551
- );
577
+ let mut tags = Vec::new();
552
578
  if event.pattern_ids.is_none() {
553
- fields.push(("context".into(), Json::Bool(true)));
579
+ tags.push(("context".into(), Json::Bool(true)));
554
580
  }
555
581
  if args.with_result {
556
582
  let results = result_fields(event.entry, event.results);
557
583
  if !results.is_empty() {
558
- fields.push(("results".into(), Json::Obj(results)));
584
+ tags.push(("results".into(), Json::Obj(results)));
559
585
  }
560
586
  }
561
587
  if args.scan_json {
562
- fields.push(("generation".into(), Json::Str(event.generation.to_owned())));
563
- fields.push((
588
+ tags.push(("generation".into(), Json::Str(event.generation.to_owned())));
589
+ tags.push((
564
590
  "pattern_ids".into(),
565
591
  Json::Arr(
566
592
  event
@@ -570,13 +596,39 @@ impl Render<'_> {
570
596
  ),
571
597
  ));
572
598
  }
573
- Json::Obj(fields).dumps()
574
- } 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| {
575
627
  let mut line = compact_line(
576
628
  event.index,
577
629
  event.entry,
578
630
  event.names,
579
- args.width,
631
+ width,
580
632
  false,
581
633
  args.uuids,
582
634
  );
@@ -585,10 +637,29 @@ impl Render<'_> {
585
637
  }
586
638
  line
587
639
  };
588
- self.emitter.emit_event(event.index, 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
+ )
589
656
  }
590
657
  }
591
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
+
592
663
  fn run_over_corpus(
593
664
  store: &NativeStore,
594
665
  args: &GrepArgs,
@@ -604,19 +675,14 @@ fn run_over_corpus(
604
675
  return Err(usage_error(USAGE, HELP_PATH, &error.reason))
605
676
  }
606
677
  Err(error) => {
607
- let emitter = Emitter::new(
608
- args.scan_json,
609
- timeout_ms,
610
- &mut budget,
611
- &Cancellation::default(),
612
- )?;
678
+ let emitter = Emitter::new(args.scan_json, "corpus line", timeout_ms, &mut budget)?;
613
679
  return emitter.finish(
614
680
  &failed_outcome(error, &budget),
615
681
  &vec![0; args.patterns.len() + 1],
616
682
  );
617
683
  }
618
684
  };
619
- 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)?;
620
686
  let mut outcome = scan_corpus(
621
687
  path,
622
688
  &mut budget,
@@ -632,24 +698,35 @@ fn run_over_corpus(
632
698
  } else {
633
699
  line.len().saturating_add(2)
634
700
  };
635
- if render_bound > budget.remaining().max_output_bytes {
636
- return Err(SnapshotError::new(
637
- Status::OutputLimit,
638
- "corpus match exceeds remaining output budget",
639
- ));
640
- }
641
701
  let _render_staging = budget.reserve_staging(render_bound, cancel)?;
642
702
  budget.charge_projection(
643
703
  line.len().saturating_add(path.as_os_str().len()),
644
704
  0,
645
705
  cancel,
646
706
  )?;
707
+ let shown = path.to_string_lossy();
647
708
  let rendered = if args.scan_json {
648
- 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()))?
649
710
  } else {
650
711
  line.to_owned()
651
712
  };
652
- 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
+ )?;
653
730
  }
654
731
  Ok(reducer.satisfied())
655
732
  },
@@ -3302,7 +3302,10 @@ struct Joined {
3302
3302
  counts: Vec<usize>,
3303
3303
  }
3304
3304
 
3305
- fn outcomes(event: &GrepEvent<'_>) -> Outcomes {
3305
+ fn outcomes(event: &GrepEvent<'_>, rendered: bool) -> Outcomes {
3306
+ if !rendered {
3307
+ return Vec::new();
3308
+ }
3306
3309
  event
3307
3310
  .entry
3308
3311
  .tool_uses()
@@ -3327,6 +3330,7 @@ fn joined_stream(
3327
3330
  ) -> (Joined, ScanProgress) {
3328
3331
  let store = NativeStore::new(&json!({})).unwrap();
3329
3332
  let mut budget = ScanBudget::new(&store, limits());
3333
+ let rendered = options.with_result;
3330
3334
  let mut grep = reducer(patterns, options, &mut budget);
3331
3335
  assert!(!grep.caches());
3332
3336
  let mut emitted = Vec::new();
@@ -3341,7 +3345,7 @@ fn joined_stream(
3341
3345
  emitted.push((
3342
3346
  event.index,
3343
3347
  event.pattern_ids.map(<[usize]>::to_vec),
3344
- outcomes(&event),
3348
+ outcomes(&event, rendered),
3345
3349
  ));
3346
3350
  Ok(())
3347
3351
  },
@@ -3359,6 +3363,7 @@ fn joined_snapshot(
3359
3363
  ) -> Joined {
3360
3364
  let store = NativeStore::new(&json!({})).unwrap();
3361
3365
  let mut session = ScanSession::new(&store, limits(), Cancellation::default());
3366
+ let rendered = options.with_result;
3362
3367
  let mut grep = reducer(patterns, options, &mut session.budget);
3363
3368
  let mut emitted = Vec::new();
3364
3369
  session
@@ -3368,7 +3373,7 @@ fn joined_snapshot(
3368
3373
  emitted.push((
3369
3374
  event.index,
3370
3375
  event.pattern_ids.map(<[usize]>::to_vec),
3371
- outcomes(&event),
3376
+ outcomes(&event, rendered),
3372
3377
  ));
3373
3378
  Ok(())
3374
3379
  })?;
@@ -3457,10 +3462,24 @@ fn joined_case(case: usize) -> Option<(&'static str, Option<usize>, GrepOptions)
3457
3462
  };
3458
3463
  Some(match case {
3459
3464
  0 => ("needle", None, results),
3460
- 1 => ("needle", None, GrepOptions { context: 1, ..results }),
3465
+ 1 => (
3466
+ "needle",
3467
+ None,
3468
+ GrepOptions {
3469
+ context: 1,
3470
+ ..results
3471
+ },
3472
+ ),
3461
3473
  2 => ("needle", Some(1), results),
3462
3474
  3 => ("needle", None, errors),
3463
- 4 => ("needle", None, GrepOptions { with_result: true, ..errors }),
3475
+ 4 => (
3476
+ "needle",
3477
+ None,
3478
+ GrepOptions {
3479
+ with_result: true,
3480
+ ..errors
3481
+ },
3482
+ ),
3464
3483
  5 => (
3465
3484
  "needle",
3466
3485
  None,
@@ -3477,7 +3496,14 @@ fn joined_case(case: usize) -> Option<(&'static str, Option<usize>, GrepOptions)
3477
3496
  ..errors
3478
3497
  },
3479
3498
  ),
3480
- 7 => (r"\w+", None, GrepOptions { with_result: true, ..errors }),
3499
+ 7 => (
3500
+ r"\w+",
3501
+ None,
3502
+ GrepOptions {
3503
+ with_result: true,
3504
+ ..errors
3505
+ },
3506
+ ),
3481
3507
  _ => return None,
3482
3508
  })
3483
3509
  }
@@ -3496,7 +3522,12 @@ fn streamed_results_and_errors_match_the_prepared_snapshot_path() {
3496
3522
  assert_eq!(actual, expected, "case {case}, render names {render_names}");
3497
3523
  }
3498
3524
  }
3499
- let (plain, _) = joined_stream(&source.0, &[("needle", None)], joined_case(0).unwrap().2, true);
3525
+ let (plain, _) = joined_stream(
3526
+ &source.0,
3527
+ &[("needle", None)],
3528
+ joined_case(0).unwrap().2,
3529
+ true,
3530
+ );
3500
3531
  let bash = |id: &str, error, denied, ms| (id.to_owned(), "Bash".to_owned(), error, denied, ms);
3501
3532
  assert_eq!(
3502
3533
  plain
@@ -3513,7 +3544,12 @@ fn streamed_results_and_errors_match_the_prepared_snapshot_path() {
3513
3544
  vec![],
3514
3545
  ]
3515
3546
  );
3516
- let (errors, _) = joined_stream(&source.0, &[("needle", None)], joined_case(3).unwrap().2, false);
3547
+ let (errors, _) = joined_stream(
3548
+ &source.0,
3549
+ &[("needle", None)],
3550
+ joined_case(3).unwrap().2,
3551
+ false,
3552
+ );
3517
3553
  assert_eq!(
3518
3554
  errors
3519
3555
  .emitted
@@ -3528,7 +3564,11 @@ fn streamed_results_and_errors_match_the_prepared_snapshot_path() {
3528
3564
  fn a_quota_stop_on_a_call_reads_on_to_its_result_and_no_further() {
3529
3565
  let mut lines = turns();
3530
3566
  lines.extend((0..4000).map(|index| {
3531
- line(user(&format!("p{index}"), Some("u1"), json!("x".repeat(1000))))
3567
+ line(user(
3568
+ &format!("p{index}"),
3569
+ Some("u1"),
3570
+ json!("x".repeat(1000)),
3571
+ ))
3532
3572
  }));
3533
3573
  let source = Source::new(&lines, true);
3534
3574
  let size = std::fs::metadata(&source.0).unwrap().len() as usize;
@@ -3544,11 +3584,18 @@ fn a_quota_stop_on_a_call_reads_on_to_its_result_and_no_further() {
3544
3584
  );
3545
3585
  let (id, error, denied, ms) = expected;
3546
3586
  assert_eq!(
3547
- run.emitted.iter().map(|(_, _, outcomes)| outcomes.clone()).collect::<Vec<_>>(),
3587
+ run.emitted
3588
+ .iter()
3589
+ .map(|(_, _, outcomes)| outcomes.clone())
3590
+ .collect::<Vec<_>>(),
3548
3591
  vec![vec![(id.to_owned(), "Bash".to_owned(), error, denied, ms)]],
3549
3592
  "{pattern}"
3550
3593
  );
3551
- assert!(progress.source_bytes < size / 8, "{pattern}: read {}", progress.source_bytes);
3594
+ assert!(
3595
+ progress.source_bytes < size / 8,
3596
+ "{pattern}: read {}",
3597
+ progress.source_bytes
3598
+ );
3552
3599
  }
3553
3600
  }
3554
3601
 
@@ -3565,7 +3612,13 @@ fn the_join_holds_a_fixed_staging_peak_as_turns_grow() {
3565
3612
  json!([tool(&id, "Bash", json!({"command":"echo needle"}))]),
3566
3613
  )));
3567
3614
  lines.push(noise());
3568
- lines.push(line(answer(&format!("r{turn:06}"), &id, "02", &"y".repeat(4000), false)));
3615
+ lines.push(line(answer(
3616
+ &format!("r{turn:06}"),
3617
+ &id,
3618
+ "02",
3619
+ &"y".repeat(4000),
3620
+ false,
3621
+ )));
3569
3622
  }
3570
3623
  let source = Source::new(&lines, true);
3571
3624
  let (run, progress) = joined_stream(
@@ -3582,5 +3635,8 @@ fn the_join_holds_a_fixed_staging_peak_as_turns_grow() {
3582
3635
  };
3583
3636
  let few = peak(10, true) as i64 - peak(10, false) as i64;
3584
3637
  let many = peak(1000, true) as i64 - peak(1000, false) as i64;
3585
- assert!((many - few).abs() <= 16 * 1024, "10 turns {few}, 1000 turns {many}");
3638
+ assert!(
3639
+ (many - few).abs() <= 16 * 1024,
3640
+ "10 turns {few}, 1000 turns {many}"
3641
+ );
3586
3642
  }