@onepointfour-packs/flaredeck-agent 0.2.159 → 0.2.160
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/package.json +1 -1
- package/python/sidecar.py +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onepointfour-packs/flaredeck-agent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.160",
|
|
4
4
|
"description": "Run a FlareDeck agent on your own machine: it picks up cards assigned to it, works each one in a checkout of its own, and reports back on the card.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/python/sidecar.py
CHANGED
|
@@ -37,8 +37,14 @@ def emit_spend(agent, model: str) -> None:
|
|
|
37
37
|
return
|
|
38
38
|
if not (u.total_token_count or 0):
|
|
39
39
|
return
|
|
40
|
+
# The runtime's prompt count leaves OUT what came from cache — the two are separate buckets
|
|
41
|
+
# (measured 16 Oct: 40k prompt + 93k cached over four calls, total_token_count = prompt +
|
|
42
|
+
# output + thinking). FlareDeck prices "prompt" as ALL input with "cached" a part of it, the
|
|
43
|
+
# Gemini API's own meaning, so they are added here; sent as they came, spend read ~6x low.
|
|
44
|
+
uncached = u.prompt_token_count or 0
|
|
45
|
+
cached = u.cached_content_token_count or 0
|
|
40
46
|
emit({"type": "event", "kind": "spend", "model": str(model or "unknown"),
|
|
41
|
-
"prompt":
|
|
47
|
+
"prompt": uncached + cached, "cached": cached,
|
|
42
48
|
"output": u.candidates_token_count or 0, "thinking": u.thoughts_token_count or 0})
|
|
43
49
|
|
|
44
50
|
|