@auto-engineer/frontend-implementer 0.13.3 → 0.15.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.
package/package.json CHANGED
@@ -19,24 +19,20 @@
19
19
  "openai": "^5.7.0",
20
20
  "vite": "^5.4.1",
21
21
  "zod": "^3.25.67",
22
- "@auto-engineer/ai-gateway": "0.13.3",
23
- "@auto-engineer/message-bus": "0.13.3"
22
+ "@auto-engineer/message-bus": "0.15.0",
23
+ "@auto-engineer/ai-gateway": "0.15.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "playwright": "^1.54.1",
27
- "@auto-engineer/cli": "0.13.3"
27
+ "@auto-engineer/cli": "0.15.0"
28
28
  },
29
- "version": "0.13.3",
29
+ "version": "0.15.0",
30
30
  "scripts": {
31
31
  "start": "tsx src/index.ts",
32
32
  "build": "tsc && tsx ../../scripts/fix-esm-imports.ts && cp src/*.html dist/src/ 2>/dev/null || true",
33
33
  "test": "vitest run --reporter=dot",
34
34
  "ai-agent": "tsx -r dotenv/config src/agent-cli.ts",
35
- "lint": "eslint 'src/**/*.ts' --max-warnings 0 --config ../../eslint.config.ts",
36
35
  "type-check": "tsc --noEmit",
37
- "format": "prettier --write \"**/*.{js,ts,json,md,yml,yaml}\" --ignore-path ../../.prettierignore --log-level warn",
38
- "lint:fix": "eslint 'src/**/*.ts' --fix --config ../../eslint.config.ts",
39
- "format:fix": "prettier --write \"**/*.{js,ts,json,md,yml,yaml}\" --ignore-path ../../.prettierignore --log-level warn",
40
36
  "link:dev": "pnpm build && pnpm link --global",
41
37
  "unlink:dev": "pnpm unlink --global"
42
38
  }
package/src/agent.ts CHANGED
@@ -1,8 +1,8 @@
1
+ import * as fs from 'node:fs/promises';
2
+ import * as path from 'node:path';
1
3
  import { generateTextWithAI } from '@auto-engineer/ai-gateway';
2
- import * as fs from 'fs/promises';
3
- import * as path from 'path';
4
- import * as ts from 'typescript';
5
4
  import createDebug from 'debug';
5
+ import * as ts from 'typescript';
6
6
 
7
7
  const debug = createDebug('auto:frontend-implementer:agent');
8
8
  const debugPlan = createDebug('auto:frontend-implementer:agent:plan');
@@ -102,7 +102,7 @@ const provider = undefined;
102
102
  function extractJsonArray(text: string): string {
103
103
  debugAI('Extracting JSON array from text of length: %d', text.length);
104
104
  const codeBlockMatch = text.match(/```(?:json)?\s*([\s\S]*?)\s*```/);
105
- if (codeBlockMatch && codeBlockMatch[1]) {
105
+ if (codeBlockMatch?.[1]) {
106
106
  debugAI('Found JSON in code block');
107
107
  return codeBlockMatch[1].trim();
108
108
  }
@@ -250,7 +250,7 @@ async function getTheme(designSystem: string): Promise<string> {
250
250
  debugContext('Extracting theme from design system, content length: %d', designSystem.length);
251
251
  try {
252
252
  const themeMatch = designSystem.match(/## Theme\s*\n([\s\S]*?)(?=\n## |\n# |\n*$)/);
253
- if (themeMatch && themeMatch[1]) {
253
+ if (themeMatch?.[1]) {
254
254
  const theme = themeMatch[1].trim();
255
255
  debugContext('Theme extracted, length: %d', theme.length);
256
256
  return theme;
@@ -1,6 +1,6 @@
1
- import { type Command, type Event, defineCommandHandler } from '@auto-engineer/message-bus';
2
- import { runAIAgent } from '../agent';
1
+ import { type Command, defineCommandHandler, type Event } from '@auto-engineer/message-bus';
3
2
  import createDebug from 'debug';
3
+ import { runAIAgent } from '../agent';
4
4
 
5
5
  const debug = createDebug('auto:frontend-implementer:implement-client');
6
6
 
@@ -36,6 +36,7 @@ export const commandHandler = defineCommandHandler<
36
36
  (command: ImplementClientCommand) => Promise<ClientImplementedEvent | ClientImplementationFailedEvent>
37
37
  >({
38
38
  name: 'ImplementClient',
39
+ displayName: 'Implement Client',
39
40
  alias: 'implement:client',
40
41
  description: 'AI implements client',
41
42
  category: 'implement',
@@ -61,7 +62,10 @@ export const commandHandler = defineCommandHandler<
61
62
  examples: [
62
63
  '$ auto implement:client --project-dir=./client --ia-scheme-dir=./.context --design-system-path=./design-system.md',
63
64
  ],
64
- events: ['ClientImplemented', 'ClientImplementationFailed'],
65
+ events: [
66
+ { name: 'ClientImplemented', displayName: 'Client Implemented' },
67
+ { name: 'ClientImplementationFailed', displayName: 'Client Implementation Failed' },
68
+ ],
65
69
  handle: async (
66
70
  command: ImplementClientCommand,
67
71
  ): Promise<ClientImplementedEvent | ClientImplementationFailedEvent> => {
package/src/index.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  import { commandHandler as implementClientHandler } from './commands/implement-client.js';
3
3
  export const COMMANDS = [implementClientHandler];
4
4
  export type {
5
+ ClientImplementationFailedEvent,
6
+ ClientImplementedEvent,
5
7
  ImplementClientCommand,
6
8
  ImplementClientEvents,
7
- ClientImplementedEvent,
8
- ClientImplementationFailedEvent,
9
9
  } from './commands/implement-client.js';