Skip to content

Commit 59eae04

Browse files
committed
Merge remote-tracking branch 'origin/main' into pr-2020
# Conflicts: # rust/adapters/opencode/src/README.md
2 parents 69425f4 + 3297d33 commit 59eae04

37 files changed

Lines changed: 955 additions & 601 deletions

‎.github/workflows/check-pr-title.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: Validate PR title
1717
runs-on: ubuntu-slim
1818
steps:
19-
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
19+
- uses: amannn/action-semantic-pull-request@2252a14e810aa9b85c2d560bd7070c802206ecf6 # v6.1.2
2020
env:
2121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2222
with:

‎.github/workflows/ci.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
126126
with:
127127
name: tirith-sarif
128-
- uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
128+
- uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
129129
with:
130130
sarif_file: results.sarif
131131
category: tirith
@@ -366,7 +366,7 @@ jobs:
366366
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
367367
with:
368368
node-version: lts/*
369-
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
369+
- uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
370370
if: matrix.runner == 'pnpm'
371371
with:
372372
version: latest
@@ -598,7 +598,7 @@ jobs:
598598
if: ${{ always() }}
599599
runs-on: ubuntu-slim
600600
steps:
601-
- uses: Kesin11/actions-timeline@57fc93f20c6da7fbc14063c6d24a2a5627c799ad # v3.2.0
601+
- uses: Kesin11/actions-timeline@460b1f8a750077029ad3589824d371b200e91dcf # v3.2.1
602602

603603
# Single check for main's branch ruleset to require. Most jobs above are gated
604604
# on `changes` and are skipped on docs-only pull requests, so requiring them

‎.github/workflows/issue-gate.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
id: judge
8787
if: steps.access.outcome == 'success' && (steps.access.outputs.skip != 'true' || inputs.force_implementation == true)
8888
continue-on-error: true
89-
uses: pullfrog/pullfrog@895164fc90f5c493e72693c919c6cf269af158eb # v0.1.110
89+
uses: pullfrog/pullfrog@9d026e3b02d43601094131a34a8d22cdeeef896f # v0.1.118
9090
with:
9191
prompt: ${{ steps.request.outputs.prompt }}
9292
timeout: 15m
@@ -239,7 +239,7 @@ jobs:
239239
- name: Ask Pullfrog to implement the issue
240240
id: pullfrog
241241
if: steps.implementation_guard.outputs.skip != 'true'
242-
uses: pullfrog/pullfrog@895164fc90f5c493e72693c919c6cf269af158eb # v0.1.110
242+
uses: pullfrog/pullfrog@9d026e3b02d43601094131a34a8d22cdeeef896f # v0.1.118
243243
with:
244244
prompt: ${{ needs.apply.outputs.prompt }}
245245
timeout: 1h

‎.github/workflows/pr-gate.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
steps.access.outputs.skip != 'true' &&
6868
steps.access.outputs.bypass != 'true'
6969
continue-on-error: true
70-
uses: pullfrog/pullfrog@895164fc90f5c493e72693c919c6cf269af158eb # v0.1.110
70+
uses: pullfrog/pullfrog@9d026e3b02d43601094131a34a8d22cdeeef896f # v0.1.118
7171
with:
7272
prompt: ${{ steps.request.outputs.prompt }}
7373
timeout: 15m

‎.github/workflows/pullfrog.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Nix
3030
uses: ./.github/actions/setup-nix-cache
3131
- name: Run agent
32-
uses: pullfrog/pullfrog@895164fc90f5c493e72693c919c6cf269af158eb # v0.1.110
32+
uses: pullfrog/pullfrog@9d026e3b02d43601094131a34a8d22cdeeef896f # v0.1.118
3333
with:
3434
prompt: ${{ inputs.prompt }}
3535
push: restricted

‎.github/workflows/release.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
ref: main
3939
fetch-depth: 0
4040
- id: tagpr
41-
uses: Songmu/tagpr@e1250d6c84e4425db82b5e90549d62dfe23e9ebe # v1.21.4
41+
uses: Songmu/tagpr@047aec4b6c0ce166f52958b5a97f5a3d927fd65b # v1.22.0
4242
env:
4343
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4444

‎apps/ccusage/README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
</a>
3535
&nbsp;&nbsp;&nbsp;&nbsp;
3636
<a href="https://blacksmith.sh">
37-
<img src="https://cdn.jsdelivr.net/gh/ccusage/ccusage@main/docs/public/blacksmith.png" alt="Blacksmith" width="320">
37+
<picture>
38+
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/ccusage/ccusage@main/docs/public/blacksmith-logo-dark.svg">
39+
<img src="https://cdn.jsdelivr.net/gh/ccusage/ccusage@main/docs/public/blacksmith-logo.svg" alt="CI powered by Blacksmith" width="320">
40+
</picture>
3841
</a>
3942
</p>
4043

‎docs/guide/all-reports.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ccusage detects local usage files from Claude Code, Codex, OpenCode, Amp, Droid,
4646

4747
Unified tables include an **Agent** column so you can compare sources in one view. Focused views remove that comparison layer and show the selected source in more detail where applicable.
4848

49-
When one tool runs another, usage can be logged by both. OpenCode's Claude Agent provider is one example: unified views skip the OpenCode copy of turns that Claude Code's own log has, matching them by session and, in daily views, by day, so a turn that runs across midnight can still be counted twice or partly left out. See [OpenCode](./opencode/#claude-agent-provider).
49+
When one tool runs another, usage can be logged by both. OpenCode's Claude Agent provider is one example: unified views and `ccusage opencode` skip the OpenCode copy of turns that Claude Code's own log has, matching them by session and, in daily views, by day, so a turn that runs across midnight can still be counted twice or partly left out. See [OpenCode](./opencode/#claude-agent-provider).
5050

5151
## Supported Sources
5252

@@ -79,6 +79,7 @@ Use a source namespace when you want source-specific options or when you are deb
7979
ccusage codex daily --speed fast
8080
ccusage claude daily --mode display
8181
ccusage opencode session --json
82+
ccusage opencode daily --include-claude-agent
8283
ccusage amp monthly --compact
8384
ccusage droid session
8485
ccusage codebuff daily

‎docs/guide/opencode/index.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,15 @@ ccusage matches OpenCode rows to Claude usage by Claude Code session, not by ind
7979
- **Daily, weekly, and monthly reports** skip an OpenCode `claude-agent` row when the Claude source counted usage from the same Claude Code session on the row's date, in the Claude source's timezone. Rows still count when the Claude Code log is gone, holds no usage for that day, holds only subagent usage, or falls outside the Claude source's date range.
8080
- **Session reports** count only the usage of each Claude Code session inside the Claude source's date range. They skip an OpenCode `claude-agent` row when the Claude source counted main-thread usage from the same session in that range and the row's date is in the range too. Resumed and forked transcripts repeat earlier turns, and ccusage keeps one copy of each repeated turn; the session of a dropped copy counts on the day of the kept one, as in daily reports.
8181

82-
Because OpenCode dates a turn by when it started and Claude Code dates each model call, a turn that runs across midnight can be off in the daily family. It is counted twice when Claude has no usage from that session on the day the turn started. With `--until` on that day, the calls Claude logs after midnight are left out, even though OpenCode dates the whole turn on the earlier day. `ccusage opencode` always shows every `claude-agent` row.
82+
Because OpenCode dates a turn by when it started and Claude Code dates each model call, a turn that runs across midnight can be off in the daily family. It is counted twice when Claude has no usage from that session on the day the turn started. With `--until` on that day, the calls Claude logs after midnight are left out, even though OpenCode dates the whole turn on the earlier day.
83+
84+
`ccusage opencode` skips the rows that `ccusage claude` counts. Every `ccusage opencode` report, session reports included, matches them by Claude Code session and date, because `ccusage claude` counts only usage dated inside its date range. This way the totals of `ccusage claude` and `ccusage opencode` for the same range add up to the matching unified report, such as `ccusage daily`, and tools that read each source separately count these turns once. These turns appear under Claude. Pass `--include-claude-agent` to show every `claude-agent` row in the OpenCode report:
85+
86+
```bash
87+
ccusage opencode daily --include-claude-agent
88+
```
89+
90+
Those rows are priced from the `opus` alias, so their cost can differ from the Claude report.
8391

8492
## Environment Variables
8593

‎docs/guide/sponsors.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ ccusage is sponsored by CodeRabbit and Blacksmith.
1010
</picture>
1111
</a>
1212
<a href="https://blacksmith.sh" style="display: block;">
13-
<img src="/blacksmith.png" alt="Blacksmith" width="320">
13+
<picture>
14+
<source media="(prefers-color-scheme: dark)" srcset="/blacksmith-logo-dark.svg">
15+
<img src="/blacksmith-logo.svg" alt="CI powered by Blacksmith" width="320">
16+
</picture>
1417
</a>
1518
</div>
1619

0 commit comments

Comments
 (0)