@ycodium-ai/agent-grok 0.2.6295 → 0.2.6450
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/README.md +10 -4
- package/dist/index.js +830 -448
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -56,10 +56,16 @@ Facts:
|
|
|
56
56
|
`host.fetch`. An instance that sets `GROK_MODELS_BASE_URL` reports `customEndpoint` without
|
|
57
57
|
reading credentials; a signed-out instance with only `XAI_API_KEY` reports `unsupportedLogin`
|
|
58
58
|
(xAI's balance API needs a separate management key). Credentials are never refreshed or written.
|
|
59
|
-
- Tokens: no `readTokenUsage`.
|
|
60
|
-
`_meta.usage`
|
|
61
|
-
`
|
|
62
|
-
`
|
|
59
|
+
- Tokens: no `readTokenUsage`. Each host-turn `session/prompt`'s usage comes from the reply's
|
|
60
|
+
`_meta.usage` (with `_x.ai/session_notification` `turn_completed.usage` as a fallback;
|
|
61
|
+
manual `/compact` prompts are excluded) and is emitted before `turn.completed` as
|
|
62
|
+
`thread.token-usage.updated` carrying `request: { id, totals }` so the host writes
|
|
63
|
+
`turn.usage`. Unkeyed replies/notifications are attributed only when exactly one prompt key
|
|
64
|
+
in the turn is unanswered; otherwise `request` is omitted and a `lastUsedTokens` snapshot
|
|
65
|
+
marks the turn unattributed. The reply arrives a few milliseconds after `prompt_complete`,
|
|
66
|
+
so `turn.completed` waits up to 300 ms for it, reuses the session's latest real context
|
|
67
|
+
occupancy for notification-only usage, and emits no request usage when none arrives or no
|
|
68
|
+
context occupancy is known for the session.
|
|
63
69
|
|
|
64
70
|
Develop with `vp run --filter @ycodium-ai/agent-grok typecheck`, `build`, and `test`.
|
|
65
71
|
|