agent-enderun 1.1.7 → 1.1.8

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 (49) hide show
  1. package/README.md +2 -2
  2. package/bin/run-multi-test.js +3 -3
  3. package/dist/framework-mcp/src/tools/observability/check_ports.js +1 -1
  4. package/dist/framework-mcp/src/tools/observability/check_ports.js.map +1 -1
  5. package/dist/framework-mcp/src/tools/observability/get_health.d.ts +1 -1
  6. package/dist/framework-mcp/src/tools/observability/get_health.js +1 -2
  7. package/dist/framework-mcp/src/tools/observability/get_health.js.map +1 -1
  8. package/dist/framework-mcp/src/tools/search/get_map.js +0 -1
  9. package/dist/framework-mcp/src/tools/search/get_map.js.map +1 -1
  10. package/dist/framework-mcp/src/tools/search/grep_search.js.map +1 -1
  11. package/dist/framework-mcp/src/tools/types.d.ts +2 -2
  12. package/dist/src/cli/adapters.d.ts +3 -3
  13. package/dist/src/cli/adapters.js +11 -5
  14. package/dist/src/cli/adapters.js.map +1 -1
  15. package/dist/src/cli/commands/init.js +7 -52
  16. package/dist/src/cli/commands/init.js.map +1 -1
  17. package/dist/src/cli/utils/app-backend.js +4 -4
  18. package/dist/src/cli/utils/app-backend.js.map +1 -1
  19. package/dist/src/cli/utils/app-frontend.js +4 -4
  20. package/dist/src/cli/utils/app-frontend.js.map +1 -1
  21. package/dist/src/cli/utils/app-types.js +1 -1
  22. package/dist/src/cli/utils/app-types.js.map +1 -1
  23. package/dist/src/modules/adapters/definitions.js +3 -3
  24. package/dist/src/modules/adapters/definitions.js.map +1 -1
  25. package/dist/tests/adapter.test.js +5 -6
  26. package/dist/tests/adapter.test.js.map +1 -1
  27. package/dist/tests/memory-utils.test.js +1 -1
  28. package/dist/tests/memory-utils.test.js.map +1 -1
  29. package/dist/tests/orchestrate.test.js +2 -2
  30. package/dist/tests/orchestrate.test.js.map +1 -1
  31. package/dist/tests/skills-definitions.test.js +2 -2
  32. package/dist/tests/skills-definitions.test.js.map +1 -1
  33. package/eslint.config.js +25 -3
  34. package/framework-mcp/dist/tools/observability/check_ports.js +1 -1
  35. package/framework-mcp/dist/tools/observability/get_health.js +1 -2
  36. package/framework-mcp/dist/tools/search/get_map.js +0 -1
  37. package/framework-mcp/package.json +2 -2
  38. package/framework-mcp/src/tools/observability/check_ports.ts +4 -4
  39. package/framework-mcp/src/tools/observability/get_health.ts +1 -2
  40. package/framework-mcp/src/tools/search/get_map.ts +1 -3
  41. package/framework-mcp/src/tools/search/grep_search.ts +3 -4
  42. package/framework-mcp/src/tools/types.ts +2 -2
  43. package/package.json +2 -2
  44. package/src/cli/adapters.ts +14 -8
  45. package/src/cli/commands/init.ts +36 -82
  46. package/src/cli/utils/app-backend.ts +5 -5
  47. package/src/cli/utils/app-frontend.ts +5 -5
  48. package/src/cli/utils/app-types.ts +1 -1
  49. package/src/modules/adapters/definitions.ts +3 -3
@@ -2,23 +2,23 @@ import fs from "fs";
2
2
  import path from "path";
3
3
  import readline from "readline";
4
4
 
5
+ import { logger } from "../../shared/logger.js";
5
6
  import {
7
+ remapFrameworkContent,
6
8
  resolveAdapter,
7
9
  runAdapterPostInit,
8
- remapFrameworkContent,
9
10
  scaffoldAgents,
10
11
  type AdapterConfig,
11
12
  type AdapterId,
12
13
  } from "../adapters.js";
