@auto-engineer/server-implementer 0.6.4 → 0.7.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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +4 -4
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +21 -0
- package/dist/commands/implement-server.d.ts +11 -42
- package/dist/commands/implement-server.d.ts.map +1 -1
- package/dist/commands/implement-server.js +30 -26
- package/dist/commands/implement-server.js.map +1 -1
- package/dist/commands/implement-slice.d.ts +15 -46
- package/dist/commands/implement-slice.d.ts.map +1 -1
- package/dist/commands/implement-slice.js +33 -25
- package/dist/commands/implement-slice.js.map +1 -1
- package/dist/index.d.ts +26 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/commands/implement-server.ts +34 -35
- package/src/commands/implement-slice.ts +37 -34
- package/src/index.ts +4 -4
- package/.turbo/turbo-format.log +0 -20
- package/.turbo/turbo-lint.log +0 -5
- package/dist/cli-manifest.d.ts +0 -3
- package/dist/cli-manifest.d.ts.map +0 -1
- package/dist/cli-manifest.js +0 -37
- package/dist/cli-manifest.js.map +0 -1
- package/src/cli-manifest.ts +0 -39
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @auto-engineer/server-implementer@0.
|
|
2
|
+
> @auto-engineer/server-implementer@0.7.0 build /home/runner/work/auto-engineer/auto-engineer/packages/server-implementer
|
|
3
3
|
> tsc && tsx ../../scripts/fix-esm-imports.ts
|
|
4
4
|
|
|
5
5
|
Fixed ESM imports in dist/
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
> @auto-engineer/server-implementer@0.
|
|
2
|
+
> @auto-engineer/server-implementer@0.7.0 test /home/runner/work/auto-engineer/auto-engineer/packages/server-implementer
|
|
3
3
|
> vitest run
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
RUN
|
|
6
|
+
[1m[46m RUN [49m[22m [36mv3.2.4 [39m[90m/home/runner/work/auto-engineer/auto-engineer/packages/server-implementer[39m
|
|
7
7
|
|
|
8
8
|
No test files found, exiting with code 0
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
[2minclude: [22m[33m**/*.specs.{js,ts}[39m
|
|
11
|
+
[2mexclude: [22m[33m**/.tmp/**[2m, [22m**/node_modules/**[2m, [22m**/dist/**[39m
|
|
12
12
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @auto-engineer/server-implementer@0.
|
|
2
|
+
> @auto-engineer/server-implementer@0.7.0 type-check /home/runner/work/auto-engineer/auto-engineer/packages/server-implementer
|
|
3
3
|
> tsc --noEmit
|
|
4
4
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @auto-engineer/server-implementer
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- add command details in dashboard
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @auto-engineer/ai-gateway@0.7.0
|
|
13
|
+
- @auto-engineer/message-bus@0.6.0
|
|
14
|
+
|
|
15
|
+
## 0.6.5
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Bump versions
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @auto-engineer/ai-gateway@0.6.3
|
|
22
|
+
- @auto-engineer/message-bus@0.5.5
|
|
23
|
+
|
|
3
24
|
## 0.6.4
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare const implementServerManifest: {
|
|
3
|
-
handler: () => Promise<{
|
|
4
|
-
default: CommandHandler<Readonly<{
|
|
5
|
-
type: "ImplementServer";
|
|
6
|
-
data: Readonly<{
|
|
7
|
-
serverDirectory: string;
|
|
8
|
-
}>;
|
|
9
|
-
timestamp?: Date;
|
|
10
|
-
requestId?: string;
|
|
11
|
-
correlationId?: string;
|
|
12
|
-
}>, Readonly<{
|
|
13
|
-
type: "ServerImplemented";
|
|
14
|
-
data: {
|
|
15
|
-
serverDirectory: string;
|
|
16
|
-
flowsImplemented: number;
|
|
17
|
-
};
|
|
18
|
-
timestamp?: Date;
|
|
19
|
-
requestId?: string;
|
|
20
|
-
correlationId?: string;
|
|
21
|
-
}> | Readonly<{
|
|
22
|
-
type: "ServerImplementationFailed";
|
|
23
|
-
data: {
|
|
24
|
-
serverDirectory: string;
|
|
25
|
-
error: string;
|
|
26
|
-
};
|
|
27
|
-
timestamp?: Date;
|
|
28
|
-
requestId?: string;
|
|
29
|
-
correlationId?: string;
|
|
30
|
-
}>>;
|
|
31
|
-
}>;
|
|
32
|
-
description: string;
|
|
33
|
-
usage: string;
|
|
34
|
-
examples: string[];
|
|
35
|
-
args: {
|
|
36
|
-
name: string;
|
|
37
|
-
description: string;
|
|
38
|
-
required: boolean;
|
|
39
|
-
}[];
|
|
40
|
-
};
|
|
1
|
+
import { type Command, type Event } from '@auto-engineer/message-bus';
|
|
41
2
|
export type ImplementServerCommand = Command<'ImplementServer', {
|
|
42
3
|
serverDirectory: string;
|
|
43
4
|
}>;
|
|
@@ -49,6 +10,14 @@ export type ServerImplementationFailedEvent = Event<'ServerImplementationFailed'
|
|
|
49
10
|
serverDirectory: string;
|
|
50
11
|
error: string;
|
|
51
12
|
}>;
|
|
52
|
-
export declare const
|
|
53
|
-
|
|
13
|
+
export declare const commandHandler: import("@auto-engineer/message-bus").UnifiedCommandHandler<Readonly<{
|
|
14
|
+
type: "ImplementServer";
|
|
15
|
+
data: Readonly<{
|
|
16
|
+
serverDirectory: string;
|
|
17
|
+
}>;
|
|
18
|
+
timestamp?: Date;
|
|
19
|
+
requestId?: string;
|
|
20
|
+
correlationId?: string;
|
|
21
|
+
}>>;
|
|
22
|
+
export default commandHandler;
|
|
54
23
|
//# sourceMappingURL=implement-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implement-server.d.ts","sourceRoot":"","sources":["../../src/commands/implement-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"implement-server.d.ts","sourceRoot":"","sources":["../../src/commands/implement-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAwB,MAAM,4BAA4B,CAAC;AAW5F,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAC1C,iBAAiB,EACjB;IACE,eAAe,EAAE,MAAM,CAAC;CACzB,CACF,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CACxC,mBAAmB,EACnB;IACE,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CACF,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,KAAK,CACjD,4BAA4B,EAC5B;IACE,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,CACF,CAAC;AAEF,eAAO,MAAM,cAAc;;;yBApBN,MAAM;;;;;GAkDzB,CAAC;AA+EH,eAAe,cAAc,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defineCommandHandler } from '@auto-engineer/message-bus';
|
|
1
2
|
import path from 'path';
|
|
2
3
|
import { existsSync } from 'fs';
|
|
3
4
|
import { runFlows } from '../agent/runFlows.js';
|
|
@@ -6,13 +7,35 @@ const debug = createDebug('server-impl:command');
|
|
|
6
7
|
const debugHandler = createDebug('server-impl:command:handler');
|
|
7
8
|
const debugProcess = createDebug('server-impl:command:process');
|
|
8
9
|
const debugResult = createDebug('server-impl:command:result');
|
|
9
|
-
export const
|
|
10
|
-
|
|
10
|
+
export const commandHandler = defineCommandHandler({
|
|
11
|
+
name: 'ImplementServer',
|
|
12
|
+
alias: 'implement:server',
|
|
11
13
|
description: 'AI implements server TODOs and tests',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
category: 'implement',
|
|
15
|
+
fields: {
|
|
16
|
+
serverDirectory: {
|
|
17
|
+
description: 'Server directory path',
|
|
18
|
+
required: true,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
examples: ['$ auto implement:server --server-directory=./server'],
|
|
22
|
+
handle: async (command) => {
|
|
23
|
+
debug('CommandHandler executing for ImplementServer');
|
|
24
|
+
const result = await handleImplementServerCommandInternal(command);
|
|
25
|
+
if (result.type === 'ServerImplemented') {
|
|
26
|
+
debug('Command handler completed: success');
|
|
27
|
+
debug('✅ Server implementation completed successfully');
|
|
28
|
+
if (result.data.flowsImplemented > 0) {
|
|
29
|
+
debug(' %d flows implemented', result.data.flowsImplemented);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
debug('Command handler completed: failure - %s', result.data.error);
|
|
34
|
+
debug('❌ Server implementation failed: %s', result.data.error);
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
},
|
|
38
|
+
});
|
|
16
39
|
async function handleImplementServerCommandInternal(command) {
|
|
17
40
|
const { serverDirectory } = command.data;
|
|
18
41
|
debug('Handling ImplementServerCommand');
|
|
@@ -75,25 +98,6 @@ async function handleImplementServerCommandInternal(command) {
|
|
|
75
98
|
};
|
|
76
99
|
}
|
|
77
100
|
}
|
|
78
|
-
export const implementServerCommandHandler = {
|
|
79
|
-
name: 'ImplementServer',
|
|
80
|
-
handle: async (command) => {
|
|
81
|
-
debug('CommandHandler executing for ImplementServer');
|
|
82
|
-
const result = await handleImplementServerCommandInternal(command);
|
|
83
|
-
if (result.type === 'ServerImplemented') {
|
|
84
|
-
debug('Command handler completed: success');
|
|
85
|
-
debug('✅ Server implementation completed successfully');
|
|
86
|
-
if (result.data.flowsImplemented > 0) {
|
|
87
|
-
debug(' %d flows implemented', result.data.flowsImplemented);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
debug('Command handler completed: failure - %s', result.data.error);
|
|
92
|
-
debug('❌ Server implementation failed: %s', result.data.error);
|
|
93
|
-
}
|
|
94
|
-
return result;
|
|
95
|
-
},
|
|
96
|
-
};
|
|
97
101
|
// Default export is the command handler
|
|
98
|
-
export default
|
|
102
|
+
export default commandHandler;
|
|
99
103
|
//# sourceMappingURL=implement-server.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implement-server.js","sourceRoot":"","sources":["../../src/commands/implement-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"implement-server.js","sourceRoot":"","sources":["../../src/commands/implement-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,WAAW,MAAM,OAAO,CAAC;AAEhC,MAAM,KAAK,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;AACjD,MAAM,YAAY,GAAG,WAAW,CAAC,6BAA6B,CAAC,CAAC;AAChE,MAAM,YAAY,GAAG,WAAW,CAAC,6BAA6B,CAAC,CAAC;AAChE,MAAM,WAAW,GAAG,WAAW,CAAC,4BAA4B,CAAC,CAAC;AAyB9D,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAyB;IACzE,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,sCAAsC;IACnD,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE;QACN,eAAe,EAAE;YACf,WAAW,EAAE,uBAA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,CAAC,CAAC;QAC5C,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;QAEvF,OAAO;YACL,IAAI,EAAE,4BAA4B;YAClC,IAAI,EAAE;gBACJ,eAAe;gBACf,KAAK,EAAE,YAAY;aACpB;YACD,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;SACrC,CAAC;IACJ,CAAC;AACH,CAAC;AAED,wCAAwC;AACxC,eAAe,cAAc,CAAC"}
|
|
@@ -1,47 +1,4 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare const implementSliceManifest: {
|
|
3
|
-
handler: () => Promise<{
|
|
4
|
-
default: CommandHandler<Readonly<{
|
|
5
|
-
type: "ImplementSlice";
|
|
6
|
-
data: Readonly<{
|
|
7
|
-
slicePath: string;
|
|
8
|
-
context?: {
|
|
9
|
-
previousOutputs?: string;
|
|
10
|
-
attemptNumber?: number;
|
|
11
|
-
};
|
|
12
|
-
}>;
|
|
13
|
-
timestamp?: Date;
|
|
14
|
-
requestId?: string;
|
|
15
|
-
correlationId?: string;
|
|
16
|
-
}>, Readonly<{
|
|
17
|
-
type: "SliceImplemented";
|
|
18
|
-
data: {
|
|
19
|
-
slicePath: string;
|
|
20
|
-
filesImplemented: string[];
|
|
21
|
-
};
|
|
22
|
-
timestamp?: Date;
|
|
23
|
-
requestId?: string;
|
|
24
|
-
correlationId?: string;
|
|
25
|
-
}> | Readonly<{
|
|
26
|
-
type: "SliceImplementationFailed";
|
|
27
|
-
data: {
|
|
28
|
-
slicePath: string;
|
|
29
|
-
error: string;
|
|
30
|
-
};
|
|
31
|
-
timestamp?: Date;
|
|
32
|
-
requestId?: string;
|
|
33
|
-
correlationId?: string;
|
|
34
|
-
}>>;
|
|
35
|
-
}>;
|
|
36
|
-
description: string;
|
|
37
|
-
usage: string;
|
|
38
|
-
examples: string[];
|
|
39
|
-
args: {
|
|
40
|
-
name: string;
|
|
41
|
-
description: string;
|
|
42
|
-
required: boolean;
|
|
43
|
-
}[];
|
|
44
|
-
};
|
|
1
|
+
import { type Command, type Event } from '@auto-engineer/message-bus';
|
|
45
2
|
export type ImplementSliceCommand = Command<'ImplementSlice', {
|
|
46
3
|
slicePath: string;
|
|
47
4
|
context?: {
|
|
@@ -57,7 +14,19 @@ export type SliceImplementationFailedEvent = Event<'SliceImplementationFailed',
|
|
|
57
14
|
slicePath: string;
|
|
58
15
|
error: string;
|
|
59
16
|
}>;
|
|
17
|
+
export declare const commandHandler: import("@auto-engineer/message-bus").UnifiedCommandHandler<Readonly<{
|
|
18
|
+
type: "ImplementSlice";
|
|
19
|
+
data: Readonly<{
|
|
20
|
+
slicePath: string;
|
|
21
|
+
context?: {
|
|
22
|
+
previousOutputs?: string;
|
|
23
|
+
attemptNumber?: number;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
timestamp?: Date;
|
|
27
|
+
requestId?: string;
|
|
28
|
+
correlationId?: string;
|
|
29
|
+
}>>;
|
|
60
30
|
export declare function handleImplementSliceCommand(command: ImplementSliceCommand): Promise<SliceImplementedEvent | SliceImplementationFailedEvent>;
|
|
61
|
-
export
|
|
62
|
-
export default implementSliceCommandHandler;
|
|
31
|
+
export default commandHandler;
|
|
63
32
|
//# sourceMappingURL=implement-slice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implement-slice.d.ts","sourceRoot":"","sources":["../../src/commands/implement-slice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"implement-slice.d.ts","sourceRoot":"","sources":["../../src/commands/implement-slice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAwB,MAAM,4BAA4B,CAAC;AAa5F,MAAM,MAAM,qBAAqB,GAAG,OAAO,CACzC,gBAAgB,EAChB;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE;QACR,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,CACF,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,KAAK,CACvC,kBAAkB,EAClB;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CACF,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAChD,2BAA2B,EAC3B;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,CACF,CAAC;AAEF,eAAO,MAAM,cAAc;;;mBAxBZ,MAAM;kBACP;YACR,eAAe,CAAC,EAAE,MAAM,CAAC;YACzB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;;;;;GAqDH,CAAC;AAuOH,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,qBAAqB,GAAG,8BAA8B,CAAC,CAmCjE;AAGD,eAAe,cAAc,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defineCommandHandler } from '@auto-engineer/message-bus';
|
|
1
2
|
import { generateTextWithAI, getAvailableProviders } from '@auto-engineer/ai-gateway';
|
|
2
3
|
import path from 'path';
|
|
3
4
|
import { existsSync } from 'fs';
|
|
@@ -8,15 +9,40 @@ const debug = createDebug('server-impl:slice');
|
|
|
8
9
|
const debugHandler = createDebug('server-impl:slice:handler');
|
|
9
10
|
const debugProcess = createDebug('server-impl:slice:process');
|
|
10
11
|
const debugResult = createDebug('server-impl:slice:result');
|
|
11
|
-
export const
|
|
12
|
-
|
|
12
|
+
export const commandHandler = defineCommandHandler({
|
|
13
|
+
name: 'ImplementSlice',
|
|
14
|
+
alias: 'implement:slice',
|
|
13
15
|
description: 'AI implements a specific server slice',
|
|
14
|
-
|
|
16
|
+
category: 'implement',
|
|
17
|
+
fields: {
|
|
18
|
+
slicePath: {
|
|
19
|
+
description: 'Path to the slice directory to implement',
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
context: {
|
|
23
|
+
description: 'Context for retry attempts with previous outputs',
|
|
24
|
+
required: false,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
15
27
|
examples: [
|
|
16
|
-
'$ auto implement:slice
|
|
28
|
+
'$ auto implement:slice --slice-path=./server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant',
|
|
17
29
|
],
|
|
18
|
-
|
|
19
|
-
|
|
30
|
+
handle: async (command) => {
|
|
31
|
+
debug('CommandHandler executing for ImplementSlice');
|
|
32
|
+
const result = await handleImplementSliceCommand(command);
|
|
33
|
+
if (result.type === 'SliceImplemented') {
|
|
34
|
+
debug('Command handler completed: success');
|
|
35
|
+
debug('✅ Slice implementation completed successfully');
|
|
36
|
+
debug(' Slice: %s', path.basename(result.data.slicePath));
|
|
37
|
+
debug(' Files implemented: %d', result.data.filesImplemented.length);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
debug('Command handler completed: failure - %s', result.data.error);
|
|
41
|
+
debug('❌ Slice implementation failed: %s', result.data.error);
|
|
42
|
+
}
|
|
43
|
+
return result;
|
|
44
|
+
},
|
|
45
|
+
});
|
|
20
46
|
// Helper function to extract code block from AI response
|
|
21
47
|
function extractCodeBlock(text) {
|
|
22
48
|
return text
|
|
@@ -247,24 +273,6 @@ export async function handleImplementSliceCommand(command) {
|
|
|
247
273
|
return createFailedEvent(command, errorMessage);
|
|
248
274
|
}
|
|
249
275
|
}
|
|
250
|
-
export const implementSliceCommandHandler = {
|
|
251
|
-
name: 'ImplementSlice',
|
|
252
|
-
handle: async (command) => {
|
|
253
|
-
debug('CommandHandler executing for ImplementSlice');
|
|
254
|
-
const result = await handleImplementSliceCommand(command);
|
|
255
|
-
if (result.type === 'SliceImplemented') {
|
|
256
|
-
debug('Command handler completed: success');
|
|
257
|
-
debug('✅ Slice implementation completed successfully');
|
|
258
|
-
debug(' Slice: %s', path.basename(result.data.slicePath));
|
|
259
|
-
debug(' Files implemented: %d', result.data.filesImplemented.length);
|
|
260
|
-
}
|
|
261
|
-
else {
|
|
262
|
-
debug('Command handler completed: failure - %s', result.data.error);
|
|
263
|
-
debug('❌ Slice implementation failed: %s', result.data.error);
|
|
264
|
-
}
|
|
265
|
-
return result;
|
|
266
|
-
},
|
|
267
|
-
};
|
|
268
276
|
// Default export is the command handler
|
|
269
|
-
export default
|
|
277
|
+
export default commandHandler;
|
|
270
278
|
//# sourceMappingURL=implement-slice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"implement-slice.js","sourceRoot":"","sources":["../../src/commands/implement-slice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"implement-slice.js","sourceRoot":"","sources":["../../src/commands/implement-slice.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,MAAM,WAAW,CAAC;AAC3B,OAAO,WAAW,MAAM,OAAO,CAAC;AAEhC,MAAM,KAAK,GAAG,WAAW,CAAC,mBAAmB,CAAC,CAAC;AAC/C,MAAM,YAAY,GAAG,WAAW,CAAC,2BAA2B,CAAC,CAAC;AAC9D,MAAM,YAAY,GAAG,WAAW,CAAC,2BAA2B,CAAC,CAAC;AAC9D,MAAM,WAAW,GAAG,WAAW,CAAC,0BAA0B,CAAC,CAAC;AA6B5D,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAwB;IACxE,IAAI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,GAAG,MAAM,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAExD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,OAAO,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,IAAI,uBAAuB,CAAC,CAAC;QAC7E,CAAC;QAED,WAAW,CAAC,mBAAmB,CAAC,CAAC;QACjC,WAAW,CAAC,uBAAuB,EAAE,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACrE,WAAW,CAAC,WAAW,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7D,WAAW,CAAC,2CAA2C,CAAC,CAAC;QAEzD,OAAO,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAC9D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;QAC5C,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;QACvF,OAAO,iBAAiB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAClD,CAAC;AACH,CAAC;AAED,wCAAwC;AACxC,eAAe,cAAc,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { commandHandler as implementServerHandler } from './commands/implement-server';
|
|
2
|
+
import { commandHandler as implementSliceHandler } from './commands/implement-slice';
|
|
3
|
+
export declare const COMMANDS: (import("@auto-engineer/message-bus").UnifiedCommandHandler<Readonly<{
|
|
4
|
+
type: "ImplementServer";
|
|
5
|
+
data: Readonly<{
|
|
6
|
+
serverDirectory: string;
|
|
7
|
+
}>;
|
|
8
|
+
timestamp?: Date;
|
|
9
|
+
requestId?: string;
|
|
10
|
+
correlationId?: string;
|
|
11
|
+
}>> | import("@auto-engineer/message-bus").UnifiedCommandHandler<Readonly<{
|
|
12
|
+
type: "ImplementSlice";
|
|
13
|
+
data: Readonly<{
|
|
14
|
+
slicePath: string;
|
|
15
|
+
context?: {
|
|
16
|
+
previousOutputs?: string;
|
|
17
|
+
attemptNumber?: number;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
timestamp?: Date;
|
|
21
|
+
requestId?: string;
|
|
22
|
+
correlationId?: string;
|
|
23
|
+
}>>)[];
|
|
24
|
+
export { implementServerHandler, implementSliceHandler };
|
|
25
|
+
export { type ImplementServerCommand, type ServerImplementedEvent, type ServerImplementationFailedEvent, } from './commands/implement-server';
|
|
26
|
+
export { handleImplementSliceCommand, type ImplementSliceCommand, type SliceImplementedEvent, type SliceImplementationFailedEvent, } from './commands/implement-slice';
|
|
4
27
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAErF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;2BAagE,CAAC;yBAA6B,CAAC;;;;;;MAb7C,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;AACzD,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,GACrC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,2BAA2B,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,GACpC,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { commandHandler as implementServerHandler } from './commands/implement-server.js';
|
|
2
|
+
import { commandHandler as implementSliceHandler } from './commands/implement-slice.js';
|
|
3
|
+
export const COMMANDS = [implementServerHandler, implementSliceHandler];
|
|
4
|
+
export { implementServerHandler, implementSliceHandler };
|
|
5
|
+
export { handleImplementSliceCommand, } from './commands/implement-slice.js';
|
|
4
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAErF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,sBAAsB,EAAE,qBAAqB,CAAC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;AAMzD,OAAO,EACL,2BAA2B,GAI5B,MAAM,4BAA4B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auto-engineer/server-implementer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@auto-engineer/ai-gateway": "^0.
|
|
18
|
-
"@auto-engineer/message-bus": "^0.
|
|
17
|
+
"@auto-engineer/ai-gateway": "^0.7.0",
|
|
18
|
+
"@auto-engineer/message-bus": "^0.6.0",
|
|
19
19
|
"@modelcontextprotocol/sdk": "^1.3.0",
|
|
20
20
|
"debug": "^4.3.4",
|
|
21
21
|
"fast-glob": "^3.3.3",
|
|
22
22
|
"vite": "^5.4.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@auto-engineer/cli": "^0.
|
|
25
|
+
"@auto-engineer/cli": "^0.8.0",
|
|
26
26
|
"@types/fs-extra": "^11.0.4",
|
|
27
27
|
"dotenv": "^16.6.1",
|
|
28
28
|
"execa": "^9.6.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Command, type Event, defineCommandHandler } from '@auto-engineer/message-bus';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { existsSync } from 'fs';
|
|
4
4
|
import { runFlows } from '../agent/runFlows';
|
|
@@ -9,14 +9,6 @@ const debugHandler = createDebug('server-impl:command:handler');
|
|
|
9
9
|
const debugProcess = createDebug('server-impl:command:process');
|
|
10
10
|
const debugResult = createDebug('server-impl:command:result');
|
|
11
11
|
|
|
12
|
-
export const implementServerManifest = {
|
|
13
|
-
handler: () => Promise.resolve({ default: implementServerCommandHandler }),
|
|
14
|
-
description: 'AI implements server TODOs and tests',
|
|
15
|
-
usage: 'implement:server <server-dir>',
|
|
16
|
-
examples: ['$ auto implement:server ./server'],
|
|
17
|
-
args: [{ name: 'server-dir', description: 'Server directory path', required: true }],
|
|
18
|
-
};
|
|
19
|
-
|
|
20
12
|
export type ImplementServerCommand = Command<
|
|
21
13
|
'ImplementServer',
|
|
22
14
|
{
|
|
@@ -40,6 +32,38 @@ export type ServerImplementationFailedEvent = Event<
|
|
|
40
32
|
}
|
|
41
33
|
>;
|
|
42
34
|
|
|
35
|
+
export const commandHandler = defineCommandHandler<ImplementServerCommand>({
|
|
36
|
+
name: 'ImplementServer',
|
|
37
|
+
alias: 'implement:server',
|
|
38
|
+
description: 'AI implements server TODOs and tests',
|
|
39
|
+
category: 'implement',
|
|
40
|
+
fields: {
|
|
41
|
+
serverDirectory: {
|
|
42
|
+
description: 'Server directory path',
|
|
43
|
+
required: true,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
examples: ['$ auto implement:server --server-directory=./server'],
|
|
47
|
+
handle: async (
|
|
48
|
+
command: ImplementServerCommand,
|
|
49
|
+
): Promise<ServerImplementedEvent | ServerImplementationFailedEvent> => {
|
|
50
|
+
debug('CommandHandler executing for ImplementServer');
|
|
51
|
+
const result = await handleImplementServerCommandInternal(command);
|
|
52
|
+
|
|
53
|
+
if (result.type === 'ServerImplemented') {
|
|
54
|
+
debug('Command handler completed: success');
|
|
55
|
+
debug('✅ Server implementation completed successfully');
|
|
56
|
+
if (result.data.flowsImplemented > 0) {
|
|
57
|
+
debug(' %d flows implemented', result.data.flowsImplemented);
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
debug('Command handler completed: failure - %s', result.data.error);
|
|
61
|
+
debug('❌ Server implementation failed: %s', result.data.error);
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
43
67
|
async function handleImplementServerCommandInternal(
|
|
44
68
|
command: ImplementServerCommand,
|
|
45
69
|
): Promise<ServerImplementedEvent | ServerImplementationFailedEvent> {
|
|
@@ -116,30 +140,5 @@ async function handleImplementServerCommandInternal(
|
|
|
116
140
|
}
|
|
117
141
|
}
|
|
118
142
|
|
|
119
|
-
export const implementServerCommandHandler: CommandHandler<
|
|
120
|
-
ImplementServerCommand,
|
|
121
|
-
ServerImplementedEvent | ServerImplementationFailedEvent
|
|
122
|
-
> = {
|
|
123
|
-
name: 'ImplementServer',
|
|
124
|
-
handle: async (
|
|
125
|
-
command: ImplementServerCommand,
|
|
126
|
-
): Promise<ServerImplementedEvent | ServerImplementationFailedEvent> => {
|
|
127
|
-
debug('CommandHandler executing for ImplementServer');
|
|
128
|
-
const result = await handleImplementServerCommandInternal(command);
|
|
129
|
-
|
|
130
|
-
if (result.type === 'ServerImplemented') {
|
|
131
|
-
debug('Command handler completed: success');
|
|
132
|
-
debug('✅ Server implementation completed successfully');
|
|
133
|
-
if (result.data.flowsImplemented > 0) {
|
|
134
|
-
debug(' %d flows implemented', result.data.flowsImplemented);
|
|
135
|
-
}
|
|
136
|
-
} else {
|
|
137
|
-
debug('Command handler completed: failure - %s', result.data.error);
|
|
138
|
-
debug('❌ Server implementation failed: %s', result.data.error);
|
|
139
|
-
}
|
|
140
|
-
return result;
|
|
141
|
-
},
|
|
142
|
-
};
|
|
143
|
-
|
|
144
143
|
// Default export is the command handler
|
|
145
|
-
export default
|
|
144
|
+
export default commandHandler;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Command, type Event, defineCommandHandler } from '@auto-engineer/message-bus';
|
|
2
2
|
import { generateTextWithAI, getAvailableProviders } from '@auto-engineer/ai-gateway';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { existsSync } from 'fs';
|
|
@@ -11,16 +11,6 @@ const debugHandler = createDebug('server-impl:slice:handler');
|
|
|
11
11
|
const debugProcess = createDebug('server-impl:slice:process');
|
|
12
12
|
const debugResult = createDebug('server-impl:slice:result');
|
|
13
13
|
|
|
14
|
-
export const implementSliceManifest = {
|
|
15
|
-
handler: () => Promise.resolve({ default: implementSliceCommandHandler }),
|
|
16
|
-
description: 'AI implements a specific server slice',
|
|
17
|
-
usage: 'implement:slice <slice-path>',
|
|
18
|
-
examples: [
|
|
19
|
-
'$ auto implement:slice ./server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant',
|
|
20
|
-
],
|
|
21
|
-
args: [{ name: 'slice-path', description: 'Path to the slice directory to implement', required: true }],
|
|
22
|
-
};
|
|
23
|
-
|
|
24
14
|
export type ImplementSliceCommand = Command<
|
|
25
15
|
'ImplementSlice',
|
|
26
16
|
{
|
|
@@ -48,6 +38,41 @@ export type SliceImplementationFailedEvent = Event<
|
|
|
48
38
|
}
|
|
49
39
|
>;
|
|
50
40
|
|
|
41
|
+
export const commandHandler = defineCommandHandler<ImplementSliceCommand>({
|
|
42
|
+
name: 'ImplementSlice',
|
|
43
|
+
alias: 'implement:slice',
|
|
44
|
+
description: 'AI implements a specific server slice',
|
|
45
|
+
category: 'implement',
|
|
46
|
+
fields: {
|
|
47
|
+
slicePath: {
|
|
48
|
+
description: 'Path to the slice directory to implement',
|
|
49
|
+
required: true,
|
|
50
|
+
},
|
|
51
|
+
context: {
|
|
52
|
+
description: 'Context for retry attempts with previous outputs',
|
|
53
|
+
required: false,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
examples: [
|
|
57
|
+
'$ auto implement:slice --slice-path=./server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant',
|
|
58
|
+
],
|
|
59
|
+
handle: async (command: ImplementSliceCommand): Promise<SliceImplementedEvent | SliceImplementationFailedEvent> => {
|
|
60
|
+
debug('CommandHandler executing for ImplementSlice');
|
|
61
|
+
const result = await handleImplementSliceCommand(command);
|
|
62
|
+
|
|
63
|
+
if (result.type === 'SliceImplemented') {
|
|
64
|
+
debug('Command handler completed: success');
|
|
65
|
+
debug('✅ Slice implementation completed successfully');
|
|
66
|
+
debug(' Slice: %s', path.basename(result.data.slicePath));
|
|
67
|
+
debug(' Files implemented: %d', result.data.filesImplemented.length);
|
|
68
|
+
} else {
|
|
69
|
+
debug('Command handler completed: failure - %s', result.data.error);
|
|
70
|
+
debug('❌ Slice implementation failed: %s', result.data.error);
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
|
|
51
76
|
// Helper function to extract code block from AI response
|
|
52
77
|
function extractCodeBlock(text: string): string {
|
|
53
78
|
return text
|
|
@@ -316,27 +341,5 @@ export async function handleImplementSliceCommand(
|
|
|
316
341
|
}
|
|
317
342
|
}
|
|
318
343
|
|
|
319
|
-
export const implementSliceCommandHandler: CommandHandler<
|
|
320
|
-
ImplementSliceCommand,
|
|
321
|
-
SliceImplementedEvent | SliceImplementationFailedEvent
|
|
322
|
-
> = {
|
|
323
|
-
name: 'ImplementSlice',
|
|
324
|
-
handle: async (command: ImplementSliceCommand): Promise<SliceImplementedEvent | SliceImplementationFailedEvent> => {
|
|
325
|
-
debug('CommandHandler executing for ImplementSlice');
|
|
326
|
-
const result = await handleImplementSliceCommand(command);
|
|
327
|
-
|
|
328
|
-
if (result.type === 'SliceImplemented') {
|
|
329
|
-
debug('Command handler completed: success');
|
|
330
|
-
debug('✅ Slice implementation completed successfully');
|
|
331
|
-
debug(' Slice: %s', path.basename(result.data.slicePath));
|
|
332
|
-
debug(' Files implemented: %d', result.data.filesImplemented.length);
|
|
333
|
-
} else {
|
|
334
|
-
debug('Command handler completed: failure - %s', result.data.error);
|
|
335
|
-
debug('❌ Slice implementation failed: %s', result.data.error);
|
|
336
|
-
}
|
|
337
|
-
return result;
|
|
338
|
-
},
|
|
339
|
-
};
|
|
340
|
-
|
|
341
344
|
// Default export is the command handler
|
|
342
|
-
export default
|
|
345
|
+
export default commandHandler;
|
package/src/index.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { commandHandler as implementServerHandler } from './commands/implement-server';
|
|
2
|
+
import { commandHandler as implementSliceHandler } from './commands/implement-slice';
|
|
2
3
|
|
|
4
|
+
export const COMMANDS = [implementServerHandler, implementSliceHandler];
|
|
5
|
+
export { implementServerHandler, implementSliceHandler };
|
|
3
6
|
export {
|
|
4
|
-
implementServerCommandHandler,
|
|
5
7
|
type ImplementServerCommand,
|
|
6
8
|
type ServerImplementedEvent,
|
|
7
9
|
type ServerImplementationFailedEvent,
|
|
8
10
|
} from './commands/implement-server';
|
|
9
|
-
|
|
10
11
|
export {
|
|
11
|
-
implementSliceCommandHandler,
|
|
12
12
|
handleImplementSliceCommand,
|
|
13
13
|
type ImplementSliceCommand,
|
|
14
14
|
type SliceImplementedEvent,
|
package/.turbo/turbo-format.log
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
> @auto-engineer/server-implementer@0.6.1 format /Users/sam/WebstormProjects/top/auto-engineer/packages/server-implementer
|
|
4
|
-
> prettier --write "**/*.{js,ts,json,md,yml,yaml}" --ignore-path ../../.prettierignore
|
|
5
|
-
|
|
6
|
-
CHANGELOG.md[2K[1G[90mCHANGELOG.md[39m 27ms (unchanged)
|
|
7
|
-
DEBUG.md[2K[1G[90mDEBUG.md[39m 5ms (unchanged)
|
|
8
|
-
package.json[2K[1G[90mpackage.json[39m 17ms (unchanged)
|
|
9
|
-
README.md[2K[1G[90mREADME.md[39m 75ms (unchanged)
|
|
10
|
-
src/agent/runAllSlices.ts[2K[1G[90msrc/agent/runAllSlices.ts[39m 4ms (unchanged)
|
|
11
|
-
src/agent/runFlows.ts[2K[1G[90msrc/agent/runFlows.ts[39m 5ms (unchanged)
|
|
12
|
-
src/agent/runSlice.ts[2K[1G[90msrc/agent/runSlice.ts[39m 37ms (unchanged)
|
|
13
|
-
src/agent/runTests.ts[2K[1G[90msrc/agent/runTests.ts[39m 13ms (unchanged)
|
|
14
|
-
src/cli-manifest.ts[2K[1G[90msrc/cli-manifest.ts[39m 1ms (unchanged)
|
|
15
|
-
src/commands/implement-server.ts[2K[1G[90msrc/commands/implement-server.ts[39m 9ms (unchanged)
|
|
16
|
-
src/commands/implement-slice.ts[2K[1G[90msrc/commands/implement-slice.ts[39m 14ms (unchanged)
|
|
17
|
-
src/index.ts[2K[1G[90msrc/index.ts[39m 1ms (unchanged)
|
|
18
|
-
src/prompts/systemPrompt.ts[2K[1G[90msrc/prompts/systemPrompt.ts[39m 1ms (unchanged)
|
|
19
|
-
src/utils/extractCodeBlock.ts[2K[1G[90msrc/utils/extractCodeBlock.ts[39m 1ms (unchanged)
|
|
20
|
-
tsconfig.json[2K[1G[90mtsconfig.json[39m 4ms (unchanged)
|
package/.turbo/turbo-lint.log
DELETED
package/dist/cli-manifest.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-manifest.d.ts","sourceRoot":"","sources":["../src/cli-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AA+BrE,eAAO,MAAM,YAAY,EAAE,WAO1B,CAAC"}
|
package/dist/cli-manifest.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { implementServerManifest } from './commands/implement-server.js';
|
|
2
|
-
import { implementSliceManifest } from './commands/implement-slice.js';
|
|
3
|
-
import * as fs from 'fs';
|
|
4
|
-
import * as path from 'path';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
// Get version from package.json
|
|
7
|
-
const getVersion = () => {
|
|
8
|
-
try {
|
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = path.dirname(__filename);
|
|
11
|
-
// In dev: src/cli-manifest.ts -> ../../package.json
|
|
12
|
-
// In dist: dist/cli-manifest.js -> ../package.json
|
|
13
|
-
const possiblePaths = [
|
|
14
|
-
path.join(__dirname, '..', 'package.json'), // dist build
|
|
15
|
-
path.join(__dirname, '..', '..', 'package.json') // dev/src
|
|
16
|
-
];
|
|
17
|
-
for (const packageJsonPath of possiblePaths) {
|
|
18
|
-
if (fs.existsSync(packageJsonPath)) {
|
|
19
|
-
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
20
|
-
return packageJson.version;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
catch (error) {
|
|
25
|
-
// Fall through
|
|
26
|
-
}
|
|
27
|
-
return 'unknown';
|
|
28
|
-
};
|
|
29
|
-
export const CLI_MANIFEST = {
|
|
30
|
-
category: '@auto-engineer/server-implementer',
|
|
31
|
-
version: getVersion(),
|
|
32
|
-
commands: {
|
|
33
|
-
'implement:server': implementServerManifest,
|
|
34
|
-
'implement:slice': implementSliceManifest,
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=cli-manifest.js.map
|
package/dist/cli-manifest.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-manifest.js","sourceRoot":"","sources":["../src/cli-manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,gCAAgC;AAChC,MAAM,UAAU,GAAG,GAAW,EAAE;IAC9B,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC3C,oDAAoD;QACpD,mDAAmD;QACnD,MAAM,aAAa,GAAG;YACpB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAM,aAAa;YAC7D,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,UAAU;SAC5D,CAAC;QAEF,KAAK,MAAM,eAAe,IAAI,aAAa,EAAE,CAAC;YAC5C,IAAI,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;gBACnC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;gBAC1E,OAAO,WAAW,CAAC,OAAO,CAAC;YAC7B,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAe;IACjB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAgB;IACvC,QAAQ,EAAE,mCAAmC;IAC7C,OAAO,EAAE,UAAU,EAAE;IACrB,QAAQ,EAAE;QACR,kBAAkB,EAAE,uBAAuB;QAC3C,iBAAiB,EAAE,sBAAsB;KAC1C;CACF,CAAC"}
|
package/src/cli-manifest.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { CliManifest } from '@auto-engineer/cli/manifest-types';
|
|
2
|
-
import { implementServerManifest } from './commands/implement-server';
|
|
3
|
-
import { implementSliceManifest } from './commands/implement-slice';
|
|
4
|
-
import * as fs from 'fs';
|
|
5
|
-
import * as path from 'path';
|
|
6
|
-
import { fileURLToPath } from 'url';
|
|
7
|
-
|
|
8
|
-
// Get version from package.json
|
|
9
|
-
const getVersion = (): string => {
|
|
10
|
-
try {
|
|
11
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
-
const __dirname = path.dirname(__filename);
|
|
13
|
-
// In dev: src/cli-manifest.ts -> ../../package.json
|
|
14
|
-
// In dist: dist/cli-manifest.js -> ../package.json
|
|
15
|
-
const possiblePaths = [
|
|
16
|
-
path.join(__dirname, '..', 'package.json'), // dist build
|
|
17
|
-
path.join(__dirname, '..', '..', 'package.json') // dev/src
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
for (const packageJsonPath of possiblePaths) {
|
|
21
|
-
if (fs.existsSync(packageJsonPath)) {
|
|
22
|
-
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
23
|
-
return packageJson.version;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
} catch (error) {
|
|
27
|
-
// Fall through
|
|
28
|
-
}
|
|
29
|
-
return 'unknown';
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const CLI_MANIFEST: CliManifest = {
|
|
33
|
-
category: '@auto-engineer/server-implementer',
|
|
34
|
-
version: getVersion(),
|
|
35
|
-
commands: {
|
|
36
|
-
'implement:server': implementServerManifest,
|
|
37
|
-
'implement:slice': implementSliceManifest,
|
|
38
|
-
},
|
|
39
|
-
};
|