Skip to content

aitools: expose supports_project_scope in aitools list --output json - #6339

Open
misha-db wants to merge 2 commits into
mainfrom
misha-db/aitools-list-supports-project-scope
Open

aitools: expose supports_project_scope in aitools list --output json#6339
misha-db wants to merge 2 commits into
mainfrom
misha-db/aitools-list-supports-project-scope

Conversation

@misha-db

Copy link
Copy Markdown

Changes

Adds a supports_project_scope boolean to every agent entry in the agents list
of databricks aitools list --output json.

  • New SupportsProjectScope bool \json:"supports_project_scope"`field onagentEntryincmd/aitools/list.go, populated in buildAgentEntriesdirectly from the registry'sagents.Agent.SupportsProjectScope`.
  • The field is always emitted (no omitempty), matching the existing managed
    and detected bools, so the JSON shape stays stable.

The value is true for the project-scope-capable agents (Claude Code, Pi,
Gemini CLI, Goose) and false for the rest.

Why

(can the CLI install a plugin) and detected (is the agent present), but nothing
told a consumer whether an agent is allowed to have project-scoped skills. That
capability lived only on the internal agents.Agent.SupportsProjectScope field.

The only project-scope signal in the JSON was a "project" key inside an agent's
installed map, which appears only when something is already installed there — so
consumers could infer capability positively but never learn it up front. Exposing
supports_project_scope lets the extension offer a project-scoped install without
hardcoding the agent list, mirroring how managed surfaces Plugin != nil.

Tests

Extended the existing unit tests in cmd/aitools/list_test.go:

  • TestRenderListJSONWithAgents — asserts the JSON key round-trips (true for
    the claude-code fixture, false for the cursor entry), locking the contract.
  • TestBuildAgentEntries — asserts the value is wired from the real registry:
    true for claude-code, false for codex (managed, global-only) and cursor
    (skills-only, global-only), so the test tracks reality if an agent's capability
    changes.

Adds a `supports_project_scope` boolean to every agent entry in the `agents` list
of `databricks aitools list --output json`.

- New `SupportsProjectScope bool \`json:"supports_project_scope"\`` field on
  `agentEntry` in `cmd/aitools/list.go`, populated in `buildAgentEntries` directly
  from the registry's `agents.Agent.SupportsProjectScope`.
- The field is always emitted (no `omitempty`), matching the existing `managed`
  and `detected` bools, so the JSON shape stays stable.
@misha-db
misha-db requested review from rclarey and rugpanov August 21, 2026 13:08
@misha-db misha-db self-assigned this Aug 21, 2026
@misha-db
misha-db marked this pull request as ready for review August 21, 2026 13:23
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.

2 participants