-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Automate Agentica connector setup and validation & connector select test #983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
너무 길어요...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait to update the agentica cli please.
@@ -1,4 +1,10 @@ | |||
import { FileManager } from "@wrtnlabs/connector-shared/lib"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove lib
): string[] { | ||
try { | ||
if (!fs.existsSync(packagesPath)) { | ||
console.warn(`⚠️ 경로를 찾을 수 없습니다: ${packagesPath}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if you could change these parts to English :)
await sendKey(" ", "스페이스 선택", 500); | ||
await sendKey("\r", "엔터", 500); | ||
} else { | ||
console.warn(`⚠️ 유효하지 않은 connectorIndex: ${connectorIndex}`); | ||
} | ||
|
||
await sendKey("\x1B[D", "Yes ←"); | ||
await sendKey("\r", "Yes 선택"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, I'm now updating the agentica cli, so will be added environment variable
input step between selecting connector step and entering openai apikey step.
// 3.1 ENV_LIST 찾기 (아직 못 찾은 경우) | ||
if (!foundEnvList) { | ||
const envListMatch = content.match( | ||
/export\s+const\s+ENV_LIST\s*=\s*\[([\s\S]*?)\]/, | ||
); | ||
if (envListMatch) { | ||
const envListStr = envListMatch[1]; | ||
const envVarMatches = envListStr.match(/'([^']+)'|"([^"]+)"/g); | ||
if (envVarMatches) { | ||
envList = envVarMatches.map((match) => | ||
match.replace(/['"]/g, ""), | ||
); | ||
console.log( | ||
`[${connectorName}] Found ENV_LIST in ${filePath}:`, | ||
envList, | ||
); | ||
foundEnvList = true; // 찾았음을 표시 | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo. in my opinion) In this part, I think you can use the dynamic import to get the const ENV_LIST
.
if (hasFileManager) { | ||
const awsEnvVars = [ | ||
"AWS_ACCESS_KEY_ID", | ||
"AWS_SECRET_ACCESS_KEY", | ||
"AWS_S3_BUCKET", | ||
"AWS_S3_REGION", | ||
]; | ||
awsPropsStr = "{\n"; // 여기서 awsPropsStr 초기화 | ||
awsEnvVars.forEach((envVar) => { | ||
const camelCaseKey = toCamelCase(envVar); | ||
awsPropsStr += ` ${camelCaseKey}: process.env.${envVar}!,\n`; | ||
}); | ||
awsPropsStr += " }"; // 들여쓰기 조정 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, new FileManager can be created like Azure, GCP, LocalFileSystem, and so on.
so this part will be changed someday.
I'll change agentica cli test why
|
This pull request includes a series of updates across multiple files, focusing on dependency upgrades, refactoring, and the removal of unused modules. The most important changes are grouped by theme and listed below:
Dependency Upgrades:
package.json
to their latest versions. This includes significant upgrades to packages such as@commitlint/cli
,@nestia/sdk
,typescript
, and many others.Refactoring:
GoogleSlidesService
,MarpService
, andStableDiffusionBetaService
classes to remove direct dependency on theFileManager
class, instead passing it through theprops
parameter. [1] [2] [3]IGoogleSlidesService
,IMarpService
, andIStableDiffusionBetaService
structures to includefileManager
in theirIProps
types. [1] [2] [3]Version Bump:
connectors-list.json
from0.1.486
to0.1.488
.Removal of Unused Modules:
KeywordExtractController
,KeywordExtractModule
,LlmController
, andLlmModule
files, indicating that these modules are no longer in use. [1] [2] [3] [4]Minor Fixes:
pnpm-workspace.yaml
by changing single quotes to double quotes for package exclusions.YoutubeOfficialSearchService
for better readability. [1] [2]These changes collectively improve the codebase by updating dependencies, refactoring for better maintainability, and removing unused code.feat: Add script to automate Agentica connector setup and validation
This PR introduces a script to automate the process of setting up and performing initial validation for Agentica projects based on connectors found in
../../packages
.Key Features:
packages
directory (respecting an ignore list).npx agentica start
interactively for each connector.ENV_LIST
) and whether aFileManager
(specificallyAwsS3Service
) is needed..env
file in the created project (test-<connector-name>
) with required variables (appending new ones, using placeholders).src/index.ts
to inject environment variables andAwsS3Service
instance into the service constructor as needed.@wrtnlabs/connector-aws-s3
ifFileManager
is required.npm install
,npm run build
, andnpm run start
for basic validation.Benefits:
(Korean Summary / 한국어 요약)
../../packages
내 커넥터들을 기반으로 Agentica 프로젝트 생성을 자동화하고 기본 검증을 수행하는 스크립트를 추가합니다. 각 커넥터에 대해agentica start
실행, 필요 환경변수(ENV_LIST
) 및FileManager
사용 여부 분석,.env
파일 생성/업데이트 (신규 변수 추가),src/index.ts
수정 (환경변수 및AwsS3Service
주입),npm install/build/start
실행을 자동화하여 테스트 준비 과정을 단축하고 일관성을 확보합니다.