13
- import { getPackageRoot, getPackageVersion } from "../utils/pkg.js";
14
- import { ensureDir, writeJsonFile } from "../utils/fs.js";
15
- import { initializeMemory, getConfiguredPaths } from "../utils/memory.js";
16
- import { logger } from "../../shared/logger.js";
17
14
  import { SHIM_TEMPLATES } from "../shims.js";
15
+ import { ensureDir, writeJsonFile } from "../utils/fs.js";
16
+ import { initializeMemory } from "../utils/memory.js";
17
+ import { getPackageRoot, getPackageVersion } from "../utils/pkg.js";
18
18
  import { UI } from "../utils/ui.js";
19
19
 
20
20
  // Import Modular Definitions
21
- import { ALL_AGENTS, buildAgentJson } from "../../modules/agents/definitions.js";
21
+ import { ALL_AGENTS } from "../../modules/agents/definitions.js";
22
22
  import { CORE_SKILLS } from "../../modules/skills/definitions.js";
23
23
 
24
24
 
@@ -84,59 +84,13 @@ function scaffoldConstitution(targetDir: string, frameworkDir: string, adapterId
84
84
  console.warn(`⚠️ Failed to read global constitution template: ${e}`);
85
85
  }
86
86
  content = remapFrameworkContent(content, frameworkDir, adapterId);
87
-
87
+
88
88
  // Write ONLY to the framework directory (e.g. .gemini/ENDERUN.md)
89
89
  const destPath = path.join(targetDir, frameworkDir, "ENDERUN.md");
90
90
  fs.writeFileSync(destPath, content);
91
91
  console.warn(`✅ Constitution file created inside: ${frameworkDir}/ENDERUN.md${readSuccess ? "" : " (default template)"}`);
92
92
  }
93
93
 
