cc-transcript 14.46.15__tar.gz → 14.46.17__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.
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/Cargo.lock +1 -1
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/PKG-INFO +1 -1
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/pyproject.toml +1 -1
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/Cargo.toml +1 -1
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/blame.rs +56 -40
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/corpus.rs +52 -29
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/facts.rs +98 -56
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/grep.rs +16 -2
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/list.rs +6 -5
- cc_transcript-14.46.17/rust/crates/cli/src/commands/stats.rs +111 -0
- cc_transcript-14.46.17/rust/crates/cli/src/index.rs +661 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/lib.rs +1 -0
- cc_transcript-14.46.17/rust/crates/cli/src/target.rs +531 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/blame.rs +133 -77
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/discovery.rs +0 -52
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/facts.rs +83 -47
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/parse.rs +1 -1
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/render.rs +140 -65
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/scan.rs +38 -18
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/scan_grep.rs +2 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/scan_grep_stream.rs +173 -2
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/scan_grep_stream_tests.rs +64 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/scan_regressions.rs +1 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_projection.rs +67 -45
- cc_transcript-14.46.15/rust/crates/cli/src/commands/stats.rs +0 -109
- cc_transcript-14.46.15/rust/crates/cli/src/target.rs +0 -264
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/Cargo.toml +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/LICENSE +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/README.md +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/__init__.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/__init__.pyi +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/_native.pyi +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/activity.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/activity_probe.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/builders.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/codex.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/command.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/context.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/corrections.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/cost.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/decision_store.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/decisions.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/discovery.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/disktruth.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/evidence.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/extract/__init__.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/extract/correct.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/facts.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/filterspec.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/heartbeats.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/ids.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/judge/__init__.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/judge/llm.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/judge/similar.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/judge/verdicts.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/ledger.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/literals.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/mining/__init__.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/mining/candidates.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/mining/confidence.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/mining/engine.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/mining/formats.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/mining/sampling.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/mining/signals.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/mining/sourcekind.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/mining/spec.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/mining/store.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/models.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/nlp.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/notifications.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/parser.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/py.typed +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/query.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/render.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/sentiment/__init__.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/sentiment/buckets.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/sentiment/data/afinn-en-165.tsv +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/sentiment/data/domain_overrides.tsv +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/sentiment/data/en-ewt.udpipe +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/sentiment/engine.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/sentiment/lexicon.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/sentiment/scorespec.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/snapshot_schema/config.schema.json +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/snapshot_schema/context.schema.json +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/snapshot_schema/request.schema.json +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/snapshot_schema/response.schema.json +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/snapshot_schema/tool_registry.schema.json +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/snapshots.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/synthetic.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/tools.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/cc_transcript/watch.py +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/corrections.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/digest.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/mod.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/scratchpad.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/show.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/slice.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/commands/watch.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/output.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/cli/src/timearg.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/Cargo.toml +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/benches/parse.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/benches/render.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/benches/toolcall.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/build.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/activity.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/actor.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/buckets.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/codex/discovery.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/codex/lower.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/codex/mod.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/codex/parse.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/codex/probe.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/codex/protocol.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/codex/review_continuation.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/codex/types.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/command.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/context.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/corrections.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/cost.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/feedback.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/filter.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/gateway.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/ids.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/judge.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/lib.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/literals/command.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/literals/corrections.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/literals/feedback.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/literals/mining.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/literals/mod.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/literals/protocol.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/mining.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/mining_index.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/notifications.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/protocol.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/pystr.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/query.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/request_body.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/rng.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/scan_checkpoint.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/scan_index.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/scan_projection.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/scan_stream.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/schema.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_activity.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_admission_report_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_cache.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_cache_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_catalog.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_catalog_owner.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_catalog_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_codec.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_codex_append.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_common_borrowed_parent_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_compact_codex.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_compact_codex_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_direct_tail.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_direct_tail_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_graph_anchor_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_graph_validation_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_hydrate_budget_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_hydration_observations.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_index_allocations.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_input.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_interaction_api.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_interaction_api_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_interactions.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_interactions_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_labels.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_ledger.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_ledger_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_load_charge_audit_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_load_charge_work_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_membership_progress.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_membership_progress_controls.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_membership_progress_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_memory.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_owned.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_persistent.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_prepared.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_prepared_disk.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_prepared_service.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_publication_shared_admission_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_query_hydration_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_raw_materialization.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_raw_projection.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_raw_projection_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_raw_scope.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_raw_scope_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_raw_tail_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_raw_window.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_registered_review_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_regressions.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_reply_resume_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_review.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_review_admission_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_review_context.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_review_reader.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_review_source.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_root_warm.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_sidechain_absence.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_sidechain_absence_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_skill_demand_controls.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_skill_demand_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_skill_framing.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_skills.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_source_cache_index_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_spine.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_spine_tests.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_symlink_proof.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/snapshot_text.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/sqlite.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/toolcall.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/types.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/value.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/src/watch.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/tests/persistent_allocation_model.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/tests/sonic_arena_model.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/core/tests/std_allocation_model.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/Cargo.toml +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/build.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/data/command_prefix_pins.tsv +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/actor_bridge.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/bin/stub_gen.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/codex.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/command.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/context.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/corrections.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/discovery.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/feedback.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/judge.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/lexicon.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/lib.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/mining.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/nlp.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/python.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/render.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/score.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/snapshot_decode.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/snapshots.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/snapshots_registered_review.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/sqlite.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/toolcall.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/attachment.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/blocks.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/command.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/convert.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/dunder.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/events.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/meta.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/mod.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/print.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/store.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/system.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/toolcall.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/toolresult.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/views/transcript.rs +0 -0
- {cc_transcript-14.46.15 → cc_transcript-14.46.17}/rust/crates/py/src/watch.rs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "cc-transcript"
|
|
3
|
-
version = "14.46.
|
|
3
|
+
version = "14.46.17" # 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"
|
|
@@ -10,10 +10,10 @@ clap = { version = "4.5", features = ["derive", "env", "string"] }
|
|
|
10
10
|
sonic-rs = { version = "0.5", features = ["arbitrary_precision"] }
|
|
11
11
|
chrono = { version = "0.4", default-features = false, features = ["std", "clock"] }
|
|
12
12
|
regex = "1"
|
|
13
|
-
rayon = "1.10"
|
|
14
13
|
ctrlc = "3.4"
|
|
15
14
|
libc = "0.2"
|
|
16
15
|
once_cell = "1"
|
|
16
|
+
sha2 = "0.10"
|
|
17
17
|
|
|
18
18
|
[dev-dependencies]
|
|
19
19
|
tempfile = "3"
|
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
use std::fs;
|
|
7
7
|
use std::path::{Path, PathBuf};
|
|
8
8
|
|
|
9
|
-
use cc_transcript_core::blame::{
|
|
9
|
+
use cc_transcript_core::blame::{
|
|
10
|
+
blame as rank, session_attribution, session_writes, AttributionFold, RepoPaths,
|
|
11
|
+
};
|
|
10
12
|
use cc_transcript_core::discovery::{find_in, mtime_secs, project_dir_name};
|
|
11
13
|
use cc_transcript_core::render::{attribute_json, attribute_lines, blame_json, blame_line};
|
|
12
|
-
use cc_transcript_core::types::Entry;
|
|
13
14
|
use chrono::{DateTime, FixedOffset};
|
|
14
15
|
|
|
15
16
|
use crate::output::{click_error, eline, py_repr, usage_error, CliExit, Out};
|
|
16
|
-
use crate::target::{claude_projects_dir,
|
|
17
|
+
use crate::target::{claude_projects_dir, require_dir, started_before, stream_transcripts};
|
|
17
18
|
|
|
18
19
|
const BLAME_USAGE: &str = "cc-transcript blame [OPTIONS] <PATH>";
|
|
19
20
|
const BLAME_HELP: &str = "cc-transcript blame";
|
|
@@ -100,8 +101,9 @@ fn resolve_target(path: &Path, usage: &str, help_path: &str) -> Result<Target, C
|
|
|
100
101
|
})
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
///
|
|
104
|
-
///
|
|
104
|
+
/// Every transcript under a project dir belonging to `repo_root` (or every dir under
|
|
105
|
+
/// `--all-projects`), dropping files older than `min_mtime` and files that start at or
|
|
106
|
+
/// after `until` (blame's window).
|
|
105
107
|
/// The `{encoded}-` prefix admits prefix-collided siblings (`<root>-rust`); the engine's
|
|
106
108
|
/// per-call cwd check drops their writes.
|
|
107
109
|
fn select_transcripts(
|
|
@@ -109,9 +111,10 @@ fn select_transcripts(
|
|
|
109
111
|
repo_root: &str,
|
|
110
112
|
all_projects: bool,
|
|
111
113
|
min_mtime: Option<f64>,
|
|
114
|
+
until: Option<DateTime<FixedOffset>>,
|
|
112
115
|
usage: &str,
|
|
113
116
|
help_path: &str,
|
|
114
|
-
) -> Result<Vec<
|
|
117
|
+
) -> Result<Vec<(PathBuf, f64)>, CliExit> {
|
|
115
118
|
require_dir(projects_root, "'--root'", usage, help_path)?;
|
|
116
119
|
let encoded = project_dir_name(repo_root);
|
|
117
120
|
let prefix = format!("{encoded}-");
|
|
@@ -126,7 +129,10 @@ fn select_transcripts(
|
|
|
126
129
|
.flat_map(|entry| find_in(&entry.path(), None, None, None))
|
|
127
130
|
.filter(|(_, mtime)| min_mtime.is_none_or(|floor| *mtime >= floor))
|
|
128
131
|
.collect();
|
|
129
|
-
|
|
132
|
+
match until {
|
|
133
|
+
Some(until) => started_before(pairs, until),
|
|
134
|
+
None => Ok(pairs),
|
|
135
|
+
}
|
|
130
136
|
}
|
|
131
137
|
|
|
132
138
|
/// A file mtime (`os.stat` seconds) as a UTC-offset datetime, for the attribute window.
|
|
@@ -152,31 +158,36 @@ pub fn blame(args: BlameArgs) -> Result<(), CliExit> {
|
|
|
152
158
|
.map(|value| crate::timearg::parse_time("--until", value, now, BLAME_USAGE, BLAME_HELP))
|
|
153
159
|
.transpose()?;
|
|
154
160
|
let projects_root = args.root.unwrap_or_else(claude_projects_dir);
|
|
155
|
-
let
|
|
161
|
+
let selected = select_transcripts(
|
|
156
162
|
&projects_root,
|
|
157
163
|
&target.repo.root,
|
|
158
164
|
args.all_projects,
|
|
159
165
|
since.map(|ts| ts.timestamp() as f64),
|
|
166
|
+
until,
|
|
160
167
|
BLAME_USAGE,
|
|
161
168
|
BLAME_HELP,
|
|
162
169
|
)?;
|
|
163
|
-
let mut
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
170
|
+
let mut writes = Vec::new();
|
|
171
|
+
stream_transcripts(
|
|
172
|
+
&selected,
|
|
173
|
+
|parsed| match &parsed.session_id {
|
|
174
|
+
Some(session) => session_writes(
|
|
175
|
+
session,
|
|
176
|
+
&parsed.path.to_string_lossy(),
|
|
177
|
+
&parsed.entries,
|
|
178
|
+
&target.repo,
|
|
179
|
+
&target.rel_target,
|
|
180
|
+
since,
|
|
181
|
+
until,
|
|
182
|
+
),
|
|
183
|
+
None => Vec::new(),
|
|
184
|
+
},
|
|
185
|
+
|file| {
|
|
186
|
+
writes.extend(file);
|
|
187
|
+
Ok(())
|
|
188
|
+
},
|
|
189
|
+
)?;
|
|
190
|
+
let mut records = rank(writes);
|
|
180
191
|
if let Some(limit) = args.limit {
|
|
181
192
|
records.truncate(limit);
|
|
182
193
|
}
|
|
@@ -200,31 +211,36 @@ pub fn attribute(args: AttributeArgs) -> Result<(), CliExit> {
|
|
|
200
211
|
.map_err(|e| click_error(&format!("{}: {e}", args.path.display())))?;
|
|
201
212
|
let mtime = mtime_datetime(mtime_secs(&meta));
|
|
202
213
|
let projects_root = args.root.unwrap_or_else(claude_projects_dir);
|
|
203
|
-
let
|
|
214
|
+
let selected = select_transcripts(
|
|
204
215
|
&projects_root,
|
|
205
216
|
&target.repo.root,
|
|
206
217
|
args.all_projects,
|
|
207
218
|
None,
|
|
219
|
+
None,
|
|
208
220
|
ATTRIBUTE_USAGE,
|
|
209
221
|
ATTRIBUTE_HELP,
|
|
210
222
|
)?;
|
|
211
|
-
let
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
223
|
+
let mut fold = AttributionFold::default();
|
|
224
|
+
stream_transcripts(
|
|
225
|
+
&selected,
|
|
226
|
+
|parsed| {
|
|
227
|
+
parsed.session_id.as_deref().map(|session| {
|
|
228
|
+
session_attribution(
|
|
216
229
|
session,
|
|
217
|
-
|
|
218
|
-
|
|
230
|
+
&parsed.path.to_string_lossy(),
|
|
231
|
+
&parsed.entries,
|
|
232
|
+
&target.repo,
|
|
233
|
+
&target.rel_target,
|
|
234
|
+
mtime,
|
|
219
235
|
)
|
|
220
236
|
})
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
let verdict =
|
|
237
|
+
},
|
|
238
|
+
|session| {
|
|
239
|
+
session.into_iter().for_each(|session| fold.add(session));
|
|
240
|
+
Ok(())
|
|
241
|
+
},
|
|
242
|
+
)?;
|
|
243
|
+
let verdict = fold.verdict();
|
|
228
244
|
let mut out = Out::new();
|
|
229
245
|
match args.json {
|
|
230
246
|
true => out.line(&attribute_json(&verdict, &target.rel_target, mtime).dumps())?,
|
|
@@ -8,10 +8,11 @@ use std::path::PathBuf;
|
|
|
8
8
|
|
|
9
9
|
use cc_transcript_core::render::haystack;
|
|
10
10
|
use regex::Regex;
|
|
11
|
+
use sha2::{Digest, Sha256};
|
|
11
12
|
|
|
12
13
|
use crate::commands::grep::{compile_pattern, where_flags};
|
|
13
14
|
use crate::output::{click_error, eline, CliExit};
|
|
14
|
-
use crate::target::{
|
|
15
|
+
use crate::target::{py_path, require_files, resolve_targets, stream_transcripts};
|
|
15
16
|
use crate::DiscoveryOpts;
|
|
16
17
|
|
|
17
18
|
const USAGE: &str = "cc-transcript corpus [OPTIONS] --out <OUT> PATTERN [PATHS]...";
|
|
@@ -64,6 +65,12 @@ fn windows_in(text: &str, regex: &Regex, window: usize) -> Vec<String> {
|
|
|
64
65
|
.collect()
|
|
65
66
|
}
|
|
66
67
|
|
|
68
|
+
fn line_key(line: &str) -> [u8; 16] {
|
|
69
|
+
Sha256::digest(line.as_bytes())[..16]
|
|
70
|
+
.try_into()
|
|
71
|
+
.expect("a sha-256 digest holds 16 bytes")
|
|
72
|
+
}
|
|
73
|
+
|
|
67
74
|
pub fn run(args: CorpusArgs) -> Result<(), CliExit> {
|
|
68
75
|
let regex = compile_pattern(&args.pattern, args.ignore_case, USAGE, HELP_PATH)?;
|
|
69
76
|
let (w_text, w_thinking, w_tools) = where_flags(&args.wheres);
|
|
@@ -80,38 +87,54 @@ pub fn run(args: CorpusArgs) -> Result<(), CliExit> {
|
|
|
80
87
|
args.discovery.contains.as_deref(),
|
|
81
88
|
args.discovery.sweep_limit(),
|
|
82
89
|
None,
|
|
90
|
+
None,
|
|
83
91
|
)?;
|
|
84
|
-
let
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
&haystack(event, w_text, w_thinking, w_tools),
|
|
91
|
-
®ex,
|
|
92
|
-
args.window,
|
|
93
|
-
)
|
|
94
|
-
})
|
|
95
|
-
.collect::<Vec<String>>()
|
|
96
|
-
});
|
|
97
|
-
let file = File::create(&args.out)
|
|
98
|
-
.map_err(|e| click_error(&format!("{}: {e}", args.out.display())))?;
|
|
99
|
-
let mut out = BufWriter::new(file);
|
|
100
|
-
let mut seen: HashSet<String> = HashSet::new();
|
|
92
|
+
let mut staged = args.out.clone().into_os_string();
|
|
93
|
+
staged.push(format!(".{}.tmp", std::process::id()));
|
|
94
|
+
let staged = PathBuf::from(staged);
|
|
95
|
+
let out_error = |e: std::io::Error| click_error(&format!("{}: {e}", args.out.display()));
|
|
96
|
+
let mut out = BufWriter::new(File::create(&staged).map_err(out_error)?);
|
|
97
|
+
let mut seen: HashSet<[u8; 16]> = HashSet::new();
|
|
101
98
|
let mut duplicates = 0usize;
|
|
102
99
|
let mut bytes = 0usize;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
100
|
+
let swept = stream_transcripts(
|
|
101
|
+
&targets.paths,
|
|
102
|
+
|parsed| {
|
|
103
|
+
parsed
|
|
104
|
+
.entries
|
|
105
|
+
.iter()
|
|
106
|
+
.flat_map(|event| {
|
|
107
|
+
windows_in(
|
|
108
|
+
&haystack(event, w_text, w_thinking, w_tools),
|
|
109
|
+
®ex,
|
|
110
|
+
args.window,
|
|
111
|
+
)
|
|
112
|
+
})
|
|
113
|
+
.collect::<Vec<String>>()
|
|
114
|
+
},
|
|
115
|
+
|lines| {
|
|
116
|
+
for line in lines {
|
|
117
|
+
if !seen.insert(line_key(&line)) {
|
|
118
|
+
duplicates += 1;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
out.write_all(line.as_bytes())
|
|
122
|
+
.and_then(|()| out.write_all(b"\n"))
|
|
123
|
+
.map_err(out_error)?;
|
|
124
|
+
bytes += line.len() + 1;
|
|
125
|
+
}
|
|
126
|
+
Ok(())
|
|
127
|
+
},
|
|
128
|
+
)
|
|
129
|
+
.and_then(|()| {
|
|
130
|
+
out.flush()
|
|
131
|
+
.and_then(|()| std::fs::rename(&staged, &args.out))
|
|
132
|
+
.map_err(out_error)
|
|
133
|
+
});
|
|
134
|
+
if swept.is_err() {
|
|
135
|
+
let _ = std::fs::remove_file(&staged);
|
|
112
136
|
}
|
|
113
|
-
|
|
114
|
-
.map_err(|e| click_error(&format!("{}: {e}", args.out.display())))?;
|
|
137
|
+
swept?;
|
|
115
138
|
eline(&format!(
|
|
116
139
|
"{} files scanned, {} windows kept, {duplicates} duplicates dropped, {bytes} bytes written",
|
|
117
140
|
targets.paths.len(),
|
|
@@ -2,25 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
use std::path::PathBuf;
|
|
4
4
|
|
|
5
|
-
use cc_transcript_core::facts::{
|
|
5
|
+
use cc_transcript_core::facts::{tool_facts, McpTally, Tally, ToolFact};
|
|
6
6
|
use cc_transcript_core::query::FileRef;
|
|
7
7
|
use cc_transcript_core::render::{
|
|
8
8
|
denial_json, denial_line, fact_json, fact_line, render_counts, render_mcp, Json,
|
|
9
9
|
};
|
|
10
10
|
use cc_transcript_core::toolcall::tool_name_matches;
|
|
11
|
+
use chrono::{DateTime, FixedOffset};
|
|
11
12
|
|
|
12
13
|
use crate::output::{CliExit, Out};
|
|
13
14
|
use crate::target::{
|
|
14
|
-
|
|
15
|
+
py_path, require_files, resolve_targets, scope_note, stream_transcripts, Parsed, Targets,
|
|
15
16
|
};
|
|
16
17
|
use crate::DiscoveryOpts;
|
|
17
18
|
|
|
18
|
-
fn
|
|
19
|
+
fn targets(
|
|
19
20
|
paths: &[PathBuf],
|
|
20
21
|
discovery: &DiscoveryOpts,
|
|
21
22
|
name: &str,
|
|
22
23
|
min_mtime: Option<f64>,
|
|
23
|
-
|
|
24
|
+
until: Option<DateTime<FixedOffset>>,
|
|
25
|
+
) -> Result<Targets, CliExit> {
|
|
24
26
|
let paths: Vec<PathBuf> = paths
|
|
25
27
|
.iter()
|
|
26
28
|
.map(|p| py_path(&p.to_string_lossy()))
|
|
@@ -28,22 +30,37 @@ fn gather(
|
|
|
28
30
|
let usage = format!("cc-transcript {name} [OPTIONS] [PATHS]...");
|
|
29
31
|
let help_path = format!("cc-transcript {name}");
|
|
30
32
|
require_files(&paths, "'[PATHS]...'", &usage, &help_path)?;
|
|
31
|
-
|
|
33
|
+
resolve_targets(
|
|
32
34
|
&paths,
|
|
33
35
|
&discovery.validated_root(&usage, &help_path)?,
|
|
34
36
|
discovery.project.as_deref(),
|
|
35
37
|
discovery.contains.as_deref(),
|
|
36
38
|
discovery.effective_limit(),
|
|
37
39
|
min_mtime,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
until,
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
fn facts_of(parsed: &Parsed) -> Vec<ToolFact> {
|
|
45
|
+
match &parsed.session_id {
|
|
46
|
+
Some(session) => tool_facts(session, &parsed.path.to_string_lossy(), &parsed.entries),
|
|
47
|
+
None => Vec::new(),
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
fn stream_lines(
|
|
52
|
+
targets: &Targets,
|
|
53
|
+
out: &mut Out,
|
|
54
|
+
lines_of: impl Fn(Vec<ToolFact>) -> Vec<String> + Sync,
|
|
55
|
+
) -> Result<(), CliExit> {
|
|
56
|
+
stream_transcripts(
|
|
57
|
+
&targets.paths,
|
|
58
|
+
|parsed| lines_of(facts_of(&parsed)),
|
|
59
|
+
|lines| {
|
|
60
|
+
out.lines(lines)?;
|
|
61
|
+
out.finish()
|
|
62
|
+
},
|
|
63
|
+
)
|
|
47
64
|
}
|
|
48
65
|
|
|
49
66
|
fn emit_note(out: &mut Out, targets: &Targets) -> Result<(), CliExit> {
|
|
@@ -72,37 +89,50 @@ pub fn tools(
|
|
|
72
89
|
.map(|value| crate::timearg::parse_time("--until", value, now, usage, help_path))
|
|
73
90
|
.transpose()?;
|
|
74
91
|
let min_mtime = since_ts.map(|ts| ts.timestamp() as f64);
|
|
75
|
-
let
|
|
76
|
-
let facts: Vec<&ToolFact> = facts
|
|
77
|
-
.iter()
|
|
78
|
-
.filter(|fact| tool.is_none_or(|t| tool_name_matches(&fact.tool, t)))
|
|
79
|
-
.filter(|fact| {
|
|
80
|
-
file.is_none_or(|glob| {
|
|
81
|
-
fact.file_paths
|
|
82
|
-
.iter()
|
|
83
|
-
.any(|p| FileRef::new(p).matches(&[glob]))
|
|
84
|
-
})
|
|
85
|
-
})
|
|
86
|
-
.filter(|fact| since_ts.is_none_or(|s| fact.ts >= s))
|
|
87
|
-
.filter(|fact| until_ts.is_none_or(|u| fact.ts < u))
|
|
88
|
-
.collect();
|
|
92
|
+
let targets = targets(paths, discovery, "tools", min_mtime, until_ts)?;
|
|
89
93
|
let mut out = Out::new();
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
stream_lines(&targets, &mut out, |facts| {
|
|
95
|
+
facts
|
|
96
|
+
.iter()
|
|
97
|
+
.filter(|fact| tool.is_none_or(|t| tool_name_matches(&fact.tool, t)))
|
|
98
|
+
.filter(|fact| {
|
|
99
|
+
file.is_none_or(|glob| {
|
|
100
|
+
fact.file_paths
|
|
101
|
+
.iter()
|
|
102
|
+
.any(|p| FileRef::new(p).matches(&[glob]))
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
.filter(|fact| since_ts.is_none_or(|s| fact.ts >= s))
|
|
106
|
+
.filter(|fact| until_ts.is_none_or(|u| fact.ts < u))
|
|
107
|
+
.map(|fact| match json {
|
|
108
|
+
true => fact_json(fact).dumps(),
|
|
109
|
+
false => fact_line(fact),
|
|
110
|
+
})
|
|
111
|
+
.collect()
|
|
112
|
+
})?;
|
|
113
|
+
if !json {
|
|
114
|
+
emit_note(&mut out, &targets)?;
|
|
98
115
|
}
|
|
99
|
-
emit_note(&mut out, &targets)?;
|
|
100
116
|
out.finish()
|
|
101
117
|
}
|
|
102
118
|
|
|
103
119
|
pub fn commands(paths: &[PathBuf], discovery: &DiscoveryOpts, json: bool) -> Result<(), CliExit> {
|
|
104
|
-
let
|
|
105
|
-
let
|
|
120
|
+
let targets = targets(paths, discovery, "commands", None, None)?;
|
|
121
|
+
let mut tally = Tally::default();
|
|
122
|
+
stream_transcripts(
|
|
123
|
+
&targets.paths,
|
|
124
|
+
|parsed| {
|
|
125
|
+
facts_of(&parsed)
|
|
126
|
+
.into_iter()
|
|
127
|
+
.flat_map(|fact| fact.command_prefixes)
|
|
128
|
+
.collect::<Vec<String>>()
|
|
129
|
+
},
|
|
130
|
+
|prefixes| {
|
|
131
|
+
prefixes.into_iter().for_each(|prefix| tally.add(prefix));
|
|
132
|
+
Ok(())
|
|
133
|
+
},
|
|
134
|
+
)?;
|
|
135
|
+
let counts = tally.most_common();
|
|
106
136
|
let mut out = Out::new();
|
|
107
137
|
if json {
|
|
108
138
|
for (prefix, count) in &counts {
|
|
@@ -128,29 +158,41 @@ pub fn permissions(
|
|
|
128
158
|
discovery: &DiscoveryOpts,
|
|
129
159
|
json: bool,
|
|
130
160
|
) -> Result<(), CliExit> {
|
|
131
|
-
let
|
|
132
|
-
let denials: Vec<&ToolFact> = facts
|
|
133
|
-
.iter()
|
|
134
|
-
.filter(|fact| fact.denied)
|
|
135
|
-
.filter(|fact| !tool_name_matches(&fact.tool, "ExitPlanMode|AskUserQuestion"))
|
|
136
|
-
.collect();
|
|
161
|
+
let targets = targets(paths, discovery, "permissions", None, None)?;
|
|
137
162
|
let mut out = Out::new();
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
163
|
+
stream_lines(&targets, &mut out, |facts| {
|
|
164
|
+
facts
|
|
165
|
+
.iter()
|
|
166
|
+
.filter(|fact| fact.denied)
|
|
167
|
+
.filter(|fact| !tool_name_matches(&fact.tool, "ExitPlanMode|AskUserQuestion"))
|
|
168
|
+
.map(|fact| match json {
|
|
169
|
+
true => denial_json(fact).dumps(),
|
|
170
|
+
false => denial_line(fact),
|
|
171
|
+
})
|
|
172
|
+
.collect()
|
|
173
|
+
})?;
|
|
174
|
+
if !json {
|
|
175
|
+
emit_note(&mut out, &targets)?;
|
|
146
176
|
}
|
|
147
|
-
emit_note(&mut out, &targets)?;
|
|
148
177
|
out.finish()
|
|
149
178
|
}
|
|
150
179
|
|
|
151
180
|
pub fn mcp(paths: &[PathBuf], discovery: &DiscoveryOpts, json: bool) -> Result<(), CliExit> {
|
|
152
|
-
let
|
|
153
|
-
let
|
|
181
|
+
let targets = targets(paths, discovery, "mcp", None, None)?;
|
|
182
|
+
let mut tally = McpTally::default();
|
|
183
|
+
stream_transcripts(
|
|
184
|
+
&targets.paths,
|
|
185
|
+
|parsed| {
|
|
186
|
+
let mut facts = facts_of(&parsed);
|
|
187
|
+
facts.retain(|fact| fact.mcp_server.is_some());
|
|
188
|
+
facts
|
|
189
|
+
},
|
|
190
|
+
|facts| {
|
|
191
|
+
facts.iter().for_each(|fact| tally.add(fact));
|
|
192
|
+
Ok(())
|
|
193
|
+
},
|
|
194
|
+
)?;
|
|
195
|
+
let summary = tally.summary();
|
|
154
196
|
let mut out = Out::new();
|
|
155
197
|
if json {
|
|
156
198
|
for (server, data) in &summary {
|
|
@@ -16,7 +16,7 @@ use regex::{Regex, RegexBuilder};
|
|
|
16
16
|
use sonic_rs::json;
|
|
17
17
|
|
|
18
18
|
use crate::output::{click_error, eline, usage_error, CliExit, Out};
|
|
19
|
-
use crate::target::py_path;
|
|
19
|
+
use crate::target::{discover, py_path};
|
|
20
20
|
use crate::DiscoveryOpts;
|
|
21
21
|
|
|
22
22
|
const USAGE: &str = "cc-transcript grep [OPTIONS] PATTERN [PATHS]...";
|
|
@@ -382,13 +382,24 @@ pub fn run(args: GrepArgs) -> Result<(), CliExit> {
|
|
|
382
382
|
);
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
|
+
let root = args.discovery.validated_root(USAGE, HELP_PATH)?;
|
|
385
386
|
let plan = ScanPlan {
|
|
386
387
|
paths: args
|
|
387
388
|
.paths
|
|
388
389
|
.iter()
|
|
389
390
|
.map(|path| py_path(&path.to_string_lossy()))
|
|
390
391
|
.collect(),
|
|
391
|
-
|
|
392
|
+
listed: args.paths.is_empty().then(|| {
|
|
393
|
+
discover(
|
|
394
|
+
&root,
|
|
395
|
+
args.discovery.project.as_deref(),
|
|
396
|
+
args.discovery.contains.as_deref(),
|
|
397
|
+
)
|
|
398
|
+
.into_iter()
|
|
399
|
+
.map(|transcript| (transcript.path, transcript.mtime))
|
|
400
|
+
.collect()
|
|
401
|
+
}),
|
|
402
|
+
root,
|
|
392
403
|
project: args.discovery.project.clone(),
|
|
393
404
|
contains: args.discovery.contains.clone(),
|
|
394
405
|
source_limit: args.discovery.effective_limit(),
|
|
@@ -400,6 +411,9 @@ pub fn run(args: GrepArgs) -> Result<(), CliExit> {
|
|
|
400
411
|
emitter: Emitter::new(args.scan_json, timeout_ms, &mut session.budget, &cancel)?,
|
|
401
412
|
files: 0,
|
|
402
413
|
};
|
|
414
|
+
if reducer.streams() {
|
|
415
|
+
reducer.survey(plan.sources(), session.budget.limits.deadline_unix_ms);
|
|
416
|
+
}
|
|
403
417
|
let mut outcome = session.each_source(&plan, |session, path| {
|
|
404
418
|
if reducer.streams() {
|
|
405
419
|
if let Some(control) = reducer.scan_stream(
|
|
@@ -119,11 +119,12 @@ fn claude_rows(root: &Path, discovery: &DiscoveryOpts) -> Result<Vec<ListRow>, C
|
|
|
119
119
|
discovery.contains.as_deref(),
|
|
120
120
|
)
|
|
121
121
|
.into_iter()
|
|
122
|
-
.map(|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
.
|
|
126
|
-
|
|
122
|
+
.map(|transcript| {
|
|
123
|
+
Ok(ListRow::Claude {
|
|
124
|
+
path: transcript.path,
|
|
125
|
+
mtime: transcript.mtime,
|
|
126
|
+
size: transcript.size,
|
|
127
|
+
})
|
|
127
128
|
})
|
|
128
129
|
.collect()
|
|
129
130
|
}
|