@qodalis/cli-server-abstractions 1.0.0-beta.4 → 1.0.0-beta.6

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 (56) hide show
  1. package/README.md +0 -1
  2. package/dist/cli-command-author.d.ts +5 -0
  3. package/dist/cli-command-author.d.ts.map +1 -1
  4. package/dist/cli-command-author.js +2 -0
  5. package/dist/cli-command-author.js.map +1 -1
  6. package/dist/cli-command-parameter-descriptor.d.ts +16 -0
  7. package/dist/cli-command-parameter-descriptor.d.ts.map +1 -1
  8. package/dist/cli-command-parameter-descriptor.js +9 -0
  9. package/dist/cli-command-parameter-descriptor.js.map +1 -1
  10. package/dist/cli-command-processor.d.ts +37 -5
  11. package/dist/cli-command-processor.d.ts.map +1 -1
  12. package/dist/cli-command-processor.js +5 -1
  13. package/dist/cli-command-processor.js.map +1 -1
  14. package/dist/cli-process-command.d.ts +7 -0
  15. package/dist/cli-process-command.d.ts.map +1 -1
  16. package/dist/cli-processor-filter.d.ts +14 -0
  17. package/dist/cli-processor-filter.d.ts.map +1 -0
  18. package/dist/cli-processor-filter.js +3 -0
  19. package/dist/cli-processor-filter.js.map +1 -0
  20. package/dist/cli-stream-command-processor.d.ts +27 -0
  21. package/dist/cli-stream-command-processor.d.ts.map +1 -0
  22. package/dist/cli-stream-command-processor.js +13 -0
  23. package/dist/cli-stream-command-processor.js.map +1 -0
  24. package/dist/cli-structured-response.d.ts +31 -0
  25. package/dist/cli-structured-response.d.ts.map +1 -0
  26. package/dist/cli-structured-response.js +3 -0
  27. package/dist/cli-structured-response.js.map +1 -0
  28. package/dist/data-explorer-provider.d.ts +17 -0
  29. package/dist/data-explorer-provider.d.ts.map +1 -0
  30. package/dist/data-explorer-provider.js +3 -0
  31. package/dist/data-explorer-provider.js.map +1 -0
  32. package/dist/data-explorer-types.d.ts +143 -0
  33. package/dist/data-explorer-types.d.ts.map +1 -0
  34. package/dist/data-explorer-types.js +22 -0
  35. package/dist/data-explorer-types.js.map +1 -0
  36. package/dist/index.d.ts +5 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +6 -1
  39. package/dist/index.js.map +1 -1
  40. package/dist/jobs/cli-job-execution-context.d.ts +2 -0
  41. package/dist/jobs/cli-job-execution-context.d.ts.map +1 -1
  42. package/dist/jobs/cli-job-logger.d.ts +5 -0
  43. package/dist/jobs/cli-job-logger.d.ts.map +1 -1
  44. package/dist/jobs/cli-job-options.d.ts +3 -0
  45. package/dist/jobs/cli-job-options.d.ts.map +1 -1
  46. package/dist/jobs/cli-job-storage-provider.d.ts +12 -0
  47. package/dist/jobs/cli-job-storage-provider.d.ts.map +1 -1
  48. package/dist/jobs/cli-job.d.ts +6 -0
  49. package/dist/jobs/cli-job.d.ts.map +1 -1
  50. package/dist/jobs/job-execution.d.ts +12 -0
  51. package/dist/jobs/job-execution.d.ts.map +1 -1
  52. package/dist/jobs/job-state.d.ts +5 -0
  53. package/dist/jobs/job-state.d.ts.map +1 -1
  54. package/dist/jobs/log-entry.d.ts +5 -0
  55. package/dist/jobs/log-entry.d.ts.map +1 -1
  56. package/package.json +1 -1
