@packmind/cli 0.29.1 → 0.30.1

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 +1322 -695
  2. package/package.json +17 -16
package/main.cjs CHANGED
@@ -41,7 +41,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
41
41
  ));
42
42
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
43
43
 
44
- // node_modules/chalk/source/vendor/ansi-styles/index.js
44
+ // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
45
45
  function assembleStyles() {
46
46
  const codes = /* @__PURE__ */ new Map();
47
47
  for (const [groupName, group] of Object.entries(styles)) {
@@ -158,7 +158,7 @@ function assembleStyles() {
158
158
  }
159
159
  var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
160
160
  var init_ansi_styles = __esm({
161
- "node_modules/chalk/source/vendor/ansi-styles/index.js"() {
161
+ "node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js"() {
162
162
  "use strict";
163
163
  ANSI_BACKGROUND_OFFSET = 10;
164
164
  wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
@@ -233,7 +233,7 @@ var init_ansi_styles = __esm({
233
233
  }
234
234
  });
235
235
 
236
- // node_modules/chalk/source/vendor/supports-color/index.js
236
+ // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
237
237
  function hasFlag(flag8, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
238
238
  const prefix = flag8.startsWith("-") ? "" : flag8.length === 1 ? "-" : "--";
239
239
  const position = argv.indexOf(prefix + flag8);
@@ -351,7 +351,7 @@ function createSupportsColor(stream, options = {}) {
351
351
  }
352
352
  var import_node_process, import_node_os, import_node_tty, env, flagForceColor, supportsColor, supports_color_default;
353
353
  var init_supports_color = __esm({
354
- "node_modules/chalk/source/vendor/supports-color/index.js"() {
354
+ "node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js"() {
355
355
  "use strict";
356
356
  import_node_process = __toESM(require("node:process"), 1);
357
357
  import_node_os = __toESM(require("node:os"), 1);
@@ -370,42 +370,42 @@ var init_supports_color = __esm({
370
370
  }
371
371
  });
372
372
 
373
- // node_modules/chalk/source/utilities.js
374
- function stringReplaceAll(string21, substring, replacer) {
375
- let index = string21.indexOf(substring);
373
+ // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
374
+ function stringReplaceAll(string20, substring, replacer) {
375
+ let index = string20.indexOf(substring);
376
376
  if (index === -1) {
377
- return string21;
377
+ return string20;
378
378
  }
379
379
  const substringLength = substring.length;
380
380
  let endIndex = 0;
381
381
  let returnValue = "";
382
382
  do {
383
- returnValue += string21.slice(endIndex, index) + substring + replacer;
383
+ returnValue += string20.slice(endIndex, index) + substring + replacer;
384
384
  endIndex = index + substringLength;
385
- index = string21.indexOf(substring, endIndex);
385
+ index = string20.indexOf(substring, endIndex);
386
386
  } while (index !== -1);
387
- returnValue += string21.slice(endIndex);
387
+ returnValue += string20.slice(endIndex);
388
388
  return returnValue;
389
389
  }
390
- function stringEncaseCRLFWithFirstIndex(string21, prefix, postfix, index) {
390
+ function stringEncaseCRLFWithFirstIndex(string20, prefix, postfix, index) {
391
391
  let endIndex = 0;
392
392
  let returnValue = "";
393
393
  do {
394
- const gotCR = string21[index - 1] === "\r";
395
- returnValue += string21.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
394
+ const gotCR = string20[index - 1] === "\r";
395
+ returnValue += string20.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
396
396
  endIndex = index + 1;
397
- index = string21.indexOf("\n", endIndex);
397
+ index = string20.indexOf("\n", endIndex);
398
398
  } while (index !== -1);
399
- returnValue += string21.slice(endIndex);
399
+ returnValue += string20.slice(endIndex);
400
400
  return returnValue;
401
401
  }
402
402
  var init_utilities = __esm({
403
- "node_modules/chalk/source/utilities.js"() {
403
+ "node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js"() {
404
404
  "use strict";
405
405
  }
406
406
  });
407
407
 
408
- // node_modules/chalk/source/index.js
408
+ // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
409
409
  var source_exports = {};
410
410
  __export(source_exports, {
411
411
  Chalk: () => Chalk,
@@ -427,16 +427,16 @@ function createChalk(options) {
427
427
  }
428
428
  var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles2, applyOptions, Chalk, chalkFactory, getModelAnsi, usedModels, proto, createStyler, createBuilder, applyStyle, chalk, chalkStderr, source_default;
429
429
  var init_source = __esm({
430
- "node_modules/chalk/source/index.js"() {
430
+ "node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js"() {
431
431
  "use strict";
432
432
  init_ansi_styles();
433
433
  init_supports_color();
434
434
  init_utilities();
435
435
  init_ansi_styles();
436
436
  ({ stdout: stdoutColor, stderr: stderrColor } = supports_color_default);
437
- GENERATOR = Symbol("GENERATOR");
438
- STYLER = Symbol("STYLER");
439
- IS_EMPTY = Symbol("IS_EMPTY");
437
+ GENERATOR = /* @__PURE__ */ Symbol("GENERATOR");
438
+ STYLER = /* @__PURE__ */ Symbol("STYLER");
439
+ IS_EMPTY = /* @__PURE__ */ Symbol("IS_EMPTY");
440
440
  levelMapping = [
441
441
  "ansi",
442
442
  "ansi",
@@ -555,26 +555,26 @@ var init_source = __esm({
555
555
  builder[IS_EMPTY] = _isEmpty;
556
556
  return builder;
557
557
  };
558
- applyStyle = (self, string21) => {
559
- if (self.level <= 0 || !string21) {
560
- return self[IS_EMPTY] ? "" : string21;
558
+ applyStyle = (self, string20) => {
559
+ if (self.level <= 0 || !string20) {
560
+ return self[IS_EMPTY] ? "" : string20;
561
561
  }
562
562
  let styler = self[STYLER];
563
563
  if (styler === void 0) {
564
- return string21;
564
+ return string20;
565
565
  }
566
566
  const { openAll, closeAll } = styler;
567
- if (string21.includes("\x1B")) {
567
+ if (string20.includes("\x1B")) {
568
568
  while (styler !== void 0) {
569
- string21 = stringReplaceAll(string21, styler.close, styler.open);
569
+ string20 = stringReplaceAll(string20, styler.close, styler.open);
570
570
  styler = styler.parent;
571
571
  }
572
572
  }
573
- const lfIndex = string21.indexOf("\n");
573
+ const lfIndex = string20.indexOf("\n");
574
574
  if (lfIndex !== -1) {
575
- string21 = stringEncaseCRLFWithFirstIndex(string21, closeAll, openAll, lfIndex);
575
+ string20 = stringEncaseCRLFWithFirstIndex(string20, closeAll, openAll, lfIndex);
576
576
  }
577
- return openAll + string21 + closeAll;
577
+ return openAll + string20 + closeAll;
578
578
  };
579
579
  Object.defineProperties(createChalk.prototype, styles2);
580
580
  chalk = createChalk();
@@ -583,9 +583,9 @@ var init_source = __esm({
583
583
  }
584
584
  });
585
585
 
586
- // node_modules/didyoumean/didYouMean-1.2.1.js
586
+ // node_modules/.pnpm/didyoumean@1.2.2/node_modules/didyoumean/didYouMean-1.2.1.js
587
587
  var require_didYouMean_1_2_1 = __commonJS({
588
- "node_modules/didyoumean/didYouMean-1.2.1.js"(exports2, module2) {
588
+ "node_modules/.pnpm/didyoumean@1.2.2/node_modules/didyoumean/didYouMean-1.2.1.js"(exports2, module2) {
589
589
  "use strict";
590
590
  (function() {
591
591
  "use strict";
@@ -683,9 +683,9 @@ var require_didYouMean_1_2_1 = __commonJS({
683
683
  }
684
684
  });
685
685
 
686
- // node_modules/cmd-ts/dist/cjs/Result.js
686
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/Result.js
687
687
  var require_Result = __commonJS({
688
- "node_modules/cmd-ts/dist/cjs/Result.js"(exports2) {
688
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/Result.js"(exports2) {
689
689
  "use strict";
690
690
  Object.defineProperty(exports2, "__esModule", { value: true });
691
691
  exports2.ok = ok;
@@ -716,9 +716,9 @@ var require_Result = __commonJS({
716
716
  }
717
717
  });
718
718
 
719
- // node_modules/cmd-ts/dist/cjs/effects.js
719
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/effects.js
720
720
  var require_effects = __commonJS({
721
- "node_modules/cmd-ts/dist/cjs/effects.js"(exports2) {
721
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/effects.js"(exports2) {
722
722
  "use strict";
723
723
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
724
724
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -753,9 +753,9 @@ ${coloredExit}`;
753
753
  }
754
754
  });
755
755
 
756
- // node_modules/cmd-ts/dist/cjs/newparser/findOption.js
756
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/newparser/findOption.js
757
757
  var require_findOption = __commonJS({
758
- "node_modules/cmd-ts/dist/cjs/newparser/findOption.js"(exports2) {
758
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/newparser/findOption.js"(exports2) {
759
759
  "use strict";
760
760
  Object.defineProperty(exports2, "__esModule", { value: true });
761
761
  exports2.findOption = findOption;
@@ -779,9 +779,9 @@ var require_findOption = __commonJS({
779
779
  }
780
780
  });
781
781
 
782
- // node_modules/cmd-ts/dist/cjs/from.js
782
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/from.js
783
783
  var require_from = __commonJS({
784
- "node_modules/cmd-ts/dist/cjs/from.js"(exports2) {
784
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/from.js"(exports2) {
785
785
  "use strict";
786
786
  Object.defineProperty(exports2, "__esModule", { value: true });
787
787
  exports2.identity = identity;
@@ -795,9 +795,9 @@ var require_from = __commonJS({
795
795
  }
796
796
  });
797
797
 
798
- // node_modules/cmd-ts/dist/cjs/type.js
798
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/type.js
799
799
  var require_type = __commonJS({
800
- "node_modules/cmd-ts/dist/cjs/type.js"(exports2) {
800
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/type.js"(exports2) {
801
801
  "use strict";
802
802
  Object.defineProperty(exports2, "__esModule", { value: true });
803
803
  exports2.identity = void 0;
@@ -836,13 +836,13 @@ var require_type = __commonJS({
836
836
  }
837
837
  });
838
838
 
839
- // node_modules/cmd-ts/dist/cjs/types.js
839
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/types.js
840
840
  var require_types = __commonJS({
841
- "node_modules/cmd-ts/dist/cjs/types.js"(exports2) {
841
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/types.js"(exports2) {
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 = optional17;
845
+ exports2.optional = optional18;
846
846
  exports2.array = array2;
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 optional17(t) {
872
+ function optional18(t) {
873
873
  return {
874
874
  ...t,
875
875
  defaultValue() {
@@ -888,11 +888,11 @@ var require_types = __commonJS({
888
888
  }
889
889
  });
890
890
 
891
- // node_modules/cmd-ts/dist/cjs/flag.js
891
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/flag.js
892
892
  var require_flag = __commonJS({
893
- "node_modules/cmd-ts/dist/cjs/flag.js"(exports2) {
893
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/flag.js"(exports2) {
894
894
  "use strict";
895
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
895
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
896
896
  if (k2 === void 0) k2 = k;
897
897
  var desc = Object.getOwnPropertyDescriptor(m, k);
898
898
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -901,16 +901,16 @@ var require_flag = __commonJS({
901
901
  } };
902
902
  }
903
903
  Object.defineProperty(o, k2, desc);
904
- } : function(o, m, k, k2) {
904
+ }) : (function(o, m, k, k2) {
905
905
  if (k2 === void 0) k2 = k;
906
906
  o[k2] = m[k];
907
- });
908
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
907
+ }));
908
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
909
909
  Object.defineProperty(o, "default", { enumerable: true, value: v });
910
- } : function(o, v) {
910
+ }) : function(o, v) {
911
911
  o["default"] = v;
912
912
  });
913
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
913
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
914
914
  var ownKeys = function(o) {
915
915
  ownKeys = Object.getOwnPropertyNames || function(o2) {
916
916
  var ar = [];
@@ -928,7 +928,7 @@ var require_flag = __commonJS({
928
928
  __setModuleDefault(result, mod);
929
929
  return result;
930
930
  };
931
- }();
931
+ })();
932
932
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
933
933
  return mod && mod.__esModule ? mod : { "default": mod };
934
934
  };
@@ -1093,11 +1093,11 @@ var require_flag = __commonJS({
1093
1093
  }
1094
1094
  });
1095
1095
 
1096
- // node_modules/cmd-ts/dist/cjs/circuitbreaker.js
1096
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/circuitbreaker.js
1097
1097
  var require_circuitbreaker = __commonJS({
1098
- "node_modules/cmd-ts/dist/cjs/circuitbreaker.js"(exports2) {
1098
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/circuitbreaker.js"(exports2) {
1099
1099
  "use strict";
1100
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
1100
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
1101
1101
  if (k2 === void 0) k2 = k;
1102
1102
  var desc = Object.getOwnPropertyDescriptor(m, k);
1103
1103
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -1106,16 +1106,16 @@ var require_circuitbreaker = __commonJS({
1106
1106
  } };
1107
1107
  }
1108
1108
  Object.defineProperty(o, k2, desc);
1109
- } : function(o, m, k, k2) {
1109
+ }) : (function(o, m, k, k2) {
1110
1110
  if (k2 === void 0) k2 = k;
1111
1111
  o[k2] = m[k];
1112
- });
1113
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
1112
+ }));
1113
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
1114
1114
  Object.defineProperty(o, "default", { enumerable: true, value: v });
1115
- } : function(o, v) {
1115
+ }) : function(o, v) {
1116
1116
  o["default"] = v;
1117
1117
  });
1118
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
1118
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
1119
1119
  var ownKeys = function(o) {
1120
1120
  ownKeys = Object.getOwnPropertyNames || function(o2) {
1121
1121
  var ar = [];
@@ -1133,7 +1133,7 @@ var require_circuitbreaker = __commonJS({
1133
1133
  __setModuleDefault(result, mod);
1134
1134
  return result;
1135
1135
  };
1136
- }();
1136
+ })();
1137
1137
  Object.defineProperty(exports2, "__esModule", { value: true });
1138
1138
  exports2.versionFlag = exports2.helpFlag = void 0;
1139
1139
  exports2.handleCircuitBreaker = handleCircuitBreaker;
@@ -1210,11 +1210,11 @@ var require_circuitbreaker = __commonJS({
1210
1210
  }
1211
1211
  });
1212
1212
 
1213
- // node_modules/cmd-ts/dist/cjs/positional.js
1213
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/positional.js
1214
1214
  var require_positional = __commonJS({
1215
- "node_modules/cmd-ts/dist/cjs/positional.js"(exports2) {
1215
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/positional.js"(exports2) {
1216
1216
  "use strict";
1217
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
1217
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
1218
1218
  if (k2 === void 0) k2 = k;
1219
1219
  var desc = Object.getOwnPropertyDescriptor(m, k);
1220
1220
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -1223,16 +1223,16 @@ var require_positional = __commonJS({
1223
1223
  } };
1224
1224
  }
1225
1225
  Object.defineProperty(o, k2, desc);
1226
- } : function(o, m, k, k2) {
1226
+ }) : (function(o, m, k, k2) {
1227
1227
  if (k2 === void 0) k2 = k;
1228
1228
  o[k2] = m[k];
1229
- });
1230
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
1229
+ }));
1230
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
1231
1231
  Object.defineProperty(o, "default", { enumerable: true, value: v });
1232
- } : function(o, v) {
1232
+ }) : function(o, v) {
1233
1233
  o["default"] = v;
1234
1234
  });
1235
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
1235
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
1236
1236
  var ownKeys = function(o) {
1237
1237
  ownKeys = Object.getOwnPropertyNames || function(o2) {
1238
1238
  var ar = [];
@@ -1250,12 +1250,12 @@ var require_positional = __commonJS({
1250
1250
  __setModuleDefault(result, mod);
1251
1251
  return result;
1252
1252
  };
1253
- }();
1253
+ })();
1254
1254
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
1255
1255
  return mod && mod.__esModule ? mod : { "default": mod };
1256
1256
  };
1257
1257
  Object.defineProperty(exports2, "__esModule", { value: true });
1258
- exports2.positional = positional10;
1258
+ exports2.positional = positional12;
1259
1259
  var chalk_1 = __importDefault((init_source(), __toCommonJS(source_exports)));
1260
1260
  var Result = __importStar(require_Result());
1261
1261
  var types_1 = require_types();
@@ -1295,8 +1295,8 @@ var require_positional = __commonJS({
1295
1295
  var _a2;
1296
1296
  const positionals = nodes.filter((node) => node.type === "positionalArgument" && !visitedNodes.has(node));
1297
1297
  const defaultValueFn = (_a2 = config.defaultValue) !== null && _a2 !== void 0 ? _a2 : config.type.defaultValue;
1298
- const positional11 = positionals[0];
1299
- if (!positional11) {
1298
+ const positional13 = positionals[0];
1299
+ if (!positional13) {
1300
1300
  if (defaultValueFn) {
1301
1301
  return Result.ok(defaultValueFn());
1302
1302
  }
@@ -1309,13 +1309,13 @@ var require_positional = __commonJS({
1309
1309
  ]
1310
1310
  });
1311
1311
  }
1312
- visitedNodes.add(positional11);
1313
- const decoded = await Result.safeAsync(config.type.from(positional11.raw));
1312
+ visitedNodes.add(positional13);
1313
+ const decoded = await Result.safeAsync(config.type.from(positional13.raw));
1314
1314
  if (Result.isErr(decoded)) {
1315
1315
  return Result.err({
1316
1316
  errors: [
1317
1317
  {
1318
- nodes: [positional11],
1318
+ nodes: [positional13],
1319
1319
  message: decoded.error.message
1320
1320
  }
1321
1321
  ]
@@ -1325,7 +1325,7 @@ var require_positional = __commonJS({
1325
1325
  }
1326
1326
  };
1327
1327
  }
1328
- function positional10(config) {
1328
+ function positional12(config) {
1329
1329
  return fullPositional({
1330
1330
  type: types_1.string,
1331
1331
  ...config
@@ -1334,11 +1334,11 @@ var require_positional = __commonJS({
1334
1334
  }
1335
1335
  });
1336
1336
 
1337
- // node_modules/cmd-ts/dist/cjs/subcommands.js
1337
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/subcommands.js
1338
1338
  var require_subcommands = __commonJS({
1339
- "node_modules/cmd-ts/dist/cjs/subcommands.js"(exports2) {
1339
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/subcommands.js"(exports2) {
1340
1340
  "use strict";
1341
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
1341
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
1342
1342
  if (k2 === void 0) k2 = k;
1343
1343
  var desc = Object.getOwnPropertyDescriptor(m, k);
1344
1344
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -1347,16 +1347,16 @@ var require_subcommands = __commonJS({
1347
1347
  } };
1348
1348
  }
1349
1349
  Object.defineProperty(o, k2, desc);
1350
- } : function(o, m, k, k2) {
1350
+ }) : (function(o, m, k, k2) {
1351
1351
  if (k2 === void 0) k2 = k;
1352
1352
  o[k2] = m[k];
1353
- });
1354
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
1353
+ }));
1354
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
1355
1355
  Object.defineProperty(o, "default", { enumerable: true, value: v });
1356
- } : function(o, v) {
1356
+ }) : function(o, v) {
1357
1357
  o["default"] = v;
1358
1358
  });
1359
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
1359
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
1360
1360
  var ownKeys = function(o) {
1361
1361
  ownKeys = Object.getOwnPropertyNames || function(o2) {
1362
1362
  var ar = [];
@@ -1374,18 +1374,18 @@ var require_subcommands = __commonJS({
1374
1374
  __setModuleDefault(result, mod);
1375
1375
  return result;
1376
1376
  };
1377
- }();
1377
+ })();
1378
1378
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
1379
1379
  return mod && mod.__esModule ? mod : { "default": mod };
1380
1380
  };
1381
1381
  Object.defineProperty(exports2, "__esModule", { value: true });
1382
- exports2.subcommands = subcommands10;
1382
+ exports2.subcommands = subcommands11;
1383
1383
  var chalk_1 = __importDefault((init_source(), __toCommonJS(source_exports)));
1384
1384
  var didyoumean_1 = __importDefault(require_didYouMean_1_2_1());
1385
1385
  var Result = __importStar(require_Result());
1386
1386
  var circuitbreaker_1 = require_circuitbreaker();
1387
1387
  var positional_1 = require_positional();
1388
- function subcommands10(config) {
1388
+ function subcommands11(config) {
1389
1389
  const circuitbreaker = (0, circuitbreaker_1.createCircuitBreaker)(!!config.version);
1390
1390
  const type = {
1391
1391
  async from(str) {
@@ -1536,9 +1536,9 @@ Did you mean ${chalk_1.default.italic(option22)}?`;
1536
1536
  }
1537
1537
  });
1538
1538
 
1539
- // node_modules/cmd-ts/dist/cjs/binary.js
1539
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/binary.js
1540
1540
  var require_binary = __commonJS({
1541
- "node_modules/cmd-ts/dist/cjs/binary.js"(exports2) {
1541
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/binary.js"(exports2) {
1542
1542
  "use strict";
1543
1543
  Object.defineProperty(exports2, "__esModule", { value: true });
1544
1544
  exports2.binary = binary;
@@ -1559,7 +1559,7 @@ var require_binary = __commonJS({
1559
1559
  }
1560
1560
  });
1561
1561
 
1562
- // node_modules/strip-ansi/node_modules/ansi-regex/index.js
1562
+ // node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js
1563
1563
  function ansiRegex({ onlyFirst = false } = {}) {
1564
1564
  const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
1565
1565
  const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
@@ -1568,37 +1568,37 @@ function ansiRegex({ onlyFirst = false } = {}) {
1568
1568
  return new RegExp(pattern, onlyFirst ? void 0 : "g");
1569
1569
  }
1570
1570
  var init_ansi_regex = __esm({
1571
- "node_modules/strip-ansi/node_modules/ansi-regex/index.js"() {
1571
+ "node_modules/.pnpm/ansi-regex@6.2.2/node_modules/ansi-regex/index.js"() {
1572
1572
  "use strict";
1573
1573
  }
1574
1574
  });
1575
1575
 
1576
- // node_modules/strip-ansi/index.js
1576
+ // node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
1577
1577
  var strip_ansi_exports = {};
1578
1578
  __export(strip_ansi_exports, {
1579
1579
  default: () => stripAnsi
1580
1580
  });
1581
- function stripAnsi(string21) {
1582
- if (typeof string21 !== "string") {
1583
- throw new TypeError(`Expected a \`string\`, got \`${typeof string21}\``);
1581
+ function stripAnsi(string20) {
1582
+ if (typeof string20 !== "string") {
1583
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string20}\``);
1584
1584
  }
1585
- if (!string21.includes("\x1B") && !string21.includes("\x9B")) {
1586
- return string21;
1585
+ if (!string20.includes("\x1B") && !string20.includes("\x9B")) {
1586
+ return string20;
1587
1587
  }
1588
- return string21.replace(regex, "");
1588
+ return string20.replace(regex, "");
1589
1589
  }
1590
1590
  var regex;
1591
1591
  var init_strip_ansi = __esm({
1592
- "node_modules/strip-ansi/index.js"() {
1592
+ "node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js"() {
1593
1593
  "use strict";
1594
1594
  init_ansi_regex();
1595
1595
  regex = ansiRegex();
1596
1596
  }
1597
1597
  });
1598
1598
 
1599
- // node_modules/cmd-ts/dist/cjs/utils.js
1599
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/utils.js
1600
1600
  var require_utils = __commonJS({
1601
- "node_modules/cmd-ts/dist/cjs/utils.js"(exports2) {
1601
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/utils.js"(exports2) {
1602
1602
  "use strict";
1603
1603
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
1604
1604
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -1656,11 +1656,11 @@ var require_utils = __commonJS({
1656
1656
  }
1657
1657
  });
1658
1658
 
1659
- // node_modules/cmd-ts/dist/cjs/command.js
1659
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/command.js
1660
1660
  var require_command = __commonJS({
1661
- "node_modules/cmd-ts/dist/cjs/command.js"(exports2) {
1661
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/command.js"(exports2) {
1662
1662
  "use strict";
1663
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
1663
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
1664
1664
  if (k2 === void 0) k2 = k;
1665
1665
  var desc = Object.getOwnPropertyDescriptor(m, k);
1666
1666
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -1669,16 +1669,16 @@ var require_command = __commonJS({
1669
1669
  } };
1670
1670
  }
1671
1671
  Object.defineProperty(o, k2, desc);
1672
- } : function(o, m, k, k2) {
1672
+ }) : (function(o, m, k, k2) {
1673
1673
  if (k2 === void 0) k2 = k;
1674
1674
  o[k2] = m[k];
1675
- });
1676
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
1675
+ }));
1676
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
1677
1677
  Object.defineProperty(o, "default", { enumerable: true, value: v });
1678
- } : function(o, v) {
1678
+ }) : function(o, v) {
1679
1679
  o["default"] = v;
1680
1680
  });
1681
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
1681
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
1682
1682
  var ownKeys = function(o) {
1683
1683
  ownKeys = Object.getOwnPropertyNames || function(o2) {
1684
1684
  var ar = [];
@@ -1696,17 +1696,17 @@ var require_command = __commonJS({
1696
1696
  __setModuleDefault(result, mod);
1697
1697
  return result;
1698
1698
  };
1699
- }();
1699
+ })();
1700
1700
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
1701
1701
  return mod && mod.__esModule ? mod : { "default": mod };
1702
1702
  };
1703
1703
  Object.defineProperty(exports2, "__esModule", { value: true });
1704
- exports2.command = command32;
1704
+ exports2.command = command34;
1705
1705
  var chalk_1 = __importDefault((init_source(), __toCommonJS(source_exports)));
1706
1706
  var Result = __importStar(require_Result());
1707
1707
  var circuitbreaker_1 = require_circuitbreaker();
1708
1708
  var utils_1 = require_utils();
1709
- function command32(config) {
1709
+ function command34(config) {
1710
1710
  const argEntries = (0, utils_1.entries)(config.args);
1711
1711
  const circuitbreaker = (0, circuitbreaker_1.createCircuitBreaker)(!!config.version);
1712
1712
  return {
@@ -1822,11 +1822,11 @@ var require_command = __commonJS({
1822
1822
  }
1823
1823
  });
1824
1824
 
1825
- // node_modules/cmd-ts/dist/cjs/option.js
1825
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/option.js
1826
1826
  var require_option = __commonJS({
1827
- "node_modules/cmd-ts/dist/cjs/option.js"(exports2) {
1827
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/option.js"(exports2) {
1828
1828
  "use strict";
1829
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
1829
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
1830
1830
  if (k2 === void 0) k2 = k;
1831
1831
  var desc = Object.getOwnPropertyDescriptor(m, k);
1832
1832
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -1835,16 +1835,16 @@ var require_option = __commonJS({
1835
1835
  } };
1836
1836
  }
1837
1837
  Object.defineProperty(o, k2, desc);
1838
- } : function(o, m, k, k2) {
1838
+ }) : (function(o, m, k, k2) {
1839
1839
  if (k2 === void 0) k2 = k;
1840
1840
  o[k2] = m[k];
1841
- });
1842
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
1841
+ }));
1842
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
1843
1843
  Object.defineProperty(o, "default", { enumerable: true, value: v });
1844
- } : function(o, v) {
1844
+ }) : function(o, v) {
1845
1845
  o["default"] = v;
1846
1846
  });
1847
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
1847
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
1848
1848
  var ownKeys = function(o) {
1849
1849
  ownKeys = Object.getOwnPropertyNames || function(o2) {
1850
1850
  var ar = [];
@@ -1862,7 +1862,7 @@ var require_option = __commonJS({
1862
1862
  __setModuleDefault(result, mod);
1863
1863
  return result;
1864
1864
  };
1865
- }();
1865
+ })();
1866
1866
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
1867
1867
  return mod && mod.__esModule ? mod : { "default": mod };
1868
1868
  };
@@ -2013,9 +2013,9 @@ var require_option = __commonJS({
2013
2013
  }
2014
2014
  });
2015
2015
 
2016
- // node_modules/cmd-ts/dist/cjs/errorBox.js
2016
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/errorBox.js
2017
2017
  var require_errorBox = __commonJS({
2018
- "node_modules/cmd-ts/dist/cjs/errorBox.js"(exports2) {
2018
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/errorBox.js"(exports2) {
2019
2019
  "use strict";
2020
2020
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
2021
2021
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -2107,9 +2107,9 @@ var require_errorBox = __commonJS({
2107
2107
  }
2108
2108
  });
2109
2109
 
2110
- // node_modules/ms/index.js
2110
+ // node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js
2111
2111
  var require_ms = __commonJS({
2112
- "node_modules/ms/index.js"(exports2, module2) {
2112
+ "node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) {
2113
2113
  "use strict";
2114
2114
  var s = 1e3;
2115
2115
  var m = s * 60;
@@ -2224,9 +2224,9 @@ var require_ms = __commonJS({
2224
2224
  }
2225
2225
  });
2226
2226
 
2227
- // node_modules/debug/src/common.js
2227
+ // node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/common.js
2228
2228
  var require_common = __commonJS({
2229
- "node_modules/debug/src/common.js"(exports2, module2) {
2229
+ "node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/common.js"(exports2, module2) {
2230
2230
  "use strict";
2231
2231
  function setup(env2) {
2232
2232
  createDebug.debug = createDebug;
@@ -2402,9 +2402,9 @@ var require_common = __commonJS({
2402
2402
  }
2403
2403
  });
2404
2404
 
2405
- // node_modules/debug/src/browser.js
2405
+ // node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.js
2406
2406
  var require_browser = __commonJS({
2407
- "node_modules/debug/src/browser.js"(exports2, module2) {
2407
+ "node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.js"(exports2, module2) {
2408
2408
  "use strict";
2409
2409
  exports2.formatArgs = formatArgs;
2410
2410
  exports2.save = save;
@@ -2573,41 +2573,35 @@ var require_browser = __commonJS({
2573
2573
  }
2574
2574
  });
2575
2575
 
2576
- // node_modules/has-flag/index.js
2576
+ // node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js
2577
2577
  var require_has_flag = __commonJS({
2578
- "node_modules/has-flag/index.js"(exports2, module2) {
2578
+ "node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) {
2579
2579
  "use strict";
2580
- module2.exports = (flag8, argv = process.argv) => {
2580
+ module2.exports = (flag8, argv) => {
2581
+ argv = argv || process.argv;
2581
2582
  const prefix = flag8.startsWith("-") ? "" : flag8.length === 1 ? "-" : "--";
2582
- const position = argv.indexOf(prefix + flag8);
2583
- const terminatorPosition = argv.indexOf("--");
2584
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
2583
+ const pos = argv.indexOf(prefix + flag8);
2584
+ const terminatorPos = argv.indexOf("--");
2585
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
2585
2586
  };
2586
2587
  }
2587
2588
  });
2588
2589
 
2589
- // node_modules/supports-color/index.js
2590
+ // node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js
2590
2591
  var require_supports_color = __commonJS({
2591
- "node_modules/supports-color/index.js"(exports2, module2) {
2592
+ "node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) {
2592
2593
  "use strict";
2593
2594
  var os6 = require("os");
2594
- var tty2 = require("tty");
2595
2595
  var hasFlag2 = require_has_flag();
2596
- var { env: env2 } = process;
2596
+ var env2 = process.env;
2597
2597
  var forceColor;
2598
- if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
2599
- forceColor = 0;
2598
+ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false")) {
2599
+ forceColor = false;
2600
2600
  } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
2601
- forceColor = 1;
2601
+ forceColor = true;
2602
2602
  }
2603
2603
  if ("FORCE_COLOR" in env2) {
2604
- if (env2.FORCE_COLOR === "true") {
2605
- forceColor = 1;
2606
- } else if (env2.FORCE_COLOR === "false") {
2607
- forceColor = 0;
2608
- } else {
2609
- forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3);
2610
- }
2604
+ forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0;
2611
2605
  }
2612
2606
  function translateLevel2(level) {
2613
2607
  if (level === 0) {
@@ -2620,8 +2614,8 @@ var require_supports_color = __commonJS({
2620
2614
  has16m: level >= 3
2621
2615
  };
2622
2616
  }
2623
- function supportsColor2(haveStream, streamIsTTY) {
2624
- if (forceColor === 0) {
2617
+ function supportsColor2(stream) {
2618
+ if (forceColor === false) {
2625
2619
  return 0;
2626
2620
  }
2627
2621
  if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
@@ -2630,22 +2624,19 @@ var require_supports_color = __commonJS({
2630
2624
  if (hasFlag2("color=256")) {
2631
2625
  return 2;
2632
2626
  }
2633
- if (haveStream && !streamIsTTY && forceColor === void 0) {
2627
+ if (stream && !stream.isTTY && forceColor !== true) {
2634
2628
  return 0;
2635
2629
  }
2636
- const min = forceColor || 0;
2637
- if (env2.TERM === "dumb") {
2638
- return min;
2639
- }
2630
+ const min = forceColor ? 1 : 0;
2640
2631
  if (process.platform === "win32") {
2641
2632
  const osRelease = os6.release().split(".");
2642
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
2633
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
2643
2634
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
2644
2635
  }
2645
2636
  return 1;
2646
2637
  }
2647
2638
  if ("CI" in env2) {
2648
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
2639
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
2649
2640
  return 1;
2650
2641
  }
2651
2642
  return min;
@@ -2674,23 +2665,26 @@ var require_supports_color = __commonJS({
2674
2665
  if ("COLORTERM" in env2) {
2675
2666
  return 1;
2676
2667
  }
2668
+ if (env2.TERM === "dumb") {
2669
+ return min;
2670
+ }
2677
2671
  return min;
2678
2672
  }
2679
2673
  function getSupportLevel(stream) {
2680
- const level = supportsColor2(stream, stream && stream.isTTY);
2674
+ const level = supportsColor2(stream);
2681
2675
  return translateLevel2(level);
2682
2676
  }
2683
2677
  module2.exports = {
2684
2678
  supportsColor: getSupportLevel,
2685
- stdout: translateLevel2(supportsColor2(true, tty2.isatty(1))),
2686
- stderr: translateLevel2(supportsColor2(true, tty2.isatty(2)))
2679
+ stdout: getSupportLevel(process.stdout),
2680
+ stderr: getSupportLevel(process.stderr)
2687
2681
  };
2688
2682
  }
2689
2683
  });
2690
2684
 
2691
- // node_modules/debug/src/node.js
2685
+ // node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/node.js
2692
2686
  var require_node = __commonJS({
2693
- "node_modules/debug/src/node.js"(exports2, module2) {
2687
+ "node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/node.js"(exports2, module2) {
2694
2688
  "use strict";
2695
2689
  var tty2 = require("tty");
2696
2690
  var util = require("util");
@@ -2863,9 +2857,9 @@ var require_node = __commonJS({
2863
2857
  }
2864
2858
  });
2865
2859
 
2866
- // node_modules/debug/src/index.js
2860
+ // node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/index.js
2867
2861
  var require_src = __commonJS({
2868
- "node_modules/debug/src/index.js"(exports2, module2) {
2862
+ "node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/index.js"(exports2, module2) {
2869
2863
  "use strict";
2870
2864
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
2871
2865
  module2.exports = require_browser();
@@ -2875,9 +2869,9 @@ var require_src = __commonJS({
2875
2869
  }
2876
2870
  });
2877
2871
 
2878
- // node_modules/cmd-ts/dist/cjs/newparser/parser.js
2872
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/newparser/parser.js
2879
2873
  var require_parser = __commonJS({
2880
- "node_modules/cmd-ts/dist/cjs/newparser/parser.js"(exports2) {
2874
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/newparser/parser.js"(exports2) {
2881
2875
  "use strict";
2882
2876
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
2883
2877
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -3073,9 +3067,9 @@ var require_parser = __commonJS({
3073
3067
  }
3074
3068
  });
3075
3069
 
3076
- // node_modules/cmd-ts/dist/cjs/newparser/tokenizer.js
3070
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/newparser/tokenizer.js
3077
3071
  var require_tokenizer = __commonJS({
3078
- "node_modules/cmd-ts/dist/cjs/newparser/tokenizer.js"(exports2) {
3072
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/newparser/tokenizer.js"(exports2) {
3079
3073
  "use strict";
3080
3074
  Object.defineProperty(exports2, "__esModule", { value: true });
3081
3075
  exports2.tokenize = tokenize;
@@ -3087,8 +3081,8 @@ var require_tokenizer = __commonJS({
3087
3081
  tokens.push(token);
3088
3082
  overallIndex += token.raw.length;
3089
3083
  };
3090
- for (const [stringIndex, string21] of (0, utils_1.enumerate)(strings)) {
3091
- const chars = [...string21];
3084
+ for (const [stringIndex, string20] of (0, utils_1.enumerate)(strings)) {
3085
+ const chars = [...string20];
3092
3086
  for (let i = 0; i < chars.length; i++) {
3093
3087
  if (chars[i] === "-" && chars[i + 1] === "-") {
3094
3088
  push({ type: "longPrefix", raw: "--", index: overallIndex });
@@ -3108,9 +3102,9 @@ var require_tokenizer = __commonJS({
3108
3102
  }
3109
3103
  });
3110
3104
 
3111
- // node_modules/cmd-ts/dist/cjs/runner.js
3105
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/runner.js
3112
3106
  var require_runner = __commonJS({
3113
- "node_modules/cmd-ts/dist/cjs/runner.js"(exports2) {
3107
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/runner.js"(exports2) {
3114
3108
  "use strict";
3115
3109
  Object.defineProperty(exports2, "__esModule", { value: true });
3116
3110
  exports2.run = run2;
@@ -3179,11 +3173,11 @@ var require_runner = __commonJS({
3179
3173
  }
3180
3174
  });
3181
3175
 
3182
- // node_modules/cmd-ts/dist/cjs/restPositionals.js
3176
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/restPositionals.js
3183
3177
  var require_restPositionals = __commonJS({
3184
- "node_modules/cmd-ts/dist/cjs/restPositionals.js"(exports2) {
3178
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/restPositionals.js"(exports2) {
3185
3179
  "use strict";
3186
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
3180
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
3187
3181
  if (k2 === void 0) k2 = k;
3188
3182
  var desc = Object.getOwnPropertyDescriptor(m, k);
3189
3183
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -3192,16 +3186,16 @@ var require_restPositionals = __commonJS({
3192
3186
  } };
3193
3187
  }
3194
3188
  Object.defineProperty(o, k2, desc);
3195
- } : function(o, m, k, k2) {
3189
+ }) : (function(o, m, k, k2) {
3196
3190
  if (k2 === void 0) k2 = k;
3197
3191
  o[k2] = m[k];
3198
- });
3199
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
3192
+ }));
3193
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
3200
3194
  Object.defineProperty(o, "default", { enumerable: true, value: v });
3201
- } : function(o, v) {
3195
+ }) : function(o, v) {
3202
3196
  o["default"] = v;
3203
3197
  });
3204
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
3198
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
3205
3199
  var ownKeys = function(o) {
3206
3200
  ownKeys = Object.getOwnPropertyNames || function(o2) {
3207
3201
  var ar = [];
@@ -3219,7 +3213,7 @@ var require_restPositionals = __commonJS({
3219
3213
  __setModuleDefault(result, mod);
3220
3214
  return result;
3221
3215
  };
3222
- }();
3216
+ })();
3223
3217
  Object.defineProperty(exports2, "__esModule", { value: true });
3224
3218
  exports2.restPositionals = restPositionals5;
3225
3219
  var Result = __importStar(require_Result());
@@ -3244,14 +3238,14 @@ var require_restPositionals = __commonJS({
3244
3238
  const positionals = nodes.filter((node) => node.type === "positionalArgument" && !visitedNodes.has(node));
3245
3239
  const results = [];
3246
3240
  const errors = [];
3247
- for (const positional10 of positionals) {
3248
- visitedNodes.add(positional10);
3249
- const decoded = await Result.safeAsync(config.type.from(positional10.raw));
3241
+ for (const positional12 of positionals) {
3242
+ visitedNodes.add(positional12);
3243
+ const decoded = await Result.safeAsync(config.type.from(positional12.raw));
3250
3244
  if (Result.isOk(decoded)) {
3251
3245
  results.push(decoded.value);
3252
3246
  } else {
3253
3247
  errors.push({
3254
- nodes: [positional10],
3248
+ nodes: [positional12],
3255
3249
  message: decoded.error.message
3256
3250
  });
3257
3251
  }
@@ -3274,11 +3268,11 @@ var require_restPositionals = __commonJS({
3274
3268
  }
3275
3269
  });
3276
3270
 
3277
- // node_modules/cmd-ts/dist/cjs/multiflag.js
3271
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/multiflag.js
3278
3272
  var require_multiflag = __commonJS({
3279
- "node_modules/cmd-ts/dist/cjs/multiflag.js"(exports2) {
3273
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/multiflag.js"(exports2) {
3280
3274
  "use strict";
3281
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
3275
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
3282
3276
  if (k2 === void 0) k2 = k;
3283
3277
  var desc = Object.getOwnPropertyDescriptor(m, k);
3284
3278
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -3287,16 +3281,16 @@ var require_multiflag = __commonJS({
3287
3281
  } };
3288
3282
  }
3289
3283
  Object.defineProperty(o, k2, desc);
3290
- } : function(o, m, k, k2) {
3284
+ }) : (function(o, m, k, k2) {
3291
3285
  if (k2 === void 0) k2 = k;
3292
3286
  o[k2] = m[k];
3293
- });
3294
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
3287
+ }));
3288
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
3295
3289
  Object.defineProperty(o, "default", { enumerable: true, value: v });
3296
- } : function(o, v) {
3290
+ }) : function(o, v) {
3297
3291
  o["default"] = v;
3298
3292
  });
3299
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
3293
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
3300
3294
  var ownKeys = function(o) {
3301
3295
  ownKeys = Object.getOwnPropertyNames || function(o2) {
3302
3296
  var ar = [];
@@ -3314,7 +3308,7 @@ var require_multiflag = __commonJS({
3314
3308
  __setModuleDefault(result, mod);
3315
3309
  return result;
3316
3310
  };
3317
- }();
3311
+ })();
3318
3312
  Object.defineProperty(exports2, "__esModule", { value: true });
3319
3313
  exports2.multiflag = multiflag;
3320
3314
  var Result = __importStar(require_Result());
@@ -3385,11 +3379,11 @@ var require_multiflag = __commonJS({
3385
3379
  }
3386
3380
  });
3387
3381
 
3388
- // node_modules/cmd-ts/dist/cjs/multioption.js
3382
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/multioption.js
3389
3383
  var require_multioption = __commonJS({
3390
- "node_modules/cmd-ts/dist/cjs/multioption.js"(exports2) {
3384
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/multioption.js"(exports2) {
3391
3385
  "use strict";
3392
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
3386
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
3393
3387
  if (k2 === void 0) k2 = k;
3394
3388
  var desc = Object.getOwnPropertyDescriptor(m, k);
3395
3389
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -3398,16 +3392,16 @@ var require_multioption = __commonJS({
3398
3392
  } };
3399
3393
  }
3400
3394
  Object.defineProperty(o, k2, desc);
3401
- } : function(o, m, k, k2) {
3395
+ }) : (function(o, m, k, k2) {
3402
3396
  if (k2 === void 0) k2 = k;
3403
3397
  o[k2] = m[k];
3404
- });
3405
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
3398
+ }));
3399
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
3406
3400
  Object.defineProperty(o, "default", { enumerable: true, value: v });
3407
- } : function(o, v) {
3401
+ }) : function(o, v) {
3408
3402
  o["default"] = v;
3409
3403
  });
3410
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
3404
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
3411
3405
  var ownKeys = function(o) {
3412
3406
  ownKeys = Object.getOwnPropertyNames || function(o2) {
3413
3407
  var ar = [];
@@ -3425,7 +3419,7 @@ var require_multioption = __commonJS({
3425
3419
  __setModuleDefault(result, mod);
3426
3420
  return result;
3427
3421
  };
3428
- }();
3422
+ })();
3429
3423
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
3430
3424
  return mod && mod.__esModule ? mod : { "default": mod };
3431
3425
  };
@@ -3557,11 +3551,11 @@ var require_multioption = __commonJS({
3557
3551
  }
3558
3552
  });
3559
3553
 
3560
- // node_modules/cmd-ts/dist/cjs/union.js
3554
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/union.js
3561
3555
  var require_union = __commonJS({
3562
- "node_modules/cmd-ts/dist/cjs/union.js"(exports2) {
3556
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/union.js"(exports2) {
3563
3557
  "use strict";
3564
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
3558
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
3565
3559
  if (k2 === void 0) k2 = k;
3566
3560
  var desc = Object.getOwnPropertyDescriptor(m, k);
3567
3561
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -3570,16 +3564,16 @@ var require_union = __commonJS({
3570
3564
  } };
3571
3565
  }
3572
3566
  Object.defineProperty(o, k2, desc);
3573
- } : function(o, m, k, k2) {
3567
+ }) : (function(o, m, k, k2) {
3574
3568
  if (k2 === void 0) k2 = k;
3575
3569
  o[k2] = m[k];
3576
- });
3577
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
3570
+ }));
3571
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
3578
3572
  Object.defineProperty(o, "default", { enumerable: true, value: v });
3579
- } : function(o, v) {
3573
+ }) : function(o, v) {
3580
3574
  o["default"] = v;
3581
3575
  });
3582
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
3576
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
3583
3577
  var ownKeys = function(o) {
3584
3578
  ownKeys = Object.getOwnPropertyNames || function(o2) {
3585
3579
  var ar = [];
@@ -3597,7 +3591,7 @@ var require_union = __commonJS({
3597
3591
  __setModuleDefault(result, mod);
3598
3592
  return result;
3599
3593
  };
3600
- }();
3594
+ })();
3601
3595
  Object.defineProperty(exports2, "__esModule", { value: true });
3602
3596
  exports2.union = union;
3603
3597
  var Result = __importStar(require_Result());
@@ -3622,9 +3616,9 @@ var require_union = __commonJS({
3622
3616
  }
3623
3617
  });
3624
3618
 
3625
- // node_modules/cmd-ts/dist/cjs/oneOf.js
3619
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/oneOf.js
3626
3620
  var require_oneOf = __commonJS({
3627
- "node_modules/cmd-ts/dist/cjs/oneOf.js"(exports2) {
3621
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/oneOf.js"(exports2) {
3628
3622
  "use strict";
3629
3623
  Object.defineProperty(exports2, "__esModule", { value: true });
3630
3624
  exports2.oneOf = oneOf;
@@ -3645,11 +3639,11 @@ var require_oneOf = __commonJS({
3645
3639
  }
3646
3640
  });
3647
3641
 
3648
- // node_modules/cmd-ts/dist/cjs/rest.js
3642
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/rest.js
3649
3643
  var require_rest = __commonJS({
3650
- "node_modules/cmd-ts/dist/cjs/rest.js"(exports2) {
3644
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/rest.js"(exports2) {
3651
3645
  "use strict";
3652
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
3646
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
3653
3647
  if (k2 === void 0) k2 = k;
3654
3648
  var desc = Object.getOwnPropertyDescriptor(m, k);
3655
3649
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -3658,16 +3652,16 @@ var require_rest = __commonJS({
3658
3652
  } };
3659
3653
  }
3660
3654
  Object.defineProperty(o, k2, desc);
3661
- } : function(o, m, k, k2) {
3655
+ }) : (function(o, m, k, k2) {
3662
3656
  if (k2 === void 0) k2 = k;
3663
3657
  o[k2] = m[k];
3664
- });
3665
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
3658
+ }));
3659
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
3666
3660
  Object.defineProperty(o, "default", { enumerable: true, value: v });
3667
- } : function(o, v) {
3661
+ }) : function(o, v) {
3668
3662
  o["default"] = v;
3669
3663
  });
3670
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
3664
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
3671
3665
  var ownKeys = function(o) {
3672
3666
  ownKeys = Object.getOwnPropertyNames || function(o2) {
3673
3667
  var ar = [];
@@ -3685,7 +3679,7 @@ var require_rest = __commonJS({
3685
3679
  __setModuleDefault(result, mod);
3686
3680
  return result;
3687
3681
  };
3688
- }();
3682
+ })();
3689
3683
  Object.defineProperty(exports2, "__esModule", { value: true });
3690
3684
  exports2.rest = rest;
3691
3685
  var Result = __importStar(require_Result());
@@ -3759,11 +3753,11 @@ var require_rest = __commonJS({
3759
3753
  }
3760
3754
  });
3761
3755
 
3762
- // node_modules/cmd-ts/dist/cjs/index.js
3756
+ // node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/index.js
3763
3757
  var require_cjs = __commonJS({
3764
- "node_modules/cmd-ts/dist/cjs/index.js"(exports2) {
3758
+ "node_modules/.pnpm/cmd-ts@0.14.3/node_modules/cmd-ts/dist/cjs/index.js"(exports2) {
3765
3759
  "use strict";
3766
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
3760
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
3767
3761
  if (k2 === void 0) k2 = k;
3768
3762
  var desc = Object.getOwnPropertyDescriptor(m, k);
3769
3763
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
@@ -3772,10 +3766,10 @@ var require_cjs = __commonJS({
3772
3766
  } };
3773
3767
  }
3774
3768
  Object.defineProperty(o, k2, desc);
3775
- } : function(o, m, k, k2) {
3769
+ }) : (function(o, m, k, k2) {
3776
3770
  if (k2 === void 0) k2 = k;
3777
3771
  o[k2] = m[k];
3778
- });
3772
+ }));
3779
3773
  var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) {
3780
3774
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p);
3781
3775
  };
@@ -3855,7 +3849,7 @@ var require_package = __commonJS({
3855
3849
  "apps/cli/package.json"(exports2, module2) {
3856
3850
  module2.exports = {
3857
3851
  name: "@packmind/cli",
3858
- version: "0.29.1",
3852
+ version: "0.30.1",
3859
3853
  description: "A command-line interface for Packmind linting and code quality checks",
3860
3854
  private: false,
3861
3855
  bin: {
@@ -3891,11 +3885,13 @@ var require_package = __commonJS({
3891
3885
  },
3892
3886
  dependencies: {
3893
3887
  "@types/inquirer": "^9.0.9",
3894
- diff: "^8.0.3",
3888
+ dotenv: "^16",
3895
3889
  inquirer: "^13.0.2",
3896
- zod: "^4.3.5",
3890
+ minimatch: "^10",
3897
3891
  semver: "^7.7.4",
3898
- which: "^4.0.0"
3892
+ undici: "^7",
3893
+ which: "^4.0.0",
3894
+ zod: "^4.3.5"
3899
3895
  },
3900
3896
  devDependencies: {
3901
3897
  "@types/which": "^3.0.4"
@@ -3905,7 +3901,7 @@ var require_package = __commonJS({
3905
3901
  });
3906
3902
 
3907
3903
  // apps/cli/src/main.ts
3908
- var import_cmd_ts41 = __toESM(require_cjs());
3904
+ var import_cmd_ts44 = __toESM(require_cjs());
3909
3905
 
3910
3906
  // apps/cli/src/infra/commands/LinterCommand.ts
3911
3907
  var import_cmd_ts = __toESM(require_cjs());
@@ -4085,6 +4081,7 @@ var VALID_CODING_AGENTS = [
4085
4081
  "packmind",
4086
4082
  "junie",
4087
4083
  "claude",
4084
+ "claude_plugin",
4088
4085
  "cursor",
4089
4086
  "copilot",
4090
4087
  "agents_md",
@@ -4134,6 +4131,12 @@ var AGENT_CAPABILITIES = {
4134
4131
  recipes: false
4135
4132
  },
4136
4133
  claude: { skills: true, standards: true, commands: true, recipes: true },
4134
+ claude_plugin: {
4135
+ skills: true,
4136
+ standards: false,
4137
+ commands: true,
4138
+ recipes: true
4139
+ },
4137
4140
  cursor: { skills: true, standards: true, commands: true, recipes: true },
4138
4141
  copilot: { skills: true, standards: true, commands: true, recipes: true },
4139
4142
  continue: { skills: false, standards: true, commands: true, recipes: true },
@@ -4154,6 +4157,7 @@ var CodingAgents = {
4154
4157
  packmind: "packmind",
4155
4158
  junie: "junie",
4156
4159
  claude: "claude",
4160
+ claude_plugin: "claude_plugin",
4157
4161
  cursor: "cursor",
4158
4162
  copilot: "copilot",
4159
4163
  agents_md: "agents_md",
@@ -4170,6 +4174,11 @@ var CODING_AGENT_ARTEFACT_PATHS = {
4170
4174
  standard: ".claude/rules/",
4171
4175
  skill: ".claude/skills/"
4172
4176
  },
4177
+ claude_plugin: {
4178
+ command: "",
4179
+ standard: "",
4180
+ skill: ""
4181
+ },
4173
4182
  cursor: {
4174
4183
  command: ".cursor/commands/",
4175
4184
  standard: ".cursor/rules/",
@@ -4379,6 +4388,7 @@ var RENDER_MODE_ORDER = [
4379
4388
  "JUNIE" /* JUNIE */,
4380
4389
  "GH_COPILOT" /* GH_COPILOT */,
4381
4390
  "CLAUDE" /* CLAUDE */,
4391
+ "CLAUDE_PLUGIN" /* CLAUDE_PLUGIN */,
4382
4392
  "CURSOR" /* CURSOR */,
4383
4393
  "GITLAB_DUO" /* GITLAB_DUO */,
4384
4394
  "CONTINUE" /* CONTINUE */
@@ -4405,6 +4415,7 @@ var RENDER_MODE_TO_CODING_AGENT = {
4405
4415
  ["JUNIE" /* JUNIE */]: CodingAgents.junie,
4406
4416
  ["GH_COPILOT" /* GH_COPILOT */]: CodingAgents.copilot,
4407
4417
  ["CLAUDE" /* CLAUDE */]: CodingAgents.claude,
4418
+ ["CLAUDE_PLUGIN" /* CLAUDE_PLUGIN */]: CodingAgents.claude_plugin,
4408
4419
  ["CURSOR" /* CURSOR */]: CodingAgents.cursor,
4409
4420
  ["GITLAB_DUO" /* GITLAB_DUO */]: CodingAgents.gitlab_duo,
4410
4421
  ["CONTINUE" /* CONTINUE */]: CodingAgents.continue,
@@ -4451,6 +4462,27 @@ var DeploymentCompletedEvent = class extends UserEvent {
4451
4462
  }
4452
4463
  };
4453
4464
 
4465
+ // packages/types/src/deployments/events/PackagesDeletedEvent.ts
4466
+ var PackagesDeletedEvent = class extends UserEvent {
4467
+ static {
4468
+ this.eventName = "deployments.packages.deleted";
4469
+ }
4470
+ };
4471
+
4472
+ // packages/types/src/deployments/events/PluginDeletedEvent.ts
4473
+ var PluginDeletedEvent = class extends UserEvent {
4474
+ static {
4475
+ this.eventName = "deployments.plugin.deleted";
4476
+ }
4477
+ };
4478
+
4479
+ // packages/types/src/deployments/events/PluginRenderedEvent.ts
4480
+ var PluginRenderedEvent = class extends UserEvent {
4481
+ static {
4482
+ this.eventName = "deployments.plugin.rendered";
4483
+ }
4484
+ };
4485
+
4454
4486
  // packages/types/src/git/GitRepoId.ts
4455
4487
  var createGitRepoId = brandedIdFactory();
4456
4488
 
@@ -4460,6 +4492,9 @@ var createGitCommitId = brandedIdFactory();
4460
4492
  // packages/types/src/git/GitProvider.ts
4461
4493
  var createGitProviderId = brandedIdFactory();
4462
4494
 
4495
+ // packages/types/src/git/OrganizationGitHubApp.ts
4496
+ var createOrganizationGitHubAppId = brandedIdFactory();
4497
+
4463
4498
  // packages/types/src/spaces/SpaceId.ts
4464
4499
  var createSpaceId = brandedIdFactory();
4465
4500
 
@@ -5360,8 +5395,8 @@ var ExecuteSingleFileAstUseCase = class _ExecuteSingleFileAstUseCase {
5360
5395
  static {
5361
5396
  this.fallbackRuleContent = "adhoc-rule";
5362
5397
  }
5363
- async execute(command32) {
5364
- const { program, fileContent, language } = command32;
5398
+ async execute(command34) {
5399
+ const { program, fileContent, language } = command34;
5365
5400
  const result = await this.linterExecutionUseCase.execute({
5366
5401
  filePath: "cli-single-file",
5367
5402
  fileContent,
@@ -5745,8 +5780,8 @@ var GetGitRemoteUrlUseCase = class {
5745
5780
  constructor(gitRemoteUrlService = new GitService()) {
5746
5781
  this.gitRemoteUrlService = gitRemoteUrlService;
5747
5782
  }
5748
- async execute(command32) {
5749
- const { path: repoPath, origin: origin9 } = command32;
5783
+ async execute(command34) {
5784
+ const { path: repoPath, origin: origin9 } = command34;
5750
5785
  return this.gitRemoteUrlService.getGitRemoteUrl(repoPath, origin9);
5751
5786
  }
5752
5787
  };
@@ -5898,8 +5933,8 @@ var ListFilesInDirectoryUseCase = class {
5898
5933
  constructor(listFiles = new ListFiles()) {
5899
5934
  this.listFiles = listFiles;
5900
5935
  }
5901
- async execute(command32) {
5902
- const { path: directoryPath, extensions, excludes = [] } = command32;
5936
+ async execute(command34) {
5937
+ const { path: directoryPath, extensions, excludes = [] } = command34;
5903
5938
  const files = await this.listFiles.listFilesInDirectory(
5904
5939
  directoryPath,
5905
5940
  extensions,
@@ -6014,7 +6049,7 @@ var LintFilesAgainstRuleUseCase = class {
6014
6049
  };
6015
6050
  };
6016
6051
  }
6017
- async execute(command32) {
6052
+ async execute(command34) {
6018
6053
  const {
6019
6054
  path: userPath,
6020
6055
  draftMode,
@@ -6023,7 +6058,7 @@ var LintFilesAgainstRuleUseCase = class {
6023
6058
  language,
6024
6059
  diffMode,
6025
6060
  ignorePatterns
6026
- } = command32;
6061
+ } = command34;
6027
6062
  this.logger.debug(
6028
6063
  `Starting linting: path="${userPath}", draftMode=${!!draftMode}, standardSlug="${standardSlug || "N/A"}", ruleId="${ruleId || "N/A"}", language="${language || "N/A"}", diffMode="${diffMode ?? "none"}"`
6029
6064
  );
@@ -6339,8 +6374,8 @@ var LintFilesAgainstRuleUseCase = class {
6339
6374
  return null;
6340
6375
  }
6341
6376
  }
6342
- async executeProgramsForFile(command32) {
6343
- const result = await this.services.linterExecutionUseCase.execute(command32);
6377
+ async executeProgramsForFile(command34) {
6378
+ const result = await this.services.linterExecutionUseCase.execute(command34);
6344
6379
  return result.violations;
6345
6380
  }
6346
6381
  extractExtensionFromFile(filePath) {
@@ -6363,8 +6398,8 @@ var LintFilesFromConfigUseCase = class {
6363
6398
  this.logger = logger2;
6364
6399
  this.detectionProgramsCache = /* @__PURE__ */ new Map();
6365
6400
  }
6366
- async execute(command32) {
6367
- const { path: userPath, diffMode, ignorePatterns } = command32;
6401
+ async execute(command34) {
6402
+ const { path: userPath, diffMode, ignorePatterns } = command34;
6368
6403
  this.logger.debug(
6369
6404
  `Starting local linting: path="${userPath}", diffMode="${diffMode ?? "none"}"`
6370
6405
  );
@@ -6624,8 +6659,8 @@ var LintFilesFromConfigUseCase = class {
6624
6659
  return null;
6625
6660
  }
6626
6661
  }
6627
- async executeProgramsForFile(command32) {
6628
- const result = await this.services.linterExecutionUseCase.execute(command32);
6662
+ async executeProgramsForFile(command34) {
6663
+ const result = await this.services.linterExecutionUseCase.execute(command34);
6629
6664
  return result.violations;
6630
6665
  }
6631
6666
  extractExtensionFromFile(filePath) {
@@ -6801,13 +6836,13 @@ var PackmindHttpClient = class {
6801
6836
  var ChangeProposalGateway = class {
6802
6837
  constructor(httpClient) {
6803
6838
  this.httpClient = httpClient;
6804
- this.batchCreate = async (command32) => {
6839
+ this.batchCreate = async (command34) => {
6805
6840
  const { organizationId } = this.httpClient.getAuthContext();
6806
6841
  return this.httpClient.request(
6807
- `/api/v0/organizations/${organizationId}/spaces/${command32.spaceId}/change-proposals/batch`,
6842
+ `/api/v0/organizations/${organizationId}/spaces/${command34.spaceId}/change-proposals/batch`,
6808
6843
  {
6809
6844
  method: "POST",
6810
- body: { proposals: command32.proposals },
6845
+ body: { proposals: command34.proposals },
6811
6846
  onError: (response) => {
6812
6847
  if (response.status === 404) {
6813
6848
  throw new CommunityEditionError("change proposals");
@@ -6816,29 +6851,29 @@ var ChangeProposalGateway = class {
6816
6851
  }
6817
6852
  );
6818
6853
  };
6819
- this.batchApply = async (command32) => {
6854
+ this.batchApply = async (command34) => {
6820
6855
  const { organizationId } = this.httpClient.getAuthContext();
6821
6856
  return this.httpClient.request(
6822
6857
  `/api/v0/organizations/${organizationId}/playbook/apply`,
6823
6858
  {
6824
6859
  method: "POST",
6825
6860
  body: {
6826
- proposals: command32.proposals,
6827
- message: command32.message,
6828
- ...command32.directUpdate !== void 0 && {
6829
- directUpdate: command32.directUpdate
6861
+ proposals: command34.proposals,
6862
+ message: command34.message,
6863
+ ...command34.directUpdate !== void 0 && {
6864
+ directUpdate: command34.directUpdate
6830
6865
  }
6831
6866
  }
6832
6867
  }
6833
6868
  );
6834
6869
  };
6835
- this.check = async (command32) => {
6870
+ this.check = async (command34) => {
6836
6871
  const { organizationId } = this.httpClient.getAuthContext();
6837
6872
  return this.httpClient.request(
6838
- `/api/v0/organizations/${organizationId}/spaces/${command32.spaceId}/change-proposals/check`,
6873
+ `/api/v0/organizations/${organizationId}/spaces/${command34.spaceId}/change-proposals/check`,
6839
6874
  {
6840
6875
  method: "POST",
6841
- body: { proposals: command32.proposals },
6876
+ body: { proposals: command34.proposals },
6842
6877
  onError: (response) => {
6843
6878
  if (response.status === 404) {
6844
6879
  throw new CommunityEditionError("change proposals");
@@ -6854,13 +6889,13 @@ var ChangeProposalGateway = class {
6854
6889
  var LinterGateway = class {
6855
6890
  constructor(httpClient) {
6856
6891
  this.httpClient = httpClient;
6857
- this.getDraftDetectionProgramsForRule = async (command32) => {
6892
+ this.getDraftDetectionProgramsForRule = async (command34) => {
6858
6893
  const payload = {
6859
- standardSlug: command32.standardSlug,
6860
- ruleId: command32.ruleId
6894
+ standardSlug: command34.standardSlug,
6895
+ ruleId: command34.ruleId
6861
6896
  };
6862
- if (command32.language) {
6863
- payload.language = command32.language;
6897
+ if (command34.language) {
6898
+ payload.language = command34.language;
6864
6899
  }
6865
6900
  return this.httpClient.request("/api/v0/list-draft-detection-program", {
6866
6901
  method: "POST",
@@ -6872,13 +6907,13 @@ var LinterGateway = class {
6872
6907
  }
6873
6908
  });
6874
6909
  };
6875
- this.getActiveDetectionProgramsForRule = async (command32) => {
6910
+ this.getActiveDetectionProgramsForRule = async (command34) => {
6876
6911
  const payload = {
6877
- standardSlug: command32.standardSlug,
6878
- ruleId: command32.ruleId
6912
+ standardSlug: command34.standardSlug,
6913
+ ruleId: command34.ruleId
6879
6914
  };
6880
- if (command32.language) {
6881
- payload.language = command32.language;
6915
+ if (command34.language) {
6916
+ payload.language = command34.language;
6882
6917
  }
6883
6918
  return this.httpClient.request("/api/v0/list-active-detection-program", {
6884
6919
  method: "POST",
@@ -6890,13 +6925,13 @@ var LinterGateway = class {
6890
6925
  }
6891
6926
  });
6892
6927
  };
6893
- this.getDetectionProgramsForPackages = async (command32) => {
6928
+ this.getDetectionProgramsForPackages = async (command34) => {
6894
6929
  const response = await this.httpClient.request(
6895
6930
  "/api/v0/detection-programs-for-packages",
6896
6931
  {
6897
6932
  method: "POST",
6898
6933
  body: {
6899
- packagesSlugs: command32.packagesSlugs
6934
+ packagesSlugs: command34.packagesSlugs
6900
6935
  },
6901
6936
  onError: (response2) => {
6902
6937
  if (response2.status === 404) {
@@ -6907,10 +6942,10 @@ var LinterGateway = class {
6907
6942
  );
6908
6943
  return handleScopeInTargetsResponse(response);
6909
6944
  };
6910
- this.trackLinterExecution = async (command32) => {
6945
+ this.trackLinterExecution = async (command34) => {
6911
6946
  return this.httpClient.request(`/api/v0/track-execution`, {
6912
6947
  method: "POST",
6913
- body: command32
6948
+ body: command34
6914
6949
  });
6915
6950
  };
6916
6951
  }
@@ -6964,27 +6999,27 @@ var SpacesGateway = class {
6964
6999
  var SkillsGateway = class {
6965
7000
  constructor(httpClient) {
6966
7001
  this.httpClient = httpClient;
6967
- this.upload = async (command32) => {
7002
+ this.upload = async (command34) => {
6968
7003
  const { organizationId } = this.httpClient.getAuthContext();
6969
7004
  return this.httpClient.request(
6970
- `/api/v0/organizations/${organizationId}/spaces/${command32.spaceId}/skills/upload`,
7005
+ `/api/v0/organizations/${organizationId}/spaces/${command34.spaceId}/skills/upload`,
6971
7006
  {
6972
7007
  method: "POST",
6973
- body: command32
7008
+ body: command34
6974
7009
  }
6975
7010
  );
6976
7011
  };
6977
- this.getDefaults = async (command32) => {
7012
+ this.getDefaults = async (command34) => {
6978
7013
  const { organizationId } = this.httpClient.getAuthContext();
6979
7014
  const queryParams = new URLSearchParams();
6980
- if (command32.includeBeta) {
7015
+ if (command34.includeBeta) {
6981
7016
  queryParams.set("includeBeta", "true");
6982
- } else if (command32.cliVersion) {
6983
- queryParams.set("cliVersion", command32.cliVersion);
7017
+ } else if (command34.cliVersion) {
7018
+ queryParams.set("cliVersion", command34.cliVersion);
6984
7019
  }
6985
- if (command32.agents !== void 0) {
7020
+ if (command34.agents !== void 0) {
6986
7021
  queryParams.append("agentsConfigOverride", "true");
6987
- command32.agents.forEach((agent) => {
7022
+ command34.agents.forEach((agent) => {
6988
7023
  queryParams.append("agent", agent);
6989
7024
  });
6990
7025
  }
@@ -6993,10 +7028,10 @@ var SkillsGateway = class {
6993
7028
  `/api/v0/organizations/${organizationId}/skills/default${queryString ? `?${queryString}` : ""}`
6994
7029
  );
6995
7030
  };
6996
- this.list = async (command32) => {
7031
+ this.list = async (command34) => {
6997
7032
  const { organizationId } = this.httpClient.getAuthContext();
6998
7033
  return this.httpClient.request(
6999
- `/api/v0/organizations/${organizationId}/spaces/${command32.spaceId}/skills`
7034
+ `/api/v0/organizations/${organizationId}/spaces/${command34.spaceId}/skills`
7000
7035
  );
7001
7036
  };
7002
7037
  }
@@ -7006,17 +7041,17 @@ var SkillsGateway = class {
7006
7041
  var CommandsGateway = class {
7007
7042
  constructor(httpClient) {
7008
7043
  this.httpClient = httpClient;
7009
- this.create = async (command32) => {
7044
+ this.create = async (command34) => {
7010
7045
  const { organizationId } = this.httpClient.getAuthContext();
7011
7046
  return this.httpClient.request(
7012
- `/api/v0/organizations/${organizationId}/spaces/${command32.spaceId}/recipes`,
7013
- { method: "POST", body: command32 }
7047
+ `/api/v0/organizations/${organizationId}/spaces/${command34.spaceId}/recipes`,
7048
+ { method: "POST", body: command34 }
7014
7049
  );
7015
7050
  };
7016
- this.list = async (command32) => {
7051
+ this.list = async (command34) => {
7017
7052
  const { organizationId } = this.httpClient.getAuthContext();
7018
7053
  const listRecipesResponse = await this.httpClient.request(
7019
- `/api/v0/organizations/${organizationId}/spaces/${command32.spaceId}/recipes`
7054
+ `/api/v0/organizations/${organizationId}/spaces/${command34.spaceId}/recipes`
7020
7055
  );
7021
7056
  if (listRecipesResponse instanceof Array) {
7022
7057
  return { recipes: listRecipesResponse };
@@ -7057,10 +7092,10 @@ var StandardsGateway = class {
7057
7092
  }
7058
7093
  );
7059
7094
  };
7060
- this.list = async (command32) => {
7095
+ this.list = async (command34) => {
7061
7096
  const { organizationId } = this.httpClient.getAuthContext();
7062
7097
  return this.httpClient.request(
7063
- `/api/v0/organizations/${organizationId}/spaces/${command32.spaceId}/standards`
7098
+ `/api/v0/organizations/${organizationId}/spaces/${command34.spaceId}/standards`
7064
7099
  );
7065
7100
  };
7066
7101
  }
@@ -7071,10 +7106,10 @@ var PackagesGateway = class {
7071
7106
  constructor(apiKey, httpClient) {
7072
7107
  this.apiKey = apiKey;
7073
7108
  this.httpClient = httpClient;
7074
- this.list = async (command32) => {
7109
+ this.list = async (command34) => {
7075
7110
  const { organizationId } = this.httpClient.getAuthContext();
7076
7111
  return this.httpClient.request(
7077
- `/api/v0/organizations/${organizationId}/spaces/${command32.spaceId}/packages`
7112
+ `/api/v0/organizations/${organizationId}/spaces/${command34.spaceId}/packages`
7078
7113
  );
7079
7114
  };
7080
7115
  this.getSummary = async ({
@@ -7086,24 +7121,24 @@ var PackagesGateway = class {
7086
7121
  `/api/v0/organizations/${organizationId}/spaces/${spaceId}/packages/summary/${encodeURIComponent(slug6)}`
7087
7122
  );
7088
7123
  };
7089
- this.create = async (command32) => {
7124
+ this.create = async (command34) => {
7090
7125
  const { organizationId } = this.httpClient.getAuthContext();
7091
7126
  return this.httpClient.request(
7092
- `/api/v0/organizations/${organizationId}/spaces/${command32.spaceId}/packages`,
7127
+ `/api/v0/organizations/${organizationId}/spaces/${command34.spaceId}/packages`,
7093
7128
  {
7094
7129
  method: "POST",
7095
- body: command32
7130
+ body: command34
7096
7131
  }
7097
7132
  );
7098
7133
  };
7099
- this.addArtefacts = async (command32) => {
7134
+ this.addArtefacts = async (command34) => {
7100
7135
  const { organizationId } = this.httpClient.getAuthContext();
7101
- const { packageId, spaceId } = command32;
7136
+ const { packageId, spaceId } = command34;
7102
7137
  return this.httpClient.request(
7103
7138
  `/api/v0/organizations/${organizationId}/spaces/${spaceId}/packages/${packageId}/add-artifacts`,
7104
7139
  {
7105
7140
  method: "POST",
7106
- body: command32
7141
+ body: command34
7107
7142
  }
7108
7143
  );
7109
7144
  };
@@ -7114,31 +7149,31 @@ var PackagesGateway = class {
7114
7149
  var DeploymentGateway = class {
7115
7150
  constructor(httpClient) {
7116
7151
  this.httpClient = httpClient;
7117
- this.pull = async (command32) => {
7152
+ this.pull = async (command34) => {
7118
7153
  const { organizationId } = this.httpClient.getAuthContext();
7119
7154
  const queryParams = new URLSearchParams();
7120
- if (command32.packagesSlugs && command32.packagesSlugs.length > 0) {
7121
- command32.packagesSlugs.forEach((slug6) => {
7155
+ if (command34.packagesSlugs && command34.packagesSlugs.length > 0) {
7156
+ command34.packagesSlugs.forEach((slug6) => {
7122
7157
  queryParams.append("packageSlug", slug6);
7123
7158
  });
7124
7159
  }
7125
- if (command32.previousPackagesSlugs && command32.previousPackagesSlugs.length > 0) {
7126
- command32.previousPackagesSlugs.forEach((slug6) => {
7160
+ if (command34.previousPackagesSlugs && command34.previousPackagesSlugs.length > 0) {
7161
+ command34.previousPackagesSlugs.forEach((slug6) => {
7127
7162
  queryParams.append("previousPackageSlug", slug6);
7128
7163
  });
7129
7164
  }
7130
- if (command32.gitRemoteUrl) {
7131
- queryParams.append("gitRemoteUrl", command32.gitRemoteUrl);
7165
+ if (command34.gitRemoteUrl) {
7166
+ queryParams.append("gitRemoteUrl", command34.gitRemoteUrl);
7132
7167
  }
7133
- if (command32.gitBranch) {
7134
- queryParams.append("gitBranch", command32.gitBranch);
7168
+ if (command34.gitBranch) {
7169
+ queryParams.append("gitBranch", command34.gitBranch);
7135
7170
  }
7136
- if (command32.relativePath) {
7137
- queryParams.append("relativePath", command32.relativePath);
7171
+ if (command34.relativePath) {
7172
+ queryParams.append("relativePath", command34.relativePath);
7138
7173
  }
7139
- if (command32.agents !== void 0) {
7174
+ if (command34.agents !== void 0) {
7140
7175
  queryParams.append("agentsConfigOverride", "true");
7141
- command32.agents.forEach((agent) => {
7176
+ command34.agents.forEach((agent) => {
7142
7177
  queryParams.append("agent", agent);
7143
7178
  });
7144
7179
  }
@@ -7146,71 +7181,101 @@ var DeploymentGateway = class {
7146
7181
  `/api/v0/organizations/${organizationId}/pull?${queryParams.toString()}`
7147
7182
  );
7148
7183
  };
7149
- this.install = async (command32) => {
7184
+ this.install = async (command34) => {
7150
7185
  const { organizationId } = this.httpClient.getAuthContext();
7151
7186
  return this.httpClient.request(
7152
7187
  `/api/v0/organizations/${organizationId}/install`,
7153
7188
  {
7154
7189
  method: "POST",
7155
7190
  body: {
7156
- packagesSlugs: command32.packagesSlugs,
7157
- packmindLockFile: command32.packmindLockFile,
7158
- ...command32.relativePath && { relativePath: command32.relativePath },
7159
- ...command32.agents !== void 0 && { agents: command32.agents }
7191
+ packagesSlugs: command34.packagesSlugs,
7192
+ packmindLockFile: command34.packmindLockFile,
7193
+ ...command34.relativePath && { relativePath: command34.relativePath },
7194
+ ...command34.agents !== void 0 && { agents: command34.agents }
7160
7195
  }
7161
7196
  }
7162
7197
  );
7163
7198
  };
7164
- this.getDeployed = async (command32) => {
7199
+ this.getDeployed = async (command34) => {
7165
7200
  const { organizationId } = this.httpClient.getAuthContext();
7166
7201
  return this.httpClient.request(
7167
7202
  `/api/v0/organizations/${organizationId}/deployed-content`,
7168
7203
  {
7169
7204
  method: "POST",
7170
7205
  body: {
7171
- packagesSlugs: command32.packagesSlugs,
7172
- gitRemoteUrl: command32.gitRemoteUrl,
7173
- gitBranch: command32.gitBranch,
7174
- relativePath: command32.relativePath,
7175
- ...command32.agents !== void 0 && { agents: command32.agents }
7206
+ packagesSlugs: command34.packagesSlugs,
7207
+ gitRemoteUrl: command34.gitRemoteUrl,
7208
+ gitBranch: command34.gitBranch,
7209
+ relativePath: command34.relativePath,
7210
+ ...command34.agents !== void 0 && { agents: command34.agents }
7176
7211
  }
7177
7212
  }
7178
7213
  );
7179
7214
  };
7180
- this.getContentByVersions = async (command32) => {
7215
+ this.getContentByVersions = async (command34) => {
7181
7216
  const { organizationId } = this.httpClient.getAuthContext();
7182
7217
  return this.httpClient.request(
7183
7218
  `/api/v0/organizations/${organizationId}/content-by-versions`,
7184
7219
  {
7185
7220
  method: "POST",
7186
7221
  body: {
7187
- artifacts: command32.artifacts,
7188
- ...command32.agents !== void 0 && { agents: command32.agents }
7222
+ artifacts: command34.artifacts,
7223
+ ...command34.agents !== void 0 && { agents: command34.agents }
7189
7224
  }
7190
7225
  }
7191
7226
  );
7192
7227
  };
7193
- this.notifyDistribution = async (command32) => {
7228
+ this.notifyDistribution = async (command34) => {
7194
7229
  const { organizationId } = this.httpClient.getAuthContext();
7195
7230
  return this.httpClient.request(
7196
7231
  `/api/v0/organizations/${organizationId}/deployments`,
7197
7232
  {
7198
7233
  method: "POST",
7199
- body: command32
7234
+ body: command34
7200
7235
  }
7201
7236
  );
7202
7237
  };
7203
- this.notifyArtefactsDistribution = async (command32) => {
7238
+ this.notifyArtefactsDistribution = async (command34) => {
7204
7239
  const { organizationId } = this.httpClient.getAuthContext();
7205
7240
  return this.httpClient.request(
7206
7241
  `/api/v0/organizations/${organizationId}/deployments/notify-artifacts-distribution`,
7207
7242
  {
7208
7243
  method: "POST",
7209
7244
  body: {
7210
- gitRemoteUrl: command32.gitRemoteUrl,
7211
- gitBranch: command32.gitBranch,
7212
- relativePath: command32.relativePath,
7213
- packmindLockFile: command32.packmindLockFile
7245
+ gitRemoteUrl: command34.gitRemoteUrl,
7246
+ gitBranch: command34.gitBranch,
7247
+ relativePath: command34.relativePath,
7248
+ packmindLockFile: command34.packmindLockFile
7249
+ }
7250
+ }
7251
+ );
7252
+ };
7253
+ this.renderPlugin = async (command34) => {
7254
+ const { organizationId } = this.httpClient.getAuthContext();
7255
+ return this.httpClient.request(
7256
+ `/api/v0/organizations/${organizationId}/plugins/render`,
7257
+ {
7258
+ method: "POST",
7259
+ body: {
7260
+ packageSlug: command34.packageSlug,
7261
+ mode: command34.mode,
7262
+ pluginRoot: command34.pluginRoot,
7263
+ pluginName: command34.pluginName,
7264
+ gitRemoteUrl: command34.gitRemoteUrl,
7265
+ gitBranch: command34.gitBranch
7266
+ }
7267
+ }
7268
+ );
7269
+ };
7270
+ this.trackPluginDeleted = async (command34) => {
7271
+ const { organizationId } = this.httpClient.getAuthContext();
7272
+ return this.httpClient.request(
7273
+ `/api/v0/organizations/${organizationId}/plugins/track-deleted`,
7274
+ {
7275
+ method: "POST",
7276
+ body: {
7277
+ packageSlug: command34.packageSlug,
7278
+ gitRemoteUrl: command34.gitRemoteUrl
7214
7279
  }
7215
7280
  }
7216
7281
  );
@@ -7222,13 +7287,13 @@ var DeploymentGateway = class {
7222
7287
  );
7223
7288
  };
7224
7289
  }
7225
- async updateRenderModeConfiguration(command32) {
7290
+ async updateRenderModeConfiguration(command34) {
7226
7291
  const { organizationId } = this.httpClient.getAuthContext();
7227
7292
  await this.httpClient.request(
7228
7293
  `/api/v0/organizations/${organizationId}/deployments/renderModeConfiguration`,
7229
7294
  {
7230
7295
  method: "POST",
7231
- body: { activeRenderModes: command32.activeRenderModes }
7296
+ body: { activeRenderModes: command34.activeRenderModes }
7232
7297
  }
7233
7298
  );
7234
7299
  }
@@ -9028,8 +9093,8 @@ var ExecuteLinterProgramsUseCase = class {
9028
9093
  this.linterAstAdapter = linterAstAdapter;
9029
9094
  this.logger = logger2;
9030
9095
  }
9031
- async execute(command32) {
9032
- const { filePath, fileContent, language, programs } = command32;
9096
+ async execute(command34) {
9097
+ const { filePath, fileContent, language, programs } = command34;
9033
9098
  if (programs.length === 0) {
9034
9099
  return {
9035
9100
  file: filePath,
@@ -9848,8 +9913,8 @@ var InstallPackagesUseCase = class {
9848
9913
  constructor(packmindGateway) {
9849
9914
  this.packmindGateway = packmindGateway;
9850
9915
  }
9851
- async execute(command32) {
9852
- const baseDirectory = command32.baseDirectory || process.cwd();
9916
+ async execute(command34) {
9917
+ const baseDirectory = command34.baseDirectory || process.cwd();
9853
9918
  const result = {
9854
9919
  filesCreated: 0,
9855
9920
  filesUpdated: 0,
@@ -9861,12 +9926,12 @@ var InstallPackagesUseCase = class {
9861
9926
  skillDirectoriesDeleted: 0
9862
9927
  };
9863
9928
  const response = await this.packmindGateway.deployment.pull({
9864
- packagesSlugs: command32.packagesSlugs,
9865
- previousPackagesSlugs: command32.previousPackagesSlugs,
9866
- gitRemoteUrl: command32.gitRemoteUrl,
9867
- gitBranch: command32.gitBranch,
9868
- relativePath: command32.relativePath,
9869
- agents: command32.agents
9929
+ packagesSlugs: command34.packagesSlugs,
9930
+ previousPackagesSlugs: command34.previousPackagesSlugs,
9931
+ gitRemoteUrl: command34.gitRemoteUrl,
9932
+ gitBranch: command34.gitBranch,
9933
+ relativePath: command34.relativePath,
9934
+ agents: command34.agents
9870
9935
  });
9871
9936
  const filteredCreateOrUpdate = response.fileUpdates.createOrUpdate.filter(
9872
9937
  (file) => file.path !== "packmind.json"
@@ -10207,7 +10272,33 @@ function stripFullStandardLinkFooter(content) {
10207
10272
  );
10208
10273
  }
10209
10274
 
10275
+ // apps/cli/src/domain/entities/PackageSlug.ts
10276
+ function isFullParsedPackageSlug(tbd) {
10277
+ const asFullParsedPackageSlug = tbd;
10278
+ return asFullParsedPackageSlug.spaceSlug !== void 0 && asFullParsedPackageSlug.packageSlug !== void 0;
10279
+ }
10280
+ function parsePackageSlug(slug6) {
10281
+ const slugs = slug6.split("/");
10282
+ if (slugs.length === 1) {
10283
+ return { packageSlug: slugs[0] };
10284
+ }
10285
+ if (slugs.length == 2) {
10286
+ return {
10287
+ spaceSlug: slugs[0].startsWith("@") ? slugs[0].slice(1) : slugs[0],
10288
+ packageSlug: slugs[1]
10289
+ };
10290
+ }
10291
+ throw new Error(`Invalid package syntax: ${slugs}`);
10292
+ }
10293
+ function displayableParsedPackageSlug(parsedPackageSlug) {
10294
+ if (isFullParsedPackageSlug(parsedPackageSlug)) {
10295
+ return `@${parsedPackageSlug.spaceSlug}/${parsedPackageSlug.packageSlug}`;
10296
+ }
10297
+ return parsedPackageSlug.packageSlug;
10298
+ }
10299
+
10210
10300
  // apps/cli/src/application/useCases/InstallUseCase.ts
10301
+ var import_assert = __toESM(require("assert"));
10211
10302
  var InstallUseCase = class {
10212
10303
  constructor(packmindGateway, lockFileRepository, configFileRepository, spaceService) {
10213
10304
  this.packmindGateway = packmindGateway;
@@ -10215,8 +10306,8 @@ var InstallUseCase = class {
10215
10306
  this.configFileRepository = configFileRepository;
10216
10307
  this.spaceService = spaceService;
10217
10308
  }
10218
- async execute(command32) {
10219
- const baseDirectory = command32.baseDirectory || process.cwd();
10309
+ async execute(command34) {
10310
+ const baseDirectory = command34.baseDirectory || process.cwd();
10220
10311
  const result = {
10221
10312
  filesCreated: 0,
10222
10313
  filesUpdated: 0,
@@ -10246,7 +10337,7 @@ var InstallUseCase = class {
10246
10337
  },
10247
10338
  resolvedAgents: []
10248
10339
  };
10249
- const hasExplicitPackages = command32.packages && command32.packages.length > 0;
10340
+ const hasExplicitPackages = command34.packages && command34.packages.length > 0;
10250
10341
  const configExistedBefore = await this.configFileRepository.configExists(baseDirectory);
10251
10342
  const lockFile = await this.lockFileRepository.read(baseDirectory);
10252
10343
  const config = await this.configFileRepository.readConfig(baseDirectory);
@@ -10267,19 +10358,23 @@ var InstallUseCase = class {
10267
10358
  packageSlugs: [],
10268
10359
  agents: [],
10269
10360
  artifacts: {},
10270
- ...command32.skipInstalledAt ? {} : { installedAt: (/* @__PURE__ */ new Date()).toISOString() }
10361
+ ...command34.skipInstalledAt ? {} : { installedAt: (/* @__PURE__ */ new Date()).toISOString() }
10271
10362
  };
10272
- effectiveLockFile.cliVersion = command32.cliVersion;
10363
+ effectiveLockFile.cliVersion = command34.cliVersion;
10273
10364
  let packagesSlugs;
10274
10365
  let normalizedPackages = [];
10275
10366
  if (hasExplicitPackages) {
10276
- normalizedPackages = await this.normalizePackageSlugs(command32.packages);
10367
+ const explicitPackageSlugs = (command34.packages ?? []).map(
10368
+ displayableParsedPackageSlug
10369
+ );
10370
+ normalizedPackages = await this.normalizePackageSlugs(explicitPackageSlugs);
10277
10371
  await this.validatePackageAccess(normalizedPackages);
10278
10372
  const normalizedConfigPackages = config ? await this.normalizeAndSaveConfigPackages(baseDirectory, config) : [];
10279
10373
  packagesSlugs = [
10280
10374
  .../* @__PURE__ */ new Set([...normalizedConfigPackages, ...normalizedPackages])
10281
10375
  ];
10282
10376
  } else {
10377
+ (0, import_assert.default)(config);
10283
10378
  packagesSlugs = await this.normalizeAndSaveConfigPackages(
10284
10379
  baseDirectory,
10285
10380
  config
@@ -10299,8 +10394,8 @@ var InstallUseCase = class {
10299
10394
  }
10300
10395
  return result;
10301
10396
  }
10302
- const installAgents = this.resolveInstallAgents(command32, config);
10303
- const stripPathPrefix = command32.homeAgent ? getAgentHomeDirPrefix(command32.homeAgent) ?? void 0 : void 0;
10397
+ const installAgents = this.resolveInstallAgents(command34, config);
10398
+ const stripPathPrefix = command34.homeAgent ? getAgentHomeDirPrefix(command34.homeAgent) ?? void 0 : void 0;
10304
10399
  const response = await this.packmindGateway.deployment.install({
10305
10400
  packagesSlugs,
10306
10401
  packmindLockFile: effectiveLockFile,
@@ -10440,10 +10535,10 @@ var InstallUseCase = class {
10440
10535
  } catch {
10441
10536
  }
10442
10537
  }
10443
- if (command32.skipInstalledAt) {
10538
+ if (command34.skipInstalledAt) {
10444
10539
  delete lockFileToPersist.installedAt;
10445
10540
  }
10446
- lockFileToPersist.cliVersion = command32.cliVersion;
10541
+ lockFileToPersist.cliVersion = command34.cliVersion;
10447
10542
  if (stripPathPrefix) {
10448
10543
  lockFileToPersist = this.stripLockFileArtifactPaths(
10449
10544
  lockFileToPersist,
@@ -10472,9 +10567,9 @@ var InstallUseCase = class {
10472
10567
  async normalizePackageSlugs(slugs) {
10473
10568
  return normalizePackageSlugs(slugs, this.spaceService);
10474
10569
  }
10475
- resolveInstallAgents(command32, config) {
10476
- if (command32.homeAgent) {
10477
- return [command32.homeAgent];
10570
+ resolveInstallAgents(command34, config) {
10571
+ if (command34.homeAgent) {
10572
+ return [command34.homeAgent];
10478
10573
  }
10479
10574
  return config?.agents;
10480
10575
  }
@@ -10788,8 +10883,8 @@ var UninstallUseCase = class {
10788
10883
  this.spaceService = spaceService;
10789
10884
  this.installUseCase = installUseCase;
10790
10885
  }
10791
- async execute(command32) {
10792
- const baseDirectory = command32.baseDirectory || process.cwd();
10886
+ async execute(command34) {
10887
+ const baseDirectory = command34.baseDirectory || process.cwd();
10793
10888
  const config = await this.configFileRepository.readConfig(baseDirectory);
10794
10889
  if (!config) {
10795
10890
  const configFileExists = await this.configFileRepository.configExists(baseDirectory);
@@ -10803,7 +10898,7 @@ var UninstallUseCase = class {
10803
10898
  );
10804
10899
  }
10805
10900
  const normalized = await normalizePackageSlugs(
10806
- command32.packages,
10901
+ command34.packages,
10807
10902
  this.spaceService
10808
10903
  );
10809
10904
  const notInstalled = normalized.filter((pkg) => !(pkg in config.packages));
@@ -10826,7 +10921,7 @@ ${pkgList}`
10826
10921
  try {
10827
10922
  return await this.installUseCase.execute({
10828
10923
  baseDirectory,
10829
- cliVersion: command32.cliVersion
10924
+ cliVersion: command34.cliVersion
10830
10925
  });
10831
10926
  } catch (error) {
10832
10927
  await this.configFileRepository.updateConfig(
@@ -10868,8 +10963,8 @@ var InstallDefaultSkillsUseCase = class {
10868
10963
  constructor(repositories) {
10869
10964
  this.repositories = repositories;
10870
10965
  }
10871
- async execute(command32) {
10872
- const baseDirectory = command32.baseDirectory || process.cwd();
10966
+ async execute(command34) {
10967
+ const baseDirectory = command34.baseDirectory || process.cwd();
10873
10968
  await this.bootstrapEmptyDirectory(baseDirectory);
10874
10969
  const result = {
10875
10970
  filesCreated: 0,
@@ -10879,21 +10974,24 @@ var InstallDefaultSkillsUseCase = class {
10879
10974
  skippedIncompatibleSkillNames: [],
10880
10975
  incompatibleInstalledSkills: []
10881
10976
  };
10882
- const config = await this.repositories.configFileRepository.readConfig(baseDirectory);
10883
- const agents = config?.agents;
10977
+ let agents = command34.agents;
10978
+ if (!agents || agents.length === 0) {
10979
+ const config = await this.repositories.configFileRepository.readConfig(baseDirectory);
10980
+ agents = config?.agents;
10981
+ }
10884
10982
  const response = await this.repositories.packmindGateway.skills.getDefaults(
10885
10983
  {
10886
- cliVersion: command32.cliVersion,
10887
- includeBeta: command32.includeBeta,
10984
+ cliVersion: command34.cliVersion,
10985
+ includeBeta: command34.includeBeta,
10888
10986
  agents
10889
10987
  }
10890
10988
  );
10891
10989
  result.skippedSkillsCount = response.skippedSkillsCount;
10892
10990
  const incompatibleInstalledMap = /* @__PURE__ */ new Map();
10893
10991
  const incompatibleSkillDirs = /* @__PURE__ */ new Map();
10894
- if (command32.cliVersion) {
10992
+ if (command34.cliVersion) {
10895
10993
  for (const file of response.fileUpdates.createOrUpdate) {
10896
- if (path9.basename(file.path) === "SKILL.md" && file.content && this.isVersionConstraintViolated(file.content, command32.cliVersion)) {
10994
+ if (path9.basename(file.path) === "SKILL.md" && file.content && this.isVersionConstraintViolated(file.content, command34.cliVersion)) {
10897
10995
  const dir = path9.dirname(file.path);
10898
10996
  const skillName = this.getSkillName(file.content) ?? path9.basename(dir);
10899
10997
  incompatibleSkillDirs.set(dir, skillName);
@@ -10904,9 +11002,9 @@ var InstallDefaultSkillsUseCase = class {
10904
11002
  for (const file of response.fileUpdates.createOrUpdate) {
10905
11003
  try {
10906
11004
  if (!file.content) continue;
10907
- const isIncompatible = command32.cliVersion && (this.isVersionConstraintViolated(
11005
+ const isIncompatible = command34.cliVersion && (this.isVersionConstraintViolated(
10908
11006
  file.content,
10909
- command32.cliVersion
11007
+ command34.cliVersion
10910
11008
  ) || this.isUnderIncompatibleSkillDir(
10911
11009
  file.path,
10912
11010
  incompatibleSkillDirs
@@ -10949,7 +11047,7 @@ var InstallDefaultSkillsUseCase = class {
10949
11047
  await this.mergeLockFileSlice(
10950
11048
  baseDirectory,
10951
11049
  response.lockFileSlice ?? {},
10952
- command32.cliVersion
11050
+ command34.cliVersion
10953
11051
  );
10954
11052
  return result;
10955
11053
  }
@@ -11103,8 +11201,8 @@ var EnsureCliVersionUseCase = class {
11103
11201
  this.lockFileRepository = lockFileRepository;
11104
11202
  this.installDefaultSkillsUseCase = installDefaultSkillsUseCase;
11105
11203
  }
11106
- async execute(command32) {
11107
- const { baseDirectory, currentCliVersion, includeBeta } = command32;
11204
+ async execute(command34) {
11205
+ const { baseDirectory, currentCliVersion, includeBeta } = command34;
11108
11206
  const lockFile = await this.lockFileRepository.read(baseDirectory);
11109
11207
  if (!lockFile) {
11110
11208
  return { kind: "no-lockfile" };
@@ -11140,10 +11238,10 @@ var ListPackagesUseCase = class {
11140
11238
  this.packmindGateway = packmindGateway;
11141
11239
  this.spaceService = spaceService;
11142
11240
  }
11143
- async execute(command32) {
11144
- if (command32.spaceId) {
11241
+ async execute(command34) {
11242
+ if (command34.spaceId) {
11145
11243
  const response = await this.packmindGateway.packages.list({
11146
- spaceId: command32.spaceId
11244
+ spaceId: command34.spaceId
11147
11245
  });
11148
11246
  return response.packages;
11149
11247
  }
@@ -11162,8 +11260,8 @@ var GetPackageSummaryUseCase = class {
11162
11260
  constructor(gateway) {
11163
11261
  this.gateway = gateway;
11164
11262
  }
11165
- async execute(command32) {
11166
- return this.gateway.packages.getSummary(command32);
11263
+ async execute(command34) {
11264
+ return this.gateway.packages.getSummary(command34);
11167
11265
  }
11168
11266
  };
11169
11267
 
@@ -11458,8 +11556,8 @@ var LoginUseCase = class {
11458
11556
  startCallbackServer: deps?.startCallbackServer ?? defaultStartCallbackServer
11459
11557
  };
11460
11558
  }
11461
- async execute(command32) {
11462
- const { host, code: providedCode } = command32;
11559
+ async execute(command34) {
11560
+ const { host, code: providedCode } = command34;
11463
11561
  let code;
11464
11562
  if (providedCode) {
11465
11563
  code = providedCode;
@@ -11841,10 +11939,10 @@ var CheckCliVersionUseCase = class {
11841
11939
  now: deps?.now ?? (() => /* @__PURE__ */ new Date())
11842
11940
  };
11843
11941
  }
11844
- async execute(command32) {
11845
- const cached = this.readFreshCache(command32.currentVersion);
11942
+ async execute(command34) {
11943
+ const cached = this.readFreshCache(command34.currentVersion);
11846
11944
  if (cached) {
11847
- return this.toResult(command32.currentVersion, cached.latestVersion);
11945
+ return this.toResult(command34.currentVersion, cached.latestVersion);
11848
11946
  }
11849
11947
  const fetchPromise = this.deps.fetchLatestVersion(this.deps.fetchFn);
11850
11948
  fetchPromise.catch(() => void 0);
@@ -11862,7 +11960,7 @@ var CheckCliVersionUseCase = class {
11862
11960
  latestVersion,
11863
11961
  checkedAt: this.deps.now()
11864
11962
  });
11865
- return this.toResult(command32.currentVersion, latestVersion);
11963
+ return this.toResult(command34.currentVersion, latestVersion);
11866
11964
  } catch {
11867
11965
  return null;
11868
11966
  }
@@ -12310,10 +12408,10 @@ var ListStandardsUseCase = class {
12310
12408
  this.packmindGateway = packmindGateway;
12311
12409
  this.spaceService = spaceService;
12312
12410
  }
12313
- async execute(command32) {
12314
- if (command32.spaceId) {
12411
+ async execute(command34) {
12412
+ if (command34.spaceId) {
12315
12413
  const response = await this.packmindGateway.standards.list({
12316
- spaceId: command32.spaceId
12414
+ spaceId: command34.spaceId
12317
12415
  });
12318
12416
  return response.standards;
12319
12417
  }
@@ -12333,10 +12431,10 @@ var ListCommandsUseCase = class {
12333
12431
  this.packmindGateway = packmindGateway;
12334
12432
  this.spaceService = spaceService;
12335
12433
  }
12336
- async execute(command32) {
12337
- if (command32.spaceId) {
12434
+ async execute(command34) {
12435
+ if (command34.spaceId) {
12338
12436
  const response = await this.packmindGateway.commands.list({
12339
- spaceId: command32.spaceId
12437
+ spaceId: command34.spaceId
12340
12438
  });
12341
12439
  return response.recipes;
12342
12440
  }
@@ -12356,12 +12454,13 @@ var ListSkillsUseCase = class {
12356
12454
  this.packmindGateway = packmindGateway;
12357
12455
  this.spaceService = spaceService;
12358
12456
  }
12359
- async execute(command32) {
12360
- if (command32.spaceId) {
12457
+ async execute(command34) {
12458
+ if (command34.spaceId) {
12361
12459
  const skills = await this.packmindGateway.skills.list({
12362
- spaceId: command32.spaceId
12460
+ spaceId: command34.spaceId
12363
12461
  });
12364
12462
  return skills.map((s) => ({
12463
+ id: s.id,
12365
12464
  slug: s.slug,
12366
12465
  name: s.name,
12367
12466
  description: s.description,
@@ -12373,6 +12472,7 @@ var ListSkillsUseCase = class {
12373
12472
  spaces.map(
12374
12473
  (space) => this.packmindGateway.skills.list({ spaceId: createSpaceId(space.id) }).then(
12375
12474
  (skills) => skills.map((s) => ({
12475
+ id: s.id,
12376
12476
  slug: s.slug,
12377
12477
  name: s.name,
12378
12478
  description: s.description,
@@ -12534,8 +12634,8 @@ var UploadSkillUseCase = class {
12534
12634
  constructor(deps) {
12535
12635
  this.deps = deps;
12536
12636
  }
12537
- async execute(command32) {
12538
- const files = await readSkillDirectory(command32.skillPath);
12637
+ async execute(command34) {
12638
+ const files = await readSkillDirectory(command34.skillPath);
12539
12639
  if (!files.find((f) => f.relativePath === "SKILL.md")) {
12540
12640
  throw new Error("SKILL.md not found in skill directory");
12541
12641
  }
@@ -12549,7 +12649,7 @@ var UploadSkillUseCase = class {
12549
12649
  if (totalSize > 10 * 1024 * 1024) {
12550
12650
  throw new Error(`Skill size (${totalSize} bytes) exceeds 10MB limit`);
12551
12651
  }
12552
- const space = await this.getSpace(command32.spaceSlug);
12652
+ const space = await this.getSpace(command34.spaceSlug);
12553
12653
  const payload = {
12554
12654
  files: files.map((f) => ({
12555
12655
  path: f.relativePath,
@@ -12561,7 +12661,7 @@ var UploadSkillUseCase = class {
12561
12661
  const uploadSkillResponse = await this.deps.gateway.skills.upload({
12562
12662
  spaceId: createSpaceId(space.id),
12563
12663
  files: payload.files,
12564
- originSkill: command32.originSkill
12664
+ originSkill: command34.originSkill
12565
12665
  });
12566
12666
  return {
12567
12667
  skillId: uploadSkillResponse.skill.id,
@@ -12598,6 +12698,55 @@ ${spaceList}`
12598
12698
  }
12599
12699
  };
12600
12700
 
12701
+ // apps/cli/src/infra/utils/deployedFilesUtils.ts
12702
+ function lockFileToArtifactVersionEntries(lockFile) {
12703
+ return Object.values(lockFile.artifacts).map((entry) => ({
12704
+ name: entry.name,
12705
+ type: entry.type,
12706
+ id: entry.id,
12707
+ version: entry.version,
12708
+ spaceId: entry.spaceId
12709
+ }));
12710
+ }
12711
+ function resolveDeployedRenderAgents(lockFile) {
12712
+ const agents = new Set(lockFile.agents ?? []);
12713
+ for (const entry of Object.values(lockFile.artifacts)) {
12714
+ for (const file of entry.files) {
12715
+ agents.add(file.agent);
12716
+ }
12717
+ }
12718
+ return [...agents];
12719
+ }
12720
+ async function fetchDeployedFiles(gateway, lockFile, options = {}) {
12721
+ try {
12722
+ const artifacts = lockFileToArtifactVersionEntries(lockFile);
12723
+ const response = await gateway.deployment.getContentByVersions({
12724
+ artifacts,
12725
+ agents: resolveDeployedRenderAgents(lockFile)
12726
+ });
12727
+ return remapDeployedFilesForHomeInstall(
12728
+ response.fileUpdates.createOrUpdate,
12729
+ options.projectDir
12730
+ );
12731
+ } catch {
12732
+ return [];
12733
+ }
12734
+ }
12735
+ function remapDeployedFilesForHomeInstall(files, projectDir) {
12736
+ if (!projectDir) return files;
12737
+ const homeAgent = isAgentHomeDirectory(projectDir);
12738
+ if (!homeAgent) return files;
12739
+ const prefix = getAgentHomeDirPrefix(homeAgent);
12740
+ if (!prefix) return files;
12741
+ return files.filter((file) => !file.path.startsWith(".packmind/")).map((file) => {
12742
+ const remapped = file.path.startsWith(prefix) ? { ...file, path: file.path.slice(prefix.length) } : { ...file };
12743
+ if (remapped.content !== void 0) {
12744
+ remapped.content = stripFullStandardLinkFooter(remapped.content);
12745
+ }
12746
+ return remapped;
12747
+ });
12748
+ }
12749
+
12601
12750
  // apps/cli/src/application/useCases/diffStrategies/CommandDiffStrategy.ts
12602
12751
  var import_diff2 = require("diff");
12603
12752
  var fs15 = __toESM(require("fs/promises"));
@@ -13088,6 +13237,8 @@ function parseStandardMd(content, filePath) {
13088
13237
  var AGENT_PARSERS = {
13089
13238
  packmind: parsePackmindStandard,
13090
13239
  claude: parseClaudeStandard,
13240
+ claude_plugin: () => null,
13241
+ // plugin mode does not render standards (Rule 3)
13091
13242
  cursor: parseCursorStandard,
13092
13243
  continue: parseContinueStandard,
13093
13244
  copilot: parseCopilotStandard,
@@ -13500,9 +13651,9 @@ var DiffArtefactsUseCase = class {
13500
13651
  new StandardDiffStrategy()
13501
13652
  ];
13502
13653
  }
13503
- async execute(command32) {
13504
- const baseDirectory = command32.baseDirectory || process.cwd();
13505
- const response = await this.fetchContent(command32, baseDirectory);
13654
+ async execute(command34) {
13655
+ const baseDirectory = command34.baseDirectory || process.cwd();
13656
+ const response = await this.fetchContent(command34, baseDirectory);
13506
13657
  const filteredFiles = response.fileUpdates.createOrUpdate.filter(
13507
13658
  (file) => file.path !== "packmind.json"
13508
13659
  );
@@ -13515,7 +13666,7 @@ var DiffArtefactsUseCase = class {
13515
13666
  );
13516
13667
  const prefixedSkillFolders = this.prefixSkillFolders(
13517
13668
  response.skillFolders,
13518
- command32.relativePath
13669
+ command34.relativePath
13519
13670
  );
13520
13671
  const diffs = [];
13521
13672
  for (const file of diffableFiles) {
@@ -13542,13 +13693,13 @@ var DiffArtefactsUseCase = class {
13542
13693
  targetId: response.targetId ? createTargetId(response.targetId) : void 0
13543
13694
  }));
13544
13695
  }
13545
- async fetchContent(command32, baseDirectory) {
13696
+ async fetchContent(command34, baseDirectory) {
13546
13697
  const lockFile = await this.lockFileRepository.read(baseDirectory);
13547
13698
  if (lockFile) {
13548
13699
  try {
13549
13700
  const response = await this.packmindGateway.deployment.getContentByVersions({
13550
13701
  artifacts: Object.values(lockFile.artifacts),
13551
- agents: lockFile.agents
13702
+ agents: resolveDeployedRenderAgents(lockFile)
13552
13703
  });
13553
13704
  return {
13554
13705
  ...response,
@@ -13562,11 +13713,11 @@ var DiffArtefactsUseCase = class {
13562
13713
  }
13563
13714
  }
13564
13715
  return this.packmindGateway.deployment.getDeployed({
13565
- packagesSlugs: command32.packagesSlugs,
13566
- gitRemoteUrl: command32.gitRemoteUrl,
13567
- gitBranch: command32.gitBranch,
13568
- relativePath: command32.relativePath,
13569
- agents: command32.agents
13716
+ packagesSlugs: command34.packagesSlugs,
13717
+ gitRemoteUrl: command34.gitRemoteUrl,
13718
+ gitBranch: command34.gitBranch,
13719
+ relativePath: command34.relativePath,
13720
+ agents: command34.agents
13570
13721
  });
13571
13722
  }
13572
13723
  prefixSkillFolders(skillFolders, relativePath) {
@@ -13590,8 +13741,8 @@ var SubmitDiffsUseCase = class {
13590
13741
  constructor(packmindGateway) {
13591
13742
  this.packmindGateway = packmindGateway;
13592
13743
  }
13593
- async execute(command32) {
13594
- const { groupedDiffs, message } = command32;
13744
+ async execute(command34) {
13745
+ const { groupedDiffs, message } = command34;
13595
13746
  const skipped = [];
13596
13747
  const validDiffs = [];
13597
13748
  for (const group of groupedDiffs) {
@@ -13666,8 +13817,8 @@ var CheckDiffsUseCase = class {
13666
13817
  constructor(packmindGateway) {
13667
13818
  this.packmindGateway = packmindGateway;
13668
13819
  }
13669
- async execute(command32) {
13670
- const { groupedDiffs } = command32;
13820
+ async execute(command34) {
13821
+ const { groupedDiffs } = command34;
13671
13822
  const results = [];
13672
13823
  const validDiffs = [];
13673
13824
  const invalidDiffs = [];
@@ -13765,8 +13916,8 @@ var CliFormatter = class {
13765
13916
  static error(message) {
13766
13917
  return `${source_default.bgRed.bold(CLI_PREFIX2)} ${source_default.red(message)}`;
13767
13918
  }
13768
- static command(command32) {
13769
- return source_default.yellow(command32);
13919
+ static command(command34) {
13920
+ return source_default.yellow(command34);
13770
13921
  }
13771
13922
  static loader(text) {
13772
13923
  return source_default.dim.italic(text);
@@ -13979,14 +14130,24 @@ var PackmindCliHexaFactory = class {
13979
14130
  var origin8 = "PackmindCliHexa";
13980
14131
  var PackmindCliHexa = class {
13981
14132
  constructor(logger2 = new PackmindLogger(origin8)) {
13982
- this.notifyDistribution = async (command32) => {
14133
+ this.notifyDistribution = async (command34) => {
13983
14134
  return this.hexa.repositories.packmindGateway.deployment.notifyDistribution(
13984
- command32
14135
+ command34
13985
14136
  );
13986
14137
  };
13987
- this.notifyArtefactsDistribution = async (command32) => {
14138
+ this.notifyArtefactsDistribution = async (command34) => {
13988
14139
  return this.hexa.repositories.packmindGateway.deployment.notifyArtefactsDistribution(
13989
- command32
14140
+ command34
14141
+ );
14142
+ };
14143
+ this.renderPlugin = async (command34) => {
14144
+ return this.hexa.repositories.packmindGateway.deployment.renderPlugin(
14145
+ command34
14146
+ );
14147
+ };
14148
+ this.trackPluginDeleted = async (command34) => {
14149
+ return this.hexa.repositories.packmindGateway.deployment.trackPluginDeleted(
14150
+ command34
13990
14151
  );
13991
14152
  };
13992
14153
  this.logger = logger2;
@@ -14009,29 +14170,29 @@ var PackmindCliHexa = class {
14009
14170
  get output() {
14010
14171
  return this.hexa.repositories.output;
14011
14172
  }
14012
- async getGitRemoteUrl(command32) {
14013
- return this.hexa.useCases.getGitRemoteUrl.execute(command32);
14173
+ async getGitRemoteUrl(command34) {
14174
+ return this.hexa.useCases.getGitRemoteUrl.execute(command34);
14014
14175
  }
14015
- async listFilesInDirectory(command32) {
14016
- return this.hexa.useCases.listFilesInDirectoryUseCase.execute(command32);
14176
+ async listFilesInDirectory(command34) {
14177
+ return this.hexa.useCases.listFilesInDirectoryUseCase.execute(command34);
14017
14178
  }
14018
- async lintFilesAgainstRule(command32) {
14019
- return this.hexa.useCases.lintFilesAgainstRule.execute(command32);
14179
+ async lintFilesAgainstRule(command34) {
14180
+ return this.hexa.useCases.lintFilesAgainstRule.execute(command34);
14020
14181
  }
14021
- async lintFilesFromConfig(command32) {
14022
- return this.hexa.useCases.lintFilesFromConfig.execute(command32);
14182
+ async lintFilesFromConfig(command34) {
14183
+ return this.hexa.useCases.lintFilesFromConfig.execute(command34);
14023
14184
  }
14024
- async installPackages(command32) {
14025
- return this.hexa.useCases.installPackages.execute(command32);
14185
+ async installPackages(command34) {
14186
+ return this.hexa.useCases.installPackages.execute(command34);
14026
14187
  }
14027
- async install(command32) {
14028
- return this.hexa.useCases.install.execute(command32);
14188
+ async install(command34) {
14189
+ return this.hexa.useCases.install.execute(command34);
14029
14190
  }
14030
- async uninstall(command32) {
14031
- return this.hexa.useCases.uninstall.execute(command32);
14191
+ async uninstall(command34) {
14192
+ return this.hexa.useCases.uninstall.execute(command34);
14032
14193
  }
14033
- async diffArtefacts(command32) {
14034
- return this.hexa.useCases.diffArtefacts.execute(command32);
14194
+ async diffArtefacts(command34) {
14195
+ return this.hexa.useCases.diffArtefacts.execute(command34);
14035
14196
  }
14036
14197
  async submitDiffs(groupedDiffs, message) {
14037
14198
  return this.hexa.useCases.submitDiffs.execute({ groupedDiffs, message });
@@ -14039,20 +14200,20 @@ var PackmindCliHexa = class {
14039
14200
  async checkDiffs(groupedDiffs) {
14040
14201
  return this.hexa.useCases.checkDiffs.execute({ groupedDiffs });
14041
14202
  }
14042
- async listPackages(command32) {
14043
- return this.hexa.useCases.listPackages.execute(command32);
14203
+ async listPackages(command34) {
14204
+ return this.hexa.useCases.listPackages.execute(command34);
14044
14205
  }
14045
- async getPackageBySlug(command32) {
14046
- return this.hexa.useCases.getPackageBySlug.execute(command32);
14206
+ async getPackageBySlug(command34) {
14207
+ return this.hexa.useCases.getPackageBySlug.execute(command34);
14047
14208
  }
14048
- async listStandards(command32) {
14049
- return this.hexa.useCases.listStandards.execute(command32);
14209
+ async listStandards(command34) {
14210
+ return this.hexa.useCases.listStandards.execute(command34);
14050
14211
  }
14051
- async listCommands(command32) {
14052
- return this.hexa.useCases.listCommands.execute(command32);
14212
+ async listCommands(command34) {
14213
+ return this.hexa.useCases.listCommands.execute(command34);
14053
14214
  }
14054
- async listSkills(command32) {
14055
- return this.hexa.useCases.listSkills.execute(command32);
14215
+ async listSkills(command34) {
14216
+ return this.hexa.useCases.listSkills.execute(command34);
14056
14217
  }
14057
14218
  async configExists(baseDirectory) {
14058
14219
  return await this.hexa.repositories.configFileRepository.configExists(
@@ -14139,17 +14300,17 @@ var PackmindCliHexa = class {
14139
14300
  directory
14140
14301
  );
14141
14302
  }
14142
- async login(command32) {
14143
- return this.hexa.useCases.login.execute(command32);
14303
+ async login(command34) {
14304
+ return this.hexa.useCases.login.execute(command34);
14144
14305
  }
14145
- async logout(command32) {
14146
- return this.hexa.useCases.logout.execute(command32);
14306
+ async logout(command34) {
14307
+ return this.hexa.useCases.logout.execute(command34);
14147
14308
  }
14148
- async whoami(command32) {
14149
- return this.hexa.useCases.whoami.execute(command32);
14309
+ async whoami(command34) {
14310
+ return this.hexa.useCases.whoami.execute(command34);
14150
14311
  }
14151
- async checkCliVersion(command32) {
14152
- return this.hexa.useCases.checkCliVersion.execute(command32);
14312
+ async checkCliVersion(command34) {
14313
+ return this.hexa.useCases.checkCliVersion.execute(command34);
14153
14314
  }
14154
14315
  getCurrentBranch(repoPath) {
14155
14316
  return this.hexa.services.gitRemoteUrlService.getCurrentBranch(repoPath).branch;
@@ -14157,19 +14318,19 @@ var PackmindCliHexa = class {
14157
14318
  getGitRemoteUrlFromPath(repoPath) {
14158
14319
  return this.hexa.services.gitRemoteUrlService.getGitRemoteUrl(repoPath).gitRemoteUrl;
14159
14320
  }
14160
- async uploadSkill(command32) {
14161
- return this.hexa.useCases.uploadSkill.execute(command32);
14321
+ async uploadSkill(command34) {
14322
+ return this.hexa.useCases.uploadSkill.execute(command34);
14162
14323
  }
14163
- async installDefaultSkills(command32) {
14164
- return this.hexa.useCases.installDefaultSkills.execute(command32);
14324
+ async installDefaultSkills(command34) {
14325
+ return this.hexa.useCases.installDefaultSkills.execute(command34);
14165
14326
  }
14166
- async bootstrapSkillsInitDirectory(command32) {
14327
+ async bootstrapSkillsInitDirectory(command34) {
14167
14328
  return this.hexa.useCases.installDefaultSkills.bootstrapEmptyDirectory(
14168
- command32.baseDirectory
14329
+ command34.baseDirectory
14169
14330
  );
14170
14331
  }
14171
- async ensureCliVersion(command32) {
14172
- return this.hexa.useCases.ensureCliVersion.execute(command32);
14332
+ async ensureCliVersion(command34) {
14333
+ return this.hexa.useCases.ensureCliVersion.execute(command34);
14173
14334
  }
14174
14335
  getPackmindGateway() {
14175
14336
  return this.hexa.repositories.packmindGateway;
@@ -15008,6 +15169,7 @@ var SELECTABLE_AGENTS = [
15008
15169
  var AGENT_DISPLAY_NAMES = {
15009
15170
  packmind: "Packmind",
15010
15171
  claude: "Claude Code",
15172
+ claude_plugin: "Claude Plugin",
15011
15173
  cursor: "Cursor",
15012
15174
  copilot: "GitHub Copilot",
15013
15175
  continue: "Continue.dev",
@@ -15499,6 +15661,11 @@ async function confirmWithReadline(question) {
15499
15661
  });
15500
15662
  }
15501
15663
 
15664
+ // apps/cli/src/infra/commands/customParameters/PackageSlugArgType.ts
15665
+ var PackageSlugArgType = {
15666
+ from: async (input) => parsePackageSlug(input)
15667
+ };
15668
+
15502
15669
  // apps/cli/src/infra/commands/InstallCommand.ts
15503
15670
  var { version: CLI_VERSION } = require_package();
15504
15671
  function findSubDirectoriesWithPackmindJson(dirPath, recursive) {
@@ -15618,21 +15785,25 @@ async function notifyArtefactsDistributionIfInGitRepo(params) {
15618
15785
  }
15619
15786
  }
15620
15787
  async function installDefaultSkillsIfAtGitRoot(params) {
15621
- const { packmindCliHexa, cwd, configRepository } = params;
15788
+ const { packmindCliHexa, cwd, configRepository, resolvedAgents } = params;
15622
15789
  const gitRoot = await packmindCliHexa.tryGetGitRepositoryRoot(cwd);
15623
15790
  if (!gitRoot || cwd !== gitRoot) {
15624
15791
  return;
15625
15792
  }
15626
- const config = await configRepository.readConfig(cwd);
15627
- const configuredAgents = config?.agents ?? [];
15628
- if (!configuredAgentsSupportSkills(configuredAgents)) {
15629
- logWarningConsole(buildSkillsSkippedWarning(configuredAgents));
15793
+ let agents = resolvedAgents;
15794
+ if (agents.length === 0) {
15795
+ const config = await configRepository.readConfig(cwd);
15796
+ agents = config?.agents ?? [];
15797
+ }
15798
+ if (!configuredAgentsSupportSkills(agents)) {
15799
+ logWarningConsole(buildSkillsSkippedWarning(agents));
15630
15800
  return;
15631
15801
  }
15632
15802
  try {
15633
15803
  const skillsResult = await packmindCliHexa.installDefaultSkills({
15634
15804
  cliVersion: CLI_VERSION,
15635
- baseDirectory: cwd
15805
+ baseDirectory: cwd,
15806
+ agents
15636
15807
  });
15637
15808
  if (skillsResult.incompatibleInstalledSkills.length > 0) {
15638
15809
  await handleIncompatibleInstalledSkillsSilently(
@@ -15681,7 +15852,7 @@ async function installHandler({
15681
15852
  process.exit(1);
15682
15853
  }
15683
15854
  if (show) {
15684
- const showCommand = `packmind-cli packages show ${show}`;
15855
+ const showCommand = `packmind-cli packages show ${displayableParsedPackageSlug(show)}`;
15685
15856
  logErrorConsole('Command "packmind-cli install --show" has been removed.');
15686
15857
  logConsole(`Use ${formatCommand(showCommand)} instead.`);
15687
15858
  process.exit(1);
@@ -15715,7 +15886,7 @@ async function installHandler({
15715
15886
  agentDetectionService: new AgentArtifactDetectionService(),
15716
15887
  packmindGateway: packmindCliHexa.getPackmindGateway(),
15717
15888
  baseDirectory: cwd,
15718
- packages,
15889
+ packages: packages.map(displayableParsedPackageSlug),
15719
15890
  isTTY: process.stdin.isTTY ?? false,
15720
15891
  installDefaultSkills: packmindCliHexa.installDefaultSkills.bind(packmindCliHexa),
15721
15892
  cliVersion: CLI_VERSION,
@@ -15802,7 +15973,8 @@ async function installHandler({
15802
15973
  await installDefaultSkillsIfAtGitRoot({
15803
15974
  packmindCliHexa,
15804
15975
  cwd,
15805
- configRepository
15976
+ configRepository,
15977
+ resolvedAgents: combined.resolvedAgents
15806
15978
  });
15807
15979
  }
15808
15980
  }
@@ -15828,7 +16000,7 @@ var installCommand = (0, import_cmd_ts2.command)({
15828
16000
  description: "Run install in the specified directory instead of the current directory"
15829
16001
  }),
15830
16002
  packages: (0, import_cmd_ts2.restPositionals)({
15831
- type: import_cmd_ts2.string,
16003
+ type: PackageSlugArgType,
15832
16004
  displayName: "packages",
15833
16005
  description: "Package slugs to install (e.g. @my-space/my-package)"
15834
16006
  }),
@@ -15841,10 +16013,9 @@ var installCommand = (0, import_cmd_ts2.command)({
15841
16013
  description: "[Deprecated] List available packages"
15842
16014
  }),
15843
16015
  show: (0, import_cmd_ts2.option)({
15844
- type: import_cmd_ts2.string,
16016
+ type: (0, import_cmd_ts2.optional)(PackageSlugArgType),
15845
16017
  long: "show",
15846
- description: "[Deprecated] Show details of a specific package",
15847
- defaultValue: () => ""
16018
+ description: "[Deprecated] Show details of a specific package"
15848
16019
  }),
15849
16020
  skipInstalledAt: (0, import_cmd_ts2.flag)({
15850
16021
  long: "skip-installed-at",
@@ -17196,15 +17367,15 @@ var CreatePackageUseCase = class {
17196
17367
  this.gateway = gateway;
17197
17368
  this.spaceService = spaceService;
17198
17369
  }
17199
- async execute(command32) {
17200
- const space = await this.getSpace(command32);
17370
+ async execute(command34) {
17371
+ const space = await this.getSpace(command34);
17201
17372
  const result = await this.gateway.packages.create({
17202
17373
  spaceId: space.id,
17203
- name: command32.name,
17204
- description: command32.description ?? "",
17374
+ name: command34.name,
17375
+ description: command34.description ?? "",
17205
17376
  recipeIds: [],
17206
17377
  standardIds: [],
17207
- originSkill: command32.originSkill
17378
+ originSkill: command34.originSkill
17208
17379
  });
17209
17380
  return {
17210
17381
  packageId: result.package.id,
@@ -17213,12 +17384,12 @@ var CreatePackageUseCase = class {
17213
17384
  spaceSlug: space.slug
17214
17385
  };
17215
17386
  }
17216
- async getSpace(command32) {
17387
+ async getSpace(command34) {
17217
17388
  const spaces = await this.spaceService.getSpaces();
17218
- if (command32.spaceSlug) {
17219
- const found = spaces.find((s) => s.slug === command32.spaceSlug);
17389
+ if (command34.spaceSlug) {
17390
+ const found = spaces.find((s) => s.slug === command34.spaceSlug);
17220
17391
  if (!found) {
17221
- throw new Error(`Space '${command32.spaceSlug}' not found.`);
17392
+ throw new Error(`Space '${command34.spaceSlug}' not found.`);
17222
17393
  }
17223
17394
  return found;
17224
17395
  }
@@ -17328,8 +17499,8 @@ var AddToPackageUseCase = class {
17328
17499
  this.gateway = gateway;
17329
17500
  this.spaceService = spaceService;
17330
17501
  }
17331
- async execute(command32) {
17332
- const { packageSlug, spaceSlug, itemType, itemSlugs } = command32;
17502
+ async execute(command34) {
17503
+ const { packageSlug, spaceSlug, itemType, itemSlugs } = command34;
17333
17504
  const space = spaceSlug ? await this.resolveSpaceBySlug(spaceSlug) : await this.spaceService.getDefaultSpace();
17334
17505
  const packages = await this.gateway.packages.list({
17335
17506
  spaceId: space.id
@@ -17350,7 +17521,7 @@ var AddToPackageUseCase = class {
17350
17521
  standardIds: [],
17351
17522
  recipeIds: [],
17352
17523
  skillIds: [],
17353
- originSkill: command32.originSkill
17524
+ originSkill: command34.originSkill
17354
17525
  };
17355
17526
  if (itemType === "standard") {
17356
17527
  addCommand.standardIds = ids.map(createStandardId);
@@ -17402,7 +17573,7 @@ var AddToPackageUseCase = class {
17402
17573
  }
17403
17574
  async findCommandBySlug(slug6, spaceId) {
17404
17575
  const commands = await this.gateway.commands.list({ spaceId });
17405
- return commands.recipes.find((command32) => command32.slug === slug6) ?? null;
17576
+ return commands.recipes.find((command34) => command34.slug === slug6) ?? null;
17406
17577
  }
17407
17578
  async findSkillBySlug(slug6, spaceId) {
17408
17579
  const skills = await this.gateway.skills.list({ spaceId });
@@ -17410,14 +17581,6 @@ var AddToPackageUseCase = class {
17410
17581
  }
17411
17582
  };
17412
17583
 
17413
- // apps/cli/src/infra/utils/packageSlugUtils.ts
17414
- function parsePackageSlug(slug6) {
17415
- if (!slug6.startsWith("@")) return null;
17416
- const slash = slug6.indexOf("/", 1);
17417
- if (slash === -1) return null;
17418
- return { spaceSlug: slug6.slice(1, slash), pkgSlug: slug6.slice(slash + 1) };
17419
- }
17420
-
17421
17584
  // apps/cli/src/infra/commands/packages/addToPackageHandler.ts
17422
17585
  function pluralize2(singular, count) {
17423
17586
  return count === 1 ? singular : `${singular}s`;
@@ -17429,17 +17592,15 @@ function formatItemList(items) {
17429
17592
  return items.map((item) => `"${item}"`).join(", ");
17430
17593
  }
17431
17594
  function resolvePackageRef(to, allSpaces, exit) {
17432
- const parsed = parsePackageSlug(to);
17433
- if (parsed) {
17434
- const spaceExists = allSpaces.find((s) => s.slug === parsed.spaceSlug);
17595
+ if (isFullParsedPackageSlug(to)) {
17596
+ const spaceExists = allSpaces.find((s) => s.slug === to.spaceSlug);
17435
17597
  if (!spaceExists) {
17436
- logErrorConsole(`Space '${parsed.spaceSlug}' not found.`);
17437
- logInfoConsole(
17438
- `Available spaces: ${allSpaces.map((s) => `@${s.slug}`).join(", ")}`
17439
- );
17598
+ logErrorConsole(`Space '${to.spaceSlug}' not found.`);
17599
+ const availableSpaceSlugs = allSpaces.map((s) => `@${s.slug}`).join(", ");
17600
+ logInfoConsole(`Available spaces: ${availableSpaceSlugs}`);
17440
17601
  exit(1);
17441
17602
  }
17442
- return parsed;
17603
+ return to;
17443
17604
  }
17444
17605
  if (allSpaces.length > 1) {
17445
17606
  logErrorConsole(
@@ -17447,14 +17608,14 @@ function resolvePackageRef(to, allSpaces, exit) {
17447
17608
  );
17448
17609
  logInfoConsole(`For example:`);
17449
17610
  allSpaces.forEach((s) => {
17450
- logInfoConsole(` --to @${s.slug}/${to}`);
17611
+ logInfoConsole(` --to @${s.slug}/${to.packageSlug}`);
17451
17612
  });
17452
17613
  logInfoConsole(
17453
17614
  `Run \`packmind-cli packages list\` to see available packages per space.`
17454
17615
  );
17455
17616
  exit(1);
17456
17617
  }
17457
- return { pkgSlug: to, spaceSlug: allSpaces[0].slug };
17618
+ return { ...to, spaceSlug: allSpaces[0].slug };
17458
17619
  }
17459
17620
  async function executeAddToPackage(pkgSlug, spaceSlug, itemType, itemSlugs, useCase, originSkill) {
17460
17621
  if (itemSlugs.length === 0) {
@@ -17488,11 +17649,11 @@ async function executeAddToPackage(pkgSlug, spaceSlug, itemType, itemSlugs, useC
17488
17649
  logErrorConsole(message);
17489
17650
  if (error instanceof ItemNotFoundError) {
17490
17651
  const spaceFlag = error.spaceSlug ? ` --space ${error.spaceSlug}` : "";
17491
- const command32 = formatCommand(
17652
+ const command34 = formatCommand(
17492
17653
  `packmind-cli ${error.itemType}s list${spaceFlag}`
17493
17654
  );
17494
17655
  logInfoConsole(
17495
- `Run \`${command32}\` to display available ${error.itemType}s`
17656
+ `Run \`${command34}\` to display available ${error.itemType}s`
17496
17657
  );
17497
17658
  }
17498
17659
  return { success: false, error: message };
@@ -17501,11 +17662,15 @@ async function executeAddToPackage(pkgSlug, spaceSlug, itemType, itemSlugs, useC
17501
17662
  async function addToPackageHandler(args2, deps) {
17502
17663
  const { hexa, exit } = deps;
17503
17664
  const allSpaces = await hexa.getSpaces();
17504
- const { pkgSlug, spaceSlug } = resolvePackageRef(args2.to, allSpaces, exit);
17665
+ const { packageSlug, spaceSlug } = resolvePackageRef(
17666
+ args2.to,
17667
+ allSpaces,
17668
+ exit
17669
+ );
17505
17670
  const gateway = hexa.getPackmindGateway();
17506
17671
  const useCase = new AddToPackageUseCase(gateway, hexa.getSpaceService());
17507
17672
  const result = await executeAddToPackage(
17508
- pkgSlug,
17673
+ packageSlug,
17509
17674
  spaceSlug,
17510
17675
  args2.itemType,
17511
17676
  args2.itemSlugs,
@@ -17525,7 +17690,7 @@ var addToPackageCommand = (0, import_cmd_ts20.command)({
17525
17690
  to: (0, import_cmd_ts20.option)({
17526
17691
  long: "to",
17527
17692
  description: "Target package slug (use @space/package format when multiple spaces exist)",
17528
- type: import_cmd_ts20.string
17693
+ type: PackageSlugArgType
17529
17694
  }),
17530
17695
  standards: (0, import_cmd_ts20.multioption)({
17531
17696
  long: "standard",
@@ -17673,9 +17838,8 @@ function isNotFoundError(err) {
17673
17838
  }
17674
17839
  async function resolvePackage(slug6, packmindCliHexa) {
17675
17840
  const allSpaces = await packmindCliHexa.getSpaces();
17676
- const parsed = parsePackageSlug(slug6);
17677
- if (parsed) {
17678
- const { spaceSlug, pkgSlug } = parsed;
17841
+ if (isFullParsedPackageSlug(slug6)) {
17842
+ const { spaceSlug, packageSlug } = slug6;
17679
17843
  const matchedSpace = allSpaces.find((s) => s.slug === spaceSlug);
17680
17844
  if (!matchedSpace) {
17681
17845
  throw new Error(`Space '@${spaceSlug}' not found.`);
@@ -17683,23 +17847,23 @@ async function resolvePackage(slug6, packmindCliHexa) {
17683
17847
  let pkg;
17684
17848
  try {
17685
17849
  pkg = await packmindCliHexa.getPackageBySlug({
17686
- slug: pkgSlug,
17850
+ slug: packageSlug,
17687
17851
  spaceId: matchedSpace.id
17688
17852
  });
17689
17853
  } catch (err) {
17690
17854
  if (isNotFoundError(err)) {
17691
17855
  throw new Error(
17692
- `Package '${pkgSlug}' not found in space '@${spaceSlug}'.`
17856
+ `Package '${packageSlug}' not found in space '@${spaceSlug}'.`
17693
17857
  );
17694
17858
  }
17695
17859
  throw err;
17696
17860
  }
17697
- return { pkg, fullSlug: `@${spaceSlug}/${pkgSlug}` };
17861
+ return { pkg, fullSlug: `@${spaceSlug}/${packageSlug}` };
17698
17862
  }
17699
17863
  const results = await Promise.allSettled(
17700
17864
  allSpaces.map(async (space) => ({
17701
17865
  pkg: await packmindCliHexa.getPackageBySlug({
17702
- slug: slug6,
17866
+ slug: slug6.packageSlug,
17703
17867
  spaceId: space.id
17704
17868
  }),
17705
17869
  spaceSlug: space.slug
@@ -17713,23 +17877,25 @@ async function resolvePackage(slug6, packmindCliHexa) {
17713
17877
  if (realError) {
17714
17878
  throw realError.reason;
17715
17879
  }
17716
- throw new Error(`Package '${slug6}' not found in any space.`);
17880
+ throw new Error(`Package '${slug6.packageSlug}' not found in any space.`);
17717
17881
  }
17718
17882
  if (matches.length > 1) {
17719
- const example = `@${matches[0].spaceSlug}/${slug6}`;
17883
+ const example = `@${matches[0].spaceSlug}/${slug6.packageSlug}`;
17720
17884
  throw new Error(
17721
- `Package '${slug6}' exists in multiple spaces (${matches.map((m) => `@${m.spaceSlug}`).join(", ")}). Please specify the space using the @space/package format (e.g. ${example}).`
17885
+ `Package '${slug6.packageSlug}' exists in multiple spaces (${matches.map((m) => `@${m.spaceSlug}`).join(", ")}). Please specify the space using the @space/package format (e.g. ${example}).`
17722
17886
  );
17723
17887
  }
17724
17888
  return {
17725
17889
  pkg: matches[0].pkg,
17726
- fullSlug: `@${matches[0].spaceSlug}/${slug6}`
17890
+ fullSlug: `@${matches[0].spaceSlug}/${slug6.packageSlug}`
17727
17891
  };
17728
17892
  }
17729
17893
  async function showPackageHandler(args2, deps) {
17730
17894
  const { packmindCliHexa, exit } = deps;
17731
17895
  try {
17732
- logInfoConsole(`Fetching package details for '${args2.slug}'...`);
17896
+ logInfoConsole(
17897
+ `Fetching package details for '${displayableParsedPackageSlug(args2.slug)}'...`
17898
+ );
17733
17899
  const { pkg, fullSlug } = await resolvePackage(args2.slug, packmindCliHexa);
17734
17900
  logConsole(`
17735
17901
  ${pkg.name} (${fullSlug}):
@@ -17789,7 +17955,7 @@ var showPackageCommand = (0, import_cmd_ts22.command)({
17789
17955
  description: "Show details of a specific package",
17790
17956
  args: {
17791
17957
  slug: (0, import_cmd_ts22.positional)({
17792
- type: import_cmd_ts22.string,
17958
+ type: PackageSlugArgType,
17793
17959
  displayName: "package",
17794
17960
  description: "Package slug (e.g. backend or @my-space/backend)"
17795
17961
  })
@@ -17813,12 +17979,385 @@ var packagesCommand = (0, import_cmd_ts23.subcommands)({
17813
17979
  }
17814
17980
  });
17815
17981
 
17982
+ // apps/cli/src/infra/commands/PluginsCommand.ts
17983
+ var import_cmd_ts26 = __toESM(require_cjs());
17984
+
17985
+ // apps/cli/src/infra/commands/plugins/RenderPluginCommand.ts
17986
+ var import_cmd_ts24 = __toESM(require_cjs());
17987
+
17988
+ // apps/cli/src/infra/commands/plugins/renderPluginHandler.ts
17989
+ var import_fs22 = require("fs");
17990
+ var import_path6 = require("path");
17991
+
17992
+ // apps/cli/src/infra/commands/plugins/pluginsContext.ts
17993
+ var import_fs21 = require("fs");
17994
+ var import_path5 = require("path");
17995
+ function detectPluginMode(cwd) {
17996
+ const marketplace = (0, import_path5.join)(cwd, ".claude-plugin/marketplace.json");
17997
+ const standalone = (0, import_path5.join)(cwd, ".claude-plugin/plugin.json");
17998
+ if ((0, import_fs21.existsSync)(marketplace)) {
17999
+ return { mode: "marketplace", manifestPath: marketplace };
18000
+ }
18001
+ if ((0, import_fs21.existsSync)(standalone)) {
18002
+ return { mode: "standalone", manifestPath: standalone };
18003
+ }
18004
+ return { mode: "none" };
18005
+ }
18006
+ function readMarketplace(path37) {
18007
+ const raw = (0, import_fs21.readFileSync)(path37, "utf8");
18008
+ const parsed = JSON.parse(raw);
18009
+ return { ...parsed, plugins: parsed.plugins ?? [] };
18010
+ }
18011
+ function writeMarketplace(path37, content) {
18012
+ (0, import_fs21.writeFileSync)(path37, `${JSON.stringify(content, null, 2)}
18013
+ `);
18014
+ }
18015
+ function classifySource(source) {
18016
+ if (typeof source === "string" && (source.startsWith("./") || source.startsWith("/"))) {
18017
+ return "local";
18018
+ }
18019
+ return "remote";
18020
+ }
18021
+ function findPluginEntry(marketplace, name) {
18022
+ return marketplace.plugins.find((plugin) => plugin.name === name);
18023
+ }
18024
+ function upsertPluginEntry(marketplace, entry) {
18025
+ const exists = marketplace.plugins.some(
18026
+ (plugin) => plugin.name === entry.name
18027
+ );
18028
+ const plugins = exists ? marketplace.plugins.map(
18029
+ (plugin) => plugin.name === entry.name ? entry : plugin
18030
+ ) : [...marketplace.plugins, entry];
18031
+ return { ...marketplace, plugins };
18032
+ }
18033
+ function removePluginEntry(marketplace, name) {
18034
+ return {
18035
+ ...marketplace,
18036
+ plugins: marketplace.plugins.filter((plugin) => plugin.name !== name)
18037
+ };
18038
+ }
18039
+
18040
+ // apps/cli/src/infra/commands/plugins/resolveGitContext.ts
18041
+ async function resolveGitContext(packmindCliHexa, cwd) {
18042
+ const root = await packmindCliHexa.tryGetGitRepositoryRoot(cwd);
18043
+ if (!root) {
18044
+ return { gitRemoteUrl: "", gitBranch: "" };
18045
+ }
18046
+ try {
18047
+ return {
18048
+ gitRemoteUrl: packmindCliHexa.getGitRemoteUrlFromPath(root),
18049
+ gitBranch: packmindCliHexa.getCurrentBranch(root)
18050
+ };
18051
+ } catch {
18052
+ return { gitRemoteUrl: "", gitBranch: "" };
18053
+ }
18054
+ }
18055
+
18056
+ // apps/cli/src/infra/commands/plugins/renderPluginHandler.ts
18057
+ async function renderPluginHandler(args2, deps) {
18058
+ const cwd = deps.getCwd();
18059
+ const ctx = detectPluginMode(cwd);
18060
+ if (ctx.mode === "none") {
18061
+ deps.error(
18062
+ "No .claude-plugin/marketplace.json or .claude-plugin/plugin.json found in this directory."
18063
+ );
18064
+ deps.exit(1);
18065
+ return;
18066
+ }
18067
+ const pluginName = args2.packageSlug.packageSlug;
18068
+ const packageSlug = displayableParsedPackageSlug(args2.packageSlug);
18069
+ const { gitRemoteUrl, gitBranch } = await resolveGitContext(
18070
+ deps.packmindCliHexa,
18071
+ cwd
18072
+ );
18073
+ if (ctx.mode === "marketplace") {
18074
+ const manifestPath = ctx.manifestPath;
18075
+ const marketplace = readMarketplace(manifestPath);
18076
+ const existing = findPluginEntry(marketplace, pluginName);
18077
+ if (existing) {
18078
+ if (classifySource(existing.source) === "remote") {
18079
+ deps.error(
18080
+ `Plugin "${pluginName}" has a remote source. Run this command in the workspace of the remote plugin.`
18081
+ );
18082
+ deps.exit(1);
18083
+ return;
18084
+ }
18085
+ const existingLocalSource = existing.source;
18086
+ const confirmed = await deps.confirmOverwrite(
18087
+ `Plugin "${pluginName}" already exists at "${existingLocalSource}". Overwrite? [y/N] `
18088
+ );
18089
+ if (!confirmed) {
18090
+ deps.log("No changes made.");
18091
+ deps.exit(0);
18092
+ return;
18093
+ }
18094
+ const existingPluginRoot = existingLocalSource.replace(/^\.\//, "").replace(/\/?$/, "/");
18095
+ const response2 = await deps.packmindCliHexa.renderPlugin({
18096
+ packageSlug,
18097
+ mode: "marketplace",
18098
+ pluginRoot: existingPluginRoot,
18099
+ pluginName,
18100
+ gitRemoteUrl,
18101
+ gitBranch
18102
+ });
18103
+ writeFiles(cwd, response2.files);
18104
+ const nextEntry = {
18105
+ name: existing.name,
18106
+ source: existing.source,
18107
+ ...response2.pluginDescription ? { description: response2.pluginDescription } : {}
18108
+ };
18109
+ writeMarketplace(manifestPath, upsertPluginEntry(marketplace, nextEntry));
18110
+ deps.log(
18111
+ `Re-rendered ${response2.files.length} files into ${existingLocalSource}`
18112
+ );
18113
+ reportSkippedStandards(deps, response2.skippedStandardsCount);
18114
+ deps.exit(0);
18115
+ return;
18116
+ }
18117
+ const pluginRoot = `plugins/${pluginName}/`;
18118
+ const response = await deps.packmindCliHexa.renderPlugin({
18119
+ packageSlug,
18120
+ mode: "marketplace",
18121
+ pluginRoot,
18122
+ pluginName,
18123
+ gitRemoteUrl,
18124
+ gitBranch
18125
+ });
18126
+ writeFiles(cwd, response.files);
18127
+ const updated = upsertPluginEntry(marketplace, {
18128
+ name: pluginName,
18129
+ source: `./${pluginRoot.replace(/\/$/, "")}`,
18130
+ description: response.pluginDescription
18131
+ });
18132
+ writeMarketplace(manifestPath, updated);
18133
+ deps.log(`Rendered ${response.files.length} files into ./${pluginRoot}`);
18134
+ reportSkippedStandards(deps, response.skippedStandardsCount);
18135
+ deps.log("Updated .claude-plugin/marketplace.json");
18136
+ deps.exit(0);
18137
+ return;
18138
+ }
18139
+ if (ctx.mode === "standalone") {
18140
+ const manifestPath = ctx.manifestPath;
18141
+ const manifest = JSON.parse((0, import_fs22.readFileSync)(manifestPath, "utf8"));
18142
+ if (manifest.name !== pluginName) {
18143
+ deps.error(`The plugin '${pluginName}' is not handled in this repo.`);
18144
+ deps.exit(1);
18145
+ return;
18146
+ }
18147
+ const confirmed = await deps.confirmOverwrite(
18148
+ `Plugin "${pluginName}" already exists in this workspace. Overwrite? [y/N] `
18149
+ );
18150
+ if (!confirmed) {
18151
+ deps.log("No changes made.");
18152
+ deps.exit(0);
18153
+ return;
18154
+ }
18155
+ const response = await deps.packmindCliHexa.renderPlugin({
18156
+ packageSlug,
18157
+ mode: "standalone",
18158
+ pluginRoot: "/",
18159
+ pluginName,
18160
+ gitRemoteUrl,
18161
+ gitBranch
18162
+ });
18163
+ writeFiles(cwd, response.files);
18164
+ deps.log(`Re-rendered ${response.files.length} files into ./`);
18165
+ reportSkippedStandards(deps, response.skippedStandardsCount);
18166
+ deps.exit(0);
18167
+ return;
18168
+ }
18169
+ }
18170
+ function reportSkippedStandards(deps, skippedStandardsCount) {
18171
+ if (skippedStandardsCount > 0) {
18172
+ deps.log(
18173
+ `Skipped ${skippedStandardsCount} standards (not supported in Claude plugins).`
18174
+ );
18175
+ }
18176
+ }
18177
+ function writeFiles(cwd, files) {
18178
+ for (const file of files) {
18179
+ const absolutePath = (0, import_path6.join)(cwd, file.path);
18180
+ (0, import_fs22.mkdirSync)((0, import_path6.dirname)(absolutePath), { recursive: true });
18181
+ (0, import_fs22.writeFileSync)(absolutePath, file.content);
18182
+ }
18183
+ }
18184
+
18185
+ // apps/cli/src/infra/commands/plugins/confirmOverwrite.ts
18186
+ var readline4 = __toESM(require("readline"));
18187
+ async function confirmOverwrite(message) {
18188
+ const rl = readline4.createInterface({
18189
+ input: process.stdin,
18190
+ output: process.stdout
18191
+ });
18192
+ return new Promise((resolve16) => {
18193
+ rl.question(message, (answer) => {
18194
+ rl.close();
18195
+ const normalized = answer.trim().toLowerCase();
18196
+ resolve16(normalized === "y" || normalized === "yes");
18197
+ });
18198
+ });
18199
+ }
18200
+
18201
+ // apps/cli/src/infra/commands/plugins/RenderPluginCommand.ts
18202
+ var renderPluginCommand = (0, import_cmd_ts24.command)({
18203
+ name: "render",
18204
+ description: "Render a Packmind package as a Claude plugin",
18205
+ args: {
18206
+ packageSlug: (0, import_cmd_ts24.positional)({
18207
+ type: PackageSlugArgType,
18208
+ displayName: "package-slug",
18209
+ description: "Package slug (e.g. security or @my-space/security)"
18210
+ })
18211
+ },
18212
+ handler: async ({ packageSlug }) => {
18213
+ const packmindLogger = new PackmindLogger("PackmindCLI", "info" /* INFO */);
18214
+ const packmindCliHexa = new PackmindCliHexa(packmindLogger);
18215
+ await renderPluginHandler(
18216
+ { packageSlug },
18217
+ {
18218
+ packmindCliHexa,
18219
+ exit: process.exit,
18220
+ getCwd: () => process.cwd(),
18221
+ log: console.log,
18222
+ error: console.error,
18223
+ confirmOverwrite
18224
+ }
18225
+ );
18226
+ }
18227
+ });
18228
+
18229
+ // apps/cli/src/infra/commands/plugins/DeletePluginCommand.ts
18230
+ var import_cmd_ts25 = __toESM(require_cjs());
18231
+
18232
+ // apps/cli/src/infra/commands/plugins/deletePluginHandler.ts
18233
+ var import_fs23 = require("fs");
18234
+ var import_path7 = require("path");
18235
+ async function deletePluginHandler(args2, deps) {
18236
+ const cwd = deps.getCwd();
18237
+ const ctx = detectPluginMode(cwd);
18238
+ if (ctx.mode === "none") {
18239
+ deps.error(
18240
+ "No .claude-plugin/marketplace.json or .claude-plugin/plugin.json found in this directory."
18241
+ );
18242
+ deps.exit(1);
18243
+ return;
18244
+ }
18245
+ const pluginName = args2.packageSlug.packageSlug;
18246
+ const packageSlug = displayableParsedPackageSlug(args2.packageSlug);
18247
+ const { gitRemoteUrl } = await resolveGitContext(deps.packmindCliHexa, cwd);
18248
+ if (ctx.mode === "marketplace") {
18249
+ const manifestPath = ctx.manifestPath;
18250
+ const marketplace = readMarketplace(manifestPath);
18251
+ const entry = findPluginEntry(marketplace, pluginName);
18252
+ if (!entry) {
18253
+ deps.log(
18254
+ `Plugin "${pluginName}" is not declared in marketplace.json. Nothing to delete.`
18255
+ );
18256
+ deps.exit(0);
18257
+ return;
18258
+ }
18259
+ if (classifySource(entry.source) === "remote") {
18260
+ deps.error(
18261
+ `Plugin "${pluginName}" has a remote source. Run this command in the workspace of the remote plugin.`
18262
+ );
18263
+ deps.exit(1);
18264
+ return;
18265
+ }
18266
+ const localSource = entry.source;
18267
+ const confirmed = await deps.confirmOverwrite(
18268
+ `Remove ${localSource} and update marketplace.json for plugin "${pluginName}"? [y/N] `
18269
+ );
18270
+ if (!confirmed) {
18271
+ deps.log("No changes made.");
18272
+ deps.exit(0);
18273
+ return;
18274
+ }
18275
+ (0, import_fs23.rmSync)((0, import_path7.join)(cwd, localSource), { recursive: true, force: true });
18276
+ writeMarketplace(manifestPath, removePluginEntry(marketplace, pluginName));
18277
+ deps.log(`Removed ${localSource} and updated marketplace.json`);
18278
+ await trackDeletion(deps, packageSlug, gitRemoteUrl);
18279
+ deps.exit(0);
18280
+ return;
18281
+ }
18282
+ if (ctx.mode === "standalone") {
18283
+ const manifestPath = ctx.manifestPath;
18284
+ const manifest = JSON.parse((0, import_fs23.readFileSync)(manifestPath, "utf8"));
18285
+ if (manifest.name !== pluginName) {
18286
+ deps.error(`The plugin '${pluginName}' is not handled in this repo.`);
18287
+ deps.exit(1);
18288
+ return;
18289
+ }
18290
+ const confirmed = await deps.confirmOverwrite(
18291
+ `Remove rendered files for plugin "${pluginName}" from this workspace? [y/N] `
18292
+ );
18293
+ if (!confirmed) {
18294
+ deps.log("No changes made.");
18295
+ deps.exit(0);
18296
+ return;
18297
+ }
18298
+ (0, import_fs23.rmSync)((0, import_path7.join)(cwd, "commands"), { recursive: true, force: true });
18299
+ (0, import_fs23.rmSync)((0, import_path7.join)(cwd, "skills"), { recursive: true, force: true });
18300
+ deps.log(`Removed rendered files for "${pluginName}"`);
18301
+ await trackDeletion(deps, packageSlug, gitRemoteUrl);
18302
+ deps.exit(0);
18303
+ return;
18304
+ }
18305
+ }
18306
+ async function trackDeletion(deps, packageSlug, gitRemoteUrl) {
18307
+ try {
18308
+ await deps.packmindCliHexa.trackPluginDeleted({
18309
+ packageSlug,
18310
+ gitRemoteUrl
18311
+ });
18312
+ } catch {
18313
+ logWarningConsole("Failed to notify Packmind of plugin deletion");
18314
+ }
18315
+ }
18316
+
18317
+ // apps/cli/src/infra/commands/plugins/DeletePluginCommand.ts
18318
+ var deletePluginCommand = (0, import_cmd_ts25.command)({
18319
+ name: "delete",
18320
+ description: "Delete a rendered Packmind plugin from this workspace",
18321
+ args: {
18322
+ packageSlug: (0, import_cmd_ts25.positional)({
18323
+ type: PackageSlugArgType,
18324
+ displayName: "package-slug",
18325
+ description: "Package slug (e.g. security or @my-space/security)"
18326
+ })
18327
+ },
18328
+ handler: async ({ packageSlug }) => {
18329
+ const packmindLogger = new PackmindLogger("PackmindCLI", "info" /* INFO */);
18330
+ const packmindCliHexa = new PackmindCliHexa(packmindLogger);
18331
+ await deletePluginHandler(
18332
+ { packageSlug },
18333
+ {
18334
+ packmindCliHexa,
18335
+ exit: process.exit,
18336
+ getCwd: () => process.cwd(),
18337
+ log: console.log,
18338
+ error: console.error,
18339
+ confirmOverwrite
18340
+ }
18341
+ );
18342
+ }
18343
+ });
18344
+
18345
+ // apps/cli/src/infra/commands/PluginsCommand.ts
18346
+ var pluginsCommand = (0, import_cmd_ts26.subcommands)({
18347
+ name: "plugins",
18348
+ description: "Render Packmind packages as Claude plugins",
18349
+ cmds: {
18350
+ render: renderPluginCommand,
18351
+ delete: deletePluginCommand
18352
+ }
18353
+ });
18354
+
17816
18355
  // apps/cli/src/infra/commands/PlaybookCommand.ts
17817
- var import_cmd_ts30 = __toESM(require_cjs());
18356
+ var import_cmd_ts33 = __toESM(require_cjs());
17818
18357
 
17819
18358
  // apps/cli/src/infra/commands/playbook/AddCommand.ts
17820
- var import_fs21 = require("fs");
17821
- var import_cmd_ts24 = __toESM(require_cjs());
18359
+ var import_fs24 = require("fs");
18360
+ var import_cmd_ts27 = __toESM(require_cjs());
17822
18361
 
17823
18362
  // apps/cli/src/infra/repositories/PlaybookLocalRepository.ts
17824
18363
  var crypto = __toESM(require("crypto"));
@@ -17906,7 +18445,6 @@ var PlaybookLocalRepository = class {
17906
18445
  var fs26 = __toESM(require("fs"));
17907
18446
  var path29 = __toESM(require("path"));
17908
18447
  var yaml2 = __toESM(require("yaml"));
17909
- var import_slug4 = __toESM(require("slug"));
17910
18448
 
17911
18449
  // apps/cli/src/application/utils/parseCommandFile.ts
17912
18450
  var path26 = __toESM(require("path"));
@@ -18274,16 +18812,16 @@ var SkillFileSchema = new import_typeorm4.EntitySchema({
18274
18812
  ]
18275
18813
  });
18276
18814
 
18277
- // packages/skills/src/application/useCases/createSkill/createSkill.usecase.ts
18815
+ // packages/skills/src/application/useCases/createSkill/CreateSkillUseCase.ts
18278
18816
  var import_slug = __toESM(require("slug"));
18279
18817
 
18280
- // packages/skills/src/application/useCases/saveSkillVersion/saveSkillVersion.usecase.ts
18818
+ // packages/skills/src/application/useCases/saveSkillVersion/SaveSkillVersionUseCase.ts
18281
18819
  var import_uuid = require("uuid");
18282
18820
 
18283
- // packages/skills/src/application/useCases/updateSkill/updateSkill.usecase.ts
18821
+ // packages/skills/src/application/useCases/updateSkill/UpdateSkillUseCase.ts
18284
18822
  var import_slug2 = __toESM(require("slug"));
18285
18823
 
18286
- // packages/skills/src/application/useCases/uploadSkill/uploadSkill.usecase.ts
18824
+ // packages/skills/src/application/useCases/uploadSkill/UploadSkillUseCase.ts
18287
18825
  var import_slug3 = __toESM(require("slug"));
18288
18826
  var import_uuid2 = require("uuid");
18289
18827
 
@@ -18448,44 +18986,72 @@ function findLockFileEntryAndFileForPath(normalizedFilePath, artifacts) {
18448
18986
  return void 0;
18449
18987
  }
18450
18988
 
18451
- // apps/cli/src/infra/utils/deployedFilesUtils.ts
18452
- function lockFileToArtifactVersionEntries(lockFile) {
18453
- return Object.values(lockFile.artifacts).map((entry) => ({
18454
- name: entry.name,
18455
- type: entry.type,
18456
- id: entry.id,
18457
- version: entry.version,
18458
- spaceId: entry.spaceId
18459
- }));
18989
+ // apps/cli/src/infra/commands/playbook/add/linkExistingArtifact.ts
18990
+ var import_slug4 = __toESM(require("slug"));
18991
+ async function resolveExistingArtifact(packmindCliHexa, artifactType, spaceId, artifactName) {
18992
+ const artifacts = await listArtifactsForSpace(
18993
+ packmindCliHexa,
18994
+ artifactType,
18995
+ spaceId
18996
+ );
18997
+ const match = artifacts.find((a) => (0, import_slug4.default)(a.name) === (0, import_slug4.default)(artifactName));
18998
+ return match ? { id: match.id, name: match.name } : null;
18460
18999
  }
18461
- async function fetchDeployedFiles(gateway, lockFile, options = {}) {
18462
- try {
18463
- const artifacts = lockFileToArtifactVersionEntries(lockFile);
18464
- const response = await gateway.deployment.getContentByVersions({
18465
- artifacts,
18466
- agents: lockFile.agents
18467
- });
18468
- return remapDeployedFilesForHomeInstall(
18469
- response.fileUpdates.createOrUpdate,
18470
- options.projectDir
18471
- );
18472
- } catch {
18473
- return [];
19000
+ async function listArtifactsForSpace(packmindCliHexa, artifactType, spaceId) {
19001
+ switch (artifactType) {
19002
+ case "skill": {
19003
+ const skills = await packmindCliHexa.listSkills({
19004
+ spaceId
19005
+ });
19006
+ return skills.map((s) => ({ id: s.id, name: s.name }));
19007
+ }
19008
+ case "command": {
19009
+ const commands = await packmindCliHexa.listCommands({
19010
+ spaceId
19011
+ });
19012
+ return commands.map((c) => ({ id: c.id, name: c.name }));
19013
+ }
19014
+ case "standard": {
19015
+ const standards = await packmindCliHexa.listStandards({
19016
+ spaceId
19017
+ });
19018
+ return standards.map((s) => ({ id: s.id, name: s.name }));
19019
+ }
18474
19020
  }
18475
19021
  }
18476
- function remapDeployedFilesForHomeInstall(files, projectDir) {
18477
- if (!projectDir) return files;
18478
- const homeAgent = isAgentHomeDirectory(projectDir);
18479
- if (!homeAgent) return files;
18480
- const prefix = getAgentHomeDirPrefix(homeAgent);
18481
- if (!prefix) return files;
18482
- return files.filter((file) => !file.path.startsWith(".packmind/")).map((file) => {
18483
- const remapped = file.path.startsWith(prefix) ? { ...file, path: file.path.slice(prefix.length) } : { ...file };
18484
- if (remapped.content !== void 0) {
18485
- remapped.content = stripFullStandardLinkFooter(remapped.content);
18486
- }
18487
- return remapped;
18488
- });
19022
+ function adoptArtifactIntoLockFile({
19023
+ lockFile,
19024
+ artifact,
19025
+ relativeFilePath,
19026
+ agent
19027
+ }) {
19028
+ const base = lockFile ?? {
19029
+ lockfileVersion: 2,
19030
+ packageSlugs: [],
19031
+ agents: [],
19032
+ artifacts: {}
19033
+ };
19034
+ const key = `user:${artifact.type}:${(0, import_slug4.default)(artifact.name)}`;
19035
+ const existing = base.artifacts[key];
19036
+ const normalized = normalizePath2(relativeFilePath);
19037
+ const files = existing ? [...existing.files] : [];
19038
+ if (!files.some((f) => normalizePath2(f.path) === normalized)) {
19039
+ files.push({ path: relativeFilePath, agent });
19040
+ }
19041
+ const entry = {
19042
+ name: artifact.name,
19043
+ type: artifact.type,
19044
+ id: artifact.id,
19045
+ version: artifact.version,
19046
+ spaceId: artifact.spaceId,
19047
+ packageIds: existing?.packageIds ?? [],
19048
+ source: "user",
19049
+ files
19050
+ };
19051
+ return {
19052
+ ...base,
19053
+ artifacts: { ...base.artifacts, [key]: entry }
19054
+ };
18489
19055
  }
18490
19056
 
18491
19057
  // apps/cli/src/infra/commands/playbook/addHandler.ts
@@ -18580,6 +19146,7 @@ async function playbookAddHandler(deps) {
18580
19146
  packmindCliHexa
18581
19147
  );
18582
19148
  const earlyLockFile = earlyTargetDir ? await lockFileRepository.read(earlyTargetDir) : null;
19149
+ let activeLockFile = earlyLockFile;
18583
19150
  if (earlyLockFile && earlyTargetDir) {
18584
19151
  const normalizedForLookup = normalizePath2(
18585
19152
  path29.relative(earlyTargetDir, absolutePath)
@@ -18779,6 +19346,14 @@ Example: packmind-cli playbook add --space ${allSpaces[0].slug} <path>`
18779
19346
  changeType = "updated";
18780
19347
  }
18781
19348
  }
19349
+ if (changeType === "created" && earlyLockFile && earlyLockFile.agents.length > 0 && !earlyLockFile.agents.includes(codingAgent)) {
19350
+ logErrorConsole(
19351
+ `Cannot add this ${artifactType}: it is rendered for the "${codingAgent}" agent, which is not in your configured agents (${earlyLockFile.agents.join(", ")}).
19352
+ This file is no longer managed by Packmind. Re-add "${codingAgent}" to your agents and run ${formatLabel("packmind-cli install")} to manage it again, or delete the file if it is no longer needed.`
19353
+ );
19354
+ exit(1);
19355
+ return;
19356
+ }
18782
19357
  if (changeType === "updated" && existingLockEntry) {
18783
19358
  try {
18784
19359
  const packmindGateway = packmindCliHexa.getPackmindGateway();
@@ -18803,22 +19378,14 @@ Run ${formatLabel("packmind-cli install")} to update before making changes.`
18803
19378
  }
18804
19379
  }
18805
19380
  if (changeType === "created") {
19381
+ let existingArtifact;
18806
19382
  try {
18807
- const existingNames = await listExistingArtifactNames(
19383
+ existingArtifact = await resolveExistingArtifact(
18808
19384
  packmindCliHexa,
18809
19385
  artifactType,
18810
- spaceId
18811
- );
18812
- const nameExists = existingNames.some(
18813
- (name) => (0, import_slug4.default)(name) === (0, import_slug4.default)(artifactName)
19386
+ spaceId,
19387
+ artifactName
18814
19388
  );
18815
- if (nameExists) {
18816
- logErrorConsole(
18817
- `A ${artifactType} named "${artifactName}" already exists in Packmind.`
18818
- );
18819
- exit(1);
18820
- return;
18821
- }
18822
19389
  } catch (err) {
18823
19390
  const errorMessage = err instanceof Error ? err.message : String(err);
18824
19391
  logErrorConsole(
@@ -18827,11 +19394,47 @@ Run ${formatLabel("packmind-cli install")} to update before making changes.`
18827
19394
  exit(1);
18828
19395
  return;
18829
19396
  }
19397
+ if (existingArtifact) {
19398
+ let remoteVersion;
19399
+ try {
19400
+ const packmindGateway = packmindCliHexa.getPackmindGateway();
19401
+ ({ version: remoteVersion } = await packmindGateway.deployment.getLatestVersion(
19402
+ artifactType,
19403
+ existingArtifact.id,
19404
+ spaceId
19405
+ ));
19406
+ } catch (err) {
19407
+ const errorMessage = err instanceof Error ? err.message : String(err);
19408
+ logErrorConsole(
19409
+ `Failed to link "${existingArtifact.name}" to the existing ${artifactType}: ${errorMessage}`
19410
+ );
19411
+ exit(1);
19412
+ return;
19413
+ }
19414
+ const adoptedFilePath = artifactType === "skill" ? `${normalizedFilePath}/SKILL.md` : normalizedFilePath;
19415
+ activeLockFile = adoptArtifactIntoLockFile({
19416
+ lockFile: activeLockFile,
19417
+ artifact: {
19418
+ id: existingArtifact.id,
19419
+ name: existingArtifact.name,
19420
+ type: artifactType,
19421
+ version: remoteVersion,
19422
+ spaceId
19423
+ },
19424
+ relativeFilePath: adoptedFilePath,
19425
+ agent: codingAgent
19426
+ });
19427
+ await lockFileRepository.write(targetDir, activeLockFile);
19428
+ changeType = "updated";
19429
+ logInfoConsole(
19430
+ `Linked "${existingArtifact.name}" to existing ${artifactType} (v${remoteVersion})${spaceName ? ` in space "${spaceName}"` : ""} \u2014 staged as update.`
19431
+ );
19432
+ }
18830
19433
  }
18831
- if (changeType === "updated" && earlyLockFile) {
19434
+ if (changeType === "updated" && activeLockFile) {
18832
19435
  const deployedFiles = await fetchDeployedFiles(
18833
19436
  packmindCliHexa.getPackmindGateway(),
18834
- earlyLockFile,
19437
+ activeLockFile,
18835
19438
  { projectDir: targetDir }
18836
19439
  );
18837
19440
  if (artifactType === "skill") {
@@ -18882,45 +19485,23 @@ Run ${formatLabel("packmind-cli install")} to update before making changes.`
18882
19485
  );
18883
19486
  exit(0);
18884
19487
  }
18885
- async function listExistingArtifactNames(packmindCliHexa, artifactType, spaceId) {
18886
- switch (artifactType) {
18887
- case "skill": {
18888
- const skills = await packmindCliHexa.listSkills({
18889
- spaceId
18890
- });
18891
- return skills.map((s) => s.name);
18892
- }
18893
- case "command": {
18894
- const commands = await packmindCliHexa.listCommands({
18895
- spaceId
18896
- });
18897
- return commands.map((c) => c.name);
18898
- }
18899
- case "standard": {
18900
- const standards = await packmindCliHexa.listStandards({
18901
- spaceId
18902
- });
18903
- return standards.map((s) => s.name);
18904
- }
18905
- }
18906
- }
18907
19488
  function formatSpaceList(spaces) {
18908
19489
  const maxSlugLength = Math.max(...spaces.map((s) => s.slug.length));
18909
19490
  return spaces.map((s) => ` ${s.slug.padEnd(maxSlugLength)} (${s.name})`).join("\n");
18910
19491
  }
18911
19492
 
18912
19493
  // apps/cli/src/infra/commands/playbook/AddCommand.ts
18913
- var addPlaybookCommand = (0, import_cmd_ts24.command)({
19494
+ var addPlaybookCommand = (0, import_cmd_ts27.command)({
18914
19495
  name: "add",
18915
19496
  description: "Stage a local artifact change",
18916
19497
  args: {
18917
- filePath: (0, import_cmd_ts24.positional)({
18918
- type: import_cmd_ts24.string,
19498
+ filePath: (0, import_cmd_ts27.positional)({
19499
+ type: import_cmd_ts27.string,
18919
19500
  displayName: "path",
18920
19501
  description: "Path to the artifact file or directory to stage"
18921
19502
  }),
18922
- space: (0, import_cmd_ts24.option)({
18923
- type: (0, import_cmd_ts24.optional)(SpaceSlug),
19503
+ space: (0, import_cmd_ts27.option)({
19504
+ type: (0, import_cmd_ts27.optional)(SpaceSlug),
18924
19505
  long: "space",
18925
19506
  description: "Target space slug"
18926
19507
  })
@@ -18940,7 +19521,7 @@ var addPlaybookCommand = (0, import_cmd_ts24.command)({
18940
19521
  spaceSlug: space,
18941
19522
  exit: process.exit,
18942
19523
  cwd: process.cwd(),
18943
- readFile: (p) => (0, import_fs21.readFileSync)(p, "utf-8"),
19524
+ readFile: (p) => (0, import_fs24.readFileSync)(p, "utf-8"),
18944
19525
  readSkillDirectory,
18945
19526
  playbookLocalRepository,
18946
19527
  lockFileRepository
@@ -18949,7 +19530,7 @@ var addPlaybookCommand = (0, import_cmd_ts24.command)({
18949
19530
  });
18950
19531
 
18951
19532
  // apps/cli/src/infra/commands/playbook/RmCommand.ts
18952
- var import_cmd_ts25 = __toESM(require_cjs());
19533
+ var import_cmd_ts28 = __toESM(require_cjs());
18953
19534
 
18954
19535
  // apps/cli/src/infra/commands/playbook/rmHandler.ts
18955
19536
  var fs27 = __toESM(require("fs"));
@@ -19080,13 +19661,13 @@ async function playbookRmHandler(deps) {
19080
19661
  }
19081
19662
 
19082
19663
  // apps/cli/src/infra/commands/playbook/RmCommand.ts
19083
- var rmPlaybookCommand = (0, import_cmd_ts25.command)({
19664
+ var rmPlaybookCommand = (0, import_cmd_ts28.command)({
19084
19665
  name: "rm",
19085
19666
  description: "Stage an artifact for removal",
19086
19667
  aliases: ["remove"],
19087
19668
  args: {
19088
- filePath: (0, import_cmd_ts25.positional)({
19089
- type: import_cmd_ts25.string,
19669
+ filePath: (0, import_cmd_ts28.positional)({
19670
+ type: import_cmd_ts28.string,
19090
19671
  displayName: "path",
19091
19672
  description: "Path to the artifact file or directory to remove"
19092
19673
  })
@@ -19112,7 +19693,7 @@ var rmPlaybookCommand = (0, import_cmd_ts25.command)({
19112
19693
  });
19113
19694
 
19114
19695
  // apps/cli/src/infra/commands/playbook/UnstageCommand.ts
19115
- var import_cmd_ts26 = __toESM(require_cjs());
19696
+ var import_cmd_ts29 = __toESM(require_cjs());
19116
19697
 
19117
19698
  // apps/cli/src/infra/commands/playbook/unstageHandler.ts
19118
19699
  var path31 = __toESM(require("path"));
@@ -19196,17 +19777,17 @@ ${spaceList}`
19196
19777
  }
19197
19778
 
19198
19779
  // apps/cli/src/infra/commands/playbook/UnstageCommand.ts
19199
- var unstagePlaybookCommand = (0, import_cmd_ts26.command)({
19780
+ var unstagePlaybookCommand = (0, import_cmd_ts29.command)({
19200
19781
  name: "unstage",
19201
19782
  description: "Remove a staged change",
19202
19783
  args: {
19203
- filePath: (0, import_cmd_ts26.positional)({
19204
- type: import_cmd_ts26.string,
19784
+ filePath: (0, import_cmd_ts29.positional)({
19785
+ type: import_cmd_ts29.string,
19205
19786
  displayName: "path",
19206
19787
  description: "Path to the artifact file or directory to unstage"
19207
19788
  }),
19208
- space: (0, import_cmd_ts26.option)({
19209
- type: (0, import_cmd_ts26.optional)(SpaceSlug),
19789
+ space: (0, import_cmd_ts29.option)({
19790
+ type: (0, import_cmd_ts29.optional)(SpaceSlug),
19210
19791
  long: "space",
19211
19792
  description: "Target space slug (required when artifact is staged for multiple spaces)"
19212
19793
  })
@@ -19231,15 +19812,15 @@ var unstagePlaybookCommand = (0, import_cmd_ts26.command)({
19231
19812
  });
19232
19813
 
19233
19814
  // apps/cli/src/infra/commands/playbook/StatusCommand.ts
19234
- var import_fs23 = require("fs");
19235
- var import_cmd_ts27 = __toESM(require_cjs());
19815
+ var import_fs26 = require("fs");
19816
+ var import_cmd_ts30 = __toESM(require_cjs());
19236
19817
 
19237
19818
  // apps/cli/src/infra/utils/listDirectoryFiles.ts
19238
- var import_fs22 = require("fs");
19819
+ var import_fs25 = require("fs");
19239
19820
  var path32 = __toESM(require("path"));
19240
19821
  function listDirectoryFiles(dirPath) {
19241
19822
  const results = [];
19242
- const entries = (0, import_fs22.readdirSync)(dirPath, { withFileTypes: true });
19823
+ const entries = (0, import_fs25.readdirSync)(dirPath, { withFileTypes: true });
19243
19824
  for (const entry of entries) {
19244
19825
  const fullPath = path32.join(dirPath, entry.name);
19245
19826
  if (entry.isDirectory()) {
@@ -19515,7 +20096,7 @@ async function playbookStatusHandler(deps) {
19515
20096
  }
19516
20097
 
19517
20098
  // apps/cli/src/infra/commands/playbook/StatusCommand.ts
19518
- var statusPlaybookCommand = (0, import_cmd_ts27.command)({
20099
+ var statusPlaybookCommand = (0, import_cmd_ts30.command)({
19519
20100
  name: "status",
19520
20101
  description: "Show staged and untracked changes",
19521
20102
  args: {},
@@ -19534,11 +20115,11 @@ var statusPlaybookCommand = (0, import_cmd_ts27.command)({
19534
20115
  lockFileRepository,
19535
20116
  cwd: process.cwd(),
19536
20117
  exit: process.exit,
19537
- readFile: (p) => (0, import_fs23.readFileSync)(p, "utf-8"),
20118
+ readFile: (p) => (0, import_fs26.readFileSync)(p, "utf-8"),
19538
20119
  listDirectoryFiles,
19539
20120
  getFileMode: (p) => {
19540
20121
  try {
19541
- return (0, import_fs23.statSync)(p).mode;
20122
+ return (0, import_fs26.statSync)(p).mode;
19542
20123
  } catch {
19543
20124
  return null;
19544
20125
  }
@@ -19548,8 +20129,8 @@ var statusPlaybookCommand = (0, import_cmd_ts27.command)({
19548
20129
  });
19549
20130
 
19550
20131
  // apps/cli/src/infra/commands/playbook/SubmitCommand.ts
19551
- var import_fs25 = require("fs");
19552
- var import_cmd_ts28 = __toESM(require_cjs());
20132
+ var import_fs28 = require("fs");
20133
+ var import_cmd_ts31 = __toESM(require_cjs());
19553
20134
 
19554
20135
  // apps/cli/src/infra/commands/playbook/submitHandler.ts
19555
20136
  var path35 = __toESM(require("path"));
@@ -19982,7 +20563,7 @@ function buildUpdatedCommandProposals(entry, artifactId, deployedContent) {
19982
20563
  }));
19983
20564
  }
19984
20565
  function buildUpdatedSkillProposals(entry, artifactId, deployedFiles) {
19985
- if (!artifactId) return [];
20566
+ if (!artifactId) return { proposals: [], skippedReason: null };
19986
20567
  const proposals = [];
19987
20568
  const base = {
19988
20569
  artefactId: artifactId,
@@ -19996,7 +20577,10 @@ function buildUpdatedSkillProposals(entry, artifactId, deployedFiles) {
19996
20577
  logWarningConsole(
19997
20578
  `Skipping "${entry.artifactName}" \u2014 failed to parse local skill content.`
19998
20579
  );
19999
- return [];
20580
+ return {
20581
+ proposals: [],
20582
+ skippedReason: "failed to parse local skill content"
20583
+ };
20000
20584
  }
20001
20585
  const normalizedEntryPath = normalizePath2(entry.filePath);
20002
20586
  const skillMdFile = deployedFiles.find((f) => {
@@ -20025,7 +20609,10 @@ function buildUpdatedSkillProposals(entry, artifactId, deployedFiles) {
20025
20609
  logWarningConsole(
20026
20610
  `Skipping "${entry.artifactName}" \u2014 deployed SKILL.md content not found.`
20027
20611
  );
20028
- return [];
20612
+ return {
20613
+ proposals: [],
20614
+ skippedReason: "deployed SKILL.md content not found"
20615
+ };
20029
20616
  }
20030
20617
  const deployedHelperFiles = deployedFiles.filter((f) => {
20031
20618
  const normalized = normalizePath2(f.path);
@@ -20099,7 +20686,7 @@ function buildUpdatedSkillProposals(entry, artifactId, deployedFiles) {
20099
20686
  });
20100
20687
  }
20101
20688
  }
20102
- return proposals;
20689
+ return { proposals, skippedReason: null };
20103
20690
  }
20104
20691
  function buildRemovedProposals(entry, artifactId, lockFile) {
20105
20692
  const typeMap = {
@@ -20126,8 +20713,18 @@ function findDeployedContentForPath(filePath, deployedFiles) {
20126
20713
  const match = deployedFiles.find((f) => normalizePath2(f.path) === normalized);
20127
20714
  return match?.content ?? null;
20128
20715
  }
20716
+ function toSkippedEntry(entry, reason) {
20717
+ return {
20718
+ artifactName: entry.artifactName,
20719
+ artifactType: entry.artifactType,
20720
+ filePath: entry.filePath,
20721
+ spaceId: entry.spaceId,
20722
+ reason
20723
+ };
20724
+ }
20129
20725
  async function buildProposals(changes, getTargetContext) {
20130
20726
  const proposals = [];
20727
+ const skipped = [];
20131
20728
  const updateSources = /* @__PURE__ */ new Map();
20132
20729
  for (const entry of changes) {
20133
20730
  const ctx = await getTargetContext(entry);
@@ -20155,6 +20752,7 @@ async function buildProposals(changes, getTargetContext) {
20155
20752
  logWarningConsole(
20156
20753
  `Skipping "${entry.artifactName}" \u2014 artifact not found in lock file.`
20157
20754
  );
20755
+ skipped.push(toSkippedEntry(entry, "artifact not found in lock file"));
20158
20756
  continue;
20159
20757
  }
20160
20758
  proposals.push(...buildRemovedProposals(entry, artifactId, ctx.lockFile));
@@ -20167,6 +20765,7 @@ async function buildProposals(changes, getTargetContext) {
20167
20765
  logWarningConsole(
20168
20766
  `Skipping "${entry.artifactName}" \u2014 artifact not found in lock file. Try running a deploy first.`
20169
20767
  );
20768
+ skipped.push(toSkippedEntry(entry, "artifact not found in lock file"));
20170
20769
  continue;
20171
20770
  }
20172
20771
  const existing = updateSources.get(artifactId);
@@ -20192,6 +20791,7 @@ async function buildProposals(changes, getTargetContext) {
20192
20791
  logWarningConsole(
20193
20792
  `Skipping "${entry.artifactName}" \u2014 deployed content unavailable. Run \`packmind pull\` to sync before submitting updates.`
20194
20793
  );
20794
+ skipped.push(toSkippedEntry(entry, "deployed content unavailable"));
20195
20795
  continue;
20196
20796
  }
20197
20797
  switch (entry.artifactType) {
@@ -20209,11 +20809,18 @@ async function buildProposals(changes, getTargetContext) {
20209
20809
  ...buildUpdatedCommandProposals(entry, artifactId, deployedContent)
20210
20810
  );
20211
20811
  break;
20212
- case "skill":
20213
- proposals.push(
20214
- ...buildUpdatedSkillProposals(entry, artifactId, ctx.deployedFiles)
20812
+ case "skill": {
20813
+ const skillResult = buildUpdatedSkillProposals(
20814
+ entry,
20815
+ artifactId,
20816
+ ctx.deployedFiles
20215
20817
  );
20818
+ proposals.push(...skillResult.proposals);
20819
+ if (skillResult.skippedReason) {
20820
+ skipped.push(toSkippedEntry(entry, skillResult.skippedReason));
20821
+ }
20216
20822
  break;
20823
+ }
20217
20824
  }
20218
20825
  }
20219
20826
  }
@@ -20223,7 +20830,7 @@ async function buildProposals(changes, getTargetContext) {
20223
20830
  conflicts.push(source);
20224
20831
  }
20225
20832
  }
20226
- return { proposals, conflicts };
20833
+ return { proposals, conflicts, skipped };
20227
20834
  }
20228
20835
 
20229
20836
  // apps/cli/src/infra/commands/playbook/submit/skillDescriptionValidator.ts
@@ -20413,10 +21020,11 @@ async function playbookSubmitHandler(deps) {
20413
21020
  cwd,
20414
21021
  packmindCliHexa
20415
21022
  });
20416
- const { proposals: allProposals, conflicts } = await buildProposals(
20417
- changes,
20418
- resolver.getTargetContext
20419
- );
21023
+ const {
21024
+ proposals: allProposals,
21025
+ conflicts,
21026
+ skipped
21027
+ } = await buildProposals(changes, resolver.getTargetContext);
20420
21028
  const descriptionErrors = validateProposalSkillDescriptions(allProposals);
20421
21029
  if (descriptionErrors.length > 0) {
20422
21030
  for (const error of descriptionErrors) {
@@ -20438,6 +21046,24 @@ Only one agent version can be submitted at a time. Use "playbook unstage" to rem
20438
21046
  exit(1);
20439
21047
  return;
20440
21048
  }
21049
+ if (skipped.length > 0) {
21050
+ for (const entry of skipped) {
21051
+ logErrorConsole(
21052
+ `Could not prepare ${capitalize(entry.artifactType)} "${entry.artifactName}" (${entry.filePath}): ${entry.reason}.`
21053
+ );
21054
+ }
21055
+ const readyCount = allProposals.length;
21056
+ if (readyCount > 0) {
21057
+ logWarningConsole(
21058
+ `${readyCount} other change${readyCount !== 1 ? "s were" : " was"} ready but nothing was submitted \u2014 the whole batch is blocked.`
21059
+ );
21060
+ }
21061
+ logInfoConsole(
21062
+ "Your staged changes were kept. Fix the issue above (for stale deployed content, run `packmind pull` to sync), or drop the affected change with `packmind playbook unstage <path>`, then retry."
21063
+ );
21064
+ exit(1);
21065
+ return;
21066
+ }
20441
21067
  if (allProposals.length === 0) {
20442
21068
  logConsole(
20443
21069
  "Nothing to submit \u2014 no changes detected compared to deployed versions."
@@ -20685,9 +21311,9 @@ Only one agent version can be submitted at a time. Use "playbook unstage" to rem
20685
21311
 
20686
21312
  // apps/cli/src/infra/utils/editorMessage.ts
20687
21313
  var import_child_process3 = require("child_process");
20688
- var import_fs24 = require("fs");
21314
+ var import_fs27 = require("fs");
20689
21315
  var import_os2 = require("os");
20690
- var import_path5 = require("path");
21316
+ var import_path8 = require("path");
20691
21317
 
20692
21318
  // apps/cli/src/infra/utils/resolveEditor.ts
20693
21319
  var which = __toESM(require("which"));
@@ -20726,20 +21352,20 @@ var EDITOR_TEMPLATE = `
20726
21352
  `;
20727
21353
  function openEditorForMessage(prefill) {
20728
21354
  const editor = resolveEditor();
20729
- const tmpFile = (0, import_path5.join)((0, import_os2.tmpdir)(), `packmind-msg-${Date.now()}.txt`);
21355
+ const tmpFile = (0, import_path8.join)((0, import_os2.tmpdir)(), `packmind-msg-${Date.now()}.txt`);
20730
21356
  try {
20731
- (0, import_fs24.writeFileSync)(tmpFile, prefill ?? EDITOR_TEMPLATE, "utf-8");
21357
+ (0, import_fs27.writeFileSync)(tmpFile, prefill ?? EDITOR_TEMPLATE, "utf-8");
20732
21358
  const result = (0, import_child_process3.spawnSync)(editor, [tmpFile], {
20733
21359
  stdio: "inherit"
20734
21360
  });
20735
21361
  if (result.status !== 0) {
20736
21362
  throw new Error(`Editor exited with status ${result.status}`);
20737
21363
  }
20738
- const content = (0, import_fs24.readFileSync)(tmpFile, "utf-8");
21364
+ const content = (0, import_fs27.readFileSync)(tmpFile, "utf-8");
20739
21365
  return content.split("\n").filter((line) => !line.startsWith("#")).join("\n").trim();
20740
21366
  } finally {
20741
21367
  try {
20742
- (0, import_fs24.unlinkSync)(tmpFile);
21368
+ (0, import_fs27.unlinkSync)(tmpFile);
20743
21369
  } catch {
20744
21370
  }
20745
21371
  }
@@ -20758,17 +21384,17 @@ function safeOpenEditor(prefill) {
20758
21384
  }
20759
21385
 
20760
21386
  // apps/cli/src/infra/commands/playbook/SubmitCommand.ts
20761
- var submitPlaybookCommand = (0, import_cmd_ts28.command)({
21387
+ var submitPlaybookCommand = (0, import_cmd_ts31.command)({
20762
21388
  name: "submit",
20763
21389
  description: "Submit staged changes as proposals",
20764
21390
  args: {
20765
- message: (0, import_cmd_ts28.option)({
20766
- type: (0, import_cmd_ts28.optional)(import_cmd_ts28.string),
21391
+ message: (0, import_cmd_ts31.option)({
21392
+ type: (0, import_cmd_ts31.optional)(import_cmd_ts31.string),
20767
21393
  long: "message",
20768
21394
  short: "m",
20769
21395
  description: "Message describing the intent behind the proposed changes"
20770
21396
  }),
20771
- noReview: (0, import_cmd_ts28.flag)({
21397
+ noReview: (0, import_cmd_ts31.flag)({
20772
21398
  long: "no-review",
20773
21399
  description: "Apply changes directly without creating proposals for review"
20774
21400
  })
@@ -20791,27 +21417,27 @@ var submitPlaybookCommand = (0, import_cmd_ts28.command)({
20791
21417
  message,
20792
21418
  noReview,
20793
21419
  openEditor: safeOpenEditor,
20794
- unlinkSync: (p) => (0, import_fs25.unlinkSync)(p),
20795
- rmSync: (p, opts) => (0, import_fs25.rmSync)(p, opts)
21420
+ unlinkSync: (p) => (0, import_fs28.unlinkSync)(p),
21421
+ rmSync: (p, opts) => (0, import_fs28.rmSync)(p, opts)
20796
21422
  });
20797
21423
  }
20798
21424
  });
20799
21425
 
20800
21426
  // apps/cli/src/infra/commands/playbook/DiffCommand.ts
20801
- var import_cmd_ts29 = __toESM(require_cjs());
20802
- var diffCommand2 = (0, import_cmd_ts29.command)({
21427
+ var import_cmd_ts32 = __toESM(require_cjs());
21428
+ var diffCommand2 = (0, import_cmd_ts32.command)({
20803
21429
  name: "diff",
20804
21430
  description: "Show differences between local command files and server content",
20805
21431
  args: {
20806
- includeSubmitted: (0, import_cmd_ts29.flag)({
21432
+ includeSubmitted: (0, import_cmd_ts32.flag)({
20807
21433
  long: "include-submitted",
20808
21434
  description: "Include already submitted changes in the output"
20809
21435
  }),
20810
- path: (0, import_cmd_ts29.option)({
21436
+ path: (0, import_cmd_ts32.option)({
20811
21437
  long: "path",
20812
21438
  short: "p",
20813
21439
  description: "Path to analyze (relative to current directory)",
20814
- type: (0, import_cmd_ts29.optional)(import_cmd_ts29.string)
21440
+ type: (0, import_cmd_ts32.optional)(import_cmd_ts32.string)
20815
21441
  })
20816
21442
  },
20817
21443
  handler: async ({ includeSubmitted, path: path37 }) => {
@@ -20829,7 +21455,7 @@ var diffCommand2 = (0, import_cmd_ts29.command)({
20829
21455
  });
20830
21456
 
20831
21457
  // apps/cli/src/infra/commands/PlaybookCommand.ts
20832
- var playbookCommand = (0, import_cmd_ts30.subcommands)({
21458
+ var playbookCommand = (0, import_cmd_ts33.subcommands)({
20833
21459
  name: "playbook",
20834
21460
  description: "Manage local playbook files and propose changes to your team",
20835
21461
  cmds: {
@@ -20843,10 +21469,10 @@ var playbookCommand = (0, import_cmd_ts30.subcommands)({
20843
21469
  });
20844
21470
 
20845
21471
  // apps/cli/src/infra/commands/SpacesCommand.ts
20846
- var import_cmd_ts32 = __toESM(require_cjs());
21472
+ var import_cmd_ts35 = __toESM(require_cjs());
20847
21473
 
20848
21474
  // apps/cli/src/infra/commands/ListSpacesCommand.ts
20849
- var import_cmd_ts31 = __toESM(require_cjs());
21475
+ var import_cmd_ts34 = __toESM(require_cjs());
20850
21476
 
20851
21477
  // apps/cli/src/infra/commands/spaces/listSpacesHandler.ts
20852
21478
  function displaySpace(space) {
@@ -20882,7 +21508,7 @@ async function listSpacesHandler(deps) {
20882
21508
  }
20883
21509
 
20884
21510
  // apps/cli/src/infra/commands/ListSpacesCommand.ts
20885
- var listSpacesCommand = (0, import_cmd_ts31.command)({
21511
+ var listSpacesCommand = (0, import_cmd_ts34.command)({
20886
21512
  name: "list",
20887
21513
  description: "List available spaces in the organization",
20888
21514
  args: {},
@@ -20897,7 +21523,7 @@ var listSpacesCommand = (0, import_cmd_ts31.command)({
20897
21523
  });
20898
21524
 
20899
21525
  // apps/cli/src/infra/commands/SpacesCommand.ts
20900
- var spacesCommand = (0, import_cmd_ts32.subcommands)({
21526
+ var spacesCommand = (0, import_cmd_ts35.subcommands)({
20901
21527
  name: "spaces",
20902
21528
  description: "Manage spaces in your Packmind organization",
20903
21529
  cmds: {
@@ -20906,17 +21532,17 @@ var spacesCommand = (0, import_cmd_ts32.subcommands)({
20906
21532
  });
20907
21533
 
20908
21534
  // apps/cli/src/infra/commands/config/ConfigCommand.ts
20909
- var import_cmd_ts38 = __toESM(require_cjs());
21535
+ var import_cmd_ts41 = __toESM(require_cjs());
20910
21536
 
20911
21537
  // apps/cli/src/infra/commands/config/ConfigAgentsCommand.ts
20912
- var import_cmd_ts37 = __toESM(require_cjs());
21538
+ var import_cmd_ts40 = __toESM(require_cjs());
20913
21539
 
20914
21540
  // apps/cli/src/infra/commands/config/ConfigAgentsAddCommand.ts
20915
- var readline4 = __toESM(require("readline"));
20916
- var import_cmd_ts34 = __toESM(require_cjs());
21541
+ var readline5 = __toESM(require("readline"));
21542
+ var import_cmd_ts37 = __toESM(require_cjs());
20917
21543
 
20918
21544
  // apps/cli/src/infra/commands/customParameters/AgentNamesPositional.ts
20919
- var import_cmd_ts33 = __toESM(require_cjs());
21545
+ var import_cmd_ts36 = __toESM(require_cjs());
20920
21546
 
20921
21547
  // apps/cli/src/infra/commands/customParameters/AgentArgType.ts
20922
21548
  var VALID_AGENTS = Object.keys(CodingAgents).filter(
@@ -20935,7 +21561,7 @@ var AgentArgType = {
20935
21561
  };
20936
21562
 
20937
21563
  // apps/cli/src/infra/commands/customParameters/AgentNamesPositional.ts
20938
- var agentNamesPositional = (0, import_cmd_ts33.restPositionals)({
21564
+ var agentNamesPositional = (0, import_cmd_ts36.restPositionals)({
20939
21565
  type: AgentArgType,
20940
21566
  displayName: "agents",
20941
21567
  description: "Agent identifiers (e.g. claude cursor)"
@@ -21031,7 +21657,7 @@ To restore organization settings later, remove all local agents with: packmind-c
21031
21657
  // apps/cli/src/infra/commands/config/ConfigAgentsAddCommand.ts
21032
21658
  function createPromptConfirm() {
21033
21659
  return (message) => new Promise((resolve16) => {
21034
- const rl = readline4.createInterface({
21660
+ const rl = readline5.createInterface({
21035
21661
  input: process.stdin,
21036
21662
  output: process.stdout
21037
21663
  });
@@ -21041,12 +21667,12 @@ function createPromptConfirm() {
21041
21667
  });
21042
21668
  });
21043
21669
  }
21044
- var addAgentsCommand = (0, import_cmd_ts34.command)({
21670
+ var addAgentsCommand = (0, import_cmd_ts37.command)({
21045
21671
  name: "add",
21046
21672
  description: "Add coding agents to packmind.json files",
21047
21673
  args: {
21048
- path: (0, import_cmd_ts34.option)({
21049
- type: import_cmd_ts34.string,
21674
+ path: (0, import_cmd_ts37.option)({
21675
+ type: import_cmd_ts37.string,
21050
21676
  short: "p",
21051
21677
  long: "path",
21052
21678
  defaultValue: () => "",
@@ -21072,7 +21698,7 @@ var addAgentsCommand = (0, import_cmd_ts34.command)({
21072
21698
  });
21073
21699
 
21074
21700
  // apps/cli/src/infra/commands/config/ConfigAgentsListCommand.ts
21075
- var import_cmd_ts35 = __toESM(require_cjs());
21701
+ var import_cmd_ts38 = __toESM(require_cjs());
21076
21702
 
21077
21703
  // apps/cli/src/infra/commands/config/agents/listAgentsHandler.ts
21078
21704
  var SOURCE_LABELS = {
@@ -21152,12 +21778,12 @@ async function listAgentsHandler(args2, deps) {
21152
21778
  }
21153
21779
 
21154
21780
  // apps/cli/src/infra/commands/config/ConfigAgentsListCommand.ts
21155
- var listAgentsCommand = (0, import_cmd_ts35.command)({
21781
+ var listAgentsCommand = (0, import_cmd_ts38.command)({
21156
21782
  name: "list",
21157
21783
  description: "List coding agents configured across packmind.json files",
21158
21784
  args: {
21159
- path: (0, import_cmd_ts35.option)({
21160
- type: import_cmd_ts35.string,
21785
+ path: (0, import_cmd_ts38.option)({
21786
+ type: import_cmd_ts38.string,
21161
21787
  short: "p",
21162
21788
  long: "path",
21163
21789
  defaultValue: () => "",
@@ -21181,7 +21807,7 @@ var listAgentsCommand = (0, import_cmd_ts35.command)({
21181
21807
  });
21182
21808
 
21183
21809
  // apps/cli/src/infra/commands/config/ConfigAgentsRemoveCommand.ts
21184
- var import_cmd_ts36 = __toESM(require_cjs());
21810
+ var import_cmd_ts39 = __toESM(require_cjs());
21185
21811
 
21186
21812
  // apps/cli/src/infra/commands/config/agents/removeAgentsHandler.ts
21187
21813
  async function removeAgentsHandler(args2, deps) {
@@ -21264,13 +21890,13 @@ function logConfiguredAgentsHint(configuredAgents) {
21264
21890
  }
21265
21891
 
21266
21892
  // apps/cli/src/infra/commands/config/ConfigAgentsRemoveCommand.ts
21267
- var removeAgentsCommand = (0, import_cmd_ts36.command)({
21893
+ var removeAgentsCommand = (0, import_cmd_ts39.command)({
21268
21894
  name: "rm",
21269
21895
  aliases: ["remove"],
21270
21896
  description: "Remove coding agents from packmind.json files",
21271
21897
  args: {
21272
- path: (0, import_cmd_ts36.option)({
21273
- type: import_cmd_ts36.string,
21898
+ path: (0, import_cmd_ts39.option)({
21899
+ type: import_cmd_ts39.string,
21274
21900
  short: "p",
21275
21901
  long: "path",
21276
21902
  defaultValue: () => "",
@@ -21292,7 +21918,7 @@ var removeAgentsCommand = (0, import_cmd_ts36.command)({
21292
21918
  });
21293
21919
 
21294
21920
  // apps/cli/src/infra/commands/config/ConfigAgentsCommand.ts
21295
- var configAgentsSetupCommand = (0, import_cmd_ts37.command)({
21921
+ var configAgentsSetupCommand = (0, import_cmd_ts40.command)({
21296
21922
  name: "setup",
21297
21923
  description: "Configure which coding agents to generate artifacts for",
21298
21924
  args: {},
@@ -21310,7 +21936,7 @@ var configAgentsSetupCommand = (0, import_cmd_ts37.command)({
21310
21936
  });
21311
21937
  }
21312
21938
  });
21313
- var configAgentsCommand = (0, import_cmd_ts37.subcommands)({
21939
+ var configAgentsCommand = (0, import_cmd_ts40.subcommands)({
21314
21940
  name: "agents",
21315
21941
  description: "Manage coding agents configuration",
21316
21942
  cmds: {
@@ -21322,7 +21948,7 @@ var configAgentsCommand = (0, import_cmd_ts37.subcommands)({
21322
21948
  });
21323
21949
 
21324
21950
  // apps/cli/src/infra/commands/config/ConfigCommand.ts
21325
- var configCommand = (0, import_cmd_ts38.subcommands)({
21951
+ var configCommand = (0, import_cmd_ts41.subcommands)({
21326
21952
  name: "config",
21327
21953
  description: "Manage Packmind configuration",
21328
21954
  cmds: {
@@ -21331,9 +21957,9 @@ var configCommand = (0, import_cmd_ts38.subcommands)({
21331
21957
  });
21332
21958
 
21333
21959
  // apps/cli/src/infra/commands/InitCommand.ts
21334
- var import_cmd_ts39 = __toESM(require_cjs());
21960
+ var import_cmd_ts42 = __toESM(require_cjs());
21335
21961
  var { version: CLI_VERSION5 } = require_package();
21336
- var initCommand = (0, import_cmd_ts39.command)({
21962
+ var initCommand = (0, import_cmd_ts42.command)({
21337
21963
  name: "init",
21338
21964
  description: "Initialize Packmind in the current project",
21339
21965
  args: {},
@@ -21362,13 +21988,13 @@ var initCommand = (0, import_cmd_ts39.command)({
21362
21988
  });
21363
21989
 
21364
21990
  // apps/cli/src/infra/commands/UpdateCommand.ts
21365
- var import_cmd_ts40 = __toESM(require_cjs());
21991
+ var import_cmd_ts43 = __toESM(require_cjs());
21366
21992
  var { version: CLI_VERSION6 } = require_package();
21367
- var updateCommand = (0, import_cmd_ts40.command)({
21993
+ var updateCommand = (0, import_cmd_ts43.command)({
21368
21994
  name: "update",
21369
21995
  description: "Update packmind-cli to the latest version",
21370
21996
  args: {
21371
- check: (0, import_cmd_ts40.flag)({
21997
+ check: (0, import_cmd_ts43.flag)({
21372
21998
  long: "check",
21373
21999
  description: "Only check if a newer version is available without performing the update"
21374
22000
  })
@@ -21426,7 +22052,7 @@ if (args.includes("--version") || args.includes("-v")) {
21426
22052
  logConsole(`packmind-cli version ${CLI_VERSION7}`);
21427
22053
  process.exit(0);
21428
22054
  }
21429
- var app = (0, import_cmd_ts41.subcommands)({
22055
+ var app = (0, import_cmd_ts44.subcommands)({
21430
22056
  name: "packmind-cli",
21431
22057
  description: "Packmind CLI tool",
21432
22058
  cmds: {
@@ -21439,6 +22065,7 @@ var app = (0, import_cmd_ts41.subcommands)({
21439
22065
  login: loginCommand,
21440
22066
  logout: logoutCommand,
21441
22067
  packages: packagesCommand,
22068
+ plugins: pluginsCommand,
21442
22069
  playbook: playbookCommand,
21443
22070
  skills: skillsCommand,
21444
22071
  spaces: spacesCommand,
@@ -21448,7 +22075,7 @@ var app = (0, import_cmd_ts41.subcommands)({
21448
22075
  whoami: whoamiCommand
21449
22076
  }
21450
22077
  });
21451
- (0, import_cmd_ts41.run)(app, args).catch((error) => {
22078
+ (0, import_cmd_ts44.run)(app, args).catch((error) => {
21452
22079
  logErrorConsole(error.message);
21453
22080
  process.exit(1);
21454
22081
  });