Skip to content

Commit a9f7a23

Browse files
zhangyuzhangyu
authored andcommitted
merge: sync upstream v0.41.0
Merge kenn-io/agentsview main (v0.41.0, 138 commits ahead of our 0.38.1 fork point) and realign the fork onto the upstream superset. What this fork gains from upstream: - Nine new agent parsers, the Recall subsystem, the artifact machine, and the Money/microdollars pricing rework across SQLite, PostgreSQL, and DuckDB stores. - Token usage view reworked as the in-page Cost|Tokens toggle with four-way token-type filtering, URL state, and an automatic redirect from the legacy /token-usage route (upstream kenn-io#1234, authored by this fork's maintainer). - Kimi Work fixes beyond the fork copy: tool-step usage back-fill, k2d6-agent K2.6 pricing, cwd extraction, and date-ambiguous alias pricing behind the Kimi model-era cutoff (kenn-io#1338, kenn-io#1427). Conflict resolution across 40 files: - Token usage UI, Kimi Work parser/pricing, usage backends, docs, and golden fixtures: take upstream. The fork's older components predate the Money response protocol and cannot coexist with it. - start-agentsview.command and start-agentsview-dev.command: keep the fork versions, which carry later local refinements (Makefile alignment, link to the local build doc) missing upstream. - 本地构建说明.md is the only other fork-only file; it merged without conflict. Golden v2 fixtures follow upstream's v4/v5 contract rename. First run after this merge reparses stored sessions (data version 70 to 88, non-destructive) and rebuilds any DuckDB mirror under the new schema version by design.
2 parents d3cb53e + bf3f2f0 commit a9f7a23

1,201 files changed

Lines changed: 214480 additions & 21679 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/build-desktop-artifact/action.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@ inputs:
1414
artifact_dir:
1515
description: Bundle output directory
1616
required: true
17-
1817
runs:
1918
using: composite
2019
steps:
21-
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
20+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
2221
with:
2322
go-version-file: go.mod
23+
cache: ${{ inputs.bundle == 'appimage' && inputs.target_triple == '' && github.repository == 'kenn-io/agentsview' && (github.event_name == 'push' && github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.base.repo.full_name == github.repository)) && 'false' || 'true' }}
2424

25-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
25+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
2626
with:
2727
node-version: "24"
2828

29+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
30+
2931
- name: Setup MinGW (Windows)
3032
if: runner.os == 'Windows'
3133
uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2
@@ -73,7 +75,7 @@ runs:
7375
cd desktop
7476
export TAURI_ENV_TARGET_TRIPLE="$AGENTSVIEW_TARGET_TRIPLE"
7577
npm run prepare-sidecar
76-
build_cmd=(npx tauri build --bundles "$BUNDLE")
78+
build_cmd=(npx tauri build --verbose --bundles "$BUNDLE")
7779
if [ -n "$AGENTSVIEW_TARGET_TRIPLE" ]; then
7880
build_cmd+=(--target "$AGENTSVIEW_TARGET_TRIPLE")
7981
fi

.github/workflows/bench-pr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Bench Gate
2+
3+
# The PR dispatcher always calls the main-pinned workflow, which runs
4+
# on GitHub-hosted runners for every PR.
5+
on:
6+
pull_request:
7+
# Docs/frontend-only PRs cannot change the gated Go paths. If
8+
# this check is ever made required on branch protection, pair it
9+
# with a no-op sibling workflow on the inverse paths.
10+
paths:
11+
- "**.go"
12+
- "go.mod"
13+
- "go.sum"
14+
- "Makefile"
15+
- ".github/workflows/bench.yml"
16+
- ".github/workflows/bench-pr.yml"
17+
permissions: read-all
18+
19+
jobs:
20+
run:
21+
uses: kenn-io/agentsview/.github/workflows/bench.yml@main

.github/workflows/bench.yml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
name: Bench Gate
22

33
# Compares hot-path benchmarks between the PR head and its merge
4-
# base, so performance regressions in the sync engine and DB write
5-
# paths fail the PR instead of shipping. The gated regression classes
6-
# have all shipped before:
4+
# base, so performance regressions in sync, DB access, secret scanning,
5+
# and signal analysis fail the PR instead of shipping. The gated
6+
# regression classes have all shipped before:
77
#
88
# - discovery/skip work scaling with archive size instead of new
99
# data (#912, the providerSourceUnchangedInDB gap)
1010
# - O(session history) work per incremental append (#954)
1111
# - bulk ingest throughput (#411)
1212
# - per-row query-shape regressions in usage aggregation (#309)
13+
# - repeated token-set construction during duplicate-prompt analysis
1314
#
1415
# Both sides run `make bench-gate` — the Makefile is the single
1516
# source of truth for the gated package list, sample count, and
16-
# iteration count — and cmd/benchgate compares the outputs. It gates
17+
# per-tier iteration counts — and cmd/benchgate compares the outputs. It gates
1718
# on allocs/op and B/op (deterministic on a given machine, tight
1819
# thresholds) and on ns/op with a loose 2x threshold that only
1920
# catches algorithmic blowups; both sides run on the same runner
@@ -28,17 +29,7 @@ name: Bench Gate
2829
# produced still gate) rather than silently disabling the whole gate.
2930

