apcore-cli 0.8.0 → 0.9.0

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.
package/dist/index.d.ts CHANGED
@@ -69,6 +69,13 @@ type ApcliConfig = boolean | {
69
69
  exclude?: string[];
70
70
  disableEnv?: boolean;
71
71
  };
72
+ /**
73
+ * Default name of the built-in command group. Overridable per ApcliGroup
74
+ * instance via the `name` constructor option, or via createCli's
75
+ * `builtinGroupName` option. Cross-SDK parity with Python
76
+ * `DEFAULT_BUILTIN_GROUP_NAME` (2026-05-08).
77
+ */
78
+ declare const DEFAULT_BUILTIN_GROUP_NAME = "apcli";
72
79
  /**
73
80
  * Set of group names reserved by apcore-cli when no rename is configured.
74
81
  * Default mirrors {@link DEFAULT_BUILTIN_GROUP_NAME}; when `builtinGroupName`
@@ -76,6 +83,16 @@ type ApcliConfig = boolean | {
76
83
  * is applied per-instance during the cli.ts collision check.
77
84
  */
78
85
  declare const RESERVED_GROUP_NAMES: ReadonlySet<string>;
86
+ /**
87
+ * Canonical set of apcli subcommand names.
88
+ *
89
+ * Declarative mirror of the registration TABLE in `src/main.ts`
90
+ * (`_registerApcliSubcommands`). Used by `_normalizeList` to warn on
91
+ * unknown entries in include/exclude lists (spec §7 error table / T-APCLI-25).
92
+ *
93
+ * Keep in sync with main.ts TABLE if subcommands are added or removed.
94
+ */
95
+ declare const APCLI_SUBCOMMAND_NAMES: ReadonlySet<string>;
79
96
  /**
80
97
  * Visibility configuration for the built-in `apcli` command group.
81
98
  *
@@ -178,7 +195,7 @@ declare class ApcliGroup {
178
195
  * Protocol spec: CLI command structure & lazy loading
179
196
  */
180
197
 
