Skip to content

feat: add AutoClaw and DeepSeek Harness usage sources - #18

Open
gcheng001 wants to merge 6 commits into
Backtthefuture:mainfrom
gcheng001:pr/autoclaw-deepseek-glm
Open

feat: add AutoClaw and DeepSeek Harness usage sources#18
gcheng001 wants to merge 6 commits into
Backtthefuture:mainfrom
gcheng001:pr/autoclaw-deepseek-glm

Conversation

@gcheng001

Copy link
Copy Markdown

Summary

This PR adds local usage accounting sources and reliability fixes for TokenStep:

  • Add AutoClaw session-ledger collection from ~/.openclaw-autoclaw/agents/*/sessions/*.jsonl.
  • Add DeepSeek Harness collection from compressed session.jsonl.zstd files, including zstd decoding, concatenated-frame handling, deduplication, partial-tail detection, and isolated tests.
  • Improve GLM quota lookup with the z.ai limit endpoint and surface reset windows in the popover.
  • Fix Codex app-server initialization handshake and widen cold-start timeout handling.
  • Avoid SwiftUI/Keychain helper run-loop reentry by draining and polling the helper process.
  • Keep quota-provider switching on a single exit path and add regression coverage.

Testing

  • swift test: 122 tests executed; all new AutoClaw, DeepSeek Harness, and GLM tests pass.
  • One existing upstream test still fails: OdysseyMotionPrototypeTests.testWindowVisibilityObserverTracksOrderFrontAndOrderOutWithoutPolling. The same failure reproduces on the upstream baseline and is unrelated to this PR.
  • git diff --check passes.

All collectors remain local-only; token totals, costs, and existing providers retain their current accounting model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant