The pager rendered "Compaction failed." with the error dropped, and the shell's unsuppressed auto-compaction failure sent an empty error. Both now carry the decoded first line of the failure (retry guidance plus the detail), decoded from the ACP data rather than its JSON-escaped Display, propagated unchanged through the compact extension, capped for a banner. Endpoint credentials never reach the banner: the sampler redacts the parsed endpoint (userinfo, sensitive query values, fragment via the repository sanitizer) in every 401 message and the appended request URL, and the shell redacts every URL in the error text before line selection, including URLs whose password holds whitespace or that follow a multi-byte delimiter. Ported from upstream 1.0.13 (grok-build dispatch/prompt.rs, session/compaction.rs), extended with the redaction. Claude-Session: https://claude.ai/code/session_01RUqV8HVGXcAETyYbZ2tPQ4
48 lines
1.4 KiB
TOML
48 lines
1.4 KiB
TOML
[package]
|
|
license = "Apache-2.0"
|
|
name = "kigi-sampler"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
description = "Actor-based sampling/inference layer for the Kimi APIs (HTTP streaming + retry, no shell coupling)"
|
|
|
|
[dependencies]
|
|
# Internal
|
|
kigi-sampling-types = { path = "../kigi-sampling-types" }
|
|
kigi-version = { workspace = true }
|
|
|
|
# External
|
|
async-openai = { workspace = true }
|
|
async-stream = { workspace = true }
|
|
chrono = { workspace = true, features = ["serde"] }
|
|
eventsource-stream = { workspace = true }
|
|
futures-util = { workspace = true }
|
|
indexmap = { workspace = true, features = ["serde"] }
|
|
reqwest = { workspace = true, features = ["stream"] }
|
|
kigi-secrets = { path = "../kigi-secrets" }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true }
|
|
tokio = { workspace = true, features = ["rt", "macros", "time", "sync"] }
|
|
tokio-util = { workspace = true }
|
|
tracing = { workspace = true }
|
|
uuid = { workspace = true, features = ["v4"] }
|
|
|
|
[dev-dependencies]
|
|
# Mock HTTP server for actor / request_task integration tests.
|
|
axum = { workspace = true }
|
|
# Shared SSE generators for the happy-path mock payloads.
|
|
kigi-test-support = { workspace = true }
|
|
# `start_paused = true` for deterministic timeout testing; `net` for
|
|
# `TcpListener::bind` in the mock server harness.
|
|
tokio = { workspace = true, features = [
|
|
"rt",
|
|
"macros",
|
|
"time",
|
|
"sync",
|
|
"test-util",
|
|
"net",
|
|
"rt-multi-thread",
|
|
] }
|
|
|
|
[lints]
|
|
workspace = true
|