Skip to content

Gateway/UI: data-driven agents tools catalog with provenance - #24199

Merged
Takhoffman merged 1 commit into
mainfrom
task/tools-catalog-data-driven
Feb 23, 2026
Merged

Takhoffman merged 1 commit into
mainfrom
task/tools-catalog-data-driven

Conversation

@Takhoffman

@Takhoffman Takhoffman commented Feb 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: /agents Tools and shared tool policy were static and drifted from runtime tool registration, so tools like tts were missing from the UI/policy view.
  • Why it matters: operators saw incomplete tool inventory and could not tell whether tools came from core or plugins.
  • What changed: added runtime tools.catalog RPC, shared core tool catalog source, /agents data-driven rendering, per-tool provenance labels (core / plugin:<id> + optional), protocol/schema updates, tests, and docs/changelog updates.
  • What did NOT change (scope boundary): no changes to elevated execution model, no new auth mechanism, and no change to tool policy precedence semantics (allow/deny still authoritative).

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #N/A
  • Related #N/A

User-visible / Behavior Changes

  • /agents Tools now loads a runtime catalog via tools.catalog.
  • Tools show provenance labels per row: core or plugin:<id>, and optional where applicable.
  • Static fallback list is shown with warning when catalog loading fails.
  • tts now appears in the core media group/path where expected.

Security Impact (required)

  • New permissions/capabilities? (Yes/No): Yes (tools.catalog read RPC added under operator.read)
  • Secrets/tokens handling changed? (Yes/No): No
  • New/changed network calls? (Yes/No): Yes (Control UI now requests tools.catalog)
  • Command/tool execution surface changed? (Yes/No): No execution semantics change
  • Data access scope changed? (Yes/No): No
  • If any Yes, explain risk + mitigation:
    • Risk: exposing runtime tool metadata to authorized readers.
    • Mitigation: method is scope-gated (operator.read), validated params/schemas, and contains metadata only (no secrets or execution side effects).

Repro + Verification

Environment

  • OS: macOS
  • Runtime/container: Node 22 + pnpm
  • Model/provider: N/A
  • Integration/channel (if any): Gateway WS + Control UI
  • Relevant config (redacted): default local gateway config

Steps

  1. Open /agents Tools panel for an agent.
  2. Observe loaded tool groups and per-tool provenance labels.
  3. Simulate catalog error path (or unavailable method) and confirm fallback warning/list.

Expected

  • Runtime tools are shown (including tts) with provenance labels.
  • Catalog failures degrade to fallback list with warning.

Actual

  • Matches expected.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
    • pnpm check passes.
    • Gateway/unit tests pass for tools.catalog handlers and WS integration.
    • Controller test verifies catalog load success/failure state handling.
  • Edge cases checked:
    • Unknown agentId returns invalid request.
    • includePlugins=false excludes plugin groups.
  • What you did not verify:
    • Browser-run UI test execution requiring local Playwright browser install was not run in this environment.

Compatibility / Migration

  • Backward compatible? (Yes/No): Yes
  • Config/env changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, exact upgrade steps:
    • N/A

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly:
    • Revert this PR commit to restore static UI tool sections and remove tools.catalog usage.
  • Files/config to restore:
    • ui/src/ui/views/agents-panels-tools-skills.ts, ui/src/ui/controllers/agents.ts, gateway tools-catalog files, protocol schema/type exports.
  • Known bad symptoms reviewers should watch for:
    • Empty/missing tools in /agents due to catalog fetch failure.
    • Client/server protocol mismatch if generated protocol files are omitted.

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk:
    • Protocol drift between TypeBox schema and generated Swift/JSON artifacts.
    • Mitigation:
      • Included generated protocol model/schema updates in this PR and ran protocol generation checks.
  • Risk:
    • UI browser-specific rendering regressions for provenance badges.
    • Mitigation:
      • Added browser test file for tool provenance/fallback rendering (pending local browser binary availability in this environment).

Greptile Summary

This PR migrates the Tools panel from static UI definitions to a data-driven architecture powered by a new tools.catalog RPC endpoint. The implementation extracts shared tool definitions to src/agents/tool-catalog.ts, adds runtime catalog retrieval with per-tool provenance labels (core vs plugin:<id> plus optional markers), and provides graceful fallback to static definitions when the runtime catalog is unavailable.

Key changes:

  • Adds tools.catalog RPC method under operator.read scope with agent-scoped catalog retrieval
  • Migrates shared core tool definitions from UI-duplicated lists to single source in src/agents/tool-catalog.ts
  • UI now fetches live tool catalog on agent panel load and displays provenance badges
  • Protocol schema and generated Swift/JSON models updated to support new catalog types
  • Comprehensive test coverage for handler validation, plugin metadata, and UI fallback rendering

