Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
a0f4d5e
feat: [ENG-2737] HTML render layer foundation — element registry + pa…
danhdoan May 10, 2026
b321ca0
refactor: [ENG-2737] address review-agent feedback on render layer
danhdoan May 10, 2026
8b8b0b2
Merge pull request #627 from campfirein/feat/ENG-2737
danhdoan May 10, 2026
d2d3434
feat: [ENG-2738] HTML-emission contract in curate.txt + fluency check
danhdoan May 10, 2026
1be1dbd
feat: [ENG-2738] expand M1 vocabulary to match rendered MD structure
danhdoan May 10, 2026
eb470b5
feat: [ENG-2738] full writer-section coverage + fence sanitiser
danhdoan May 10, 2026
83c7720
feat: [ENG-2741] M1 telemetry producer — token + latency + format on …
RyanNg1403 May 10, 2026
3bdefe5
Merge pull request #628 from campfirein/feat/ENG-2738
danhdoan May 10, 2026
b58163e
Merge branch 'proj/html-mem-conversion' into feat/ENG-2741
RyanNg1403 May 10, 2026
a0fb2a2
refactor: [ENG-2741] address review-agent feedback on telemetry producer
RyanNg1403 May 10, 2026
f1cd87d
test: [ENG-2741] regression coverage for runAgentBody onTelemetry inv…
RyanNg1403 May 10, 2026
944813b
Merge pull request #629 from campfirein/feat/ENG-2741
RyanNg1403 May 10, 2026
7a4eb12
feat: [ENG-2739] curate path — HTML writer + format detector + execut…
danhdoan May 10, 2026
f701cd2
refactor: drop useHtmlContextTree flag — HTML is the only curate format
danhdoan May 10, 2026
cb6483c
fix: rewrite agent system prompt for HTML curate emission
danhdoan May 10, 2026
f969b1a
feat: inject system-managed createdat/updatedat onto bv-topic at writ…
danhdoan May 10, 2026
58b1308
fix: address review feedback + green up CI
danhdoan May 10, 2026
33765da
Merge pull request #630 from campfirein/feat/ENG-2739
danhdoan May 10, 2026
74a7c2c
feat: [ENG-2740] query path — HTML reader + element-axis index + sear…
danhdoan May 10, 2026
a3a514a
fix: address ENG-2740 PR review feedback
danhdoan May 10, 2026
a86d210
Merge pull request #631 from campfirein/feat/ENG-2740
danhdoan May 10, 2026
a130cea
fix: render HTML topics into structured markdown for Tier 2 direct re…
danhdoan May 10, 2026
8dd1c0a
Merge branch 'proj/html-mem-conversion' into fix/tier2-html-render
danhdoan May 10, 2026
2a1426d
Merge pull request #632 from campfirein/fix/tier2-html-render
danhdoan May 10, 2026
4414d19
feat(transport): widen corsOrigin and expose handshake context for ch…
ngduyanhece May 11, 2026
5d800c0
fix: extension-aware format detector for QueryLogEntry telemetry
RyanNg1403 May 10, 2026
c3f3831
fix: surface backend response on byterover stream terminating chunk
RyanNg1403 May 10, 2026
7d4f6cd
fix: align curate detail-preservation prompt with typed bv-* vocabulary
RyanNg1403 May 10, 2026
00e834d
test(channel): add failing Phase 1 integration tests as Slice 1.4/1.5…
ngduyanhece May 11, 2026
4681a43
feat(channel): add ChannelEvents constants + Phase-1 zod schemas
ngduyanhece May 11, 2026
4b7c8c6
refactor: address review-agent feedback on telemetry followups
RyanNg1403 May 11, 2026
3816618
Merge pull request #633 from campfirein/fix/html-conversion-followups
RyanNg1403 May 11, 2026
bae8bbf
fix(channel): mark ChannelGetTurnResponse.deliveries optional
ngduyanhece May 11, 2026
64dbe4d
feat(channel): add domain types, state machine, and storage layer
ngduyanhece May 11, 2026
c85c7ad
feat(channel): add orchestrator, store, and transport handler
ngduyanhece May 11, 2026
5b76740
feat(channel): oclif commands + daemon wiring — Phase 1 ships
ngduyanhece May 11, 2026
13c09f2
feat: [ENG-2765] curate tool-mode session protocol — CLI surface + pl…
danhdoan May 11, 2026
3f5a600
fix: address ENG-2765 PR review feedback
danhdoan May 11, 2026
5cd5d3c
Merge pull request #636 from campfirein/feat/ENG-2765
danhdoan May 11, 2026
d595d74
feat: [ENG-2766] CurateOrchestrator state machine — real validate + w…
danhdoan May 11, 2026
4112533
Merge pull request #637 from campfirein/feat/ENG-2766
danhdoan May 11, 2026
7b8e324
feat(channel): Phase-2 wire schemas + store extensions + sequence all…
ngduyanhece May 11, 2026
663dcda
feat: [ENG-2767] curate prompt-builder — generate + correction from E…
danhdoan May 11, 2026
1d00dd5
test(channel): failing Phase-2 integration tests + mock-ACP fixtures
ngduyanhece May 11, 2026
55c50d6
fix: address ENG-2767 PR review feedback — prompt-injection + delimit…
danhdoan May 11, 2026
fabb939
Merge pull request #638 from campfirein/feat/ENG-2767
danhdoan May 11, 2026
b82aca8
feat(channel): ACP driver layer (framing + RPC + projector + drivers)
ngduyanhece May 11, 2026
76eee3f
feat(channel): mention parser, resolver, prompt normaliser, lookback …
ngduyanhece May 11, 2026
e58280e
feat(channel): Phase-2 orchestrator + driver pool + broker + cancel +…
ngduyanhece May 11, 2026
7e47123
feat(channel): Phase-2 oclif commands + lookback prior-turn fetch
ngduyanhece May 11, 2026
3ccf46b
feat(channel): Phase-3 wire schemas + driver-profile registry + new e…
ngduyanhece May 12, 2026
a76d343
test(channel): failing Phase-3 integration tests + new mock fixtures
ngduyanhece May 12, 2026
4b9001b
feat(channel): driver-class classifier + onboard service + invite-by-…
ngduyanhece May 12, 2026
6846f58
feat(channel): doctor service + diagnostic engine
ngduyanhece May 12, 2026
19b88a9
feat: [ENG-2768] document tool-mode curate session protocol in skill
danhdoan May 12, 2026
e320822
Merge pull request #639 from campfirein/feat/ENG-2768
danhdoan May 12, 2026
690349a
feat: [ENG-2769] brv read <path> — single-topic render command
danhdoan May 12, 2026
de2f358
feat(channel): multi-agent fan-out + FIFO queueing
ngduyanhece May 12, 2026
111bf73
feat(channel): Phase-3 oclif commands + profile-* / rotate-token hand…
ngduyanhece May 12, 2026
f88760d
Merge pull request #640 from campfirein/feat/ENG-2769
danhdoan May 12, 2026
fcba01f
fix(channel): address Phase-3 review — race guard, schema strict, tes…
ngduyanhece May 12, 2026
ef06aa5
feat(channel): DaemonTokenProvider + dynamic auth middleware + rotate…
ngduyanhece May 12, 2026
58d1971
feat(channel): Origin allowlist + BRV_CHANNELS_ENABLED stubs + client…
ngduyanhece May 12, 2026
71ac81c
feat(channel): broker persistence + daemon-restart recovery + turn fi…
ngduyanhece May 12, 2026
6424987
fix: tool-mode write-time overwrite guard
RyanNg1403 May 12, 2026
0ec07d0
fix: address PR review feedback on overwrite guard
RyanNg1403 May 12, 2026
50d2fdf
Merge pull request #643 from campfirein/fix/tool-mode-overwrite-guard
danhdoan May 12, 2026
c2497b9
feat(channel): widen TurnEvent union with agent_meta + open tool_call…
ngduyanhece May 12, 2026
09a27ee
feat(channel): Phase-4 real kimi-acp integration (slices 4.0–4.4)
ngduyanhece May 12, 2026
10b8e6b
fix(channel): cross-cutting infra issues surfaced by Phase-4 UAT
ngduyanhece May 12, 2026
65f2282
feat(channel): Phase-5 adapter SDKs (@brv/agent-sdk + brv-agent)
ngduyanhece May 12, 2026
bb8797f
chore(agent-sdk): Phase-5 review follow-ups — deprecation + strictness
ngduyanhece May 12, 2026
6f0d367
fix(channel): cancelTurn race + driver hang on stuck session/prompt
ngduyanhece May 12, 2026
4b97e70
chore(channel): post-merge review hardening batch (items #5/7/8/9/10)
ngduyanhece May 12, 2026
019898e
chore(channel): re-review follow-ups #14 + #18 (spec codes + Python i…
ngduyanhece May 13, 2026
ac90090
feat(channel): extract @brv/channel-client (Slice 7.−1a)
ngduyanhece May 13, 2026
e7adb43
feat(channel): extract brv-channel-client (Python, Slice 7.−1b)
ngduyanhece May 13, 2026
076cc13
feat(channel): @brv/pi-channel-extension (Slice 7.1a)
ngduyanhece May 13, 2026
8788ad4
chore(channel): Phase-7 review follow-ups (P2 + P4)
ngduyanhece May 13, 2026
d682a9c
fix(pi-channel-extension): honour Pi's PI_CODING_AGENT_DIR env var
ngduyanhece May 13, 2026
2b5f7c6
feat: [ENG-2811, ENG-2812] query tool-mode — wire contract + server-s…
cuongdo-byterover May 13, 2026
580cf3a
docs: [ENG-2814] add Query Tool Mode subsection to bundled SKILL.md
cuongdo-byterover May 13, 2026
0221595
fix: [ENG-2811, ENG-2812] address PR 646 review feedback
cuongdo-byterover May 13, 2026
5f17575
docs: [ENG-2814] mention skippedSharedCount in SKILL.md tool-mode sub…
cuongdo-byterover May 13, 2026
21c72ce
Merge pull request #646 from campfirein/feat/query-tool-mode
cuongdo-byterover May 13, 2026
f6b9e03
feat: [ENG-2815] tool mode is the default — drop BRV_*_TOOL_MODE env-…
cuongdo-byterover May 13, 2026
36bc8cd
fix: [ENG-2815] address PR 649 review — drop `as Type` casts in query.ts
cuongdo-byterover May 13, 2026
5eb1a2e
Merge pull request #649 from campfirein/feat/ENG-2815
cuongdo-byterover May 13, 2026
acef8f3
fix: file-context-file-reader extracts metadata from HTML topics (was…
danhdoan May 13, 2026
da76972
docs: [ENG-2822] scrub deprecated LLM-provider references from SKILL.md
cuongdo-byterover May 13, 2026
4447831
Merge pull request #651 from campfirein/feat/ENG-2822
cuongdo-byterover May 13, 2026
f2dcea2
fix: address review feedback on html-context-file-reader
danhdoan May 13, 2026
f8fd27b
Merge branch 'proj/byterover-tool-mode' into fix/html-context-file-re…
danhdoan May 13, 2026
398df7a
Merge pull request #650 from campfirein/fix/html-context-file-reader
danhdoan May 13, 2026
04bf1e8
feat(channel): sync mode + suppressThoughts (Phase 8 Slice 8.0)
ngduyanhece May 13, 2026
9377918
feat(channel): @brv/channel-mcp server (Phase 8 Slice 8.1)
ngduyanhece May 13, 2026
f33fa08
feat(channel): @brv/channel-skill — brv-channel SKILL.md + install CL…
ngduyanhece May 13, 2026
4aa8f0b
feat(channel): Phase-8 pivot — skill-only, delete @brv/channel-mcp
ngduyanhece May 13, 2026
ba2664e
chore(workspaces): drop @brv/channel-mcp registration (Phase-8 pivot)
ngduyanhece May 13, 2026
4c21539
feat: (ENG-2810) editorial topic viewer for bv-* HTML topics
wzlng May 13, 2026
4106bb5
feat(channel): brv channel skill install oclif command (Phase 8 Slice…
ngduyanhece May 14, 2026
597c919
refactor: move topic-viewer to byterover-packages and harden against …
wzlng May 14, 2026
fe61fcb
test: drop extract-text unit test now that helper lives in byterover-…
wzlng May 14, 2026
52ea638
fix(channel): sync-mode timeout coherence + errored-delivery surfacin…
ngduyanhece May 14, 2026
809ac8c
fix(channel): wire Bug 1 transport-timeout fix to the CLI internal cl…
ngduyanhece May 14, 2026
0504bcb
chore: bump byterover-packages
wzlng May 14, 2026
f2cd916
Merge pull request #654 from campfirein/feat/ENG-2810
wzlng May 14, 2026
24da6db
feat: [ENG-2836] MCP brv-query — migrate to query-tool-mode task type
cuongdo-byterover May 14, 2026
f92d07b
feat: [ENG-2837] MCP brv-curate — replace with curate-html-direct (br…
cuongdo-byterover May 14, 2026
b74a2b0
fix: [ENG-2837] address PR #658 review — Windows paths, strict schema…
cuongdo-byterover May 14, 2026
04bc3f6
Merge pull request #658 from campfirein/feat/ENG-2837
cuongdo-byterover May 15, 2026
20c9e1c
Merge branch 'main' into proj/byterover-tool-mode
danhdoan May 15, 2026
eedb17c
fix: address PR #663 review feedback
danhdoan May 15, 2026
68436b1
feat(channel): exclude channel turn artifacts from cogit sync (Slice …
ngduyanhece May 15, 2026
c80ee2d
feat(channel): rich `brv channel --help` onboarding flow (Slice 8.8)
ngduyanhece May 15, 2026
51c6fed
feat(channel): brv channel subscribe — push-model pub/sub (Slice 8.9)
ngduyanhece May 15, 2026
118b695
feat(channel): surface CHANNEL_PERMISSION_LOST_ON_RESTART (Slice 8.10)
ngduyanhece May 16, 2026
5af514e
feat(channel): driver auto-warm + DRIVER_NOT_REGISTERED (Slice 8.11)
ngduyanhece May 16, 2026
59b2bf4
docs(channel): host-LLM orchestration playbook in --help + SKILL (Sli…
ngduyanhece May 17, 2026
a789def
docs(channel): fix quorum-with-exit-on-terminal + unsafe-retry advice…
ngduyanhece May 17, 2026
257b786
docs(channel): shared-constants pattern in SKILL.md (Slice 8.13)
ngduyanhece May 17, 2026
3f00794
feat(channel): move turn transcripts to .brv/channel-history/ (Slice …
ngduyanhece May 17, 2026
0007cdb
feat(channel): held-open per-turn write stream (Slice 9.2)
ngduyanhece May 17, 2026
194646b
feat(channel): per-channel index.jsonl + materialised lookback (Slice…
ngduyanhece May 17, 2026
4f7d5f3
feat(channel): transcript GC sweep + active-turn protection (Slice 9.4)
ngduyanhece May 17, 2026
b1b3ac6
feat(channel): legacy-mount GC + deprecate isChannelTurnArtifact (Sli…
ngduyanhece May 17, 2026
e72d292
fix: ENG-2847 enrich MCP brv-curate description so agent output match…
cuongdo-byterover May 17, 2026
ee46216
fix: ENG-2847 restore structural placement signal in schema slice (Ph…
cuongdo-byterover May 17, 2026
a752930
fix: ENG-2847 reconcile bv-flow with its inline-content contract
cuongdo-byterover May 17, 2026
bec6e40
test(channel): regression test for Bug 1 CLI sync --timeout path (Sli…
ngduyanhece May 17, 2026
c886b39
Merge pull request #665 from campfirein/fix/ENG-2847
cuongdo-byterover May 17, 2026
f180809
fix(channel): codex Phase 9 review-pass (Slice 9.6)
ngduyanhece May 17, 2026
c3b5b1f
fix(channel): codex Phase 9 review deferred items D5 + D6 (Slice 9.7)
ngduyanhece May 17, 2026
847891e
refactor: [ENG-2842] remove provider/LLM/billing surfaces from user-f…
wzlng May 17, 2026
9543033
feat: render curate-html-direct task input/output structurally
wzlng May 17, 2026
eeae6fd
fix: [ENG-2844] drop stale billing-line status tests and restore help…
wzlng May 17, 2026
4b0d7d9
fix: align curate-html-direct error shape with daemon's `kind` discri…
wzlng May 17, 2026
4ec0ba3
Merge pull request #667 from campfirein/feat/ENG-2844
wzlng May 18, 2026
573de33
feat(channel): Phase 10 Tier 1 — agent quorum + cold-start race fix
ngduyanhece May 18, 2026
368b00f
feat(channel): Phase 10 Slice 10.5 — latency-grouped parallel pools
ngduyanhece May 18, 2026
acce794
feat(channel): Slice 10.5 CLI surface — --pool-mode + per-pool timeouts
ngduyanhece May 18, 2026
c52fb4a
feat(channel): Phase 10 Slice 10.6 — strength profiles + tag-based ma…
ngduyanhece May 18, 2026
ab1eb90
feat(channel): Phase 10 Slice 10.7 Phase A — persistent quorum store …
ngduyanhece May 18, 2026
005df78
Merge remote-tracking branch 'origin/main' into proj/channel-protocol
ngduyanhece May 18, 2026
792a1ab
feat: [ENG-2851] add curate response envelope to restore HITL for too…
RyanNg1403 May 18, 2026
c823827
fix: [ENG-2851] seed review-backup before destructive tool-mode curat…
RyanNg1403 May 18, 2026
7ee32ab
fix: [ENG-2851] reformat ternary, add e2e restore-on-reject guardrail…
RyanNg1403 May 18, 2026
56497a6
Merge pull request #671 from campfirein/feat/ENG-2851
cuongdo-byterover May 18, 2026
19d1552
fix(channel): Phase 10 Tier A — protocol-layer fixes from V6 evaluation
ngduyanhece May 18, 2026
82e1045
feat(channel): Phase 10 Tier B1 — permission-quorum deadlock fixes fr…
ngduyanhece May 18, 2026
3884e7f
feat(channel): Phase 10 Tier B2 — auto-approve empty-oldText Edit as …
ngduyanhece May 18, 2026
01ae634
fix(channel): Tier B2 — apply codex F1–F5 review findings
ngduyanhece May 18, 2026
6abe7e4
feat(channel): Phase 10 Tier B3 — per-profile drift telemetry + SKILL…
ngduyanhece May 18, 2026
7e334f9
feat(channel): Phase 10 Tier C — auto-idempotency + per-driver varian…
ngduyanhece May 18, 2026
d4aeace
feat(trust): Phase 9 Slice 9.1a — JCS canonicalization + domain-separ…
ngduyanhece May 18, 2026
e3a2690
feat(trust): Phase 9 Slice 9.1a-2 — libp2p PeerID derivation + L1 ins…
ngduyanhece May 18, 2026
64f2e14
feat(channel): Phase 9 Slice 9.1b — bridge config + libp2p host boots…
ngduyanhece May 19, 2026
aeb9566
feat(trust): Phase 9 Slice 9.2 — TOFU pinning over `/brv/identity/cer…
ngduyanhece May 19, 2026
9ee0783
feat(trust): Phase 9 Slice 9.3a-b — Parley envelope types + PeerTreeC…
ngduyanhece May 19, 2026
4fa50d0
feat(channel): Phase 9 Slice 9.3c-f — `/brv/parley/query/v1` wire lay…
ngduyanhece May 19, 2026
f736535
fix(channel): Slice 9.3 — apply kimi round-1 findings (error-terminal…
ngduyanhece May 19, 2026
8797880
chore: sync main v3.14.0
danhdoan May 19, 2026
167c6d0
feat(channel): Slice 9.3-prelude — `brv bridge {listen,pin,ping}` CLI…
ngduyanhece May 19, 2026
e121e2c
fix(channel): Slice 9.3-prelude CLI — apply kimi round-1 findings
ngduyanhece May 19, 2026
d98049e
feat(channel): Phase 9 Slice 9.4a — remote-peer channel member + Remo…
ngduyanhece May 19, 2026
8a10466
fix(channel): Slice 9.4a — apply kimi round-1 findings
ngduyanhece May 19, 2026
d029696
feat(channel): Phase 9 Slice 9.4b — daemon-integrated bridge listener…
ngduyanhece May 19, 2026
fa37bbb
fix(channel): Slice 9.4b — apply kimi round-1 findings
ngduyanhece May 19, 2026
ab5765b
fix(channel): Slice 9.4b — apply kimi round-2 findings (polish)
ngduyanhece May 19, 2026
df15afe
feat(channel): Phase 9 Slice 9.4c — real ACP dispatch on Bob's side v…
ngduyanhece May 19, 2026
65788d9
fix(channel): Slice 9.4c — apply kimi round-1 findings
ngduyanhece May 19, 2026
09751c8
feat(channel): Phase 9 Slice 9.4d — in-band L2 cert discovery (`--l2-…
ngduyanhece May 19, 2026
dd585b4
fix(channel): Slice 9.4d — apply kimi round-1 findings
ngduyanhece May 19, 2026
588379a
feat(channel): Phase 9 Slice 9.4e — Bob-side transcript persistence +…
ngduyanhece May 19, 2026
9f36102
fix(channel): Slice 9.4e — apply kimi round-1 findings
ngduyanhece May 19, 2026
0a49cdc
fix(channel): Slice 9.4e — apply kimi round-2 findings
ngduyanhece May 19, 2026
38dedda
feat(channel): Phase 9 Slice 9.4f — profile-keyed warm driver pool + …
ngduyanhece May 19, 2026
6a9b256
feat: [ENG-2858] wire runtime-signal sidecar in tool-mode curate writ…
RyanNg1403 May 19, 2026
70213b9
fix(channel): Slice 9.4f — apply kimi round-1 findings
ngduyanhece May 19, 2026
aeb5801
fix: [ENG-2858] address PR review feedback on sidecar wiring
RyanNg1403 May 19, 2026
034bdb8
feat(channel): Phase 9 Slice 9.4g — `brv bridge verify` promotes auto…
ngduyanhece May 19, 2026
6c5f451
fix: [ENG-2858] drop read-side sidecar wraps to avoid double-counting
RyanNg1403 May 19, 2026
0c5ca2b
fix(channel): Slice 9.4g — apply kimi round-1 findings
ngduyanhece May 19, 2026
74b0363
fix(channel): Slice 9.4g — apply kimi round-2 findings
ngduyanhece May 19, 2026
88b5c99
Merge pull request #677 from campfirein/feat/ENG-2858-sidecar
danhdoan May 19, 2026
9ee724c
Merge branch 'main' into proj/byterover-tool-mode
danhdoan May 19, 2026
c1d4b3c
feat(channel): Phase 9 Slice 9.4h — persist L2 cert expiry alongside …
ngduyanhece May 19, 2026
f133dfa
fix(channel): Slice 9.4h — apply kimi round-1 findings
ngduyanhece May 19, 2026
47c9405
feat(channel): Phase 9 Slice 9.4i — refresh remote L2 pubkey at orche…
ngduyanhece May 19, 2026
b075d24
feat(channel): Phase 9 Slice 9.10 — extractable transcript-seal auditor
ngduyanhece May 19, 2026
8fe1efc
feat(channel): Phase 9 Slice 9.11 — remote-peer diagnostics for brv c…
ngduyanhece May 19, 2026
1043880
fix(channel): Slice 9.10 — apply kimi round-1 findings
ngduyanhece May 19, 2026
7e6e04b
feat(channel): Phase 9 Slice 9.5 — local alias store + brv alias add/…
ngduyanhece May 19, 2026
9d1c1e7
fix(channel): Slice 9.11 — apply kimi round-1 findings
ngduyanhece May 19, 2026
7254e2b
fix(channel): Slice 9.5 — apply kimi round-1 findings
ngduyanhece May 19, 2026
c2e7def
feat(channel): Phase 9 Slices 9.6 + 9.7 — peer-multiaddr resolver + r…
ngduyanhece May 19, 2026
f3e6d93
feat(channel): Phase 9 Slices 9.8 + 9.9 — NAT-traversal config + dele…
ngduyanhece May 19, 2026
fa57241
fix(channel): Slices 9.6 + 9.7 — apply kimi round-1 findings
ngduyanhece May 19, 2026
1269b41
fix(channel): Slices 9.8 + 9.9 — apply kimi round-1 findings
ngduyanhece May 19, 2026
0fb0bb0
Merge remote-tracking branch 'origin/main' into proj/channel-protocol
ngduyanhece May 20, 2026
ce9bc41
Merge remote-tracking branch 'origin/proj/byterover-tool-mode' into p…
ngduyanhece May 20, 2026
75b6c58
fix(channel): Phase 9 bridge — emit heartbeat_ping frames during idle…
ngduyanhece May 20, 2026
975a83d
feat(channel): internal-test prep — persistent bridge config + skip o…
ngduyanhece May 20, 2026
c897ee0
Merge branch 'main' into proj/channel-protocol
ngduyanhece May 20, 2026
a851f62
feat(channel): expose `brv channel uninvite` in INTERNAL_TEST.md + ap…
ngduyanhece May 22, 2026
d5c1e14
fix(channel): real cross-machine bridge — BRV_BRIDGE_LISTEN_ADDRS env…
ngduyanhece May 22, 2026
21f8dbf
feat(channel): Phase 9.5 — parley adapter abstraction + Claude Code a…
ngduyanhece May 23, 2026
21437c5
docs(channel): Phase 9.5 bridge smoothness plan + canonical event-kin…
ngduyanhece May 23, 2026
1e23de6
fix(channel): ClaudeCodeHeadlessAdapter passes --verbose with stream-…
ngduyanhece May 23, 2026
49bc378
docs(channel): INTERNAL_TEST.md — Phase 9.5 setup + Claude Code adapt…
ngduyanhece May 23, 2026
8219e36
Merge remote-tracking branch 'origin/main' into proj/channel-protocol
ngduyanhece May 23, 2026
1abbe7a
fix(channel): Phase 9.5.7 — parley timeout + observability hardening
ngduyanhece May 24, 2026
c4ee113
fix(channel): Phase 9.5.8 — close TRANSCRIPT_TERMINAL_MISSING gap + l…
ngduyanhece May 24, 2026
a9c4762
feat(channel): Phase 9.5.9 — anti-stale-state + channel robustness
ngduyanhece May 24, 2026
0b1a02b
test(channel): add missed Phase 9.5.9 Issue 5 runtime build-info-chec…
ngduyanhece May 24, 2026
9fbc7ac
feat(channel): Phase 9.5.10 — channel meta reconstruction (kimi-flagg…
ngduyanhece May 25, 2026
f08145e
fix(channel): Phase 9.5.11 — exclude /channel/ from VC tracking (vani…
ngduyanhece May 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,12 @@ agent-tmp
!.env.example

# ByteRover's skill for Claude Code
.claude/skills/byterover
.claude/skills/byterover
# Phase-5 adapter SDK packages
packages/agent-sdk/dist/
packages/agent-sdk/node_modules/
packages/brv-agent-py/.venv/
packages/brv-agent-py/dist/
packages/brv-agent-py/build/
packages/brv-agent-py/**/__pycache__/
packages/brv-agent-py/.pytest_cache/
275 changes: 275 additions & 0 deletions INTERNAL_TEST.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ process.env.BRV_ENV = 'development'

// eslint-disable-next-line n/no-unsupported-features/node-builtins
const root = resolve(import.meta.dirname, '..')
loadEnv({path: resolve(root, '.env.development')})
loadEnv({path: resolve(root, '.env.development'), quiet: true})


// Inject default command 'main' (represents logic of a single 'brv' run) when no args provided
Expand Down
67 changes: 67 additions & 0 deletions docs/channel-events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Channel Event Kinds

Reference for canonical `kind` values emitted on the channel event stream.
Used with `brv channel subscribe --kinds <kind1>,<kind2>` (filter to specific
kinds) or `--all-kinds` (capture everything, for diagnostics).

## Quick-reference: turn flavour → relevant kinds

| Turn flavour | Required kinds to capture |
|---|---|
| Local outbound (operator prompt) | `message`, `turn_state_change` |
| ACP-agent response (codex, kimi, etc.) | `agent_message_chunk`, `delivery_state_change`, `turn_state_change` |
| Remote-peer response (bridge parley) | `agent_message_chunk`, `delivery_state_change`, `turn_state_change` |
| Permission gate | `permission_request`, `permission_decision`, `delivery_state_change` |
| Channel auto-created by bridge | `channel_auto_created` |

**Common mistake:** subscribing with `--kinds message,delivery_state_change`
for an inbound remote-peer flow will capture zero events because the response
body is streamed as `agent_message_chunk`, not `message`. The terminal event
is `turn_state_change` (turn-level), not `delivery_state_change` (member-level).

## Event kind table

| Kind | When emitted | Source | Payload key fields |
|---|---|---|---|
| `message` | Operator prompt posted via `brv channel mention` | Local outbound | `content`, `role: 'user'`, `turnId`, `seq` |
| `agent_message_chunk` | Streaming LLM/agent text delta | Local ACP agent OR inbound remote-peer | `content`, `deliveryId`, `memberHandle`, `seq` |
| `agent_thought_chunk` | Streaming agent internal thought (visible in verbose mode) | Local ACP agent | `content`, `deliveryId`, `memberHandle`, `seq` |
| `tool_call` | Agent begins a tool call | Local ACP agent | `toolName`, `callId`, `deliveryId`, `seq` |
| `tool_call_update` | Tool call result appended | Local ACP agent | `callId`, `output`, `status`, `seq` |
| `agent_meta` | Agent emits structured metadata (model, version, etc.) | Local ACP agent | `meta`, `deliveryId`, `seq` |
| `permission_request` | Agent requests operator approval for a sensitive action | Local ACP agent | `permissionRequestId`, `toolName`, `toolCall`, `deliveryId`, `seq` |
| `permission_decision` | Operator approves or denies a permission request | Operator action | `permissionRequestId`, `decision`, `seq` |
| `plan` | Agent emits a structured task plan | Local ACP agent | `plan`, `deliveryId`, `seq` |
| `artifact` | Agent emits a structured artifact (file, code block, etc.) | Local ACP agent | `artifact`, `deliveryId`, `seq` |
| `delivery_state_change` | A single member's delivery moves to a new state | Local ACP agent, remote-peer response | `deliveryId`, `memberHandle`, `state`, `seq` |
| `turn_state_change` | The overall turn transitions to a new state | Any terminal delivery | `state` (`completed`/`cancelled`/`errored`), `seq` |
| `channel_auto_created` | Bob's daemon auto-created a mirror channel for an inbound parley | Bridge inbound (§9.5.4) | `channelId`, `autoProvisionedFrom`, `autoProvisionedAt`, `multiaddr`, `addressability`, `seq` |

## Delivery states (for `delivery_state_change`)

`queued` → `dispatched` → `streaming` → `completed` | `cancelled` | `errored`

A delivery in `awaiting_permission` means the agent is paused waiting for an
operator decision; use `brv channel approve/deny` to resume it.

## Subscribing for common use-cases

**Wait for any turn to finish:**
```bash
brv channel subscribe <channel> --exit-on-terminal
```

**Wait for a specific agent to finish:**
```bash
brv channel subscribe <channel> --roles @codex --kinds delivery_state_change --count 1
```

**Capture everything for diagnostics:**
```bash
brv channel subscribe <channel> --all-kinds --json
```

**React to auto-created channels (bridge operators):**
```bash
brv channel subscribe <channel> --kinds channel_auto_created
```
177 changes: 177 additions & 0 deletions docs/curate-protocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# `brv curate` tool-mode session protocol

The session protocol lets a calling agent (Claude Code, Cursor, etc.) drive `brv curate` without byterover holding any LLM provider config. ByteRover orchestrates the multi-step flow; the calling agent supplies LLM completions across multiple CLI invocations.

This document defines the wire contract: CLI surface, JSON envelope, lifecycle. SKILL.md authors and other tool consumers key off the shapes documented here.

## CLI surface

### Kickoff

```bash
brv curate "<user intent>" --format json
```

Tool mode is the only path for `brv curate` — no provider configuration, no env-var opt-in.

### Continuation — `--session` carries the prior call's id

```bash
brv curate --session <sessionId> --response "<calling agent's output>" --format json
```

Presence of `--session` resumes an in-flight session created by a prior kickoff.

### Overwrite intent — `--overwrite` on continuation

```bash
brv curate --session <sessionId> --response "<calling agent's output>" --overwrite --format json
```

Default behavior: the writer refuses to clobber an existing topic at the resolved path and returns a `path-exists` correction step carrying the prior file's content. Pass `--overwrite` only when the calling agent has consciously decided to replace prior content. The flag is consumed on the continuation it appears on; subsequent continuations in the same session must repeat it if they still want to overwrite.

### `--format text` fallback

Both kickoff and continuation accept `--format text` for shell users. The output is a terse human digest. The primary consumer (the calling agent) uses `--format json`.

## Wire envelope

Every kickoff and continuation call returns the same JSON envelope under the standard CLI wrapper:

```json
{
"command": "curate",
"success": <ok>,
"data": {
"ok": <bool>,
"status": "done" | "needs-llm-step" | "failed",
"sessionId": "<uuid>", // present on needs-llm-step AND on transient failed (see below)
"step": "generate-html" | "correct-html",
"prompt": "<free-text>", // free-text instruction for the calling agent's LLM
"schema": { ... }, // optional per-step schema slice
"errors": [ // present on correct-html and on failed
{
"kind": "<machine-readable>",
"tag": "<bv-element>?",
"attribute": "<attribute-name>?",
"message": "<human-readable>"
}
],
"filePath": "<relative-path>" // relative to .brv/context-tree/; present when status = done
},
"timestamp": "<iso>"
}
```

### Status values

| `status` | Meaning | Next action for calling agent |
|---|---|---|
| `needs-llm-step` | Byterover wants an LLM completion. `prompt` + `step` describe what. | Run the calling agent's own LLM on `prompt`, then `brv curate --session <sessionId> --response "<output>"`. |
| `done` | Curate complete. `filePath` is the location of the written topic. | Report success to user. Session is cleaned up. |
| `failed` | Terminal error. `errors[]` explains why. | Report failure to user; abandon session. |

### `step` values (when `status === 'needs-llm-step'`)

| `step` | Meaning | Expected `--response` payload |
|---|---|---|
| `generate-html` | First call asking the calling agent to author a `<bv-topic>` document. | The generated HTML. |
| `correct-html` | A previous response failed validation. `errors[]` enumerates what to fix. | Corrected HTML. |

### Error `kind` values

| `kind` | Lifecycle | Terminal? | Notes |
|---|---|---|---|
| `missing-content` | Kickoff | **terminal** | Kickoff invoked without a context argument; no session created |
| `missing-response` | Continuation | **terminal** | `--session` invoked without `--response`; session unaffected |
| `invalid-flag-combination` | Continuation | **terminal** | Emitted before any session lookup when a flag is used outside its supported call shape. Today the only producer is `--overwrite` passed without `--session` (legacy curate path does not honour `--overwrite`). |
| `unknown-session` | Continuation | **terminal** | Session id doesn't exist, was already completed, or fails uuid validation |
| `empty-response` | Continuation | **transient** (session kept live) | Continuation received an empty `--response`; caller retries with the same `sessionId` |
| `retry-cap-exceeded` | Continuation | **terminal** | `MAX_ATTEMPTS = 4` (1 generate + 3 corrections) reached without valid HTML; session cleared. Accompanied by the validation errors that pushed the session over the cap. |
| `missing-bv-topic` | Continuation | **transient** (correction) | Response had zero `<bv-topic>` root elements |
| `multiple-bv-topic` | Continuation | **transient** (correction) | Response had more than one `<bv-topic>` root |
| `missing-path-attribute` | Continuation | **transient** (correction) | `<bv-topic>` is missing a non-empty `path` attribute |
| `unsafe-path` | Continuation | **transient** (correction) | `<bv-topic path>` contains `..` or `.` segments |
| `unknown-element` | Continuation | **transient** (correction) | Response contains a `<bv-*>` tag outside the closed registry; `tag` field carries the offending name |
| `attribute-validation` | Continuation | **transient** (correction) | An element's attributes failed its registered validator. `tag` carries the element, `attribute` the offending field. |
| `path-exists` | Continuation | **transient** (correction) | A topic already exists at the resolved path and `--overwrite` was not passed. The envelope error carries `existingContent` (the prior file's bytes); the correction prompt inlines the same content inside an `<existing-topic path="…">…</existing-topic>` block so the calling agent can merge new content into existing structure. The guard does not clear by re-emitting different content — `--overwrite` is required to write at this path. Default workflow: merge `existingContent` with the new content and re-emit with `--overwrite`. Alternative: choose a different `<bv-topic path>` (no `--overwrite` needed). |

**Terminal vs transient.** Terminal failures end the session — the caller cannot retry the same `sessionId` and must start a new kickoff. Transient failures keep the session alive on disk; the envelope echoes the `sessionId` back and the caller is expected to issue a corrected continuation against it.

**Retry cap.** Each transient correction increments an internal `attempts` counter on the session. After `MAX_ATTEMPTS = 4` consecutive invalid responses (the initial generate plus three corrections) the orchestrator terminates with `retry-cap-exceeded` and clears the session. Calling agents should surface this as "I couldn't produce valid HTML after several attempts; want to try a different framing?".

Calling agents should switch on `kind`, fall back gracefully on unknown kinds, and surface the `message` text to the user.

## Lifecycle — worked example

A complete tool-mode curate session, end-to-end:

### 1. Kickoff

```bash
brv curate "remember we decided to use RS256" --format json
```

Response (placeholder):

```json
{
"command": "curate",
"success": true,
"data": {
"ok": true,
"status": "needs-llm-step",
"sessionId": "8c3f9e2a-...",
"step": "generate-html",
"prompt": "Generate a <bv-topic>...</bv-topic> HTML document for the following user intent:\n\nremember we decided to use RS256\n\n..."
},
"timestamp": "2026-05-11T12:00:00.000Z"
}
```

### 2. Calling agent's LLM produces HTML

```html
<bv-topic path="security/auth" title="JWT signing algorithm">
<bv-decision id="d-rs256">Use RS256 over HS256.</bv-decision>
</bv-topic>
```

### 3. Continuation

```bash
brv curate --session 8c3f9e2a-... --response "<bv-topic ...>...</bv-topic>" --format json
```

Response on a valid HTML topic:

```json
{
"command": "curate",
"success": true,
"data": {
"ok": true,
"status": "done",
"filePath": "security/auth.html"
},
"timestamp": "2026-05-11T12:00:01.000Z"
}
```

If validation fails (e.g. the agent forgot `path=` on `<bv-topic>`), the envelope instead carries `status: "needs-llm-step"`, `step: "correct-html"`, and `errors[]` for the calling agent to fix. Up to 3 corrections (MAX_ATTEMPTS = 4 total) before terminal `status: "failed"` with `kind: retry-cap-exceeded`.

## Session storage

CLI-side. Per-project, on disk at `<projectRoot>/.brv/sessions/curate-<sessionId>/state.json`. State carries `attempts`, `step` (`awaiting-generate` vs `awaiting-correct`), and the last response (for the correction prompt). State is removed when the session reaches terminal `done` or terminal `failed` (including `retry-cap-exceeded`).

Abandoned sessions are not yet pruned — a 1-hour TTL is a planned follow-up that pairs with moving state into the daemon's existing task-session lifecycle.

## Stability promise

SKILL.md ships against this envelope, so renaming any key here is a breaking change. New error kinds and new step values can be added without breaking existing consumers — calling agents are expected to gracefully ignore unknown values.

## What's not the protocol's job

- **HTML generation.** Calling agent's LLM authors the HTML per the `prompt`. Byterover never touches an LLM in tool mode.
- **Schema knowledge.** Embedded in the `prompt` (the prompt builder condenses the bv-* spec). Calling agent doesn't pre-load any schema.
- **Retry strategy beyond the protocol's correct-html loop.** If the calling agent's LLM keeps producing invalid HTML for 3 rounds, the session terminates `failed` — the calling agent surfaces this and falls back to asking the user for clarification.
6 changes: 6 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ const gitignorePath = path.resolve(path.dirname(fileURLToPath(import.meta.url)),

export default [
includeIgnoreFile(gitignorePath),
// Phase-5 monorepo packages (agent-sdk, brv-agent-py) + the byterover-packages
// submodule have their own toolchains + ESLint configs (referencing
// @workspace/* packages) — skip them from the root lint run.
{
ignores: ['packages/**'],
},
...oclif,
prettier,
{
Expand Down
Loading
Loading