agents-inc 0.175.0 → 0.176.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 (81) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/dist/{chunk-EGC7PNDI.js → chunk-3F5LT433.js} +138 -41
  3. package/dist/chunk-3F5LT433.js.map +1 -0
  4. package/dist/chunk-5CFHP6Z5.js +109 -0
  5. package/dist/chunk-5CFHP6Z5.js.map +1 -0
  6. package/dist/{chunk-MFCZARV2.js → chunk-B7AVWSK2.js} +18 -8
  7. package/dist/chunk-B7AVWSK2.js.map +1 -0
  8. package/dist/{chunk-6HJVH27C.js → chunk-C2BSCEDN.js} +2 -2
  9. package/dist/{chunk-SNXEYAFP.js → chunk-CKBWEWHZ.js} +60 -30
  10. package/dist/chunk-CKBWEWHZ.js.map +1 -0
  11. package/dist/{chunk-SI2LLEIR.js → chunk-EC3JXT23.js} +4 -4
  12. package/dist/{chunk-YM3VEDAP.js → chunk-ENET4IF6.js} +440 -192
  13. package/dist/chunk-ENET4IF6.js.map +1 -0
  14. package/dist/{chunk-ICHWAFAC.js → chunk-FACDJH6O.js} +11 -104
  15. package/dist/chunk-FACDJH6O.js.map +1 -0
  16. package/dist/{chunk-P5XEK7HC.js → chunk-H6WUOW5F.js} +2 -2
  17. package/dist/{chunk-DQB3E2SX.js → chunk-JNRACLNS.js} +3 -3
  18. package/dist/{chunk-37QFHJUW.js → chunk-JTMSFBCA.js} +106 -28
  19. package/dist/chunk-JTMSFBCA.js.map +1 -0
  20. package/dist/{chunk-GNMRXXRY.js → chunk-MQZNDK5F.js} +3 -3
  21. package/dist/chunk-MQZNDK5F.js.map +1 -0
  22. package/dist/{chunk-SRII2GMF.js → chunk-SN64WNWE.js} +2 -2
  23. package/dist/{chunk-EHEBN4NB.js → chunk-U672FZVC.js} +2 -2
  24. package/dist/{chunk-TG3SPPZY.js → chunk-UE4Z3YMB.js} +1 -1
  25. package/dist/chunk-UE4Z3YMB.js.map +1 -0
  26. package/dist/{chunk-Q4NWATGH.js → chunk-XMQIWPIR.js} +58 -10
  27. package/dist/chunk-XMQIWPIR.js.map +1 -0
  28. package/dist/{chunk-YLFKFVQP.js → chunk-ZBI6GFJD.js} +2 -2
  29. package/dist/commands/build/marketplace.js +4 -3
  30. package/dist/commands/build/marketplace.js.map +1 -1
  31. package/dist/commands/build/plugins.js +6 -5
  32. package/dist/commands/build/plugins.js.map +1 -1
  33. package/dist/commands/compile.js +15 -11
  34. package/dist/commands/compile.js.map +1 -1
  35. package/dist/commands/doctor.js +38 -14
  36. package/dist/commands/doctor.js.map +1 -1
  37. package/dist/commands/edit.js +46 -25
  38. package/dist/commands/edit.js.map +1 -1
  39. package/dist/commands/eject.js +12 -8
  40. package/dist/commands/eject.js.map +1 -1
  41. package/dist/commands/init.js +15 -14
  42. package/dist/commands/list.js +8 -6
  43. package/dist/commands/list.js.map +1 -1
  44. package/dist/commands/new/marketplace.js +4 -3
  45. package/dist/commands/new/marketplace.js.map +1 -1
  46. package/dist/commands/search.js +13 -8
  47. package/dist/commands/search.js.map +1 -1
  48. package/dist/commands/share.js +14 -16
  49. package/dist/commands/share.js.map +1 -1
  50. package/dist/commands/uninstall.js +18 -14
  51. package/dist/commands/uninstall.js.map +1 -1
  52. package/dist/commands/update.js +97 -17
  53. package/dist/commands/update.js.map +1 -1
  54. package/dist/components/common/skill-agent-summary.js +3 -2
  55. package/dist/components/common/summary-panel.js +4 -3
  56. package/dist/hooks/init.js +15 -14
  57. package/dist/hooks/init.js.map +1 -1
  58. package/dist/load-agent-defs-5BSECHE6.js +14 -0
  59. package/dist/{recompile-project-agents-2QTFMYDC.js → recompile-project-agents-U3UGHPWG.js} +7 -7
  60. package/dist/{source-loader-I6SWWDUF.js → source-loader-E2Y5MMN5.js} +3 -3
  61. package/package.json +1 -1
  62. package/dist/chunk-37QFHJUW.js.map +0 -1
  63. package/dist/chunk-EGC7PNDI.js.map +0 -1
  64. package/dist/chunk-GNMRXXRY.js.map +0 -1
  65. package/dist/chunk-ICHWAFAC.js.map +0 -1
  66. package/dist/chunk-MFCZARV2.js.map +0 -1
  67. package/dist/chunk-Q4NWATGH.js.map +0 -1
  68. package/dist/chunk-SNXEYAFP.js.map +0 -1
  69. package/dist/chunk-TG3SPPZY.js.map +0 -1
  70. package/dist/chunk-YM3VEDAP.js.map +0 -1
  71. package/dist/load-agent-defs-BJ4KBKBA.js +0 -14
  72. /package/dist/{chunk-6HJVH27C.js.map → chunk-C2BSCEDN.js.map} +0 -0
  73. /package/dist/{chunk-SI2LLEIR.js.map → chunk-EC3JXT23.js.map} +0 -0
  74. /package/dist/{chunk-P5XEK7HC.js.map → chunk-H6WUOW5F.js.map} +0 -0
  75. /package/dist/{chunk-DQB3E2SX.js.map → chunk-JNRACLNS.js.map} +0 -0
  76. /package/dist/{chunk-SRII2GMF.js.map → chunk-SN64WNWE.js.map} +0 -0
  77. /package/dist/{chunk-EHEBN4NB.js.map → chunk-U672FZVC.js.map} +0 -0
  78. /package/dist/{chunk-YLFKFVQP.js.map → chunk-ZBI6GFJD.js.map} +0 -0
  79. /package/dist/{load-agent-defs-BJ4KBKBA.js.map → load-agent-defs-5BSECHE6.js.map} +0 -0
  80. /package/dist/{recompile-project-agents-2QTFMYDC.js.map → recompile-project-agents-U3UGHPWG.js.map} +0 -0
  81. /package/dist/{source-loader-I6SWWDUF.js.map → source-loader-E2Y5MMN5.js.map} +0 -0
