agents-inc 0.166.0 → 0.168.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 (134) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{chunk-TZ2YJJKK.js → chunk-23DNVNFP.js} +5 -5
  3. package/dist/{chunk-ZXKBERQU.js → chunk-27AVGFXH.js} +2 -2
  4. package/dist/{chunk-SXVHSOTH.js → chunk-3DIDV6H3.js} +4 -4
  5. package/dist/{chunk-GE3WKJ6Q.js → chunk-3LZNY46H.js} +4 -4
  6. package/dist/{chunk-Y47EV74W.js → chunk-4DRFEYCE.js} +10 -13
  7. package/dist/chunk-4DRFEYCE.js.map +1 -0
  8. package/dist/{chunk-MPTNC32T.js → chunk-4HWOYYY7.js} +3 -3
  9. package/dist/{chunk-MAWNVT2C.js → chunk-4UKMQUAU.js} +4 -4
  10. package/dist/{chunk-G6UREQ4V.js → chunk-5JUQKGCP.js} +9 -9
  11. package/dist/{chunk-T6UWJAB3.js → chunk-6WGXTB2L.js} +2 -2
  12. package/dist/{chunk-SAYZWCH6.js → chunk-7PYXS2QU.js} +2 -2
  13. package/dist/{chunk-ENGYJCTF.js → chunk-AG3ZVM3B.js} +35 -45
  14. package/dist/{chunk-ENGYJCTF.js.map → chunk-AG3ZVM3B.js.map} +1 -1
  15. package/dist/{chunk-A4KDXNOT.js → chunk-C2UISKIM.js} +66 -104
  16. package/dist/chunk-C2UISKIM.js.map +1 -0
  17. package/dist/{chunk-RZDXDMT6.js → chunk-CMJBKQUH.js} +2 -2
  18. package/dist/{chunk-XZEVWPX6.js → chunk-DJEO3F2H.js} +7 -7
  19. package/dist/{chunk-V3I7VQ7N.js → chunk-EH2PGPLP.js} +5 -5
  20. package/dist/chunk-EH2PGPLP.js.map +1 -0
  21. package/dist/{chunk-PMJWD27C.js → chunk-GE7NUPMI.js} +3 -3
  22. package/dist/{chunk-PNB3524H.js → chunk-GRL73YPF.js} +5 -5
  23. package/dist/{chunk-Y3VIRVVE.js → chunk-H4ZKGGTE.js} +6 -6
  24. package/dist/{chunk-LFWLEDUG.js → chunk-HI6YB7XP.js} +6 -6
  25. package/dist/{chunk-SCOQ34YM.js → chunk-HL3GYRMR.js} +2 -2
  26. package/dist/{chunk-NBXXFIIW.js → chunk-HR7TK2XW.js} +3 -3
  27. package/dist/{chunk-ZR4YPKXQ.js → chunk-JIBCVXXL.js} +4 -4
  28. package/dist/{chunk-JQRJQ4SS.js → chunk-JPMV4E4E.js} +3 -3
  29. package/dist/{chunk-4NDBUJHK.js → chunk-JVUN6AOO.js} +8 -8
  30. package/dist/{chunk-RAHSOJQ2.js → chunk-KQ3PDARZ.js} +2 -2
  31. package/dist/{chunk-PXWG7KFO.js → chunk-KTLKR4YY.js} +2 -2
  32. package/dist/{chunk-6L75SQZU.js → chunk-L3W2JWBA.js} +2 -2
  33. package/dist/{chunk-TTY6DPJN.js → chunk-LFUJCRCT.js} +3 -3
  34. package/dist/{chunk-V5WXIM2F.js → chunk-NU2K5G54.js} +2 -2
  35. package/dist/{chunk-G4JK7WVO.js → chunk-P6I72PR3.js} +15 -15
  36. package/dist/{chunk-WWIFNPJG.js → chunk-PCFUXQJA.js} +12 -12
  37. package/dist/{chunk-DAIEQJIF.js → chunk-PLX2FLEQ.js} +3 -3
  38. package/dist/{chunk-2VUYFTUB.js → chunk-QWFG7Y3R.js} +6 -6
  39. package/dist/{chunk-WVUDLKIO.js → chunk-SLBL3WIP.js} +2 -2
  40. package/dist/{chunk-HWEKHVLE.js → chunk-TW35AEB4.js} +6 -6
  41. package/dist/{chunk-VAPTVR3J.js → chunk-VVRI35SK.js} +3 -3
  42. package/dist/{chunk-6LF4CQBY.js → chunk-W5KEYSOL.js} +2 -2
  43. package/dist/{chunk-TODCQFRB.js → chunk-W6GO2CYX.js} +2 -2
  44. package/dist/{chunk-7JNJ52CD.js → chunk-WNLF5EDZ.js} +7 -16
  45. package/dist/chunk-WNLF5EDZ.js.map +1 -0
  46. package/dist/{chunk-HHIYT3PI.js → chunk-X6ZZEYO3.js} +4 -4
  47. package/dist/{chunk-QHDPLLK6.js → chunk-YN3SWF53.js} +3 -3
  48. package/dist/{chunk-25MPBIK3.js → chunk-ZUGH4MQG.js} +3 -3
  49. package/dist/commands/build/marketplace.js +6 -6
  50. package/dist/commands/build/plugins.js +8 -8
  51. package/dist/commands/compile.js +14 -14
  52. package/dist/commands/doctor.js +13 -13
  53. package/dist/commands/edit.js +71 -242
  54. package/dist/commands/edit.js.map +1 -1
  55. package/dist/commands/eject.js +12 -12
  56. package/dist/commands/init.js +39 -39
  57. package/dist/commands/list.js +9 -9
  58. package/dist/commands/new/marketplace.js +6 -6
  59. package/dist/commands/search.js +11 -11
  60. package/dist/commands/share.js +11 -11
  61. package/dist/commands/uninstall.js +13 -13
  62. package/dist/commands/update.js +8 -8
  63. package/dist/components/common/removal-plan-confirm.js +2 -2
  64. package/dist/components/common/select-list.js +2 -2
  65. package/dist/components/wizard/category-grid.js +4 -4
  66. package/dist/components/wizard/checkbox-grid.js +4 -4
  67. package/dist/components/wizard/domain-selection.js +9 -9
  68. package/dist/components/wizard/run-wizard-session.js +26 -26
  69. package/dist/components/wizard/scroll-affordance.js +2 -2
  70. package/dist/components/wizard/skill-agent-summary.js +5 -5
  71. package/dist/components/wizard/source-grid.js +5 -5
  72. package/dist/components/wizard/stack-selection.js +7 -7
  73. package/dist/components/wizard/step-agents.js +8 -8
  74. package/dist/components/wizard/step-build.js +7 -7
  75. package/dist/components/wizard/step-confirm.js +9 -9
  76. package/dist/components/wizard/step-sources.js +8 -8
  77. package/dist/components/wizard/step-stack.js +8 -8
  78. package/dist/components/wizard/summary-panel.js +8 -8
  79. package/dist/components/wizard/toast.js +2 -2
  80. package/dist/components/wizard/wizard-layout.js +12 -12
  81. package/dist/components/wizard/wizard-tabs.js +2 -2
  82. package/dist/components/wizard/wizard.js +25 -25
  83. package/dist/hooks/init.js +39 -39
  84. package/dist/load-agent-defs-5XMVB3MU.js +14 -0
  85. package/dist/recompile-project-agents-7PQWYQ6B.js +18 -0
  86. package/dist/{source-loader-7KZ3MD5O.js → source-loader-FRJTCSDL.js} +4 -4
  87. package/dist/stores/wizard-store.js +4 -4
  88. package/package.json +5 -2
  89. package/dist/chunk-7JNJ52CD.js.map +0 -1
  90. package/dist/chunk-A4KDXNOT.js.map +0 -1
  91. package/dist/chunk-V3I7VQ7N.js.map +0 -1
  92. package/dist/chunk-Y47EV74W.js.map +0 -1
  93. package/dist/load-agent-defs-3C27ENC7.js +0 -14
  94. package/dist/recompile-project-agents-DGNBCU3N.js +0 -18
  95. /package/dist/{chunk-TZ2YJJKK.js.map → chunk-23DNVNFP.js.map} +0 -0
  96. /package/dist/{chunk-ZXKBERQU.js.map → chunk-27AVGFXH.js.map} +0 -0
  97. /package/dist/{chunk-SXVHSOTH.js.map → chunk-3DIDV6H3.js.map} +0 -0
  98. /package/dist/{chunk-GE3WKJ6Q.js.map → chunk-3LZNY46H.js.map} +0 -0
  99. /package/dist/{chunk-MPTNC32T.js.map → chunk-4HWOYYY7.js.map} +0 -0
  100. /package/dist/{chunk-MAWNVT2C.js.map → chunk-4UKMQUAU.js.map} +0 -0
  101. /package/dist/{chunk-G6UREQ4V.js.map → chunk-5JUQKGCP.js.map} +0 -0
  102. /package/dist/{chunk-T6UWJAB3.js.map → chunk-6WGXTB2L.js.map} +0 -0
  103. /package/dist/{chunk-SAYZWCH6.js.map → chunk-7PYXS2QU.js.map} +0 -0
  104. /package/dist/{chunk-RZDXDMT6.js.map → chunk-CMJBKQUH.js.map} +0 -0
  105. /package/dist/{chunk-XZEVWPX6.js.map → chunk-DJEO3F2H.js.map} +0 -0
  106. /package/dist/{chunk-PMJWD27C.js.map → chunk-GE7NUPMI.js.map} +0 -0
  107. /package/dist/{chunk-PNB3524H.js.map → chunk-GRL73YPF.js.map} +0 -0
  108. /package/dist/{chunk-Y3VIRVVE.js.map → chunk-H4ZKGGTE.js.map} +0 -0
  109. /package/dist/{chunk-LFWLEDUG.js.map → chunk-HI6YB7XP.js.map} +0 -0
  110. /package/dist/{chunk-SCOQ34YM.js.map → chunk-HL3GYRMR.js.map} +0 -0
  111. /package/dist/{chunk-NBXXFIIW.js.map → chunk-HR7TK2XW.js.map} +0 -0
  112. /package/dist/{chunk-ZR4YPKXQ.js.map → chunk-JIBCVXXL.js.map} +0 -0
  113. /package/dist/{chunk-JQRJQ4SS.js.map → chunk-JPMV4E4E.js.map} +0 -0
  114. /package/dist/{chunk-4NDBUJHK.js.map → chunk-JVUN6AOO.js.map} +0 -0
  115. /package/dist/{chunk-RAHSOJQ2.js.map → chunk-KQ3PDARZ.js.map} +0 -0
  116. /package/dist/{chunk-PXWG7KFO.js.map → chunk-KTLKR4YY.js.map} +0 -0
  117. /package/dist/{chunk-6L75SQZU.js.map → chunk-L3W2JWBA.js.map} +0 -0
  118. /package/dist/{chunk-TTY6DPJN.js.map → chunk-LFUJCRCT.js.map} +0 -0
  119. /package/dist/{chunk-V5WXIM2F.js.map → chunk-NU2K5G54.js.map} +0 -0
  120. /package/dist/{chunk-G4JK7WVO.js.map → chunk-P6I72PR3.js.map} +0 -0
  121. /package/dist/{chunk-WWIFNPJG.js.map → chunk-PCFUXQJA.js.map} +0 -0
  122. /package/dist/{chunk-DAIEQJIF.js.map → chunk-PLX2FLEQ.js.map} +0 -0
  123. /package/dist/{chunk-2VUYFTUB.js.map → chunk-QWFG7Y3R.js.map} +0 -0
  124. /package/dist/{chunk-WVUDLKIO.js.map → chunk-SLBL3WIP.js.map} +0 -0
  125. /package/dist/{chunk-HWEKHVLE.js.map → chunk-TW35AEB4.js.map} +0 -0
  126. /package/dist/{chunk-VAPTVR3J.js.map → chunk-VVRI35SK.js.map} +0 -0
  127. /package/dist/{chunk-6LF4CQBY.js.map → chunk-W5KEYSOL.js.map} +0 -0
  128. /package/dist/{chunk-TODCQFRB.js.map → chunk-W6GO2CYX.js.map} +0 -0
  129. /package/dist/{chunk-HHIYT3PI.js.map → chunk-X6ZZEYO3.js.map} +0 -0
  130. /package/dist/{chunk-QHDPLLK6.js.map → chunk-YN3SWF53.js.map} +0 -0
  131. /package/dist/{chunk-25MPBIK3.js.map → chunk-ZUGH4MQG.js.map} +0 -0
  132. /package/dist/{load-agent-defs-3C27ENC7.js.map → load-agent-defs-5XMVB3MU.js.map} +0 -0
  133. /package/dist/{recompile-project-agents-DGNBCU3N.js.map → recompile-project-agents-7PQWYQ6B.js.map} +0 -0
  134. /package/dist/{source-loader-7KZ3MD5O.js.map → source-loader-FRJTCSDL.js.map} +0 -0
@@ -3,13 +3,13 @@ import {
3
3
  publishSeedConfig,
4
4
  seedPayloadForInstallation,
5
5
  skillsAuthoredHere
6
- } from "../chunk-Y47EV74W.js";
6
+ } from "../chunk-4DRFEYCE.js";
7
7
  import {
8
8
  RemovalPlanConfirm
9
- } from "../chunk-TODCQFRB.js";
9
+ } from "../chunk-W6GO2CYX.js";
10
10
  import {
11
11
  unofferablePlacementsFound
12
- } from "../chunk-PXWG7KFO.js";
12
+ } from "../chunk-KTLKR4YY.js";
13
13
  import {
14
14
  arrivalLines,
15
15
  arrivalsByScope,
@@ -21,46 +21,46 @@ import {
21
21
  sameAssignments,
22
22
  skillLabel,
23
23
  withUnplaceableAssignees
24
- } from "../chunk-V3I7VQ7N.js";
24
+ } from "../chunk-EH2PGPLP.js";
25
25
  import {
26
26
  runWizardSession
27
- } from "../chunk-HHIYT3PI.js";
28
- import "../chunk-WWIFNPJG.js";
29
- import "../chunk-RAHSOJQ2.js";
30
- import "../chunk-DAIEQJIF.js";
31
- import "../chunk-SCOQ34YM.js";
32
- import "../chunk-4NDBUJHK.js";
33
- import "../chunk-2VUYFTUB.js";
34
- import "../chunk-T6UWJAB3.js";
35
- import "../chunk-6L75SQZU.js";
36
- import "../chunk-LFWLEDUG.js";
37
- import "../chunk-TZ2YJJKK.js";
38
- import "../chunk-SAYZWCH6.js";
39
- import "../chunk-PNB3524H.js";
40
- import "../chunk-XZEVWPX6.js";
41
- import "../chunk-QHDPLLK6.js";
42
- import "../chunk-MPTNC32T.js";
27
+ } from "../chunk-X6ZZEYO3.js";
28
+ import "../chunk-PCFUXQJA.js";
29
+ import "../chunk-KQ3PDARZ.js";
30
+ import "../chunk-PLX2FLEQ.js";
31
+ import "../chunk-HL3GYRMR.js";
32
+ import "../chunk-JVUN6AOO.js";
33
+ import "../chunk-QWFG7Y3R.js";
34
+ import "../chunk-6WGXTB2L.js";
35
+ import "../chunk-L3W2JWBA.js";
36
+ import "../chunk-HI6YB7XP.js";
37
+ import "../chunk-23DNVNFP.js";
38
+ import "../chunk-7PYXS2QU.js";
39
+ import "../chunk-GRL73YPF.js";
40
+ import "../chunk-DJEO3F2H.js";
41
+ import "../chunk-YN3SWF53.js";
42
+ import "../chunk-4HWOYYY7.js";
43
43
  import "../chunk-TSIU7DME.js";
44
44
  import "../chunk-JOEA52NR.js";
45
45
  import {
46
46
  awaitUnderSpinner
47
47
  } from "../chunk-VRXX4D6K.js";
48
- import "../chunk-SXVHSOTH.js";
48
+ import "../chunk-3DIDV6H3.js";
49
49
  import "../chunk-XQHZPINL.js";
50
- import "../chunk-JQRJQ4SS.js";
51
- import "../chunk-TTY6DPJN.js";
50
+ import "../chunk-JPMV4E4E.js";
51
+ import "../chunk-LFUJCRCT.js";
52
52
  import "../chunk-WTJ3AY33.js";
53
- import "../chunk-WVUDLKIO.js";
53
+ import "../chunk-SLBL3WIP.js";
54
54
  import {
55
55
  fetchSeedConfig
56
- } from "../chunk-25MPBIK3.js";
56
+ } from "../chunk-ZUGH4MQG.js";
57
57
  import {
58
58
  promptConfirm
59
59
  } from "../chunk-4AAOOAIN.js";
60
60
  import "../chunk-OZXAJNLA.js";
61
61
  import {
62
62
  hostCompileNotices
63
- } from "../chunk-ZXKBERQU.js";
63
+ } from "../chunk-27AVGFXH.js";
64
64
  import {
65
65
  applyMigratedGlobalSources,
66
66
  compileAgentsAllScopes,
@@ -71,37 +71,37 @@ import {
71
71
  mutateGlobal,
72
72
  sayCapturedWarnings,
73
73
  writeProjectConfig
74
- } from "../chunk-G6UREQ4V.js";
74
+ } from "../chunk-5JUQKGCP.js";
75
75
  import {
76
76
  copyLocalSkills,
77
77
  discoverInstalledSkills,
78
78
  removeCompiledAgents,
79
79
  uninstallPluginSkills
80
- } from "../chunk-HWEKHVLE.js";
80
+ } from "../chunk-TW35AEB4.js";
81
81
  import {
82
82
  loadAgentDefs
83
- } from "../chunk-PMJWD27C.js";
84
- import "../chunk-ZR4YPKXQ.js";
85
- import "../chunk-GE3WKJ6Q.js";
86
- import "../chunk-MAWNVT2C.js";
83
+ } from "../chunk-GE7NUPMI.js";
84
+ import "../chunk-JIBCVXXL.js";
85
+ import "../chunk-3LZNY46H.js";
86
+ import "../chunk-4UKMQUAU.js";
87
87
  import "../chunk-JFLVEFFP.js";
88
88
  import {
89
89
  formatScopeTag
90
- } from "../chunk-7JNJ52CD.js";
90
+ } from "../chunk-WNLF5EDZ.js";
91
91
  import {
92
92
  providerFlag,
93
93
  providerNamedBy,
94
94
  refuseAnAmbiguousInstallation
95
- } from "../chunk-NBXXFIIW.js";
95
+ } from "../chunk-HR7TK2XW.js";
96
96
  import {
97
97
  BaseCommand,
98
98
  EXIT_CODES,
99
99
  carriedSkillsThatDiffer,
100
100
  registerExternalSkills,
101
101
  writeExternalSkills
102
- } from "../chunk-Y3VIRVVE.js";
103
- import "../chunk-VAPTVR3J.js";
104
- import "../chunk-RZDXDMT6.js";
102
+ } from "../chunk-H4ZKGGTE.js";
103
+ import "../chunk-VVRI35SK.js";
104
+ import "../chunk-CMJBKQUH.js";
105
105
  import {
106
106
  ERROR_MESSAGES,
107
107
  INCOMPLETE_WORK_RECOVERY,
@@ -142,13 +142,13 @@ import {
142
142
  unplaceableKept,
143
143
  unresolvedSkillRemovalReasons,
144
144
  wizardNeedsTerminal
145
- } from "../chunk-A4KDXNOT.js";
145
+ } from "../chunk-C2UISKIM.js";
146
146
  import {
147
147
  getSkillById,
148
148
  getSkillDisplayName,
149
149
  matrix,
150
150
  typedKeys
151
- } from "../chunk-V5WXIM2F.js";
151
+ } from "../chunk-NU2K5G54.js";
152
152
  import {
153
153
  CLI_COLORS,
154
154
  CLI_INVOKE_COMMAND,
@@ -161,7 +161,7 @@ import {
161
161
  formatSourceDisplayName,
162
162
  isActiveAt,
163
163
  isGlobalTombstone
164
- } from "../chunk-ENGYJCTF.js";
164
+ } from "../chunk-AG3ZVM3B.js";
165
165
  import "../chunk-OI2H6M5I.js";
166
166
 
167
167
  // src/cli/commands/edit.tsx
@@ -340,14 +340,7 @@ var Edit = class _Edit extends BaseCommand {
340
340
  }),
341
341
  provider: providerFlag()
342
342
  };
