Skip to content

Add Claude Console plugin#73

Merged
andrewmumblebee merged 10 commits into
mainfrom
work/ah/claude-console
Jun 30, 2026
Merged

Add Claude Console plugin#73
andrewmumblebee merged 10 commits into
mainfrom
work/ah/claude-console

Conversation

@andrewmumblebee

@andrewmumblebee andrewmumblebee commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🔌 Plugin overview

  • Plugin name: Claude Console
  • Purpose / problem solved: Monitors a Claude Console (Anthropic) organization in SquaredUp — token usage and USD cost (by model, workspace, API key, member, service tier and context window, over time) plus the org's workspaces, API keys, and members as graph objects. Lets teams track and attribute Claude API spend/usage and audit keys & access alongside the rest of their estate.
  • Primary audience: Platform/engineering teams, FinOps/finance, and org admins managing Anthropic API spend and access.
  • Authentication method(s): API Key — an Anthropic Admin API key (sk-ant-admin…) sent via the x-api-key header (with a static anthropic-version header) against https://api.anthropic.com. Validated on setup via GET /v1/organizations/me.

🖼️ Plugin screenshots

Plugin configuration

image image image

Default dashboards

image image image image

🧪 Testing

Built and tested end-to-end against a live, authenticated tenant (not just file validation):

  • Auth: deployed the shell, authenticated a real Admin API key, and confirmed the configValidation probe (GET /v1/organizations/me) returns 200.
  • Import: first import succeeded cleanly — 6 workspaces, 20 API keys, 2 members received and written; all three object types confirmed in the graph via squaredup objects.
  • Data streams (each tested live via squaredup test):
    • usage — flattens the nested data[].results[] time-buckets into rows; auto-selects bucket_width (1m/1h/1d) from the timeframe and sizes limit to stay within the API's per-bucket caps; bracketed array params (group_by[], workspace_ids[], api_key_ids[], account_ids[]) verified in the resolved request URL.
    • cost — daily USD; amount unit verified empirically by computing implied $/token against Claude's published list prices — they match exactly only when amount is treated as cents (/100), catching a would-be 100× error.
    • workspaces / apiKeys / members — return one flat row per object; double-as import streams and visible dashboard tables; optional API-side scope filters (workspace_id, created_by_user_id) tested with a two-object proof.
  • Default content: 4 OOB dashboards build and squaredup validate passes clean (data streams, import definition, UI, icon, default content, config validation, custom types all present).

⚠️ Known limitations

  • Admin/organization access required. Individual accounts and Claude Enterprise (claude.ai) organizations are not supported (Enterprise uses a different Analytics API/key); the programmatic Usage & Cost API is also not available on Claude Platform on AWS.
  • Cost is daily-granularity only, so cost timeframes are limited to ≤ ~31 days (last 7/30 days, this/last month) — no quarter/year.
  • Usage timeframes are capped by the API's per-response bucket limits (31 daily / 168 hourly / 1440 minute), so usage is likewise limited to ≤ ~31-day ranges.
  • Default-workspace / Workbench usage is reported by the API with a null workspace/API-key, it also can't be used in some apis to filter by, so we have to do it via the postRequestScript
  • Priority Tier costs are billed separately and are not in the Cost API (track via token usage instead).
  • Large orgs (>1000 of any object type) would have the remainder omitted from import.
  • Read-only — the plugin never creates, modifies, or deletes any Anthropic resources.

🔮 Future work

This does not query individual workspace settings, i.e. to list what skills, files, models, and managed agents are on a workspace.

This can come in an updated version of the plugin, but requires us to get the user to provide individual api keys for each workspace they want to access so we can see their details.

Similar to the Sanity plugin with how it handles dataset queries (Although that is blocked by needing dependant imports)


📚 Checklist

  • Plugin, datastream and UI naming follow SquaredUp guidelines
  • Logo added
  • One or more dashboards added
  • README added including configuration guidance
  • No secrets or credentials included
  • I agree to the Code of Conduct

Summary by CodeRabbit

  • New Features
    • Added Claude Console monitoring with new default dashboards for Overview, Workspaces, API Keys, and Members.
    • Introduced new Claude Console data streams for workspaces, members, API keys, token usage, and cost, including workspace scoping and normalized metrics for visualizations.
  • Documentation
    • Added plugin documentation describing setup, authentication/connection validation behavior, available dashboards, indexed objects, and documented limitations.

