cc-transcript 14.45.38__tar.gz → 14.46.2__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.45.38 → cc_transcript-14.46.2}/Cargo.lock +15 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/PKG-INFO +1 -1
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/pyproject.toml +1 -1
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/activity.rs +1 -1
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/lib.rs +1 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/literals/protocol.rs +4 -2
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/protocol.rs +16 -1
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/render.rs +2 -2
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot.rs +75 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_index_allocations.rs +7 -7
- cc_transcript-14.46.2/rust/crates/core/src/snapshot_input.rs +127 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_persistent.rs +8 -4
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/python.rs +4 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/snapshots.rs +1 -88
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/Cargo.toml +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/LICENSE +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/README.md +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/__init__.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/__init__.pyi +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/_native.pyi +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/activity.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/activity_probe.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/builders.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/codex.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/command.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/context.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/corrections.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/cost.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/decision_store.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/decisions.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/discovery.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/disktruth.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/evidence.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/extract/__init__.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/extract/correct.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/facts.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/filterspec.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/heartbeats.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/ids.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/judge/__init__.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/judge/llm.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/judge/similar.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/judge/verdicts.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/ledger.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/literals.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/mining/__init__.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/mining/candidates.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/mining/confidence.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/mining/engine.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/mining/formats.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/mining/sampling.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/mining/signals.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/mining/sourcekind.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/mining/spec.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/mining/store.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/models.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/nlp.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/notifications.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/parser.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/py.typed +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/query.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/render.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/sentiment/__init__.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/sentiment/buckets.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/sentiment/data/afinn-en-165.tsv +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/sentiment/data/domain_overrides.tsv +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/sentiment/data/en-ewt.udpipe +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/sentiment/engine.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/sentiment/lexicon.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/sentiment/scorespec.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/snapshot_schema/config.schema.json +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/snapshot_schema/context.schema.json +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/snapshot_schema/request.schema.json +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/snapshot_schema/response.schema.json +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/snapshot_schema/tool_registry.schema.json +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/snapshots.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/synthetic.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/tools.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/cc_transcript/watch.py +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/Cargo.toml +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/blame.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/corpus.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/corrections.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/digest.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/facts.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/grep.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/list.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/mod.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/scratchpad.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/show.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/slice.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/stats.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/commands/watch.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/lib.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/output.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/target.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/cli/src/timearg.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/Cargo.toml +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/benches/parse.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/benches/render.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/benches/toolcall.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/build.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/actor.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/blame.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/buckets.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/codex/discovery.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/codex/lower.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/codex/mod.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/codex/parse.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/codex/probe.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/codex/protocol.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/codex/review_continuation.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/codex/types.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/command.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/context.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/corrections.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/cost.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/discovery.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/facts.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/feedback.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/filter.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/gateway.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/ids.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/judge.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/literals/command.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/literals/corrections.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/literals/feedback.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/literals/mining.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/literals/mod.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/mining.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/mining_index.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/notifications.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/parse.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/pystr.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/query.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/request_body.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/rng.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/scan.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/scan_checkpoint.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/scan_grep.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/scan_grep_stream.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/scan_grep_stream_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/scan_index.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/scan_projection.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/scan_regressions.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/scan_stream.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/schema.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_activity.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_admission_report_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_cache.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_cache_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_catalog.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_catalog_owner.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_catalog_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_codec.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_codex_append.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_common_borrowed_parent_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_compact_codex.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_compact_codex_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_direct_tail.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_direct_tail_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_graph_anchor_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_graph_validation_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_hydrate_budget_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_hydration_observations.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_interaction_api.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_interaction_api_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_interactions.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_interactions_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_labels.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_ledger.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_ledger_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_load_charge_audit_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_load_charge_work_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_membership_progress.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_membership_progress_controls.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_membership_progress_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_memory.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_owned.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_prepared.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_prepared_disk.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_prepared_service.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_projection.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_publication_shared_admission_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_query_hydration_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_raw_materialization.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_raw_projection.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_raw_projection_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_raw_scope.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_raw_scope_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_raw_tail_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_raw_window.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_registered_review_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_regressions.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_review.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_review_context.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_review_reader.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_review_source.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_root_warm.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_sidechain_absence.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_sidechain_absence_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_skill_demand_controls.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_skill_demand_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_skill_framing.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_skills.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_source_cache_index_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_spine.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_spine_tests.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_symlink_proof.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_text.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/sqlite.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/toolcall.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/types.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/value.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/watch.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/tests/sonic_arena_model.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/tests/std_allocation_model.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/Cargo.toml +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/build.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/data/command_prefix_pins.tsv +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/actor_bridge.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/bin/stub_gen.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/codex.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/command.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/context.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/corrections.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/discovery.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/feedback.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/judge.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/lexicon.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/lib.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/mining.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/nlp.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/render.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/score.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/snapshot_decode.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/snapshots_registered_review.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/sqlite.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/toolcall.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/attachment.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/blocks.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/command.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/convert.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/dunder.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/events.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/meta.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/mod.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/print.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/store.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/system.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/toolcall.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/toolresult.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/views/transcript.rs +0 -0
- {cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/py/src/watch.rs +0 -0
|
@@ -248,6 +248,21 @@ dependencies = [
|
|
|
248
248
|
"sonic-rs",
|
|
249
249
|
]
|
|
250
250
|
|
|
251
|
+
[[package]]
|
|
252
|
+
name = "cc-transcript-owner"
|
|
253
|
+
version = "0.9.0"
|
|
254
|
+
dependencies = [
|
|
255
|
+
"cc-transcript-core",
|
|
256
|
+
"chrono",
|
|
257
|
+
"crossbeam-channel",
|
|
258
|
+
"jsonschema",
|
|
259
|
+
"libc",
|
|
260
|
+
"serde_json",
|
|
261
|
+
"sha2",
|
|
262
|
+
"sonic-rs",
|
|
263
|
+
"tempfile",
|
|
264
|
+
]
|
|
265
|
+
|
|
251
266
|
[[package]]
|
|
252
267
|
name = "cc-transcript-py"
|
|
253
268
|
version = "0.9.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "cc-transcript"
|
|
3
|
-
version = "14.
|
|
3
|
+
version = "14.46.2" # 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"
|
|
@@ -85,7 +85,7 @@ pub struct SessionActivity {
|
|
|
85
85
|
/// agent-injected relay banner, with non-blank text. Compact-summary exclusion
|
|
86
86
|
/// matches captain-hook, which consumes this probe since the 10.2.0
|
|
87
87
|
/// shared-classifier fix.
|
|
88
|
-
fn opens_turn(user: &UserEntry) -> bool {
|
|
88
|
+
pub fn opens_turn(user: &UserEntry) -> bool {
|
|
89
89
|
!(user.meta.is_meta
|
|
90
90
|
|| user.meta.is_sidechain
|
|
91
91
|
|| user.meta.is_compact_summary
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
//! CC-protocol marker strings and the flattened interrupt / agent-injection /
|
|
2
|
-
//! alternations. Hand-owned; mirrored to Python via
|
|
1
|
+
//! CC-protocol marker strings and the flattened interrupt / agent-injection /
|
|
2
|
+
//! structural-noise / junk alternations. Hand-owned; mirrored to Python via
|
|
3
|
+
//! `_native.embedded_literals()`.
|
|
3
4
|
|
|
4
5
|
pub const DENIAL_PREFIX: &str =
|
|
5
6
|
"The user doesn't want to proceed with this tool use. The tool use was rejected";
|
|
@@ -11,6 +12,7 @@ pub const ANSWERED_PREFIX: &str = "Your questions have been answered: ";
|
|
|
11
12
|
pub const ANSWERED_TRAILER: &str = ". You can now continue with these answers in mind.";
|
|
12
13
|
pub const INTERRUPT_MARKER_PATTERN: &str = "(?:^\\s*\\[Request (?-i:[Ii])nterrupted by user)";
|
|
13
14
|
pub const AGENT_INJECTION_PATTERN: &str = "(?:\\A\\s*<(?:teammate-message|scheduled-task|agent-message|cross-session-message)(?:[\\s/>]|$))|(?:\\A\\s*Another Claude sess(?-i:[Ii])on sent a message:)|(?:\\A\\s*# Augment Agent(?:\\s|$))|(?:\\A\\s*\\[Role Rem(?-i:[Ii])nder(?:[\\s:\\]]|$))";
|
|
15
|
+
pub const STRUCTURAL_NOISE_PATTERN: &str = "(?:<(?:system[_-](?:instruction|reminder)|local-command-(?:stdout|stderr|caveat)|command-(?:name|message|args)|task-notification|persisted-output|output-file)\\b)|(?:Caveat: The messages below were generated by the user while running local commands\\.)|(?:REMAINING_TASKS_ACKNOWLEDGED)|(?:<<[a-z][a-z0-9-]*>>)|(?:^Base directory for this skill:)|(?:(?:###\\s+[\\w][\\w \\-]{0,30}\\s+){3,}###)|(?:\\A\\s*<(?:teammate-message|scheduled-task|agent-message|cross-session-message)(?:[\\s/>]|$))|(?:\\A\\s*Another Claude sess(?-i:[Ii])on sent a message:)|(?:\\A\\s*# Augment Agent(?:\\s|$))|(?:\\A\\s*\\[Role Rem(?-i:[Ii])nder(?:[\\s:\\]]|$))";
|
|
14
16
|
pub const TASK_NOTIFICATION_MARKER: &str = "<task-notification>";
|
|
15
17
|
pub const TOOL_USE_ID_PREFIX: &str = "<tool-use-id>";
|
|
16
18
|
pub const TOOL_USE_ID_SUFFIX: &str = "</tool-use-id>";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
use once_cell::sync::Lazy;
|
|
2
2
|
use regex::Regex;
|
|
3
3
|
|
|
4
|
-
use crate::literals::protocol::{
|
|
4
|
+
use crate::literals::protocol::{
|
|
5
|
+
AGENT_INJECTION_PATTERN, INTERRUPT_MARKER_PATTERN, STRUCTURAL_NOISE_PATTERN,
|
|
6
|
+
};
|
|
5
7
|
use crate::pystr;
|
|
6
8
|
|
|
7
9
|
pub use crate::literals::protocol::{
|
|
@@ -30,6 +32,19 @@ pub fn is_agent_injection(text: &str) -> bool {
|
|
|
30
32
|
AGENT_INJECTION_RE.is_match(pystr::lstrip(text))
|
|
31
33
|
}
|
|
32
34
|
|
|
35
|
+
/// The structural-noise regex (filterspec.py STRUCTURAL_NOISE_RE): the structural and
|
|
36
|
+
/// agent-injection groups compiled case-insensitively.
|
|
37
|
+
pub static STRUCTURAL_NOISE_RE: Lazy<Regex> = Lazy::new(|| {
|
|
38
|
+
Regex::new(&format!("(?i){STRUCTURAL_NOISE_PATTERN}")).expect("structural noise regex")
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/// Whether ``text`` opens with structural noise (``STRUCTURAL_NOISE_RE.match``).
|
|
42
|
+
pub fn starts_with_structural_noise(text: &str) -> bool {
|
|
43
|
+
STRUCTURAL_NOISE_RE
|
|
44
|
+
.find(text)
|
|
45
|
+
.is_some_and(|found| found.start() == 0)
|
|
46
|
+
}
|
|
47
|
+
|
|
33
48
|
/// embedded_user_text (filterspec.py embedded_user_text): the verbatim instruction
|
|
34
49
|
/// wrapped between the USER_SAID markers, or None.
|
|
35
50
|
pub fn embedded_user_text(content: &str) -> Option<String> {
|
|
@@ -223,7 +223,7 @@ fn py_int(lexeme: &str) -> String {
|
|
|
223
223
|
|
|
224
224
|
// pad_exp=true: Python repr(float) layout. false: installed-orjson layout (fixed
|
|
225
225
|
// notation through exponent -5, bare exponent, nonfinite -> null; orjson 3.11.9).
|
|
226
|
-
fn py_float_repr(value: f64, pad_exp: bool) -> String {
|
|
226
|
+
pub fn py_float_repr(value: f64, pad_exp: bool) -> String {
|
|
227
227
|
if !value.is_finite() {
|
|
228
228
|
return match (pad_exp, value.is_nan(), value.is_sign_negative()) {
|
|
229
229
|
(false, _, _) => "null".to_string(),
|
|
@@ -337,7 +337,7 @@ fn py_repr(value: &Value) -> String {
|
|
|
337
337
|
|
|
338
338
|
// Python repr() of a str: prefer single quotes (double only when the string has a single
|
|
339
339
|
// quote and no double), escape the quote/backslash/\n\r\t, \x/\u/\U-escape non-printables.
|
|
340
|
-
fn py_string_repr(s: &str) -> String {
|
|
340
|
+
pub fn py_string_repr(s: &str) -> String {
|
|
341
341
|
let quote = if s.contains('\'') && !s.contains('"') {
|
|
342
342
|
'"'
|
|
343
343
|
} else {
|
|
@@ -4928,6 +4928,7 @@ impl NativeStore {
|
|
|
4928
4928
|
let max_stage_bytes = entry_bytes(&source)
|
|
4929
4929
|
.saturating_mul(4)
|
|
4930
4930
|
.saturating_add(source.event_count.saturating_mul(512))
|
|
4931
|
+
.saturating_add(source.activity.accounted_bytes().saturating_mul(2))
|
|
4931
4932
|
.saturating_add(16 * 1024)
|
|
4932
4933
|
.min(self.config.retained);
|
|
4933
4934
|
let mut reservation = self.reserve_projection(
|
|
@@ -22091,6 +22092,80 @@ mod tests {
|
|
|
22091
22092
|
.pin(&complete["description"]["handle"], &owner)
|
|
22092
22093
|
.is_ok());
|
|
22093
22094
|
}
|
|
22095
|
+
#[test]
|
|
22096
|
+
fn classifier_staging_admits_a_foreground_transcript_of_tool_turns() {
|
|
22097
|
+
let at = "2026-01-02T03:04:05Z";
|
|
22098
|
+
let line = |value: Value| format!("{}\n", sonic_rs::to_string(&value).unwrap());
|
|
22099
|
+
let mut contents = String::new();
|
|
22100
|
+
for turn in 0..120 {
|
|
22101
|
+
contents += &line(
|
|
22102
|
+
json!({"type":"user","uuid":format!("p{turn}"),"sessionId":"s","timestamp":at,
|
|
22103
|
+
"message":{"role":"user","content":format!("prompt {turn} alpha")}}),
|
|
22104
|
+
);
|
|
22105
|
+
contents += &line(
|
|
22106
|
+
json!({"type":"assistant","uuid":format!("a{turn}"),"sessionId":"s","timestamp":at,
|
|
22107
|
+
"message":{"role":"assistant","model":"m","content":[{"type":"text","text":format!("reply {turn}")},
|
|
22108
|
+
{"type":"tool_use","id":format!("read-{turn}"),"name":"Read","input":{"file_path":format!("src/mod{turn}.py")}}]}}),
|
|
22109
|
+
);
|
|
22110
|
+
contents += &line(
|
|
22111
|
+
json!({"type":"user","uuid":format!("r{turn}"),"sessionId":"s","timestamp":at,
|
|
22112
|
+
"message":{"role":"user","content":[{"type":"tool_result","tool_use_id":format!("read-{turn}"),"content":format!("result-alpha {}", "x".repeat(4096))}]}}),
|
|
22113
|
+
);
|
|
22114
|
+
contents += &line(
|
|
22115
|
+
json!({"type":"assistant","uuid":format!("b{turn}"),"sessionId":"s","timestamp":at,
|
|
22116
|
+
"message":{"role":"assistant","model":"m","content":[
|
|
22117
|
+
{"type":"tool_use","id":format!("bash-{turn}"),"name":"Bash","input":{"command":"git push origin HEAD"}},
|
|
22118
|
+
{"type":"tool_use","id":format!("grep-{turn}"),"name":"Grep","input":{"pattern":"alpha"}}]}}),
|
|
22119
|
+
);
|
|
22120
|
+
contents += &line(
|
|
22121
|
+
json!({"type":"user","uuid":format!("s{turn}"),"sessionId":"s","timestamp":at,
|
|
22122
|
+
"message":{"role":"user","content":[{"type":"tool_result","tool_use_id":format!("bash-{turn}"),"content":"pushed"}]}}),
|
|
22123
|
+
);
|
|
22124
|
+
contents += &line(
|
|
22125
|
+
json!({"type":"user","uuid":format!("g{turn}"),"sessionId":"s","timestamp":at,
|
|
22126
|
+
"message":{"role":"user","content":[{"type":"tool_result","tool_use_id":format!("grep-{turn}"),"content":"no matches","is_error":true}]}}),
|
|
22127
|
+
);
|
|
22128
|
+
}
|
|
22129
|
+
let source = Source::new(&contents);
|
|
22130
|
+
let store = NativeStore::new(&json!({"max_retained_bytes":32*1024*1024,"reserved_hook_accounted_bytes":4096,"max_leases":16,"reserved_hook_leases":1})).unwrap();
|
|
22131
|
+
let owner = context("a");
|
|
22132
|
+
let request = json!({"schema":SCHEMA,"id":"request","operation":"acquire","path":source.path.to_string_lossy().as_ref(),"classifier":{"id":"native","version":"1"},
|
|
22133
|
+
"deadline_unix_ms":now_ms()+30_000,"limits":{"max_read_bytes":8*1024*1024,"max_source_read_bytes":8*1024*1024,"max_events":4096,"max_items":4096,"max_output_bytes":8*1024*1024,"max_discovery_entries":1000,"max_sources":100}});
|
|
22134
|
+
let root = finish(
|
|
22135
|
+
&store,
|
|
22136
|
+
store.request(&request, &owner, &Cancellation::default()),
|
|
22137
|
+
&owner,
|
|
22138
|
+
);
|
|
22139
|
+
let mut page = store
|
|
22140
|
+
.prepare_classifier(
|
|
22141
|
+
handle(&root),
|
|
22142
|
+
&json!({"id":"application","version":"1"}),
|
|
22143
|
+
&owner,
|
|
22144
|
+
&Cancellation::default(),
|
|
22145
|
+
limits(&request).unwrap(),
|
|
22146
|
+
)
|
|
22147
|
+
.unwrap();
|
|
22148
|
+
while page["complete"].as_bool() != Some(true) {
|
|
22149
|
+
let labels = page["records_json"]
|
|
22150
|
+
.as_array()
|
|
22151
|
+
.unwrap()
|
|
22152
|
+
.iter()
|
|
22153
|
+
.map(|record| record.as_str().unwrap().contains("prompt "))
|
|
22154
|
+
.collect::<Vec<_>>();
|
|
22155
|
+
page = store
|
|
22156
|
+
.submit_classifier(
|
|
22157
|
+
page["cursor"].as_str().unwrap(),
|
|
22158
|
+
&labels,
|
|
22159
|
+
&owner,
|
|
22160
|
+
&Cancellation::default(),
|
|
22161
|
+
)
|
|
22162
|
+
.unwrap();
|
|
22163
|
+
}
|
|
22164
|
+
let derived = store.pin(&page["description"]["handle"], &owner).unwrap();
|
|
22165
|
+
assert!(derived.id.starts_with("labels:"));
|
|
22166
|
+
assert_eq!(derived.event_count, 720);
|
|
22167
|
+
}
|
|
22168
|
+
|
|
22094
22169
|
#[test]
|
|
22095
22170
|
fn label_publication_transfers_quota_and_lease_failure_rolls_back_generation() {
|
|
22096
22171
|
let source = Source::new(&format!("{}\n", user("a")));
|
{cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_index_allocations.rs
RENAMED
|
@@ -296,13 +296,13 @@ impl AllocationSet {
|
|
|
296
296
|
let state = self.registry.state.lock().expect("allocation registry");
|
|
297
297
|
let count = self.len().saturating_add(inserts);
|
|
298
298
|
let width = size_of::<usize>() + size_of::<Arc<AllocationOwner>>() + 4 * size_of::<usize>();
|
|
299
|
-
let
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
299
|
+
let bound = (count.saturating_mul(8) + 64).saturating_mul(width);
|
|
300
|
+
let nodes = bound.saturating_add(
|
|
301
|
+
inserts
|
|
302
|
+
.saturating_mul(count.max(1).ilog2() as usize + 4)
|
|
303
|
+
.saturating_mul(64 * width)
|
|
304
|
+
.min(bound),
|
|
305
|
+
);
|
|
306
306
|
let registry = (arc_bytes::<Registry>() + MUTEX_STORAGE_BYTES)
|
|
307
307
|
.saturating_add(
|
|
308
308
|
state
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
use serde_json::Value as SchemaValue;
|
|
2
|
+
use sonic_rs::{json, JsonContainerTrait, JsonType, JsonValueTrait, Value};
|
|
3
|
+
|
|
4
|
+
use crate::snapshot::{SnapshotError, Status};
|
|
5
|
+
|
|
6
|
+
fn invalid(reason: impl Into<String>) -> SnapshotError {
|
|
7
|
+
SnapshotError::new(Status::InvalidRequest, reason)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
pub fn exact_integer(text: &str) -> Result<i64, SnapshotError> {
|
|
11
|
+
const MAX_SAFE: u64 = 9_007_199_254_740_991;
|
|
12
|
+
let (negative, unsigned) = text
|
|
13
|
+
.strip_prefix('-')
|
|
14
|
+
.map_or((false, text), |rest| (true, rest));
|
|
15
|
+
let (coefficient, exponent) = unsigned.split_once(['e', 'E']).unwrap_or((unsigned, "0"));
|
|
16
|
+
let fractional = coefficient
|
|
17
|
+
.split_once('.')
|
|
18
|
+
.map_or(0, |(_, fraction)| fraction.len());
|
|
19
|
+
let digits: String = coefficient.chars().filter(|&digit| digit != '.').collect();
|
|
20
|
+
let digits = digits.trim_start_matches('0');
|
|
21
|
+
if digits.is_empty() {
|
|
22
|
+
return Ok(0);
|
|
23
|
+
}
|
|
24
|
+
let significant = digits.trim_end_matches('0');
|
|
25
|
+
let trailing = digits.len() - significant.len();
|
|
26
|
+
let exponent: i64 = exponent
|
|
27
|
+
.parse()
|
|
28
|
+
.map_err(|_| invalid("integer exponent exceeds safe range"))?;
|
|
29
|
+
let scale = exponent
|
|
30
|
+
.checked_add(trailing as i64)
|
|
31
|
+
.and_then(|value| value.checked_sub(fractional as i64))
|
|
32
|
+
.ok_or_else(|| invalid("integer exponent exceeds safe range"))?;
|
|
33
|
+
if scale < 0 {
|
|
34
|
+
return Err(invalid("fractional metadata number"));
|
|
35
|
+
}
|
|
36
|
+
if scale > 16 || significant.len().saturating_add(scale as usize) > 16 {
|
|
37
|
+
return Err(invalid("metadata integer exceeds safe range"));
|
|
38
|
+
}
|
|
39
|
+
let mut value: u64 = significant
|
|
40
|
+
.parse()
|
|
41
|
+
.map_err(|_| invalid("invalid metadata integer"))?;
|
|
42
|
+
for _ in 0..scale {
|
|
43
|
+
value *= 10;
|
|
44
|
+
}
|
|
45
|
+
if value > MAX_SAFE {
|
|
46
|
+
return Err(invalid("metadata integer exceeds safe range"));
|
|
47
|
+
}
|
|
48
|
+
Ok(if negative {
|
|
49
|
+
-(value as i64)
|
|
50
|
+
} else {
|
|
51
|
+
value as i64
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
pub fn normalize_numbers(value: &mut SchemaValue) -> Result<(), SnapshotError> {
|
|
56
|
+
match value {
|
|
57
|
+
SchemaValue::Array(values) => {
|
|
58
|
+
for value in values {
|
|
59
|
+
normalize_numbers(value)?;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
SchemaValue::Object(values) => {
|
|
63
|
+
for value in values.values_mut() {
|
|
64
|
+
normalize_numbers(value)?;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
SchemaValue::Number(number) => {
|
|
68
|
+
*number = serde_json::Number::from(exact_integer(&number.to_string())?);
|
|
69
|
+
}
|
|
70
|
+
_ => {}
|
|
71
|
+
}
|
|
72
|
+
Ok(())
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
pub fn native_value(value: &SchemaValue) -> Value {
|
|
76
|
+
match value {
|
|
77
|
+
SchemaValue::Null => json!(null),
|
|
78
|
+
SchemaValue::Bool(value) => json!(value),
|
|
79
|
+
SchemaValue::String(value) => json!(value),
|
|
80
|
+
SchemaValue::Number(value) => json!(value.as_i64().expect("normalized metadata integer")),
|
|
81
|
+
SchemaValue::Array(values) => {
|
|
82
|
+
let mut array = sonic_rs::Array::with_capacity(values.len());
|
|
83
|
+
for value in values {
|
|
84
|
+
array.push(native_value(value));
|
|
85
|
+
}
|
|
86
|
+
array.into_value()
|
|
87
|
+
}
|
|
88
|
+
SchemaValue::Object(values) => {
|
|
89
|
+
let mut object = sonic_rs::Object::with_capacity(values.len());
|
|
90
|
+
for (key, value) in values {
|
|
91
|
+
object.insert(key.as_str(), native_value(value));
|
|
92
|
+
}
|
|
93
|
+
object.into_value()
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/// The owner's unvalidated ingress: object keys sorted and every number an exact
|
|
99
|
+
/// safe integer, as ``native_value`` yields after ``normalize_numbers``.
|
|
100
|
+
pub fn native_input(value: &Value) -> Result<Value, SnapshotError> {
|
|
101
|
+
Ok(match value.get_type() {
|
|
102
|
+
JsonType::Array => {
|
|
103
|
+
let values = value.as_array().expect("array");
|
|
104
|
+
let mut array = sonic_rs::Array::with_capacity(values.len());
|
|
105
|
+
for value in values.iter() {
|
|
106
|
+
array.push(native_input(value)?);
|
|
107
|
+
}
|
|
108
|
+
array.into_value()
|
|
109
|
+
}
|
|
110
|
+
JsonType::Object => {
|
|
111
|
+
let values = value.as_object().expect("object");
|
|
112
|
+
let mut pairs: Vec<_> = values.iter().collect();
|
|
113
|
+
pairs.sort_by(|left, right| left.0.cmp(right.0));
|
|
114
|
+
let mut object = sonic_rs::Object::with_capacity(pairs.len());
|
|
115
|
+
for (key, value) in pairs {
|
|
116
|
+
object.insert(key, native_input(value)?);
|
|
117
|
+
}
|
|
118
|
+
object.into_value()
|
|
119
|
+
}
|
|
120
|
+
JsonType::Number => json!(exact_integer(
|
|
121
|
+
&value
|
|
122
|
+
.as_raw_number()
|
|
123
|
+
.map_or_else(|| value.to_string(), |raw| raw.as_str().to_owned())
|
|
124
|
+
)?),
|
|
125
|
+
_ => value.clone(),
|
|
126
|
+
})
|
|
127
|
+
}
|
{cc_transcript-14.45.38 → cc_transcript-14.46.2}/rust/crates/core/src/snapshot_persistent.rs
RENAMED
|
@@ -174,12 +174,14 @@ impl<K: Ord + Clone + Borrow<str>, V: Clone> Tree<K, V> {
|
|
|
174
174
|
return 0;
|
|
175
175
|
}
|
|
176
176
|
let count = self.len().saturating_add(inserts);
|
|
177
|
-
Self::metadata_bound(count, self.max_key_bytes)
|
|
177
|
+
let bound = Self::metadata_bound(count, self.max_key_bytes);
|
|
178
|
+
bound.saturating_add(
|
|
178
179
|
inserts
|
|
179
180
|
.saturating_mul(count.max(1).ilog2() as usize + 4)
|
|
180
181
|
.saturating_mul(
|
|
181
182
|
64 * (size_of::<K>() + size_of::<Counted<V>>() + 4 * size_of::<usize>()),
|
|
182
|
-
)
|
|
183
|
+
)
|
|
184
|
+
.min(bound),
|
|
183
185
|
)
|
|
184
186
|
}
|
|
185
187
|
}
|
|
@@ -266,10 +268,12 @@ impl<T: Clone> Vector<T> {
|
|
|
266
268
|
return 0;
|
|
267
269
|
}
|
|
268
270
|
let count = self.len().saturating_add(inserts);
|
|
269
|
-
Self::metadata_bound(count)
|
|
271
|
+
let bound = Self::metadata_bound(count);
|
|
272
|
+
bound.saturating_add(
|
|
270
273
|
inserts
|
|
271
274
|
.saturating_mul(count.max(1).ilog2() as usize + 4)
|
|
272
|
-
.saturating_mul(256 * (size_of::<Counted<T>>() + 4 * size_of::<usize>()))
|
|
275
|
+
.saturating_mul(256 * (size_of::<Counted<T>>() + 4 * size_of::<usize>()))
|
|
276
|
+
.min(bound),
|
|
273
277
|
)
|
|
274
278
|
}
|
|
275
279
|
pub(crate) fn partition_point(&self, mut predicate: impl FnMut(&T) -> bool) -> usize {
|
|
@@ -452,6 +452,10 @@ fn embedded_literals(py: Python<'_>) -> PyResult<Bound<'_, PyDict>> {
|
|
|
452
452
|
"protocol.AGENT_INJECTION_PATTERN",
|
|
453
453
|
protocol::AGENT_INJECTION_PATTERN,
|
|
454
454
|
)?;
|
|
455
|
+
dict.set_item(
|
|
456
|
+
"protocol.STRUCTURAL_NOISE_PATTERN",
|
|
457
|
+
protocol::STRUCTURAL_NOISE_PATTERN,
|
|
458
|
+
)?;
|
|
455
459
|
dict.set_item(
|
|
456
460
|
"protocol.TASK_NOTIFICATION_MARKER",
|
|
457
461
|
protocol::TASK_NOTIFICATION_MARKER,
|
|
@@ -5,6 +5,7 @@ use cc_transcript_core::snapshot::{
|
|
|
5
5
|
Cancellation, NativeStore, Projection, SnapshotError, Status, TranscriptSnapshot, WorkLimits,
|
|
6
6
|
SCHEMA,
|
|
7
7
|
};
|
|
8
|
+
use cc_transcript_core::snapshot_input::{native_value, normalize_numbers};
|
|
8
9
|
use cc_transcript_core::toolcall::{with_registry, ToolRegistrySnapshot};
|
|
9
10
|
use cc_transcript_core::{snapshot_codec, snapshot_projection, snapshot_text};
|
|
10
11
|
use jsonschema::Validator;
|
|
@@ -171,94 +172,6 @@ fn validate(value: &Value, schema: &Validator) -> Result<(), SnapshotError> {
|
|
|
171
172
|
.map_err(|_| invalid("input does not match snapshot schema"))
|
|
172
173
|
}
|
|
173
174
|
|
|
174
|
-
fn exact_integer(text: &str) -> Result<i64, SnapshotError> {
|
|
175
|
-
const MAX_SAFE: u64 = 9_007_199_254_740_991;
|
|
176
|
-
let (negative, unsigned) = text
|
|
177
|
-
.strip_prefix('-')
|
|
178
|
-
.map_or((false, text), |rest| (true, rest));
|
|
179
|
-
let (coefficient, exponent) = unsigned.split_once(['e', 'E']).unwrap_or((unsigned, "0"));
|
|
180
|
-
let fractional = coefficient
|
|
181
|
-
.split_once('.')
|
|
182
|
-
.map_or(0, |(_, fraction)| fraction.len());
|
|
183
|
-
let digits: String = coefficient.chars().filter(|&digit| digit != '.').collect();
|
|
184
|
-
let digits = digits.trim_start_matches('0');
|
|
185
|
-
if digits.is_empty() {
|
|
186
|
-
return Ok(0);
|
|
187
|
-
}
|
|
188
|
-
let significant = digits.trim_end_matches('0');
|
|
189
|
-
let trailing = digits.len() - significant.len();
|
|
190
|
-
let exponent: i64 = exponent
|
|
191
|
-
.parse()
|
|
192
|
-
.map_err(|_| invalid("integer exponent exceeds safe range"))?;
|
|
193
|
-
let scale = exponent
|
|
194
|
-
.checked_add(trailing as i64)
|
|
195
|
-
.and_then(|value| value.checked_sub(fractional as i64))
|
|
196
|
-
.ok_or_else(|| invalid("integer exponent exceeds safe range"))?;
|
|
197
|
-
if scale < 0 {
|
|
198
|
-
return Err(invalid("fractional metadata number"));
|
|
199
|
-
}
|
|
200
|
-
if scale > 16 || significant.len().saturating_add(scale as usize) > 16 {
|
|
201
|
-
return Err(invalid("metadata integer exceeds safe range"));
|
|
202
|
-
}
|
|
203
|
-
let mut value: u64 = significant
|
|
204
|
-
.parse()
|
|
205
|
-
.map_err(|_| invalid("invalid metadata integer"))?;
|
|
206
|
-
for _ in 0..scale {
|
|
207
|
-
value *= 10;
|
|
208
|
-
}
|
|
209
|
-
if value > MAX_SAFE {
|
|
210
|
-
return Err(invalid("metadata integer exceeds safe range"));
|
|
211
|
-
}
|
|
212
|
-
Ok(if negative {
|
|
213
|
-
-(value as i64)
|
|
214
|
-
} else {
|
|
215
|
-
value as i64
|
|
216
|
-
})
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
fn normalize_numbers(value: &mut SchemaValue) -> Result<(), SnapshotError> {
|
|
220
|
-
match value {
|
|
221
|
-
SchemaValue::Array(values) => {
|
|
222
|
-
for value in values {
|
|
223
|
-
normalize_numbers(value)?;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
SchemaValue::Object(values) => {
|
|
227
|
-
for value in values.values_mut() {
|
|
228
|
-
normalize_numbers(value)?;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
SchemaValue::Number(number) => {
|
|
232
|
-
*number = serde_json::Number::from(exact_integer(&number.to_string())?);
|
|
233
|
-
}
|
|
234
|
-
_ => {}
|
|
235
|
-
}
|
|
236
|
-
Ok(())
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
fn native_value(value: &SchemaValue) -> Value {
|
|
240
|
-
match value {
|
|
241
|
-
SchemaValue::Null => json!(null),
|
|
242
|
-
SchemaValue::Bool(value) => json!(value),
|
|
243
|
-
SchemaValue::String(value) => json!(value),
|
|
244
|
-
SchemaValue::Number(value) => json!(value.as_i64().expect("normalized metadata integer")),
|
|
245
|
-
SchemaValue::Array(values) => {
|
|
246
|
-
let mut array = sonic_rs::Array::with_capacity(values.len());
|
|
247
|
-
for value in values {
|
|
248
|
-
array.push(native_value(value));
|
|
249
|
-
}
|
|
250
|
-
array.into_value()
|
|
251
|
-
}
|
|
252
|
-
SchemaValue::Object(values) => {
|
|
253
|
-
let mut object = sonic_rs::Object::with_capacity(values.len());
|
|
254
|
-
for (key, value) in values {
|
|
255
|
-
object.insert(key.as_str(), native_value(value));
|
|
256
|
-
}
|
|
257
|
-
object.into_value()
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
175
|
fn validated(text: &str, schema: &Validator) -> Result<Value, SnapshotError> {
|
|
263
176
|
if text.len() > MAX_INPUT_BYTES {
|
|
264
177
|
return Err(SnapshotError::new(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|