@ycodium-ai/agent-codex 0.2.2678 → 0.2.2694
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 +23 -0
- package/dist/index.js +1287 -250
- package/locales/en.json +12 -0
- package/locales/zh-CN.json +12 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -26,6 +26,29 @@ Facts:
|
|
|
26
26
|
key, and the separate shadow directory a second account gets. The UI uses the
|
|
27
27
|
host's React and `@ycodium-ai/plugin-api/provider-settings`.
|
|
28
28
|
|
|
29
|
+
- Usage (`instance.usage`, ADR-0034), read only when the user asks:
|
|
30
|
+
- `readQuota` starts a one-shot `codex app-server` on the instance's own
|
|
31
|
+
account directory and environment (same `maxConcurrentProcesses` limit as a
|
|
32
|
+
session) and calls `account/rateLimits/read`. Windows are named by
|
|
33
|
+
`windowDurationMins` (300 session, 10080 weekly, anything else by its
|
|
34
|
+
duration); the credits balance is a `credits` balance; `planType` is the plan;
|
|
35
|
+
`rateLimitResetCredits.availableCount` fills `resetCredits`. When the host
|
|
36
|
+
refuses a new process because the limit is reached, it borrows a live
|
|
37
|
+
session's app-server for that one request. An instance with its own model
|
|
38
|
+
endpoint (API URL and key, `-c model_provider=…`, a selected provider that
|
|
39
|
+
does not point at `chatgpt.com`) reports `customEndpoint` without starting
|
|
40
|
+
anything; an API-key login reports `unsupportedLogin`.
|
|
41
|
+
- `redeemQuotaReset` calls `account/rateLimitResetCredit/consume` once with the
|
|
42
|
+
host's idempotency key unchanged and no credit id, and never retries.
|
|
43
|
+
- `readTokenUsage` reads `sessions/**` and `archived_sessions/**` under the
|
|
44
|
+
shared `CODEX_HOME` (a shadow home keeps sessions there too): `last_token_usage`
|
|
45
|
+
as the increment, cached input split out of `input_tokens`, adjacent repeats
|
|
46
|
+
skipped, forked history dropped. Per-file results are cached in `ctx.cache`
|
|
47
|
+
keyed by the account directory, and a growing rollout resumes from its saved
|
|
48
|
+
byte offset.
|
|
49
|
+
- `test/codexRateLimitsRead.json` is a redacted real response (codex-cli 0.145.0,
|
|
50
|
+
Pro plan); the fake CLI answers `account/rateLimits/read` from it.
|
|
51
|
+
|
|
29
52
|
Develop with `vp run --filter @ycodium-ai/agent-codex typecheck`, `build`, and `test`.
|
|
30
53
|
|
|
31
54
|
## License
|