@@ -72,7 +72,7 @@ export async function generateCommand(options: GenerateOptions) {
7272 if ( ! fs . existsSync ( specPath ) ) {
7373 out . error (
7474 `Spec file not found: ${ path . relative ( process . cwd ( ) , specPath ) } ` ,
75- ' Create a plot-agent.md file describing your agent, or use --spec to specify a different file'
75+ " Create a plot-agent.md file describing your agent, or use --spec to specify a different file"
7676 ) ;
7777 process . exit ( 1 ) ;
7878 }
@@ -168,7 +168,8 @@ export async function generateCommand(options: GenerateOptions) {
168168
169169 // Call generate API
170170 try {
171- out . progress ( "Generating agent from spec..." ) ;
171+ const relativeSpecPath = path . relative ( process . cwd ( ) , specPath ) ;
172+ out . progress ( `Generate agent from ${ relativeSpecPath } ...` ) ;
172173
173174 const response = await fetch ( `${ options . apiUrl } /v1/agent/generate` , {
174175 method : "POST" ,
@@ -235,7 +236,14 @@ export async function generateCommand(options: GenerateOptions) {
235236 version : "1.0.0" ,
236237 displayName : source . displayName ,
237238 plotAgentId : agentId ,
239+ scripts : {
240+ lint : "plot agent lint" ,
241+ deploy : "plot agent deploy" ,
242+ } ,
238243 dependencies : source . dependencies ,
244+ devDependencies : {
245+ typescript : "latest" ,
246+ } ,
239247 } ;
240248 writeFile ( packageJsonPath , JSON . stringify ( packageJson , null , 2 ) + "\n" ) ;
241249
@@ -269,7 +277,10 @@ export async function generateCommand(options: GenerateOptions) {
269277 "utf-8"
270278 ) ;
271279 // Replace template variables
272- readmeTemplate = readmeTemplate . replace ( / \{ \{ d i s p l a y N a m e \} \} / g, source . displayName ) ;
280+ readmeTemplate = readmeTemplate . replace (
281+ / \{ \{ d i s p l a y N a m e \} \} / g,
282+ source . displayName
283+ ) ;
273284 readmeTemplate = readmeTemplate . replace ( / \{ \{ p a c k a g e M a n a g e r \} \} / g, "pnpm" ) ;
274285 writeFile ( readmePath , readmeTemplate ) ;
275286
0 commit comments