@packmind/cli 0.34.1 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/main.cjs +354 -134
  2. package/package.json +3 -1
package/main.cjs CHANGED
@@ -2243,7 +2243,7 @@ var require_common = __commonJS({
2243
2243
  createDebug.coerce = coerce;
2244
2244
  createDebug.disable = disable;
2245
2245
  createDebug.enable = enable;
2246
- createDebug.enabled = enabled;
2246
+ createDebug.enabled = enabled2;
2247
2247
  createDebug.humanize = require_ms();
2248
2248
  createDebug.destroy = destroy;
2249
2249
  Object.keys(env2).forEach((key) => {
@@ -2382,7 +2382,7 @@ var require_common = __commonJS({
2382
2382
  createDebug.enable("");
2383
2383
  return namespaces;
2384
2384
  }
2385
- function enabled(name) {
2385
+ function enabled2(name) {
2386
2386
  for (const skip of createDebug.skips) {
2387
2387
  if (matchesTemplate(name, skip)) {
2388
2388
  return false;
@@ -3858,7 +3858,7 @@ var require_package = __commonJS({
3858
3858
  "apps/cli/package.json"(exports2, module2) {
3859
3859
  module2.exports = {
3860
3860
  name: "@packmind/cli",
3861
- version: "0.34.1",
3861
+ version: "0.35.0",
3862
3862
  description: "A command-line interface for Packmind linting and code quality checks",
3863
3863
  private: false,
3864
3864
  bin: {
@@ -3933,6 +3933,24 @@ var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
3933
3933
  LogLevel2["SILLY"] = "silly";
3934
3934
  return LogLevel2;
3935
3935
  })(LogLevel || {});
3936
+ function formatConsoleLine(info) {
3937
+ const { timestamp, level, message, label, trace_id: traceId } = info;
3938
+ const meta = Object.fromEntries(
3939
+ Object.entries(info).filter(([key]) => !RENDERED_FIELDS.includes(key))
3940
+ );
3941
+ const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : "";
3942
+ const traceStr = traceId ? ` [trace=${String(traceId).slice(0, 8)}]` : "";
3943
+ return `${timestamp} [${label}]${traceStr} ${level}: ${message}${metaStr}`;
3944
+ }
3945
+ var RENDERED_FIELDS = [
3946
+ "timestamp",
3947
+ "level",
3948
+ "message",
3949
+ "label",
3950
+ "trace_id",
3951
+ "span_id",
3952
+ "trace_flags"
3953
+ ];
3936
3954
  var PackmindLogger = class {
3937
3955
  constructor(name, level = "info" /* INFO */) {
3938
3956
  this.name = name;
@@ -3955,12 +3973,7 @@ var PackmindLogger = class {
3955
3973
  new import_winston.default.transports.Console({
3956
3974
  format: import_winston.default.format.combine(
3957
3975
  import_winston.default.format.colorize(),
3958
- import_winston.default.format.printf(
3959
- ({ timestamp, level: level2, message, label, ...meta }) => {
3960
- const metaStr = Object.keys(meta).length ? ` ${JSON.stringify(meta)}` : "";
3961
- return `${timestamp} [${label}] ${level2}: ${message}${metaStr}`;
3962
- }
3963
- )
3976
+ import_winston.default.format.printf(formatConsoleLine)
3964
3977
  )
3965
3978
  })
3966
3979
  ]
@@ -4088,7 +4101,8 @@ var VALID_CODING_AGENTS = [
4088
4101
  "gitlab_duo",
4089
4102
  "continue",
4090
4103
  "opencode",
4091
- "codex"
4104
+ "codex",
4105
+ "kiro"
4092
4106
  ];
4093
4107
  function isValidCodingAgent(value) {
4094
4108
  return VALID_CODING_AGENTS.includes(value);
@@ -4141,7 +4155,8 @@ var AGENT_CAPABILITIES = {
4141
4155
  copilot: { skills: true, standards: true, commands: true, recipes: true },
4142
4156
  continue: { skills: false, standards: true, commands: true, recipes: true },
4143
4157
  junie: { skills: false, standards: true, commands: true, recipes: true },
4144
- opencode: { skills: true, standards: true, commands: true, recipes: true }
4158
+ opencode: { skills: true, standards: true, commands: true, recipes: true },
4159
+ kiro: { skills: true, standards: true, commands: false, recipes: false }
4145
4160
  };
4146
4161
  function hasCapableAgent(agents, capability) {
4147
4162
  return agents.some((agent) => AGENT_CAPABILITIES[agent][capability]);
@@ -4164,7 +4179,8 @@ var CodingAgents = {
4164
4179
  gitlab_duo: "gitlab_duo",
4165
4180
  continue: "continue",
4166
4181
  opencode: "opencode",
4167
- codex: "codex"
4182
+ codex: "codex",
4183
+ kiro: "kiro"
4168
4184
  };
4169
4185
 
4170
4186
  // packages/types/src/coding-agent/CodingAgentArtefactPaths.ts
@@ -4213,6 +4229,11 @@ var CODING_AGENT_ARTEFACT_PATHS = {
4213
4229
  command: "",
4214
4230
  standard: "",
4215
4231
  skill: ".agents/skills/"
4232
+ },
4233
+ kiro: {
4234
+ command: "",
4235
+ standard: ".kiro/steering/",
4236
+ skill: ".kiro/skills/"
4216
4237
  }
4217
4238
  };
4218
4239
 
@@ -4393,7 +4414,8 @@ var RENDER_MODE_ORDER = [
4393
4414
  "COPILOT_PLUGIN" /* COPILOT_PLUGIN */,
4394
4415
  "CURSOR" /* CURSOR */,
4395
4416
  "GITLAB_DUO" /* GITLAB_DUO */,
4396
- "CONTINUE" /* CONTINUE */
4417
+ "CONTINUE" /* CONTINUE */,
4418
+ "KIRO" /* KIRO */
4397
4419
  ];
4398
4420
  var normalizeRenderModes = (modes) => {
4399
4421
  const uniqueModes = new Set(modes);
@@ -4424,7 +4446,8 @@ var RENDER_MODE_TO_CODING_AGENT = {
4424
4446
  ["CURSOR" /* CURSOR */]: CodingAgents.cursor,
4425
4447
  ["GITLAB_DUO" /* GITLAB_DUO */]: CodingAgents.gitlab_duo,
4426
4448
  ["CONTINUE" /* CONTINUE */]: CodingAgents.continue,
4427
- ["CODEX" /* CODEX */]: CodingAgents.codex
4449
+ ["CODEX" /* CODEX */]: CodingAgents.codex,
4450
+ ["KIRO" /* KIRO */]: CodingAgents.kiro
4428
4451
  };
4429
4452
  var CODING_AGENT_TO_RENDER_MODE = Object.entries(RENDER_MODE_TO_CODING_AGENT).reduce(
4430
4453
  (acc, [renderMode, codingAgent]) => {
@@ -5966,7 +5989,45 @@ var path3 = __toESM(require("path"));
5966
5989
 
5967
5990
  // apps/cli/src/infra/utils/consoleLogger.ts
5968
5991
  init_source();
5969
- var CLI_PREFIX = "packmind-cli";
5992
+
5993
+ // apps/cli/src/infra/utils/execName.ts
5994
+ var CANONICAL_EXEC_NAME = "packmind";
5995
+ var LEGACY_EXEC_NAME = "packmind-cli";
5996
+ var KNOWN_EXEC_NAMES = [
5997
+ LEGACY_EXEC_NAME,
5998
+ CANONICAL_EXEC_NAME
5999
+ ];
6000
+ var BUNFS_PREFIX = "/$bunfs/";
6001
+ function basenameWithoutExeExtension(candidate) {
6002
+ const basename4 = candidate.split(/[/\\]/).pop() ?? "";
6003
+ return basename4.replace(/\.exe$/i, "");
6004
+ }
6005
+ function matchKnownExecName(candidate) {
6006
+ if (candidate.includes(BUNFS_PREFIX)) {
6007
+ return void 0;
6008
+ }
6009
+ const name = basenameWithoutExeExtension(candidate).toLowerCase();
6010
+ return KNOWN_EXEC_NAMES.find((known) => known === name);
6011
+ }
6012
+ function resolveExecName(argv = process.argv, argv0 = process.argv0) {
6013
+ for (const candidate of [argv0, argv[0], argv[1]]) {
6014
+ if (!candidate) {
6015
+ continue;
6016
+ }
6017
+ const name = matchKnownExecName(candidate);
6018
+ if (name) {
6019
+ return name;
6020
+ }
6021
+ }
6022
+ return CANONICAL_EXEC_NAME;
6023
+ }
6024
+ function isLegacyExecName(argv = process.argv, argv0 = process.argv0) {
6025
+ return resolveExecName(argv, argv0) === LEGACY_EXEC_NAME;
6026
+ }
6027
+ var EXEC_NAME = resolveExecName();
6028
+
6029
+ // apps/cli/src/infra/utils/consoleLogger.ts
6030
+ var CLI_PREFIX = EXEC_NAME;
5970
6031
  function logConsole(message, logger2 = console) {
5971
6032
  logger2.log(message);
5972
6033
  }
@@ -7439,7 +7500,8 @@ var DeploymentGateway = class {
7439
7500
  pluginRoot: command35.pluginRoot,
7440
7501
  pluginName: command35.pluginName,
7441
7502
  gitRemoteUrl: command35.gitRemoteUrl,
7442
- gitBranch: command35.gitBranch
7503
+ gitBranch: command35.gitBranch,
7504
+ targetVendor: command35.targetVendor
7443
7505
  }
7444
7506
  }
7445
7507
  );
@@ -9911,13 +9973,15 @@ var Cache = class _Cache {
9911
9973
  var ADD_CHANGE_PROPOSALS_IN_WEBAPP_FEATURE_KEY = "change-proposals-in-webapp";
9912
9974
  var ORGA_SPACE_MANAGEMENT_FEATURE_KEY = "orga-space-management";
9913
9975
  var SPACE_NAV_PLUGIN_FIRST_FEATURE_KEY = "space-nav-plugin-first";
9976
+ var COPILOT_MARKETPLACE_FEATURE_KEY = "copilot-marketplace";
9914
9977
  var DEFAULT_FEATURE_DOMAIN_MAP = {
9915
9978
  [ADD_CHANGE_PROPOSALS_IN_WEBAPP_FEATURE_KEY]: [
9916
9979
  "@packmind.com",
9917
9980
  "@promyze.com"
9918
9981
  ],
9919
9982
  [ORGA_SPACE_MANAGEMENT_FEATURE_KEY]: ["@packmind.com", "@promyze.com"],
9920
- [SPACE_NAV_PLUGIN_FIRST_FEATURE_KEY]: ["@packmind.com", "@promyze.com"]
9983
+ [SPACE_NAV_PLUGIN_FIRST_FEATURE_KEY]: ["@packmind.com", "@promyze.com"],
9984
+ [COPILOT_MARKETPLACE_FEATURE_KEY]: ["@packmind.com", "@promyze.com"]
9921
9985
  };
9922
9986
 
9923
9987
  // packages/node-utils/src/database/schemas.ts
@@ -9962,6 +10026,15 @@ var import_bullmq = require("bullmq");
9962
10026
  // packages/node-utils/src/jobs/infra/DelayedJobsFactory.ts
9963
10027
  var logger = new PackmindLogger("DelayedJobsFactory");
9964
10028
 
10029
+ // packages/node-utils/src/observability/withSpan.ts
10030
+ var import_api = require("@opentelemetry/api");
10031
+ var tracer = import_api.trace.getTracer("packmind");
10032
+
10033
+ // packages/node-utils/src/observability/instrumentMethods.ts
10034
+ var AsyncFunction = (async () => {
10035
+ }).constructor;
10036
+ var enabled = process.env["PACKMIND_OTEL_INSTRUMENT_METHODS"] !== "false";
10037
+
9965
10038
  // packages/node-utils/src/mail/SmtpMailService.ts
9966
10039
  var import_nodemailer = __toESM(require("nodemailer"));
9967
10040
 
@@ -10585,7 +10658,7 @@ var InstallUseCase = class {
10585
10658
  );
10586
10659
  }
10587
10660
  throw new Error(
10588
- "No packmind.json found in this directory. Run `packmind-cli install <@space/package>` first to install your packages."
10661
+ `No packmind.json found in this directory. Run \`${EXEC_NAME} install <@space/package>\` first to install your packages.`
10589
10662
  );
10590
10663
  }
10591
10664
  const effectiveLockFile = lockFile ?? {
@@ -11125,7 +11198,7 @@ var UninstallUseCase = class {
11125
11198
  );
11126
11199
  }
11127
11200
  throw new Error(
11128
- "No packmind.json found in this directory. Run `packmind-cli install <@space/package>` first to install your packages."
11201
+ `No packmind.json found in this directory. Run \`${EXEC_NAME} install <@space/package>\` first to install your packages.`
11129
11202
  );
11130
11203
  }
11131
11204
  const normalized = await normalizePackageSlugs(
@@ -11179,7 +11252,7 @@ function stripPrerelease(version2) {
11179
11252
  var SkillsInitBootstrapError = class extends Error {
11180
11253
  constructor() {
11181
11254
  super(
11182
- "Couldn't determine your organization's coding agents. Run `packmind init` to configure them interactively."
11255
+ `Couldn't determine your organization's coding agents. Run \`${EXEC_NAME} init\` to configure them interactively.`
11183
11256
  );
11184
11257
  this.isSkillsInitBootstrapError = true;
11185
11258
  this.name = "SkillsInitBootstrapError";
@@ -11887,6 +11960,7 @@ var import_stream = require("stream");
11887
11960
  var import_semver3 = __toESM(require("semver"));
11888
11961
  var GITHUB_REPO = "PackmindHub/packmind";
11889
11962
  var NPM_PACKAGE = "@packmind/cli";
11963
+ var RELEASE_ASSET_BASENAME = "packmind-cli";
11890
11964
  function getPlatformAssetSuffix(platform, arch) {
11891
11965
  const osMap = {
11892
11966
  linux: "linux",
@@ -11898,8 +11972,12 @@ function getPlatformAssetSuffix(platform, arch) {
11898
11972
  throw new Error(`Unsupported platform: ${platform}`);
11899
11973
  }
11900
11974
  const archName = platform === "darwin" && arch === "x64" ? "x64-baseline" : arch;
11975
+ return `${osName}-${archName}`;
11976
+ }
11977
+ function getReleaseAssetName(platform, arch, version2) {
11978
+ const platformSuffix = getPlatformAssetSuffix(platform, arch);
11901
11979
  const ext = platform === "win32" ? ".exe" : "";
11902
- return `${osName}-${archName}${ext}`;
11980
+ return `${RELEASE_ASSET_BASENAME}-${platformSuffix}-${version2}${ext}`;
11903
11981
  }
11904
11982
  async function fetchLatestVersionFromNpm(fetchFn) {
11905
11983
  const res = await fetchFn(`https://registry.npmjs.org/${NPM_PACKAGE}/latest`);
@@ -11933,8 +12011,7 @@ async function fetchLatestVersionFromGitHub(fetchFn) {
11933
12011
  }
11934
12012
  return cliReleases[0].version;
11935
12013
  }
11936
- async function downloadExecutable(fetchFn, version2, platformSuffix, targetPath) {
11937
- const assetName = `packmind-cli-${platformSuffix}-${version2}`;
12014
+ async function downloadExecutable(fetchFn, version2, assetName, targetPath) {
11938
12015
  const url = `https://github.com/${GITHUB_REPO}/releases/download/release-cli/${version2}/${assetName}`;
11939
12016
  logInfoConsole(`Downloading ${assetName}...`);
11940
12017
  const res = await fetchFn(url, { redirect: "follow" });
@@ -11961,27 +12038,62 @@ URL: ${url}`
11961
12038
  `Downloaded successfully (${(stats.size / 1048576).toFixed(1)} MB)`
11962
12039
  );
11963
12040
  }
11964
- function createForwardCompatSymlink(currentPath, platform) {
11965
- const dir = import_path2.default.dirname(currentPath);
11966
- const ext = platform === "win32" ? ".exe" : "";
11967
- const primaryName = `packmind-cli${ext}`;
11968
- const aliasName = `packmind${ext}`;
11969
- const currentBasename = import_path2.default.basename(currentPath);
11970
- if (currentBasename !== primaryName) {
11971
- return;
12041
+ function basenameOf(candidate) {
12042
+ return candidate.split(/[/\\]/).pop() ?? "";
12043
+ }
12044
+ function isManagedExecFileName(executablePath) {
12045
+ const basename4 = basenameOf(executablePath).replace(/\.exe$/i, "");
12046
+ return basename4 === CANONICAL_EXEC_NAME || basename4 === LEGACY_EXEC_NAME;
12047
+ }
12048
+ function resolveUpdateTargetPath(executablePath, platform) {
12049
+ if (!isManagedExecFileName(executablePath)) {
12050
+ return executablePath;
11972
12051
  }
11973
- const targetName = primaryName;
11974
- const symlinkName = aliasName;
11975
- const symlinkPath = import_path2.default.join(dir, symlinkName);
12052
+ const ext = platform === "win32" ? ".exe" : "";
12053
+ return import_path2.default.join(
12054
+ import_path2.default.dirname(executablePath),
12055
+ `${CANONICAL_EXEC_NAME}${ext}`
12056
+ );
12057
+ }
12058
+ function unlinkIfSymlink(targetPath) {
11976
12059
  try {
11977
- (0, import_fs19.unlinkSync)(symlinkPath);
12060
+ if ((0, import_fs19.lstatSync)(targetPath).isSymbolicLink()) {
12061
+ (0, import_fs19.unlinkSync)(targetPath);
12062
+ }
11978
12063
  } catch {
11979
12064
  }
11980
- try {
11981
- (0, import_fs19.symlinkSync)(targetName, symlinkPath);
12065
+ }
12066
+ function createLegacyExecAlias(canonicalPath, platform, runningExecutablePath) {
12067
+ const dir = import_path2.default.dirname(canonicalPath);
12068
+ const ext = platform === "win32" ? ".exe" : "";
12069
+ const canonicalName = `${CANONICAL_EXEC_NAME}${ext}`;
12070
+ const legacyName = `${LEGACY_EXEC_NAME}${ext}`;
12071
+ const legacyPath = import_path2.default.join(dir, legacyName);
12072
+ if (platform === "win32" && runningExecutablePath && basenameOf(runningExecutablePath).toLowerCase() === legacyName.toLowerCase()) {
11982
12073
  logInfoConsole(
11983
- `Created forward-compatible symlink: ${symlinkPath} -> ${targetName}`
12074
+ `Kept ${legacyPath} as-is: Windows cannot replace a running executable.
12075
+ Re-run the installer, or delete ${legacyName} manually, to finish switching to ${canonicalName}.`
11984
12076
  );
12077
+ return false;
12078
+ }
12079
+ const stagedPath = `${legacyPath}.new-alias`;
12080
+ try {
12081
+ removeIfPresent(stagedPath);
12082
+ (0, import_fs19.symlinkSync)(canonicalName, stagedPath);
12083
+ (0, import_fs19.renameSync)(stagedPath, legacyPath);
12084
+ logInfoConsole(`Created legacy alias: ${legacyPath} -> ${canonicalName}`);
12085
+ return true;
12086
+ } catch {
12087
+ removeIfPresent(stagedPath);
12088
+ logWarningConsole(
12089
+ `Could not create legacy alias: ${legacyPath} -> ${canonicalName} (non-critical)`
12090
+ );
12091
+ return false;
12092
+ }
12093
+ }
12094
+ function removeIfPresent(targetPath) {
12095
+ try {
12096
+ (0, import_fs19.unlinkSync)(targetPath);
11985
12097
  } catch {
11986
12098
  }
11987
12099
  }
@@ -11991,17 +12103,48 @@ function updateViaNpm(version2) {
11991
12103
  stdio: "inherit"
11992
12104
  });
11993
12105
  }
12106
+ function checkTargetBeforeReplacing(targetPath, executablePath) {
12107
+ if (targetPath === executablePath) {
12108
+ return;
12109
+ }
12110
+ let entry;
12111
+ try {
12112
+ entry = (0, import_fs19.lstatSync)(targetPath);
12113
+ } catch {
12114
+ return;
12115
+ }
12116
+ if (entry.isSymbolicLink()) {
12117
+ return;
12118
+ }
12119
+ if (!entry.isFile()) {
12120
+ throw new Error(
12121
+ `Cannot install at ${targetPath}: it already exists and is not a file.`
12122
+ );
12123
+ }
12124
+ logWarningConsole(`Replacing the existing file at ${targetPath}`);
12125
+ }
11994
12126
  async function updateViaExecutableReplace(deps, version2) {
11995
- const platformSuffix = getPlatformAssetSuffix(deps.platform, deps.arch);
11996
- const currentPath = deps.executablePath;
11997
- const tempPath = currentPath + ".update-tmp";
12127
+ const assetName = getReleaseAssetName(deps.platform, deps.arch, version2);
12128
+ const targetPath = resolveUpdateTargetPath(
12129
+ deps.executablePath,
12130
+ deps.platform
12131
+ );
12132
+ const tempPath = targetPath + ".update-tmp";
11998
12133
  try {
11999
- await downloadExecutable(deps.fetchFn, version2, platformSuffix, tempPath);
12000
- (0, import_fs19.renameSync)(tempPath, currentPath);
12134
+ checkTargetBeforeReplacing(targetPath, deps.executablePath);
12135
+ await downloadExecutable(deps.fetchFn, version2, assetName, tempPath);
12136
+ unlinkIfSymlink(targetPath);
12137
+ (0, import_fs19.renameSync)(tempPath, targetPath);
12001
12138
  if (deps.platform !== "win32") {
12002
- (0, import_fs19.chmodSync)(currentPath, 493);
12139
+ (0, import_fs19.chmodSync)(targetPath, 493);
12003
12140
  }
12004
- createForwardCompatSymlink(currentPath, deps.platform);
12141
+ const aliasCreated = isManagedExecFileName(deps.executablePath) && createLegacyExecAlias(targetPath, deps.platform, deps.executablePath);
12142
+ const legacyName = `${LEGACY_EXEC_NAME}${deps.platform === "win32" ? ".exe" : ""}`;
12143
+ const invokedIsLegacyName = basenameOf(deps.executablePath).toLowerCase() === legacyName.toLowerCase();
12144
+ return {
12145
+ targetPath,
12146
+ invokedExecutableUpdated: targetPath === deps.executablePath || aliasCreated && invokedIsLegacyName
12147
+ };
12005
12148
  } catch (error) {
12006
12149
  try {
12007
12150
  (0, import_fs19.unlinkSync)(tempPath);
@@ -12022,6 +12165,21 @@ function isHomebrewInstall(executablePath) {
12022
12165
  return false;
12023
12166
  }
12024
12167
  }
12168
+ function resolveUpdateFailureMessage(message, platform) {
12169
+ if (platform === "win32") {
12170
+ const isReplaceBlocked = message.includes("EPERM") || message.includes("EBUSY") || message.includes("EACCES") || message.includes("permission denied");
12171
+ if (!isReplaceBlocked) {
12172
+ return `Update failed: ${message}`;
12173
+ }
12174
+ return `Update failed: ${message}
12175
+ Could not replace the executable. Close any other running ${CANONICAL_EXEC_NAME} process, then re-run '${EXEC_NAME} update' from an Administrator terminal.`;
12176
+ }
12177
+ if (message.includes("EACCES") || message.includes("permission denied")) {
12178
+ return `Permission denied. Try running with sudo:
12179
+ sudo ${EXEC_NAME} update`;
12180
+ }
12181
+ return `Update failed: ${message}`;
12182
+ }
12025
12183
  async function updateHandler(deps) {
12026
12184
  const execBasename = import_path2.default.basename(deps.executablePath).replace(/\.exe$/, "");
12027
12185
  const jsRuntimes = ["node", "bun", "deno"];
@@ -12048,6 +12206,11 @@ async function updateHandler(deps) {
12048
12206
  logInfoConsole(
12049
12207
  `Current version: ${deps.currentVersion} (${deps.isExecutableMode ? "standalone executable" : "npm package"})`
12050
12208
  );
12209
+ if (isLegacyExecName()) {
12210
+ logInfoConsole(
12211
+ `The '${CANONICAL_EXEC_NAME}' executable is the one being updated; '${LEGACY_EXEC_NAME}' points to it.`
12212
+ );
12213
+ }
12051
12214
  let latestVersion;
12052
12215
  try {
12053
12216
  latestVersion = deps.isExecutableMode ? await fetchLatestVersionFromGitHub(deps.fetchFn) : await fetchLatestVersionFromNpm(deps.fetchFn);
@@ -12071,26 +12234,29 @@ async function updateHandler(deps) {
12071
12234
  return;
12072
12235
  }
12073
12236
  try {
12074
- if (deps.isExecutableMode) {
12075
- await updateViaExecutableReplace(deps, latestVersion);
12076
- } else {
12237
+ if (!deps.isExecutableMode) {
12077
12238
  updateViaNpm(latestVersion);
12239
+ logConsole("");
12240
+ logSuccessConsole(`Updated to v${latestVersion}`);
12241
+ return;
12078
12242
  }
12243
+ const outcome = await updateViaExecutableReplace(deps, latestVersion);
12079
12244
  logConsole("");
12080
- logSuccessConsole(`Updated to v${latestVersion}`);
12081
- if (deps.isExecutableMode) {
12082
- logInfoConsole(`Binary location: ${deps.executablePath}`);
12245
+ if (outcome.invokedExecutableUpdated) {
12246
+ logSuccessConsole(`Updated to v${latestVersion}`);
12247
+ } else {
12248
+ const invokedName = basenameOf(deps.executablePath);
12249
+ const targetName = basenameOf(outcome.targetPath);
12250
+ logSuccessConsole(`Updated ${targetName} to v${latestVersion}`);
12251
+ logWarningConsole(
12252
+ `${invokedName} was NOT updated and still runs v${deps.currentVersion}.
12253
+ Run '${CANONICAL_EXEC_NAME}' from now on, or re-run the installer to replace ${invokedName}.`
12254
+ );
12083
12255
  }
12256
+ logInfoConsole(`Binary location: ${outcome.targetPath}`);
12084
12257
  } catch (error) {
12085
12258
  const message = error instanceof Error ? error.message : String(error);
12086
- if (message.includes("EACCES") || message.includes("permission denied")) {
12087
- logErrorConsole(
12088
- `Permission denied. Try running with sudo:
12089
- sudo packmind-cli update`
12090
- );
12091
- } else {
12092
- logErrorConsole(`Update failed: ${message}`);
12093
- }
12259
+ logErrorConsole(resolveUpdateFailureMessage(message, deps.platform));
12094
12260
  process.exit(1);
12095
12261
  }
12096
12262
  }
@@ -12260,7 +12426,7 @@ var ConfigFileRepository = class {
12260
12426
  );
12261
12427
  if (invalidAgents.length > 0) {
12262
12428
  logWarningConsole(
12263
- `Invalid agent(s) in ${configPath}: ${invalidAgents.join(", ")}. Valid agents are: packmind, junie, claude, cursor, copilot, agents_md, gitlab_duo, continue`
12429
+ `Invalid agent(s) in ${configPath}: ${invalidAgents.join(", ")}. Valid agents are: ${VALID_CODING_AGENTS.join(", ")}`
12264
12430
  );
12265
12431
  }
12266
12432
  const config = {
@@ -13443,6 +13609,10 @@ var DEPLOYER_PARSERS = [
13443
13609
  parse: parseContinueStandard
13444
13610
  },
13445
13611
  { pattern: ".github/instructions/packmind-", parse: parseCopilotStandard },
13612
+ {
13613
+ pattern: ".kiro/steering/packmind-standard-",
13614
+ parse: parseKiroStandard
13615
+ },
13446
13616
  // Home-install variant (e.g. `~/.claude`): the agent directory prefix is
13447
13617
  // stripped from on-disk and lockfile paths. Only Claude supports home-install
13448
13618
  // today, so an unprefixed `rules/packmind/standard-…` path is Claude-rendered.
@@ -13469,8 +13639,9 @@ var AGENT_PARSERS = {
13469
13639
  // single-file agent: standards can't be parsed individually
13470
13640
  opencode: () => null,
13471
13641
  // single-file agent: standards are embedded in AGENTS.md
13472
- codex: () => null
13642
+ codex: () => null,
13473
13643
  // single-file agent: standards are embedded in AGENTS.md
13644
+ kiro: parseKiroStandard
13474
13645
  };
13475
13646
  function parseStandardMdForAgent(content, agent) {
13476
13647
  return AGENT_PARSERS[agent](content);
@@ -13552,6 +13723,11 @@ function parseContinueStandard(content) {
13552
13723
  if (!parsed) return null;
13553
13724
  return addFrontmatterFields(parsed, frontmatter);
13554
13725
  }
13726
+ function parseKiroStandard(content) {
13727
+ const { frontmatter, body } = extractFrontmatter(content);
13728
+ const scope = extractScopeFromKey(frontmatter, "fileMatchPattern");
13729
+ return parseIdeStandardBody(body, scope);
13730
+ }
13555
13731
  function parseCopilotStandard(content) {
13556
13732
  const { frontmatter, body } = extractFrontmatter(content);
13557
13733
  const rawScope = extractFrontmatterValue(frontmatter, "applyTo");
@@ -13698,11 +13874,36 @@ function normalizeScopeValue(rawValue) {
13698
13874
  if (!rawValue) return "";
13699
13875
  if (rawValue.startsWith("[")) {
13700
13876
  const inner = rawValue.slice(1, -1);
13701
- const items = inner.split(",").map((item) => item.trim().replace(/(?:^["'])|(?:["']$)/g, ""));
13877
+ const items = splitOutsideBraces(inner).map(
13878
+ (item) => item.replace(/(?:^["'])|(?:["']$)/g, "")
13879
+ );
13702
13880
  return items.join(", ");
13703
13881
  }
13704
13882
  return rawValue.replace(/(?:^["'])|(?:["']$)/g, "");
13705
13883
  }
13884
+ function splitOutsideBraces(value) {
13885
+ const items = [];
13886
+ let current = "";
13887
+ let braceDepth = 0;
13888
+ for (const char of value) {
13889
+ if (char === "{") {
13890
+ braceDepth++;
13891
+ current += char;
13892
+ } else if (char === "}") {
13893
+ braceDepth--;
13894
+ current += char;
13895
+ } else if (char === "," && braceDepth === 0) {
13896
+ const trimmed2 = current.trim();
13897
+ if (trimmed2) items.push(trimmed2);
13898
+ current = "";
13899
+ } else {
13900
+ current += char;
13901
+ }
13902
+ }
13903
+ const trimmed = current.trim();
13904
+ if (trimmed) items.push(trimmed);
13905
+ return items;
13906
+ }
13706
13907
 
13707
13908
  // apps/cli/src/application/utils/ruleSimilarity.ts
13708
13909
  var DEFAULT_SIMILARITY_THRESHOLD = 0.5;
@@ -14152,7 +14353,7 @@ var SpaceService = class {
14152
14353
  // apps/cli/src/infra/repositories/CliOutput.ts
14153
14354
  init_source();
14154
14355
  var import_log_update = __toESM(require("log-update"));
14155
- var CLI_PREFIX2 = "packmind-cli";
14356
+ var CLI_PREFIX2 = EXEC_NAME;
14156
14357
  var CliFormatter = class {
14157
14358
  static success(message) {
14158
14359
  return `${source_default.bgGreen.bold(CLI_PREFIX2)} ${source_default.green.bold(message)}`;
@@ -14813,7 +15014,7 @@ var PackmindCliHexa = class {
14813
15014
  spaces = await this.getSpaces();
14814
15015
  } catch {
14815
15016
  logWarningConsole(
14816
- "Your Packmind instance is outdated and needs to be updated. It will not be supported in the v1 release of packmind-cli."
15017
+ "Your Packmind instance is outdated and needs to be updated. It will not be supported in the v1 release of the Packmind CLI."
14817
15018
  );
14818
15019
  return slugs;
14819
15020
  }
@@ -15050,7 +15251,7 @@ async function lintHandler(args2, deps) {
15050
15251
  );
15051
15252
  if (!hierarchicalConfig.hasConfigs) {
15052
15253
  throw new Error(
15053
- "No packmind.json config found. Run `packmind-cli install <some-package>` first to set up linting."
15254
+ `No packmind.json config found. Run \`${EXEC_NAME} install <some-package>\` first to set up linting.`
15054
15255
  );
15055
15256
  }
15056
15257
  const result = await packmindCliHexa.lintFilesFromConfig({
@@ -15063,13 +15264,13 @@ async function lintHandler(args2, deps) {
15063
15264
  } catch (error) {
15064
15265
  if (isNotLoggedInError(error) && continueOnMissingKey) {
15065
15266
  logWarningConsole(
15066
- "Warning: Not logged in to Packmind, linting is skipped. Run `packmind-cli login` to authenticate."
15267
+ `Warning: Not logged in to Packmind, linting is skipped. Run \`${EXEC_NAME} login\` to authenticate.`
15067
15268
  );
15068
15269
  exit(0);
15069
15270
  return;
15070
15271
  }
15071
15272
  if (error instanceof CommunityEditionError) {
15072
- logInfoConsole(`packmind-cli ${error.message}`);
15273
+ logInfoConsole(error.message);
15073
15274
  logInfoConsole("Linting skipped.");
15074
15275
  exit(0);
15075
15276
  return;
@@ -15454,7 +15655,7 @@ function buildIncapableArtifactsWarning(result) {
15454
15655
  ...mismatches.map(
15455
15656
  ({ noun, count, capable }) => ` - ${count} ${pluralize(noun, count)}: try ${formatCapableList(capable)}`
15456
15657
  ),
15457
- ` Run ${formatCommand("packmind-cli config agents")} to add a capable agent.`
15658
+ ` Run ${formatCommand(`${EXEC_NAME} config agents`)} to add a capable agent.`
15458
15659
  ];
15459
15660
  return lines.join("\n");
15460
15661
  }
@@ -15479,7 +15680,8 @@ var AGENT_ARTIFACT_CHECKS = [
15479
15680
  { agent: "agents_md", paths: ["AGENTS.md"] },
15480
15681
  { agent: "gitlab_duo", paths: [".gitlab/duo"] },
15481
15682
  { agent: "opencode", paths: [".opencode"] },
15482
- { agent: "codex", paths: [".agents/skills"], recursive: true }
15683
+ { agent: "codex", paths: [".agents/skills"], recursive: true },
15684
+ { agent: "kiro", paths: [".kiro"] }
15483
15685
  ];
15484
15686
  var AgentArtifactDetectionService = class {
15485
15687
  async detectAgentArtifacts(baseDirectory) {
@@ -15597,6 +15799,7 @@ var SELECTABLE_AGENTS = [
15597
15799
  "cursor",
15598
15800
  "gitlab_duo",
15599
15801
  "junie",
15802
+ "kiro",
15600
15803
  "opencode"
15601
15804
  ];
15602
15805
  var AGENT_DISPLAY_NAMES = {
@@ -15610,7 +15813,8 @@ var AGENT_DISPLAY_NAMES = {
15610
15813
  agents_md: "AGENTS.md",
15611
15814
  gitlab_duo: "GitLab Duo",
15612
15815
  opencode: "OpenCode",
15613
- codex: "Codex"
15816
+ codex: "Codex",
15817
+ kiro: "Kiro"
15614
15818
  };
15615
15819
  async function configAgentsHandler(deps) {
15616
15820
  const { configRepository, baseDirectory } = deps;
@@ -15747,7 +15951,7 @@ async function handleIncompatibleInstalledSkillsSilently(skills, baseDirectory)
15747
15951
  async function handleIncompatibleInstalledSkills(skills, baseDirectory, confirm) {
15748
15952
  const skillNames = skills.map((s) => s.skillName).join(", ");
15749
15953
  logWarningConsole(
15750
- `The following skill(s) are installed but are not compatible with this version of packmind-cli: ${skillNames}`
15954
+ `The following skill(s) are installed but are not compatible with this version of ${EXEC_NAME}: ${skillNames}`
15751
15955
  );
15752
15956
  logInfoConsole("These skills will be deleted.");
15753
15957
  const confirmed = await confirm();
@@ -15789,13 +15993,11 @@ function reportEnsureCliVersionOutcome(outcome, currentCliVersion) {
15789
15993
  switch (outcome.kind) {
15790
15994
  case "older":
15791
15995
  logWarningConsole(
15792
- `[packmind-cli] Your CLI version ${currentCliVersion} is older than the version recorded in packmind-lock.json (${outcome.lockVersion}). Please update your CLI.`
15996
+ `Your CLI version ${currentCliVersion} is older than the version recorded in packmind-lock.json (${outcome.lockVersion}). Please update your CLI.`
15793
15997
  );
15794
15998
  break;
15795
15999
  case "newer":
15796
- logInfoConsole(
15797
- "[packmind-cli] CLI upgrade detected \u2014 refreshing default skills."
15798
- );
16000
+ logInfoConsole("CLI upgrade detected \u2014 refreshing default skills.");
15799
16001
  break;
15800
16002
  case "match":
15801
16003
  case "no-lockfile":
@@ -15809,7 +16011,7 @@ function configuredAgentsSupportSkills(configuredAgents) {
15809
16011
  return hasCapableAgent(configuredAgents, "skills");
15810
16012
  }
15811
16013
  function buildSkillsSkippedWarning(configuredAgents) {
15812
- const configHint = formatCommand("packmind-cli config agents");
16014
+ const configHint = formatCommand(`${EXEC_NAME} config agents`);
15813
16015
  if (configuredAgents.length === 0) {
15814
16016
  return `Skipping default skills \u2014 no coding agents are configured. Run ${configHint} to add one (e.g. claude).`;
15815
16017
  }
@@ -15908,7 +16110,7 @@ async function initHandler(deps) {
15908
16110
  const totalFiles = result.filesCreated + result.filesUpdated;
15909
16111
  if (result.skippedSkillsCount > 0) {
15910
16112
  logWarningConsole(
15911
- `${result.skippedSkillsCount} skill(s) were skipped because they require a newer version of packmind-cli. Run "${formatCommand("packmind-cli update")}" to get the latest version.`
16113
+ `${result.skippedSkillsCount} skill(s) were skipped because they require a newer version of ${EXEC_NAME}. Run "${formatCommand(`${EXEC_NAME} update`)}" to get the latest version.`
15912
16114
  );
15913
16115
  }
15914
16116
  if (totalFiles === 0) {
@@ -16051,7 +16253,7 @@ async function bootstrapInstallContext(deps) {
16051
16253
  }
16052
16254
  if (!isTTY) {
16053
16255
  logWarningConsole(
16054
- "No packmind.json and no agent context detected \u2014 run `packmind-cli init` to configure."
16256
+ `No packmind.json and no agent context detected \u2014 run \`${EXEC_NAME} init\` to configure.`
16055
16257
  );
16056
16258
  return {
16057
16259
  configReady: false,
@@ -16319,7 +16521,7 @@ function reportDistributionTrackingDecision(decision, context) {
16319
16521
  if (decision.reason === "repo_not_tracked") {
16320
16522
  logWarningConsole(
16321
16523
  `Distribution not recorded \u2014 ${context.owner}/${context.repo} is not tracked in Packmind. Ask an admin to run ${formatCommand(
16322
- "packmind git track"
16524
+ `${EXEC_NAME} git track`
16323
16525
  )} to start tracking it.`
16324
16526
  );
16325
16527
  } else if (decision.reason === "detached_head") {
@@ -16329,7 +16531,7 @@ function reportDistributionTrackingDecision(decision, context) {
16329
16531
  } else if (decision.reason === "tracked_branch_gone") {
16330
16532
  logWarningConsole(
16331
16533
  `Distribution not recorded \u2014 the tracked branch '${decision.trackedBranch}' is not in this repository, so nothing is recorded anywhere. Ask an admin to run ${formatCommand(
16332
- "packmind git track --update"
16534
+ `${EXEC_NAME} git track --update`
16333
16535
  )} to move tracking to '${context.currentBranch}'.`
16334
16536
  );
16335
16537
  } else {
@@ -16762,7 +16964,8 @@ If the browser doesn't open, visit: ${normalizedHost}/cli-login?callback_url=${e
16762
16964
  logConsole(`
16763
16965
  Credentials saved to: ${result.credentialsPath}`);
16764
16966
  logConsole(
16765
- "\nYou can now use packmind-cli commands with your authenticated account."
16967
+ `
16968
+ You can now use ${EXEC_NAME} commands with your authenticated account.`
16766
16969
  );
16767
16970
  } catch (error) {
16768
16971
  if (error instanceof Error) {
@@ -16823,7 +17026,7 @@ function displayVersionNotice(result) {
16823
17026
  }
16824
17027
  logConsole("");
16825
17028
  logWarningConsole(
16826
- `Update available: ${result.currentVersion} \u2192 ${result.latestVersion} \u2014 run \`packmind-cli update\` to upgrade`
17029
+ `Update available: ${result.currentVersion} \u2192 ${result.latestVersion} \u2014 run \`${EXEC_NAME} update\` to upgrade`
16827
17030
  );
16828
17031
  }
16829
17032
 
@@ -16861,7 +17064,8 @@ Host: ${result.host}`);
16861
17064
  }
16862
17065
  logInfoConsole(`Source: ${result.source}`);
16863
17066
  if (result.isExpired) {
16864
- logConsole("\nRun `packmind-cli login` to re-authenticate.");
17067
+ logConsole(`
17068
+ Run \`${EXEC_NAME} login\` to re-authenticate.`);
16865
17069
  }
16866
17070
  }
16867
17071
  var whoamiCommand = (0, import_cmd_ts6.command)({
@@ -16879,7 +17083,7 @@ var whoamiCommand = (0, import_cmd_ts6.command)({
16879
17083
  logErrorConsole("Not authenticated");
16880
17084
  logConsole(
16881
17085
  `
16882
- No credentials found. Run \`packmind-cli login\` to authenticate.`
17086
+ No credentials found. Run \`${EXEC_NAME} login\` to authenticate.`
16883
17087
  );
16884
17088
  logConsole(`
16885
17089
  Credentials are loaded from (in order of priority):`);
@@ -16939,12 +17143,15 @@ var installDefaultSkillsCommand = (0, import_cmd_ts7.command)({
16939
17143
  logInfoConsole("Installing default skills...");
16940
17144
  const result = await packmindCliHexa.installDefaultSkills({
16941
17145
  includeBeta,
16942
- cliVersion: includeBeta ? void 0 : CLI_VERSION4,
17146
+ // Always report the real version: `includeBeta` already bypasses the
17147
+ // version filter on its own, and the version is what picks the
17148
+ // executable name the deployed skills tell the agent to run.
17149
+ cliVersion: CLI_VERSION4,
16943
17150
  baseDirectory
16944
17151
  });
16945
17152
  if (result.skippedSkillsCount > 0) {
16946
17153
  logWarningConsole(
16947
- `${result.skippedSkillsCount} skill(s) were skipped because they require a newer version of packmind-cli. Run "${formatCommand("packmind-cli update")}" to get the latest version.`
17154
+ `${result.skippedSkillsCount} skill(s) were skipped because they require a newer version of ${EXEC_NAME}. Run "${formatCommand(`${EXEC_NAME} update`)}" to get the latest version.`
16948
17155
  );
16949
17156
  }
16950
17157
  if (result.incompatibleInstalledSkills.length > 0) {
@@ -17464,7 +17671,7 @@ var createPackageCommand = (0, import_cmd_ts15.command)({
17464
17671
  logConsole(` ${formatLabel("Link:")} ${result.webappUrl}`);
17465
17672
  }
17466
17673
  logConsole(
17467
- ` ${formatLabel("Install:")} ${formatCommand(`packmind-cli install ${result.slug}`)}`
17674
+ ` ${formatLabel("Install:")} ${formatCommand(`${EXEC_NAME} install ${result.slug}`)}`
17468
17675
  );
17469
17676
  if (result.deduplicated) {
17470
17677
  logWarningConsole(
@@ -17619,7 +17826,7 @@ function resolvePackageRef(to, allSpaces, exit) {
17619
17826
  logInfoConsole(` --to @${s.slug}/${to.packageSlug}`);
17620
17827
  });
17621
17828
  logInfoConsole(
17622
- `Run \`packmind-cli packages list\` to see available packages per space.`
17829
+ `Run \`${EXEC_NAME} packages list\` to see available packages per space.`
17623
17830
  );
17624
17831
  exit(1);
17625
17832
  }
@@ -17643,7 +17850,7 @@ async function executeAddToPackage(pkgSlug, spaceSlug, itemType, itemSlugs, useC
17643
17850
  `${formatItemType(itemType, result.added.length)} ${formatItemList(result.added)} added to "${fullPackageSlug}"`
17644
17851
  );
17645
17852
  logSuccessConsole(
17646
- `Run ${formatCommand(`packmind-cli install ${fullPackageSlug}`)} to install the ${pluralize2(itemType, result.added.length)}`
17853
+ `Run ${formatCommand(`${EXEC_NAME} install ${fullPackageSlug}`)} to install the ${pluralize2(itemType, result.added.length)}`
17647
17854
  );
17648
17855
  }
17649
17856
  if (result.skipped.length) {
@@ -17658,7 +17865,7 @@ async function executeAddToPackage(pkgSlug, spaceSlug, itemType, itemSlugs, useC
17658
17865
  if (error instanceof ItemNotFoundError) {
17659
17866
  const spaceFlag = error.spaceSlug ? ` --space ${error.spaceSlug}` : "";
17660
17867
  const command35 = formatCommand(
17661
- `packmind-cli ${error.itemType}s list${spaceFlag}`
17868
+ `${EXEC_NAME} ${error.itemType}s list${spaceFlag}`
17662
17869
  );
17663
17870
  logInfoConsole(
17664
17871
  `Run \`${command35}\` to display available ${error.itemType}s`
@@ -17803,7 +18010,7 @@ ${availableSpaces}`
17803
18010
  scopedArtefacts,
17804
18011
  {
17805
18012
  content: "How to install a package:",
17806
- exampleCommand: `packmind-cli install ${firstSlug}`
18013
+ exampleCommand: `${EXEC_NAME} install ${firstSlug}`
17807
18014
  }
17808
18015
  );
17809
18016
  exit(0);
@@ -18079,6 +18286,7 @@ async function renderPluginHandler(args2, deps) {
18079
18286
  deps.exit(1);
18080
18287
  return;
18081
18288
  }
18289
+ const targetVendor = ctx.vendor === "copilot" ? "github" : "anthropic";
18082
18290
  const pluginName = args2.packageSlug.packageSlug;
18083
18291
  const packageSlug = displayableParsedPackageSlug(args2.packageSlug);
18084
18292
  const { gitRemoteUrl, gitBranch } = await resolveGitContext(
@@ -18087,7 +18295,6 @@ async function renderPluginHandler(args2, deps) {
18087
18295
  );
18088
18296
  if (ctx.mode === "marketplace") {
18089
18297
  const manifestPath = ctx.manifestPath;
18090
- const targetVendor = ctx.vendor === "copilot" ? "github" : "anthropic";
18091
18298
  let marketplace;
18092
18299
  try {
18093
18300
  marketplace = readMarketplace(manifestPath);
@@ -18159,7 +18366,7 @@ async function renderPluginHandler(args2, deps) {
18159
18366
  writeMarketplace(manifestPath, updated);
18160
18367
  deps.log(`Rendered ${response.files.length} files into ./${pluginRoot}`);
18161
18368
  reportSkippedStandards(deps, response.skippedStandardsCount);
18162
- deps.log("Updated .claude-plugin/marketplace.json");
18369
+ deps.log(`Updated ${(0, import_path6.relative)(cwd, manifestPath)}`);
18163
18370
  deps.exit(0);
18164
18371
  return;
18165
18372
  }
@@ -18187,7 +18394,8 @@ async function renderPluginHandler(args2, deps) {
18187
18394
  pluginRoot: "/",
18188
18395
  pluginName,
18189
18396
  gitRemoteUrl,
18190
- gitBranch
18397
+ gitBranch,
18398
+ targetVendor
18191
18399
  });
18192
18400
  writeFiles(cwd, response.files);
18193
18401
  deps.log(`Re-rendered ${response.files.length} files into ./`);
@@ -18199,7 +18407,7 @@ async function renderPluginHandler(args2, deps) {
18199
18407
  function reportSkippedStandards(deps, skippedStandardsCount) {
18200
18408
  if (skippedStandardsCount > 0) {
18201
18409
  deps.log(
18202
- `Skipped ${skippedStandardsCount} standards (not supported in Claude plugins).`
18410
+ `Skipped ${skippedStandardsCount} standards (not supported in plugins).`
18203
18411
  );
18204
18412
  }
18205
18413
  }
@@ -18230,7 +18438,7 @@ async function confirmOverwrite(message) {
18230
18438
  // apps/cli/src/infra/commands/plugins/RenderPluginCommand.ts
18231
18439
  var renderPluginCommand = (0, import_cmd_ts20.command)({
18232
18440
  name: "render",
18233
- description: "Render a Packmind package as a Claude plugin",
18441
+ description: "Render a Packmind package as a Claude Code or GitHub Copilot plugin",
18234
18442
  args: {
18235
18443
  packageSlug: (0, import_cmd_ts20.positional)({
18236
18444
  type: PackageSlugArgType,
@@ -18376,7 +18584,7 @@ var deletePluginCommand = (0, import_cmd_ts21.command)({
18376
18584
  // apps/cli/src/infra/commands/PluginsCommand.ts
18377
18585
  var pluginsCommand = (0, import_cmd_ts22.subcommands)({
18378
18586
  name: "plugins",
18379
- description: "Render Packmind packages as Claude plugins",
18587
+ description: "Render Packmind packages as Claude Code or GitHub Copilot plugins",
18380
18588
  cmds: {
18381
18589
  render: renderPluginCommand,
18382
18590
  delete: deletePluginCommand
@@ -19402,7 +19610,7 @@ ${formatSpaceList(allSpaces)}`
19402
19610
  message: `Multiple spaces found. Use --space to specify the target space:
19403
19611
  ${formatSpaceList(allSpaces)}
19404
19612
 
19405
- Example: packmind-cli playbook add --space ${allSpaces[0].slug} <path>`
19613
+ Example: ${EXEC_NAME} playbook add --space ${allSpaces[0].slug} <path>`
19406
19614
  };
19407
19615
  }
19408
19616
  }
@@ -19421,7 +19629,7 @@ Example: packmind-cli playbook add --space ${allSpaces[0].slug} <path>`
19421
19629
  status: "failed",
19422
19630
  filePath,
19423
19631
  message: `Cannot add this ${artifactType}: it is rendered for the "${codingAgent}" agent, which is not in your configured agents (${earlyLockFile.agents.join(", ")}).
19424
- 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.`
19632
+ This file is no longer managed by Packmind. Re-add "${codingAgent}" to your agents and run ${formatLabel(`${EXEC_NAME} install`)} to manage it again, or delete the file if it is no longer needed.`
19425
19633
  };
19426
19634
  }
19427
19635
  if (changeType === "updated" && existingLockEntry) {
@@ -19437,7 +19645,7 @@ This file is no longer managed by Packmind. Re-add "${codingAgent}" to your agen
19437
19645
  status: "failed",
19438
19646
  filePath,
19439
19647
  message: `"${artifactName}" is outdated (local: v${existingLockEntry.version}, remote: v${remoteVersion}).
19440
- Run ${formatLabel("packmind-cli install")} to update before making changes.`
19648
+ Run ${formatLabel(`${EXEC_NAME} install`)} to update before making changes.`
19441
19649
  };
19442
19650
  }
19443
19651
  } catch (err) {
@@ -19562,7 +19770,7 @@ async function playbookAddHandler(deps) {
19562
19770
  const { filePaths, exit, ...rest } = deps;
19563
19771
  if (filePaths.length === 0) {
19564
19772
  logErrorConsole(
19565
- "No path provided. Usage: packmind-cli playbook add <paths...>"
19773
+ `No path provided. Usage: ${EXEC_NAME} playbook add <paths...>`
19566
19774
  );
19567
19775
  exit(1);
19568
19776
  return;
@@ -19584,7 +19792,7 @@ async function playbookAddHandler(deps) {
19584
19792
  }
19585
19793
  if (stagedCount > 0) {
19586
19794
  logInfoConsole(
19587
- `Run ${formatLabel("packmind playbook submit")} when you're ready to publish your changes.`
19795
+ `Run ${formatLabel(`${EXEC_NAME} playbook submit`)} when you're ready to publish your changes.`
19588
19796
  );
19589
19797
  }
19590
19798
  exit(failedCount > 0 ? 1 : 0);
@@ -19656,7 +19864,7 @@ async function playbookRmHandler(deps) {
19656
19864
  } = deps;
19657
19865
  if (!filePath) {
19658
19866
  logErrorConsole(
19659
- "Missing file path. Usage: packmind-cli playbook rm <path>"
19867
+ `Missing file path. Usage: ${EXEC_NAME} playbook rm <path>`
19660
19868
  );
19661
19869
  exit(1);
19662
19870
  return;
@@ -19700,7 +19908,7 @@ async function playbookRmHandler(deps) {
19700
19908
  const codingAgent = lockResult.file.agent;
19701
19909
  if (artifactType === "skill" && isSkillSupportFile(absolutePath)) {
19702
19910
  logErrorConsole(
19703
- "Cannot remove an individual skill file. Point to the skill folder to remove the full skill, or manually delete the file and run `packmind playbook add <skill-folder>/` to stage the change."
19911
+ `Cannot remove an individual skill file. Point to the skill folder to remove the full skill, or manually delete the file and run \`${EXEC_NAME} playbook add <skill-folder>/\` to stage the change.`
19704
19912
  );
19705
19913
  exit(1);
19706
19914
  return;
@@ -19808,7 +20016,7 @@ async function playbookUnstageHandler(deps) {
19808
20016
  } = deps;
19809
20017
  if (!filePath) {
19810
20018
  logErrorConsole(
19811
- "Missing file path. Usage: packmind playbook unstage <path>"
20019
+ `Missing file path. Usage: ${EXEC_NAME} playbook unstage <path>`
19812
20020
  );
19813
20021
  exit(1);
19814
20022
  return;
@@ -20172,7 +20380,7 @@ async function playbookStatusHandler(deps) {
20172
20380
  );
20173
20381
  }
20174
20382
  logConsole("");
20175
- logConsole("Use `packmind playbook submit` to send them");
20383
+ logConsole(`Use \`${EXEC_NAME} playbook submit\` to send them`);
20176
20384
  }
20177
20385
  if (groupedUntracked.length > 0) {
20178
20386
  if (groupedStaged.length > 0) {
@@ -20187,7 +20395,7 @@ async function playbookStatusHandler(deps) {
20187
20395
  );
20188
20396
  }
20189
20397
  logConsole("");
20190
- logConsole("Use `packmind playbook add <path>` to track them");
20398
+ logConsole(`Use \`${EXEC_NAME} playbook add <path>\` to track them`);
20191
20399
  }
20192
20400
  if (groupedStaged.length === 0 && groupedUntracked.length === 0) {
20193
20401
  logConsole("No changes detected.");
@@ -20898,7 +21106,7 @@ async function buildProposals(changes, getTargetContext) {
20898
21106
  );
20899
21107
  if (!deployedContent && (entry.artifactType === "standard" || entry.artifactType === "command")) {
20900
21108
  logWarningConsole(
20901
- `Skipping "${entry.artifactName}" \u2014 deployed content unavailable. Run \`packmind pull\` to sync before submitting updates.`
21109
+ `Skipping "${entry.artifactName}" \u2014 deployed content unavailable. Run \`${EXEC_NAME} pull\` to sync before submitting updates.`
20902
21110
  );
20903
21111
  skipped.push(toSkippedEntry(entry, "deployed content unavailable"));
20904
21112
  continue;
@@ -21002,20 +21210,20 @@ function logPackageAddGuidance(created, packageSlugs) {
21002
21210
  logInfoConsole("To add the created artifact to a package, run:");
21003
21211
  if (standards.length === 1) {
21004
21212
  logInfoConsole(
21005
- ` ${formatCommand(`\`packmind-cli packages add --to ${pkgPlaceholder} --standard ${standards[0].slug}\``)}`
21213
+ ` ${formatCommand(`\`${EXEC_NAME} packages add --to ${pkgPlaceholder} --standard ${standards[0].slug}\``)}`
21006
21214
  );
21007
21215
  } else if (commands.length === 1) {
21008
21216
  logInfoConsole(
21009
- ` ${formatCommand(`\`packmind-cli packages add --to ${pkgPlaceholder} --command ${commands[0].slug}\``)}`
21217
+ ` ${formatCommand(`\`${EXEC_NAME} packages add --to ${pkgPlaceholder} --command ${commands[0].slug}\``)}`
21010
21218
  );
21011
21219
  } else if (skills.length === 1) {
21012
21220
  logInfoConsole(
21013
- ` ${formatCommand(`\`packmind-cli packages add --to ${pkgPlaceholder} --skill ${skills[0].slug}\``)}`
21221
+ ` ${formatCommand(`\`${EXEC_NAME} packages add --to ${pkgPlaceholder} --skill ${skills[0].slug}\``)}`
21014
21222
  );
21015
21223
  }
21016
21224
  } else {
21017
21225
  logInfoConsole(
21018
- `To add the created artifacts to a package, use ${formatCommand(`\`packmind-cli packages add --to ${pkgPlaceholder} --standard <artifact-slug>\``)} for each artifact.`
21226
+ `To add the created artifacts to a package, use ${formatCommand(`\`${EXEC_NAME} packages add --to ${pkgPlaceholder} --standard <artifact-slug>\``)} for each artifact.`
21019
21227
  );
21020
21228
  }
21021
21229
  if (packageSlugs.length > 1) {
@@ -21133,7 +21341,7 @@ async function playbookSubmitHandler(deps) {
21133
21341
  const reportSkippedConflicts = () => {
21134
21342
  if (conflictCount === 0) return;
21135
21343
  logInfoConsole(
21136
- `${conflictCount} change${conflictCount !== 1 ? "s were" : " was"} skipped and remain${conflictCount !== 1 ? "" : "s"} staged. Rename them and run \`packmind playbook submit\` again.`
21344
+ `${conflictCount} change${conflictCount !== 1 ? "s were" : " was"} skipped and remain${conflictCount !== 1 ? "" : "s"} staged. Rename them and run \`${EXEC_NAME} playbook submit\` again.`
21137
21345
  );
21138
21346
  };
21139
21347
  if (submittableChanges.length === 0) {
@@ -21208,7 +21416,7 @@ Only one agent version can be submitted at a time. Use "playbook unstage" to rem
21208
21416
  );
21209
21417
  }
21210
21418
  logInfoConsole(
21211
- "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."
21419
+ `Your staged changes were kept. Fix the issue above (for stale deployed content, run \`${EXEC_NAME} pull\` to sync), or drop the affected change with \`${EXEC_NAME} playbook unstage <path>\`, then retry.`
21212
21420
  );
21213
21421
  exit(1);
21214
21422
  return;
@@ -21274,7 +21482,8 @@ Only one agent version can be submitted at a time. Use "playbook unstage" to rem
21274
21482
  if (err.statusCode === 422) {
21275
21483
  logErrorConsole("Failed to apply changes: a conflict was detected.");
21276
21484
  logInfoConsole(
21277
- "This usually means the artifact was modified since your last pull.\nRun `packmind pull` to sync your local state, then retry."
21485
+ `This usually means the artifact was modified since your last pull.
21486
+ Run \`${EXEC_NAME} pull\` to sync your local state, then retry.`
21278
21487
  );
21279
21488
  } else {
21280
21489
  logErrorConsole(`Failed to apply changes: ${err.message}`);
@@ -21356,7 +21565,7 @@ Only one agent version can be submitted at a time. Use "playbook unstage" to rem
21356
21565
  if (isCommunityEditionError(error)) {
21357
21566
  logErrorConsole(error.message);
21358
21567
  logInfoConsole(
21359
- `Run ${formatCommand("`packmind-cli playbook submit --no-review`")} to apply changes directly.`
21568
+ `Run ${formatCommand(`\`${EXEC_NAME} playbook submit --no-review\``)} to apply changes directly.`
21360
21569
  );
21361
21570
  exit(1);
21362
21571
  return;
@@ -21435,7 +21644,7 @@ Only one agent version can be submitted at a time. Use "playbook unstage" to rem
21435
21644
  }
21436
21645
  if (succeededSpaces.length > 0) {
21437
21646
  logWarningConsole(
21438
- `Submitted to: ${succeededSpaces.map(displaySpace2).join(", ")}. Run 'packmind playbook submit' again to retry failed spaces.`
21647
+ `Submitted to: ${succeededSpaces.map(displaySpace2).join(", ")}. Run '${EXEC_NAME} playbook submit' again to retry failed spaces.`
21439
21648
  );
21440
21649
  }
21441
21650
  exit(1);
@@ -21738,7 +21947,7 @@ function formatSubmittedDate(isoDate) {
21738
21947
  function buildSubmittedFooter(submittedDiffs) {
21739
21948
  const proposalCount = submittedDiffs.length;
21740
21949
  const proposalWord = proposalCount === 1 ? "change proposal" : "change proposals";
21741
- return `${proposalCount} ${proposalWord} ignored, run \`packmind-cli diff --include-submitted\` to see what's waiting for validation`;
21950
+ return `${proposalCount} ${proposalWord} ignored, run \`${EXEC_NAME} playbook diff --include-submitted\` to see what's waiting for validation`;
21742
21951
  }
21743
21952
  async function findTargetDirectories(searchPath, packmindCliHexa) {
21744
21953
  const targets = [];
@@ -22208,7 +22417,7 @@ for these file(s). After this change:
22208
22417
  - Organization-level settings will NO LONGER apply to these file(s).
22209
22418
  - Any future changes to organization agents will NOT affect these file(s).
22210
22419
 
22211
- To restore organization settings later, remove all local agents with: packmind-cli config agents rm <agent1> <agent2> ...`;
22420
+ To restore organization settings later, remove all local agents with: ${EXEC_NAME} config agents rm <agent1> <agent2> ...`;
22212
22421
  logWarningConsole(message);
22213
22422
  const confirmed = await deps.promptConfirm("Do you want to proceed?");
22214
22423
  if (!confirmed) {
@@ -22238,7 +22447,7 @@ To restore organization settings later, remove all local agents with: packmind-c
22238
22447
  }
22239
22448
  if (anyUpdated) {
22240
22449
  logInfoConsole(
22241
- `Run "${formatCommand("packmind install")}" to apply changes and deploy agent artifacts.`
22450
+ `Run "${formatCommand(`${EXEC_NAME} install`)}" to apply changes and deploy agent artifacts.`
22242
22451
  );
22243
22452
  }
22244
22453
  exit(0);
@@ -22464,7 +22673,7 @@ async function removeAgentsHandler(args2, deps) {
22464
22673
  }
22465
22674
  if (anyUpdated) {
22466
22675
  logInfoConsole(
22467
- `Run "${formatCommand("packmind install")}" to apply changes and remove agent artifacts.`
22676
+ `Run "${formatCommand(`${EXEC_NAME} install`)}" to apply changes and remove agent artifacts.`
22468
22677
  );
22469
22678
  }
22470
22679
  exit(0);
@@ -22584,11 +22793,12 @@ var import_cmd_ts39 = __toESM(require_cjs());
22584
22793
 
22585
22794
  // apps/cli/src/infra/commands/removedCommandHandler.ts
22586
22795
  function reportRemovedCommand(notifyError, removedCommand, replacementCommand, carriedFlags = []) {
22587
- notifyError(`Command "packmind ${removedCommand}" has been removed.`, {
22796
+ notifyError(`Command "${EXEC_NAME} ${removedCommand}" has been removed.`, {
22588
22797
  content: `Use the "${replacementCommand}" command instead:`,
22589
- exampleCommand: [`packmind ${replacementCommand}`, ...carriedFlags].join(
22590
- " "
22591
- )
22798
+ exampleCommand: [
22799
+ `${EXEC_NAME} ${replacementCommand}`,
22800
+ ...carriedFlags
22801
+ ].join(" ")
22592
22802
  });
22593
22803
  }
22594
22804
  function removedTrackHandler(deps) {
@@ -22671,7 +22881,7 @@ var import_cmd_ts41 = __toESM(require_cjs());
22671
22881
  var { version: CLI_VERSION6 } = require_package();
22672
22882
  var updateCommand = (0, import_cmd_ts41.command)({
22673
22883
  name: "update",
22674
- description: "Update packmind-cli to the latest version",
22884
+ description: `Update ${CANONICAL_EXEC_NAME} to the latest version`,
22675
22885
  args: {
22676
22886
  check: (0, import_cmd_ts41.flag)({
22677
22887
  long: "check",
@@ -22735,9 +22945,9 @@ async function trackingInfoHandler(deps) {
22735
22945
  if (result.status === "not-tracked") {
22736
22946
  logInfoConsole(
22737
22947
  result.currentBranchDetached ? `${result.owner}/${result.repo} is not tracked in Packmind. No branch is checked out here \u2014 run ${formatCommand(
22738
- "packmind git track --branch <name>"
22948
+ `${EXEC_NAME} git track --branch <name>`
22739
22949
  )} to track one.` : `${result.owner}/${result.repo} is not tracked in Packmind. Run ${formatCommand(
22740
- "packmind git track"
22950
+ `${EXEC_NAME} git track`
22741
22951
  )} to track branch '${result.currentBranch}'.`
22742
22952
  );
22743
22953
  process.exit(0);
@@ -22752,7 +22962,7 @@ async function trackingInfoHandler(deps) {
22752
22962
  process.exit(0);
22753
22963
  }
22754
22964
  function mismatchWarning(result) {
22755
- const moveTracking = result.currentBranchDetached ? `${formatCommand("packmind git track --update --branch <name>")} to move tracking to a branch that exists` : `${formatCommand("packmind git track --update")} to move tracking to '${result.currentBranch}'`;
22965
+ const moveTracking = result.currentBranchDetached ? `${formatCommand(`${EXEC_NAME} git track --update --branch <name>`)} to move tracking to a branch that exists` : `${formatCommand(`${EXEC_NAME} git track --update`)} to move tracking to '${result.currentBranch}'`;
22756
22966
  if (!result.trackedBranchExists) {
22757
22967
  return `Branch '${result.trackedBranch}' is not in this repository \u2014 deleted after a merge, or never fetched here \u2014 so no distribution is recorded anywhere. Run ${moveTracking}, or ${formatCommand(
22758
22968
  "git fetch"
@@ -22834,14 +23044,14 @@ async function trackHandler(deps) {
22834
23044
  `Repository ${result.owner}/${result.repo} is already tracked on branch ${result.trackedBranch}. Run ${formatCommand(
22835
23045
  // `--update` alone moves tracking to the checked-out branch, which is
22836
23046
  // not the target when a branch was named explicitly.
22837
- deps.branch ? `packmind git track --update --branch ${result.branch}` : "packmind git track --update"
23047
+ deps.branch ? `${EXEC_NAME} git track --update --branch ${result.branch}` : `${EXEC_NAME} git track --update`
22838
23048
  )} to move it to ${result.branch}.`
22839
23049
  );
22840
23050
  process.exit(1);
22841
23051
  return;
22842
23052
  case "detached-head":
22843
23053
  logErrorConsole(
22844
- `No branch is checked out for ${result.owner}/${result.repo} \u2014 HEAD is detached. Check a branch out, or name one with ${formatCommand("packmind git track --branch <name>")}.`
23054
+ `No branch is checked out for ${result.owner}/${result.repo} \u2014 HEAD is detached. Check a branch out, or name one with ${formatCommand(`${EXEC_NAME} git track --branch <name>`)}.`
22845
23055
  );
22846
23056
  process.exit(1);
22847
23057
  return;
@@ -22853,7 +23063,7 @@ async function trackHandler(deps) {
22853
23063
  return;
22854
23064
  case "nothing-tracked":
22855
23065
  logErrorConsole(
22856
- `Nothing is tracked yet \u2014 run ${formatCommand("packmind init")} or ${formatCommand("packmind git track")} to start tracking.`
23066
+ `Nothing is tracked yet \u2014 run ${formatCommand(`${EXEC_NAME} init`)} or ${formatCommand(`${EXEC_NAME} git track`)} to start tracking.`
22857
23067
  );
22858
23068
  process.exit(1);
22859
23069
  return;
@@ -22958,7 +23168,17 @@ var gitCommand = (0, import_cmd_ts45.subcommands)({
22958
23168
  }
22959
23169
  });
22960
23170
 
23171
+ // apps/cli/src/infra/commands/legacyExecNameWarning.ts
23172
+ var LEGACY_EXEC_NAME_WARNING = `\`${LEGACY_EXEC_NAME}\` is deprecated and will stop receiving updates. Use \`${CANONICAL_EXEC_NAME}\` instead.`;
23173
+ function warnOnLegacyExecName(argv = process.argv, logWarning = logWarningConsole) {
23174
+ if (!isLegacyExecName(argv)) {
23175
+ return;
23176
+ }
23177
+ logWarning(LEGACY_EXEC_NAME_WARNING);
23178
+ }
23179
+
22961
23180
  // apps/cli/src/main.ts
23181
+ warnOnLegacyExecName();
22962
23182
  var { version: CLI_VERSION7 } = require_package();
22963
23183
  function findEnvFile() {
22964
23184
  const currentDir = process.cwd();
@@ -22994,11 +23214,11 @@ if (hasEmbeddedWasmFiles()) {
22994
23214
  }
22995
23215
  var args = process.argv.slice(2);
22996
23216
  if (args.includes("--version") || args.includes("-v")) {
22997
- logConsole(`packmind-cli version ${CLI_VERSION7}`);
23217
+ logConsole(`${EXEC_NAME} version ${CLI_VERSION7}`);
22998
23218
  process.exit(0);
22999
23219
  }
23000
23220
  var app = (0, import_cmd_ts46.subcommands)({
23001
- name: "packmind-cli",
23221
+ name: EXEC_NAME,
23002
23222
  description: "Packmind CLI tool",
23003
23223
  cmds: {
23004
23224
  commands: commandsCommand,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@packmind/cli",
3
- "version": "0.34.1",
3
+ "version": "0.35.0",
4
4
  "description": "A command-line interface for Packmind linting and code quality checks",
5
5
  "private": false,
6
6
  "bin": {
@@ -38,6 +38,8 @@
38
38
  "dependencies": {
39
39
  "@anthropic-ai/sdk": "0.78.0",
40
40
  "@google/genai": "1.52.0",
41
+ "@opentelemetry/api": "1.9.1",
42
+ "@opentelemetry/sdk-node": "0.221.0",
41
43
  "@types/archiver": "6.0.4",
42
44
  "@types/which": "3.0.4",
43
45
  "adm-zip": "0.6.0",