UNPKG

aiwg

Version:

Deployment tool and support utility for AI context. Copies agents, skills, commands, rules, and behaviors into the paths each AI platform reads (Claude Code, Codex, Copilot, Cursor, Warp, OpenClaw, and 6 more) so one source of truth works across 10 platfo

266 lines 8.22 kB
/** * Subcommand Handlers * * Handlers for MCP, catalog, plugin, and other subcommands. * Handles CLI subcommand routing. * * @implements @.aiwg/architecture/decisions/ADR-001-unified-extension-system.md * @implements #56, #57 * @source @src/cli/router.ts * @tests @test/unit/cli/handlers/subcommands.test.ts * @issue #33 */ import type { CommandHandler } from "./types.js"; /** * MCP server command handler * * Dynamically imports and delegates to src/mcp/cli.mjs. * Handles subcommands: serve, install, info */ export declare const mcpHandler: CommandHandler; /** * Model catalog command handler * * Dynamically imports and delegates to src/catalog/cli.mjs. * Handles subcommands: list, info, search */ export declare const catalogHandler: CommandHandler; /** * List frameworks handler * * Lists deployed extensions from the registry. * Falls back to legacy plugin-status script if needed. */ export declare const listHandler: CommandHandler; /** * Remove framework handler * * Delegates to tools/plugin/plugin-uninstaller-cli.mjs */ export declare const removeHandler: CommandHandler; /** * Promote handler — graduate a project-local bundle to upstream or to a * private corpus path. Implements the design at * @.aiwg/architecture/design-doctor-log-promote.md (#1049). * * Usage: * aiwg promote <name> # default: --to upstream * aiwg promote <name> --to upstream * aiwg promote <name> --to corpus <path> * aiwg promote <name> --dry-run * aiwg promote <name> --cleanup * aiwg promote <name> --force * * @implements #1037 */ export declare const promoteHandler: CommandHandler; /** * New bundle handler — scaffolds a project-local bundle under * `.aiwg/{type}/{name}/` with a valid manifest, starter artifact, and a * README that includes the identical-form portability reminder. * * Usage: * aiwg new-bundle <name> # default: --type extension --starter skill * aiwg new-bundle <name> --type addon * aiwg new-bundle <name> --type framework --starter minimal * aiwg new-bundle <name> --starter rule --description "Custom rule" * * @implements #1050 */ export declare const newBundleHandler: CommandHandler; /** * New project handler * * Delegates to tools/install/new-project.mjs */ export declare const newProjectHandler: CommandHandler; /** * Install plugin handler * * Delegates to tools/plugin/plugin-installer-cli.mjs */ export declare const installPluginHandler: CommandHandler; /** * Uninstall plugin handler * * Delegates to tools/plugin/plugin-uninstaller-cli.mjs */ export declare const uninstallPluginHandler: CommandHandler; /** * Plugin status handler * * Delegates to tools/plugin/plugin-status-cli.mjs */ export declare const pluginStatusHandler: CommandHandler; /** * Package plugin handler * * Delegates to tools/plugin/package-plugins.mjs */ export declare const packagePluginHandler: CommandHandler; /** * Package all plugins handler * * Delegates to tools/plugin/package-plugins.mjs with --all flag */ export declare const packageAllPluginsHandler: CommandHandler; /** * Artifact index command handler * * Dynamically imports and delegates to src/artifacts/cli.mjs. * Handles subcommands: build, query, deps, stats * * @implements #420 */ export declare const indexHandler: CommandHandler; /** * Discovery command handler — first-class top-level verb (#1212). * * Forwards to the same implementation as `aiwg index discover` but * exposes discovery as its own command so agents don't conflate it * with the project's general-purpose artifact graph indices. * * aiwg discover "<phrase>" [--limit N] [--type skill,agent,...] [--json] */ export declare const discoverHandler: CommandHandler; /** * Features command handler — manage AIWG's optional runtime features (#1219). * * Subcommands: status / info / install / remove. Cycle 1 ships * status + info; install + remove arrive in Cycle 3 once install-mode * detection is designed. */ export declare const featuresHandler: CommandHandler; /** * Show command handler — fetch the full text of a specific artifact (#1218). * * Forwards to the same implementation as `aiwg index show`. Companion to * `aiwg discover`: where discover ranks candidates, show fetches the body * so consumers don't need to navigate AIWG's storage paths themselves. * * aiwg show <name> [--type skill,agent,...] [--json] [--first] */ export declare const showHandler: CommandHandler; /** * Skills command handler * * Dynamically imports and delegates to src/skills/cli.ts. * Handles subcommands: search, info, list, install, publish * * @implements #539 */ export declare const skillsHandler: CommandHandler; /** * Config command handler * * Dynamically imports and delegates to src/config/cli.ts. * Handles subcommands: get, set, list, validate, reset, path, edit * * @implements #545 */ export declare const configHandler: CommandHandler; /** * Ops command handler * * Dynamically imports and delegates to src/ops/cli.ts. * Handles subcommands: init, status, use, list, push * * @implements #544 */ export declare const opsHandler: CommandHandler; /** * Activity-log command handler * * Dynamically imports and delegates to src/activity-log/cli.ts. * Handles subcommands: show, append, stats. Persistence routes through * resolveStorage('activity_log') so the log honors any storage.config * override (#934). * * @implements #934 * @implements #964 */ export declare const activityLogHandler: CommandHandler; /** * Provenance command handler — routes \`aiwg provenance\` through * resolveStorage('provenance') for provenance-* skills (#968). * * @implements #934 * @implements #968 */ export declare const provenanceHandler: CommandHandler; /** * Research storage command handler — routes \`aiwg research-store\` * through resolveStorage('research') for research-acquire / corpus-* * skills (#968). Disambiguated from existing research-* workflow * commands by the \`-store\` suffix. * * @implements #934 * @implements #968 */ export declare const researchStoreHandler: CommandHandler; /** * Reflections command handler * * Routes \`aiwg reflections <subcommand>\` through resolveStorage('reflections') * for ralph-reflect / reflection-injection skills (#967). * * @implements #934 * @implements #967 */ export declare const reflectionsHandler: CommandHandler; /** * Memory command handler * * Routes \`aiwg memory <subcommand>\` through resolveStorage('memory') so * the four memory skills (memory-ingest, memory-lint, memory-log-append, * memory-query-capture) honor any storage.config redirection. * * @implements #934 * @implements #966 */ export declare const memoryHandler: CommandHandler; /** * Knowledge-base command handler * * Routes \`aiwg kb <subcommand>\` through resolveStorage('kb') so the KB * honors any storage.config redirection without each kb skill * hardcoding `.aiwg/kb/`. * * @implements #934 * @implements #965 */ export declare const kbHandler: CommandHandler; /** * Storage command handler * * Dynamically imports and delegates to src/storage/cli.ts. * Handles subcommands: show, list-backends, test * * @implements #934 * @implements #954 */ export declare const storageHandler: CommandHandler; /** * RLM agentic tools handler * * Routes `aiwg chunk`, `aiwg fanout`, `aiwg rlm-prep`, `aiwg rlm-search`, * and `aiwg rlm-status` to src/rlm/cli.ts. * * These are support tools for agentic sessions — callable by users but * primarily used by RLM agents during recursive and fanout operations. * * @implements #559 */ export declare const rlmToolsHandler: CommandHandler; export declare const chunkHandler: CommandHandler; export declare const fanoutHandler: CommandHandler; export declare const rlmPrepHandler: CommandHandler; export declare const rlmSearchHandler: CommandHandler; export declare const rlmStatusCliHandler: CommandHandler; /** RLM result cache (#1203). */ export declare const rlmCacheHandler: CommandHandler; /** * All subcommand handlers */ export declare const subcommandHandlers: CommandHandler[]; //# sourceMappingURL=subcommands.d.ts.map