94
- function scaffoldCoreAgents(agentsToScaffold: string[], agentsBaseDir: string, adapterId: string, dryRun: boolean) {
95
- if (dryRun) return;
96
- ensureDir(agentsBaseDir, dryRun);
97
-
98
- for (const name of agentsToScaffold) {
99
- const ag = ALL_AGENTS.find(a => a.name === name);
100
- if (!ag) continue;
101
-
102
- // AGY standard requires nested folders: agents/{name}/agent.md (or .json)
103
- const isNestedAdapter = adapterId === "antigravity-cli";
104
- const agentDir = isNestedAdapter ? path.join(agentsBaseDir, name) : agentsBaseDir;
105
- const agentFileName = isNestedAdapter ? "agent.md" : `${ag.name}.md`;
106
-
107
- if (isNestedAdapter) ensureDir(agentDir, dryRun);
108
-
109
- if (isNestedAdapter) {
110
- if (!dryRun) {
111
- const jsonContent = buildAgentJson(ag);
112
- fs.writeFileSync(path.join(agentDir, "agent.json"), jsonContent);
113
- }
114
- } else {
115
- const mdContent = `---
116
- name: "${ag.name}"
117
- description: "${ag.description}"
118
- ---
119
-
120
- <!-- capability: ${ag.capability} -->
121
- <!-- tags: [${ag.tags.map(t => `"${t}"`).join(", ")}] -->
122
-
123
-
124
- # 🎖️ ${FRAMEWORK_NAME} — @${ag.name} (${ag.displayName})
125
-
126
- ## 🤖 Talimatlar (Instructions)
127
- ${ag.instructions}
128
-
129
- ## 🛡️ Çekirdek Kurallar (Core Mandates)
130
- - **Traceability:** Her eylem aktif Trace ID'yi miras almalıdır.
131
- - **Surgical Precision:** Sadece \`replace_text\` veya \`patch_file\` kullanarak dosya düzenleyin.
132
- `;
133
- if (!dryRun) {
134
- fs.writeFileSync(path.join(agentDir, agentFileName), mdContent);
135
- }
136
- }
137
- }
138
- }
139
-
140
94
  function scaffoldSkills(skillsBaseDir: string, dryRun: boolean) {
141
95
  if (dryRun) return;
142
96
  ensureDir(skillsBaseDir, dryRun);
@@ -195,53 +149,53 @@ This document outlines the strict ESLint coding standards for Agent Enderun proj
195
149
 
196
150
  // Scaffold Corporate Standards (CRUD & Architecture)
197
151
  const standards = [
198
- {
199
- file: "crud-governance.md",
152
+ {
153
+ file: "crud-governance.md",
200
154
  template: "templates/standards/crud-governance.md",
201
155
  default: "# 🏛️ Kurumsal CRUD ve Yönetişim Standartları\n\n1. **Yüksek Riskli İşlemler:** @manager onayı gerektirir.\n2. **Branded Types:** Zorunludur.\n3. **Kysely:** Ham SQL yasaktır."
202
156
  },
203
- {
204
- file: "architecture-standards.md",
157
+ {
158
+ file: "architecture-standards.md",
205
159
  template: "templates/standards/architecture-standards.md",
206
160
  default: "# 📐 Kurumsal Mimari Standartları\n\n1. **Layered Architecture:** Route -> Service -> Repository.\n2. **Zero Mock:** Gerçek veri/kontrat kullanımı zorunludur.\n3. **any Forbidden:** TypeScript disiplini."
207
161
  },
208
- {
209
- file: "frontend-standards.md",
162
+ {
163
+ file: "frontend-standards.md",
210
164
  template: "templates/standards/frontend-standards.md",
211
165
  default: "# 🎨 Kurumsal Frontend Standartları\n\n1. **Style Discipline:** Tip güvenli veya utility-first sistemler tercih edilir.\n2. **Responsive-First:** Mobil-ilk tasarım zorunludur.\n3. **WCAG AA:** Erişilebilirlik standarttır."
212
166
  },
213
- {
214
- file: "tailwind-standards.md",
167
+ {
168
+ file: "tailwind-standards.md",
215
169
  template: "templates/standards/tailwind-standards.md",
216
170
  default: "# 🌊 Kurumsal Tailwind Standartları\n\n1. **No Arbitrary Values:** h-[10px] yasaktır.\n2. **Mobile-First:** sm:, md: kullanımı zorunludur.\n3. **Prettier:** Tailwind plugin kullanımı önerilir."
217
171
  },
218
- {
219
- file: "mobile-standards.md",
172
+ {
173
+ file: "mobile-standards.md",
220
174
  template: "templates/standards/mobile-standards.md",
221
175
  default: "# 📱 Kurumsal Mobil Standartları\n\n1. **Expo/React Native:** Standart platformdur.\n2. **Dynamic Scaling:** useWindowDimensions kullanımı zorunludur.\n3. **FlashList:** Büyük listeler için Shopify FlashList kullanılır."
222
176
  },
223
- {
224
- file: "security-standards.md",
177
+ {
178
+ file: "security-standards.md",
225
179
  template: "templates/standards/security-standards.md",
226
180
  default: "# 🛡️ Kurumsal Güvenlik Standartları\n\n1. **No Ham SQL:** Kysely zorunluluğu.\n2. **RLS:** Row Level Security uygulanmalıdır.\n3. **Secrets:** .env disiplini."
227
181
  },
228
- {
229
- file: "quality-standards.md",
182
+ {
183
+ file: "quality-standards.md",
230
184
  template: "templates/standards/quality-standards.md",
231
185
  default: "# ⚖️ Kurumsal Kod Kalitesi Standartları\n\n1. **Zero any:** TypeScript disiplini.\n2. **Zero Warnings:** ESLint temizliği.\n3. **4 Spaces:** Girintileme kuralı."
232
186
  },
233
- {
234
- file: "logging-and-secrets.md",
187
+ {
188
+ file: "logging-and-secrets.md",
235
189
  template: "templates/standards/logging-and-secrets.md",
236
190
  default: "# 🪵 Kurumsal Loglama Standartları\n\n1. **Zero Console:** console.log yasaktır.\n2. **Logger:** Kurumsal logger kullanılır.\n3. **Secrets:** .env disiplini zorunludur."
237
191
  },
238
- {
239
- file: "testing-standards.md",
192
+ {
193
+ file: "testing-standards.md",
240
194
  template: "templates/standards/testing-standards.md",
241
195
  default: "# 🧪 Kurumsal Test Standartları\n\n1. **Framework:** Vitest kullanılır.\n2. **Naming:** .test.ts formatı.\n3. **Zero Mock:** İç servisler mocklanmaz."
242
196
  },
243
- {
244
- file: "i18n-standards.md",
197
+ {
198
+ file: "i18n-standards.md",
245
199
  template: "templates/standards/i18n-standards.md",
246
200
  default: "# 🌐 Kurumsal i18n Standartları\n\n1. **No Hardcoded:** Metinler JSON'da tutulur.\n2. **i18next:** Standart kütüphanedir.\n3. **Centralized:** Locales dizini zorunludur."
247
201
  }
@@ -260,11 +214,11 @@ This document outlines the strict ESLint coding standards for Agent Enderun proj
260
214
  }
261
215
  fs.writeFileSync(path.join(knowledgePath, std.file), content);
262
216
  }
263
-
217
+
264
218
  // Scaffold Prompt Recipes
265
219
  const promptsPath = path.join(frameworkDir, "prompts");
266
220
  if (!fs.existsSync(promptsPath)) fs.mkdirSync(promptsPath, { recursive: true });
267
-
221
+
268
222
  const recipes = [
269
223
  { file: "refactoring-recipe.md", template: "templates/prompts/refactoring-recipe.md" },
270
224
  { file: "bug-fix-recipe.md", template: "templates/prompts/bug-fix-recipe.md" },
@@ -282,7 +236,7 @@ This document outlines the strict ESLint coding standards for Agent Enderun proj
282
236
  logger.debug(`Failed to scaffold prompt recipe: ${recipe.file}`, e);
283
237
  }
284
238
  }
285
-
239
+
286
240
  // Scaffold cli-commands.json
287
241
  const cliCommands = {
288
242
  commands: {
@@ -345,7 +299,7 @@ List of active agents, their roles, capacities, and matching directory patterns.
345
299
  // Scaffold observability files
346
300
  const obsDir = path.join(frameworkDir, "observability");
347
301
  if (!fs.existsSync(obsDir)) fs.mkdirSync(obsDir, { recursive: true });
348
-
302
+
349
303
  // Add audit log
350
304
  const auditLogPath = path.join(obsDir, "audit_log.md");
351
305
  if (!fs.existsSync(auditLogPath)) {
@@ -379,7 +333,7 @@ globs: **/*
379
333
  export async function initCommand(adapterName: string, options: { unified?: boolean, dryRun?: boolean, yes?: boolean }) {
380
334
  const adapterId = (adapterName || "gemini") as AdapterId;
381
335
  const adapter = resolveAdapter(adapterId);
382
-
336
+
383
337
  if (!adapter) {
384
338
  UI.error(`Unknown adapter: ${adapterId}`);
385
339
  process.exit(1);
@@ -387,11 +341,11 @@ export async function initCommand(adapterName: string, options: { unified?: bool
387
341
 
388
342
  const projectRoot = process.cwd();
389
343
  const isUnified = options.unified || false;
390
-
344
+
391
345
  // STRICT ISOLATION STRATEGY
392
346
  const coreDir = ".enderun"; // Pure Memory & Knowledge
393
347
  const aiToolDir = isUnified ? ".agents" : adapter.frameworkDir; // Pure Agents & Skills
394
-
348
+
395
349
  const dryRun = options.dryRun || false;
396
350
  const forceYes = options.yes || false;
397
351
 
@@ -415,7 +369,7 @@ export async function initCommand(adapterName: string, options: { unified?: bool
415
369
 
416
370
  // 1. Create Core Framework Structure (.enderun) - EXCLUSIVELY FOR DATA
417
371
  ensureDir(path.join(projectRoot, coreDir), dryRun);
418
- ["knowledge", "memory", "logs", "observability", "router", "registry", "rules", "prompts"].forEach(dir => {
372
+ selectedDirs.forEach(dir => {
419
373
  ensureDir(path.join(projectRoot, coreDir, dir), dryRun);
420
374
  });
421
375
 
@@ -429,7 +383,7 @@ export async function initCommand(adapterName: string, options: { unified?: bool
429
383
  scaffoldConstitution(projectRoot, coreDir, adapterId, dryRun);
430
384
 
431
385
  // 4. Scaffold Core Agents (Inside AI Tool Dir ONLY - Centralized)
432
- scaffoldAgents(projectRoot, adapterId, dryRun);
386
+ scaffoldAgents(projectRoot, adapterId, dryRun, selectedAgents);
433
387
 
434
388
  // 5. Scaffold Skills (Inside AI Tool Dir ONLY)
435
389
  const skillsBaseDir = path.join(projectRoot, aiToolDir, "skills");
@@ -1,9 +1,9 @@
1
1
  import path from "path";
2
+ import type { AppSpec } from "./app-inferrer.js";
3
+ import { createBaseTypeFiles } from "./app-types.js";
2
4
  import { ensureDir, writeJsonFile, writeTextFile } from "./fs.js";
3
5
  import { getConfiguredPaths } from "./memory.js";
4
6
  import { getDependencyVersions } from "./pkg.js";
5
- import { createBaseTypeFiles } from "./app-types.js";
6
- import type { AppSpec } from "./app-inferrer.js";
7
7
 
8
8
  const targetDir = process.cwd();
9
9
 
@@ -242,8 +242,8 @@ export function createBackendFiles(spec: AppSpec): void {
242
242
  "",
243
243
  "## Commands",
244
244
  "",
245
- "- \`npm run dev\` strings",
246
- "- \`npm run build\` strings",
247
- "- \`npm run test\` strings",
245
+ "- `npm run dev` strings",
246
+ "- `npm run build` strings",
247
+ "- `npm run test` strings",
248
248
  ].join("\n"));
249
249
  }
@@ -1,9 +1,9 @@
1
1
  import path from "path";
2
+ import type { AppSpec } from "./app-inferrer.js";
3
+ import { createBaseTypeFiles } from "./app-types.js";
2
4
  import { writeJsonFile, writeTextFile } from "./fs.js";
3
5
  import { getConfiguredPaths } from "./memory.js";
4
6
  import { getDependencyVersions } from "./pkg.js";
5
- import { createBaseTypeFiles } from "./app-types.js";
6
- import type { AppSpec } from "./app-inferrer.js";
7
7
 
8
8
  const targetDir = process.cwd();
9
9
 
@@ -250,8 +250,8 @@ export function createWebFiles(spec: AppSpec): void {
250
250
  "",
251
251
  "## Commands",
252
252
  "",
253
- "- \`npm run dev\` strings",
254
- "- \`npm run build\` strings",
255
- "- \`npm run test\` strings",
253
+ "- `npm run dev` strings",
254
+ "- `npm run build` strings",
255
+ "- `npm run test` strings",
256
256
  ].join("\n"));
257
257
  }
@@ -1,6 +1,6 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
- import { ensureDir, writeTextFile, writeJsonFile, computeTypesHash } from "./fs.js";
3
+ import { computeTypesHash, ensureDir, writeTextFile } from "./fs.js";
4
4
  import { getConfiguredPaths } from "./memory.js";
5
5
  import { UI } from "./ui.js";
6
6
 
@@ -10,13 +10,13 @@ import { registerGlobalAntigravityPlugins } from "./shared.js";
10
10
  export const ADAPTER_CONFIGS: Record<AdapterId, AdapterConfig> = {
11
11
  gemini: {
12
12
  id: "gemini",
13
- frameworkDir: ".antigravity",
13
+ frameworkDir: ".gemini",
14
14
  shimFile: "GEMINI.md",
15
15
  shimTemplate: "src/cli/shims/gemini.md",
16
16
  role: "commander",
17
17
  templateDir: ".enderun",
18
- nestedDirs: ["plugins", "rules"],
19
- agentsDir: ".antigravity/plugins",
18
+ nestedDirs: ["agents", "rules"],
19
+ agentsDir: ".gemini/agents",
20
20
  agentsExt: ".md"
21
21
  },
22
22
  claude: {