The APIs generally do not allow filtering by the default workspace, so we have to use scripts to enable this
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The head commit changed during the review from 679085d to 597a743.

📝 Walkthrough

Walkthrough

Claude Console v1 adds plugin metadata, required Admin API key configuration and validation, object type and scope definitions, data streams for organization data, spend, usage, API keys, default dashboards, index mappings, and documentation.

Changes

Claude Console v1 plugin rollout

Layer / File(s) Summary
Plugin contract and scope definitions
plugins/ClaudeConsole/v1/metadata.json, plugins/ClaudeConsole/v1/ui.json, plugins/ClaudeConsole/v1/custom_types.json, plugins/ClaudeConsole/v1/defaultContent/scopes.json
Claude Console metadata, the required adminApiKey field, custom types, and scope variables are added.
Auth check and core object streams
plugins/ClaudeConsole/v1/configValidation.json, plugins/ClaudeConsole/v1/dataStreams/organization.json, plugins/ClaudeConsole/v1/dataStreams/workspaces.json, plugins/ClaudeConsole/v1/dataStreams/scripts/workspaces.js, plugins/ClaudeConsole/v1/dataStreams/members.json
Authenticate validation checks the organization stream, and the organization, workspace, and member streams are added; the workspace script appends a default workspace row.
API key stream and index mappings
plugins/ClaudeConsole/v1/dataStreams/apiKeys.json, plugins/ClaudeConsole/v1/dataStreams/scripts/apiKeys.js, plugins/ClaudeConsole/v1/indexDefinitions/default.json
The API key stream adds workspace-scoped filtering and row normalization, and the index definitions map workspaces, API keys, and members.
Cost report stream
plugins/ClaudeConsole/v1/dataStreams/cost.json, plugins/ClaudeConsole/v1/dataStreams/scripts/cost.js
The cost report stream requests bucketed spend data, flattens bucket results into rows, converts amounts from cents, and filters rows by selected workspace.
Usage report stream
plugins/ClaudeConsole/v1/dataStreams/usage.json, plugins/ClaudeConsole/v1/dataStreams/scripts/usage.js
The usage report stream requests bucketed token data, flattens nested results into rows, computes total_tokens, and filters rows by selected workspace.
Overview dashboard
plugins/ClaudeConsole/v1/defaultContent/overview.dash.json
The Overview dashboard adds summary tiles, cost analysis charts, token usage charts, and an API keys table.
Workspace, API key, and member dashboards
plugins/ClaudeConsole/v1/defaultContent/workspace.dash.json, plugins/ClaudeConsole/v1/defaultContent/apiKey.dash.json, plugins/ClaudeConsole/v1/defaultContent/member.dash.json, plugins/ClaudeConsole/v1/defaultContent/manifest.json
The workspace, API key, and member dashboards are added, and the manifest registers overview, workspace, apiKey, and member.
Plugin documentation
plugins/ClaudeConsole/v1/docs/README.md
The README documents prerequisites, validation behavior, indexed object types, monitored data, and limitations.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: adding the Claude Console plugin.
Description check ✅ Passed The description is detailed and includes overview, screenshots, testing, limitations, and checklist items for the new plugin.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@andrewmumblebee andrewmumblebee added the new-plugin Used to PR newly added plugins label Jun 23, 2026
@andrewmumblebee andrewmumblebee marked this pull request as ready for review June 25, 2026 10:27
@andrewmumblebee andrewmumblebee requested a review from a team June 25, 2026 10:27
@andrewmumblebee

Copy link
Copy Markdown
Contributor Author

@clarkd something to consider, is what this plugin should be called.