@@ -6,16 +6,16 @@ import {
6
6
  editorPayloadForInstallation,
7
7
  publishSeedConfig,
8
8
  skillsAuthoredHere
9
- } from "../chunk-MFCZARV2.js";
9
+ } from "../chunk-B7AVWSK2.js";
10
10
  import {
11
11
  unofferablePlacementsFound
12
- } from "../chunk-YLFKFVQP.js";
12
+ } from "../chunk-ZBI6GFJD.js";
13
13
  import {
14
14
  openUrl
15
- } from "../chunk-P5XEK7HC.js";
15
+ } from "../chunk-H6WUOW5F.js";
16
16
  import {
17
17
  fetchSeedConfig
18
- } from "../chunk-SRII2GMF.js";
18
+ } from "../chunk-SN64WNWE.js";
19
19
  import {
20
20
  Confirm
21
21
  } from "../chunk-OZXAJNLA.js";
@@ -24,10 +24,10 @@ import {
24
24
  } from "../chunk-P6CYS4JK.js";
25
25
  import {
26
26
  summaryPanelBlock
27
- } from "../chunk-6HJVH27C.js";
27
+ } from "../chunk-C2BSCEDN.js";
28
28
  import {
29
29
  hostCompileNotices
30
- } from "../chunk-EHEBN4NB.js";
30
+ } from "../chunk-U672FZVC.js";
31
31
  import {
32
32
  compileAgentsAllScopes,
33
33
  compileProjectScope,
@@ -37,23 +37,22 @@ import {
37
37
  projectsAFanOutReaches,
38
38
  sayCapturedWarnings,
39
39
  writeProjectConfig
40
- } from "../chunk-SNXEYAFP.js";
40
+ } from "../chunk-CKBWEWHZ.js";
41
41
  import {
42
42
  copyLocalSkills,
43
43
  discoverInstalledSkills,
44
+ pluginRefsOf,
44
45
  removeCompiledAgents,
46
+ removeUnderFirstNameHeld,
45
47
  uninstallPluginSkills
46
- } from "../chunk-Q4NWATGH.js";
48
+ } from "../chunk-XMQIWPIR.js";
47
49
  import {
48
50
  loadAgentDefs
49
- } from "../chunk-DQB3E2SX.js";
50
- import "../chunk-SI2LLEIR.js";
51
- import "../chunk-GNMRXXRY.js";
51
+ } from "../chunk-JNRACLNS.js";
52
+ import "../chunk-EC3JXT23.js";
53
+ import "../chunk-MQZNDK5F.js";
52
54
  import "../chunk-KIK5EZYD.js";