181
- /** Placeholder for apcore-js Registry. */
198
+ /** CLI-internal Registry shim (see D9-W2 note above). */
182
199
  interface Registry {
183
200
  listModules(): ModuleDescriptor[];
184
201
  getModule(moduleId: string): ModuleDescriptor | null;
@@ -375,7 +392,9 @@ declare class GroupedModuleGroup extends LazyModuleGroup {
375
392
  */
376
393
  declare function validateModuleId(moduleId: string): void;
377
394
 
378
- /** Set the verbose help flag. When false, built-in options are hidden from help. */
395
+ /** Set the all-options help flag. When false, built-in options are hidden from help. */
396
+ declare function setAllOptionsHelp(allOptions: boolean): void;
397
+ /** @deprecated Use {@link setAllOptionsHelp} instead. Kept for backward compatibility. */
379
398
  declare function setVerboseHelp(verbose: boolean): void;
380
399
  /**
381
400
  * Set the base URL for online documentation links shown in help and man pages.
@@ -417,6 +436,12 @@ interface APCore {
417
436
  interface CreateCliOptions {
418
437
  extensionsDir?: string;
419
438
  progName?: string;
439
+ /**
440
+ * Show all options in help output (controls `--all-options` behaviour;
441
+ * parameter was named `verbose` prior to v0.9.0).
442
+ */
443
+ allOptions?: boolean;
444
+ /** @deprecated Use {@link allOptions} instead. Kept for backward compatibility with pre-v0.9.0 callers. */
420
445
  verbose?: boolean;
421
446
  /**
422
447
  * APCore unified client instance (apcore-js >= 0.18.0).
@@ -493,9 +518,10 @@ interface CreateCliOptions {
493
518
  *
494
519
  * @param extensionsDirOrOpts Path to extensions directory, or a CreateCliOptions object.
495
520
  * @param progName Program name shown in help (default: apcore-cli)
496
- * @param verbose Show verbose help output
521
+ * @param allOptions Show all options in help output (controls `--all-options` behaviour;
522
+ * parameter was named `verbose` prior to v0.9.0)
497
523
  */
498
- declare function createCli(extensionsDirOrOpts?: string | CreateCliOptions, progName?: string, verbose?: boolean): Command;
524
+ declare function createCli(extensionsDirOrOpts?: string | CreateCliOptions, progName?: string, allOptions?: boolean): Command;
499
525
  /** Options bag for {@link applyToolkitIntegration}. */
500
526
  interface ApplyToolkitIntegrationOptions {
501
527
  /**
@@ -826,6 +852,18 @@ declare class ApprovalDeniedError extends Error {
826
852
  declare class SchemaValidationError extends Error {
827
853
  constructor(message?: string);
828
854
  }
855
+ /** Thrown when $ref resolution depth exceeds the configured maximum. */
856
+ declare class MaxDepthExceededError extends Error {
857
+ constructor(message?: string);
858
+ }
859
+ /** Thrown when a circular $ref is detected during schema resolution. */
860
+ declare class CircularRefError extends Error {
861
+ constructor(message?: string);
862
+ }
863
+ /** Thrown when a $ref target cannot be found in $defs/definitions. */
864
+ declare class UnresolvableRefError extends Error {
865
+ constructor(message?: string);
866
+ }
829
867
  /** Thrown when a module is not found. */
830
868
  declare class ModuleNotFoundError extends Error {
831
869
  constructor(message?: string);
@@ -950,8 +988,19 @@ declare class ConfigEncryptor {
950
988
  */
951
989
  declare class AuthProvider {
952
990
  private readonly config;
953
- private readonly encryptor;
991
+ private readonly _encryptor?;
954
992
  constructor(config: ConfigResolver, encryptor?: ConfigEncryptor);
993
+ /**
994
+ * Resolve the active ConfigEncryptor instance.
995
+ *
996
+ * D11-005 (2026-05-12): three-tier fallback chain matching Python's
997
+ * `_get_encryptor` (auth.py:33): explicit constructor arg > peer attribute
998
+ * `config.encryptor` (set by embedders injecting forced-AES test fixtures
999
+ * or shared instances) > fresh `new ConfigEncryptor()`. Previously TS
1000
+ * skipped the peer-attribute tier, silently giving embedders a different
1001
+ * encryptor than the one they wired on the config.
1002
+ */
1003
+ private getEncryptor;
955
1004
  /**
956
1005
  * Retrieve the API key from the configured sources.
957
1006
  * Handles keyring: and enc: prefixes via ConfigEncryptor.
@@ -1027,4 +1076,4 @@ declare class Sandbox {
1027
1076
  private _sandboxedExecute;
1028
1077
  }
1029
1078
 
1030
- export { type APCore, type ApcliConfig, ApcliGroup, ApcliGroupError, type ApcliMode, type ApplyToolkitIntegrationOptions, ApprovalDeniedError, ApprovalTimeoutError, AuditLogger, AuthProvider, AuthenticationError, CliApprovalHandler, ConfigDecryptionError, ConfigEncryptor, ConfigResolver, type CreateCliOptions, DEFAULTS, EXIT_CODES, type Executor, type ExitCode, ExposureFilter, GroupedModuleGroup, LazyGroup, LazyModuleGroup, type ModuleDescriptor, ModuleExecutionError, ModuleNotFoundError, type OptionConfig, type PipelineTrace, type PipelineTraceStep, type PreflightCheck, type PreflightResult, RESERVED_GROUP_NAMES, type Registry, Sandbox, SchemaValidationError, type StrategyInfo, type StrategyStep, applyToolkitIntegration, buildModuleCommand, checkApproval, collectInput, configureManHelp, createCli, exitCodeForError, formatExecResult, formatModuleDetail, formatModuleList, getAuditLogger, getLogLevel, main, reconvertEnumValues, registerCompletionCommand, registerConfigCommand, registerConfigNamespace, registerDescribeCommand, registerDisableCommand, registerEnableCommand, registerExecCommand, registerHealthCommand, registerInitCommand, registerListCommand, registerPipelineCommand, registerReloadCommand, registerUsageCommand, registerValidateCommand, resolveFormat, resolveRefs, schemaToCliOptions, setAuditLogger, setDocsUrl, setLogLevel, setVerboseHelp, validateModuleId };
1079
+ export { APCLI_SUBCOMMAND_NAMES, type APCore, type ApcliConfig, ApcliGroup, ApcliGroupError, type ApcliMode, type ApplyToolkitIntegrationOptions, ApprovalDeniedError, ApprovalTimeoutError, AuditLogger, AuthProvider, AuthenticationError, CircularRefError, CliApprovalHandler, ConfigDecryptionError, ConfigEncryptor, ConfigResolver, type CreateCliOptions, DEFAULTS, DEFAULT_BUILTIN_GROUP_NAME, EXIT_CODES, type Executor, type ExitCode, ExposureFilter, GroupedModuleGroup, LazyGroup, LazyModuleGroup, MaxDepthExceededError, type ModuleDescriptor, ModuleExecutionError, ModuleNotFoundError, type OptionConfig, type PipelineTrace, type PipelineTraceStep, type PreflightCheck, type PreflightResult, RESERVED_GROUP_NAMES, type Registry, Sandbox, SchemaValidationError, type StrategyInfo, type StrategyStep, UnresolvableRefError, applyToolkitIntegration, buildModuleCommand, checkApproval, collectInput, configureManHelp, createCli, exitCodeForError, formatExecResult, formatModuleDetail, formatModuleList, getAuditLogger, getLogLevel, main, reconvertEnumValues, registerCompletionCommand, registerConfigCommand, registerConfigNamespace, registerDescribeCommand, registerDisableCommand, registerEnableCommand, registerExecCommand, registerHealthCommand, registerInitCommand, registerListCommand, registerPipelineCommand, registerReloadCommand, registerUsageCommand, registerValidateCommand, resolveFormat, resolveRefs, schemaToCliOptions, setAllOptionsHelp, setAuditLogger, setDocsUrl, setLogLevel, setVerboseHelp, validateModuleId };