As mentioned, this only api key usage data, not users using Claude Teams/Pro or Enterprise.
They all have different methods of monitoring, this is specifically for monitoring applications that use Claude's models.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 10

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/ClaudeConsole/v1/dataStreams/scripts/workspaces.js`:
- Line 7: The workspace import logic is spreading data.data directly into
result, which can throw if the response body is missing the array or it is
empty. Update the workspaces handling in the scripts/workspaces.js flow to
safely guard the spread in the data.data path, using a fallback empty array or a
presence check before building result. Keep the fix localized around the result
assignment so the import degrades gracefully when the response shape is
unexpected.

In `@plugins/ClaudeConsole/v1/dataStreams/usage.json`:
- Around line 174-188: The usage report schema includes dimensions that will
always be empty with the current grouping, so fix the data definition in
usage.json by either adding service_tier, context_window, and account_id to the
report’s group_by configuration or removing those columns from the selected
fields. Use the existing usage report dimension definitions around service_tier,
context_window, and account_id to align the columns with the grouping behavior
so only non-null fields are exposed.

In `@plugins/ClaudeConsole/v1/dataStreams/workspaces.json`:
- Around line 48-52: The archived_at field is declared with the wrong shape in
the workspaces JSON schema, so it won’t be treated as a date in the UI. Update
the archived_at entry in workspaces.json to use shape: "date", matching the
created_at field and other ISO 8601 date-time values. Keep the change scoped to
the archived_at schema definition so sorting/parsing behavior is corrected
without affecting other fields.

In `@plugins/ClaudeConsole/v1/defaultContent/apiKey.dash.json`:
- Line 58: The dashboard tile title is not using title case; update the “Token
usage” label in the relevant tile definition to “Token Usage” to match the
dashboard naming guideline. Locate the tile config by its title field in the
dashboard JSON and change only the displayed title text.

In `@plugins/ClaudeConsole/v1/defaultContent/member.dash.json`:
- Line 67: The dashboard tile titles in member.dash.json are not following the
title-case guideline. Update the tile title strings for the affected entries,
including the ones currently labeled Account usage and API keys created by this
member, so they match the title case used by the other dashboard tile names.

In `@plugins/ClaudeConsole/v1/defaultContent/overview.dash.json`:
- Line 21: The dashboard tile titles in overview.dash.json are using sentence
case instead of title case. Update the affected tile name fields (including the
ones for Spend (this month), Cost by model, Top workspaces by cost, and Token
usage by model, plus the other referenced entries) to use title case
consistently, and use the surrounding dashboard tile definitions to locate the
relevant title properties.

In `@plugins/ClaudeConsole/v1/defaultContent/workspace.dash.json`:
- Line 67: Normalize the dashboard tile names in the workspace.dash.json content
to title case: update the tile entries for Cost over time, Usage by model, and
API keys in this workspace so their title strings use proper title
capitalization. Keep the change limited to the affected tile title fields so the
dashboard naming aligns with the title case guideline.

In `@plugins/ClaudeConsole/v1/docs/README.md`:
- Line 1: The README top-level heading in the Claude Console docs repeats the
plugin name, so update the first heading to a neutral title that matches the
docs guideline. Change the heading in the README file to something like “Before
you start” or “Prerequisites” so it no longer duplicates the plugin name and
better reflects the section’s purpose.

In `@plugins/ClaudeConsole/v1/indexDefinitions/default.json`:
- Around line 13-14: The index mapping source type names in default.json are
plugin-prefixed and should be renamed to match the upstream entity names
instead. Update the ClaudeConsole/v1 indexDefinitions entries referenced by the
source type values used for the workspace, API key, and member mappings so they
read as upstream names like workspace, api key, and member rather than Claude
Workspace or similar. Make the change consistently across all affected mapping
objects in the default definition so the source type labels follow the existing
naming guidelines.

In `@plugins/ClaudeConsole/v1/ui.json`:
- Around line 5-10: The UI copy for this field needs to follow the plugin text
rules: update the label in the ClaudeConsole v1 UI config to sentence-style
casing rather than title case, and rewrite the help text in the same config so
it does not start with “Your” and instead begins with a verb while staying
concise and neutral. Use the existing field entry in ui.json (the Admin API key
field) as the target for these copy-only changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4ac7bbb8-6b7b-449b-8cf0-8f0b45eb2acd

📥 Commits

Reviewing files that changed from the base of the PR and between f166881 and 07de045.

⛔ Files ignored due to path filters (1)
  • plugins/ClaudeConsole/v1/icon.svg is excluded by !**/*.svg
📒 Files selected for processing (22)
  • plugins/ClaudeConsole/v1/configValidation.json
  • plugins/ClaudeConsole/v1/custom_types.json
  • plugins/ClaudeConsole/v1/dataStreams/apiKeys.json
  • plugins/ClaudeConsole/v1/dataStreams/cost.json
  • plugins/ClaudeConsole/v1/dataStreams/members.json
  • plugins/ClaudeConsole/v1/dataStreams/organization.json
  • plugins/ClaudeConsole/v1/dataStreams/scripts/apiKeys.js
  • plugins/ClaudeConsole/v1/dataStreams/scripts/cost.js
  • plugins/ClaudeConsole/v1/dataStreams/scripts/usage.js
  • plugins/ClaudeConsole/v1/dataStreams/scripts/workspaces.js
  • plugins/ClaudeConsole/v1/dataStreams/usage.json
  • plugins/ClaudeConsole/v1/dataStreams/workspaces.json
  • plugins/ClaudeConsole/v1/defaultContent/apiKey.dash.json
  • plugins/ClaudeConsole/v1/defaultContent/manifest.json
  • plugins/ClaudeConsole/v1/defaultContent/member.dash.json
  • plugins/ClaudeConsole/v1/defaultContent/overview.dash.json
  • plugins/ClaudeConsole/v1/defaultContent/scopes.json
  • plugins/ClaudeConsole/v1/defaultContent/workspace.dash.json
  • plugins/ClaudeConsole/v1/docs/README.md
  • plugins/ClaudeConsole/v1/indexDefinitions/default.json
  • plugins/ClaudeConsole/v1/metadata.json
  • plugins/ClaudeConsole/v1/ui.json

Comment thread plugins/ClaudeConsole/v1/dataStreams/scripts/workspaces.js Outdated
Comment thread plugins/ClaudeConsole/v1/dataStreams/usage.json
Comment thread plugins/ClaudeConsole/v1/dataStreams/workspaces.json
Comment thread plugins/ClaudeConsole/v1/defaultContent/apiKey.dash.json Outdated
Comment thread plugins/ClaudeConsole/v1/defaultContent/member.dash.json Outdated
Comment thread plugins/ClaudeConsole/v1/defaultContent/overview.dash.json Outdated
Comment thread plugins/ClaudeConsole/v1/defaultContent/workspace.dash.json Outdated
Comment thread plugins/ClaudeConsole/v1/docs/README.md Outdated
Comment thread plugins/ClaudeConsole/v1/indexDefinitions/default.json Outdated
Comment thread plugins/ClaudeConsole/v1/ui.json Outdated

@clarkd clarkd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few CodeRabbit comments to address here.

Comment thread plugins/ClaudeConsole/v1/dataStreams/scripts/cost.js
Comment thread plugins/ClaudeConsole/v1/dataStreams/cost.json
Comment thread plugins/ClaudeConsole/v1/ui.json Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
plugins/ClaudeConsole/v1/docs/README.md (1)

36-40: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Document the actual graph object type names.

Lines 38-40 call these types Claude Workspace, Claude API Key, and Claude Member, but plugins/ClaudeConsole/v1/custom_types.json registers them as Workspace, API Key, and Member. Keeping the README aligned with the real type names avoids confusion in scope pickers and object drilldowns.

Proposed fix
-| **Claude Workspace** | `GET /v1/organizations/workspaces` | A workspace in your organization — the container for API keys and the primary cost/usage attribution dimension. |
-| **Claude API Key**   | `GET /v1/organizations/api_keys`   | An API key, including its status, partially-redacted hint, creating user, and owning workspace.                 |
-| **Claude Member**    | `GET /v1/organizations/users`      | An organization member, including email, name, and organization role.                                           |
+| **Workspace**        | `GET /v1/organizations/workspaces` | A workspace in your organization — the container for API keys and the primary cost/usage attribution dimension. |
+| **API Key**          | `GET /v1/organizations/api_keys`   | An API key, including its status, partially-redacted hint, creating user, and owning workspace.                 |
+| **Member**           | `GET /v1/organizations/users`      | An organization member, including email, name, and organization role.                                           |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/ClaudeConsole/v1/docs/README.md` around lines 36 - 40, The README’s
object type table uses display names that do not match the registered graph
types. Update the entries in the object type section to use the exact names
defined in custom_types.json and referenced by the ClaudeConsole type system,
specifically the types surfaced by the workspace/API key/member mappings. Keep
the API source and description text, but align the object type labels so scope
pickers and drilldowns show the same names as the actual registered types.
plugins/ClaudeConsole/v1/defaultContent/overview.dash.json (1)

