Skip to content

feat: add help component and describe operation for component discovery#28

Merged
ynishi merged 3 commits intomainfrom
feat/decorator-call
Mar 5, 2026
Merged

feat: add help component and describe operation for component discovery#28
ynishi merged 3 commits intomainfrom
feat/decorator-call

Conversation

@ynishi
Copy link
Owner

@ynishi ynishi commented Mar 5, 2026

Summary

  • Add @help builtin component for runtime component introspection (@help list, @help <name>)
  • Add describe operation to all builtin components (shell, tool, agent_mgr, foundation_manager, profile_manager) returning structured metadata (id, fqn, description, operations, usage)
  • Add list_routes and resolve_route operations to agent_mgr to support help queries
  • Add description field to agent_mgr route table entries
  • Register help in default builtins config (types.rs)

Design

@help works entirely through the existing component request/response mechanism:

  1. @help list → requests list_routes from agent_mgr → formats and outputs all @-routable components and dynamic agents
  2. @help <name> → requests resolve_route from agent_mgr to get target FQN → requests describe from the target component → formats and outputs detail

No new Rust code or runtime changes required — built purely on the Lua component layer.

Test plan

  • @help shows usage message
  • @help list lists all registered routes and agents with descriptions
  • @help shell shows shell component detail (description, operations, usage)
  • @help tool shows tool component detail
  • @help foundation shows foundation_manager detail
  • @help profile shows profile_manager detail
  • @help help shows self-describe metadata
  • @help nonexistent returns appropriate error message
  • Existing @shell, @tool, @profile, @foundation routing unaffected

ynishi added 3 commits March 5, 2026 09:06
Add orcs-acp crate implementing the ACP Agent trait from
agent-client-protocol v0.9. Enables ORCS to run as an ACP-compatible
agent over stdio, registerable in ACP-aware editors (Zed, JetBrains).

P1 implementation: initialize, authenticate, new_session, prompt,
cancel handlers with echo response. Engine integration planned for P2.

CLI: `orcs --acp` starts the ACP server mode.
Replace echo-based engine_worker with real ORCS engine integration.
The ACP server now sends user prompts through IOInputHandle and
streams engine output back as ACP SessionUpdate notifications,
using the same idle-timeout pattern as run_command().
Add @help builtin component that provides runtime introspection:
- @help list: shows all @-routable components and dynamic agents
- @help <name>: shows detail (description, operations, usage) for a component

Each builtin component now implements a "describe" operation returning
structured metadata. agent_mgr gains list_routes and resolve_route
operations to support help's queries.
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Code Metrics

Metric Value
Code units 5343
Line coverage 86.6%
Function coverage 84.6%
Region coverage 86.6%
High complexity (cyclo>=15) 157
Large functions (>=100 lines) 207
Domain breakdown
Domain Nodes %
orcs-runtime 1908 35.7%
orcs-lua 1633 30.6%
orcs-component 578 10.8%
orcs-types 223 4.2%
orcs-lint 211 3.9%
orcs-hook 207 3.9%
orcs-auth 153 2.9%
orcs-cli 118 2.2%
orcs-app 117 2.2%
orcs-event 111 2.1%
orcs-mcp 44 0.8%
other 40 0.7%

@ynishi ynishi merged commit 5a25981 into main Mar 5, 2026
7 checks passed
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.

1 participant