aidevops 2.52.1
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/.agent/AGENTS.md +614 -0
- package/.agent/accounts.md +65 -0
- package/.agent/aidevops/add-new-mcp-to-aidevops.md +456 -0
- package/.agent/aidevops/api-integrations.md +335 -0
- package/.agent/aidevops/architecture.md +510 -0
- package/.agent/aidevops/configs.md +274 -0
- package/.agent/aidevops/docs.md +244 -0
- package/.agent/aidevops/extension.md +311 -0
- package/.agent/aidevops/mcp-integrations.md +340 -0
- package/.agent/aidevops/mcp-troubleshooting.md +162 -0
- package/.agent/aidevops/memory-patterns.md +172 -0
- package/.agent/aidevops/providers.md +217 -0
- package/.agent/aidevops/recommendations.md +321 -0
- package/.agent/aidevops/requirements.md +301 -0
- package/.agent/aidevops/resources.md +214 -0
- package/.agent/aidevops/security-requirements.md +174 -0
- package/.agent/aidevops/security.md +350 -0
- package/.agent/aidevops/service-links.md +400 -0
- package/.agent/aidevops/services.md +357 -0
- package/.agent/aidevops/setup.md +153 -0
- package/.agent/aidevops/troubleshooting.md +389 -0
- package/.agent/aidevops.md +124 -0
- package/.agent/build-plus.md +244 -0
- package/.agent/content/guidelines.md +109 -0
- package/.agent/content.md +87 -0
- package/.agent/health.md +59 -0
- package/.agent/legal.md +59 -0
- package/.agent/loop-state/full-loop.local.md +16 -0
- package/.agent/loop-state/ralph-loop.local.md +10 -0
- package/.agent/marketing.md +440 -0
- package/.agent/memory/README.md +260 -0
- package/.agent/onboarding.md +796 -0
- package/.agent/plan-plus.md +245 -0
- package/.agent/research.md +100 -0
- package/.agent/sales.md +333 -0
- package/.agent/scripts/101domains-helper.sh +701 -0
- package/.agent/scripts/add-missing-returns.sh +140 -0
- package/.agent/scripts/agent-browser-helper.sh +311 -0
- package/.agent/scripts/agno-setup.sh +712 -0
- package/.agent/scripts/ahrefs-mcp-wrapper.js +168 -0
- package/.agent/scripts/aidevops-update-check.sh +71 -0
- package/.agent/scripts/ampcode-cli.sh +522 -0
- package/.agent/scripts/auto-version-bump.sh +156 -0
- package/.agent/scripts/autogen-helper.sh +512 -0
- package/.agent/scripts/beads-sync-helper.sh +596 -0
- package/.agent/scripts/closte-helper.sh +5 -0
- package/.agent/scripts/cloudron-helper.sh +321 -0
- package/.agent/scripts/codacy-cli-chunked.sh +581 -0
- package/.agent/scripts/codacy-cli.sh +442 -0
- package/.agent/scripts/code-audit-helper.sh +5 -0
- package/.agent/scripts/coderabbit-cli.sh +417 -0
- package/.agent/scripts/coderabbit-pro-analysis.sh +238 -0
- package/.agent/scripts/commands/code-simplifier.md +86 -0
- package/.agent/scripts/commands/full-loop.md +246 -0
- package/.agent/scripts/commands/postflight-loop.md +103 -0
- package/.agent/scripts/commands/recall.md +182 -0
- package/.agent/scripts/commands/remember.md +132 -0
- package/.agent/scripts/commands/save-todo.md +175 -0
- package/.agent/scripts/commands/session-review.md +154 -0
- package/.agent/scripts/comprehensive-quality-fix.sh +106 -0
- package/.agent/scripts/context-builder-helper.sh +522 -0
- package/.agent/scripts/coolify-cli-helper.sh +674 -0
- package/.agent/scripts/coolify-helper.sh +380 -0
- package/.agent/scripts/crawl4ai-examples.sh +401 -0
- package/.agent/scripts/crawl4ai-helper.sh +1078 -0
- package/.agent/scripts/crewai-helper.sh +681 -0
- package/.agent/scripts/dev-browser-helper.sh +513 -0
- package/.agent/scripts/dns-helper.sh +396 -0
- package/.agent/scripts/domain-research-helper.sh +917 -0
- package/.agent/scripts/dspy-helper.sh +285 -0
- package/.agent/scripts/dspyground-helper.sh +291 -0
- package/.agent/scripts/eeat-score-helper.sh +1242 -0
- package/.agent/scripts/efficient-return-fix.sh +92 -0
- package/.agent/scripts/extract-opencode-prompts.sh +128 -0
- package/.agent/scripts/find-missing-returns.sh +113 -0
- package/.agent/scripts/fix-auth-headers.sh +104 -0
- package/.agent/scripts/fix-common-strings.sh +254 -0
- package/.agent/scripts/fix-content-type.sh +100 -0
- package/.agent/scripts/fix-error-messages.sh +130 -0
- package/.agent/scripts/fix-misplaced-returns.sh +74 -0
- package/.agent/scripts/fix-remaining-literals.sh +152 -0
- package/.agent/scripts/fix-return-statements.sh +41 -0
- package/.agent/scripts/fix-s131-default-cases.sh +249 -0
- package/.agent/scripts/fix-sc2155-simple.sh +102 -0
- package/.agent/scripts/fix-shellcheck-critical.sh +187 -0
- package/.agent/scripts/fix-string-literals.sh +273 -0
- package/.agent/scripts/full-loop-helper.sh +773 -0
- package/.agent/scripts/generate-opencode-agents.sh +497 -0
- package/.agent/scripts/generate-opencode-commands.sh +1629 -0
- package/.agent/scripts/generate-skills.sh +366 -0
- package/.agent/scripts/git-platforms-helper.sh +640 -0
- package/.agent/scripts/gitea-cli-helper.sh +743 -0
- package/.agent/scripts/github-cli-helper.sh +702 -0
- package/.agent/scripts/gitlab-cli-helper.sh +682 -0
- package/.agent/scripts/gsc-add-user-helper.sh +325 -0
- package/.agent/scripts/gsc-sitemap-helper.sh +678 -0
- package/.agent/scripts/hetzner-helper.sh +485 -0
- package/.agent/scripts/hostinger-helper.sh +229 -0
- package/.agent/scripts/keyword-research-helper.sh +1815 -0
- package/.agent/scripts/langflow-helper.sh +544 -0
- package/.agent/scripts/linkedin-automation.py +241 -0
- package/.agent/scripts/linter-manager.sh +599 -0
- package/.agent/scripts/linters-local.sh +434 -0
- package/.agent/scripts/list-keys-helper.sh +488 -0
- package/.agent/scripts/local-browser-automation.py +339 -0
- package/.agent/scripts/localhost-helper.sh +744 -0
- package/.agent/scripts/loop-common.sh +806 -0
- package/.agent/scripts/mainwp-helper.sh +728 -0
- package/.agent/scripts/markdown-formatter.sh +338 -0
- package/.agent/scripts/markdown-lint-fix.sh +311 -0
- package/.agent/scripts/mass-fix-returns.sh +58 -0
- package/.agent/scripts/mcp-diagnose.sh +167 -0
- package/.agent/scripts/mcp-inspector-helper.sh +449 -0
- package/.agent/scripts/memory-helper.sh +650 -0
- package/.agent/scripts/monitor-code-review.sh +255 -0
- package/.agent/scripts/onboarding-helper.sh +706 -0
- package/.agent/scripts/opencode-github-setup-helper.sh +797 -0
- package/.agent/scripts/opencode-test-helper.sh +213 -0
- package/.agent/scripts/pagespeed-helper.sh +464 -0
- package/.agent/scripts/pandoc-helper.sh +362 -0
- package/.agent/scripts/postflight-check.sh +555 -0
- package/.agent/scripts/pre-commit-hook.sh +259 -0
- package/.agent/scripts/pre-edit-check.sh +169 -0
- package/.agent/scripts/qlty-cli.sh +356 -0
- package/.agent/scripts/quality-cli-manager.sh +525 -0
- package/.agent/scripts/quality-feedback-helper.sh +462 -0
- package/.agent/scripts/quality-fix.sh +263 -0
- package/.agent/scripts/quality-loop-helper.sh +1108 -0
- package/.agent/scripts/ralph-loop-helper.sh +836 -0
- package/.agent/scripts/ralph-upstream-check.sh +341 -0
- package/.agent/scripts/secretlint-helper.sh +847 -0
- package/.agent/scripts/servers-helper.sh +241 -0
- package/.agent/scripts/ses-helper.sh +619 -0
- package/.agent/scripts/session-review-helper.sh +404 -0
- package/.agent/scripts/setup-linters-wizard.sh +379 -0
- package/.agent/scripts/setup-local-api-keys.sh +330 -0
- package/.agent/scripts/setup-mcp-integrations.sh +472 -0
- package/.agent/scripts/shared-constants.sh +246 -0
- package/.agent/scripts/site-crawler-helper.sh +1487 -0
- package/.agent/scripts/snyk-helper.sh +940 -0
- package/.agent/scripts/sonarcloud-autofix.sh +193 -0
- package/.agent/scripts/sonarcloud-cli.sh +191 -0
- package/.agent/scripts/sonarscanner-cli.sh +455 -0
- package/.agent/scripts/spaceship-helper.sh +747 -0
- package/.agent/scripts/stagehand-helper.sh +321 -0
- package/.agent/scripts/stagehand-python-helper.sh +321 -0
- package/.agent/scripts/stagehand-python-setup.sh +441 -0
- package/.agent/scripts/stagehand-setup.sh +439 -0
- package/.agent/scripts/system-cleanup.sh +340 -0
- package/.agent/scripts/terminal-title-helper.sh +388 -0
- package/.agent/scripts/terminal-title-setup.sh +549 -0
- package/.agent/scripts/test-stagehand-both-integration.sh +317 -0
- package/.agent/scripts/test-stagehand-integration.sh +309 -0
- package/.agent/scripts/test-stagehand-python-integration.sh +341 -0
- package/.agent/scripts/todo-ready.sh +263 -0
- package/.agent/scripts/tool-version-check.sh +362 -0
- package/.agent/scripts/toon-helper.sh +469 -0
- package/.agent/scripts/twilio-helper.sh +917 -0
- package/.agent/scripts/updown-helper.sh +279 -0
- package/.agent/scripts/validate-mcp-integrations.sh +250 -0
- package/.agent/scripts/validate-version-consistency.sh +131 -0
- package/.agent/scripts/vaultwarden-helper.sh +597 -0
- package/.agent/scripts/vercel-cli-helper.sh +816 -0
- package/.agent/scripts/verify-mirrors.sh +169 -0
- package/.agent/scripts/version-manager.sh +831 -0
- package/.agent/scripts/webhosting-helper.sh +471 -0
- package/.agent/scripts/webhosting-verify.sh +238 -0
- package/.agent/scripts/wordpress-mcp-helper.sh +508 -0
- package/.agent/scripts/worktree-helper.sh +595 -0
- package/.agent/scripts/worktree-sessions.sh +577 -0
- package/.agent/seo/dataforseo.md +215 -0
- package/.agent/seo/domain-research.md +532 -0
- package/.agent/seo/eeat-score.md +659 -0
- package/.agent/seo/google-search-console.md +366 -0
- package/.agent/seo/gsc-sitemaps.md +282 -0
- package/.agent/seo/keyword-research.md +521 -0
- package/.agent/seo/serper.md +278 -0
- package/.agent/seo/site-crawler.md +387 -0
- package/.agent/seo.md +236 -0
- package/.agent/services/accounting/quickfile.md +159 -0
- package/.agent/services/communications/telfon.md +470 -0
- package/.agent/services/communications/twilio.md +569 -0
- package/.agent/services/crm/fluentcrm.md +449 -0
- package/.agent/services/email/ses.md +399 -0
- package/.agent/services/hosting/101domains.md +378 -0
- package/.agent/services/hosting/closte.md +177 -0
- package/.agent/services/hosting/cloudflare.md +251 -0
- package/.agent/services/hosting/cloudron.md +478 -0
- package/.agent/services/hosting/dns-providers.md +335 -0
- package/.agent/services/hosting/domain-purchasing.md +344 -0
- package/.agent/services/hosting/hetzner.md +327 -0
- package/.agent/services/hosting/hostinger.md +287 -0
- package/.agent/services/hosting/localhost.md +419 -0
- package/.agent/services/hosting/spaceship.md +353 -0
- package/.agent/services/hosting/webhosting.md +330 -0
- package/.agent/social-media.md +69 -0
- package/.agent/templates/plans-template.md +114 -0
- package/.agent/templates/prd-template.md +129 -0
- package/.agent/templates/tasks-template.md +108 -0
- package/.agent/templates/todo-template.md +89 -0
- package/.agent/tools/ai-assistants/agno.md +471 -0
- package/.agent/tools/ai-assistants/capsolver.md +326 -0
- package/.agent/tools/ai-assistants/configuration.md +221 -0
- package/.agent/tools/ai-assistants/overview.md +209 -0
- package/.agent/tools/ai-assistants/status.md +171 -0
- package/.agent/tools/ai-assistants/windsurf.md +193 -0
- package/.agent/tools/ai-orchestration/autogen.md +406 -0
- package/.agent/tools/ai-orchestration/crewai.md +445 -0
- package/.agent/tools/ai-orchestration/langflow.md +405 -0
- package/.agent/tools/ai-orchestration/openprose.md +487 -0
- package/.agent/tools/ai-orchestration/overview.md +362 -0
- package/.agent/tools/ai-orchestration/packaging.md +647 -0
- package/.agent/tools/browser/agent-browser.md +464 -0
- package/.agent/tools/browser/browser-automation.md +400 -0
- package/.agent/tools/browser/chrome-devtools.md +282 -0
- package/.agent/tools/browser/crawl4ai-integration.md +422 -0
- package/.agent/tools/browser/crawl4ai-resources.md +277 -0
- package/.agent/tools/browser/crawl4ai-usage.md +416 -0
- package/.agent/tools/browser/crawl4ai.md +585 -0
- package/.agent/tools/browser/dev-browser.md +341 -0
- package/.agent/tools/browser/pagespeed.md +260 -0
- package/.agent/tools/browser/playwright.md +266 -0
- package/.agent/tools/browser/playwriter.md +310 -0
- package/.agent/tools/browser/stagehand-examples.md +456 -0
- package/.agent/tools/browser/stagehand-python.md +483 -0
- package/.agent/tools/browser/stagehand.md +421 -0
- package/.agent/tools/build-agent/agent-review.md +224 -0
- package/.agent/tools/build-agent/build-agent.md +784 -0
- package/.agent/tools/build-mcp/aidevops-plugin.md +476 -0
- package/.agent/tools/build-mcp/api-wrapper.md +445 -0
- package/.agent/tools/build-mcp/build-mcp.md +240 -0
- package/.agent/tools/build-mcp/deployment.md +401 -0
- package/.agent/tools/build-mcp/server-patterns.md +632 -0
- package/.agent/tools/build-mcp/transports.md +366 -0
- package/.agent/tools/code-review/auditing.md +383 -0
- package/.agent/tools/code-review/automation.md +219 -0
- package/.agent/tools/code-review/best-practices.md +203 -0
- package/.agent/tools/code-review/codacy.md +151 -0
- package/.agent/tools/code-review/code-simplifier.md +174 -0
- package/.agent/tools/code-review/code-standards.md +309 -0
- package/.agent/tools/code-review/coderabbit.md +101 -0
- package/.agent/tools/code-review/management.md +155 -0
- package/.agent/tools/code-review/qlty.md +248 -0
- package/.agent/tools/code-review/secretlint.md +565 -0
- package/.agent/tools/code-review/setup.md +250 -0
- package/.agent/tools/code-review/snyk.md +563 -0
- package/.agent/tools/code-review/tools.md +230 -0
- package/.agent/tools/content/summarize.md +353 -0
- package/.agent/tools/context/augment-context-engine.md +468 -0
- package/.agent/tools/context/context-builder-agent.md +76 -0
- package/.agent/tools/context/context-builder.md +375 -0
- package/.agent/tools/context/context7.md +371 -0
- package/.agent/tools/context/dspy.md +302 -0
- package/.agent/tools/context/dspyground.md +374 -0
- package/.agent/tools/context/llm-tldr.md +219 -0
- package/.agent/tools/context/osgrep.md +488 -0
- package/.agent/tools/context/prompt-optimization.md +338 -0
- package/.agent/tools/context/toon.md +292 -0
- package/.agent/tools/conversion/pandoc.md +304 -0
- package/.agent/tools/credentials/api-key-management.md +154 -0
- package/.agent/tools/credentials/api-key-setup.md +224 -0
- package/.agent/tools/credentials/environment-variables.md +180 -0
- package/.agent/tools/credentials/vaultwarden.md +382 -0
- package/.agent/tools/data-extraction/outscraper.md +974 -0
- package/.agent/tools/deployment/coolify-cli.md +388 -0
- package/.agent/tools/deployment/coolify-setup.md +353 -0
- package/.agent/tools/deployment/coolify.md +345 -0
- package/.agent/tools/deployment/vercel.md +390 -0
- package/.agent/tools/git/authentication.md +132 -0
- package/.agent/tools/git/gitea-cli.md +193 -0
- package/.agent/tools/git/github-actions.md +207 -0
- package/.agent/tools/git/github-cli.md +223 -0
- package/.agent/tools/git/gitlab-cli.md +190 -0
- package/.agent/tools/git/opencode-github-security.md +350 -0
- package/.agent/tools/git/opencode-github.md +328 -0
- package/.agent/tools/git/opencode-gitlab.md +252 -0
- package/.agent/tools/git/security.md +196 -0
- package/.agent/tools/git.md +207 -0
- package/.agent/tools/opencode/oh-my-opencode.md +375 -0
- package/.agent/tools/opencode/opencode-anthropic-auth.md +446 -0
- package/.agent/tools/opencode/opencode.md +651 -0
- package/.agent/tools/social-media/bird.md +437 -0
- package/.agent/tools/task-management/beads.md +336 -0
- package/.agent/tools/terminal/terminal-title.md +251 -0
- package/.agent/tools/ui/shadcn.md +196 -0
- package/.agent/tools/ui/ui-skills.md +115 -0
- package/.agent/tools/wordpress/localwp.md +311 -0
- package/.agent/tools/wordpress/mainwp.md +391 -0
- package/.agent/tools/wordpress/scf.md +527 -0
- package/.agent/tools/wordpress/wp-admin.md +729 -0
- package/.agent/tools/wordpress/wp-dev.md +940 -0
- package/.agent/tools/wordpress/wp-preferred.md +398 -0
- package/.agent/tools/wordpress.md +95 -0
- package/.agent/workflows/branch/bugfix.md +63 -0
- package/.agent/workflows/branch/chore.md +95 -0
- package/.agent/workflows/branch/experiment.md +115 -0
- package/.agent/workflows/branch/feature.md +59 -0
- package/.agent/workflows/branch/hotfix.md +98 -0
- package/.agent/workflows/branch/refactor.md +92 -0
- package/.agent/workflows/branch/release.md +96 -0
- package/.agent/workflows/branch.md +347 -0
- package/.agent/workflows/bug-fixing.md +267 -0
- package/.agent/workflows/changelog.md +129 -0
- package/.agent/workflows/code-audit-remote.md +279 -0
- package/.agent/workflows/conversation-starter.md +69 -0
- package/.agent/workflows/error-feedback.md +578 -0
- package/.agent/workflows/feature-development.md +355 -0
- package/.agent/workflows/git-workflow.md +702 -0
- package/.agent/workflows/multi-repo-workspace.md +268 -0
- package/.agent/workflows/plans.md +709 -0
- package/.agent/workflows/postflight.md +604 -0
- package/.agent/workflows/pr.md +571 -0
- package/.agent/workflows/preflight.md +278 -0
- package/.agent/workflows/ralph-loop.md +773 -0
- package/.agent/workflows/release.md +498 -0
- package/.agent/workflows/session-manager.md +254 -0
- package/.agent/workflows/session-review.md +311 -0
- package/.agent/workflows/sql-migrations.md +631 -0
- package/.agent/workflows/version-bump.md +283 -0
- package/.agent/workflows/wiki-update.md +333 -0
- package/.agent/workflows/worktree.md +477 -0
- package/LICENSE +21 -0
- package/README.md +1446 -0
- package/VERSION +1 -0
- package/aidevops.sh +1746 -0
- package/bin/aidevops +21 -0
- package/package.json +75 -0
- package/scripts/npm-postinstall.js +60 -0
- package/setup.sh +2366 -0
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# =============================================================================
|
|
3
|
+
# AutoGen Helper Script
|
|
4
|
+
# =============================================================================
|
|
5
|
+
# Microsoft AutoGen agentic AI framework setup and management
|
|
6
|
+
#
|
|
7
|
+
# Usage:
|
|
8
|
+
# bash .agent/scripts/autogen-helper.sh [action]
|
|
9
|
+
#
|
|
10
|
+
# Actions:
|
|
11
|
+
# setup Complete setup of AutoGen
|
|
12
|
+
# start Start AutoGen Studio
|
|
13
|
+
# stop Stop AutoGen Studio
|
|
14
|
+
# status Check AutoGen status
|
|
15
|
+
# check Check prerequisites
|
|
16
|
+
# help Show this help message
|
|
17
|
+
# =============================================================================
|
|
18
|
+
|
|
19
|
+
set -euo pipefail
|
|
20
|
+
|
|
21
|
+
# Colors
|
|
22
|
+
RED='\033[0;31m'
|
|
23
|
+
GREEN='\033[0;32m'
|
|
24
|
+
YELLOW='\033[1;33m'
|
|
25
|
+
BLUE='\033[0;34m'
|
|
26
|
+
NC='\033[0m'
|
|
27
|
+
|
|
28
|
+
# Configuration
|
|
29
|
+
AUTOGEN_DIR="$HOME/.aidevops/autogen"
|
|
30
|
+
AUTOGEN_STUDIO_PORT="${AUTOGEN_STUDIO_PORT:-8081}"
|
|
31
|
+
SCRIPTS_DIR="$HOME/.aidevops/scripts"
|
|
32
|
+
LOCALHOST_HELPER="$SCRIPTS_DIR/localhost-helper.sh"
|
|
33
|
+
|
|
34
|
+
# Helper functions
|
|
35
|
+
print_info() {
|
|
36
|
+
echo -e "${BLUE}[INFO]${NC} $1"
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
print_success() {
|
|
40
|
+
echo -e "${GREEN}[SUCCESS]${NC} $1"
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
print_warning() {
|
|
44
|
+
echo -e "${YELLOW}[WARNING]${NC} $1"
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
print_error() {
|
|
48
|
+
echo -e "${RED}[ERROR]${NC} $1"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
# Port management integration with localhost-helper.sh
|
|
52
|
+
# Returns available port (original if free, or next available)
|
|
53
|
+
get_available_port() {
|
|
54
|
+
local desired_port="$1"
|
|
55
|
+
|
|
56
|
+
# Use localhost-helper.sh if available
|
|
57
|
+
if [[ -x "$LOCALHOST_HELPER" ]]; then
|
|
58
|
+
if "$LOCALHOST_HELPER" check-port "$desired_port" >/dev/null 2>&1; then
|
|
59
|
+
echo "$desired_port"
|
|
60
|
+
return 0
|
|
61
|
+
else
|
|
62
|
+
# Port in use, find alternative
|
|
63
|
+
local suggested
|
|
64
|
+
suggested=$("$LOCALHOST_HELPER" find-port "$((desired_port + 1))" 2>/dev/null)
|
|
65
|
+
if [[ -n "$suggested" ]]; then
|
|
66
|
+
print_warning "Port $desired_port in use, using $suggested instead"
|
|
67
|
+
echo "$suggested"
|
|
68
|
+
return 0
|
|
69
|
+
fi
|
|
70
|
+
fi
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Fallback: basic port check using lsof
|
|
74
|
+
if ! lsof -i :"$desired_port" >/dev/null 2>&1; then
|
|
75
|
+
echo "$desired_port"
|
|
76
|
+
return 0
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
# Find next available port
|
|
80
|
+
local port="$desired_port"
|
|
81
|
+
while lsof -i :"$port" >/dev/null 2>&1 && [[ $port -lt 65535 ]]; do
|
|
82
|
+
((port++))
|
|
83
|
+
done
|
|
84
|
+
|
|
85
|
+
if [[ $port -lt 65535 ]]; then
|
|
86
|
+
print_warning "Port $desired_port in use, using $port instead"
|
|
87
|
+
echo "$port"
|
|
88
|
+
return 0
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
print_error "No available ports found"
|
|
92
|
+
return 1
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
# Check prerequisites
|
|
96
|
+
check_prerequisites() {
|
|
97
|
+
local missing=0
|
|
98
|
+
|
|
99
|
+
print_info "Checking prerequisites..."
|
|
100
|
+
|
|
101
|
+
# Check Python
|
|
102
|
+
if command -v python3 &> /dev/null; then
|
|
103
|
+
local python_version
|
|
104
|
+
python_version=$(python3 --version 2>&1 | cut -d' ' -f2)
|
|
105
|
+
local major minor
|
|
106
|
+
major=$(echo "$python_version" | cut -d. -f1)
|
|
107
|
+
minor=$(echo "$python_version" | cut -d. -f2)
|
|
108
|
+
|
|
109
|
+
if [[ $major -ge 3 ]] && [[ $minor -ge 10 ]]; then
|
|
110
|
+
print_success "Python $python_version found (3.10+ required)"
|
|
111
|
+
else
|
|
112
|
+
print_error "Python 3.10+ required, found $python_version"
|
|
113
|
+
missing=1
|
|
114
|
+
fi
|
|
115
|
+
else
|
|
116
|
+
print_error "Python 3 not found"
|
|
117
|
+
missing=1
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
# Check pip
|
|
121
|
+
if command -v pip3 &> /dev/null || python3 -m pip --version &> /dev/null; then
|
|
122
|
+
print_success "pip found"
|
|
123
|
+
else
|
|
124
|
+
print_error "pip not found"
|
|
125
|
+
missing=1
|
|
126
|
+
fi
|
|
127
|
+
|
|
128
|
+
# Check for uv (preferred)
|
|
129
|
+
if command -v uv &> /dev/null; then
|
|
130
|
+
print_success "uv found (preferred package manager)"
|
|
131
|
+
else
|
|
132
|
+
print_warning "uv not found, will use pip"
|
|
133
|
+
fi
|
|
134
|
+
|
|
135
|
+
if [[ $missing -eq 1 ]]; then
|
|
136
|
+
print_error "Missing prerequisites. Please install them first."
|
|
137
|
+
return 1
|
|
138
|
+
fi
|
|
139
|
+
|
|
140
|
+
print_success "All prerequisites met"
|
|
141
|
+
return 0
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
# Setup AutoGen
|
|
145
|
+
setup_autogen() {
|
|
146
|
+
print_info "Setting up AutoGen..."
|
|
147
|
+
|
|
148
|
+
# Create directories
|
|
149
|
+
mkdir -p "$AUTOGEN_DIR"
|
|
150
|
+
mkdir -p "$SCRIPTS_DIR"
|
|
151
|
+
|
|
152
|
+
cd "$AUTOGEN_DIR" || exit 1
|
|
153
|
+
|
|
154
|
+
# Create virtual environment
|
|
155
|
+
if [[ ! -d "venv" ]]; then
|
|
156
|
+
print_info "Creating virtual environment..."
|
|
157
|
+
python3 -m venv venv
|
|
158
|
+
fi
|
|
159
|
+
|
|
160
|
+
# Activate venv
|
|
161
|
+
# shellcheck source=/dev/null
|
|
162
|
+
source venv/bin/activate
|
|
163
|
+
|
|
164
|
+
# Install AutoGen
|
|
165
|
+
print_info "Installing AutoGen..."
|
|
166
|
+
if command -v uv &> /dev/null; then
|
|
167
|
+
uv pip install autogen-agentchat -U
|
|
168
|
+
uv pip install 'autogen-ext[openai]' -U
|
|
169
|
+
uv pip install autogenstudio -U
|
|
170
|
+
else
|
|
171
|
+
pip install autogen-agentchat -U
|
|
172
|
+
pip install 'autogen-ext[openai]' -U
|
|
173
|
+
pip install autogenstudio -U
|
|
174
|
+
fi
|
|
175
|
+
|
|
176
|
+
# Create environment template
|
|
177
|
+
if [[ ! -f ".env.example" ]]; then
|
|
178
|
+
cat > .env.example << 'EOF'
|
|
179
|
+
# AutoGen Configuration for AI DevOps Framework
|
|
180
|
+
# Copy this file to .env and configure your API keys
|
|
181
|
+
|
|
182
|
+
# OpenAI Configuration (Required for most agents)
|
|
183
|
+
OPENAI_API_KEY=your_openai_api_key_here
|
|
184
|
+
|
|
185
|
+
# Anthropic Configuration (Optional)
|
|
186
|
+
ANTHROPIC_API_KEY=your_anthropic_key_here
|
|
187
|
+
|
|
188
|
+
# Azure OpenAI Configuration (Optional)
|
|
189
|
+
AZURE_OPENAI_API_KEY=your_azure_key_here
|
|
190
|
+
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
|
|
191
|
+
|
|
192
|
+
# Google Configuration (Optional)
|
|
193
|
+
GOOGLE_API_KEY=your_google_key_here
|
|
194
|
+
|
|
195
|
+
# Local LLM Configuration (Ollama)
|
|
196
|
+
OLLAMA_BASE_URL=http://localhost:11434
|
|
197
|
+
|
|
198
|
+
# AutoGen Studio Configuration
|
|
199
|
+
AUTOGEN_STUDIO_PORT=8081
|
|
200
|
+
AUTOGEN_STUDIO_APPDIR=./studio-data
|
|
201
|
+
|
|
202
|
+
# Security Note: All processing runs locally
|
|
203
|
+
# No data is sent to external services unless you configure external LLMs
|
|
204
|
+
EOF
|
|
205
|
+
print_success "Created environment template"
|
|
206
|
+
fi
|
|
207
|
+
|
|
208
|
+
# Copy template to .env if not exists
|
|
209
|
+
if [[ ! -f ".env" ]]; then
|
|
210
|
+
cp .env.example .env
|
|
211
|
+
print_info "Created .env file - please configure your API keys"
|
|
212
|
+
fi
|
|
213
|
+
|
|
214
|
+
# Create example script
|
|
215
|
+
create_example_script
|
|
216
|
+
|
|
217
|
+
# Create management scripts
|
|
218
|
+
create_management_scripts
|
|
219
|
+
|
|
220
|
+
print_success "AutoGen setup complete"
|
|
221
|
+
print_info "Directory: $AUTOGEN_DIR"
|
|
222
|
+
print_info "Configure your API keys in .env file"
|
|
223
|
+
return 0
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
# Create example script
|
|
227
|
+
create_example_script() {
|
|
228
|
+
print_info "Creating example script..."
|
|
229
|
+
|
|
230
|
+
cat > "$AUTOGEN_DIR/hello_autogen.py" << 'EXAMPLEEOF'
|
|
231
|
+
"""
|
|
232
|
+
AutoGen Hello World Example
|
|
233
|
+
AI DevOps Framework Integration
|
|
234
|
+
"""
|
|
235
|
+
import asyncio
|
|
236
|
+
import os
|
|
237
|
+
from dotenv import load_dotenv
|
|
238
|
+
|
|
239
|
+
# Load environment variables
|
|
240
|
+
load_dotenv()
|
|
241
|
+
|
|
242
|
+
async def main():
|
|
243
|
+
from autogen_agentchat.agents import AssistantAgent
|
|
244
|
+
from autogen_ext.models.openai import OpenAIChatCompletionClient
|
|
245
|
+
|
|
246
|
+
# Create model client
|
|
247
|
+
model_client = OpenAIChatCompletionClient(model="gpt-4o-mini")
|
|
248
|
+
|
|
249
|
+
# Create agent
|
|
250
|
+
agent = AssistantAgent(
|
|
251
|
+
"assistant",
|
|
252
|
+
model_client=model_client,
|
|
253
|
+
system_message="You are a helpful AI assistant."
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
# Run a simple task
|
|
257
|
+
print("Running AutoGen agent...")
|
|
258
|
+
result = await agent.run(task="Say 'Hello from AutoGen!' and explain what AutoGen is in one sentence.")
|
|
259
|
+
print(f"\nResult: {result}")
|
|
260
|
+
|
|
261
|
+
# Clean up
|
|
262
|
+
await model_client.close()
|
|
263
|
+
|
|
264
|
+
if __name__ == "__main__":
|
|
265
|
+
asyncio.run(main())
|
|
266
|
+
EXAMPLEEOF
|
|
267
|
+
|
|
268
|
+
print_success "Created example script: hello_autogen.py"
|
|
269
|
+
return 0
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
# Create management scripts
|
|
273
|
+
create_management_scripts() {
|
|
274
|
+
print_info "Creating management scripts..."
|
|
275
|
+
|
|
276
|
+
mkdir -p "$SCRIPTS_DIR"
|
|
277
|
+
|
|
278
|
+
# Create start script
|
|
279
|
+
cat > "$SCRIPTS_DIR/start-autogen-studio.sh" << 'EOF'
|
|
280
|
+
#!/bin/bash
|
|
281
|
+
# AI DevOps Framework - AutoGen Studio Startup Script
|
|
282
|
+
|
|
283
|
+
AUTOGEN_DIR="$HOME/.aidevops/autogen"
|
|
284
|
+
SCRIPTS_DIR="$HOME/.aidevops/scripts"
|
|
285
|
+
LOCALHOST_HELPER="$SCRIPTS_DIR/localhost-helper.sh"
|
|
286
|
+
DESIRED_PORT="${AUTOGEN_STUDIO_PORT:-8081}"
|
|
287
|
+
APPDIR="${AUTOGEN_STUDIO_APPDIR:-$AUTOGEN_DIR/studio-data}"
|
|
288
|
+
|
|
289
|
+
echo "Starting AutoGen Studio..."
|
|
290
|
+
|
|
291
|
+
# Check port availability using localhost-helper.sh
|
|
292
|
+
if [[ -x "$LOCALHOST_HELPER" ]]; then
|
|
293
|
+
if ! "$LOCALHOST_HELPER" check-port "$DESIRED_PORT" >/dev/null 2>&1; then
|
|
294
|
+
echo "[WARNING] Port $DESIRED_PORT is in use"
|
|
295
|
+
SUGGESTED=$("$LOCALHOST_HELPER" find-port "$((DESIRED_PORT + 1))" 2>/dev/null)
|
|
296
|
+
if [[ -n "$SUGGESTED" ]]; then
|
|
297
|
+
echo "[INFO] Using alternative port: $SUGGESTED"
|
|
298
|
+
DESIRED_PORT="$SUGGESTED"
|
|
299
|
+
fi
|
|
300
|
+
fi
|
|
301
|
+
else
|
|
302
|
+
# Fallback port check
|
|
303
|
+
if lsof -i :"$DESIRED_PORT" >/dev/null 2>&1; then
|
|
304
|
+
echo "[WARNING] Port $DESIRED_PORT is in use, finding alternative..."
|
|
305
|
+
while lsof -i :"$DESIRED_PORT" >/dev/null 2>&1 && [[ $DESIRED_PORT -lt 65535 ]]; do
|
|
306
|
+
((DESIRED_PORT++))
|
|
307
|
+
done
|
|
308
|
+
echo "[INFO] Using port: $DESIRED_PORT"
|
|
309
|
+
fi
|
|
310
|
+
fi
|
|
311
|
+
|
|
312
|
+
if [[ -d "$AUTOGEN_DIR/venv" ]]; then
|
|
313
|
+
cd "$AUTOGEN_DIR" || exit 1
|
|
314
|
+
|
|
315
|
+
# Activate venv
|
|
316
|
+
source venv/bin/activate
|
|
317
|
+
|
|
318
|
+
# Load environment
|
|
319
|
+
if [[ -f .env ]]; then
|
|
320
|
+
set -a
|
|
321
|
+
source .env
|
|
322
|
+
set +a
|
|
323
|
+
fi
|
|
324
|
+
|
|
325
|
+
# Create app directory
|
|
326
|
+
mkdir -p "$APPDIR"
|
|
327
|
+
|
|
328
|
+
# Start AutoGen Studio with available port
|
|
329
|
+
autogenstudio ui --port "$DESIRED_PORT" --appdir "$APPDIR" &
|
|
330
|
+
STUDIO_PID=$!
|
|
331
|
+
echo "$STUDIO_PID" > /tmp/autogen_studio_pid
|
|
332
|
+
echo "$DESIRED_PORT" > /tmp/autogen_studio_port
|
|
333
|
+
|
|
334
|
+
sleep 5
|
|
335
|
+
|
|
336
|
+
echo ""
|
|
337
|
+
echo "AutoGen Studio started!"
|
|
338
|
+
echo "URL: http://localhost:$DESIRED_PORT"
|
|
339
|
+
echo ""
|
|
340
|
+
echo "Use 'stop-autogen-studio.sh' to stop"
|
|
341
|
+
else
|
|
342
|
+
echo "AutoGen not set up. Run setup first:"
|
|
343
|
+
echo " bash .agent/scripts/autogen-helper.sh setup"
|
|
344
|
+
exit 1
|
|
345
|
+
fi
|
|
346
|
+
EOF
|
|
347
|
+
chmod +x "$SCRIPTS_DIR/start-autogen-studio.sh"
|
|
348
|
+
|
|
349
|
+
# Create stop script
|
|
350
|
+
cat > "$SCRIPTS_DIR/stop-autogen-studio.sh" << 'EOF'
|
|
351
|
+
#!/bin/bash
|
|
352
|
+
# AI DevOps Framework - AutoGen Studio Stop Script
|
|
353
|
+
|
|
354
|
+
echo "Stopping AutoGen Studio..."
|
|
355
|
+
|
|
356
|
+
if [[ -f /tmp/autogen_studio_pid ]]; then
|
|
357
|
+
STUDIO_PID=$(cat /tmp/autogen_studio_pid)
|
|
358
|
+
if kill -0 "$STUDIO_PID" 2>/dev/null; then
|
|
359
|
+
kill "$STUDIO_PID"
|
|
360
|
+
echo "Stopped AutoGen Studio (PID: $STUDIO_PID)"
|
|
361
|
+
fi
|
|
362
|
+
rm -f /tmp/autogen_studio_pid
|
|
363
|
+
fi
|
|
364
|
+
|
|
365
|
+
# Fallback: kill autogenstudio processes
|
|
366
|
+
pkill -f "autogenstudio" 2>/dev/null || true
|
|
367
|
+
|
|
368
|
+
echo "AutoGen Studio stopped"
|
|
369
|
+
EOF
|
|
370
|
+
chmod +x "$SCRIPTS_DIR/stop-autogen-studio.sh"
|
|
371
|
+
|
|
372
|
+
# Create status script
|
|
373
|
+
cat > "$SCRIPTS_DIR/autogen-status.sh" << 'EOF'
|
|
374
|
+
#!/bin/bash
|
|
375
|
+
# AI DevOps Framework - AutoGen Status Script
|
|
376
|
+
|
|
377
|
+
# Get actual port (from saved file or default)
|
|
378
|
+
if [[ -f /tmp/autogen_studio_port ]]; then
|
|
379
|
+
PORT=$(cat /tmp/autogen_studio_port)
|
|
380
|
+
else
|
|
381
|
+
PORT="${AUTOGEN_STUDIO_PORT:-8081}"
|
|
382
|
+
fi
|
|
383
|
+
|
|
384
|
+
echo "AutoGen Status"
|
|
385
|
+
echo "=============="
|
|
386
|
+
|
|
387
|
+
# Check if Studio is running
|
|
388
|
+
if curl -s "http://localhost:$PORT" >/dev/null 2>&1; then
|
|
389
|
+
echo "AutoGen Studio: Running"
|
|
390
|
+
echo "URL: http://localhost:$PORT"
|
|
391
|
+
else
|
|
392
|
+
echo "AutoGen Studio: Not running"
|
|
393
|
+
fi
|
|
394
|
+
|
|
395
|
+
echo ""
|
|
396
|
+
echo "Process Information:"
|
|
397
|
+
pgrep -f "autogenstudio" && ps aux | grep -E "autogenstudio" | grep -v grep || echo "No AutoGen Studio processes found"
|
|
398
|
+
|
|
399
|
+
# Check AutoGen packages
|
|
400
|
+
echo ""
|
|
401
|
+
echo "Installed Packages:"
|
|
402
|
+
AUTOGEN_DIR="$HOME/.aidevops/autogen"
|
|
403
|
+
if [[ -d "$AUTOGEN_DIR/venv" ]]; then
|
|
404
|
+
source "$AUTOGEN_DIR/venv/bin/activate"
|
|
405
|
+
pip list 2>/dev/null | grep -E "autogen" || echo "AutoGen packages not found"
|
|
406
|
+
else
|
|
407
|
+
echo "AutoGen venv not found"
|
|
408
|
+
fi
|
|
409
|
+
EOF
|
|
410
|
+
chmod +x "$SCRIPTS_DIR/autogen-status.sh"
|
|
411
|
+
|
|
412
|
+
print_success "Management scripts created in $SCRIPTS_DIR"
|
|
413
|
+
return 0
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
# Start AutoGen Studio
|
|
417
|
+
start_studio() {
|
|
418
|
+
if [[ -f "$SCRIPTS_DIR/start-autogen-studio.sh" ]]; then
|
|
419
|
+
"$SCRIPTS_DIR/start-autogen-studio.sh"
|
|
420
|
+
else
|
|
421
|
+
print_error "AutoGen not set up. Run 'setup' first."
|
|
422
|
+
return 1
|
|
423
|
+
fi
|
|
424
|
+
return 0
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
# Stop AutoGen Studio
|
|
428
|
+
stop_studio() {
|
|
429
|
+
if [[ -f "$SCRIPTS_DIR/stop-autogen-studio.sh" ]]; then
|
|
430
|
+
"$SCRIPTS_DIR/stop-autogen-studio.sh"
|
|
431
|
+
else
|
|
432
|
+
pkill -f "autogenstudio" 2>/dev/null || true
|
|
433
|
+
fi
|
|
434
|
+
return 0
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
# Check status
|
|
438
|
+
check_status() {
|
|
439
|
+
if [[ -f "$SCRIPTS_DIR/autogen-status.sh" ]]; then
|
|
440
|
+
"$SCRIPTS_DIR/autogen-status.sh"
|
|
441
|
+
else
|
|
442
|
+
if curl -s "http://localhost:$AUTOGEN_STUDIO_PORT" >/dev/null 2>&1; then
|
|
443
|
+
print_success "AutoGen Studio is running at http://localhost:$AUTOGEN_STUDIO_PORT"
|
|
444
|
+
else
|
|
445
|
+
print_warning "AutoGen Studio is not running"
|
|
446
|
+
fi
|
|
447
|
+
fi
|
|
448
|
+
return 0
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
# Show usage
|
|
452
|
+
show_usage() {
|
|
453
|
+
echo "AI DevOps Framework - AutoGen Helper"
|
|
454
|
+
echo ""
|
|
455
|
+
echo "Usage: $0 [action]"
|
|
456
|
+
echo ""
|
|
457
|
+
echo "Actions:"
|
|
458
|
+
echo " setup Complete setup of AutoGen"
|
|
459
|
+
echo " start Start AutoGen Studio"
|
|
460
|
+
echo " stop Stop AutoGen Studio"
|
|
461
|
+
echo " status Check AutoGen status"
|
|
462
|
+
echo " check Check prerequisites"
|
|
463
|
+
echo " help Show this help message"
|
|
464
|
+
echo ""
|
|
465
|
+
echo "Examples:"
|
|
466
|
+
echo " $0 setup # Full setup"
|
|
467
|
+
echo " $0 start # Start Studio"
|
|
468
|
+
echo " $0 status # Check status"
|
|
469
|
+
echo ""
|
|
470
|
+
echo "URLs (after start):"
|
|
471
|
+
echo " AutoGen Studio: http://localhost:8081"
|
|
472
|
+
return 0
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
# Main function
|
|
476
|
+
main() {
|
|
477
|
+
local action="${1:-help}"
|
|
478
|
+
shift || true
|
|
479
|
+
|
|
480
|
+
case "$action" in
|
|
481
|
+
"setup")
|
|
482
|
+
if check_prerequisites; then
|
|
483
|
+
setup_autogen
|
|
484
|
+
echo ""
|
|
485
|
+
print_success "AutoGen setup complete!"
|
|
486
|
+
echo ""
|
|
487
|
+
echo "Next Steps:"
|
|
488
|
+
echo "1. Configure API keys in $AUTOGEN_DIR/.env"
|
|
489
|
+
echo "2. Start AutoGen Studio: $SCRIPTS_DIR/start-autogen-studio.sh"
|
|
490
|
+
echo "3. Or run example: cd $AUTOGEN_DIR && source venv/bin/activate && python hello_autogen.py"
|
|
491
|
+
fi
|
|
492
|
+
;;
|
|
493
|
+
"start")
|
|
494
|
+
start_studio
|
|
495
|
+
;;
|
|
496
|
+
"stop")
|
|
497
|
+
stop_studio
|
|
498
|
+
;;
|
|
499
|
+
"status")
|
|
500
|
+
check_status
|
|
501
|
+
;;
|
|
502
|
+
"check")
|
|
503
|
+
check_prerequisites
|
|
504
|
+
;;
|
|
505
|
+
"help"|*)
|
|
506
|
+
show_usage
|
|
507
|
+
;;
|
|
508
|
+
esac
|
|
509
|
+
return 0
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
main "$@"
|