42-42: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Scalar label still uses sentence case.

The tile title was corrected to "Spend (This Month)" (line 21), but the visualisation label here is still "Spend (this month)". Align it with title case for consistency.

✏️ Proposed fix
-                                "label": "Spend (this month)"
+                                "label": "Spend (This Month)"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/ClaudeConsole/v1/defaultContent/overview.dash.json` at line 42, The
visualisation label is still using sentence case while the tile title uses title
case; update the `label` value in the same overview dashboard content to match
the corrected `title` formatting. Locate the scalar configuration in
`overview.dash.json` and change the `label` for the Spend tile so it
consistently reads in title case alongside the existing `title` field.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/ClaudeConsole/v1/dataStreams/usage.json`:
- Around line 27-30: The usage stream grouping still leaves account_id
ungrouped, so any emitted account_id field will remain null. Update the
group_by[] definition in usage.json (the same place that already includes
workspace_id, api_key_id, model, service_tier, and context_window) to either add
account_id or remove it from the output if it is not needed. Make sure the
change matches how usage.js builds the member filter and grouped dimensions.

---

Outside diff comments:
In `@plugins/ClaudeConsole/v1/defaultContent/overview.dash.json`:
- Line 42: The visualisation label is still using sentence case while the tile
title uses title case; update the `label` value in the same overview dashboard
content to match the corrected `title` formatting. Locate the scalar
configuration in `overview.dash.json` and change the `label` for the Spend tile
so it consistently reads in title case alongside the existing `title` field.