3031
on:
31-
pull_request:
32-
# Docs/frontend-only PRs cannot change the gated Go paths. If
33-
# this check is ever made required on branch protection, pair it
34-
# with a no-op sibling workflow on the inverse paths.
35-
paths:
36-
- "**.go"
37-
- "go.mod"
38-
- "go.sum"
39-
- "Makefile"
40-
- ".github/workflows/bench.yml"
41-
32+
workflow_call:
4233
concurrency:
4334
group: bench-${{ github.head_ref || github.ref }}
4435
cancel-in-progress: true
@@ -49,14 +40,18 @@ permissions:
4940
jobs:
5041
bench-gate:
5142
name: Benchmark Gate
43+
# Always GitHub-hosted, unlike the rest of CI: both sides of the
44+
# comparison run on the same runner within one job, so absolute
45+
# speed is what matters, and ubuntu-latest runs this I/O-heavy
46+
# workload 2-4x faster than the managed fleet.
5247
runs-on: ubuntu-latest
5348
steps:
54-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
49+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5550
with:
5651
persist-credentials: false
5752
fetch-depth: 0
5853

59-
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
54+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
6055
with:
6156
go-version-file: go.mod
6257

@@ -75,11 +70,13 @@ jobs:
7570
# exists on both sides. The warning makes the degraded run
7671
# visible instead of a silently green vacuous pass.
7772
#
78-
# The sample count and fixed iteration count are evaluated
79-
# from the PR head's Makefile and passed into the base run:
80-
# two benchmarks grow their fixture per iteration, so a PR
81-
# that changes BENCH_GATE_COUNT/TIME must not compare against
82-
# a baseline measured with the old values. The package list
73+
# The sample count, fixed iteration counts, and heavy-tier
74+
# regex are evaluated from the PR head's Makefile and passed
75+
# into the base run: two benchmarks grow their fixture per
76+
# iteration, so a PR that changes BENCH_GATE_COUNT/TIME or
77+
# moves a benchmark between tiers must not compare against a
78+
# baseline measured with the old values. A base Makefile that
79+
# predates a variable simply ignores it. The package list
8380
# intentionally stays per-side, so growing the gate cannot
8481
# break the base run.
8582
run: |
@@ -89,7 +86,9 @@ jobs:
8986
git worktree add /tmp/bench-base "$base"
9087
if ! make -s -C /tmp/bench-base bench-gate \
9188
BENCH_GATE_COUNT="$BENCH_GATE_COUNT" \
92-
BENCH_GATE_TIME="$BENCH_GATE_TIME" > /tmp/bench-old.txt; then
89+
BENCH_GATE_TIME="$BENCH_GATE_TIME" \
90+
BENCH_GATE_HEAVY="$BENCH_GATE_HEAVY" \
91+
BENCH_GATE_HEAVY_TIME="$BENCH_GATE_HEAVY_TIME" > /tmp/bench-old.txt; then
9392
echo "::warning title=Bench Gate::merge-base benchmark run exited non-zero; gating against its partial output"
9493
fi
9594

.github/workflows/ci-macos-main.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ on:
66
# this exact workflow path only from refs/heads/main.
77
push:
88
branches: [main]
9+
paths:
10+
- 'cmd/**'
11+
- 'internal/**'
12+
- 'testdata/golden/**'
13+
- 'go.mod'
14+
- 'go.sum'
15+
- '.github/workflows/ci-macos-main.yml'
916

1017
permissions:
1118
contents: read
@@ -21,12 +28,12 @@ jobs:
2128
group: ci-runners
2229
labels: [self-hosted, macOS, ARM64]
2330
steps:
24-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
31+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2532
with:
2633
fetch-depth: 0
2734
persist-credentials: false
2835

29-
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
36+
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
3037
with:
3138
go-version-file: go.mod
3239

.github/workflows/ci-pr.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: CI
2+
3+
# The PR dispatcher always calls the main-pinned workflow. That workflow
4+
# independently routes same-repository Linux jobs to the managed public fleet
5+
# and fork jobs to GitHub-hosted runners.
6+
on:
7+
pull_request:
8+
9+
permissions: read-all
10+
11+
jobs:
12+
run:
13+
uses: kenn-io/agentsview/.github/workflows/ci.yml@main

0 commit comments

Comments
 (0)