Repository navigation
Update plugin token-meter to 1.1.0 - #28
Merged
luolangaga merged 1 commit intoOct 13, 2026
Merged
Conversation
新增可选的服务商用量接口,本地会话日志降级为兜底数据源: - 多来源按模型归属分派并分列展示(本地 ¥ 与云端 $ 不混算、不互相覆盖) - 服务端金额按 quota 定点记账,覆盖不足时标「混合」而非冒充全量 - 接口层:地址安全卡控(带密钥禁止明文 http)、识别 HTTP 200 但业务层报错、 JSON 路径支持数组下标与「字符串内嵌 JSON」、页码与游标两种分页 - 密钥只从环境变量读,不落盘、不进日志、不进错误文案 - 接口不可用/超时/权限不足时自动降级回本地日志,界面标明当前口径 按要求未改动仓库根的 index.json 与 README.md(索引由上游 CI 重建)。 构建来源:KujouShiori/token-meter tag v1.1.0 (707c960)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
插件简介
Token 计岛(
token-meter) 的 1.1.0 更新投稿(1.0.0 已由 PR #23 合并)。本次新增可选的服务商用量接口:本地会话日志降级为兜底数据源,接口可用时以服务端数据为准;接口不可用、超时或权限不足时自动降级,界面标明当前数字来自哪个来源。
本次变更
quota以 1e-8 定点记账;某窗口服务端覆盖不足 99% 时标为「混合」并继续显示本地估算,不拿部分数据冒充全量测试环境
min_host_version填2.4.0)权限与数据
Enabled默认为false,未启用时行为与 1.0.0 完全一致(只读本机会话日志)。GET请求。发请求前会校验必须是 http/https 绝对地址,带密钥时拒绝明文 http(本地调试127.0.0.1/localhost例外)。除该地址外不发任何其他网络请求。settings.json、不会进插件自己的缓存文件、也不会出现在日志与错误文案中。;分隔),且只解析role=assistant且带usage的记录。.cache\(扫描增量偏移、按天账本、云端水位线与云端账本)。卸载插件时该目录随plugins\<id>\一起删除;仅当插件目录不可写时才回退到%LOCALAPPDATA%,并在插件日志中明确记录这一回退。enabled/priority/refreshSeconds/roots/pricing/provider/localScope,全部由 SDK 自动加token-meter.前缀;不读写plugin.<id>.disabled,不读写其他插件的数据。cost字段恒为 0,插件按用户填写的模型单价计算;未配单价的模型显示「未定价」,不计入费用,也不会被伪装成免费。启用接口且服务端返回真实金额时优先采用服务端值。对照审核标准自查
.cache\内,卸载即消失。本机已实测「.lwp放入plugins\→ 启动自动安装 → 加载 → 启用 → 卸载清除」全链路,安装后目录内文件与包内文件逐个哈希一致plugin.json、入口 dll、deps.json、.pri、README.md),无WinIsland.Core.dll/ WinUI / WinRT / WebView2 /*.pdbLICENSE);plugin.json与 README 均写明「默认只读本地日志;启用接口后仅请求你所配置的那一个地址;密钥只从环境变量读」1.0.0 → 1.1.0构建来源与一致性
v1.1.0(commit707c960)dotnet build -c Release产物,经官方tools/submit-plugin.ps1 -NoIndex生成plugin.json与plugins/token-meter/plugin.json完全一致index.json与README.md(索引交由 CI 重建)已知限制(如实说明)
0,以免被读成「花了 0 元」。备注
提交历史的作者邮箱使用 GitHub 匿名回复邮箱。