package/README.md CHANGED
@@ -68,7 +68,6 @@ Then register the processor with the server package. See [`@qodalis/cli-server-n
68
68
  | `description` | `string` | *(abstract)* | Human-readable description shown in help |
69
69
  | `author` | `ICliCommandAuthor` | `DefaultLibraryAuthor` | Author metadata |
70
70
  | `version` | `string` | `'1.0.0'` | Processor version |
71
- | `apiVersion` | `number` | `1` | Minimum API version this processor targets |
72
71
  | `allowUnlistedCommands` | `boolean?` | `undefined` | Accept sub-commands not in `processors` list |
73
72
  | `valueRequired` | `boolean?` | `undefined` | Whether a positional value argument is required |
74
73
  | `processors` | `ICliCommandProcessor[]?` | `undefined` | Nested sub-command processors |
@@ -1,11 +1,16 @@
1
+ /** Describes the author of a CLI command processor. */
1
2
  export interface ICliCommandAuthor {
3
+ /** Display name of the author. */
2
4
  name: string;
5
+ /** Contact email of the author. */
3
6
  email: string;
4
7
  }
8
+ /** Concrete implementation of {@link ICliCommandAuthor}. */
5
9
  export declare class CliCommandAuthor implements ICliCommandAuthor {
6
10
  name: string;
7
11
  email: string;
8
12
  constructor(name: string, email: string);
9
13
  }
14
+ /** Default author used for built-in library processors. */
10
15
  export declare const DefaultLibraryAuthor: ICliCommandAuthor;
11
16
  //# sourceMappingURL=cli-command-author.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-command-author.d.ts","sourceRoot":"","sources":["../src/cli-command-author.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,gBAAiB,YAAW,iBAAiB;IAE3C,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;gBADb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM;CAE3B;AAED,eAAO,MAAM,oBAAoB,EAAE,iBAGlC,CAAC"}
1
+ {"version":3,"file":"cli-command-author.d.ts","sourceRoot":"","sources":["../src/cli-command-author.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAC9B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,4DAA4D;AAC5D,qBAAa,gBAAiB,YAAW,iBAAiB;IAE3C,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;gBADb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM;CAE3B;AAED,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,EAAE,iBAGlC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DefaultLibraryAuthor = exports.CliCommandAuthor = void 0;
4
+ /** Concrete implementation of {@link ICliCommandAuthor}. */
4
5
  class CliCommandAuthor {
5
6
  name;
6
7
  email;
@@ -10,5 +11,6 @@ class CliCommandAuthor {
10
11
  }
11
12
  }
12
13
  exports.CliCommandAuthor = CliCommandAuthor;
14
+ /** Default author used for built-in library processors. */
13
15
  exports.DefaultLibraryAuthor = new CliCommandAuthor('Nicolae Lupei', 'nicolae.lupei@qodalis.com');
14
16
  //# sourceMappingURL=cli-command-author.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-command-author.js","sourceRoot":"","sources":["../src/cli-command-author.ts"],"names":[],"mappings":";;;AAKA,MAAa,gBAAgB;IAEd;IACA;IAFX,YACW,IAAY,EACZ,KAAa;QADb,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;IACrB,CAAC;CACP;AALD,4CAKC;AAEY,QAAA,oBAAoB,GAAsB,IAAI,gBAAgB,CACvE,eAAe,EACf,2BAA2B,CAC9B,CAAC"}
1
+ {"version":3,"file":"cli-command-author.js","sourceRoot":"","sources":["../src/cli-command-author.ts"],"names":[],"mappings":";;;AAQA,4DAA4D;AAC5D,MAAa,gBAAgB;IAEd;IACA;IAFX,YACW,IAAY,EACZ,KAAa;QADb,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;IACrB,CAAC;CACP;AALD,4CAKC;AAED,2DAA2D;AAC9C,QAAA,oBAAoB,GAAsB,IAAI,gBAAgB,CACvE,eAAe,EACf,2BAA2B,CAC9B,CAAC"}
@@ -1,11 +1,19 @@
1
+ /** Describes a parameter accepted by a CLI command processor. */
1
2
  export interface ICliCommandParameterDescriptor {
3
+ /** Parameter name (e.g. "algorithm"). */
2
4
  name: string;
5
+ /** Short alias flags (e.g. ["-a"]). */
3
6
  aliases?: string[];
7
+ /** Human-readable description shown in help output. */
4
8
  description: string;
9
+ /** Whether the parameter must be provided. */
5
10
  required: boolean;
11
+ /** Expected value type (e.g. "string", "boolean", "number"). */
6
12
  type: string;
13
+ /** Default value used when the parameter is omitted. */
7
14
  defaultValue?: any;
8
15
  }
16
+ /** Concrete implementation of {@link ICliCommandParameterDescriptor}. */
9
17
  export declare class CliCommandParameterDescriptor implements ICliCommandParameterDescriptor {
10
18
  name: string;
11
19
  description: string;
@@ -13,6 +21,14 @@ export declare class CliCommandParameterDescriptor implements ICliCommandParamet
13
21
  type: string;
14
22
  aliases?: string[] | undefined;
15
23
  defaultValue?: any | undefined;
24
+ /**
25
+ * @param name - Parameter name.
26
+ * @param description - Human-readable description.
27
+ * @param required - Whether the parameter is mandatory.
28
+ * @param type - Expected value type.
29
+ * @param aliases - Short alias flags.
30
+ * @param defaultValue - Default value when omitted.
31
+ */
16
32
  constructor(name: string, description: string, required?: boolean, type?: string, aliases?: string[] | undefined, defaultValue?: any | undefined);
17
33
  }
18
34
  //# sourceMappingURL=cli-command-parameter-descriptor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-command-parameter-descriptor.d.ts","sourceRoot":"","sources":["../src/cli-command-parameter-descriptor.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,8BAA8B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,GAAG,CAAC;CACtB;AAED,qBAAa,6BAA8B,YAAW,8BAA8B;IAErE,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE,MAAM;IACZ,OAAO,CAAC,EAAE,MAAM,EAAE;IAClB,YAAY,CAAC,EAAE,GAAG;gBALlB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,QAAQ,GAAE,OAAe,EACzB,IAAI,GAAE,MAAiB,EACvB,OAAO,CAAC,EAAE,MAAM,EAAE,YAAA,EAClB,YAAY,CAAC,EAAE,GAAG,YAAA;CAEhC"}
1
+ {"version":3,"file":"cli-command-parameter-descriptor.d.ts","sourceRoot":"","sources":["../src/cli-command-parameter-descriptor.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,WAAW,8BAA8B;IAC3C,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,QAAQ,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,YAAY,CAAC,EAAE,GAAG,CAAC;CACtB;AAED,yEAAyE;AACzE,qBAAa,6BAA8B,YAAW,8BAA8B;IAUrE,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE,MAAM;IACZ,OAAO,CAAC,EAAE,MAAM,EAAE;IAClB,YAAY,CAAC,EAAE,GAAG;IAd7B;;;;;;;OAOG;gBAEQ,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,QAAQ,GAAE,OAAe,EACzB,IAAI,GAAE,MAAiB,EACvB,OAAO,CAAC,EAAE,MAAM,EAAE,YAAA,EAClB,YAAY,CAAC,EAAE,GAAG,YAAA;CAEhC"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CliCommandParameterDescriptor = void 0;
4
+ /** Concrete implementation of {@link ICliCommandParameterDescriptor}. */
4
5
  class CliCommandParameterDescriptor {
5
6
  name;
6
7
  description;
@@ -8,6 +9,14 @@ class CliCommandParameterDescriptor {
8
9
  type;
9
10
  aliases;
10
11
  defaultValue;
12
+ /**
13
+ * @param name - Parameter name.
14
+ * @param description - Human-readable description.
15
+ * @param required - Whether the parameter is mandatory.
16
+ * @param type - Expected value type.
17
+ * @param aliases - Short alias flags.
18
+ * @param defaultValue - Default value when omitted.
19
+ */
11
20
  constructor(name, description, required = false, type = 'string', aliases, defaultValue) {
12
21
  this.name = name;
13
22
  this.description = description;
@@ -1 +1 @@
1
- {"version":3,"file":"cli-command-parameter-descriptor.js","sourceRoot":"","sources":["../src/cli-command-parameter-descriptor.ts"],"names":[],"mappings":";;;AASA,MAAa,6BAA6B;IAE3B;IACA;IACA;IACA;IACA;IACA;IANX,YACW,IAAY,EACZ,WAAmB,EACnB,WAAoB,KAAK,EACzB,OAAe,QAAQ,EACvB,OAAkB,EAClB,YAAkB;QALlB,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QACnB,aAAQ,GAAR,QAAQ,CAAiB;QACzB,SAAI,GAAJ,IAAI,CAAmB;QACvB,YAAO,GAAP,OAAO,CAAW;QAClB,iBAAY,GAAZ,YAAY,CAAM;IAC1B,CAAC;CACP;AATD,sEASC"}
1
+ {"version":3,"file":"cli-command-parameter-descriptor.js","sourceRoot":"","sources":["../src/cli-command-parameter-descriptor.ts"],"names":[],"mappings":";;;AAgBA,yEAAyE;AACzE,MAAa,6BAA6B;IAU3B;IACA;IACA;IACA;IACA;IACA;IAdX;;;;;;;OAOG;IACH,YACW,IAAY,EACZ,WAAmB,EACnB,WAAoB,KAAK,EACzB,OAAe,QAAQ,EACvB,OAAkB,EAClB,YAAkB;QALlB,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAQ;QACnB,aAAQ,GAAR,QAAQ,CAAiB;QACzB,SAAI,GAAJ,IAAI,CAAmB;QACvB,YAAO,GAAP,OAAO,CAAW;QAClB,iBAAY,GAAZ,YAAY,CAAM;IAC1B,CAAC;CACP;AAjBD,sEAiBC"}
@@ -1,19 +1,50 @@
1
1
  import { ICliCommandAuthor } from './cli-command-author';
2
2
  import { ICliCommandParameterDescriptor } from './cli-command-parameter-descriptor';
3
3
  import { CliProcessCommand } from './cli-process-command';
4
+ import { CliStructuredResponse } from './cli-structured-response';
5
+ /** Contract for a CLI command processor that handles one command (and optionally sub-commands). */
4
6
  export interface ICliCommandProcessor {
7
+ /** Primary command keyword (e.g. "echo", "hash"). */
5
8
  command: string;
9
+ /** Short description shown in help/listing output. */
6
10
  description: string;
11
+ /** Author metadata for this processor. */
7
12
  author: ICliCommandAuthor;
13
+ /** When true, sub-commands not listed in {@link processors} are forwarded to this processor. */
8
14
  allowUnlistedCommands?: boolean;
15
+ /** When true, the command requires a positional value argument. */
9
16
  valueRequired?: boolean;
17
+ /** Semantic version of this processor. */
10
18
  version: string;
11
- /** Minimum API version this processor is available in. Defaults to 1. */
12
- apiVersion?: number;
19
+ /** Nested sub-command processors. */
13
20
  processors?: ICliCommandProcessor[];
21
+ /** Parameter descriptors for this command. */
14
22
  parameters?: ICliCommandParameterDescriptor[];
15
- handleAsync(command: CliProcessCommand): Promise<string>;
23
+ /**
24
+ * Permissions required to execute this command (all of them), enforced
25
+ * server-side when the users plugin protects the server.
26
+ */
27
+ requiredPermissions?: string[];
28
+ /**
29
+ * Executes the command and returns a plain-text result.
30
+ * @param command - Parsed command with arguments.
31
+ * @param signal - Optional AbortSignal to cancel the operation.
32
+ * @returns Plain-text output string.
33
+ */
34
+ handleAsync(command: CliProcessCommand, signal?: AbortSignal): Promise<string>;
35
+ /**
36
+ * Executes the command and returns a structured response with typed outputs.
37
+ * When implemented, takes precedence over {@link handleAsync}.
38
+ * @param command - Parsed command with arguments.
39
+ * @param signal - Optional AbortSignal to cancel the operation.
40
+ * @returns Structured response containing exit code and typed outputs.
41
+ */
42
+ handleStructuredAsync?(command: CliProcessCommand, signal?: AbortSignal): Promise<CliStructuredResponse>;
16
43
  }
44
+ /**
45
+ * Abstract base class for CLI command processors with sensible defaults.
46
+ * Extend this class and implement {@link handleAsync} to create a new command.
47
+ */
17
48
  export declare abstract class CliCommandProcessor implements ICliCommandProcessor {
18
49
  abstract command: string;
19
50
  abstract description: string;
@@ -21,9 +52,10 @@ export declare abstract class CliCommandProcessor implements ICliCommandProcesso
21
52
  allowUnlistedCommands?: boolean;
22
53
  valueRequired?: boolean;
23
54
  version: string;
24
- apiVersion: number;
25
55
  processors?: ICliCommandProcessor[];
26
56
  parameters?: ICliCommandParameterDescriptor[];
27
- abstract handleAsync(command: CliProcessCommand): Promise<string>;
57
+ requiredPermissions?: string[];
58
+ abstract handleAsync(command: CliProcessCommand, signal?: AbortSignal): Promise<string>;
59
+ handleStructuredAsync?(command: CliProcessCommand, signal?: AbortSignal): Promise<CliStructuredResponse>;
28
60
  }
29
61
  //# sourceMappingURL=cli-command-processor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-command-processor.d.ts","sourceRoot":"","sources":["../src/cli-command-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAwB,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACpC,UAAU,CAAC,EAAE,8BAA8B,EAAE,CAAC;IAC9C,WAAW,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5D;AAED,8BAAsB,mBAAoB,YAAW,oBAAoB;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAwB;IACjD,qBAAqB,C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;;;;OAMG;IACH,qBAAqB,CAAC,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAC5G;AAED;;;GAGG;AACH,8BAAsB,mBAAoB,YAAW,oBAAoB;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAwB;IACjD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAW;IAC1B,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACpC,UAAU,CAAC,EAAE,8BAA8B,EAAE,CAAC;IAC9C,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/B,QAAQ,CAAC,WAAW,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IACvF,qBAAqB,CAAC,CAAC,OAAO,EAAE,iBAAiB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAC3G"}
@@ -2,14 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CliCommandProcessor = void 0;
4
4
  const cli_command_author_1 = require("./cli-command-author");
5
+ /**
6
+ * Abstract base class for CLI command processors with sensible defaults.
7
+ * Extend this class and implement {@link handleAsync} to create a new command.
8
+ */
5
9
  class CliCommandProcessor {
6
10
  author = cli_command_author_1.DefaultLibraryAuthor;
7
11
  allowUnlistedCommands;
8
12
  valueRequired;
9
13
  version = '1.0.0';
10
- apiVersion = 1;
11
14
  processors;
12
15
  parameters;
16
+ requiredPermissions;
13
17
  }
14
18
  exports.CliCommandProcessor = CliCommandProcessor;
15
19
  //# sourceMappingURL=cli-command-processor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-command-processor.js","sourceRoot":"","sources":["../src/cli-command-processor.ts"],"names":[],"mappings":";;;AAAA,6DAA+E;AAkB/E,MAAsB,mBAAmB;IAGrC,MAAM,GAAsB,yCAAoB,CAAC;IACjD,qBAAqB,CAAW;IAChC,aAAa,CAAW;IACxB,OAAO,GAAW,OAAO,CAAC;IAC1B,UAAU,GAAW,CAAC,CAAC;IACvB,UAAU,CAA0B;IACpC,UAAU,CAAoC;CAGjD;AAZD,kDAYC"}
1
+ {"version":3,"file":"cli-command-processor.js","sourceRoot":"","sources":["../src/cli-command-processor.ts"],"names":[],"mappings":";;;AAAA,6DAA+E;AA6C/E;;;GAGG;AACH,MAAsB,mBAAmB;IAGrC,MAAM,GAAsB,yCAAoB,CAAC;IACjD,qBAAqB,CAAW;IAChC,aAAa,CAAW;IACxB,OAAO,GAAW,OAAO,CAAC;IAC1B,UAAU,CAA0B;IACpC,UAAU,CAAoC;IAC9C,mBAAmB,CAAY;CAIlC;AAbD,kDAaC"}
@@ -1,9 +1,16 @@
1
+ /** Parsed representation of a CLI command submitted for execution. */
1
2
  export interface CliProcessCommand {
3
+ /** Primary command keyword (e.g. "hash", "http"). */
2
4
  command: string;
5
+ /** Optional payload data attached to the command. */
3
6
  data?: any;
7
+ /** Sub-command chain following the primary command (e.g. ["encode"] for "base64 encode"). */
4
8
  chainCommands: string[];
9
+ /** Original unparsed command string as entered by the user. */
5
10
  rawCommand: string;
11
+ /** Positional value argument (the first non-flag token after the command). */
6
12
  value?: string;
13
+ /** Named arguments parsed from flags (e.g. { algorithm: "sha256" }). */
7
14
  args: Record<string, any>;
8
15
  }
9
16
  //# sourceMappingURL=cli-process-command.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-process-command.d.ts","sourceRoot":"","sources":["../src/cli-process-command.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B"}
1
+ {"version":3,"file":"cli-process-command.d.ts","sourceRoot":"","sources":["../src/cli-process-command.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,WAAW,iBAAiB;IAC9B,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,6FAA6F;IAC7F,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B"}
@@ -0,0 +1,14 @@
1
+ import { ICliCommandProcessor } from './cli-command-processor';
2
+ /**
3
+ * Provides a mechanism to filter whether a command processor is allowed to execute.
4
+ * Implementations can use this to disable processors at runtime (e.g., when a plugin is toggled off).
5
+ */
6
+ export interface ICliProcessorFilter {
7
+ /**
8
+ * Determines whether the given command processor is allowed to execute.
9
+ * @param processor - The command processor to check.
10
+ * @returns `true` if the processor is allowed; `false` if it should be blocked.
11
+ */
12
+ isAllowed(processor: ICliCommandProcessor): boolean;
13
+ }
14
+ //# sourceMappingURL=cli-processor-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-processor-filter.d.ts","sourceRoot":"","sources":["../src/cli-processor-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;OAIG;IACH,SAAS,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC;CACvD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=cli-processor-filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-processor-filter.js","sourceRoot":"","sources":["../src/cli-processor-filter.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ import { CliProcessCommand } from './cli-process-command';
2
+ import { CliStructuredOutput } from './cli-structured-response';
3
+ /**
4
+ * Optional interface for command processors that support streaming output.
5
+ * Processors implementing this interface can emit output chunks incrementally
6
+ * via the `emit` callback, enabling real-time rendering on the client.
7
+ *
8
+ * A processor can implement both ICliCommandProcessor and ICliStreamCommandProcessor.
9
+ * The stream execution endpoint will prefer this interface when available.
10
+ */
11
+ export interface ICliStreamCommandProcessor {
12
+ /** Must match the command keyword of the corresponding ICliCommandProcessor. */
13
+ readonly command: string;
14
+ /**
15
+ * Execute the command, emitting output chunks as they become available.
16
+ * @param command - Parsed command with arguments.
17
+ * @param emit - Callback to send a single output chunk to the client.
18
+ * @param signal - Optional AbortSignal to cancel the operation.
19
+ * @returns Exit code (0 for success).
20
+ */
21
+ handleStreamAsync(command: CliProcessCommand, emit: (output: CliStructuredOutput) => void, signal?: AbortSignal): Promise<number>;
22
+ }
23
+ /**
24
+ * Type guard to check if a processor supports streaming.
25
+ */
26
+ export declare function isStreamCapable(processor: unknown): processor is ICliStreamCommandProcessor;
27
+ //# sourceMappingURL=cli-stream-command-processor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-stream-command-processor.d.ts","sourceRoot":"","sources":["../src/cli-stream-command-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IACvC,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;OAMG;IACH,iBAAiB,CACb,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,EAC3C,MAAM,CAAC,EAAE,WAAW,GACrB,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC3B,SAAS,EAAE,OAAO,GACnB,SAAS,IAAI,0BAA0B,CAOzC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isStreamCapable = isStreamCapable;
4
+ /**
5
+ * Type guard to check if a processor supports streaming.
6
+ */
7
+ function isStreamCapable(processor) {
8
+ return (typeof processor === 'object' &&
9
+ processor !== null &&
10
+ 'handleStreamAsync' in processor &&
11
+ typeof processor.handleStreamAsync === 'function');
12
+ }
13
+ //# sourceMappingURL=cli-stream-command-processor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-stream-command-processor.js","sourceRoot":"","sources":["../src/cli-stream-command-processor.ts"],"names":[],"mappings":";;AAgCA,0CASC;AAZD;;GAEG;AACH,SAAgB,eAAe,CAC3B,SAAkB;IAElB,OAAO,CACH,OAAO,SAAS,KAAK,QAAQ;QAC7B,SAAS,KAAK,IAAI;QAClB,mBAAmB,IAAI,SAAS;QAChC,OAAQ,SAAiB,CAAC,iBAAiB,KAAK,UAAU,CAC7D,CAAC;AACN,CAAC"}
@@ -0,0 +1,31 @@
1
+ /** A single typed output block within a structured CLI response. */
2
+ export type CliStructuredOutput = {
3
+ type: 'text';
4
+ value: string;
5
+ style?: 'success' | 'error' | 'info' | 'warning';
6
+ } | {
7
+ type: 'table';
8
+ headers: string[];
9
+ rows: string[][];
10
+ } | {
11
+ type: 'list';
12
+ items: string[];
13
+ ordered?: boolean;
14
+ } | {
15
+ type: 'json';
16
+ value: any;
17
+ } | {
18
+ type: 'key-value';
19
+ entries: {
20
+ key: string;
21
+ value: string;
22
+ }[];
23
+ };
24
+ /** Response envelope returned by structured command execution, containing an exit code and typed outputs. */
25
+ export interface CliStructuredResponse {
26
+ /** Process exit code (0 for success, non-zero for errors). */
27
+ exitCode: number;
28
+ /** Ordered list of typed output blocks. */
29
+ outputs: CliStructuredOutput[];
30
+ }
31
+ //# sourceMappingURL=cli-structured-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-structured-response.d.ts","sourceRoot":"","sources":["../src/cli-structured-response.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,MAAM,MAAM,mBAAmB,GACzB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;CAAE,GACjF;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,GAAG,CAAA;CAAE,GAC5B;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC;AAEvE,6GAA6G;AAC7G,MAAM,WAAW,qBAAqB;IAClC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAClC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=cli-structured-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-structured-response.js","sourceRoot":"","sources":["../src/cli-structured-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import { DataExplorerExecutionContext, DataExplorerResult, DataExplorerSchemaResult, DataExplorerProviderOptions } from './data-explorer-types';
2
+ /** Provider that executes queries against a specific data source (e.g. SQL database, MongoDB). */
3
+ export interface IDataExplorerProvider {
4
+ /**
5
+ * Executes a query against the data source.
6
+ * @param context - Execution context containing the query, parameters, and options.
7
+ * @returns Query results including rows, columns, and execution metadata.
8
+ */
9
+ executeAsync(context: DataExplorerExecutionContext): Promise<DataExplorerResult>;
10
+ /**
11
+ * Retrieves schema information (tables, columns) from the data source.
12
+ * @param options - Provider options identifying the data source.
13
+ * @returns Schema metadata for the data source.
14
+ */
15
+ getSchemaAsync?(options: DataExplorerProviderOptions): Promise<DataExplorerSchemaResult>;
16
+ }
17
+ //# sourceMappingURL=data-explorer-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-explorer-provider.d.ts","sourceRoot":"","sources":["../src/data-explorer-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEhJ,kGAAkG;AAClG,MAAM,WAAW,qBAAqB;IAClC;;;;OAIG;IACH,YAAY,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACjF;;;;OAIG;IACH,cAAc,CAAC,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;CAC5F"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=data-explorer-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-explorer-provider.js","sourceRoot":"","sources":["../src/data-explorer-provider.ts"],"names":[],"mappings":""}
@@ -0,0 +1,143 @@
1
+ /** Query language supported by a data explorer provider. */
2
+ export declare enum DataExplorerLanguage {
3
+ Sql = "sql",
4
+ Json = "json",
5
+ Shell = "shell",
6
+ Graphql = "graphql",
7
+ Redis = "redis",
8
+ Elasticsearch = "elasticsearch"
9
+ }
10
+ /** Output format for data explorer query results. */
11
+ export declare enum DataExplorerOutputFormat {
12
+ Table = "table",
13
+ Json = "json",
14
+ Csv = "csv",
15
+ Raw = "raw"
16
+ }
17
+ /** Predefined query template for a data explorer provider. */
18
+ export interface DataExplorerTemplate {
19
+ /** Template display name. */
20
+ name: string;
21
+ /** Query string, optionally with parameter placeholders. */
22
+ query: string;
23
+ /** Human-readable description of what this template does. */
24
+ description?: string;
25
+ /** Default parameter values for this template. */
26
+ parameters?: Record<string, unknown>;
27
+ }
28
+ /** Describes a parameter accepted by a data explorer provider. */
29
+ export interface DataExplorerParameterDescriptor {
30
+ /** Parameter name. */
31
+ name: string;
32
+ /** Human-readable description. */
33
+ description?: string;
34
+ /** Whether the parameter must be provided. */
35
+ required?: boolean;
36
+ /** Default value when omitted. */
37
+ defaultValue?: unknown;
38
+ }
39
+ /** Configuration options that define a data explorer provider's identity and capabilities. */
40
+ export interface DataExplorerProviderOptions {
41
+ /** Unique provider name (e.g. "postgres", "mongodb"). */
42
+ name: string;
43
+ /** Human-readable description of the data source. */
44
+ description: string;
45
+ /** Query language used by this provider. */
46
+ language: DataExplorerLanguage;
47
+ /** Default output format for query results. */
48
+ defaultOutputFormat: DataExplorerOutputFormat;
49
+ /** Parameters accepted by this provider. */
50
+ parameters?: DataExplorerParameterDescriptor[];
51
+ /** Predefined query templates. */
52
+ templates?: DataExplorerTemplate[];
53
+ /** Query execution timeout in milliseconds. */
54
+ timeout?: number;
55
+ /** Maximum number of rows to return per query. */
56
+ maxRows?: number;
57
+ }
58
+ /** Context passed to a data explorer provider when executing a query. */
59
+ export interface DataExplorerExecutionContext {
60
+ /** Query string to execute. */
61
+ query: string;
62
+ /** Parameter values for the query. */
63
+ parameters: Record<string, unknown>;
64
+ /** Provider configuration options. */
65
+ options: DataExplorerProviderOptions;
66
+ /** Abort signal for cancellation. */
67
+ signal?: AbortSignal;
68
+ }
69
+ /** Result of a data explorer query execution. */
70
+ export interface DataExplorerResult {
71
+ /** Whether the query executed without errors. */
72
+ success: boolean;
73
+ /** Provider source name that produced this result. */
74
+ source: string;
75
+ /** Query language used. */
76
+ language: DataExplorerLanguage;
77
+ /** Output format of the result data. */
78
+ defaultOutputFormat: DataExplorerOutputFormat;
79
+ /** Query execution time in milliseconds. */
80
+ executionTime: number;
81
+ /** Column names, or null if not applicable. */
82
+ columns: string[] | null;
83
+ /** Result rows as arrays or objects. */
84
+ rows: unknown[][] | Record<string, unknown>[];
85
+ /** Total number of rows returned. */
86
+ rowCount: number;
87
+ /** Whether the result was truncated due to maxRows. */
88
+ truncated: boolean;
89
+ /** Error message if the query failed, otherwise null. */
90
+ error: string | null;
91
+ }
92
+ /** Request payload for executing a data explorer query. */
93
+ export interface DataExplorerExecuteRequest {
94
+ /** Target data source name. */
95
+ source: string;
96
+ /** Query string to execute. */
97
+ query: string;
98
+ /** Optional parameter values. */
99
+ parameters?: Record<string, unknown>;
100
+ }
101
+ /** Metadata about a registered data explorer source. */
102
+ export interface DataExplorerSourceInfo {
103
+ /** Source name. */
104
+ name: string;
105
+ /** Human-readable description. */
106
+ description: string;
107
+ /** Query language used by this source. */
108
+ language: DataExplorerLanguage;
109
+ /** Default output format. */
110
+ defaultOutputFormat: DataExplorerOutputFormat;
111
+ /** Available query templates. */
112
+ templates: DataExplorerTemplate[];
113
+ /** Accepted parameters. */
114
+ parameters: DataExplorerParameterDescriptor[];
115
+ }
116
+ /** Describes a single column within a data explorer schema table. */
117
+ export interface DataExplorerSchemaColumn {
118
+ /** Column name. */
119
+ name: string;
120
+ /** Data type (e.g. "varchar", "integer"). */
121
+ type: string;
122
+ /** Whether the column allows null values. */
123
+ nullable: boolean;
124
+ /** Whether the column is a primary key. */
125
+ primaryKey: boolean;
126
+ }
127
+ /** Describes a table or collection in a data explorer schema. */
128
+ export interface DataExplorerSchemaTable {
129
+ /** Table or collection name. */
130
+ name: string;
131
+ /** Object type (e.g. "table", "view", "collection"). */
132
+ type: string;
133
+ /** Columns within this table. */
134
+ columns: DataExplorerSchemaColumn[];
135
+ }
136
+ /** Schema introspection result from a data explorer provider. */
137
+ export interface DataExplorerSchemaResult {
138
+ /** Provider source name. */
139
+ source: string;
140
+ /** Tables and their column definitions. */
141
+ tables: DataExplorerSchemaTable[];
142
+ }
143
+ //# sourceMappingURL=data-explorer-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-explorer-types.d.ts","sourceRoot":"","sources":["../src/data-explorer-types.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,oBAAY,oBAAoB;IAC5B,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,aAAa,kBAAkB;CAClC;AAED,qDAAqD;AACrD,oBAAY,wBAAwB;IAChC,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,GAAG,QAAQ;CACd;AAED,8DAA8D;AAC9D,MAAM,WAAW,oBAAoB;IACjC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,kEAAkE;AAClE,MAAM,WAAW,+BAA+B;IAC5C,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kCAAkC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,8FA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 Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DataExplorerOutputFormat = exports.DataExplorerLanguage = void 0;
4
+ /** Query language supported by a data explorer provider. */
5
+ var DataExplorerLanguage;
6
+ (function (DataExplorerLanguage) {
7
+ DataExplorerLanguage["Sql"] = "sql";
8
+ DataExplorerLanguage["Json"] = "json";
9
+ DataExplorerLanguage["Shell"] = "shell";
10
+ DataExplorerLanguage["Graphql"] = "graphql";
11
+ DataExplorerLanguage["Redis"] = "redis";
12
+ DataExplorerLanguage["Elasticsearch"] = "elasticsearch";
13
+ })(DataExplorerLanguage || (exports.DataExplorerLanguage = DataExplorerLanguage = {}));
14
+ /** Output format for data explorer query results. */
15
+ var DataExplorerOutputFormat;
16
+ (function (DataExplorerOutputFormat) {
17
+ DataExplorerOutputFormat["Table"] = "table";
18
+ DataExplorerOutputFormat["Json"] = "json";
19
+ DataExplorerOutputFormat["Csv"] = "csv";
20
+ DataExplorerOutputFormat["Raw"] = "raw";
21
+ })(DataExplorerOutputFormat || (exports.DataExplorerOutputFormat = DataExplorerOutputFormat = {}));
22
+ //# sourceMappingURL=data-explorer-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-explorer-types.js","sourceRoot":"","sources":["../src/data-explorer-types.ts"],"names":[],"mappings":";;;AAAA,4DAA4D;AAC5D,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC5B,mCAAW,CAAA;IACX,qCAAa,CAAA;IACb,uCAAe,CAAA;IACf,2CAAmB,CAAA;IACnB,uCAAe,CAAA;IACf,uDAA+B,CAAA;AACnC,CAAC,EAPW,oBAAoB,oCAApB,oBAAoB,QAO/B;AAED,qDAAqD;AACrD,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAChC,2CAAe,CAAA;IACf,yCAAa,CAAA;IACb,uCAAW,CAAA;IACX,uCAAW,CAAA;AACf,CAAC,EALW,wBAAwB,wCAAxB,wBAAwB,QAKnC"}
package/dist/index.d.ts CHANGED
@@ -3,5 +3,10 @@ export { CliProcessCommand } from './cli-process-command';
3
3
  export { ICliCommandParameterDescriptor, CliCommandParameterDescriptor } from './cli-command-parameter-descriptor';
4
4
  export { ICliCommandProcessor, CliCommandProcessor } from './cli-command-processor';
5
5
  export { ICliModule, CliModule } from './cli-module';
6
+ export { CliStructuredOutput, CliStructuredResponse } from './cli-structured-response';
6
7
  export { ICliJob, ICliJobExecutionContext, ICliJobLogger, CliJobOptions, JobOverlapPolicy, ICliJobStorageProvider, JobExecution, JobExecutionStatus, JobState, JobStatus, JobLogEntry, JobLogLevel, } from './jobs';
8
+ export { DataExplorerLanguage, DataExplorerOutputFormat, DataExplorerTemplate, DataExplorerParameterDescriptor, DataExplorerProviderOptions, DataExplorerExecutionContext, DataExplorerResult, DataExplorerExecuteRequest, DataExplorerSourceInfo, DataExplorerSchemaColumn, DataExplorerSchemaTable, DataExplorerSchemaResult, } from './data-explorer-types';
9
+ export { IDataExplorerProvider } from './data-explorer-provider';
10
+ export { ICliProcessorFilter } from './cli-processor-filter';
11
+ export { ICliStreamCommandProcessor, isStreamCapable } from './cli-stream-command-processor';
7
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnH,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACH,OAAO,EACP,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,GACd,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnH,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EACH,OAAO,EACP,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,sBAAsB,EACtB,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,GACd,MAAM,QAAQ,CAAC;AAChB,OAAO,EACH,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,EAClB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CliModule = exports.CliCommandProcessor = exports.CliCommandParameterDescriptor = exports.DefaultLibraryAuthor = exports.CliCommandAuthor = void 0;
3
+ exports.isStreamCapable = exports.DataExplorerOutputFormat = exports.DataExplorerLanguage = exports.CliModule = exports.CliCommandProcessor = exports.CliCommandParameterDescriptor = exports.DefaultLibraryAuthor = exports.CliCommandAuthor = void 0;
4
4
  var cli_command_author_1 = require("./cli-command-author");
5
5
  Object.defineProperty(exports, "CliCommandAuthor", { enumerable: true, get: function () { return cli_command_author_1.CliCommandAuthor; } });
6
6
  Object.defineProperty(exports, "DefaultLibraryAuthor", { enumerable: true, get: function () { return cli_command_author_1.DefaultLibraryAuthor; } });
@@ -10,4 +10,9 @@ var cli_command_processor_1 = require("./cli-command-processor");
10
10
  Object.defineProperty(exports, "CliCommandProcessor", { enumerable: true, get: function () { return cli_command_processor_1.CliCommandProcessor; } });
11
11
  var cli_module_1 = require("./cli-module");
12
12
  Object.defineProperty(exports, "CliModule", { enumerable: true, get: function () { return cli_module_1.CliModule; } });
13
+ var data_explorer_types_1 = require("./data-explorer-types");
14
+ Object.defineProperty(exports, "DataExplorerLanguage", { enumerable: true, get: function () { return data_explorer_types_1.DataExplorerLanguage; } });
15
+ Object.defineProperty(exports, "DataExplorerOutputFormat", { enumerable: true, get: function () { return data_explorer_types_1.DataExplorerOutputFormat; } });
16
+ var cli_stream_command_processor_1 = require("./cli-stream-command-processor");
17
+ Object.defineProperty(exports, "isStreamCapable", { enumerable: true, get: function () { return cli_stream_command_processor_1.isStreamCapable; } });
13
18
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiG;AAArE,sHAAA,gBAAgB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AAElE,uFAAmH;AAA1E,iJAAA,6BAA6B,OAAA;AACtE,iEAAoF;AAArD,4HAAA,mBAAmB,OAAA;AAClD,2CAAqD;AAAhC,uGAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiG;AAArE,sHAAA,gBAAgB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AAElE,uFAAmH;AAA1E,iJAAA,6BAA6B,OAAA;AACtE,iEAAoF;AAArD,4HAAA,mBAAmB,OAAA;AAClD,2CAAqD;AAAhC,uGAAA,SAAS,OAAA;AAgB9B,6DAa+B;AAZ3B,2HAAA,oBAAoB,OAAA;AACpB,+HAAA,wBAAwB,OAAA;AAc5B,+EAA6F;AAAxD,+HAAA,eAAe,OAAA"}
@@ -1,5 +1,7 @@
1
1
  import { ICliJobLogger } from './cli-job-logger';
2
+ /** Context passed to a job during execution, providing access to logging. */
2
3
  export interface ICliJobExecutionContext {
4
+ /** Logger for recording job progress and diagnostics. */
3
5
  logger: ICliJobLogger;
4
6
  }
5
7
  //# sourceMappingURL=cli-job-execution-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-job-execution-context.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job-execution-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,aAAa,CAAC;CACzB"}
1
+ {"version":3,"file":"cli-job-execution-context.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job-execution-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,6EAA6E;AAC7E,MAAM,WAAW,uBAAuB;IACpC,yDAAyD;IACzD,MAAM,EAAE,aAAa,CAAC;CACzB"}
@@ -1,7 +1,12 @@
1
+ /** Logger interface for recording messages during job execution. */
1
2
  export interface ICliJobLogger {
3
+ /** Logs a debug-level message. */
2
4
  debug(message: string): void;
5
+ /** Logs an informational message. */
3
6
  info(message: string): void;
7
+ /** Logs a warning message. */
4
8
  warning(message: string): void;
9
+ /** Logs an error message. */
5
10
  error(message: string): void;
6
11
  }
7
12
  //# sourceMappingURL=cli-job-logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-job-logger.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job-logger.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
1
+ {"version":3,"file":"cli-job-logger.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job-logger.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,MAAM,WAAW,aAAa;IAC1B,kCAAkC;IAClC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qCAAqC;IACrC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,8BAA8B;IAC9B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,6BAA6B;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
@@ -1,5 +1,8 @@
1
+ /** Behavior when a job's timer fires while the previous execution is still running. */
1
2
  export type JobOverlapPolicy = 'skip' | 'queue' | 'cancel';
3
+ /** Retry backoff strategy for failed job executions. */
2
4
  export type JobRetryStrategy = 'fixed' | 'linear' | 'exponential';
5
+ /** Configuration options for a scheduled or on-demand CLI job. */
3
6
  export interface CliJobOptions {
4
7
  /** Display name for the job. Defaults to class name. */
5
8
  name?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"cli-job-options.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job-options.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB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F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8IAA8I;IAC9I,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,gBAAgB,CAAC;CACpC"}
@@ -1,7 +1,15 @@
1
1
  import { JobExecution, JobExecutionStatus } from './job-execution';
2
2
  import { JobState } from './job-state';
3
+ /** Persistence provider for job execution records and job state. */
3
4
  export interface ICliJobStorageProvider {
5
+ /** Persists or updates a job execution record. */
4
6
  saveExecution(execution: JobExecution): Promise<void>;
7
+ /**
8
+ * Retrieves paginated execution records for a job.
9
+ * @param jobId - Job identifier.
10
+ * @param options - Pagination and filter options.
11
+ * @returns Paginated result with items and total count.
12
+ */
5
13
  getExecutions(jobId: string, options?: {
6
14
  limit?: number;
7
15
  offset?: number;
@@ -10,9 +18,13 @@ export interface ICliJobStorageProvider {
10
18
  items: JobExecution[];
11
19
  total: number;
12
20
  }>;
21
+ /** Retrieves a single execution record by ID, or null if not found. */
13
22
  getExecution(executionId: string): Promise<JobExecution | null>;
23
+ /** Persists the current state (active/paused/stopped) for a job. */
14
24
  saveJobState(jobId: string, state: JobState): Promise<void>;
25
+ /** Retrieves the persisted state for a job, or null if none exists. */
15
26
  getJobState(jobId: string): Promise<JobState | null>;
27
+ /** Retrieves all persisted job states keyed by job ID. */
16
28
  getAllJobStates(): Promise<Map<string, JobState>>;
17
29
  }
18
30
  //# sourceMappingURL=cli-job-storage-provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-job-storage-provider.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job-storage-provider.ts"],"names":[],"mappings":"AAAA,OAA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AO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,kBAAkB,CAAA;KAAE,GAC3E,OAAO,CAAC;QAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrD,uEAAuE;IACvE,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAChE,oEAAoE;IACpE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,uEAAuE;IACvE,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IACrD,0DAA0D;IAC1D,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;CACrD"}
@@ -1,5 +1,11 @@
1
1
  import { ICliJobExecutionContext } from './cli-job-execution-context';
2
+ /** A scheduled or on-demand background job. */
2
3
  export interface ICliJob {
4
+ /**
5
+ * Executes the job's work.
6
+ * @param context - Execution context providing a logger.
7
+ * @param signal - Abort signal for cancellation and timeout.
8
+ */
3
9
  executeAsync(context: ICliJobExecutionContext, signal: AbortSignal): Promise<void>;
4
10
  }
5
11
  //# sourceMappingURL=cli-job.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-job.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,WAAW,OAAO;IACpB,YAAY,CAAC,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtF"}
1
+ {"version":3,"file":"cli-job.d.ts","sourceRoot":"","sources":["../../src/jobs/cli-job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,+CAA+C;AAC/C,MAAM,WAAW,OAAO;IACpB;;;;OAIG;IACH,YAAY,CAAC,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtF"}
@@ -1,15 +1,27 @@
1
1
  import { JobLogEntry } from './log-entry';
2
+ /** Possible terminal and in-progress states of a job execution. */
2
3
  export type JobExecutionStatus = 'running' | 'completed' | 'failed' | 'cancelled' | 'timed_out';
4
+ /** Record of a single job execution attempt. */
3
5
  export interface JobExecution {
6
+ /** Unique execution identifier. */
4
7
  id: string;
8
+ /** Identifier of the job that was executed. */
5
9
  jobId: string;
10
+ /** Display name of the job. */
6
11
  jobName: string;
12
+ /** Current execution status. */
7
13
  status: JobExecutionStatus;
14
+ /** ISO 8601 timestamp when execution started. */
8
15
  startedAt: string;
16
+ /** ISO 8601 timestamp when execution completed (if finished). */
9
17
  completedAt?: string;
18
+ /** Execution duration in milliseconds. */
10
19
  duration?: number;
20
+ /** Error message if the execution failed. */
11
21
  error?: string;
22
+ /** Log entries recorded during execution. */
12
23
  logs: JobLogEntry[];
24
+ /** Zero-based retry attempt number. */
13
25
  retryAttempt: number;
14
26
  }
15
27
  //# sourceMappingURL=job-execution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"job-execution.d.ts","sourceRoot":"","sources":["../../src/jobs/job-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;AAEhG,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACxB"}
1
+ {"version":3,"file":"job-execution.d.ts","sourceRoot":"","sources":["../../src/jobs/job-execution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,mEAAmE;AACnE,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;AAEhG,gDAAgD;AAChD,MAAM,WAAW,YAAY;IACzB,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,uCAAuC;IACvC,YAAY,EAAE,MAAM,CAAC;CACxB"}
@@ -1,7 +1,12 @@
1
+ /** Lifecycle status of a registered job. */
1
2
  export type JobStatus = 'active' | 'paused' | 'stopped';
3
+ /** Persisted state snapshot for a registered job. */
2
4
  export interface JobState {
5
+ /** Current lifecycle status. */
3
6
  status: JobStatus;
7
+ /** ISO 8601 timestamp of the last execution, if any. */
4
8
  lastRunAt?: string;
9
+ /** ISO 8601 timestamp when the state was last modified. */
5
10
  updatedAt: string;
6
11
  }
7
12
  //# sourceMappingURL=job-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"job-state.d.ts","sourceRoot":"","sources":["../../src/jobs/job-state.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExD,MAAM,WAAW,QAAQ;IACrB,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"job-state.d.ts","sourceRoot":"","sources":["../../src/jobs/job-state.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExD,qDAAqD;AACrD,MAAM,WAAW,QAAQ;IACrB,gCAAgC;IAChC,MAAM,EAAE,SAAS,CAAC;IAClB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;CACrB"}
@@ -1,7 +1,12 @@
1
+ /** Severity levels for job log entries. */
1
2
  export type JobLogLevel = 'debug' | 'info' | 'warning' | 'error';
3
+ /** A single log entry recorded during job execution. */
2
4
  export interface JobLogEntry {
5
+ /** ISO 8601 timestamp when the entry was created. */
3
6
  timestamp: string;
7
+ /** Severity level. */
4
8
  level: JobLogLevel;
9
+ /** Log message content. */
5
10
  message: string;
6
11
  }
7
12
  //# sourceMappingURL=log-entry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"log-entry.d.ts","sourceRoot":"","sources":["../../src/jobs/log-entry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjE,MAAM,WAAW,WAAW;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"log-entry.d.ts","sourceRoot":"","sources":["../../src/jobs/log-entry.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjE,wDAAwD;AACxD,MAAM,WAAW,WAAW;IACxB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,KAAK,EAAE,WAAW,CAAC;IACnB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qodalis/cli-server-abstractions",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.6",
4
4
  "description": "Shared interfaces and base classes for Qodalis CLI command processors — zero framework dependencies",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",