Skip to content

Add claude md for 1.1.x#1131

Closed
toubatbrian wants to merge 67 commits intomainfrom
brian/claude-md
Closed

Add claude md for 1.1.x#1131
toubatbrian wants to merge 67 commits intomainfrom
brian/claude-md

Conversation

@toubatbrian
Copy link
Contributor

No description provided.

lukasIO and others added 30 commits January 16, 2026 15:33
Co-authored-by: Brian Yin <57741529+Toubat@users.noreply.github.com>
Co-authored-by: Brian Yin <57741529+Toubat@users.noreply.github.com>
Remove baseUrl and useProxy from interruptionOptionDefaults so they
are resolved dynamically in the constructor. Previously, the defaults
pre-populated baseUrl with the cloud inference URL, which prevented
the LIVEKIT_REMOTE_EOT_URL environment variable from being used.
@changeset-bot
Copy link

changeset-bot bot commented Mar 14, 2026

⚠️ No Changeset found

Latest commit: 74759ff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 14 potential issues.

View 3 additional findings in Devin Review.

Open in Devin Review

@@ -0,0 +1,136 @@
# CLAUDE.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing SPDX license header on new file CLAUDE.md (root)

The root CLAUDE.md is a new file but lacks the SPDX license header required by CONTRIBUTING.md ("When creating a new file, make sure to add SPDX headers for REUSE-3.2 compliance") and by the CLAUDE.md Code Conventions section itself. All existing markdown files in the repo (e.g., CONTRIBUTING.md:1-5, README.md:1-5, CODE_OF_CONDUCT.md:1-5) include an HTML-comment SPDX header. Additionally, REUSE.toml has no annotation covering **/CLAUDE.md, so these files will fail the REUSE/SPDX CI check.

Prompt for agents
Add SPDX license headers to all 14 new CLAUDE.md files. Each file should start with:

<!--
SPDX-FileCopyrightText: 2026 LiveKit, Inc.

SPDX-License-Identifier: Apache-2.0
-->

before the existing # CLAUDE.md heading.

The affected files are:
- CLAUDE.md
- agents/src/inference/CLAUDE.md
- agents/src/ipc/CLAUDE.md
- agents/src/llm/CLAUDE.md
- agents/src/metrics/CLAUDE.md
- agents/src/stream/CLAUDE.md
- agents/src/stt/CLAUDE.md
- agents/src/telemetry/CLAUDE.md
- agents/src/tokenize/CLAUDE.md
- agents/src/tts/CLAUDE.md
- agents/src/voice/CLAUDE.md
- agents/src/voice/room_io/CLAUDE.md
- agents/src/voice/transcription/CLAUDE.md
- agents/src/voice/turn_config/CLAUDE.md

Alternatively, add a REUSE.toml annotation entry:

[[annotations]]
path = ["**/CLAUDE.md"]
SPDX-FileCopyrightText = "2026 LiveKit, Inc."
SPDX-License-Identifier = "Apache-2.0"

Either approach satisfies REUSE-3.2 compliance. Using both (inline header + REUSE.toml) follows the pattern used for README.md files.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@@ -0,0 +1,21 @@
# CLAUDE.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing SPDX license header on new file agents/src/inference/CLAUDE.md

New file lacks the SPDX license header required by CONTRIBUTING.md and CLAUDE.md Code Conventions. Not covered by any REUSE.toml annotation either, which will fail the REUSE/SPDX CI check.

Suggested change
# CLAUDE.md
<!--
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
SPDX-License-Identifier: Apache-2.0
-->
# CLAUDE.md
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@@ -0,0 +1,22 @@
# CLAUDE.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing SPDX license header on new file agents/src/ipc/CLAUDE.md

New file lacks the SPDX license header required by CONTRIBUTING.md and CLAUDE.md Code Conventions. Not covered by any REUSE.toml annotation either, which will fail the REUSE/SPDX CI check.

Suggested change
# CLAUDE.md
<!--
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
SPDX-License-Identifier: Apache-2.0
-->
# CLAUDE.md
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@@ -0,0 +1,36 @@
# CLAUDE.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing SPDX license header on new file agents/src/llm/CLAUDE.md

New file lacks the SPDX license header required by CONTRIBUTING.md and CLAUDE.md Code Conventions. Not covered by any REUSE.toml annotation either, which will fail the REUSE/SPDX CI check.

Suggested change
# CLAUDE.md
<!--
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
SPDX-License-Identifier: Apache-2.0
-->
# CLAUDE.md
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@@ -0,0 +1,14 @@
# CLAUDE.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing SPDX license header on new file agents/src/metrics/CLAUDE.md