In `@plugins/ClaudeConsole/v1/docs/README.md`:
- Around line 36-40: The README’s object type table uses display names that do
not match the registered graph types. Update the entries in the object type
section to use the exact names defined in custom_types.json and referenced by
the ClaudeConsole type system, specifically the types surfaced by the
workspace/API key/member mappings. Keep the API source and description text, but
align the object type labels so scope pickers and drilldowns show the same names
as the actual registered types.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 45f8cb0f-5e21-46d5-8273-236049ff07a7

📥 Commits

Reviewing files that changed from the base of the PR and between 07de045 and bea096b.

📒 Files selected for processing (14)
  • plugins/ClaudeConsole/v1/custom_types.json
  • plugins/ClaudeConsole/v1/dataStreams/apiKeys.json
  • plugins/ClaudeConsole/v1/dataStreams/cost.json
  • plugins/ClaudeConsole/v1/dataStreams/scripts/workspaces.js
  • plugins/ClaudeConsole/v1/dataStreams/usage.json
  • plugins/ClaudeConsole/v1/dataStreams/workspaces.json
  • plugins/ClaudeConsole/v1/defaultContent/apiKey.dash.json
  • plugins/ClaudeConsole/v1/defaultContent/member.dash.json
  • plugins/ClaudeConsole/v1/defaultContent/overview.dash.json
  • plugins/ClaudeConsole/v1/defaultContent/scopes.json
  • plugins/ClaudeConsole/v1/defaultContent/workspace.dash.json
  • plugins/ClaudeConsole/v1/docs/README.md
  • plugins/ClaudeConsole/v1/indexDefinitions/default.json
  • plugins/ClaudeConsole/v1/ui.json

Comment thread plugins/ClaudeConsole/v1/dataStreams/usage.json
@andrewmumblebee andrewmumblebee requested a review from clarkd June 30, 2026 10:05

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
plugins/ClaudeConsole/v1/dataStreams/cost.json (2)

87-94: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Move pattern onto the description column definition.

Lines 92-94 currently add a separate metadata entry with only "pattern": ".*". That leaves an unnamed column descriptor in metadata instead of constraining description, which is likely to break schema parsing or silently drop the validation you intended.

