@openacp/cli 2026.327.2 → 2026.327.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +88 -88
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2410,6 +2410,94 @@ declare class OpenACPCore {
2410
2410
  createBridge(session: Session, adapter: IChannelAdapter): SessionBridge;
2411
2411
  }
2412
2412
 
2413
+ interface RegisteredCommand extends CommandDef {
2414
+ /** Scope extracted from pluginName, e.g. '@openacp/speech' → 'speech' */
2415
+ scope?: string;
2416
+ }
2417
+ /**
2418
+ * Central command registry with namespace resolution and adapter-specific overrides.
2419
+ *
2420
+ * Namespace rules:
2421
+ * - System commands always own the short name.
2422
+ * - Among plugins, the first to register wins the short name.
2423
+ * - Every plugin command also gets a qualified name: `scope:name`.
2424
+ * - Adapter plugins (@openacp/telegram, @openacp/discord, @openacp/slack)
2425
+ * registering a command that already exists → stored as an override
2426
+ * keyed by `channelId:commandName`, used when channelId matches.
2427
+ */
2428
+ declare class CommandRegistry {
2429
+ /** Main registry: short names + qualified names → RegisteredCommand */
2430
+ private commands;
2431
+ /** Adapter-specific overrides: `channelId:commandName` → RegisteredCommand */
2432
+ private overrides;
2433
+ private static ADAPTER_SCOPES;
2434
+ /**
2435
+ * Register a command definition.
2436
+ * @param def - Command definition
2437
+ * @param pluginName - Plugin that owns the command (set automatically by PluginContext)
2438
+ */
2439
+ register(def: CommandDef, pluginName?: string): void;
2440
+ /** Retrieve a command by name (short or qualified). */
2441
+ get(name: string): RegisteredCommand | undefined;
2442
+ /** Remove a command by short name. Also removes its qualified name entry. */
2443
+ unregister(name: string): void;
2444
+ /** Remove all commands registered by a given plugin. */
2445
+ unregisterByPlugin(pluginName: string): void;
2446
+ /** Return all unique commands (deduplicated — each command appears once). */
2447
+ getAll(): RegisteredCommand[];
2448
+ /** Filter commands by category. */
2449
+ getByCategory(category: 'system' | 'plugin'): RegisteredCommand[];
2450
+ /**
2451
+ * Parse and execute a command string.
2452
+ * @param commandString - Full command string, e.g. "/greet hello world"
2453
+ * @param baseArgs - Base arguments (channelId, userId, etc.)
2454
+ * @returns CommandResponse
2455
+ */
2456
+ execute(commandString: string, baseArgs: CommandArgs): Promise<CommandResponse>;
2457
+ /** Extract scope from plugin name: '@openacp/speech' → 'speech', 'my-plugin' → 'my-plugin' */
2458
+ static extractScope(pluginName: string): string;
2459
+ }
2460
+
2461
+ interface CheckResult {
2462
+ status: "pass" | "warn" | "fail";
2463
+ message: string;
2464
+ fixable?: boolean;
2465
+ fixRisk?: "safe" | "risky";
2466
+ fix?: () => Promise<FixResult>;
2467
+ }
2468
+ interface FixResult {
2469
+ success: boolean;
2470
+ message: string;
2471
+ }
2472
+ interface DoctorReport {
2473
+ categories: CategoryResult[];
2474
+ summary: {
2475
+ passed: number;
2476
+ warnings: number;
2477
+ failed: number;
2478
+ fixed: number;
2479
+ };
2480
+ pendingFixes: PendingFix[];
2481
+ }
2482
+ interface CategoryResult {
2483
+ name: string;
2484
+ results: CheckResult[];
2485
+ }
2486
+ interface PendingFix {
2487
+ category: string;
2488
+ message: string;
2489
+ fix: () => Promise<FixResult>;
2490
+ }
2491
+
2492
+ declare class DoctorEngine {
2493
+ private dryRun;
2494
+ constructor(options?: {
2495
+ dryRun?: boolean;
2496
+ });
2497
+ runAll(): Promise<DoctorReport>;
2498
+ private buildContext;
2499
+ }
2500
+
2413
2501
  interface ConfigFieldDef {
2414
2502
  path: string;
2415
2503
  displayName: string;
@@ -2855,94 +2943,6 @@ declare function resolveToolIcon(tool: {
2855
2943
  kind?: string;
2856
2944
  }): string;
2857
2945
 
2858
- interface RegisteredCommand extends CommandDef {
2859
- /** Scope extracted from pluginName, e.g. '@openacp/speech' → 'speech' */
2860
- scope?: string;
2861
- }
2862
- /**
2863
- * Central command registry with namespace resolution and adapter-specific overrides.
2864
- *
2865
- * Namespace rules:
2866
- * - System commands always own the short name.
2867
- * - Among plugins, the first to register wins the short name.
2868
- * - Every plugin command also gets a qualified name: `scope:name`.
2869
- * - Adapter plugins (@openacp/telegram, @openacp/discord, @openacp/slack)
2870
- * registering a command that already exists → stored as an override
2871
- * keyed by `channelId:commandName`, used when channelId matches.
2872
- */
2873
- declare class CommandRegistry {
2874
- /** Main registry: short names + qualified names → RegisteredCommand */
2875
- private commands;
2876
- /** Adapter-specific overrides: `channelId:commandName` → RegisteredCommand */
2877
- private overrides;
2878
- private static ADAPTER_SCOPES;
2879
- /**
2880
- * Register a command definition.
2881
- * @param def - Command definition
2882
- * @param pluginName - Plugin that owns the command (set automatically by PluginContext)
2883
- */
2884
- register(def: CommandDef, pluginName?: string): void;
2885
- /** Retrieve a command by name (short or qualified). */
2886
- get(name: string): RegisteredCommand | undefined;
2887
- /** Remove a command by short name. Also removes its qualified name entry. */
2888
- unregister(name: string): void;
2889
- /** Remove all commands registered by a given plugin. */
2890
- unregisterByPlugin(pluginName: string): void;
2891
- /** Return all unique commands (deduplicated — each command appears once). */
2892
- getAll(): RegisteredCommand[];
2893
- /** Filter commands by category. */
2894
- getByCategory(category: 'system' | 'plugin'): RegisteredCommand[];
2895
- /**
2896
- * Parse and execute a command string.
2897
- * @param commandString - Full command string, e.g. "/greet hello world"
2898
- * @param baseArgs - Base arguments (channelId, userId, etc.)
2899
- * @returns CommandResponse
2900
- */
2901
- execute(commandString: string, baseArgs: CommandArgs): Promise<CommandResponse>;
2902
- /** Extract scope from plugin name: '@openacp/speech' → 'speech', 'my-plugin' → 'my-plugin' */
2903
- static extractScope(pluginName: string): string;
2904
- }
2905
-
2906
- interface CheckResult {
2907
- status: "pass" | "warn" | "fail";
2908
- message: string;
2909
- fixable?: boolean;
2910
- fixRisk?: "safe" | "risky";
2911
- fix?: () => Promise<FixResult>;
2912
- }
2913
- interface FixResult {
2914
- success: boolean;
2915
- message: string;
2916
- }
2917
- interface DoctorReport {
2918
- categories: CategoryResult[];
2919
- summary: {
2920
- passed: number;
2921
- warnings: number;
2922
- failed: number;
2923
- fixed: number;
2924
- };
2925
- pendingFixes: PendingFix[];
2926
- }
2927
- interface CategoryResult {
2928
- name: string;
2929
- results: CheckResult[];
2930
- }
2931
- interface PendingFix {
2932
- category: string;
2933
- message: string;
2934
- fix: () => Promise<FixResult>;
2935
- }
2936
-
2937
- declare class DoctorEngine {
2938
- private dryRun;
2939
- constructor(options?: {
2940
- dryRun?: boolean;
2941
- });
2942
- runAll(): Promise<DoctorReport>;
2943
- private buildContext;
2944
- }
2945
-
2946
2946
  /**
2947
2947
  * OpenACP Product Guide — comprehensive reference for the AI assistant.
2948
2948
  * The assistant reads this at runtime to answer user questions about features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openacp/cli",
3
- "version": "2026.0327.2",
3
+ "version": "2026.0327.3",
4
4
  "description": "Self-hosted bridge for AI coding agents via ACP protocol",
5
5
  "type": "module",
6
6
  "bin": {