The reservation and the replay claim are one write in the connector's replay store; a failed ledger write runs nothing. Amounts are integer micro-USD with checked arithmetic, and the service derives every cost from usage and the configured price. One function, ProviderCall::charge, decides the charge: a result bound to its request and caller pays its true cost with a truthful overrun, anything else pays the reservation (ruling spend-bills-on-identity-not-validity). Each caller has a spend ceiling over fixed epoch-aligned windows in its root-owned config (connector-spend-caller-window-ceiling); the admission window is monotonic, so a clock stepping back cannot reopen budget, and a clock-locked caller is refused ClockBehindAdmissionWindow (spend-window-clock-ahead-fails-closed). Refusals CostBound, SpendCeiling and ClockBehindAdmissionWindow are typed. Spec eureka-body:cut_spec:cut-connector-spend.r1; reports h1-h5; Soul s5 holds (verdict eureka-body:verdict:cut-connector-spend.s5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
941 B
TOML
31 lines
941 B
TOML
[package]
|
|
name = "model-connector"
|
|
description = "Provider-neutral connector contract, envelope, client, replay service and serve loop for GameCult minds"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish = false
|
|
|
|
[features]
|
|
default = []
|
|
daemon = ["dep:cultcache-rs"]
|
|
|
|
[dependencies]
|
|
aes-gcm = "0.10"
|
|
base64 = "0.22"
|
|
cultnet-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a4eae9056152335662f1115f97bf35fb00ab6d23", package = "cultnet-rs" }
|
|
cultcache-rs = { git = "https://github.com/GameCult/CultLib.git", rev = "a4eae9056152335662f1115f97bf35fb00ab6d23", package = "cultcache-rs", optional = true }
|
|
rand_core = { version = "0.6", features = ["getrandom"] }
|
|
rmp-serde = "1"
|
|
rmpv = "1"
|
|
schemars = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_bytes = "0.11"
|
|
serde_json = "1"
|
|
sha2 = "0.10"
|
|
thiserror = "2"
|
|
zeroize = "1"
|
|
|
|
[dev-dependencies]
|
|
anyhow = "1"
|