@packmind/cli 0.17.0 → 0.18.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.
Files changed (2) hide show
  1. package/main.cjs +541 -198
  2. package/package.json +1 -1
package/main.cjs CHANGED
@@ -371,32 +371,32 @@ var init_supports_color = __esm({
371
371
  });
372
372
 
373
373
  // node_modules/chalk/source/utilities.js
374
- function stringReplaceAll(string11, substring, replacer) {
375
- let index = string11.indexOf(substring);
374
+ function stringReplaceAll(string12, substring, replacer) {
375
+ let index = string12.indexOf(substring);
376
376
  if (index === -1) {
377
- return string11;
377
+ return string12;
378
378
  }
379
379
  const substringLength = substring.length;
380
380
  let endIndex = 0;
381
381
  let returnValue = "";
382
382
  do {
383
- returnValue += string11.slice(endIndex, index) + substring + replacer;
383
+ returnValue += string12.slice(endIndex, index) + substring + replacer;
384
384
  endIndex = index + substringLength;
385
- index = string11.indexOf(substring, endIndex);
385
+ index = string12.indexOf(substring, endIndex);
386
386
  } while (index !== -1);
387
- returnValue += string11.slice(endIndex);
387
+ returnValue += string12.slice(endIndex);
388
388
  return returnValue;
389
389
  }
390
- function stringEncaseCRLFWithFirstIndex(string11, prefix, postfix, index) {
390
+ function stringEncaseCRLFWithFirstIndex(string12, prefix, postfix, index) {
391
391
  let endIndex = 0;
392
392
  let returnValue = "";
393
393
  do {
394
- const gotCR = string11[index - 1] === "\r";
395
- returnValue += string11.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
394
+ const gotCR = string12[index - 1] === "\r";
395
+ returnValue += string12.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
396
396
  endIndex = index + 1;
397
- index = string11.indexOf("\n", endIndex);
397
+ index = string12.indexOf("\n", endIndex);
398
398
  } while (index !== -1);
399
- returnValue += string11.slice(endIndex);
399
+ returnValue += string12.slice(endIndex);
400
400
  return returnValue;
401
401
  }
402
402
  var init_utilities = __esm({
@@ -555,26 +555,26 @@ var init_source = __esm({
555
555
  builder[IS_EMPTY] = _isEmpty;
556
556
  return builder;
557
557
  };
558
- applyStyle = (self, string11) => {
559
- if (self.level <= 0 || !string11) {
560
- return self[IS_EMPTY] ? "" : string11;
558
+ applyStyle = (self, string12) => {
559
+ if (self.level <= 0 || !string12) {
560
+ return self[IS_EMPTY] ? "" : string12;
561
561
  }
562
562
  let styler = self[STYLER];
563
563
  if (styler === void 0) {
564
- return string11;
564
+ return string12;
565
565
  }
566
566
  const { openAll, closeAll } = styler;
567
- if (string11.includes("\x1B")) {
567
+ if (string12.includes("\x1B")) {
568
568
  while (styler !== void 0) {
569
- string11 = stringReplaceAll(string11, styler.close, styler.open);
569
+ string12 = stringReplaceAll(string12, styler.close, styler.open);
570
570
  styler = styler.parent;
571
571
  }
572
572
  }
573
- const lfIndex = string11.indexOf("\n");
573
+ const lfIndex = string12.indexOf("\n");
574
574
  if (lfIndex !== -1) {
575
- string11 = stringEncaseCRLFWithFirstIndex(string11, closeAll, openAll, lfIndex);
575
+ string12 = stringEncaseCRLFWithFirstIndex(string12, closeAll, openAll, lfIndex);
576
576
  }
577
- return openAll + string11 + closeAll;
577
+ return openAll + string12 + closeAll;
578
578
  };
579
579
  Object.defineProperties(createChalk.prototype, styles2);
580
580
  chalk = createChalk();
@@ -767,9 +767,9 @@ var require_findOption = __commonJS({
767
767
  continue;
768
768
  }
769
769
  if (node.type === "shortOptions" && opts.shortNames.length) {
770
- for (const option7 of node.options) {
771
- if (opts.shortNames.includes(option7.key)) {
772
- result.push(option7);
770
+ for (const option8 of node.options) {
771
+ if (opts.shortNames.includes(option8.key)) {
772
+ result.push(option8);
773
773
  }
774
774
  }
775
775
  }
@@ -842,7 +842,7 @@ var require_types = __commonJS({
842
842
  "use strict";
843
843
  Object.defineProperty(exports2, "__esModule", { value: true });
844
844
  exports2.boolean = exports2.string = exports2.number = void 0;
845
- exports2.optional = optional5;
845
+ exports2.optional = optional8;
846
846
  exports2.array = array3;
847
847
  var type_1 = require_type();
848
848
  exports2.number = {
@@ -869,7 +869,7 @@ var require_types = __commonJS({
869
869
  return false;
870
870
  }
871
871
  };
872
- function optional5(t) {
872
+ function optional8(t) {
873
873
  return {
874
874
  ...t,
875
875
  defaultValue() {
@@ -1403,9 +1403,9 @@ var require_subcommands = __commonJS({
1403
1403
  let errorMessage = "Not a valid subcommand name";
1404
1404
  const closeOptions = (0, didyoumean_1.default)(str, flatMap(commands, (x) => x.names));
1405
1405
  if (closeOptions) {
1406
- const option7 = Array.isArray(closeOptions) ? closeOptions[0] : closeOptions;
1406
+ const option8 = Array.isArray(closeOptions) ? closeOptions[0] : closeOptions;
1407
1407
  errorMessage += `
1408
- Did you mean ${chalk_1.default.italic(option7)}?`;
1408
+ Did you mean ${chalk_1.default.italic(option8)}?`;
1409
1409
  }
1410
1410
  throw new Error(errorMessage);
1411
1411
  }
@@ -1578,11 +1578,11 @@ var strip_ansi_exports = {};
1578
1578
  __export(strip_ansi_exports, {
1579
1579
  default: () => stripAnsi
1580
1580
  });
1581
- function stripAnsi(string11) {
1582
- if (typeof string11 !== "string") {
1583
- throw new TypeError(`Expected a \`string\`, got \`${typeof string11}\``);
1581
+ function stripAnsi(string12) {
1582
+ if (typeof string12 !== "string") {
1583
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string12}\``);
1584
1584
  }
1585
- return string11.replace(regex, "");
1585
+ return string12.replace(regex, "");
1586
1586
  }
1587
1587
  var regex;
1588
1588
  var init_strip_ansi = __esm({
@@ -1781,11 +1781,11 @@ var require_command = __commonJS({
1781
1781
  }
1782
1782
  if (node.type === "forcePositional") {
1783
1783
  } else if (node.type === "shortOptions") {
1784
- for (const option7 of node.options) {
1785
- if (context.visitedNodes.has(option7)) {
1784
+ for (const option8 of node.options) {
1785
+ if (context.visitedNodes.has(option8)) {
1786
1786
  continue;
1787
1787
  }
1788
- unknownArguments.push(option7);
1788
+ unknownArguments.push(option8);
1789
1789
  }
1790
1790
  } else {
1791
1791
  unknownArguments.push(node);
@@ -1864,7 +1864,7 @@ var require_option = __commonJS({
1864
1864
  return mod && mod.__esModule ? mod : { "default": mod };
1865
1865
  };
1866
1866
  Object.defineProperty(exports2, "__esModule", { value: true });
1867
- exports2.option = option7;
1867
+ exports2.option = option8;
1868
1868
  var chalk_1 = __importDefault((init_source(), __toCommonJS(source_exports)));
1869
1869
  var Result = __importStar(require_Result());
1870
1870
  var findOption_1 = require_findOption();
@@ -1940,11 +1940,11 @@ var require_option = __commonJS({
1940
1940
  const valueFromEnv = config.env ? process.env[config.env] : void 0;
1941
1941
  const defaultValueFn = config.defaultValue || config.type.defaultValue;
1942
1942
  const onMissingFn = config.onMissing || config.type.onMissing;
1943
- const option8 = options[0];
1943
+ const option9 = options[0];
1944
1944
  let rawValue;
1945
1945
  let envPrefix = "";
1946
- if (option8 === null || option8 === void 0 ? void 0 : option8.value) {
1947
- rawValue = option8.value.node.raw;
1946
+ if (option9 === null || option9 === void 0 ? void 0 : option9.value) {
1947
+ rawValue = option9.value.node.raw;
1948
1948
  } else if (valueFromEnv !== void 0) {
1949
1949
  rawValue = valueFromEnv;
1950
1950
  envPrefix = `env[${chalk_1.default.italic(config.env)}]: `;
@@ -1979,7 +1979,7 @@ var require_option = __commonJS({
1979
1979
  });
1980
1980
  }
1981
1981
  } else {
1982
- const raw = (option8 === null || option8 === void 0 ? void 0 : option8.type) === "shortOption" ? `-${option8 === null || option8 === void 0 ? void 0 : option8.key}` : `--${config.long}`;
1982
+ const raw = (option9 === null || option9 === void 0 ? void 0 : option9.type) === "shortOption" ? `-${option9 === null || option9 === void 0 ? void 0 : option9.key}` : `--${config.long}`;
1983
1983
  return Result.err({
1984
1984
  errors: [
1985
1985
  {
@@ -2001,7 +2001,7 @@ var require_option = __commonJS({
2001
2001
  }
2002
2002
  };
2003
2003
  }
2004
- function option7(config) {
2004
+ function option8(config) {
2005
2005
  return fullOption({
2006
2006
  type: types_1.string,
2007
2007
  ...config
@@ -2040,12 +2040,12 @@ var require_errorBox = __commonJS({
2040
2040
  if (node.type === "shortOptions") {
2041
2041
  let failed = false;
2042
2042
  let s = "";
2043
- for (const option7 of node.options) {
2044
- if (error.nodes.includes(option7)) {
2045
- s += chalk_1.default.red(option7.raw);
2043
+ for (const option8 of node.options) {
2044
+ if (error.nodes.includes(option8)) {
2045
+ s += chalk_1.default.red(option8.raw);
2046
2046
  failed = true;
2047
2047
  } else {
2048
- s += chalk_1.default.dim(option7.raw);
2048
+ s += chalk_1.default.dim(option8.raw);
2049
2049
  }
2050
2050
  }
2051
2051
  const prefix = failed ? chalk_1.default.red("-") : chalk_1.default.dim("-");
@@ -3084,8 +3084,8 @@ var require_tokenizer = __commonJS({
3084
3084
  tokens.push(token);
3085
3085
  overallIndex += token.raw.length;
3086
3086
  };
3087
- for (const [stringIndex, string11] of (0, utils_1.enumerate)(strings)) {
3088
- const chars = [...string11];
3087
+ for (const [stringIndex, string12] of (0, utils_1.enumerate)(strings)) {
3088
+ const chars = [...string12];
3089
3089
  for (let i = 0; i < chars.length; i++) {
3090
3090
  if (chars[i] === "-" && chars[i + 1] === "-") {
3091
3091
  push({ type: "longPrefix", raw: "--", index: overallIndex });
@@ -3346,15 +3346,15 @@ var require_multiflag = __commonJS({
3346
3346
  longNames: [config.long],
3347
3347
  shortNames: config.short ? [config.short] : []
3348
3348
  }).filter((x) => !visitedNodes.has(x));
3349
- for (const option7 of options) {
3350
- visitedNodes.add(option7);
3349
+ for (const option8 of options) {
3350
+ visitedNodes.add(option8);
3351
3351
  }
3352
3352
  const optionValues = [];
3353
3353
  const errors = [];
3354
- for (const option7 of options) {
3355
- const decoded = await Result.safeAsync(flag_1.boolean.from((_b = (_a = option7.value) === null || _a === void 0 ? void 0 : _a.node.raw) !== null && _b !== void 0 ? _b : "true"));
3354
+ for (const option8 of options) {
3355
+ const decoded = await Result.safeAsync(flag_1.boolean.from((_b = (_a = option8.value) === null || _a === void 0 ? void 0 : _a.node.raw) !== null && _b !== void 0 ? _b : "true"));
3356
3356
  if (Result.isErr(decoded)) {
3357
- errors.push({ nodes: [option7], message: decoded.error.message });
3357
+ errors.push({ nodes: [option8], message: decoded.error.message });
3358
3358
  } else {
3359
3359
  optionValues.push(decoded.value);
3360
3360
  }
@@ -3518,16 +3518,16 @@ var require_multioption = __commonJS({
3518
3518
  });
3519
3519
  }
3520
3520
  }
3521
- for (const option7 of options) {
3522
- visitedNodes.add(option7);
3521
+ for (const option8 of options) {
3522
+ visitedNodes.add(option8);
3523
3523
  }
3524
3524
  const optionValues = [];
3525
3525
  const errors = [];
3526
3526
  const flagNodes = [];
3527
- for (const option7 of options) {
3528
- const providedValue = (_a = option7.value) === null || _a === void 0 ? void 0 : _a.node.raw;
3527
+ for (const option8 of options) {
3528
+ const providedValue = (_a = option8.value) === null || _a === void 0 ? void 0 : _a.node.raw;
3529
3529
  if (providedValue === void 0) {
3530
- flagNodes.push(option7);
3530
+ flagNodes.push(option8);
3531
3531
  continue;
3532
3532
  }
3533
3533
  optionValues.push(providedValue);
@@ -3852,7 +3852,7 @@ var require_package = __commonJS({
3852
3852
  "apps/cli/package.json"(exports2, module2) {
3853
3853
  module2.exports = {
3854
3854
  name: "@packmind/cli",
3855
- version: "0.17.0",
3855
+ version: "0.18.0",
3856
3856
  description: "A command-line interface for Packmind linting and code quality checks",
3857
3857
  private: false,
3858
3858
  bin: {
@@ -6399,6 +6399,16 @@ var ChangeProposalGateway = class {
6399
6399
  }
6400
6400
  );
6401
6401
  };
6402
+ this.check = async (command21) => {
6403
+ const { organizationId } = this.httpClient.getAuthContext();
6404
+ return this.httpClient.request(
6405
+ `/api/v0/organizations/${organizationId}/spaces/${command21.spaceId}/change-proposals/check`,
6406
+ {
6407
+ method: "POST",
6408
+ body: { proposals: command21.proposals }
6409
+ }
6410
+ );
6411
+ };
6402
6412
  }
6403
6413
  };
6404
6414
 
@@ -11605,7 +11615,7 @@ var SubmitDiffsUseCase = class {
11605
11615
  this.packmindGateway = packmindGateway;
11606
11616
  }
11607
11617
  async execute(command21) {
11608
- const { groupedDiffs } = command21;
11618
+ const { groupedDiffs, message } = command21;
11609
11619
  const skipped = [];
11610
11620
  const validDiffs = [];
11611
11621
  for (const group of groupedDiffs) {
@@ -11647,7 +11657,8 @@ var SubmitDiffsUseCase = class {
11647
11657
  type: diff.type,
11648
11658
  artefactId: diff.artifactId,
11649
11659
  payload: diff.payload,
11650
- captureMode: "commit" /* commit */
11660
+ captureMode: "commit" /* commit */,
11661
+ message
11651
11662
  }))
11652
11663
  });
11653
11664
  submitted += response.created;
@@ -11665,6 +11676,68 @@ var SubmitDiffsUseCase = class {
11665
11676
  }
11666
11677
  };
11667
11678
 
11679
+ // apps/cli/src/application/useCases/CheckDiffsUseCase.ts
11680
+ var SUPPORTED_ARTIFACT_TYPES2 = /* @__PURE__ */ new Set(["command", "skill", "standard"]);
11681
+ var CheckDiffsUseCase = class {
11682
+ constructor(packmindGateway) {
11683
+ this.packmindGateway = packmindGateway;
11684
+ }
11685
+ async execute(command21) {
11686
+ const { groupedDiffs } = command21;
11687
+ const results = [];
11688
+ const validDiffs = [];
11689
+ const invalidDiffs = [];
11690
+ for (const group of groupedDiffs) {
11691
+ for (const diff of group) {
11692
+ if (!SUPPORTED_ARTIFACT_TYPES2.has(diff.artifactType) || !diff.artifactId || !diff.spaceId) {
11693
+ invalidDiffs.push(diff);
11694
+ continue;
11695
+ }
11696
+ validDiffs.push(diff);
11697
+ }
11698
+ }
11699
+ const diffsBySpaceId = /* @__PURE__ */ new Map();
11700
+ for (const diff of validDiffs) {
11701
+ const existing = diffsBySpaceId.get(diff.spaceId) ?? [];
11702
+ existing.push(diff);
11703
+ diffsBySpaceId.set(diff.spaceId, existing);
11704
+ }
11705
+ const checkedMap = /* @__PURE__ */ new Map();
11706
+ for (const [spaceId, diffs] of diffsBySpaceId) {
11707
+ const response = await this.packmindGateway.changeProposals.check({
11708
+ spaceId,
11709
+ proposals: diffs.map((diff) => ({
11710
+ type: diff.type,
11711
+ artefactId: diff.artifactId,
11712
+ payload: diff.payload,
11713
+ captureMode: "commit" /* commit */,
11714
+ message: ""
11715
+ }))
11716
+ });
11717
+ for (const result of response.results) {
11718
+ const diff = diffs[result.index];
11719
+ checkedMap.set(diff, {
11720
+ diff,
11721
+ exists: result.exists,
11722
+ createdAt: result.createdAt,
11723
+ message: result.message
11724
+ });
11725
+ }
11726
+ }
11727
+ for (const group of groupedDiffs) {
11728
+ for (const diff of group) {
11729
+ const checked = checkedMap.get(diff);
11730
+ if (checked) {
11731
+ results.push(checked);
11732
+ } else {
11733
+ results.push({ diff, exists: false, createdAt: null, message: null });
11734
+ }
11735
+ }
11736
+ }
11737
+ return { results };
11738
+ }
11739
+ };
11740
+
11668
11741
  // apps/cli/src/PackmindCliHexaFactory.ts
11669
11742
  var PackmindCliHexaFactory = class {
11670
11743
  constructor() {
@@ -11718,7 +11791,8 @@ var PackmindCliHexaFactory = class {
11718
11791
  diffArtefacts: new DiffArtefactsUseCase(
11719
11792
  this.repositories.packmindGateway
11720
11793
  ),
11721
- submitDiffs: new SubmitDiffsUseCase(this.repositories.packmindGateway)
11794
+ submitDiffs: new SubmitDiffsUseCase(this.repositories.packmindGateway),
11795
+ checkDiffs: new CheckDiffsUseCase(this.repositories.packmindGateway)
11722
11796
  };
11723
11797
  }
11724
11798
  };
@@ -11770,8 +11844,11 @@ var PackmindCliHexa = class {
11770
11844
  async diffArtefacts(command21) {
11771
11845
  return this.hexa.useCases.diffArtefacts.execute(command21);
11772
11846
  }
11773
- async submitDiffs(groupedDiffs) {
11774
- return this.hexa.useCases.submitDiffs.execute({ groupedDiffs });
11847
+ async submitDiffs(groupedDiffs, message) {
11848
+ return this.hexa.useCases.submitDiffs.execute({ groupedDiffs, message });
11849
+ }
11850
+ async checkDiffs(groupedDiffs) {
11851
+ return this.hexa.useCases.checkDiffs.execute({ groupedDiffs });
11775
11852
  }
11776
11853
  async listPackages(command21) {
11777
11854
  return this.hexa.useCases.listPackages.execute(command21);
@@ -13873,21 +13950,24 @@ function validatePlaybook(data) {
13873
13950
  }
13874
13951
 
13875
13952
  // apps/cli/src/infra/utils/readPlaybookFile.ts
13953
+ function parseAndValidatePlaybook(content) {
13954
+ let parsed;
13955
+ try {
13956
+ parsed = JSON.parse(content);
13957
+ } catch (e) {
13958
+ return {
13959
+ isValid: false,
13960
+ errors: [
13961
+ `Invalid JSON: ${e instanceof Error ? e.message : "Unknown error"}`
13962
+ ]
13963
+ };
13964
+ }
13965
+ return validatePlaybook(parsed);
13966
+ }
13876
13967
  async function readPlaybookFile(filePath) {
13877
13968
  try {
13878
13969
  const content = await fs16.readFile(filePath, "utf-8");
13879
- let parsed;
13880
- try {
13881
- parsed = JSON.parse(content);
13882
- } catch (e) {
13883
- return {
13884
- isValid: false,
13885
- errors: [
13886
- `Invalid JSON: ${e instanceof Error ? e.message : "Unknown error"}`
13887
- ]
13888
- };
13889
- }
13890
- return validatePlaybook(parsed);
13970
+ return parseAndValidatePlaybook(content);
13891
13971
  } catch (e) {
13892
13972
  return {
13893
13973
  isValid: false,
@@ -13898,9 +13978,40 @@ async function readPlaybookFile(filePath) {
13898
13978
  }
13899
13979
  }
13900
13980
 
13981
+ // apps/cli/src/infra/utils/readStdin.ts
13982
+ async function readStdin(input = process.stdin) {
13983
+ if ("isTTY" in input && input.isTTY) {
13984
+ throw new Error(
13985
+ "No piped input detected. Please provide content via stdin or specify a file path."
13986
+ );
13987
+ }
13988
+ const chunks = [];
13989
+ for await (const chunk of input) {
13990
+ chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
13991
+ }
13992
+ const content = Buffer.concat(chunks).toString("utf-8").trim();
13993
+ if (!content) {
13994
+ throw new Error("Stdin is empty. Please provide JSON content via pipe.");
13995
+ }
13996
+ return content;
13997
+ }
13998
+
13901
13999
  // apps/cli/src/infra/commands/createStandardHandler.ts
13902
14000
  async function createStandardHandler(filePath, useCase, originSkill) {
13903
- const readResult = await readPlaybookFile(filePath);
14001
+ let readResult;
14002
+ if (filePath) {
14003
+ readResult = await readPlaybookFile(filePath);
14004
+ } else {
14005
+ try {
14006
+ const content = await readStdin();
14007
+ readResult = parseAndValidatePlaybook(content);
14008
+ } catch (e) {
14009
+ return {
14010
+ success: false,
14011
+ error: e instanceof Error ? e.message : "Failed to read from stdin"
14012
+ };
14013
+ }
14014
+ }
13904
14015
  if (!readResult.isValid) {
13905
14016
  return {
13906
14017
  success: false,
@@ -13961,12 +14072,12 @@ var CreateStandardFromPlaybookUseCase = class {
13961
14072
  // apps/cli/src/infra/commands/CreateStandardCommand.ts
13962
14073
  var createStandardCommand = (0, import_cmd_ts13.command)({
13963
14074
  name: "create",
13964
- description: "Create a coding standard from a playbook JSON file",
14075
+ description: "Create a coding standard from a playbook JSON file or stdin",
13965
14076
  args: {
13966
14077
  file: (0, import_cmd_ts13.positional)({
13967
14078
  displayName: "file",
13968
- description: "Path to the playbook JSON file",
13969
- type: import_cmd_ts13.string
14079
+ description: "Path to the playbook JSON file (reads from stdin if omitted)",
14080
+ type: (0, import_cmd_ts13.optional)(import_cmd_ts13.string)
13970
14081
  }),
13971
14082
  originSkill: originSkillOption
13972
14083
  },
@@ -14127,21 +14238,24 @@ function validateCommandPlaybook(data) {
14127
14238
  }
14128
14239
 
14129
14240
  // apps/cli/src/infra/utils/readCommandPlaybookFile.ts
14241
+ function parseAndValidateCommandPlaybook(content) {
14242
+ let parsed;
14243
+ try {
14244
+ parsed = JSON.parse(content);
14245
+ } catch (e) {
14246
+ return {
14247
+ isValid: false,
14248
+ errors: [
14249
+ `Invalid JSON: ${e instanceof Error ? e.message : "Unknown error"}`
14250
+ ]
14251
+ };
14252
+ }
14253
+ return validateCommandPlaybook(parsed);
14254
+ }
14130
14255
  async function readCommandPlaybookFile(filePath) {
14131
14256
  try {
14132
14257
  const content = await fs17.readFile(filePath, "utf-8");
14133
- let parsed;
14134
- try {
14135
- parsed = JSON.parse(content);
14136
- } catch (e) {
14137
- return {
14138
- isValid: false,
14139
- errors: [
14140
- `Invalid JSON: ${e instanceof Error ? e.message : "Unknown error"}`
14141
- ]
14142
- };
14143
- }
14144
- return validateCommandPlaybook(parsed);
14258
+ return parseAndValidateCommandPlaybook(content);
14145
14259
  } catch (e) {
14146
14260
  return {
14147
14261
  isValid: false,
@@ -14157,7 +14271,20 @@ function buildWebappUrl(host, orgSlug, commandId) {
14157
14271
  return `${host}/org/${orgSlug}/space/global/commands/${commandId}`;
14158
14272
  }
14159
14273
  async function createCommandHandler(filePath, useCase, originSkill) {
14160
- const readResult = await readCommandPlaybookFile(filePath);
14274
+ let readResult;
14275
+ if (filePath) {
14276
+ readResult = await readCommandPlaybookFile(filePath);
14277
+ } else {
14278
+ try {
14279
+ const content = await readStdin();
14280
+ readResult = parseAndValidateCommandPlaybook(content);
14281
+ } catch (e) {
14282
+ return {
14283
+ success: false,
14284
+ error: e instanceof Error ? e.message : "Failed to read from stdin"
14285
+ };
14286
+ }
14287
+ }
14161
14288
  if (!readResult.isValid) {
14162
14289
  return {
14163
14290
  success: false,
@@ -14232,12 +14359,12 @@ var CreateCommandFromPlaybookUseCase = class {
14232
14359
  // apps/cli/src/infra/commands/CreateCommandCommand.ts
14233
14360
  var createCommandCommand = (0, import_cmd_ts16.command)({
14234
14361
  name: "create",
14235
- description: "Create a command from a playbook JSON file",
14362
+ description: "Create a command from a playbook JSON file or stdin",
14236
14363
  args: {
14237
14364
  file: (0, import_cmd_ts16.positional)({
14238
14365
  displayName: "file",
14239
- description: "Path to the command playbook JSON file",
14240
- type: import_cmd_ts16.string
14366
+ description: "Path to the command playbook JSON file (reads from stdin if omitted)",
14367
+ type: (0, import_cmd_ts16.optional)(import_cmd_ts16.string)
14241
14368
  }),
14242
14369
  originSkill: originSkillOption
14243
14370
  },
@@ -14379,6 +14506,51 @@ function formatContentDiff(oldContent, newContent) {
14379
14506
  };
14380
14507
  }
14381
14508
 
14509
+ // apps/cli/src/infra/utils/editorMessage.ts
14510
+ var import_child_process4 = require("child_process");
14511
+ var import_fs19 = require("fs");
14512
+ var import_os2 = require("os");
14513
+ var import_path4 = require("path");
14514
+ var MAX_MESSAGE_LENGTH = 1024;
14515
+ var EDITOR_TEMPLATE = `
14516
+ # Enter a message describing the intent behind these changes.
14517
+ # Lines starting with '#' will be ignored.
14518
+ # An empty message aborts the submission.
14519
+ `;
14520
+ function openEditorForMessage() {
14521
+ const tmpFile = (0, import_path4.join)((0, import_os2.tmpdir)(), `packmind-msg-${Date.now()}.txt`);
14522
+ try {
14523
+ (0, import_fs19.writeFileSync)(tmpFile, EDITOR_TEMPLATE, "utf-8");
14524
+ const editor = process.env.EDITOR || process.env.VISUAL || "vi";
14525
+ const result = (0, import_child_process4.spawnSync)(editor, [tmpFile], {
14526
+ stdio: "inherit"
14527
+ });
14528
+ if (result.status !== 0) {
14529
+ throw new Error(`Editor exited with status ${result.status}`);
14530
+ }
14531
+ const content = (0, import_fs19.readFileSync)(tmpFile, "utf-8");
14532
+ return content.split("\n").filter((line) => !line.startsWith("#")).join("\n").trim();
14533
+ } finally {
14534
+ try {
14535
+ (0, import_fs19.unlinkSync)(tmpFile);
14536
+ } catch {
14537
+ }
14538
+ }
14539
+ }
14540
+ function validateMessage(message) {
14541
+ const trimmed = message.trim();
14542
+ if (trimmed.length === 0) {
14543
+ return { valid: false, error: "Message cannot be empty." };
14544
+ }
14545
+ if (trimmed.length > MAX_MESSAGE_LENGTH) {
14546
+ return {
14547
+ valid: false,
14548
+ error: `Message exceeds maximum length of ${MAX_MESSAGE_LENGTH} characters (got ${trimmed.length}).`
14549
+ };
14550
+ }
14551
+ return { valid: true, message: trimmed };
14552
+ }
14553
+
14382
14554
  // apps/cli/src/infra/commands/diffArtefactsHandler.ts
14383
14555
  init_source();
14384
14556
  var ARTIFACT_TYPE_LABELS = {
@@ -14461,8 +14633,27 @@ function formatDiffPayload(diff, log) {
14461
14633
  log(line);
14462
14634
  }
14463
14635
  }
14464
- async function diffArtefactsHandler(deps) {
14465
- const { packmindCliHexa, exit, getCwd, log, error, submit } = deps;
14636
+ function formatSubmittedDate(isoDate) {
14637
+ const date = new Date(isoDate);
14638
+ const datePart = date.toLocaleDateString("en-US", {
14639
+ year: "numeric",
14640
+ month: "short",
14641
+ day: "numeric"
14642
+ });
14643
+ const timePart = date.toLocaleTimeString("en-US", {
14644
+ hour: "numeric",
14645
+ minute: "2-digit",
14646
+ hour12: true
14647
+ });
14648
+ return `${datePart} ${timePart}`;
14649
+ }
14650
+ function buildSubmittedFooter(submittedDiffs) {
14651
+ const proposalCount = submittedDiffs.length;
14652
+ const proposalWord = proposalCount === 1 ? "change proposal" : "change proposals";
14653
+ return `${proposalCount} ${proposalWord} ignored, run \`packmind-cli diff --include-submitted\` to see what's waiting for validation`;
14654
+ }
14655
+ async function readConfigAndPackages(deps) {
14656
+ const { packmindCliHexa, exit, getCwd, log, error } = deps;
14466
14657
  const cwd = getCwd();
14467
14658
  let configPackages;
14468
14659
  let configAgents;
@@ -14483,7 +14674,7 @@ async function diffArtefactsHandler(deps) {
14483
14674
  }
14484
14675
  error("\n\u{1F4A1} Please fix the packmind.json file or delete it to continue.");
14485
14676
  exit(1);
14486
- return { diffsFound: 0 };
14677
+ return null;
14487
14678
  }
14488
14679
  if (configPackages.length === 0) {
14489
14680
  log("Usage: packmind-cli diff");
@@ -14491,37 +14682,219 @@ async function diffArtefactsHandler(deps) {
14491
14682
  log("Compare local command files against the server.");
14492
14683
  log("Configure packages in packmind.json first.");
14493
14684
  exit(0);
14494
- return { diffsFound: 0 };
14685
+ return null;
14495
14686
  }
14496
- try {
14497
- let gitRemoteUrl;
14498
- let gitBranch;
14499
- let relativePath;
14500
- const gitRoot = await packmindCliHexa.tryGetGitRepositoryRoot(cwd);
14501
- if (gitRoot) {
14502
- try {
14503
- gitRemoteUrl = packmindCliHexa.getGitRemoteUrlFromPath(gitRoot);
14504
- gitBranch = packmindCliHexa.getCurrentBranch(gitRoot);
14505
- relativePath = cwd.startsWith(gitRoot) ? cwd.slice(gitRoot.length) : "/";
14506
- if (!relativePath.startsWith("/")) {
14507
- relativePath = "/" + relativePath;
14508
- }
14509
- if (!relativePath.endsWith("/")) {
14510
- relativePath = relativePath + "/";
14511
- }
14512
- } catch (err) {
14513
- logWarningConsole(
14514
- `Failed to collect git info: ${err instanceof Error ? err.message : String(err)}`
14515
- );
14687
+ return { configPackages, configAgents };
14688
+ }
14689
+ async function collectGitInfo(deps) {
14690
+ const { packmindCliHexa, exit, getCwd, error } = deps;
14691
+ const cwd = getCwd();
14692
+ let gitRemoteUrl;
14693
+ let gitBranch;
14694
+ let relativePath;
14695
+ const gitRoot = await packmindCliHexa.tryGetGitRepositoryRoot(cwd);
14696
+ if (gitRoot) {
14697
+ try {
14698
+ gitRemoteUrl = packmindCliHexa.getGitRemoteUrlFromPath(gitRoot);
14699
+ gitBranch = packmindCliHexa.getCurrentBranch(gitRoot);
14700
+ relativePath = cwd.startsWith(gitRoot) ? cwd.slice(gitRoot.length) : "/";
14701
+ if (!relativePath.startsWith("/")) {
14702
+ relativePath = "/" + relativePath;
14703
+ }
14704
+ if (!relativePath.endsWith("/")) {
14705
+ relativePath = relativePath + "/";
14516
14706
  }
14707
+ } catch (err) {
14708
+ logWarningConsole(
14709
+ `Failed to collect git info: ${err instanceof Error ? err.message : String(err)}`
14710
+ );
14517
14711
  }
14518
- if (!gitRemoteUrl || !gitBranch || !relativePath) {
14519
- error(
14520
- "\n\u274C Could not determine git repository info. The diff command requires a git repository with a remote configured."
14712
+ }
14713
+ if (!gitRemoteUrl || !gitBranch || !relativePath) {
14714
+ error(
14715
+ "\n\u274C Could not determine git repository info. The diff command requires a git repository with a remote configured."
14716
+ );
14717
+ exit(1);
14718
+ return null;
14719
+ }
14720
+ return { gitRemoteUrl, gitBranch, relativePath };
14721
+ }
14722
+ async function handleSubmission(params) {
14723
+ const { packmindCliHexa, unsubmittedItems, messageFlag, exit } = params;
14724
+ const unsubmittedDiffs = unsubmittedItems.map((r) => r.diff);
14725
+ if (unsubmittedDiffs.length === 0) {
14726
+ logInfoConsole("All changes already submitted.");
14727
+ return false;
14728
+ }
14729
+ let message;
14730
+ if (messageFlag !== void 0) {
14731
+ const validation = validateMessage(messageFlag);
14732
+ if (!validation.valid) {
14733
+ logErrorConsole(validation.error);
14734
+ exit(1);
14735
+ return true;
14736
+ }
14737
+ message = validation.message;
14738
+ } else if (process.stdin.isTTY) {
14739
+ const editorMessage = openEditorForMessage();
14740
+ const validation = validateMessage(editorMessage);
14741
+ if (!validation.valid) {
14742
+ logErrorConsole(
14743
+ "Aborting submission: empty message. Use -m to provide a message."
14521
14744
  );
14522
14745
  exit(1);
14746
+ return true;
14747
+ }
14748
+ message = validation.message;
14749
+ } else {
14750
+ logErrorConsole(
14751
+ 'Non-interactive mode requires -m flag. Use: packmind-cli diff --submit -m "your message"'
14752
+ );
14753
+ exit(1);
14754
+ return true;
14755
+ }
14756
+ const groupedUnsubmitted = Array.from(
14757
+ groupDiffsByArtefact(unsubmittedDiffs).values()
14758
+ );
14759
+ const result = await packmindCliHexa.submitDiffs(groupedUnsubmitted, message);
14760
+ for (const err of result.errors) {
14761
+ if (err.code === "ChangeProposalPayloadMismatchError") {
14762
+ logErrorConsole(
14763
+ `Failed to submit "${err.name}": ${err.artifactType ?? "artifact"} is outdated, please run \`packmind-cli install\` to update it`
14764
+ );
14765
+ } else {
14766
+ logErrorConsole(`Failed to submit "${err.name}": ${err.message}`);
14767
+ }
14768
+ }
14769
+ if (result.submitted > 0) {
14770
+ const truncatedMessage = message.length > 50 ? message.slice(0, 50) + "..." : message;
14771
+ logInfoConsole(`Message: "${truncatedMessage}"`);
14772
+ }
14773
+ const summaryParts = [];
14774
+ if (result.submitted > 0) {
14775
+ summaryParts.push(`${result.submitted} submitted`);
14776
+ }
14777
+ if (result.alreadySubmitted > 0) {
14778
+ summaryParts.push(`${result.alreadySubmitted} already submitted`);
14779
+ }
14780
+ if (result.errors.length > 0) {
14781
+ const errorWord = result.errors.length === 1 ? "error" : "errors";
14782
+ summaryParts.push(`${result.errors.length} ${errorWord}`);
14783
+ }
14784
+ if (summaryParts.length > 0) {
14785
+ const summaryMessage = `Summary: ${summaryParts.join(", ")}`;
14786
+ if (result.errors.length === 0 && result.alreadySubmitted === 0) {
14787
+ logSuccessConsole(summaryMessage);
14788
+ } else if (result.errors.length > 0 && result.submitted > 0 || result.alreadySubmitted > 0) {
14789
+ logWarningConsole(summaryMessage);
14790
+ } else {
14791
+ logErrorConsole(summaryMessage);
14792
+ }
14793
+ }
14794
+ return false;
14795
+ }
14796
+ function extractUniqueAndSortedArtefacts(groups) {
14797
+ const typeSortOrder = {
14798
+ command: 0,
14799
+ skill: 1,
14800
+ standard: 2
14801
+ };
14802
+ const uniqueArtefacts = /* @__PURE__ */ new Map();
14803
+ for (const [key, groupDiffs] of groups) {
14804
+ if (!uniqueArtefacts.has(key)) {
14805
+ uniqueArtefacts.set(key, {
14806
+ type: groupDiffs[0].artifactType,
14807
+ name: groupDiffs[0].artifactName
14808
+ });
14809
+ }
14810
+ }
14811
+ const sortedArtefacts = Array.from(uniqueArtefacts.values()).sort(
14812
+ (a, b) => typeSortOrder[a.type] - typeSortOrder[b.type] || a.name.localeCompare(b.name, void 0, { sensitivity: "base" })
14813
+ );
14814
+ return sortedArtefacts;
14815
+ }
14816
+ function displayDiffs(params) {
14817
+ const {
14818
+ diffsToDisplay,
14819
+ submittedLookup,
14820
+ includeSubmitted,
14821
+ unsubmittedItems,
14822
+ submittedItems,
14823
+ log
14824
+ } = params;
14825
+ log(formatHeader(`
14826
+ Changes found:
14827
+ `));
14828
+ const groups = groupDiffsByArtefact(diffsToDisplay);
14829
+ for (const [, groupDiffs] of groups) {
14830
+ const { artifactType, artifactName } = groupDiffs[0];
14831
+ const typeLabel = ARTIFACT_TYPE_LABELS[artifactType];
14832
+ log(formatBold(`${typeLabel} "${artifactName}"`));
14833
+ const subGroups = subGroupByChangeContent(groupDiffs);
14834
+ for (const subGroup of subGroups) {
14835
+ for (const diff of subGroup) {
14836
+ log(` ${formatFilePath(diff.filePath)}`);
14837
+ }
14838
+ const label = CHANGE_PROPOSAL_TYPE_LABELS[subGroup[0].type] ?? "content changed";
14839
+ const checkItem = submittedLookup.get(subGroup[0]);
14840
+ if (includeSubmitted && checkItem?.exists && checkItem.createdAt) {
14841
+ const dateStr = formatSubmittedDate(checkItem.createdAt);
14842
+ const messageSuffix = checkItem.message ? ` "${checkItem.message.length > 50 ? checkItem.message.slice(0, 50) + "..." : checkItem.message}"` : "";
14843
+ log(
14844
+ ` - ${label} ${source_default.dim(`[already submitted on ${dateStr}${messageSuffix}]`)}`
14845
+ );
14846
+ } else {
14847
+ log(` - ${label}`);
14848
+ }
14849
+ formatDiffPayload(subGroup[0], log);
14850
+ }
14851
+ log("");
14852
+ }
14853
+ const changeCount = diffsToDisplay.length;
14854
+ const changeWord = changeCount === 1 ? "change" : "changes";
14855
+ const sortedArtefacts = extractUniqueAndSortedArtefacts(groups);
14856
+ const artefactCount = sortedArtefacts.length;
14857
+ const artefactWord = artefactCount === 1 ? "artefact" : "artefacts";
14858
+ const allSubmittedSuffix = includeSubmitted && unsubmittedItems.length === 0 ? " (all already submitted)" : "";
14859
+ logWarningConsole(
14860
+ `Summary: ${changeCount} ${changeWord} found on ${artefactCount} ${artefactWord}${allSubmittedSuffix}:`
14861
+ );
14862
+ for (const artefact of sortedArtefacts) {
14863
+ const typeLabel = ARTIFACT_TYPE_LABELS[artefact.type];
14864
+ const key = `${artefact.type}:${artefact.name}`;
14865
+ const artefactDiffs = groups.get(key) ?? [];
14866
+ const allDiffsSubmitted = includeSubmitted && artefactDiffs.length > 0 && artefactDiffs.every((d) => submittedLookup.get(d)?.exists);
14867
+ const suffix = allDiffsSubmitted ? " (all already submitted)" : "";
14868
+ logWarningConsole(`* ${typeLabel} "${artefact.name}"${suffix}`);
14869
+ }
14870
+ if (!includeSubmitted && submittedItems.length > 0) {
14871
+ logInfoConsole(buildSubmittedFooter(submittedItems));
14872
+ }
14873
+ return changeCount;
14874
+ }
14875
+ async function diffArtefactsHandler(deps) {
14876
+ const {
14877
+ packmindCliHexa,
14878
+ exit,
14879
+ getCwd,
14880
+ log,
14881
+ error,
14882
+ submit,
14883
+ includeSubmitted,
14884
+ message: messageFlag
14885
+ } = deps;
14886
+ const cwd = getCwd();
14887
+ const config = await readConfigAndPackages(deps);
14888
+ if (!config) {
14889
+ return { diffsFound: 0 };
14890
+ }
14891
+ const { configPackages, configAgents } = config;
14892
+ try {
14893
+ const gitInfo = await collectGitInfo(deps);
14894
+ if (!gitInfo) {
14523
14895
  return { diffsFound: 0 };
14524
14896
  }
14897
+ const { gitRemoteUrl, gitBranch, relativePath } = gitInfo;
14525
14898
  const packageCount = configPackages.length;
14526
14899
  const packageWord = packageCount === 1 ? "package" : "packages";
14527
14900
  logInfoConsole(
@@ -14543,85 +14916,43 @@ async function diffArtefactsHandler(deps) {
14543
14916
  exit(0);
14544
14917
  return { diffsFound: 0 };
14545
14918
  }
14546
- log(formatHeader(`
14547
- Changes found:
14548
- `));
14549
- const groups = groupDiffsByArtefact(diffs);
14550
- for (const [, groupDiffs] of groups) {
14551
- const { artifactType, artifactName } = groupDiffs[0];
14552
- const typeLabel = ARTIFACT_TYPE_LABELS[artifactType];
14553
- log(formatBold(`${typeLabel} "${artifactName}"`));
14554
- const subGroups = subGroupByChangeContent(groupDiffs);
14555
- for (const subGroup of subGroups) {
14556
- for (const diff of subGroup) {
14557
- log(` ${formatFilePath(diff.filePath)}`);
14558
- }
14559
- const label = CHANGE_PROPOSAL_TYPE_LABELS[subGroup[0].type] ?? "content changed";
14560
- log(` - ${label}`);
14561
- formatDiffPayload(subGroup[0], log);
14562
- }
14563
- log("");
14919
+ const allGroupedDiffs = Array.from(groupDiffsByArtefact(diffs).values());
14920
+ const checkResult = await packmindCliHexa.checkDiffs(allGroupedDiffs);
14921
+ const submittedItems = checkResult.results.filter((r) => r.exists);
14922
+ const unsubmittedItems = checkResult.results.filter((r) => !r.exists);
14923
+ const diffsToDisplay = includeSubmitted ? diffs : unsubmittedItems.map((r) => r.diff);
14924
+ const submittedLookup = /* @__PURE__ */ new Map();
14925
+ for (const item of checkResult.results) {
14926
+ submittedLookup.set(item.diff, item);
14564
14927
  }
14565
- const changeCount = diffs.length;
14566
- const changeWord = changeCount === 1 ? "change" : "changes";
14567
- const typeSortOrder = {
14568
- command: 0,
14569
- skill: 1,
14570
- standard: 2
14571
- };
14572
- const uniqueArtefacts = /* @__PURE__ */ new Map();
14573
- for (const [key, groupDiffs] of groups) {
14574
- if (!uniqueArtefacts.has(key)) {
14575
- uniqueArtefacts.set(key, {
14576
- type: groupDiffs[0].artifactType,
14577
- name: groupDiffs[0].artifactName
14578
- });
14928
+ if (diffsToDisplay.length === 0) {
14929
+ log("No new changes found.");
14930
+ if (submittedItems.length > 0) {
14931
+ logInfoConsole(buildSubmittedFooter(submittedItems));
14579
14932
  }
14933
+ if (submit) {
14934
+ logInfoConsole("All changes already submitted.");
14935
+ }
14936
+ exit(0);
14937
+ return { diffsFound: 0 };
14580
14938
  }
14581
- const sortedArtefacts = Array.from(uniqueArtefacts.values()).sort(
14582
- (a, b) => typeSortOrder[a.type] - typeSortOrder[b.type] || a.name.localeCompare(b.name, void 0, { sensitivity: "base" })
14583
- );
14584
- const artefactCount = sortedArtefacts.length;
14585
- const artefactWord = artefactCount === 1 ? "artefact" : "artefacts";
14586
- logWarningConsole(
14587
- `Summary: ${changeCount} ${changeWord} found on ${artefactCount} ${artefactWord}:`
14588
- );
14589
- for (const artefact of sortedArtefacts) {
14590
- const typeLabel = ARTIFACT_TYPE_LABELS[artefact.type];
14591
- logWarningConsole(`* ${typeLabel} "${artefact.name}"`);
14592
- }
14939
+ const changeCount = displayDiffs({
14940
+ diffsToDisplay,
14941
+ submittedLookup,
14942
+ includeSubmitted,
14943
+ unsubmittedItems,
14944
+ submittedItems,
14945
+ log
14946
+ });
14593
14947
  if (submit) {
14594
- const groupedDiffs = Array.from(groupDiffsByArtefact(diffs).values());
14595
- const result = await packmindCliHexa.submitDiffs(groupedDiffs);
14596
- for (const err of result.errors) {
14597
- if (err.code === "ChangeProposalPayloadMismatchError") {
14598
- logErrorConsole(
14599
- `Failed to submit "${err.name}": ${err.artifactType ?? "artifact"} is outdated, please run \`packmind-cli install\` to update it`
14600
- );
14601
- } else {
14602
- logErrorConsole(`Failed to submit "${err.name}": ${err.message}`);
14603
- }
14604
- }
14605
- const summaryParts = [];
14606
- if (result.submitted > 0) {
14607
- summaryParts.push(`${result.submitted} submitted`);
14608
- }
14609
- if (result.alreadySubmitted > 0) {
14610
- summaryParts.push(`${result.alreadySubmitted} already submitted`);
14611
- }
14612
- if (result.errors.length > 0) {
14613
- const errorWord = result.errors.length === 1 ? "error" : "errors";
14614
- summaryParts.push(`${result.errors.length} ${errorWord}`);
14615
- }
14616
- if (summaryParts.length > 0) {
14617
- const summaryMessage = `Summary: ${summaryParts.join(", ")}`;
14618
- if (result.errors.length === 0 && result.alreadySubmitted === 0) {
14619
- logSuccessConsole(summaryMessage);
14620
- } else if (result.errors.length > 0 && result.submitted > 0 || result.alreadySubmitted > 0) {
14621
- logWarningConsole(summaryMessage);
14622
- } else {
14623
- logErrorConsole(summaryMessage);
14624
- }
14948
+ const aborted = await handleSubmission({
14949
+ packmindCliHexa,
14950
+ unsubmittedItems,
14951
+ messageFlag,
14952
+ exit
14953
+ });
14954
+ if (aborted) {
14955
+ return { diffsFound: changeCount };
14625
14956
  }
14626
14957
  }
14627
14958
  exit(0);
@@ -14646,9 +14977,19 @@ var diffCommand = (0, import_cmd_ts19.command)({
14646
14977
  submit: (0, import_cmd_ts19.flag)({
14647
14978
  long: "submit",
14648
14979
  description: "Submit detected changes as change proposals"
14980
+ }),
14981
+ includeSubmitted: (0, import_cmd_ts19.flag)({
14982
+ long: "include-submitted",
14983
+ description: "Include already submitted changes in the output"
14984
+ }),
14985
+ message: (0, import_cmd_ts19.option)({
14986
+ long: "message",
14987
+ short: "m",
14988
+ description: "Message describing the intent behind the changes (max 1024 chars)",
14989
+ type: (0, import_cmd_ts19.optional)(import_cmd_ts19.string)
14649
14990
  })
14650
14991
  },
14651
- handler: async ({ submit }) => {
14992
+ handler: async ({ submit, includeSubmitted, message }) => {
14652
14993
  const packmindLogger = new PackmindLogger("PackmindCLI", "info" /* INFO */);
14653
14994
  const packmindCliHexa = new PackmindCliHexa(packmindLogger);
14654
14995
  await diffArtefactsHandler({
@@ -14657,7 +14998,9 @@ var diffCommand = (0, import_cmd_ts19.command)({
14657
14998
  getCwd: () => process.cwd(),
14658
14999
  log: console.log,
14659
15000
  error: console.error,
14660
- submit
15001
+ submit,
15002
+ includeSubmitted,
15003
+ message
14661
15004
  });
14662
15005
  }
14663
15006
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@packmind/cli",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "A command-line interface for Packmind linting and code quality checks",
5
5
  "private": false,
6
6
  "bin": {