Skip to content

Gateway: add commands.list slash command metadata API#13537

Closed
Pyiner wants to merge 4 commits into
openclaw:mainfrom
Pyiner:codex/gateway-commands-list-api-gateway-only
Closed

Gateway: add commands.list slash command metadata API#13537
Pyiner wants to merge 4 commits into
openclaw:mainfrom
Pyiner:codex/gateway-commands-list-api-gateway-only

Conversation

@Pyiner

@Pyiner Pyiner commented Feb 10, 2026

Copy link
Copy Markdown

Summary

  • add a new gateway RPC method commands.list to expose slash-command metadata for clients (including iOS)
  • wire the method into gateway method routing, read-scope authorization, and method listing
  • add focused tests for commands.list
  • keep this PR gateway-only (no protocol-schema/Swift model churn)

Behavior Changes

  • clients can call commands.list with optional filters: provider, sessionKey, includePlugins, includeSkills
  • response includes normalized command metadata: key, name, slash, description, scope, source, optional aliases, category, nativeName, acceptsArgs, args
  • skill commands can be resolved per-session agent via sessionKey
  • plugin commands are included by default and can be excluded with includePlugins=false

Tests

  • pnpm check
  • pnpm exec vitest run src/gateway/server-methods/commands.test.ts src/gateway/protocol/index.test.ts
  • pnpm protocol:check
  • python3 scripts/analyze_code_files.py --compare-to origin/main --threshold 1000 --strict

Code word: lobster-biscuit

Sign-Off

  • Models used: GPT-5 Codex
  • Submitter effort (self-reported): medium

Greptile Overview

Greptile Summary

Adds a new Gateway RPC method commands.list and wires it into the gateway handler map (src/gateway/server-methods.ts) plus the advertised method list (src/gateway/server-methods-list.ts) and read-scope authorization. The new handler (src/gateway/server-methods/commands.ts) returns normalized slash-command metadata derived from the existing commands registry, optionally including skill commands resolved per-session agent via sessionKey, and plugin commands (included by default, with includePlugins=false to exclude). Includes unit tests validating response shape, plugin inclusion toggles, session-based skill resolution, and invalid-param rejection.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk.
  • Changes are additive and localized (new handler + routing/listing updates) and reuse existing command registries for data generation. I did not find any definite correctness or integration bugs in the new method implementation. Unable to execute the provided test commands in this environment due to missing pnpm, so confidence is slightly reduced.
  • src/gateway/server-methods/commands.ts

(4/5) You can add custom instructions or style guidelines for the agent here!

@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Feb 10, 2026
@Pyiner
Pyiner force-pushed the codex/gateway-commands-list-api-gateway-only branch from b666d82 to 4582963 Compare February 11, 2026 03:12
@Pyiner
Pyiner force-pushed the codex/gateway-commands-list-api-gateway-only branch from 3c25c69 to 1fab58e Compare February 12, 2026 09:34
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added stale Marked as stale due to inactivity and removed stale Marked as stale due to inactivity labels Feb 21, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Mar 10, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #pr-thunderdome-dangerzone on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: M stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant