agents-inc 0.173.0 → 0.175.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 (88) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/{chunk-LJQXQTFC.js → chunk-37QFHJUW.js} +142 -13
  3. package/dist/chunk-37QFHJUW.js.map +1 -0
  4. package/dist/chunk-6HJVH27C.js +114 -0
  5. package/dist/chunk-6HJVH27C.js.map +1 -0
  6. package/dist/{chunk-ITQF35UQ.js → chunk-DQB3E2SX.js} +3 -3
  7. package/dist/{chunk-AARQBW5L.js → chunk-EGC7PNDI.js} +46 -32
  8. package/dist/chunk-EGC7PNDI.js.map +1 -0
  9. package/dist/{chunk-3N4FSTVX.js → chunk-EHEBN4NB.js} +2 -2
  10. package/dist/{chunk-EHJIQDXR.js → chunk-GNMRXXRY.js} +39 -40
  11. package/dist/chunk-GNMRXXRY.js.map +1 -0
  12. package/dist/{chunk-G7NUK3BF.js → chunk-ICHWAFAC.js} +29 -19
  13. package/dist/chunk-ICHWAFAC.js.map +1 -0
  14. package/dist/{chunk-Q4UNHVPX.js → chunk-MFCZARV2.js} +9 -9
  15. package/dist/chunk-MFCZARV2.js.map +1 -0
  16. package/dist/{chunk-SPQSNZMM.js → chunk-P5XEK7HC.js} +2 -2
  17. package/dist/{chunk-VR6QTK5Z.js → chunk-Q4NWATGH.js} +31 -27
  18. package/dist/chunk-Q4NWATGH.js.map +1 -0
  19. package/dist/{chunk-BRZA7ZCX.js → chunk-SI2LLEIR.js} +5 -5
  20. package/dist/{chunk-VSPC74SS.js → chunk-SNXEYAFP.js} +45 -30
  21. package/dist/chunk-SNXEYAFP.js.map +1 -0
  22. package/dist/{chunk-A3ZAXL5T.js → chunk-SRII2GMF.js} +3 -3
  23. package/dist/{chunk-7OG635DK.js → chunk-TG3SPPZY.js} +6 -2
  24. package/dist/{chunk-7OG635DK.js.map → chunk-TG3SPPZY.js.map} +1 -1
  25. package/dist/{chunk-MHAQWMNJ.js → chunk-U46LYYRA.js} +3 -6
  26. package/dist/{chunk-MHAQWMNJ.js.map → chunk-U46LYYRA.js.map} +1 -1
  27. package/dist/{chunk-3R3LHA4Q.js → chunk-XYBHH3M5.js} +2 -2
  28. package/dist/{chunk-F437ICEG.js → chunk-YLFKFVQP.js} +11 -11
  29. package/dist/chunk-YLFKFVQP.js.map +1 -0
  30. package/dist/{chunk-WVFBBZEP.js → chunk-YM3VEDAP.js} +698 -325
  31. package/dist/chunk-YM3VEDAP.js.map +1 -0
  32. package/dist/commands/build/marketplace.js +4 -4
  33. package/dist/commands/build/plugins.js +6 -6
  34. package/dist/commands/compile.js +16 -16
  35. package/dist/commands/compile.js.map +1 -1
  36. package/dist/commands/doctor.js +73 -78
  37. package/dist/commands/doctor.js.map +1 -1
  38. package/dist/commands/edit.js +84 -80
  39. package/dist/commands/edit.js.map +1 -1
  40. package/dist/commands/eject.js +27 -18
  41. package/dist/commands/eject.js.map +1 -1
  42. package/dist/commands/init.js +16 -18
  43. package/dist/commands/list.js +42 -18
  44. package/dist/commands/list.js.map +1 -1
  45. package/dist/commands/new/marketplace.js +4 -4
  46. package/dist/commands/search.js +9 -9
  47. package/dist/commands/share.js +13 -13
  48. package/dist/commands/share.js.map +1 -1
  49. package/dist/commands/uninstall.js +29 -27
  50. package/dist/commands/uninstall.js.map +1 -1
  51. package/dist/commands/update.js +17 -18
  52. package/dist/commands/update.js.map +1 -1
  53. package/dist/components/common/select-list.js +2 -2
  54. package/dist/components/common/skill-agent-summary.js +3 -3
  55. package/dist/components/common/summary-panel.js +4 -7
  56. package/dist/hooks/init.js +39 -26
  57. package/dist/hooks/init.js.map +1 -1
  58. package/dist/load-agent-defs-BJ4KBKBA.js +14 -0
  59. package/dist/{recompile-project-agents-6G6M2RS6.js → recompile-project-agents-2QTFMYDC.js} +8 -8
  60. package/dist/{source-loader-W7XCNKNA.js → source-loader-I6SWWDUF.js} +4 -4
  61. package/package.json +1 -1
  62. package/dist/chunk-2RTBSLSR.js +0 -82
  63. package/dist/chunk-2RTBSLSR.js.map +0 -1
  64. package/dist/chunk-AARQBW5L.js.map +0 -1
  65. package/dist/chunk-EHJIQDXR.js.map +0 -1
  66. package/dist/chunk-F437ICEG.js.map +0 -1
  67. package/dist/chunk-G7NUK3BF.js.map +0 -1
  68. package/dist/chunk-LJQXQTFC.js.map +0 -1
  69. package/dist/chunk-N33AKFLR.js +0 -24
  70. package/dist/chunk-N33AKFLR.js.map +0 -1
  71. package/dist/chunk-Q4UNHVPX.js.map +0 -1
  72. package/dist/chunk-Q6WRR4BN.js +0 -195
  73. package/dist/chunk-Q6WRR4BN.js.map +0 -1
  74. package/dist/chunk-VR6QTK5Z.js.map +0 -1
  75. package/dist/chunk-VSPC74SS.js.map +0 -1
  76. package/dist/chunk-WVFBBZEP.js.map +0 -1
  77. package/dist/components/common/scroll-affordance.js +0 -9
  78. package/dist/load-agent-defs-E67DSYTN.js +0 -14
  79. package/dist/source-loader-W7XCNKNA.js.map +0 -1
  80. /package/dist/{chunk-ITQF35UQ.js.map → chunk-DQB3E2SX.js.map} +0 -0
  81. /package/dist/{chunk-3N4FSTVX.js.map → chunk-EHEBN4NB.js.map} +0 -0
  82. /package/dist/{chunk-SPQSNZMM.js.map → chunk-P5XEK7HC.js.map} +0 -0
  83. /package/dist/{chunk-BRZA7ZCX.js.map → chunk-SI2LLEIR.js.map} +0 -0
  84. /package/dist/{chunk-A3ZAXL5T.js.map → chunk-SRII2GMF.js.map} +0 -0
  85. /package/dist/{chunk-3R3LHA4Q.js.map → chunk-XYBHH3M5.js.map} +0 -0
  86. /package/dist/{components/common/scroll-affordance.js.map → load-agent-defs-BJ4KBKBA.js.map} +0 -0
  87. /package/dist/{recompile-project-agents-6G6M2RS6.js.map → recompile-project-agents-2QTFMYDC.js.map} +0 -0
  88. /package/dist/{load-agent-defs-E67DSYTN.js.map → source-loader-I6SWWDUF.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,108 @@ Each release has detailed notes in its own file under [`changelogs/`](./changelo
7
7
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
8
8
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
9
 
10
+ ## [0.175.0] - 2026-10-27
11
+
12
+ **A project config that declares nothing is no longer an installation, a project under a home holding both tools reads only its own tool's global installation, `init --from` and `edit --from` refuse two more broken links before they ask, and an account refuses a second stack under a name it already holds**
13
+
14
+ - CLI-971: a project `config.ts` that declares nothing is not an installation; `compile`, `edit`, `list`, `share`, `update` and `doctor` say the global installation stands in, and `uninstall` leaves the file alone.
15
+ - CLI-984: a Codex project under a home holding both tools' global installations reads only the Codex one.
16
+ - CLI-934: a skill the marketplace ships and could not load is skipped as one it `could not load`, and a skill folder with no `SKILL.md` is warned on every load.
17
+ - CLI-972: the notices under the `init --from` and `edit --from` panel name each skill as the panel does.
18
+ - CLI-935: `init --from` and `edit --from` refuse a project-only skill on a global sub-agent whether or not the skill loads, writing nothing.
19
+ - CLI-936: they refuse a carried skill id longer than a folder name can be, before the panel, instead of crashing half-way.
20
+ - CLI-987: the confirm panel keeps its `Marketplace` and `Stack` labels whole beside a name too long for the line.
21
+ - CLI-988: a marketplace document's value written across lines stays on its one error line.
22
+ - CLI-933: `eject skills --force` and `eject all --force` restore every skill an earlier eject wrote.
23
+ - CLI-938: `doctor` keeps a download made in the same second as giget's saved copy, and other commands stop warning about a cached copy they just downloaded.
24
+ - CLI-930: a source checkout under a folder whose name starts with `dist` finds its own files.
25
+ - CLI-957: reading a marketplace folder no longer replaces the catalogue the rest of the run names skills from.
26
+ - CLI-939: the docs say a saved marketplace copy with no version stamp is checked only by `doctor`, and how to refresh it.
27
+ - CLI-941: `doctor`'s config check names every state of the config; its verdicts are unchanged.
28
+ - CLI-942: four metadata keys nothing read are gone.
29
+ - CLI-985: the detected installation no longer carries `skillsDir`.
30
+ - CLI-940: the e2e config writer accepts a project config carrying its global inline.
31
+ - CLI-981: the `edit --from` plugin-switch specs pin every plugin-host call, and the old-folder specs share one writer.
32
+ - CLI-983: `init --from`'s specs run behind a stand-in `claude`.
33
+ - CLI-989: no spec reaches the developer's real `claude`.
34
+ - CLI-986: a command spec's first Ink render in a test worker no longer fails its first attempt.
35
+ - CLI-990: `list` and the startup config check are pinned for a Codex project under a home holding both tools.
36
+ - SERVER-10: the worker refuses a stack save or rename under a name the account already holds, in any case, with a 409.
37
+ - SERVER-11: an editor sign-in lasts 90 days, renewed on use.
38
+ - SERVER-07: the worker's CORS check runs once per request.
39
+ - SERVER-09: the server dev spec no longer depends on the developer's `wrangler` cache.
40
+ - SERVER-12: the id-hashing spec finds its own qualifying stack id.
41
+ - EDITOR-111: while the account's stacks cannot be read, Save sends nothing and says `Saving needs your account's stacks first.`, with Retry; a name the account holds is refused in place.
42
+ - EDITOR-112: a failed read of the account's stack list reaches error monitoring.
43
+ - EDITOR-113: a sign-in that ends mid-read is treated as a list that could not be read.
44
+ - EDITOR-98: the Switch marketplace refusal reads as two sentences and offers a token only for 401, 403 or 404.
45
+ - EDITOR-100: the Switch marketplace dialog no longer says "loses nothing" when a waiting link or stack would replace the screen.
46
+ - EDITOR-114: leaving a shared link by loading another marketplace keeps the notice of what could not be placed.
47
+ - EDITOR-99: the accounts specs pass reliably, and the e2e dev server runs without live reload.
48
+ - EDITOR-115: the rail's six sign-in and sign-out refusal lines are pinned word for word.
49
+ - WWW-17: the site's tests fail on a new-tab link without `rel="noopener noreferrer"`.
50
+ - REPO-42: a spec runs the real pre-push hook and fails if it stops running a suite it must.
51
+ - REPO-46: CI's Node setup steps use `actions/setup-node@v7`.
52
+ - REPO-47: how two stack names compare has one definition, in `@workspace/matrix`.
53
+ - REPO-48: a change to a file outside `packages/cli` that a CLI spec reads reruns the CLI's tests.
54
+ - REPO-44: the standards, the journey page and the findings follow the code.
55
+
56
+ See [changelogs/0.175.0.md](./changelogs/0.175.0.md) for full details.
57
+
58
+ ## [0.174.0] - 2026-10-24
59
+
60
+ **Every summary names a skill by the display name its install recorded, `init --from` and `edit --from` stop when a marketplace refuses the version check, every command says an old `.claude-src/` is ignored, and the editor says when an account's stacks could not be read, with Retry**
61
+
62
+ - REPO-44: the standards, the journey page and the findings follow the code.
63
+ - REPO-45: the git rule in both `CLAUDE.md` files names its one exception, a `commit-plan` skill run.
64
+ - CLI-963: `init --from` and `edit --from` record each skill's display name in `config.ts`, and every summary names a skill by it, then by the catalogue's name, then by its id.
65
+ - CLI-959: `list` at a terminal shows each skill by the name its install recorded, plugins included.
66
+ - CLI-978: piped `list` names each skill on its own line, with its scope.
67
+ - CLI-954: `uninstall`'s panel names a kept global copy and a local-marketplace plugin by name, where it printed the id.
68
+ - CLI-960: `uninstall`'s panel header names the marketplace of what it removes, or of what it keeps when it removes no skill.
69
+ - CLI-973: the line naming what a sub-agent gains or loses under `edit --from`'s panel names each skill as the panel does.
70
+ - CLI-975: `edit --from` asks the plugin host once, not twice, when a skill changes both mode and scope.
71
+ - CLI-946: a 404 or 403 from the version check stops `init --from` and `edit --from` with exit 1, leaving everything as it was.
72
+ - CLI-958: they stop on every 4xx but 405; on a 5xx or 405 they keep the saved copy and warn once a run.
73
+ - CLI-962: `compile`, `search`, `eject` and `uninstall` keep the saved copy over a refusal, warning on a 5xx or 405 only.
74
+ - CLI-966: offline with only giget's saved tarball left, every load but `doctor`'s warns that it is using the cached copy.
75
+ - CLI-931: every command prints one line to stderr for each place holding an old `.claude-src/`: it is ignored, and which folder agents-inc reads.
76
+ - CLI-965: that line names `.agents-inc/codex/` for a root whose installation is Codex.
77
+ - CLI-967: on a run given `--provider`, that line names that provider's folder.
78
+ - CLI-968: a run no longer inherits the provider an earlier run in the same process named.
79
+ - CLI-977: without `--provider`, HOME's line names HOME's folder for the project's tool.
80
+ - CLI-969: a bare `list` under a HOME holding one installation no longer says it "holds 1 installations".
81
+ - CLI-964: the findings check gives the same verdict in a clean `git archive` as in a checkout, so publishing needs no extra files copied in.
82
+ - CLI-980: `generate:types:check` without the skills checkout stops with one line naming the folder it looked in.
83
+ - CLI-947: the summary panel's scrolling code is gone; its output is unchanged.
84
+ - CLI-948: `clean-code-standards.md` 15.19 says how to ask a library that can answer from its own cache which it did.
85
+ - CLI-949: the editor's preview crossing spec gets a row setting both sources for the model.
86
+ - CLI-950: doctor's row patterns in the e2e specs are built once, by `doctorRow`.
87
+ - CLI-951: a spec that counts a rate limiter stubs it and pins the callers its key separates and merges.
88
+ - CLI-952: the editor standard says to ask which saved configuration was read, never the stored marketplace choice.
89
+ - CLI-953: the stack-switch question's cost is covered with a restore waiting and with a shared link open.
90
+ - CLI-955: the resize specs wait for the settled frame instead of reading it once after a delay.
91
+ - CLI-956: every path, URL, id and mirrored text in a spec's pattern goes through one tested escaper, `matchedAsWritten`.
92
+ - CLI-961: the test fixtures write each skill's real display name, so specs assert names where the CLI prints names.
93
+ - CLI-974: eleven `edit --from` plugin specs check what each run left behind, not only what it printed.
94
+ - CLI-976: the compile and `init --from` spec files check what each run left behind.
95
+ - EDITOR-103: an account's saved stack that fails to load with nothing unsaved says `Couldn't load this stack.`, with Retry.
96
+ - EDITOR-104: that click and its Retry read through the account store, so the stack's tile lights and no false "discarding" is shown.
97
+ - EDITOR-108: while an account's stack list cannot be read, `Couldn't load your saved stacks.` shows with Retry, and the grid shows this browser's saves.
98
+ - EDITOR-106: a list that could not be read no longer counts as an empty account, so no save is carried in again.
99
+ - EDITOR-110: a Retry that works hands keyboard focus to the stack it loaded or to the Stacks grid.
100
+ - EDITOR-101: pressing the skill option already in effect saves nothing and reports nothing.
101
+ - EDITOR-105: applying a stack already in effect saves nothing and reports nothing.
102
+ - EDITOR-107: "already in effect" is judged by value, whatever the key order.
103
+ - EDITOR-102: a "nothing saved" test checks both that the state is unchanged and that nothing was written.
104
+ - EDITOR-109: every editor store action is filed by what a second identical call does, checked by a census spec.
105
+ - EDITOR-85: the owed-save dialog, Escape in a skill's options panel and Apply on a proposal put keyboard focus where it was.
106
+ - CLI-979: known gap. When `edit --from` at home drops a skill whose plugin came from another marketplace, the plugin stays installed. The fix waits on the owner's card `q-cli-979-fix`.
107
+ - CLI-971: known gap. A project config that declares nothing, under a HOME holding both tools, is counted as an installation by the refusal and `list`, while commands skip it. The fix is queued.
108
+ - CLI-982: known gap. `init --from` that cannot write the project's config leaves a half-install. Waiting on the owner's card `q-cli-init-half-install`.
109
+
110
+ See [changelogs/0.174.0.md](./changelogs/0.174.0.md) for full details.
111
+
10
112
  ## [0.173.0] - 2026-10-23
11
113
 
12
114
  **`doctor` downloads each marketplace on every run, the editor keeps a saved configuration per marketplace and its stack-switch question waits for the stack, and a sub-agent goes off with its last skill**
@@ -1,12 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ INFO_MESSAGES,
3
4
  STATUS_MESSAGES,
4
5
  addedToGlobalSubAgents,
5
6
  buildMarketplacePluginRef,
7
+ chooseProviderForThisRun,
6
8
  claimSlug,
7
9
  completedWithFailures,
8
10
  copy,
9
11
  defaultUsageGuidance,
12
+ detectInstallations,
10
13
  directoryExists,
11
14
  fetchMarketplace,
12
15
  fileExists,
@@ -16,6 +19,7 @@ import {
16
19
  getErrorMessage,
17
20
  getStackSkillIds,
18
21
  glob,
22
+ holdsAConfigDeclaringNothing,
19
23
  hostAt,
20
24
  installationConfigsUnreadable,
21
25
  isHomeDirectory,
@@ -44,13 +48,13 @@ import {
44
48
  sharedConfigProjectScopeAtHome,
45
49
  skillAssignedToNoAgent,
46
50
  skillMetadataUnusableDetail,
51
+ skippedSkills,
47
52
  skippedUnknownAgents,
48
- skippedUnknownSkills,
49
53
  validateSkillPath,
50
54
  verbose,
51
55
  warn,
52
56
  writeFile
53
- } from "./chunk-WVFBBZEP.js";
57
+ } from "./chunk-YM3VEDAP.js";
54
58
  import {
55
59
  BUILT_IN_MATRIX,
56
60
  getCategoryDomain,
@@ -60,22 +64,24 @@ import {
60
64
  typedEntries,
61
65
  typedKeys,
62
66
  typedValues
63
- } from "./chunk-7OG635DK.js";
67
+ } from "./chunk-TG3SPPZY.js";
64
68
  import {
65
69
  CLI_COLORS,
66
70
  CLI_INVOKE_COMMAND,
67
71
  DEFAULT_BRANDING,
72
+ EDITOR_URL,
68
73
  EJECT_SOURCE,
69
74
  GITHUB_PREFIX,
70
75
  GITHUB_SOURCE,
71
76
  LOCAL_SKILLS_PATH,
72
77
  MIN_TERMINAL_SIZE,
78
+ PROVIDERS,
73
79
  STANDARD_FILES,
74
80
  externalIdsNamingNoDirectory,
75
81
  isActiveAt,
76
82
  orderDomains,
77
83
  seedExternalSkillSchema
78
- } from "./chunk-MHAQWMNJ.js";
84
+ } from "./chunk-U46LYYRA.js";
79
85
 
80
86
  // src/cli/utils/terminal.ts
81
87
  function clearTerminalScreen() {
@@ -103,8 +109,90 @@ var EXIT_CODES = {
103
109
  COMPLETED_WITH_FAILURES: 5
104
110
  };
105
111
 
106
- // src/cli/lib/seed/external-skills.ts
112
+ // src/cli/lib/installation/provider-flag.ts
107
113
  import os from "os";
114
+ import { Flags } from "@oclif/core";
115
+ function providerFlag() {
116
+ return Flags.string({
117
+ description: "Which provider's installation this run is about",
118
+ helpValue: `<${PROVIDERS.join("|")}>`,
119
+ options: [...PROVIDERS]
120
+ });
121
+ }
122
+ function providerNamedBy(flagValue) {
123
+ if (flagValue === void 0) return void 0;
124
+ return PROVIDERS.find((provider) => provider === flagValue);
125
+ }
126
+ var PROVIDER_FLAG = "--provider";
127
+ var PROVIDER_FLAG_WITH_ITS_VALUE = `${PROVIDER_FLAG}=`;
128
+ var END_OF_FLAGS = "--";
129
+ function providerNamedIn(argv) {
130
+ const end = argv.indexOf(END_OF_FLAGS);
131
+ const flags = end === -1 ? argv : argv.slice(0, end);
132
+ const spaced = flags.indexOf(PROVIDER_FLAG);
133
+ if (spaced !== -1) return providerNamedBy(flags[spaced + 1]);
134
+ const joined = flags.find((token) => token.startsWith(PROVIDER_FLAG_WITH_ITS_VALUE));
135
+ return providerNamedBy(joined?.slice(PROVIDER_FLAG_WITH_ITS_VALUE.length));
136
+ }
137
+ function providerNeedsAConfigurationToInstall() {
138
+ return `--provider names which installation to create and needs the configuration to create it from, so it is only meaningful beside --from. Build one at ${EDITOR_URL}, then run '${CLI_INVOKE_COMMAND} init --from <id> --provider <provider>'.`;
139
+ }
140
+ function ambiguousInstallation(subject, providers, scopeRoot) {
141
+ return `${scopeRoot} holds ${providers.length} installations \u2014 ${providers.join(" and ")} \u2014 so ${subject} cannot tell which one you mean. Name it with --provider <${providers.join("|")}>. Nothing has been changed.`;
142
+ }
143
+ async function installationsInPlay(cwd) {
144
+ const found = await detectInstallations(cwd);
145
+ const inTheProject = atScope(found, "project");
146
+ if (inTheProject.length > 0) return { scopeRoot: cwd, providers: providersOf(inTheProject) };
147
+ return { scopeRoot: os.homedir(), providers: providersOf(atScope(found, "global")) };
148
+ }
149
+ function atScope(found, scope) {
150
+ return found.filter((installation) => installation.scope === scope);
151
+ }
152
+ function providersOf(installations) {
153
+ return installations.map((installation) => installation.provider);
154
+ }
155
+ async function refuseAnAmbiguousInstallation(cwd, subject, named, onAmbiguous) {
156
+ if (named !== void 0) {
157
+ chooseProviderForThisRun(named);
158
+ return;
159
+ }
160
+ const { scopeRoot, providers } = await installationsInPlay(cwd);
161
+ if (providers.length <= 1) return;
162
+ onAmbiguous(ambiguousInstallation(subject, providers, scopeRoot));
163
+ }
164
+ async function globalInstallationStandsIn(cwd, named) {
165
+ if (!await holdsAConfigDeclaringNothing(cwd)) return false;
166
+ const { scopeRoot, providers } = await installationsInPlay(cwd);
167
+ const theProjectHoldsNone = scopeRoot !== cwd;
168
+ const homeHoldsOneToWorkOn = providers.some(
169
+ (provider) => named === void 0 || provider === named
170
+ );
171
+ return theProjectHoldsNone && homeHoldsOneToWorkOn;
172
+ }
173
+ async function providersInPlay(cwd) {
174
+ return (await installationsInPlay(cwd)).providers;
175
+ }
176
+ async function installationToName(cwd, named) {
177
+ if (named !== void 0) return named;
178
+ const providers = await providersInPlay(cwd);
179
+ return providers.length > 1 ? providers : void 0;
180
+ }
181
+ async function ambiguityFinding(cwd) {
182
+ const { scopeRoot, providers } = await installationsInPlay(cwd);
183
+ if (providers.length <= 1) return null;
184
+ return ambiguousInstallation("every command that acts on one", providers, scopeRoot);
185
+ }
186
+ async function otherInstallationsInThisScope(cwd) {
187
+ const { scopeRoot, providers } = await installationsInPlay(cwd);
188
+ const showing = providerInUse(scopeRoot);
189
+ const others = providers.filter((provider) => provider !== showing);
190
+ if (others.length === 0) return null;
191
+ return `${scopeRoot} holds ${providers.length} installations \u2014 ${providers.join(" and ")} \u2014 and this is the ${showing} one. Show another with --provider <${providers.join("|")}>.`;
192
+ }
193
+
194
+ // src/cli/lib/seed/external-skills.ts
195
+ import os2 from "os";
108
196
  import path from "path";
109
197
  import { mkdtemp } from "fs/promises";
110
198
 
@@ -326,9 +414,25 @@ function notADirectoryNameError(ids) {
326
414
  "A skill id is the directory the skill is written into, so an id holding a path separator, or naming '.' or '..', would be written somewhere other than a directory of its own, and one holding a control character would hand it to the terminal wherever that directory is named. Re-share it with each skill above added again, which mints an id \u2014 'external-<category>-<name>' \u2014 that names one directory."
327
415
  ].join("\n");
328
416
  }
417
+ var DIRECTORY_NAME_MAX_BYTES = 255;
418
+ function overrunsADirectoryName(id) {
419
+ return Buffer.byteLength(id, "utf8") > DIRECTORY_NAME_MAX_BYTES;
420
+ }
421
+ function externalIdsTooLongForADirectory(payload) {
422
+ return Object.keys(payload.external ?? {}).filter(overrunsADirectoryName);
423
+ }
424
+ function tooLongForADirectoryError(ids) {
425
+ return [
426
+ "This configuration cannot be installed: these skills travel inside it under ids longer than a directory name may be:",
427
+ ...ids.map((id) => ` ${JSON.stringify(id)}`),
428
+ `A skill id is the directory the skill is written into, and a directory name may hold at most ${String(DIRECTORY_NAME_MAX_BYTES)} bytes, so none of these could be written. Re-share it without each skill above.`
429
+ ].join("\n");
430
+ }
329
431
  function registerExternalSkills(payload, matrix2, projectDir) {
330
432
  const notDirectoryNames = externalIdsNamingNoDirectory(payload);
331
433
  if (notDirectoryNames.length > 0) throw new Error(notADirectoryNameError(notDirectoryNames));
434
+ const tooLong = externalIdsTooLongForADirectory(payload);
435
+ if (tooLong.length > 0) throw new Error(tooLongForADirectoryError(tooLong));
332
436
  const externals = selectedExternals(payload);
333
437
  const asPlugin = askedForAsPlugin(externals);
334
438
  const colliding = claimingACatalogueId(externals, matrix2);
@@ -344,7 +448,7 @@ async function writeExternalSkills(installs) {
344
448
  var SCRATCH_DIR_PREFIX = "agents-inc-carried-";
345
449
  async function carriedSkillsThatDiffer(installs) {
346
450
  if (installs.length === 0) return [];
347
- const scratch = await mkdtemp(path.join(os.tmpdir(), SCRATCH_DIR_PREFIX));
451
+ const scratch = await mkdtemp(path.join(os2.tmpdir(), SCRATCH_DIR_PREFIX));
348
452
  try {
349
453
  const written = await Promise.all(
350
454
  installs.map(async (install) => writeExternalSkill(await scratchCopyOf(install, scratch)))
@@ -495,8 +599,8 @@ async function readCarriedSkills(owned) {
495
599
  }
496
600
 
497
601
  // src/cli/lib/seed/seed-apply.ts
498
- import os2 from "os";
499
- import { isDeepEqual, omit, partition, pick } from "remeda";
602
+ import os3 from "os";
603
+ import { indexBy, isDeepEqual, omit, partition, pick } from "remeda";
500
604
  var NOTHING_KEPT = {
501
605
  authoredSkillIds: [],
502
606
  unplaceableSkillIds: []
@@ -572,7 +676,7 @@ function withAgentKeptRows(carried, agent, keptRows, payloadRows) {
572
676
  };
573
677
  }
574
678
  async function readInstalledGlobal(projectDir) {
575
- const loaded = await loadProjectConfigFromDir(os2.homedir(), providerInUse(projectDir));
679
+ const loaded = await loadProjectConfigFromDir(os3.homedir(), providerInUse(projectDir));
576
680
  return loaded?.config ?? null;
577
681
  }
578
682
  var NO_GLOBAL_ENTRIES = { skillIds: [], agentNames: [] };
@@ -750,8 +854,13 @@ function entriesActiveAt(skills, agents, scope) {
750
854
  agentNames: agents.filter((agent) => isActiveAt(agent, scope)).map((agent) => agent.name)
751
855
  };
752
856
  }
857
+ function panelRowEntries(held) {
858
+ const active = held.result.skills.filter((skill) => !skill.excluded);
859
+ return indexBy(active, (skill) => skill.id);
860
+ }
753
861
  function joinedStatement(held) {
754
- return held.joined.length === 0 ? [] : [addedToGlobalSubAgents(held.joined)];
862
+ if (held.joined.length === 0) return [];
863
+ return [addedToGlobalSubAgents(held.joined, panelRowEntries(held))];
755
864
  }
756
865
  function projectScopedContent(result) {
757
866
  return entriesActiveAt(result.skills, result.agentConfigs, "project");
@@ -876,6 +985,16 @@ var BaseCommand = class extends Command {
876
985
  await super.init();
877
986
  await this.ensureTerminalSize();
878
987
  }
988
+ /**
989
+ * Called first where a command starts work on the installation in play, which for a project whose
990
+ * config declares nothing is the global one. On stderr, as the init hook's old-folder lines are,
991
+ * so piped output is unchanged.
992
+ */
993
+ async sayWhenTheGlobalInstallationStandsIn(named) {
994
+ if (!await globalInstallationStandsIn(process.cwd(), named)) return;
995
+ process.stderr.write(`${INFO_MESSAGES.GLOBAL_INSTALLATION_STANDS_IN}
996
+ `);
997
+ }
879
998
  async ensureTerminalSize() {
880
999
  if (isTerminalBigEnough()) return;
881
1000
  clearTerminalScreen();
@@ -1018,10 +1137,11 @@ var BaseCommand = class extends Command {
1018
1137
  exit: EXIT_CODES.ERROR
1019
1138
  });
1020
1139
  }
1021
- warnOfSkippedEntries(mapping) {
1140
+ /** `unloadedSkillIds`: skills the marketplace ships and could not load, never unknown ones. */
1141
+ warnOfSkippedEntries(mapping, unloadedSkillIds) {
1022
1142
  const { skippedSkillIds, skippedAgentNames, agentsOnlySkippedSkillsCarried } = mapping;
1023
1143
  if (skippedSkillIds.length > 0) {
1024
- this.warn(skippedUnknownSkills(skippedSkillIds, agentsOnlySkippedSkillsCarried));
1144
+ this.warn(skippedSkills(skippedSkillIds, agentsOnlySkippedSkillsCarried, unloadedSkillIds));
1025
1145
  }
1026
1146
  if (skippedAgentNames.length > 0) this.warn(skippedUnknownAgents(skippedAgentNames));
1027
1147
  }
@@ -1079,6 +1199,14 @@ ${chalk.hex(CLI_COLORS.WARNING)(completedWithFailures(this.incompleteWork))}
1079
1199
  export {
1080
1200
  clearTerminalScreen,
1081
1201
  EXIT_CODES,
1202
+ providerFlag,
1203
+ providerNamedBy,
1204
+ providerNamedIn,
1205
+ providerNeedsAConfigurationToInstall,
1206
+ refuseAnAmbiguousInstallation,
1207
+ installationToName,
1208
+ ambiguityFinding,
1209
+ otherInstallationsInThisScope,
1082
1210
  registerExternalSkills,
1083
1211
  writeExternalSkills,
1084
1212
  carriedSkillsThatDiffer,
@@ -1089,8 +1217,9 @@ export {
1089
1217
  restoreInstalledGlobal,
1090
1218
  sameAssignments,
1091
1219
  notInstalledGlobally,
1220
+ panelRowEntries,
1092
1221
  joinedStatement,
1093
1222
  installsAtHome,
1094
1223
  BaseCommand
1095
1224
  };
1096
- //# sourceMappingURL=chunk-LJQXQTFC.js.map
1225
+ //# sourceMappingURL=chunk-37QFHJUW.js.map