53
- import {
54
- agentChangesAmong,
55
- formatScopeTag
56
- } from "../chunk-ICHWAFAC.js";
55
+ import "../chunk-5CFHP6Z5.js";
57
56
  import {
58
57
  BaseCommand,
59
58
  EXIT_CODES,
@@ -72,7 +71,12 @@ import {
72
71
  restoreInstalledGlobal,
73
72
  sameAssignments,
74
73
  writeExternalSkills
75
- } from "../chunk-37QFHJUW.js";
74
+ } from "../chunk-JTMSFBCA.js";
75
+ import {
76
+ agentChangesAmong,
77
+ formatScopeTag,
78
+ namedByActiveEntries
79
+ } from "../chunk-FACDJH6O.js";
76
80
  import {
77
81
  ERROR_MESSAGES,
78
82
  INCOMPLETE_WORK_RECOVERY,
@@ -95,6 +99,7 @@ import {
95
99
  getErrorMessage,
96
100
  holdsItsOwnInstallation,
97
101
  hostAt,
102
+ idNamesAnotherMarketplace,
98
103
  initProviderToNameAt,
99
104
  installingBesideGlobalCopies,
100
105
  isHomeDirectory,
@@ -116,13 +121,13 @@ import {
116
121
  stoppingOnARefusal,
117
122
  subAgentChanged,
118
123
  unplaceableKept
119
- } from "../chunk-YM3VEDAP.js";
124
+ } from "../chunk-ENET4IF6.js";
120
125
  import {
121
126
  getSkillById,
122
127
  getSkillDisplayName,
123
128
  getSkillEntryDisplayName,
124
129
  inertLine
125
- } from "../chunk-TG3SPPZY.js";
130
+ } from "../chunk-UE4Z3YMB.js";
126
131
  import {
127
132
  CLI_COLORS,
128
133
  CLI_INVOKE_COMMAND,
@@ -434,6 +439,7 @@ var Edit = class _Edit extends BaseCommand {
434
439
  async applySharedConfig(id, namedProvider) {
435
440
  const payload = await this.fetchSharedConfigOrFail(id, namedProvider);
436
441
  const context = await this.loadContextUnderSpinner();
442
+ this.sayWhenItNamesAnotherMarketplace(payload, context.sourceResult);
437
443
  const editRoot = resolveEditRoot(context.installation);
438
444
  await this.ensureSavedSkillsReadable(
439
445
  context.projectConfig?.skills ?? [],
@@ -539,6 +545,11 @@ var Edit = class _Edit extends BaseCommand {
539
545
  }
540
546
  return fetched.payload;
541
547
  }
548
+ /** An apply always reads the installation's own marketplace; one an id names is never fetched. */
549
+ sayWhenItNamesAnotherMarketplace({ marketplace: named }, { sourceConfig: { source: used } }) {
550
+ if (named === void 0 || named === used) return;
551
+ this.log(idNamesAnotherMarketplace(named, used));
552
+ }
542
553
  decodeSeedOrFail(payload, sourceMatrix) {
543
554
  try {
544
555
  return seedToInstallSelection(payload, sourceMatrix);
@@ -556,7 +567,13 @@ var Edit = class _Edit extends BaseCommand {
556
567
  async writeCarriedSkills(carried) {
557
568
  if (carried.length === 0) return;
558
569
  await writeExternalSkills(carried);
559
- this.log(carriedSkillsWritten(carried.map((skill) => skill.id)));
570
+ const recorded = carried.map(({ id, skill }) => ({ id, displayName: skill.displayName }));
571
+ this.log(
572
+ carriedSkillsWritten(
573
+ carried.map(({ id }) => id),
574
+ namedByActiveEntries(recorded)
575
+ )
576
+ );
560
577
  }
561
578
  /**
562
579
  * A destructive apply nobody can confirm must never become a yes. Asked only of a run that changes
@@ -620,7 +637,7 @@ var Edit = class _Edit extends BaseCommand {
620
637
  const outcome = await promptConfirm(({ onConfirm, onCancel }) => /* @__PURE__ */ jsx(Confirm, { message: SHARED_CONFIG_APPLY.CONFIRM, onConfirm, onCancel }));
621
638
  if (outcome === "confirmed") return;
622
639
  this.log("\nEdit cancelled");
623
- this.error("Cancelled", { exit: EXIT_CODES.CANCELLED });
640
+ this.exit(EXIT_CODES.CANCELLED);
624
641
  }
625
642
  /** `edit` rewrites the file, so it must not let a user curate a roster no command acts on. */
626
643
  async refuseUnofferablePlacements(cwd) {
@@ -1185,18 +1202,22 @@ async function migratePluginSkillScopes(pluginMoves, marketplace, projectDir) {
1185
1202
  const host = hostAt(projectDir);
1186
1203
  const failed = [];
1187
1204
  for (const move of pluginMoves) {
1188
- const pluginRef = buildMarketplacePluginRef(move.id, marketplace);
1189
1205
  try {
1190
- if (move.oldScope === "project") {
1191
- await host.uninstallPlugin(pluginRef, "project", projectDir);
1192
- }
1193
- await host.installPlugin(pluginRef, move.newScope, projectDir);
1206
+ await movePluginScope(host, move, marketplace, projectDir);
1194
1207
  } catch (error) {
1195
1208
  failed.push({ id: move.id, error: getErrorMessage(error) });
1196
1209
  }
1197
1210
  }
1198
1211
  return { failed };
1199
1212
  }
1213
+ async function movePluginScope(host, move, marketplace, projectDir) {
1214
+ if (move.oldScope === "project") {
1215
+ const oldRefs = pluginRefsOf(move.id, move.oldSource, marketplace);
1216
+ await removeUnderFirstNameHeld(host, oldRefs, "project", projectDir);
1217
+ }
1218
+ const newRef = buildMarketplacePluginRef(move.id, move.newSource);
1219
+ await host.installPlugin(newRef, move.newScope, projectDir);
1220
+ }
1200
1221
  export {
1201
1222
  Edit as default
1202
1223
  };