New file lacks the SPDX license header required by CONTRIBUTING.md and CLAUDE.md Code Conventions. Not covered by any REUSE.toml annotation either, which will fail the REUSE/SPDX CI check.

Suggested change
# CLAUDE.md
<!--
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
SPDX-License-Identifier: Apache-2.0
-->
# CLAUDE.md
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@@ -0,0 +1,22 @@
# CLAUDE.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing SPDX license header on new file agents/src/tts/CLAUDE.md

New file lacks the SPDX license header required by CONTRIBUTING.md and CLAUDE.md Code Conventions. Not covered by any REUSE.toml annotation either, which will fail the REUSE/SPDX CI check.

Suggested change
# CLAUDE.md
<!--
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
SPDX-License-Identifier: Apache-2.0
-->
# CLAUDE.md
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@@ -0,0 +1,36 @@
# CLAUDE.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing SPDX license header on new file agents/src/voice/CLAUDE.md

New file lacks the SPDX license header required by CONTRIBUTING.md and CLAUDE.md Code Conventions. Not covered by any REUSE.toml annotation either, which will fail the REUSE/SPDX CI check.

Suggested change
# CLAUDE.md
<!--
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
SPDX-License-Identifier: Apache-2.0
-->
# CLAUDE.md
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@@ -0,0 +1,23 @@
# CLAUDE.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing SPDX license header on new file agents/src/voice/room_io/CLAUDE.md

New file lacks the SPDX license header required by CONTRIBUTING.md and CLAUDE.md Code Conventions. Not covered by any REUSE.toml annotation either, which will fail the REUSE/SPDX CI check.

Suggested change
# CLAUDE.md
<!--
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
SPDX-License-Identifier: Apache-2.0
-->
# CLAUDE.md
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@@ -0,0 +1,23 @@
# CLAUDE.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing SPDX license header on new file agents/src/voice/transcription/CLAUDE.md

New file lacks the SPDX license header required by CONTRIBUTING.md and CLAUDE.md Code Conventions. Not covered by any REUSE.toml annotation either, which will fail the REUSE/SPDX CI check.

Suggested change
# CLAUDE.md
<!--
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
SPDX-License-Identifier: Apache-2.0
-->
# CLAUDE.md
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@@ -0,0 +1,25 @@
# CLAUDE.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Missing SPDX license header on new file agents/src/voice/turn_config/CLAUDE.md

New file lacks the SPDX license header required by CONTRIBUTING.md and CLAUDE.md Code Conventions. Not covered by any REUSE.toml annotation either, which will fail the REUSE/SPDX CI check.

Suggested change
# CLAUDE.md
<!--
SPDX-FileCopyrightText: 2026 LiveKit, Inc.
SPDX-License-Identifier: Apache-2.0
-->
# CLAUDE.md
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Base automatically changed from feat/barge-in to main March 19, 2026 15:36
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 8 additional findings in Devin Review.

Open in Devin Review

Comment on lines +335 to +337
if (event === AgentSessionEventTypes.MetricsCollected) {
this._usageCollector.collect((eventData as MetricsCollectedEvent).metrics);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Double-collection of usage metrics causes all token/duration counts to be doubled

The new emit override in agent_session.ts:335-337 calls this._usageCollector.collect() on every MetricsCollected event. However, agent_activity.ts already calls this.agentSession._usageCollector.collect(ev) directly before emitting the same event at agent_activity.ts:732 and agent_activity.ts:159. Since ModelUsageCollector.collect() accumulates values (e.g., usage.inputTokens += metrics.promptTokens at agents/src/metrics/model_usage.ts:203), every metric is now added twice — once by the direct call and once by the emit intercept. This doubles all reported usage: token counts, audio durations, character counts, request counts, and session durations. The doubled data is exposed via session.usage, streamed to clients in client_events.ts:526-530, and used in session reports.

Prompt for agents
In agents/src/voice/agent_session.ts, the emit() override at lines 335-337 adds a second call to _usageCollector.collect() for MetricsCollected events, but agent_activity.ts already calls _usageCollector.collect() directly before emitting (at agent_activity.ts:732 and agent_activity.ts:159). Choose one approach:

Option A (recommended): Remove the direct _usageCollector.collect() calls in agent_activity.ts (lines 159 and 732), and let the emit override in agent_session.ts be the single collection point. This centralizes the logic.

Option B: Remove the new collect() call in the emit override (lines 335-337 of agent_session.ts), keeping the existing direct calls in agent_activity.ts as the sole collection point.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

3 participants