343
- /**
344
- * The command in two statements: do the work, then answer for it.
345
- *
346
- * `applyEdit` owns every path through the edit and returns however it likes; the exit code is
347
- * decided once, here, after the last of them. Deciding it inside `applyEdit` would mean
348
- * deciding it at each of that method's three endings, and an ending added later would inherit
349
- * the exit-0 default silently — which is the defect this pair exists to close.
350
- */
343
+ /** The exit code is decided once, after every path through `applyEdit`. */
351
344
  async run() {
352
345
  await this.applyEdit();
353
346
  this.exitIfWorkIncomplete();
@@ -448,7 +441,6 @@ var Edit = class _Edit extends BaseCommand {
448
441
  await this.reportWhatThisHostCannotCarry(editRoot);
449
442
  this.logCompletionSummary(changes);
450
443
  }
451
- /** The interactive producer: open the wizard on what is installed, return what was chosen. */
452
444
  async selectionFromWizard(context, editRoot) {
453
445
  if (!process.stdin.isTTY) {
454
446
  this.error(wizardNeedsTerminal("edit"), { exit: EXIT_CODES.ERROR });
@@ -458,22 +450,10 @@ var Edit = class _Edit extends BaseCommand {
458
450
  return { producer: "wizard", result };
459
451
  }
460
452
  /**
461
- * The `--from <id>` producer: fetch, seat what the configuration carries, decode, and put back
462
- * what this run has no authority to remove.
463
- *
464
- * Everything a shared configuration says is a statement about the whole roster, so the apply
465
- * that follows is destructive — the project is made to MATCH it. Two exceptions come back into
466
- * the result: a skill written here, which the producer drops on the way out because
467
- * `forkedFrom` says the CLI never wrote it, and an id the configuration NAMES that this
468
- * catalogue cannot place, because a destructive apply removes on intent and never on its own
469
- * inability. Both are disclosed in the confirm rather than silently excused.
470
- *
471
- * From a project the global install comes back too, whole: it is one installation every project
472
- * on the machine reads, so a project run only ADDS to it (owner ruling 2026-10-02). Every global
473
- * entry the configuration leaves out is put back as installed, every one it states otherwise is
474
- * held as installed and named in the confirm, and only the global entries the global install
475
- * lacks arrive — a skill with its rows, on a global sub-agent already there too. At the home
476
- * directory the run IS the global install, so nothing is held there.
453
+ * A shared configuration applies destructively, except for a skill written here (`forkedFrom`)
454
+ * and an id this catalogue cannot place — both disclosed in the confirm. From a project the
455
+ * global install is only added to (owner ruling 2026-10-02): entries the configuration omits or
456
+ * states otherwise are held as installed, and only what it lacks arrives.
477
457
  */
478
458
  async selectionFromSharedConfig(payload, context, editRoot) {
479
459
  const { matrix: sourceMatrix } = context.sourceResult;
@@ -517,15 +497,7 @@ var Edit = class _Edit extends BaseCommand {
517
497
  carried: arrivingCarried
518
498
  };
519
499
  }
520
- /**
521
- * Which installed skills the round trip does not own, asked of the disk exactly as the
522
- * producing half asks it.
523
- *
524
- * Best-effort by nature and never fatal: the question is only ever asked to PROTECT a skill,
525
- * so a directory that cannot be read protects nothing and must not fail an apply. The
526
- * consequence of an unanswered question is that the entry is treated as the CLI's own, which
527
- * is what every other command already assumes about it.
528
- */
500
+ /** Best-effort: an unreadable directory protects nothing and must not fail an apply. */
529
501
  async readAuthoredHere(projectConfig, editRoot) {
530
502
  if (!projectConfig) return /* @__PURE__ */ new Set();
531
503
  try {
@@ -535,16 +507,7 @@ var Edit = class _Edit extends BaseCommand {
535
507
  return /* @__PURE__ */ new Set();
536
508
  }
537
509
  }
538
- /**
539
- * The id, fetched — or the run refused before it is.
540
- *
541
- * Two questions are answered first, because nothing in the payload can change either answer:
542
- * an apply with nothing to apply to, or that cannot be confirmed, is over before the store is
543
- * asked, and a refusal that had already spent a round trip would be describing work it never
544
- * intended to do. Whether anything is installed comes before the terminal: the terminal
545
- * refusal's way on is this same command from a terminal, which in a folder with nothing
546
- * installed would only refuse again.
547
- */
510
+ /** Refuses an empty directory or a missing terminal before spending a round trip. */
548
511
  async fetchSharedConfigOrFail(id) {
549
512
  if (!await detectProject()) {
550
513
  this.error(nothingInstalledToApplyTo(id), { exit: EXIT_CODES.ERROR });
@@ -559,11 +522,6 @@ var Edit = class _Edit extends BaseCommand {
559
522
  }
560
523
  return fetched.payload;
561
524
  }
562
- /**
563
- * The decode refuses a payload the config model has nowhere to write (see `seedToWizardResult`).
564
- * That is a failure of this command, reported with this command's exit code rather than left to
565
- * surface as an unhandled throw.
566
- */
567
525
  decodeSeedOrFail(payload, sourceMatrix) {
568
526
  try {
569
527
  return seedToWizardResult(payload, sourceMatrix);
@@ -571,13 +529,6 @@ var Edit = class _Edit extends BaseCommand {
571
529
  this.handleError(error);
572
530
  }
573
531
  }
574
- /**
575
- * Seats the catalogue entries the payload carries with it, or refuses the run. The refusals are
576
- * `registerExternalSkills`' own — a carried skill asked for as a plugin, which no marketplace
577
- * serves, and a carried skill claiming an id the loaded catalogue already owns, whose bytes would
578
- * be written over that catalogue's own copy — reported with this command's exit code for the same
579
- * reason the decode's is.
580
- */
581
532
  registerExternalSkillsOrFail(payload, sourceMatrix, projectDir) {
582
533
  try {
583
534
  return registerExternalSkills(payload, sourceMatrix, projectDir);
@@ -585,15 +536,10 @@ var Edit = class _Edit extends BaseCommand {
585
536
  this.handleError(error);
586
537
  }
587
538
  }
588
- /**
589
- * Confirms a shared configuration, then writes the skills it brought with it — answering with
590
- * those whose files now read differently.
591
- */
592
539
  async confirmAndWriteCarried(selection, planned, result) {
593
540
  await this.confirmSharedConfigOrCancel(planned, selection.kept, applyArrivals(planned, result));
594
541
  return this.writeCarriedSkills(selection.carried);
595
542
  }
596
- /** Writes the skills the configuration brought with it, and says which they were. */
597
543
  async writeCarriedSkills(carried) {
598
544
  if (carried.length === 0) return [];
599
545
  const rewritten = await writeExternalSkills(carried);
@@ -601,17 +547,8 @@ var Edit = class _Edit extends BaseCommand {
601
547
  return rewritten;
602
548
  }
603
549
  /**
604
- * Shows what applying this configuration takes away, and stops the run unless a person says
605
- * yes.
606
- *
607
- * The plan is built from the SAME `ConfigChanges` the apply below acts on, so what is approved
608
- * and what is removed are one value read twice. Its kept half is the other side of the same
609
- * honesty: nothing is refused over an entry this run cannot remove, and nothing is silent
610
- * about one either.
611
- *
612
- * Above it go the two lists every `--from` install prints — what the apply adds or changes in
613
- * this project, and in the global install — so the question is asked about the whole of what a
614
- * yes does, not only about what it takes away.
550
+ * The plan and the apply read the same `ConfigChanges`, so what is approved is what is removed.
551
+ * The arrivals print above it, so the question covers the whole of what a yes does.
615
552
  */
616
553
  async confirmSharedConfigOrCancel(changes, kept, arrivals) {
617
554
  const plan = sharedConfigPlan(changes, kept);
@@ -633,29 +570,14 @@ var Edit = class _Edit extends BaseCommand {
633
570
  this.log("\nEdit cancelled");
634
571
  this.error("Cancelled", { exit: EXIT_CODES.CANCELLED });
635
572
  }
636
- /**
637
- * Refuses a configuration whose own host cannot place what it asks for, before the wizard runs.
638
- *
639
- * `compile` asks the same question of the same roster and `update` asks it too. `edit` is the
640
- * command that REWRITES the file, so letting it through would mean a user curating a
641
- * configuration no command will act on — and then saving it back, with the unofferable row
642
- * carried forward because nothing on the edit path had any reason to drop it.
643
- */
573
+ /** `edit` rewrites the file, so it must not let a user curate a roster no command acts on. */
644
574
  async refuseUnofferablePlacements(cwd) {
645
575
  const [finding] = await unofferablePlacementsFound(cwd);
646
576
  if (finding !== void 0) this.error(finding, { exit: EXIT_CODES.ERROR });
647
577
  }
648
578
  /**
649
- * The outbound half of the editor round trip: this installation, minted as a configuration
650
- * the editor opens, and handed to a browser.
651
- *
652
- * It is the same mint `share` performs — same reader, same mapping, same refusals, through
653
- * `seedPayloadForInstallation` — because an id is the whole of what either command produces
654
- * and two spellings of "the installation in this directory" would mint two different ids for
655
- * one project. What differs is only the ending: `share` reports the id, this opens it.
656
- *
657
- * Nothing on disk is touched. A configuration is read, not rewritten, so a run that changed
658
- * anything here would be editing the project on the way to offering to edit it.
579
+ * Mints through `seedPayloadForInstallation`, as `share` does, so one project has one id. Touches
580
+ * nothing on disk.
659
581
  */
660
582
  async openInEditor(projectDir) {
661
583
  const prepared = await seedPayloadForInstallation(projectDir);
@@ -669,17 +591,7 @@ var Edit = class _Edit extends BaseCommand {
669
591
  }
670
592
  await this.handToBrowser(published.id);
671
593
  }
672
- /**
673
- * An id somebody shared, opened rather than applied.
674
- *
675
- * The counterpart of `openInEditor` above and deliberately not a variant of it: that one MINTS,
676
- * because an installation is not yet a configuration the store holds. An id already is one, so
677
- * there is nothing to publish, and no way for this to fail except the browser refusing to launch
678
- * — which is a warning beside a link that still works.
679
- *
680
- * `--from` without `--ui` remains the destructive apply. Looking and applying are the two
681
- * things a recipient can do with an id, and this is the one that changes nothing.
682
- */
594
+ /** Opens an id rather than applying it; `--from` without `--ui` is the destructive apply. */
683
595
  async openSharedInEditor(id, cwd) {
684
596
  const url = editorConfigUrl(id);
685
597
  this.log(`Open it at ${url}`);
@@ -688,18 +600,7 @@ var Edit = class _Edit extends BaseCommand {
688
600
  const opened = await openUrl(url);
689
601
  if (!opened.ok) this.warn(opened.error);
690
602
  }
691
- /**
692
- * The link, printed first and opened second.
693
- *
694
- * Printed first because it is the only part of this that works everywhere: over a pipe, in CI
695
- * and on a machine with no desktop session there is no browser to be anybody's, and a link
696
- * nobody can copy is the whole loss. Opening one is the convenience on top, so a failure to
697
- * open is a warning beside a link that still works rather than a failed command.
698
- *
699
- * `process.stdin.isTTY` is the same question `init`'s dashboard asks before it offers a
700
- * prompt — is there a person here — because that is exactly what "whose browser is this"
701
- * means.
702
- */
603
+ /** The link prints first: it works over a pipe, in CI and with no desktop. Opening is extra. */
703
604
  async handToBrowser(id) {
704
605
  this.logSuccess(`Shared as ${id}`);
705
606
  for (const destination of sharedConfigDestinations(id)) {
@@ -709,20 +610,12 @@ var Edit = class _Edit extends BaseCommand {
709
610
  const opened = await openUrl(editorConfigUrl(id));
710
611
  if (!opened.ok) this.warn(opened.error);
711
612
  }
712
- /**
713
- * The load below, behind a spinner that comes down whichever way the await ends — all
714
- * three of `loadContext`'s refusals are raised while it is mounted.
715
- */
716
613
  async loadContextUnderSpinner(setupMarketplace) {
717
614
  return awaitUnderSpinner(
718
615
  STATUS_MESSAGES.LOADING_SKILLS,
719
616
  () => this.loadContext(setupMarketplace)
720
617
  );
721
618
  }
722
- /**
723
- * @param setupMarketplace - What `init --marketplace` named for the project setup this run
724
- * continues. Absent, the catalogue is the one the installation stored.
725
- */
726
619
  async loadContext(setupMarketplace) {
727
620
  const detected = await detectProject();
728
621
  if (!detected) {
@@ -807,43 +700,11 @@ var Edit = class _Edit extends BaseCommand {
807
700
  });
808
701
  }
809
702
  /**
810
- * Records, in the GLOBAL config, the install-mode migrations this run already performed
811
- * under `$HOME`.
812
- *
813
- * A project-context edit otherwise never writes global config (commit 403df46, "never
814
- * modify global config from project-level operations"), and `authoritativeScope: "owned"`
815
- * enforces that for the roster — an inherited global-active entry is read-only, so
816
- * `mergeGlobalConfigs` preserves it verbatim. That protection is correct for selection and
817
- * scope, but `executeMigration` resolves each skill's paths from ITS OWN scope: switching a
818
- * global-scoped skill's source has already copied it under `$HOME` (or deleted it) and
819
- * added/removed its user-scope plugin registration by the time the config is written.
820
- * Leaving the global config alone there protects nothing — it only makes the recorded
821
- * source contradict the filesystem and the plugin registry.
822
- *
823
- * So authority follows the work actually performed, and no further: only ids
824
- * `executeMigration` acted on this run are rewritten, and only their `origin` field. Global
825
- * entries this session merely displayed, re-scoped or deselected are untouched, as are
826
- * `marketplace`, `stack`, `agents` and every other registered project's view of them.
827
- *
828
- * Driving a global-scope migration from a project directory is NOT a supported flow, and this
829
- * method is no longer the thing that permits it. The wizard now refuses it at source: the two
830
- * bulk install-mode keys are withdrawn, and `setInstallMode` ignores a project-context call
831
- * against a global slot the hydration snapshot owns — the same authority the Sources grid
832
- * already enforced by rendering that row inert. What still reaches here is the residue that
833
- * authority leaves legitimate: a mode change committed on the project half of a `[P][G]` pair
834
- * and then carried to global scope by a P->G collapse (`s`) in the same session. The entry is
835
- * the project's own to configure at the moment it is configured, and global at the moment it
836
- * is written — so the migration is real, and the global config must record it.
837
- *
838
- * Runs BEFORE `writeConfigAndCompile`, so the global config written here is the one
839
- * the wizard write reloads, keeps (existing wins in `mergeGlobalConfigs`) and inlines
840
- * into the project config — both files then tell the same story. That second write
841
- * classifies as a no-op against what this one left on disk, so the fan-out below
842
- * happens once.
843
- *
844
- * The migrated `origin` decides the reference form a compiled agent emits, so every
845
- * OTHER registered project's config and agents are stale until this write fans out —
846
- * which is why it goes through the gate rather than straight to the file.
703
+ * Records in the GLOBAL config the install-mode migrations this run already performed under
704
+ * `$HOME`, and only their `origin`: `executeMigration` resolves paths from each skill's own
705
+ * scope, so leaving the record alone would contradict the disk and the plugin registry. The
706
+ * reachable case is a mode change on a `[P][G]` pair's project half, carried to global by `s`.
707
+ * Runs before `writeConfigAndCompile`, through the gate so every other project is refreshed.
847
708
  */
848
709
  async recordGlobalSourceMigrations(migratedSkillIds, newSkills, editRoot, context) {
849
710
  if (editRoot.isGlobal) return;
@@ -855,9 +716,7 @@ var Edit = class _Edit extends BaseCommand {
855
716
  const report = await mutateGlobal(
856
717
  { kind: "migrate-skill-sources", sources: migratedSources },
857
718
  {
858
- // The deps contract in config-gate/deps.ts declares
859
- // `() => Promise<MergedSkillsMatrix>`; this caller happens to have its
860
- // matrix in hand already.
719
+ // config-gate/deps.ts declares `loadMatrix` async; the matrix is already in hand.
861
720
  // eslint-disable-next-line @typescript-eslint/require-await -- deps contract
862
721
  loadMatrix: async () => context.sourceResult.matrix,
863
722
  loadAgents: async () => (await loadAgentDefs()).agents
@@ -981,18 +840,8 @@ ${chalk.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
981
840
  return migratedSkillIds;
982
841
  }
983
842
  /**
984
- * What the plugin→eject half copied, what it could not, and the refusal to continue past
985
- * a failure.
986
- *
987
- * The shape of `BaseCommand.reportPluginInstalls`, deliberately: the two directions of one
988
- * mode switch owe the user the same account, and the eject half having no structured
989
- * failure at all is what let a config record `origin: "eject"` for a skill whose copy was
990
- * refused. It stays private because `edit` is the only command that migrates a mode —
991
- * `init` installs, and has no old state to move.
992
- *
993
- * The count line is the same one `copyNewLocalSkills` prints, and names no destination:
994
- * the migration splits its copies between the project and $HOME by each skill's own scope,
995
- * so one directory would misname the other half.
843
+ * Mirrors `BaseCommand.reportPluginInstalls` for the plugin→eject half. The count line names no
844
+ * destination: copies split between the project and $HOME by each skill's scope.
996
845
  */
997
846
  reportEjectCopies(result) {
998
847
  for (const item of result.failed) {
@@ -1003,14 +852,12 @@ ${chalk.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
1003
852
  }
1004
853
  this.log(chalk.hex(CLI_COLORS.NEUTRAL)(localSkillsCopied(result.copied.length)));
1005
854
  }
1006
- /** Names what this run is switching, in the words `init` describes an install mode with. */
1007
855
  logModeSwitch(count, modeDescription) {
1008
856
  this.log(chalk.hex(CLI_COLORS.NEUTRAL)(`Switching ${count} skill(s) to ${modeDescription}`));
1009
857
  }
1010
858
  /**
1011
- * The scope moves this edit made, on disk. A collapsed `[P][G]` pair is not one of them: its
1012
- * project half is dropped or folded ({@link applyCollapsedPairs}), and moving every collapse is
1013
- * what wrote a dropped copy over the global install.
859
+ * A collapsed `[P][G]` pair is not a move: its project half is dropped or folded
860
+ * ({@link applyCollapsedPairs}).
1014
861
  */
1015
862
  async applyScopeChanges(changes, filteredResult, context, editRoot) {
1016
863
  const scopeChanges = scopeMovesOf(changes);
@@ -1044,16 +891,9 @@ ${chalk.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
1044
891
  }
1045
892
  }
1046
893
  /**
1047
- * The project's own half of each `[P][G]` pair this edit collapsed. A Local copy `s` folded into
1048
- * a Local global install moves there, edits included, replacing the global copy every project
1049
- * reads. Every other half is removed at project scope and nowhere else: its ejected copy deleted,
1050
- * or its project-scope plugin registration uninstalled.
1051
- *
1052
- * The global install's MODE is {@link applyMigrations}' to change, and it changes only when the
1053
- * collapse carried a new install mode with it — a fold into a plugin installs the plugin there.
1054
- *
1055
- * The uninstall is diagnostic, as every plugin uninstall here is: the config no longer names the
1056
- * registration, so one left behind is untidy rather than wrong.
894
+ * A Local half `s` folded into a Local global install moves there, replacing the global copy.
895
+ * Every other half is removed at project scope only. The global install's mode is
896
+ * {@link applyMigrations}' to change. The uninstall is diagnostic, as every one here is.
1057
897
  */
1058
898
  async applyCollapsedPairs(changes, filteredResult, context, editRoot) {
1059
899
  const [foldedCopies, removedPairs] = partition(
@@ -1076,7 +916,6 @@ ${chalk.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
1076
916
  editRoot
1077
917
  );
1078
918
  }
1079
- /** The project-scope registrations of collapsed pairs' plugin halves, uninstalled and reported. */
1080
919
  async uninstallProjectPluginHalves(pluginHalves, marketplace, editRoot) {
1081
920
  if (pluginHalves.length === 0) return;
1082
921
  if (marketplace === void 0) {
@@ -1187,10 +1026,6 @@ ${chalk.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
1187
1026
  sourceResult: context.sourceResult,
1188
1027
  projectDir: editRoot.dir,
1189
1028
  agentDefs: agentDefsResult,
1190
- // A full `cc edit` pass is authoritative over the roster it owns, so deselected entries
1191
- // are removed rather than union-preserved. `applyAuthority` decides
1192
- // how much that is from the producer and the directory, and hands the same word to the
1193
- // merger and to the global config the project branch of the gate commits.
1194
1029
  authoritativeScope: authority
1195
1030
  });
1196
1031
  } catch (error) {
@@ -1250,16 +1085,9 @@ ${chalk.hex(CLI_COLORS.WHITE).bold("Changes:")}`);
1250
1085
  }
1251
1086
  }
1252
1087
  /**
1253
- * What this host could not carry, once per run and after the last write: the lines `init` and
1254
- * `compile` print, from {@link hostCompileNotices}, so `edit` cannot say something different
1255
- * about the tree it just compiled.
1256
- *
1257
- * After {@link cleanupStaleAgentFiles}, because the question is about the tree as it now stands:
1258
- * an edit that removed the project's last gated sub-agent must not count the file it deleted.
1259
- *
1260
- * Not on a run that owes work, which ends on that account instead: such a run may have left
1261
- * nothing here to read, and a notice that threw over it would turn the run's
1262
- * `COMPLETED_WITH_FAILURES` exit into an `ERROR`.
1088
+ * The host notices `init` and `compile` print ({@link hostCompileNotices}), after
1089
+ * {@link cleanupStaleAgentFiles} so a deleted file is not counted. Skipped on a run that owes
1090
+ * work, whose tree may not be readable.
1263
1091
  */
1264
1092
  async reportWhatThisHostCannotCarry(editRoot) {
1265
1093
  if (this.hasIncompleteWork) return;
@@ -1338,6 +1166,7 @@ var RESTING_TUNING = "defaults";
1338
1166
  function describeTuning(agent) {
1339
1167
  const settings = [
1340
1168
  agent.model === void 0 ? void 0 : `model ${agent.model}`,
1169
+ agent.codexModel === void 0 ? void 0 : `codex model ${agent.codexModel}`,
1341
1170
  agent.effort === void 0 ? void 0 : `effort ${agent.effort}`
1342
1171
  ].filter((setting) => setting !== void 0);
1343
1172
  return settings.length === 0 ? RESTING_TUNING : settings.join(", ");