Integration points:

  • New RPC handler registered in server-methods.ts and listed in server-methods-list.ts
  • UI controller loadToolsCatalog fetches catalog on agent selection
  • View layer conditionally uses runtime catalog or falls back to static sections with warning callout

Confidence Score: 4/5

  • This PR is safe to merge with minor risks around protocol drift and UI rendering edge cases
  • The implementation demonstrates solid engineering practices: comprehensive test coverage (unit tests for handlers, integration tests for gateway RPC, controller state tests, and browser rendering tests), graceful degradation (UI falls back to static catalog on error), proper scope gating (operator.read), schema validation, and protocol generation consistency. The shared catalog source eliminates duplication between UI and backend. Risks are minimal: potential protocol drift is mitigated by included generated artifacts, and browser-specific rendering regressions are addressed with browser tests (though author notes local Playwright unavailability)
  • No files require special attention - all changes are well-tested and follow existing patterns

Last reviewed commit: 3c3ce5c

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Feb 23, 2026
@Takhoffman
Takhoffman force-pushed the task/tools-catalog-data-driven branch from 3c3ce5c to 5b35e3d Compare February 23, 2026 05:53
@Takhoffman
Takhoffman merged commit 9e1a13b into main Feb 23, 2026
20 of 21 checks passed
@Takhoffman
Takhoffman deleted the task/tools-catalog-data-driven branch February 23, 2026 05:56
@Takhoffman

Copy link
Copy Markdown
Contributor Author

PR #24199 - Gateway/UI: data-driven agents tools catalog with provenance (#24199)

Merged via squash.

  • Merge commit: 9e1a13b
  • Verified:
    • pnpm install --frozen-lockfile
    • pnpm build
    • pnpm check (fails on upstream TypeScript portability error in src/gateway/gateway-connection.test-mocks.ts, outside this PR diff)
    • gh pr checks 24199 --watch --fail-fast
  • Changes made:
    • Rebasing PR head onto latest origin/main, then force-with-lease push to PR head
  • Why these changes were made:
    • Keep the PR head current and satisfy deterministic merge head pinning in the autoland workflow.
  • Changelog: CHANGELOG.md updated=true required=true opt_out=false

Thanks @Takhoffman!

ethvilet pushed a commit to ethvilet/openclaw that referenced this pull request Feb 23, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
carlosrivera pushed a commit to myascendai/meshiclaw that referenced this pull request Feb 23, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
gabrielkoo pushed a commit to gabrielkoo/openclaw that referenced this pull request Feb 23, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
mreedr pushed a commit to mreedr/openclaw-custom that referenced this pull request Feb 24, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
margulans pushed a commit to margulans/Neiron-AI-assistant that referenced this pull request Feb 25, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
mylukin pushed a commit to mylukin/openclaw that referenced this pull request Feb 26, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
desertstackdev pushed a commit to desertstackdev/openclaw that referenced this pull request Feb 28, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
@d87skg

d87skg commented Mar 16, 2026

Copy link
Copy Markdown

Hi @zeroaltitude and team,

This is a very well-thought-out proposal. The hook surfaces you've outlined are exactly what security plugins need to enforce trust policies. I'd like to propose a complementary layer: a pluggable execution backend that can enforce these policies at runtime.

Our project agent-core is a Rust-based WASM execution engine that provides:

  • Fine-grained capability control: Skills run in WASM modules with zero default permissions (no FS, no network, no env vars). Each host call (tool invocation) must be explicitly granted via capability tokens, which aligns perfectly with your before_tool_call and before_response_emit hooks.
  • Resource limits: CPU fuel and memory caps prevent DoS attacks, complementing loop observability.
  • Exactly-once semantics: Prevent duplicate malicious actions, which is critical for tools with side effects.
  • Prometheus metrics built-in, enabling real-time anomaly detection.

With agent-core as an optional execution backend, security plugins could:

  • Map identity context to capability sets (e.g., "group members get CAP_READ_FILE, but not CAP_DELETE").
  • Intercept tool calls at the actual execution layer, not just in the orchestrator – even if a plugin misses a hook, the sandbox still blocks unauthorized access.
  • Enforce session memory policies by controlling what data can be persisted (WASM modules have no persistent storage unless explicitly granted).

I'd love to collaborate on integrating agent-core as a reference implementation for the trust-aware plugin ecosystem. Happy to provide a PoC or contribute to the RFC discussions.

agent-core repo: https://github.com/d87skg/agent-core-temp
Performance report: https://github.com/d87skg/agent-core-temp/blob/main/PERFORMANCE.md

lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
@clawsweeper clawsweeper Bot mentioned this pull request May 20, 2026
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
…w#24199) thanks @Takhoffman

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- gh pr checks 24199 --watch --fail-fast

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: macos App: macos app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants