@agentuity/cli
Advanced tools
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmd/dev/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO,mCA8TlB,CAAC"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cmd/dev/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO,mCAuVlB,CAAC"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../src/cmd/project/download.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,UAAU,eAAe;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf;AAsBD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAyH9E;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCvE"} | ||
| {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../src/cmd/project/download.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,UAAU,eAAe;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf;AAsBD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAyH9E;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA4DvE"} |
+1
-1
| { | ||
| "name": "@agentuity/cli", | ||
| "version": "0.0.24", | ||
| "version": "0.0.25", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.ts", |
+25
-0
@@ -57,2 +57,26 @@ import { createCommand } from '../../types'; | ||
| // Track restart timestamps to detect restart loops | ||
| const restartTimestamps: number[] = []; | ||
| const MAX_RESTARTS = 10; | ||
| const TIME_WINDOW_MS = 10000; // 10 seconds | ||
| function checkRestartThrottle() { | ||
| const now = Date.now(); | ||
| restartTimestamps.push(now); | ||
| // Remove timestamps older than the time window | ||
| while (restartTimestamps.length > 0 && now - restartTimestamps[0]! > TIME_WINDOW_MS) { | ||
| restartTimestamps.shift(); | ||
| } | ||
| // Check if we've exceeded the threshold | ||
| if (restartTimestamps.length >= MAX_RESTARTS) { | ||
| tui.error(`Detected ${MAX_RESTARTS} restarts in ${TIME_WINDOW_MS / 1000} seconds`); | ||
| tui.error( | ||
| 'This usually indicates a file watcher loop (e.g., log files in the project root)' | ||
| ); | ||
| tui.fatal('Too many rapid restarts, exiting to prevent infinite loop'); | ||
| } | ||
| } | ||
| function failure(msg: string) { | ||
@@ -137,2 +161,3 @@ failed = true; | ||
| logger.trace('Server is running, killing before restart'); | ||
| checkRestartThrottle(); | ||
| tui.info('Restarting on file change'); | ||
@@ -139,0 +164,0 @@ await kill(); |
@@ -216,2 +216,30 @@ import { join, resolve } from 'node:path'; | ||
| } | ||
| // Initialize git repository if git is available | ||
| const gitPath = Bun.which('git'); | ||
| if (gitPath) { | ||
| // Git is available, initialize repository | ||
| await tui.runCommand({ | ||
| command: 'git init', | ||
| cwd: dest, | ||
| cmd: ['git', 'init'], | ||
| clearOnSuccess: true, | ||
| }); | ||
| // Add all files | ||
| await tui.runCommand({ | ||
| command: 'git add .', | ||
| cwd: dest, | ||
| cmd: ['git', 'add', '.'], | ||
| clearOnSuccess: true, | ||
| }); | ||
| // Create initial commit | ||
| await tui.runCommand({ | ||
| command: 'git commit -m "Initial Setup"', | ||
| cwd: dest, | ||
| cmd: ['git', 'commit', '-m', 'Initial Setup'], | ||
| clearOnSuccess: true, | ||
| }); | ||
| } | ||
| } | ||
@@ -218,0 +246,0 @@ |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 16 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 16 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
253677
0.58%6080
0.76%