@seanyao/roll 2.602.3 → 2.602.5
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.
- package/CHANGELOG.md +12 -0
- package/bin/roll +23 -7
- package/lib/agent_usage/__pycache__/kimi.cpython-314.pyc +0 -0
- package/lib/prices/snapshot-2026-05-23-deepseek.json +1 -1
- package/lib/prices/snapshot-2026-06-02-kimi.json +15 -0
- package/package.json +1 -1
- package/lib/prices/snapshot-2026-05-23-kimi.json +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v2.602.5
|
|
4
|
+
|
|
5
|
+
### 稳定性
|
|
6
|
+
|
|
7
|
+
- **升级后彻底不再反向提示"升级"回旧版本(FIX-170)** — 续 FIX-166:上次清缓存只在「新版本自己跑升级」时生效,可升级其实是旧版本执行的,所以换版本后偶尔还会被叫去装回旧号(这回升到 2.602.4 又冒出来提示装回 2.602.2)。现在版本检查缓存绑定了写它的版本号,版本一变缓存立即失效,不管 roll update / npm / brew / 手动哪种升级方式都不会再反向提示
|
|
8
|
+
|
|
9
|
+
## v2.602.4
|
|
10
|
+
|
|
11
|
+
### 可见性
|
|
12
|
+
|
|
13
|
+
- **kimi 成本按官方实价显示(价格快照校正)** — 之前 kimi 所有模型都按一个旧低价(¥1/¥4)算,成本被低报约 5-7x;现在按官方实价(K2.6 ¥6.5 in / ¥27 out)显示,kimi-code 的用量成本终于对得上账。deepseek 价格本就正确,顺手清掉过期的折扣注释
|
|
14
|
+
|
|
3
15
|
## v2.602.3
|
|
4
16
|
|
|
5
17
|
### 可见性
|
package/bin/roll
CHANGED
|
@@ -4,7 +4,7 @@ set -euo pipefail
|
|
|
4
4
|
# Roll — AI Agent Convention Manager
|
|
5
5
|
# Single source of truth for how all AI coding agents behave.
|
|
6
6
|
|
|
7
|
-
VERSION="2.602.
|
|
7
|
+
VERSION="2.602.5"
|
|
8
8
|
ROLL_HOME="${ROLL_HOME:-${HOME}/.roll}"
|
|
9
9
|
ROLL_CONFIG="${ROLL_HOME}/config.yaml"
|
|
10
10
|
ROLL_GLOBAL="${ROLL_HOME}/conventions/global"
|
|
@@ -15576,19 +15576,30 @@ _invalidate_update_cache() {
|
|
|
15576
15576
|
rm -f "${ROLL_HOME}/.update-check"
|
|
15577
15577
|
}
|
|
15578
15578
|
|
|
15579
|
+
# FIX-170: the cache file is `<ts> <latest> <writer-version>` — the 3rd field
|
|
15580
|
+
# binds it to the binary version that wrote it. FIX-166's explicit invalidation
|
|
15581
|
+
# only covers `roll update` run by a NEW binary; an upgrade executed by an old
|
|
15582
|
+
# binary (the 2.602.2→2.602.4 transition) or out-of-band (npm -g / brew / git)
|
|
15583
|
+
# left a stale cache that reverse-nagged for up to 24h. A writer-version
|
|
15584
|
+
# mismatch now means "stale" regardless of TTL: refetch, and stay silent until
|
|
15585
|
+
# the refetch lands. Legacy 2-field caches have no writer → auto-invalidated.
|
|
15579
15586
|
_check_update_async() {
|
|
15580
15587
|
local cache="${ROLL_HOME}/.update-check"
|
|
15581
15588
|
local now; now=$(date +%s)
|
|
15582
|
-
local last=0
|
|
15583
|
-
[[ -f "$cache" ]]
|
|
15584
|
-
|
|
15589
|
+
local last=0 writer=""
|
|
15590
|
+
if [[ -f "$cache" ]]; then
|
|
15591
|
+
last=$(awk '{print $1}' "$cache" 2>/dev/null || echo 0)
|
|
15592
|
+
writer=$(awk '{print $3}' "$cache" 2>/dev/null || true)
|
|
15593
|
+
fi
|
|
15594
|
+
[[ "$writer" == "$VERSION" ]] && (( now - ${last:-0} < 86400 )) && return
|
|
15585
15595
|
|
|
15586
15596
|
{
|
|
15587
15597
|
local latest
|
|
15588
15598
|
latest=$(curl -sf --max-time 5 \
|
|
15589
15599
|
"https://api.github.com/repos/seanyao/roll/releases/latest" \
|
|
15590
15600
|
| grep '"tag_name"' | sed 's/.*"v\([^"]*\)".*/\1/' 2>/dev/null || true)
|
|
15591
|
-
|
|
15601
|
+
# `-` placeholder keeps the field positions stable when the fetch fails.
|
|
15602
|
+
echo "$now ${latest:--} $VERSION" > "$cache"
|
|
15592
15603
|
} &
|
|
15593
15604
|
disown
|
|
15594
15605
|
}
|
|
@@ -15596,8 +15607,13 @@ _check_update_async() {
|
|
|
15596
15607
|
_notify_update() {
|
|
15597
15608
|
local cache="${ROLL_HOME}/.update-check"
|
|
15598
15609
|
[[ -f "$cache" ]] || return 0
|
|
15599
|
-
local latest
|
|
15600
|
-
|
|
15610
|
+
local latest writer
|
|
15611
|
+
latest=$(awk '{print $2}' "$cache" 2>/dev/null || true)
|
|
15612
|
+
writer=$(awk '{print $3}' "$cache" 2>/dev/null || true)
|
|
15613
|
+
# FIX-170: cache written by a different binary version is stale — stay
|
|
15614
|
+
# silent; _check_update_async has already kicked off the refetch.
|
|
15615
|
+
[[ "$writer" != "$VERSION" ]] && return
|
|
15616
|
+
[[ -z "$latest" || "$latest" == "-" || "$latest" == "$VERSION" ]] && return
|
|
15601
15617
|
# FIX-163: the cached `latest` is GitHub's releases/latest — the newest
|
|
15602
15618
|
# release by created_at, NOT by semver. Under the MAJOR.MMDD scheme a plain
|
|
15603
15619
|
# `sort -V` mis-ranks versions across the year-based→MAJOR.MMDD transition
|
|
Binary file
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"vendor": "deepseek",
|
|
6
6
|
"currency": "CNY",
|
|
7
7
|
"default_model": "deepseek-chat",
|
|
8
|
-
"notes": "Rates per million tokens in CNY (¥) — DeepSeek's native billing currency; we never convert to USD (the dashboard already shows the currency symbol). deepseek-chat and deepseek-reasoner are both deepseek-v4-flash with different thinking modes — same pricing. deepseek-v4-pro is
|
|
8
|
+
"notes": "Rates per million tokens in CNY (¥) — DeepSeek's native billing currency; we never convert to USD (the dashboard already shows the currency symbol). deepseek-chat and deepseek-reasoner are both deepseek-v4-flash with different thinking modes — same pricing. deepseek-v4-pro is priced at in 3 / out 6 — the earlier 2.5折 launch promo became permanent (confirmed 2026-06-02 against the official page), so these are the standing rates, not a temporary discount. cache_read is the official cache-hit input price (reduced to 1/10 of launch price since 2026-04-26). cache_create = cache-miss input rate: DeepSeek levies no separate cache-write surcharge, and pi reports cacheWrite cost as 0, so this rate only ever applies to (near-zero) cacheWrite tokens. pi's own per-message cost.total is computed in USD and is kept as cost_reported_usd for audit, NOT used for the authoritative cost.",
|
|
9
9
|
"prices": {
|
|
10
10
|
"deepseek-chat": {"in": 1, "out": 2, "cache_create": 1, "cache_read": 0.02},
|
|
11
11
|
"deepseek-reasoner": {"in": 1, "out": 2, "cache_create": 1, "cache_read": 0.02},
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2026-06-02",
|
|
3
|
+
"effective_at": "2026-06-02",
|
|
4
|
+
"source_url": "https://platform.kimi.com/docs/pricing/chat",
|
|
5
|
+
"vendor": "kimi",
|
|
6
|
+
"currency": "CNY",
|
|
7
|
+
"default_model": "kimi-k2.6",
|
|
8
|
+
"notes": "Rates per million tokens (CNY), verified 2026-06-02 against the official Kimi platform pricing pages (pricing/chat-k25 + pricing/chat-k26). Corrects the 2026-05-23 snapshot, which had copied the original-K2 rate (1/4) onto EVERY kimi model — real K2.5 is 4/21, K2.6 is 6.5/27, so the current models' cost was under-reported ~5-7x on output. Field convention: `in` = standard (cache-miss) input price; `cache_read` = cache-hit input price; `cache_create` = cache-miss input rate (Kimi documents no separate cache-write surcharge, mirroring DeepSeek). kimi-for-coding is the kimi-code CLI's model id; the CLI config pins it to K2.6 (display_name Kimi-k2.6, default_thinking=true, base_url api.kimi.com/coding/v1), so it is priced at K2.6 rates. NOTE: kimi-code is a coding *subscription*; these per-token rates are the published K2.6 API rates used as a usage-cost estimate, not the flat subscription fee. kimi-k2 is the prior-gen original K2, retained at its launch rate (1/4) for currency resolution of legacy name variants; it is no longer on the public pricing page and is not actually billed — only kimi-for-coding (K2.6) is.",
|
|
9
|
+
"prices": {
|
|
10
|
+
"kimi-k2": {"in": 1.00, "out": 4.00, "cache_create": 1.00, "cache_read": 0.25},
|
|
11
|
+
"kimi-k2.5": {"in": 4.00, "out": 21.00, "cache_create": 4.00, "cache_read": 0.70},
|
|
12
|
+
"kimi-k2.6": {"in": 6.50, "out": 27.00, "cache_create": 6.50, "cache_read": 1.10},
|
|
13
|
+
"kimi-for-coding": {"in": 6.50, "out": 27.00, "cache_create": 6.50, "cache_read": 1.10}
|
|
14
|
+
}
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "2026-05-23",
|
|
3
|
-
"effective_at": "2026-05-23",
|
|
4
|
-
"source_url": "https://platform.kimi.com/docs/pricing/chat",
|
|
5
|
-
"vendor": "kimi",
|
|
6
|
-
"currency": "CNY",
|
|
7
|
-
"default_model": "kimi-k2.5",
|
|
8
|
-
"notes": "Rates per million tokens (CNY). cache_create estimated at 1.25x input. Prices from public Kimi API platform docs — verify with `roll prices refresh` if page layout changes. Model names: kimi-k2 (prior gen), kimi-k2.5 (current), kimi-k2.6 (latest). kimi-for-coding is the kimi-code CLI's model id (alias of the current K2 line) — FIX-162 so usage events tagged `kimi-code/kimi-for-coding` resolve to a real CNY entry instead of falling back to USD.",
|
|
9
|
-
"prices": {
|
|
10
|
-
"kimi-k2": {"in": 1.00, "out": 4.00, "cache_create": 1.25, "cache_read": 0.25},
|
|
11
|
-
"kimi-k2.5": {"in": 1.00, "out": 4.00, "cache_create": 1.25, "cache_read": 0.25},
|
|
12
|
-
"kimi-k2.6": {"in": 1.00, "out": 4.00, "cache_create": 1.25, "cache_read": 0.25},
|
|
13
|
-
"kimi-for-coding": {"in": 1.00, "out": 4.00, "cache_create": 1.25, "cache_read": 0.25}
|
|
14
|
-
}
|
|
15
|
-
}
|