Proposed fix
         {
             "name": "description",
             "displayName": "Description",
-            "shape": "string"
-        },
-        {
+            "shape": "string",
             "pattern": ".*"
         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/ClaudeConsole/v1/dataStreams/cost.json` around lines 87 - 94, The
metadata entry for the `description` column is split incorrectly: the standalone
object with `pattern` should be attached to the existing `description` column
definition in the same metadata item. Update the `description` object in
`cost.json` so it includes the `pattern` constraint alongside `name`,
`displayName`, and `shape`, and remove the separate unnamed pattern-only entry.

23-30: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Expose a model column or the overview contract breaks.

The overview dashboard groups {{dataStreams.cost}} by model, but this stream only requests workspace_id and description, and its schema never declares a model field. As-is, the “Cost By Model” tile has nothing valid to group on. Parse description into a model property in cost.js and add it to metadata, or change the dashboard to group by description instead.

Also applies to: 55-95

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/ClaudeConsole/v1/dataStreams/cost.json` around lines 23 - 30, The
cost data stream is missing the field the overview expects for grouping by
model, so update the cost stream contract in cost.js/cost.json to expose a model
property derived from description and include it in metadata, using the existing
cost stream parsing and schema definitions. If model cannot be added, then
change the overview dashboard’s grouping to use description consistently, but
keep the identifiers in the cost stream and dashboard aligned so the “Cost By
Model” tile has a valid group-by field.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/ClaudeConsole/v1/docs/README.md`:
- Line 57: The README wording for default-workspace attribution is inaccurate
because the usage stream maps missing workspace IDs into the synthetic default
bucket while only api_key_id remains nullable. Update the text in the
default-workspace attribution section to distinguish the default workspace
bucket from a null api_key_id, and make sure the wording aligns with the
normalization behavior in usage.js.

---

Outside diff comments:
In `@plugins/ClaudeConsole/v1/dataStreams/cost.json`:
- Around line 87-94: The metadata entry for the `description` column is split
incorrectly: the standalone object with `pattern` should be attached to the
existing `description` column definition in the same metadata item. Update the
`description` object in `cost.json` so it includes the `pattern` constraint
alongside `name`, `displayName`, and `shape`, and remove the separate unnamed
pattern-only entry.
- Around line 23-30: The cost data stream is missing the field the overview
expects for grouping by model, so update the cost stream contract in
cost.js/cost.json to expose a model property derived from description and
include it in metadata, using the existing cost stream parsing and schema
definitions. If model cannot be added, then change the overview dashboard’s
grouping to use description consistently, but keep the identifiers in the cost
stream and dashboard aligned so the “Cost By Model” tile has a valid group-by
field.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8a57c72f-7690-49b5-9085-91221cc8e5fe

📥 Commits

Reviewing files that changed from the base of the PR and between bea096b and 63b5200.

📒 Files selected for processing (5)
  • plugins/ClaudeConsole/v1/dataStreams/cost.json
  • plugins/ClaudeConsole/v1/dataStreams/scripts/cost.js
  • plugins/ClaudeConsole/v1/dataStreams/scripts/usage.js
  • plugins/ClaudeConsole/v1/defaultContent/overview.dash.json
  • plugins/ClaudeConsole/v1/docs/README.md
💤 Files with no reviewable changes (1)
  • plugins/ClaudeConsole/v1/dataStreams/scripts/usage.js

Comment thread plugins/ClaudeConsole/v1/docs/README.md Outdated
@github-actions

Copy link
Copy Markdown

🧩 Plugin PR Summary

📦 Modified Plugins

  • plugins/ClaudeConsole/v1

📋 Results

Step Status
Validation ✅ Passed
Deployment 🚀 Deployed

🔍 Validation Details

claude-console
{
  "valid": true,
  "pluginName": "claude-console",
  "pluginType": "hybrid",
  "summary": {
    "Data Streams": 6,
    "Import Definitions": 1,
    "UI Configuration": true,
    "Has Icon": true,
    "Has Default Content": true,
    "Config Validation": true,
    "Custom Types": true
  }
}

@andrewmumblebee andrewmumblebee requested a review from clarkd June 30, 2026 15:04
@andrewmumblebee andrewmumblebee merged commit 05aeeab into main Jun 30, 2026
1 check passed
@andrewmumblebee andrewmumblebee deleted the work/ah/claude-console branch June 30, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-plugin Used to PR newly added plugins

Development

Successfully merging this pull request may close these issues.

2 participants