mirror of
https://github.com/qwibitai/nanoclaw.git
synced 2026-06-12 18:11:51 +08:00
6865811147
Resource-first CLI: `nc groups list`, `nc wirings get <id>`, etc. Seven resources defined (groups, messaging-groups, wirings, users, roles, members, sessions) with full column documentation that serves as the single source of truth for help output and arg validation. - CRUD helper auto-registers list/get/create/update/delete from declarative resource definitions with generic SQL - Custom operations for composite-PK resources (roles grant/revoke, members add/remove) - Access model: open (reads) / approval (writes) / hidden - `nc help` lists resources; `nc <resource> help` shows fields - Positional target IDs: `nc groups get <id>` - Removed unused priority column from wirings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
11 lines
333 B
TypeScript
11 lines
333 B
TypeScript
/**
|
|
* Command barrel — populates the registry before the CLI server starts.
|
|
*
|
|
* Resource definitions register their CRUD commands on import.
|
|
* Help commands are registered after resources are loaded.
|
|
*/
|
|
import '../resources/index.js';
|
|
import { registerResourceHelpCommands } from './help.js';
|
|
|
|
registerResourceHelpCommands();
|