@retailcrm/embed-ui 0.9.24 → 0.9.26

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## [0.9.26](https://github.com/retailcrm/embed-ui/compare/v0.9.25...v0.9.26) (2026-05-29)
5
+ ## [0.9.25](https://github.com/retailcrm/embed-ui/compare/v0.9.24...v0.9.25) (2026-05-28)
6
+
7
+ ### Features
8
+
9
+ * Project skill initialization added ([f04caef](https://github.com/retailcrm/embed-ui/commit/f04caef7e858b3f2089cb80c9ef26daafce6c2b5))
10
+ * **v1-components:** Project skill installer added ([8b7c61c](https://github.com/retailcrm/embed-ui/commit/8b7c61cac3704ad80582a44609e5aabba31757df))
11
+ * **v1-contexts:** Context usage skill installer added ([b9545d6](https://github.com/retailcrm/embed-ui/commit/b9545d624e6062c136ea55c16c9220ab9d6e1b8a))
12
+ * **v1-endpoint:** Runtime skill installer added ([f426dac](https://github.com/retailcrm/embed-ui/commit/f426dac22766002dc3df01188608f7a0f1fe6689))
4
13
  ## [0.9.24](https://github.com/retailcrm/embed-ui/compare/v0.9.23...v0.9.24) (2026-05-26)
5
14
 
6
15
  ### Bug Fixes
package/README.md CHANGED
@@ -41,7 +41,7 @@ npx @retailcrm/embed-ui --help
41
41
  - создает или дополняет `.gitignore` типовыми правилами для `node_modules`, `dist`, `coverage`, `.env` и логов;
42
42
  - создает стартовые файлы во frontend-каталоге: endpoint worker, страницу настроек, виджет заказа, i18n JSON-сообщения;
43
43
  - добавляет `extensionrc.json` и `scripts/publish-extension.mjs`;
44
- - добавляет `AGENTS.md` и MCP-настройки пакетов, если они не отключены флагами;
44
+ - добавляет `AGENTS.md`, project-level skills и MCP-настройки пакетов, если они не отключены флагами;
45
45
  - может инициализировать Git-репозиторий, если включить `--git` или выбрать это действие в интерактивном режиме.
46
46
 
47
47
  ```bash
@@ -60,6 +60,7 @@ npx @retailcrm/embed-ui init ./web --package-manager yarn
60
60
  - шаблон — создается стартовая конфигурация для страницы настроек и виджета `order/card:common.after`;
61
61
  - каталоги — создаются `endpoint`, `pages`, `widgets`, `shared`, `i18n` и `i18n/locales` внутри frontend-каталога;
62
62
  - `AGENTS.md` — создается или дополняется инструкциями корневого пакета и выбранных пакетов;
63
+ - project-level skills — создаются в `.agents/skills/*` для выбранных пакетов;
63
64
  - MCP — добавляется `.mcp.json` для выбранных пакетов с MCP (`v1-contexts` и `v1-endpoint`);
64
65
  - project-level client configs для Codex CLI, Cursor, Junie и VS Code — не создаются без `--mcp-client-configs`;
65
66
  - Git — в неинтерактивном режиме не инициализируется без `--git`, а в интерактивном режиме предлагается, если корень проекта не является Git-репозиторием;
@@ -88,6 +89,9 @@ npx @retailcrm/embed-ui init ./web --cwd ./my-project --package-manager npm
88
89
  - `--no-configs` — не создавать `tsconfig.json`, `vite.config.ts`, `eslint.config.js` и `env.d.ts`.
89
90
  - `--no-template` — не создавать стартовые Vue-файлы и `extensionrc.json`.
90
91
  - `--no-agents` — не создавать и не дополнять `AGENTS.md`.
92
+ - `--no-skills` — не создавать и не обновлять project-level skills в `.agents/skills/*`.
93
+ - `--force-skills` — обновить уже существующие управляемые project-level skills.
94
+ - `--skills-only` — установить только project-level skills, без изменения зависимостей, шаблонов и `AGENTS.md`.
91
95
  - `--no-mcp` — не добавлять MCP-настройки пакетов.
92
96
  - `--mcp-client-configs codex,cursor,junie,vscode` — дополнительно создать project-level конфиги поддерживаемых AI-клиентов.
93
97
  - `--git` — выполнить `git init` в корне проекта, если каталог еще не является Git-репозиторием.
@@ -99,14 +103,28 @@ npx @retailcrm/embed-ui init ./web --cwd ./my-project --package-manager npm
99
103
  npx @retailcrm/embed-ui init ./web --force --no-install --no-template
100
104
  ```
101
105
 
102
- ### AGENTS.md И MCP
106
+ ### AGENTS.md, Skills И MCP
103
107
 
104
- При `init` CLI добавляет общий раздел в `AGENTS.md`, а пакеты могут добавить свои инструкции. Сейчас это используют:
108
+ При `init` CLI добавляет общий раздел в `AGENTS.md`, project-level skills в `.agents/skills/*`, а пакеты могут
109
+ добавить свои инструкции. Сейчас это используют:
105
110
 
106
111
  - `@retailcrm/embed-ui-v1-components` — добавляет порядок чтения README, AI-документации и YAML-профилей компонентов.
107
- - `@retailcrm/embed-ui-v1-contexts` — добавляет инструкции по контекстам, actions, custom contexts и MCP-ресурсам.
112
+ - `@retailcrm/embed-ui-v1-contexts` — добавляет workflow применения контекстов, actions, custom contexts и MCP-ресурсов.
108
113
  - `@retailcrm/embed-ui-v1-endpoint` — добавляет инструкции по целям виджетов и MCP-ресурсам.
109
114
 
115
+ Project-level skills дополняют `AGENTS.md`: `AGENTS.md` задает базовые правила проекта, а skills описывают
116
+ повторяемые процедуры для конкретных задач. Чтобы установить или обновить только skills, используйте:
117
+
118
+ ```bash
119
+ npx @retailcrm/embed-ui init-skills
120
+ ```
121
+
122
+ Или в рамках init:
123
+
124
+ ```bash
125
+ npx @retailcrm/embed-ui init ./web --skills-only
126
+ ```
127
+
110
128
  Для `v1-contexts` и `v1-endpoint`, если эти пакеты выбраны для установки, также создается `.mcp.json` с серверами
111
129
  `retailcrm-embed-ui-v1-contexts` и `retailcrm-embed-ui-v1-endpoint`. Этот файл рассчитан на Claude Code project scope
112
130
  и использует `${CLAUDE_PROJECT_DIR:-.}/node_modules/.bin/...`, чтобы серверы резолвились относительно открытого проекта.
package/bin/embed-ui.mjs CHANGED
@@ -16,6 +16,7 @@ const PACKAGE_MANAGERS = ["yarn", "npm", "pnpm", "bun"];
16
16
  const HELP_TEXT = `Usage:
17
17
  npx @retailcrm/embed-ui [target] [version] [options]
18
18
  npx @retailcrm/embed-ui init [target] [options]
19
+ npx @retailcrm/embed-ui init-skills [target] [options]
19
20
 
20
21
  Options:
21
22
  -t, --target <path> Target path (default: current directory)
@@ -33,6 +34,8 @@ Options:
33
34
  --force-deps Replace incompatible existing init dependencies
34
35
  --fix-sections Move init dependencies to expected package.json sections
35
36
  --no-agents Do not create or update AGENTS.md in init mode
37
+ --no-skills Do not create or update .agents/skills in init mode
38
+ --skills-only Install only project-level skills
36
39
  --no-mcp Do not add package MCP instructions in init mode
37
40
  --mcp-client-configs Comma-separated project-level MCP client configs to create (codex,cursor,junie,vscode)
38
41
  --git Initialize Git repository in init mode when cwd is not a Git work tree
@@ -47,6 +50,7 @@ Examples:
47
50
  npx @retailcrm/embed-ui --add --packages components,contexts
48
51
  npx @retailcrm/embed-ui init ./web --package-manager yarn
49
52
  npx @retailcrm/embed-ui init --interactive
53
+ npx @retailcrm/embed-ui init-skills
50
54
  `;
51
55
  const isSemverLike = (value) => /^v?\d+\.\d+\.\d+/.test(value);
52
56
  const stripLeadingV = (value) => value.replace(/^v/, "");
@@ -111,7 +115,7 @@ const parseInitArgs = (argv) => {
111
115
  type: "string",
112
116
  default: "order/card:common.after",
113
117
  describe: "Starter widget target"
114
- }).option("dry-run", { type: "boolean", default: false }).option("exact", { type: "boolean", default: false }).option("interactive", { type: "boolean", default: false }).option("verbose", { type: "boolean", default: false }).option("install", { type: "boolean", default: true }).option("force", { type: "boolean", default: false }).option("force-deps", { type: "boolean", default: false }).option("fix-sections", { type: "boolean", default: false }).option("force-files", { type: "boolean", default: false }).option("configs", { type: "boolean", default: true }).option("dirs-enabled", { type: "boolean", default: true }).option("template-enabled", { type: "boolean", default: true }).option("agents", { type: "boolean", default: true }).option("force-agents", { type: "boolean", default: false }).option("agents-only", { type: "boolean", default: false }).option("mcp", { type: "boolean", default: true }).option("force-mcp", { type: "boolean", default: false }).option("mcp-client-configs", {
118
+ }).option("dry-run", { type: "boolean", default: false }).option("exact", { type: "boolean", default: false }).option("interactive", { type: "boolean", default: false }).option("verbose", { type: "boolean", default: false }).option("install", { type: "boolean", default: true }).option("force", { type: "boolean", default: false }).option("force-deps", { type: "boolean", default: false }).option("fix-sections", { type: "boolean", default: false }).option("force-files", { type: "boolean", default: false }).option("configs", { type: "boolean", default: true }).option("dirs-enabled", { type: "boolean", default: true }).option("template-enabled", { type: "boolean", default: true }).option("agents", { type: "boolean", default: true }).option("force-agents", { type: "boolean", default: false }).option("agents-only", { type: "boolean", default: false }).option("skills", { type: "boolean", default: true }).option("force-skills", { type: "boolean", default: false }).option("skills-only", { type: "boolean", default: false }).option("mcp", { type: "boolean", default: true }).option("force-mcp", { type: "boolean", default: false }).option("mcp-client-configs", {
115
119
  type: "string",
116
120
  coerce: parsePackageList,
117
121
  describe: "Comma-separated MCP client config ids"
@@ -156,10 +160,13 @@ const parseInitArgs = (argv) => {
156
160
  template: parsed.template,
157
161
  pageCode: parsed.pageCode,
158
162
  widgetTarget: parsed.widgetTarget,
159
- noAgents: !parsed.agents,
163
+ noAgents: parsed.skillsOnly ? true : !parsed.agents,
160
164
  forceAgents: parsed.forceAgents,
161
165
  agentsOnly: parsed.agentsOnly,
162
- noMcp: !parsed.mcp,
166
+ noSkills: parsed.agentsOnly ? true : !parsed.skills,
167
+ forceSkills: parsed.forceSkills,
168
+ skillsOnly: parsed.skillsOnly,
169
+ noMcp: parsed.skillsOnly ? true : !parsed.mcp,
163
170
  forceMcp: parsed.forceMcp,
164
171
  mcpClientConfigs: parsed.mcpClientConfigs ?? null,
165
172
  initGit: parsed.git
@@ -169,6 +176,23 @@ const parseArgs = (argv) => {
169
176
  if (argv[0] === "init") {
170
177
  return parseInitArgs(argv.slice(1));
171
178
  }
179
+ if (argv[0] === "init-skills") {
180
+ const options2 = parseInitArgs(argv.slice(1));
181
+ const hasExplicitCwd = argv.slice(1).some((argument) => argument === "--cwd" || argument.startsWith("--cwd="));
182
+ return {
183
+ ...options2,
184
+ cwd: options2.target && !hasExplicitCwd ? path.resolve(process$2.cwd(), options2.target) : options2.cwd,
185
+ target: null,
186
+ noInstall: true,
187
+ noConfigs: true,
188
+ noDirs: true,
189
+ noTemplate: true,
190
+ noAgents: true,
191
+ noSkills: false,
192
+ skillsOnly: true,
193
+ noMcp: true
194
+ };
195
+ }
172
196
  const parsed = yargs(argv).scriptName("embed-ui").usage("Usage: $0 [target] [version] [options]").help(false).version(false).exitProcess(false).strictOptions().option("target", {
173
197
  alias: "t",
174
198
  type: "string",
@@ -246,6 +270,12 @@ const INSTALLABLE_PACKAGES = [
246
270
  binName: "embed-ui-v1-components",
247
271
  command: "init-agents",
248
272
  failureMode: "advisory"
273
+ },
274
+ {
275
+ type: "skills",
276
+ binName: "embed-ui-v1-components",
277
+ command: "init-skills",
278
+ failureMode: "advisory"
249
279
  }
250
280
  ]
251
281
  },
@@ -262,6 +292,12 @@ const INSTALLABLE_PACKAGES = [
262
292
  failureMode: "advisory",
263
293
  requiresMcp: true
264
294
  },
295
+ {
296
+ type: "skills",
297
+ binName: "embed-ui-v1-contexts",
298
+ command: "init-skills",
299
+ failureMode: "advisory"
300
+ },
265
301
  {
266
302
  type: "config",
267
303
  binName: "embed-ui-v1-contexts",
@@ -296,6 +332,12 @@ const INSTALLABLE_PACKAGES = [
296
332
  failureMode: "advisory",
297
333
  requiresMcp: true
298
334
  },
335
+ {
336
+ type: "skills",
337
+ binName: "embed-ui-v1-endpoint",
338
+ command: "init-skills",
339
+ failureMode: "advisory"
340
+ },
299
341
  {
300
342
  type: "config",
301
343
  binName: "embed-ui-v1-endpoint",
@@ -815,6 +857,9 @@ const appendMcpHookNotices = (output, changes) => {
815
857
  if (trimmedLine.startsWith("MCP: ")) {
816
858
  changes.mcp.push(trimmedLine.slice("MCP: ".length));
817
859
  }
860
+ if (trimmedLine.startsWith("SKILL: ")) {
861
+ changes.skills.push(trimmedLine.slice("SKILL: ".length));
862
+ }
818
863
  }
819
864
  };
820
865
  const runPackageHookCommand = async (cwd, packageName, binName, packageManager, args, failureMode, options, changes) => {
@@ -925,6 +970,9 @@ const applyInitAgents = async (cwd, selectedPackages, packageManager, options, c
925
970
  }
926
971
  };
927
972
  const applyInitPackageConfigHooks = async (cwd, selectedPackages, packageManager, options, changes) => {
973
+ if (options.agentsOnly || options.skillsOnly) {
974
+ return;
975
+ }
928
976
  for (const selectedPackage of selectedPackages) {
929
977
  for (const hook of selectedPackage.hooks ?? []) {
930
978
  if (hook.type !== "config") {
@@ -1205,8 +1253,8 @@ const analyzeTemplateFileSkips = (cwd, sourceRoot, options, changes) => {
1205
1253
  }
1206
1254
  };
1207
1255
  const applyInitPreflight = (cwd, sourceRoot, packageManager, selectedPackages, version, options, changes) => {
1208
- if (options.agentsOnly) {
1209
- changes.preflight.push("agents-only mode: package.json, configs, and template files are skipped");
1256
+ if (options.agentsOnly || options.skillsOnly) {
1257
+ changes.preflight.push(`${options.skillsOnly ? "skills-only" : "agents-only"} mode: package.json, configs, and template files are skipped`);
1210
1258
  return;
1211
1259
  }
1212
1260
  changes.preflight.push(`source root: ${path.relative(cwd, sourceRoot) || "."}`);
@@ -1252,6 +1300,43 @@ const applyInitPreflight = (cwd, sourceRoot, packageManager, selectedPackages, v
1252
1300
  analyzePackageJson(packageJson, selectedPackages, version, options, changes);
1253
1301
  }
1254
1302
  };
1303
+ const runInitSkillsHook = async (packageName, binName, cwd, packageManager, failureMode, options, changes) => {
1304
+ const args = ["init-skills", cwd];
1305
+ if (options.force || options.forceSkills) {
1306
+ args.push("--force");
1307
+ }
1308
+ await runPackageHookCommand(
1309
+ cwd,
1310
+ packageName,
1311
+ binName,
1312
+ packageManager,
1313
+ args,
1314
+ failureMode,
1315
+ options,
1316
+ changes
1317
+ );
1318
+ };
1319
+ const applyInitSkills = async (cwd, selectedPackages, packageManager, options, changes) => {
1320
+ if (options.noSkills) {
1321
+ return;
1322
+ }
1323
+ for (const selectedPackage of selectedPackages) {
1324
+ for (const hook of selectedPackage.hooks ?? []) {
1325
+ if (hook.type !== "skills") {
1326
+ continue;
1327
+ }
1328
+ await runInitSkillsHook(
1329
+ selectedPackage.name,
1330
+ hook.binName,
1331
+ cwd,
1332
+ packageManager,
1333
+ hook.failureMode,
1334
+ options,
1335
+ changes
1336
+ );
1337
+ }
1338
+ }
1339
+ };
1255
1340
  const SKIP_DIRECTORIES = /* @__PURE__ */ new Set([
1256
1341
  ".git",
1257
1342
  ".hg",
@@ -2436,6 +2521,7 @@ const createInitChanges = () => ({
2436
2521
  directories: [],
2437
2522
  files: [],
2438
2523
  agents: [],
2524
+ skills: [],
2439
2525
  mcp: [],
2440
2526
  git: [],
2441
2527
  hooks: [],
@@ -2499,6 +2585,13 @@ const printInitReport = (cwd, sourceRoot, version, packageManager, changes, opti
2499
2585
  console.log(` ${agentChange}`);
2500
2586
  }
2501
2587
  }
2588
+ if (changes.skills.length > 0) {
2589
+ console.log("");
2590
+ console.log("skills");
2591
+ for (const skillChange of changes.skills) {
2592
+ console.log(` ${skillChange}`);
2593
+ }
2594
+ }
2502
2595
  if (changes.mcp.length > 0) {
2503
2596
  console.log("");
2504
2597
  console.log("MCP");
@@ -2554,6 +2647,7 @@ const printInitSummary = (cwd, sourceRoot, version, packageManager, changes) =>
2554
2647
  changes.directories.length ? `directories created: ${changes.directories.length}` : null,
2555
2648
  changes.files.length ? `files changed: ${changes.files.length}` : null,
2556
2649
  changes.agents.length ? "AGENTS.md updated" : null,
2650
+ changes.skills.length ? `skills installed: ${changes.skills.length}` : null,
2557
2651
  changes.mcp.length ? "MCP config updated" : null,
2558
2652
  changes.git.length ? `git: ${changes.git.join(", ")}` : null,
2559
2653
  changes.hooks.length ? `package hooks ran: ${changes.hooks.length}` : null,
@@ -4616,6 +4710,7 @@ const INIT_ACTION_LABELS = {
4616
4710
  configs: "Создать базовые конфиги",
4617
4711
  template: "Создать стартовый шаблон",
4618
4712
  agents: "Обновить AGENTS.md",
4713
+ skills: "Установить project-level skills",
4619
4714
  mcp: "Добавить MCP-настройки",
4620
4715
  git: "Инициализировать Git",
4621
4716
  install: "Запустить установку зависимостей"
@@ -4624,6 +4719,7 @@ const INIT_ACTION_DESCRIPTIONS = {
4624
4719
  configs: "tsconfig.json, vite.config.ts, eslint.config.js и env.d.ts",
4625
4720
  template: "Vue-точка входа, страница настроек, виджет заказа, i18n и publish script",
4626
4721
  agents: "Общие и пакетные инструкции для AI-агентов",
4722
+ skills: ".agents/skills/* с пакетными процедурами для AI-агентов",
4627
4723
  mcp: ".mcp.json и MCP-инструкции пакетов",
4628
4724
  git: "git init в каталоге проекта, если Git еще не настроен",
4629
4725
  install: "Запуск выбранного package manager после изменения package.json"
@@ -4684,22 +4780,25 @@ const resolvePromptedPackages = async (options) => {
4684
4780
  };
4685
4781
  const resolveAvailableActions = (options) => {
4686
4782
  const actions = [];
4687
- if (!options.agentsOnly && !options.noConfigs) {
4783
+ if (!options.agentsOnly && !options.skillsOnly && !options.noConfigs) {
4688
4784
  actions.push("configs");
4689
4785
  }
4690
- if (!options.agentsOnly && !options.noTemplate) {
4786
+ if (!options.agentsOnly && !options.skillsOnly && !options.noTemplate) {
4691
4787
  actions.push("template");
4692
4788
  }
4693
4789
  if (!options.noAgents) {
4694
4790
  actions.push("agents");
4695
4791
  }
4792
+ if (!options.noSkills) {
4793
+ actions.push("skills");
4794
+ }
4696
4795
  if (!options.noMcp) {
4697
4796
  actions.push("mcp");
4698
4797
  }
4699
- if (!options.agentsOnly && !isGitWorkTree$1(options.cwd)) {
4798
+ if (!options.agentsOnly && !options.skillsOnly && !isGitWorkTree$1(options.cwd)) {
4700
4799
  actions.push("git");
4701
4800
  }
4702
- if (!options.agentsOnly && !options.noInstall) {
4801
+ if (!options.agentsOnly && !options.skillsOnly && !options.noInstall) {
4703
4802
  actions.push("install");
4704
4803
  }
4705
4804
  return actions;
@@ -4709,6 +4808,7 @@ const applyPromptedActions = (options, selectedActions) => {
4709
4808
  options.noConfigs = options.noConfigs || !selectedActionSet.has("configs");
4710
4809
  options.noTemplate = options.noTemplate || !selectedActionSet.has("template");
4711
4810
  options.noAgents = options.noAgents || !selectedActionSet.has("agents");
4811
+ options.noSkills = options.noSkills || !selectedActionSet.has("skills");
4712
4812
  options.noMcp = options.noMcp || !selectedActionSet.has("mcp");
4713
4813
  options.initGit = options.initGit || selectedActionSet.has("git");
4714
4814
  options.noInstall = options.noInstall || !selectedActionSet.has("install");
@@ -4770,7 +4870,7 @@ const resolveInteractiveInitOptions = async (cwd, options, detectedPackageManage
4770
4870
  throw new Error("Interactive init mode requires a TTY. Use explicit flags or omit --interactive.");
4771
4871
  }
4772
4872
  const nextOptions = { ...options };
4773
- if (!nextOptions.agentsOnly) {
4873
+ if (!nextOptions.agentsOnly && !nextOptions.skillsOnly) {
4774
4874
  const defaultSourceRoot = resolveDefaultSourceRoot(cwd, nextOptions);
4775
4875
  const sourceRoot = await input({
4776
4876
  message: "Frontend source root",
@@ -4899,11 +4999,15 @@ const hasEnabledPackageHook = (selectedPackages, options) => selectedPackages.so
4899
4999
  return !options.noAgents && (!hook.requiresMcp || !options.noMcp);
4900
5000
  }
4901
5001
  if (hook.type === "config") {
4902
- return !options.agentsOnly && (!hook.requiresMcp || !options.noMcp);
5002
+ return !options.agentsOnly && !options.skillsOnly && (!hook.requiresMcp || !options.noMcp);
5003
+ }
5004
+ if (hook.type === "skills") {
5005
+ return !options.noSkills;
4903
5006
  }
4904
5007
  return false;
4905
5008
  }) ?? false);
4906
5009
  const shouldRequirePackageManagerBinary = (selectedPackages, options) => !options.dryRun && (!options.noInstall || hasEnabledPackageHook(selectedPackages, options));
5010
+ const isGuidanceOnlyInit = (options) => options.agentsOnly || options.skillsOnly;
4907
5011
  const resolveInitCwd = (options) => {
4908
5012
  const cwd = path.resolve(options.cwd);
4909
5013
  if (!fs.existsSync(cwd)) {
@@ -5052,7 +5156,7 @@ const applyInitPackageJson = (cwd, selectedPackages, version, packageManager, op
5052
5156
  return packageJsonPath;
5053
5157
  };
5054
5158
  const applyInitDirectories = (sourceRoot, options, changes) => {
5055
- if (options.noDirs || options.agentsOnly) {
5159
+ if (options.noDirs || isGuidanceOnlyInit(options)) {
5056
5160
  return;
5057
5161
  }
5058
5162
  const dirs = options.dirs ?? DEFAULT_INIT_DIRS;
@@ -5072,7 +5176,7 @@ const applyInitDirectories = (sourceRoot, options, changes) => {
5072
5176
  }
5073
5177
  };
5074
5178
  const applyInitConfigs = (cwd, sourceRoot, options, changes) => {
5075
- if (options.noConfigs || options.agentsOnly) {
5179
+ if (options.noConfigs || isGuidanceOnlyInit(options)) {
5076
5180
  return;
5077
5181
  }
5078
5182
  writeFileIfAllowed(path.join(cwd, "tsconfig.json"), createTsConfig(cwd, sourceRoot), options, changes);
@@ -5081,7 +5185,7 @@ const applyInitConfigs = (cwd, sourceRoot, options, changes) => {
5081
5185
  writeFileIfAllowed(path.join(cwd, "eslint.config.js"), createEslintConfig(cwd, sourceRoot), options, changes);
5082
5186
  };
5083
5187
  const applyInitTemplate = (cwd, sourceRoot, packageManager, options, changes) => {
5084
- if (options.noTemplate || options.agentsOnly) {
5188
+ if (options.noTemplate || isGuidanceOnlyInit(options)) {
5085
5189
  return;
5086
5190
  }
5087
5191
  if (options.template !== "order-card") {
@@ -5105,7 +5209,7 @@ const applyInitTemplate = (cwd, sourceRoot, packageManager, options, changes) =>
5105
5209
  writeFileIfAllowed(path.join(cwd, "README.md"), createReadme(cwd, sourceRoot, options, packageManager), options, changes);
5106
5210
  };
5107
5211
  const runInstall = async (cwd, packageManager, options, changes, packageJsonChanged) => {
5108
- if (options.noInstall || options.agentsOnly) {
5212
+ if (options.noInstall || isGuidanceOnlyInit(options)) {
5109
5213
  return;
5110
5214
  }
5111
5215
  if (!packageJsonChanged && !options.force) {
@@ -5183,9 +5287,9 @@ const runInit = async (options) => {
5183
5287
  throw new Error(`Target path is not a directory: ${sourceRoot}`);
5184
5288
  }
5185
5289
  const selectedPackages = resolveInitPackages(interactiveOptions.packages, interactiveOptions.with);
5186
- const version = interactiveOptions.agentsOnly ? interactiveOptions.version ?? "not used" : interactiveOptions.version ?? resolveDefaultInitVersion();
5290
+ const version = isGuidanceOnlyInit(interactiveOptions) ? interactiveOptions.version ?? "not used" : interactiveOptions.version ?? resolveDefaultInitVersion();
5187
5291
  const resolvedOptions = version === "not used" ? interactiveOptions : { ...interactiveOptions, version };
5188
- const packageManager = interactiveOptions.agentsOnly ? interactiveOptions.packageManager ?? detectPackageManagerByLockfile(cwd) ?? "npm" : await resolvePackageManager(cwd, interactiveOptions.packageManager);
5292
+ const packageManager = isGuidanceOnlyInit(interactiveOptions) ? interactiveOptions.packageManager ?? detectPackageManagerByLockfile(cwd) ?? "npm" : await resolvePackageManager(cwd, interactiveOptions.packageManager);
5189
5293
  const changes = createInitChanges();
5190
5294
  if (shouldRequirePackageManagerBinary(selectedPackages, resolvedOptions)) {
5191
5295
  assertPackageManagerAvailable(packageManager);
@@ -5193,7 +5297,7 @@ const runInit = async (options) => {
5193
5297
  applyInitPreflight(cwd, sourceRoot, packageManager, selectedPackages, version, resolvedOptions, changes);
5194
5298
  await applyInitGit(cwd, resolvedOptions, changes);
5195
5299
  let packageJsonPath = null;
5196
- if (!resolvedOptions.agentsOnly) {
5300
+ if (!isGuidanceOnlyInit(resolvedOptions)) {
5197
5301
  packageJsonPath = applyInitPackageJson(cwd, selectedPackages, version, packageManager, resolvedOptions, changes);
5198
5302
  updateGitignore(cwd, resolvedOptions, changes);
5199
5303
  applyInitDirectories(sourceRoot, resolvedOptions, changes);
@@ -5202,6 +5306,7 @@ const runInit = async (options) => {
5202
5306
  }
5203
5307
  await runInstall(cwd, packageManager, resolvedOptions, changes, Boolean(packageJsonPath && changes.packageJson.length > 0));
5204
5308
  await applyInitPackageConfigHooks(cwd, selectedPackages, packageManager, resolvedOptions, changes);
5309
+ await applyInitSkills(cwd, selectedPackages, packageManager, resolvedOptions, changes);
5205
5310
  await applyInitAgents(cwd, selectedPackages, packageManager, resolvedOptions, changes);
5206
5311
  printInitReport(cwd, sourceRoot, version, packageManager, changes, resolvedOptions);
5207
5312
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@retailcrm/embed-ui",
3
3
  "type": "module",
4
- "version": "0.9.24",
4
+ "version": "0.9.26",
5
5
  "description": "API and components for creating RetailCRM UI extensions",
6
6
  "repository": {
7
7
  "type": "git",
@@ -57,10 +57,10 @@
57
57
  "@omnicajs/symfony-router": "^1.0.0",
58
58
  "@omnicajs/vue-remote": "^0.2.24",
59
59
  "@remote-ui/rpc": "^1.4.5",
60
- "@retailcrm/embed-ui-v1-components": "^0.9.24",
61
- "@retailcrm/embed-ui-v1-contexts": "^0.9.24",
62
- "@retailcrm/embed-ui-v1-endpoint": "^0.9.24",
63
- "@retailcrm/embed-ui-v1-types": "^0.9.24",
60
+ "@retailcrm/embed-ui-v1-components": "^0.9.26",
61
+ "@retailcrm/embed-ui-v1-contexts": "^0.9.26",
62
+ "@retailcrm/embed-ui-v1-endpoint": "^0.9.26",
63
+ "@retailcrm/embed-ui-v1-types": "^0.9.26",
64
64
  "yargs": "^17.7.2"
65
65
  },
66
66
  "devDependencies": {
@@ -69,7 +69,7 @@
69
69
  "@modulify/git-toolkit": "^0.0.2",
70
70
  "@modulify/pkg": "^1.0.1",
71
71
  "@omnicajs/eslint-plugin-dependencies": "^0.0.2",
72
- "@retailcrm/embed-ui-v1-testing": "^0.9.24",
72
+ "@retailcrm/embed-ui-v1-testing": "^0.9.26",
73
73
  "@types/git-semver-tags": "^7.0.0",
74
74
  "@types/node": "^22.19.2",
75
75
  "@types/semver": "^7.7.1",