agents.yaml 0.2.2 → 0.2.3

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/dist/index.d.mts CHANGED
@@ -1 +1 @@
1
- export { };
1
+ export {}
package/dist/index.mjs CHANGED
@@ -147,7 +147,8 @@ async function initProject(root, options) {
147
147
  messages.push("AGENTS.md already mentions agents.yaml");
148
148
  return { messages };
149
149
  }
150
- await writeFile(projectAgentsPath, source.trimEnd().length === 0 ? `# Project Instructions\n\n${breadcrumb}\n` : `${source.trimEnd()}\n\n${breadcrumb}\n`, "utf8");
150
+ const next = source.trimEnd().length === 0 ? `# Project Instructions\n\n${breadcrumb}\n` : `${source.trimEnd()}\n\n${breadcrumb}\n`;
151
+ await writeFile(projectAgentsPath, next, "utf8");
151
152
  messages.push("updated AGENTS.md");
152
153
  } catch (error) {
153
154
  if (!isNotFound(error)) throw error;
@@ -164,7 +165,7 @@ function isNotFound(error) {
164
165
  }
165
166
  //#endregion
166
167
  //#region src/discover.ts
167
- const skippedDirectories = new Set([
168
+ const skippedDirectories = /* @__PURE__ */ new Set([
168
169
  ".git",
169
170
  ".hg",
170
171
  ".svn",
@@ -451,8 +452,8 @@ async function interactive(root) {
451
452
  }
452
453
  await commandAdd(root, selected);
453
454
  }
454
- function chooseDocumentsToEnable(options) {
455
- return new MultiSelectPrompt({
455
+ async function chooseDocumentsToEnable(options) {
456
+ const selected = await new MultiSelectPrompt({
456
457
  options,
457
458
  required: false,
458
459
  render() {
@@ -474,6 +475,7 @@ ${styleText("cyan", clack.S_BAR_END)}
474
475
  `;
475
476
  }
476
477
  }).prompt();
478
+ return typeof selected === "symbol" ? clack.CANCEL_SYMBOL : selected;
477
479
  }
478
480
  function styleDocumentOption(option, state) {
479
481
  if (option.disabled) return `${styleText("gray", clack.S_CHECKBOX_INACTIVE)} ${styleText(["strikethrough", "gray"], option.label)}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents.yaml",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "A CLI for discovering and curating agent-readable documentation in agents.yaml.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,18 +17,18 @@
17
17
  ],
18
18
  "type": "module",
19
19
  "dependencies": {
20
- "@clack/core": "1.4.1",
21
- "@clack/prompts": "1.5.1",
22
- "yaml": "2.9.0",
23
- "zod": "4.4.3"
20
+ "@clack/core": "1.5.1",
21
+ "@clack/prompts": "1.8.1",
22
+ "yaml": "2.9.1",
23
+ "zod": "4.6.5"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/node": "25.9.2",
27
- "typescript": "6.0.3"
26
+ "@types/node": "25.9.6",
27
+ "typescript": "7.0.2"
28
28
  },
29
29
  "engines": {
30
- "node": "26.3.0",
31
- "pnpm": "11.5.2"
30
+ "node": "26.8.2",
31
+ "pnpm": "12.4.1"
32
32
  },
33
33
  "scripts": {
34
34
  "bench": "node src/discover.bench.ts",
package/src/run.ts CHANGED
@@ -290,10 +290,10 @@ async function interactive(root: string): Promise<void> {
290
290
  await commandAdd(root, selected)
291
291
  }
292
292
 
293
- function chooseDocumentsToEnable(
293
+ async function chooseDocumentsToEnable(
294
294
  options: DocumentOption[],
295
- ): Promise<string[] | symbol | undefined> {
296
- return new MultiSelectPrompt<DocumentOption>({
295
+ ): Promise<string[] | typeof clack.CANCEL_SYMBOL | undefined> {
296
+ const selected = await new MultiSelectPrompt<DocumentOption>({
297
297
  options,
298
298
  required: false,
299
299
  render() {
@@ -317,6 +317,8 @@ ${styleText("cyan", clack.S_BAR_END)}
317
317
  `
318
318
  },
319
319
  }).prompt()
320
+
321
+ return typeof selected === "symbol" ? clack.CANCEL_SYMBOL : selected
320
322
  }
321
323
 
322
324
  function styleDocumentOption(