@bluefly/openstandardagents 0.4.2 → 0.4.4
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/.version.json +7 -0
- package/CHANGELOG.md +488 -0
- package/README.md +106 -417
- package/bin/ossa +3 -0
- package/dist/adapters/agent-skills/exporter.d.ts +98 -0
- package/dist/adapters/agent-skills/exporter.d.ts.map +1 -0
- package/dist/adapters/agent-skills/exporter.js +453 -0
- package/dist/adapters/agent-skills/exporter.js.map +1 -0
- package/dist/adapters/agent-skills/index.d.ts +7 -0
- package/dist/adapters/agent-skills/index.d.ts.map +1 -0
- package/dist/adapters/agent-skills/index.js +6 -0
- package/dist/adapters/agent-skills/index.js.map +1 -0
- package/dist/adapters/anthropic/claude-optimizations.d.ts +44 -0
- package/dist/adapters/anthropic/claude-optimizations.d.ts.map +1 -0
- package/dist/adapters/anthropic/claude-optimizations.js +180 -0
- package/dist/adapters/anthropic/claude-optimizations.js.map +1 -0
- package/dist/adapters/base/adapter.interface.d.ts +4 -0
- package/dist/adapters/base/adapter.interface.d.ts.map +1 -1
- package/dist/adapters/base/adapter.interface.js +7 -0
- package/dist/adapters/base/adapter.interface.js.map +1 -1
- package/dist/adapters/base/common-file-generator.d.ts +160 -0
- package/dist/adapters/base/common-file-generator.d.ts.map +1 -0
- package/dist/adapters/base/common-file-generator.js +584 -0
- package/dist/adapters/base/common-file-generator.js.map +1 -0
- package/dist/adapters/base/index.d.ts +21 -0
- package/dist/adapters/base/index.d.ts.map +1 -0
- package/dist/adapters/base/index.js +25 -0
- package/dist/adapters/base/index.js.map +1 -0
- package/dist/adapters/base/manifest-validator.d.ts +84 -0
- package/dist/adapters/base/manifest-validator.d.ts.map +1 -0
- package/dist/adapters/base/manifest-validator.js +266 -0
- package/dist/adapters/base/manifest-validator.js.map +1 -0
- package/dist/adapters/base/template-engine.d.ts +52 -0
- package/dist/adapters/base/template-engine.d.ts.map +1 -0
- package/dist/adapters/base/template-engine.js +157 -0
- package/dist/adapters/base/template-engine.js.map +1 -0
- package/dist/adapters/crewai/adapter.d.ts +53 -1
- package/dist/adapters/crewai/adapter.d.ts.map +1 -1
- package/dist/adapters/crewai/adapter.js +1457 -31
- package/dist/adapters/crewai/adapter.js.map +1 -1
- package/dist/adapters/crewai/converter.d.ts +8 -0
- package/dist/adapters/crewai/converter.d.ts.map +1 -1
- package/dist/adapters/crewai/converter.js +56 -24
- package/dist/adapters/crewai/converter.js.map +1 -1
- package/dist/adapters/docker/docker-exporter.d.ts +38 -0
- package/dist/adapters/docker/docker-exporter.d.ts.map +1 -0
- package/dist/adapters/docker/docker-exporter.js +648 -0
- package/dist/adapters/docker/docker-exporter.js.map +1 -0
- package/dist/adapters/docker/generators.d.ts +73 -7
- package/dist/adapters/docker/generators.d.ts.map +1 -1
- package/dist/adapters/docker/generators.js +728 -43
- package/dist/adapters/docker/generators.js.map +1 -1
- package/dist/adapters/docker/index.d.ts +4 -3
- package/dist/adapters/docker/index.d.ts.map +1 -1
- package/dist/adapters/docker/index.js +3 -2
- package/dist/adapters/docker/index.js.map +1 -1
- package/dist/adapters/docker/types.d.ts +70 -0
- package/dist/adapters/docker/types.d.ts.map +1 -1
- package/dist/adapters/drupal/adapter.d.ts.map +1 -1
- package/dist/adapters/drupal/adapter.js +2 -2
- package/dist/adapters/drupal/adapter.js.map +1 -1
- package/dist/adapters/drupal/generator.d.ts.map +1 -1
- package/dist/adapters/drupal/generator.js +14 -9
- package/dist/adapters/drupal/generator.js.map +1 -1
- package/dist/adapters/drupal/index.d.ts +3 -1
- package/dist/adapters/drupal/index.d.ts.map +1 -1
- package/dist/adapters/drupal/index.js +5 -1
- package/dist/adapters/drupal/index.js.map +1 -1
- package/dist/adapters/drupal/manifest-exporter.d.ts +77 -0
- package/dist/adapters/drupal/manifest-exporter.d.ts.map +1 -0
- package/dist/adapters/drupal/manifest-exporter.js +360 -0
- package/dist/adapters/drupal/manifest-exporter.js.map +1 -0
- package/dist/adapters/drupal/production-exporter.legacy.d.ts +131 -0
- package/dist/adapters/drupal/production-exporter.legacy.d.ts.map +1 -0
- package/dist/adapters/drupal/production-exporter.legacy.js +2537 -0
- package/dist/adapters/drupal/production-exporter.legacy.js.map +1 -0
- package/dist/adapters/gitlab/agent-generator.d.ts +103 -0
- package/dist/adapters/gitlab/agent-generator.d.ts.map +1 -0
- package/dist/adapters/gitlab/agent-generator.js +898 -0
- package/dist/adapters/gitlab/agent-generator.js.map +1 -0
- package/dist/adapters/gitlab/converter.d.ts +12 -2
- package/dist/adapters/gitlab/converter.d.ts.map +1 -1
- package/dist/adapters/gitlab/converter.js +19 -2
- package/dist/adapters/gitlab/converter.js.map +1 -1
- package/dist/adapters/gitlab/external-agent-generator.d.ts +70 -0
- package/dist/adapters/gitlab/external-agent-generator.d.ts.map +1 -0
- package/dist/adapters/gitlab/external-agent-generator.js +338 -0
- package/dist/adapters/gitlab/external-agent-generator.js.map +1 -0
- package/dist/adapters/gitlab/flow-generator.d.ts +73 -0
- package/dist/adapters/gitlab/flow-generator.d.ts.map +1 -0
- package/dist/adapters/gitlab/flow-generator.js +669 -0
- package/dist/adapters/gitlab/flow-generator.js.map +1 -0
- package/dist/adapters/gitlab/index.d.ts +10 -2
- package/dist/adapters/gitlab/index.d.ts.map +1 -1
- package/dist/adapters/gitlab/index.js +6 -1
- package/dist/adapters/gitlab/index.js.map +1 -1
- package/dist/adapters/gitlab/package-generator.d.ts +167 -0
- package/dist/adapters/gitlab/package-generator.d.ts.map +1 -0
- package/dist/adapters/gitlab/package-generator.js +2426 -0
- package/dist/adapters/gitlab/package-generator.js.map +1 -0
- package/dist/adapters/gitlab/router-generator.d.ts +113 -0
- package/dist/adapters/gitlab/router-generator.d.ts.map +1 -0
- package/dist/adapters/gitlab/router-generator.js +541 -0
- package/dist/adapters/gitlab/router-generator.js.map +1 -0
- package/dist/adapters/gitlab/trigger-generator.d.ts +154 -0
- package/dist/adapters/gitlab/trigger-generator.d.ts.map +1 -0
- package/dist/adapters/gitlab/trigger-generator.js +279 -0
- package/dist/adapters/gitlab/trigger-generator.js.map +1 -0
- package/dist/adapters/gitlab/types.d.ts +98 -0
- package/dist/adapters/gitlab/types.d.ts.map +1 -1
- package/dist/adapters/kubernetes/generator.d.ts +93 -5
- package/dist/adapters/kubernetes/generator.d.ts.map +1 -1
- package/dist/adapters/kubernetes/generator.js +1292 -33
- package/dist/adapters/kubernetes/generator.js.map +1 -1
- package/dist/adapters/kubernetes/index.d.ts +2 -2
- package/dist/adapters/kubernetes/index.d.ts.map +1 -1
- package/dist/adapters/kubernetes/index.js +1 -1
- package/dist/adapters/kubernetes/kagent-crd-generator.d.ts +72 -0
- package/dist/adapters/kubernetes/kagent-crd-generator.d.ts.map +1 -0
- package/dist/adapters/kubernetes/kagent-crd-generator.js +237 -0
- package/dist/adapters/kubernetes/kagent-crd-generator.js.map +1 -0
- package/dist/adapters/kubernetes/types.d.ts +45 -0
- package/dist/adapters/kubernetes/types.d.ts.map +1 -1
- package/dist/adapters/langchain/adapter.d.ts +1 -9
- package/dist/adapters/langchain/adapter.d.ts.map +1 -1
- package/dist/adapters/langchain/adapter.js +35 -131
- package/dist/adapters/langchain/adapter.js.map +1 -1
- package/dist/adapters/langchain/converter.d.ts.map +1 -1
- package/dist/adapters/langchain/converter.js +16 -4
- package/dist/adapters/langchain/converter.js.map +1 -1
- package/dist/adapters/langfuse.adapter.d.ts +1 -1
- package/dist/adapters/langsmith.adapter.d.ts +1 -1
- package/dist/adapters/mcp/adapter.d.ts.map +1 -1
- package/dist/adapters/mcp/adapter.js +4 -1
- package/dist/adapters/mcp/adapter.js.map +1 -1
- package/dist/adapters/mcp/converter.d.ts.map +1 -1
- package/dist/adapters/mcp/converter.js.map +1 -1
- package/dist/adapters/npm/adapter.d.ts +1 -5
- package/dist/adapters/npm/adapter.d.ts.map +1 -1
- package/dist/adapters/npm/adapter.js +41 -84
- package/dist/adapters/npm/adapter.js.map +1 -1
- package/dist/adapters/npm/converter.d.ts.map +1 -1
- package/dist/adapters/npm/converter.js +28 -15
- package/dist/adapters/npm/converter.js.map +1 -1
- package/dist/adapters/npm/type-aware-dependencies.d.ts +19 -0
- package/dist/adapters/npm/type-aware-dependencies.d.ts.map +1 -0
- package/dist/adapters/npm/type-aware-dependencies.js +158 -0
- package/dist/adapters/npm/type-aware-dependencies.js.map +1 -0
- package/dist/adapters/opentelemetry.adapter.js.map +1 -1
- package/dist/adapters/phoenix.adapter.d.ts +1 -1
- package/dist/cli/banner.d.ts.map +1 -1
- package/dist/cli/banner.js +10 -3
- package/dist/cli/banner.js.map +1 -1
- package/dist/cli/commands/agent-wizard.command.d.ts.map +1 -1
- package/dist/cli/commands/agent-wizard.command.js +6 -1
- package/dist/cli/commands/agent-wizard.command.js.map +1 -1
- package/dist/cli/commands/agents/persona.command.d.ts +10 -0
- package/dist/cli/commands/agents/persona.command.d.ts.map +1 -0
- package/dist/cli/commands/agents/persona.command.js +519 -0
- package/dist/cli/commands/agents/persona.command.js.map +1 -0
- package/dist/cli/commands/agents.command.d.ts.map +1 -1
- package/dist/cli/commands/agents.command.js +6 -0
- package/dist/cli/commands/agents.command.js.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +26 -9
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/build.command.d.ts.map +1 -1
- package/dist/cli/commands/build.command.js +6 -5
- package/dist/cli/commands/build.command.js.map +1 -1
- package/dist/cli/commands/catalog/pull.command.d.ts.map +1 -1
- package/dist/cli/commands/catalog/pull.command.js +25 -5
- package/dist/cli/commands/catalog/pull.command.js.map +1 -1
- package/dist/cli/commands/catalog/push.command.d.ts.map +1 -1
- package/dist/cli/commands/catalog/push.command.js +29 -7
- package/dist/cli/commands/catalog/push.command.js.map +1 -1
- package/dist/cli/commands/catalog/sync.command.d.ts.map +1 -1
- package/dist/cli/commands/catalog/sync.command.js +23 -6
- package/dist/cli/commands/catalog/sync.command.js.map +1 -1
- package/dist/cli/commands/deploy-enhanced.command.d.ts +15 -0
- package/dist/cli/commands/deploy-enhanced.command.d.ts.map +1 -0
- package/dist/cli/commands/deploy-enhanced.command.js +335 -0
- package/dist/cli/commands/deploy-enhanced.command.js.map +1 -0
- package/dist/cli/commands/deploy.command.d.ts.map +1 -1
- package/dist/cli/commands/deploy.command.js +4 -3
- package/dist/cli/commands/deploy.command.js.map +1 -1
- package/dist/cli/commands/deploy.d.ts.map +1 -1
- package/dist/cli/commands/deploy.js +6 -5
- package/dist/cli/commands/deploy.js.map +1 -1
- package/dist/cli/commands/discover.d.ts +15 -0
- package/dist/cli/commands/discover.d.ts.map +1 -0
- package/dist/cli/commands/discover.js +215 -0
- package/dist/cli/commands/discover.js.map +1 -0
- package/dist/cli/commands/estimate.command.js +1 -1
- package/dist/cli/commands/estimate.command.js.map +1 -1
- package/dist/cli/commands/export.command.js +260 -86
- package/dist/cli/commands/export.command.js.map +1 -1
- package/dist/cli/commands/generate-gaid.command.d.ts +14 -0
- package/dist/cli/commands/generate-gaid.command.d.ts.map +1 -0
- package/dist/cli/commands/generate-gaid.command.js +141 -0
- package/dist/cli/commands/generate-gaid.command.js.map +1 -0
- package/dist/cli/commands/governance.command.d.ts +11 -0
- package/dist/cli/commands/governance.command.d.ts.map +1 -0
- package/dist/cli/commands/governance.command.js +166 -0
- package/dist/cli/commands/governance.command.js.map +1 -0
- package/dist/cli/commands/import.command.js.map +1 -1
- package/dist/cli/commands/init.command.d.ts.map +1 -1
- package/dist/cli/commands/init.command.js +11 -13
- package/dist/cli/commands/init.command.js.map +1 -1
- package/dist/cli/commands/lint.command.js +3 -1
- package/dist/cli/commands/lint.command.js.map +1 -1
- package/dist/cli/commands/migrate-langchain.command.js +3 -3
- package/dist/cli/commands/migrate-langchain.command.js.map +1 -1
- package/dist/cli/commands/migrate.command.js.map +1 -1
- package/dist/cli/commands/publish.command.d.ts.map +1 -1
- package/dist/cli/commands/publish.command.js.map +1 -1
- package/dist/cli/commands/quickstart.command.d.ts.map +1 -1
- package/dist/cli/commands/quickstart.command.js +32 -49
- package/dist/cli/commands/quickstart.command.js.map +1 -1
- package/dist/cli/commands/register.d.ts +12 -0
- package/dist/cli/commands/register.d.ts.map +1 -0
- package/dist/cli/commands/register.js +263 -0
- package/dist/cli/commands/register.js.map +1 -0
- package/dist/cli/commands/rollback.command.d.ts +13 -0
- package/dist/cli/commands/rollback.command.d.ts.map +1 -0
- package/dist/cli/commands/rollback.command.js +156 -0
- package/dist/cli/commands/rollback.command.js.map +1 -0
- package/dist/cli/commands/run.command.d.ts.map +1 -1
- package/dist/cli/commands/run.command.js +19 -4
- package/dist/cli/commands/run.command.js.map +1 -1
- package/dist/cli/commands/standardize.command.js +3 -6
- package/dist/cli/commands/standardize.command.js.map +1 -1
- package/dist/cli/commands/test.command.d.ts.map +1 -1
- package/dist/cli/commands/test.command.js +1 -1
- package/dist/cli/commands/test.command.js.map +1 -1
- package/dist/cli/commands/types/wizard-config.types.d.ts.map +1 -1
- package/dist/cli/commands/types/wizard-config.types.js.map +1 -1
- package/dist/cli/commands/upgrade.command.js.map +1 -1
- package/dist/cli/commands/validate.command.js +1 -3
- package/dist/cli/commands/validate.command.js.map +1 -1
- package/dist/cli/commands/verify.d.ts +15 -0
- package/dist/cli/commands/verify.d.ts.map +1 -0
- package/dist/cli/commands/verify.js +274 -0
- package/dist/cli/commands/verify.js.map +1 -0
- package/dist/cli/commands/wizard-api-first.command.d.ts.map +1 -1
- package/dist/cli/commands/wizard-api-first.command.js +1 -2
- package/dist/cli/commands/wizard-api-first.command.js.map +1 -1
- package/dist/cli/commands/wizard-interactive.command.d.ts.map +1 -1
- package/dist/cli/commands/wizard-interactive.command.js +1339 -28
- package/dist/cli/commands/wizard-interactive.command.js.map +1 -1
- package/dist/cli/index.js +136 -70
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/schema-driven/schema-loader.d.ts.map +1 -1
- package/dist/cli/schema-driven/schema-loader.js +2 -2
- package/dist/cli/schema-driven/schema-loader.js.map +1 -1
- package/dist/cli/schema-driven/ui-generator.d.ts.map +1 -1
- package/dist/cli/schema-driven/ui-generator.js +13 -4
- package/dist/cli/schema-driven/ui-generator.js.map +1 -1
- package/dist/cli/templates/enhanced-templates.d.ts.map +1 -1
- package/dist/cli/templates/enhanced-templates.js +2 -1
- package/dist/cli/templates/enhanced-templates.js.map +1 -1
- package/dist/cli/utils/index.d.ts +1 -0
- package/dist/cli/utils/index.d.ts.map +1 -1
- package/dist/cli/utils/index.js +2 -0
- package/dist/cli/utils/index.js.map +1 -1
- package/dist/cli/utils/logo.d.ts +10 -0
- package/dist/cli/utils/logo.d.ts.map +1 -0
- package/dist/cli/utils/logo.js +49 -0
- package/dist/cli/utils/logo.js.map +1 -0
- package/dist/cli/utils/standard-options.d.ts +21 -0
- package/dist/cli/utils/standard-options.d.ts.map +1 -1
- package/dist/cli/utils/standard-options.js +31 -0
- package/dist/cli/utils/standard-options.js.map +1 -1
- package/dist/cli/utils/validation-builder.d.ts +121 -0
- package/dist/cli/utils/validation-builder.d.ts.map +1 -0
- package/dist/cli/utils/validation-builder.js +322 -0
- package/dist/cli/utils/validation-builder.js.map +1 -0
- package/dist/cli/wizard/data/taxonomy.d.ts.map +1 -1
- package/dist/cli/wizard/data/taxonomy.js +5 -1
- package/dist/cli/wizard/data/taxonomy.js.map +1 -1
- package/dist/cli/wizard/interactive-wizard.d.ts.map +1 -1
- package/dist/cli/wizard/interactive-wizard.js +24 -11
- package/dist/cli/wizard/interactive-wizard.js.map +1 -1
- package/dist/cli/wizard/steps/04a-persona.d.ts +16 -0
- package/dist/cli/wizard/steps/04a-persona.d.ts.map +1 -0
- package/dist/cli/wizard/steps/04a-persona.js +297 -0
- package/dist/cli/wizard/steps/04a-persona.js.map +1 -0
- package/dist/cli/wizard/steps/05-tools.d.ts.map +1 -1
- package/dist/cli/wizard/steps/05-tools.js +10 -1
- package/dist/cli/wizard/steps/05-tools.js.map +1 -1
- package/dist/cli/wizard/steps/06-autonomy.js +1 -1
- package/dist/cli/wizard/steps/07-observability.js +1 -1
- package/dist/cli/wizard/steps/08-deployment.js +1 -1
- package/dist/cli/wizard/steps/09-advanced.js +1 -1
- package/dist/cli/wizard/steps/09-advanced.js.map +1 -1
- package/dist/cli/wizard/steps/10-review.d.ts.map +1 -1
- package/dist/cli/wizard/steps/10-review.js +6 -4
- package/dist/cli/wizard/steps/10-review.js.map +1 -1
- package/dist/cli/wizard/steps/12-agents-folder.d.ts.map +1 -1
- package/dist/cli/wizard/steps/12-agents-folder.js +14 -10
- package/dist/cli/wizard/steps/12-agents-folder.js.map +1 -1
- package/dist/cli/wizard/steps/13-openapi-generation.d.ts.map +1 -1
- package/dist/cli/wizard/steps/13-openapi-generation.js +10 -2
- package/dist/cli/wizard/steps/13-openapi-generation.js.map +1 -1
- package/dist/cli/wizard/steps/14-workspace-registration.d.ts.map +1 -1
- package/dist/cli/wizard/steps/14-workspace-registration.js +10 -2
- package/dist/cli/wizard/steps/14-workspace-registration.js.map +1 -1
- package/dist/cli/wizard/steps/15-cost-estimation.d.ts.map +1 -1
- package/dist/cli/wizard/steps/15-cost-estimation.js +27 -11
- package/dist/cli/wizard/steps/15-cost-estimation.js.map +1 -1
- package/dist/cli/wizard/steps/16-best-practices.d.ts.map +1 -1
- package/dist/cli/wizard/steps/16-best-practices.js +14 -13
- package/dist/cli/wizard/steps/16-best-practices.js.map +1 -1
- package/dist/cli/wizard/ui/banner.d.ts +20 -0
- package/dist/cli/wizard/ui/banner.d.ts.map +1 -0
- package/dist/cli/wizard/ui/banner.js +66 -0
- package/dist/cli/wizard/ui/banner.js.map +1 -0
- package/dist/cli/wizard/ui/console.d.ts.map +1 -1
- package/dist/cli/wizard/ui/console.js +21 -23
- package/dist/cli/wizard/ui/console.js.map +1 -1
- package/dist/cli/wizard/ui/wizard-ui.d.ts.map +1 -1
- package/dist/cli/wizard/ui/wizard-ui.js +54 -75
- package/dist/cli/wizard/ui/wizard-ui.js.map +1 -1
- package/dist/cli/wizard/use-cases.d.ts.map +1 -1
- package/dist/cli/wizard/use-cases.js.map +1 -1
- package/dist/config/defaults.d.ts +59 -0
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +72 -0
- package/dist/config/defaults.js.map +1 -1
- package/dist/deploy/cloud/aws-driver.d.ts +75 -0
- package/dist/deploy/cloud/aws-driver.d.ts.map +1 -0
- package/dist/deploy/cloud/aws-driver.js +344 -0
- package/dist/deploy/cloud/aws-driver.js.map +1 -0
- package/dist/deploy/cloud/azure-driver.d.ts +54 -0
- package/dist/deploy/cloud/azure-driver.d.ts.map +1 -0
- package/dist/deploy/cloud/azure-driver.js +221 -0
- package/dist/deploy/cloud/azure-driver.js.map +1 -0
- package/dist/deploy/cloud/gcp-driver.d.ts +56 -0
- package/dist/deploy/cloud/gcp-driver.d.ts.map +1 -0
- package/dist/deploy/cloud/gcp-driver.js +212 -0
- package/dist/deploy/cloud/gcp-driver.js.map +1 -0
- package/dist/dev-cli/commands/version.command.js +18 -18
- package/dist/dev-cli/commands/version.command.js.map +1 -1
- package/dist/dev-cli/services/version-check.service.d.ts.map +1 -1
- package/dist/dev-cli/services/version-check.service.js +2 -1
- package/dist/dev-cli/services/version-check.service.js.map +1 -1
- package/dist/di-container.d.ts.map +1 -1
- package/dist/di-container.js +13 -5
- package/dist/di-container.js.map +1 -1
- package/dist/errors/index.d.ts +154 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +327 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/generated/types.d.ts +91 -91
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/interfaces/governance-provider.interface.d.ts +98 -0
- package/dist/interfaces/governance-provider.interface.d.ts.map +1 -0
- package/dist/interfaces/governance-provider.interface.js +20 -0
- package/dist/interfaces/governance-provider.interface.js.map +1 -0
- package/dist/mesh/advanced-routing.d.ts +181 -0
- package/dist/mesh/advanced-routing.d.ts.map +1 -0
- package/dist/mesh/advanced-routing.js +473 -0
- package/dist/mesh/advanced-routing.js.map +1 -0
- package/dist/mesh/agent-graph.d.ts +218 -0
- package/dist/mesh/agent-graph.d.ts.map +1 -0
- package/dist/mesh/agent-graph.js +487 -0
- package/dist/mesh/agent-graph.js.map +1 -0
- package/dist/mesh/discovery-providers.d.ts +162 -0
- package/dist/mesh/discovery-providers.d.ts.map +1 -0
- package/dist/mesh/discovery-providers.js +514 -0
- package/dist/mesh/discovery-providers.js.map +1 -0
- package/dist/mesh/index.d.ts +3 -0
- package/dist/mesh/index.d.ts.map +1 -1
- package/dist/mesh/index.js +6 -0
- package/dist/mesh/index.js.map +1 -1
- package/dist/messenger/Commands/MessengerConsumeCommand.d.ts +57 -0
- package/dist/messenger/Commands/MessengerConsumeCommand.d.ts.map +1 -0
- package/dist/messenger/Commands/MessengerConsumeCommand.js +49 -0
- package/dist/messenger/Commands/MessengerConsumeCommand.js.map +1 -0
- package/dist/messenger/Commands/MessengerFailedCommand.d.ts +76 -0
- package/dist/messenger/Commands/MessengerFailedCommand.d.ts.map +1 -0
- package/dist/messenger/Commands/MessengerFailedCommand.js +120 -0
- package/dist/messenger/Commands/MessengerFailedCommand.js.map +1 -0
- package/dist/messenger/Commands/MessengerStatsCommand.d.ts +61 -0
- package/dist/messenger/Commands/MessengerStatsCommand.d.ts.map +1 -0
- package/dist/messenger/Commands/MessengerStatsCommand.js +80 -0
- package/dist/messenger/Commands/MessengerStatsCommand.js.map +1 -0
- package/dist/messenger/Commands/index.d.ts +10 -0
- package/dist/messenger/Commands/index.d.ts.map +1 -0
- package/dist/messenger/Commands/index.js +10 -0
- package/dist/messenger/Commands/index.js.map +1 -0
- package/dist/messenger/EventSubscriber/FailedMessageSubscriber.d.ts +44 -0
- package/dist/messenger/EventSubscriber/FailedMessageSubscriber.d.ts.map +1 -0
- package/dist/messenger/EventSubscriber/FailedMessageSubscriber.js +64 -0
- package/dist/messenger/EventSubscriber/FailedMessageSubscriber.js.map +1 -0
- package/dist/messenger/Handler/AgentBatchHandler.d.ts +80 -0
- package/dist/messenger/Handler/AgentBatchHandler.d.ts.map +1 -0
- package/dist/messenger/Handler/AgentBatchHandler.js +207 -0
- package/dist/messenger/Handler/AgentBatchHandler.js.map +1 -0
- package/dist/messenger/Handler/AgentExecutionHandler.d.ts +76 -0
- package/dist/messenger/Handler/AgentExecutionHandler.d.ts.map +1 -0
- package/dist/messenger/Handler/AgentExecutionHandler.js +131 -0
- package/dist/messenger/Handler/AgentExecutionHandler.js.map +1 -0
- package/dist/messenger/Handler/index.d.ts +9 -0
- package/dist/messenger/Handler/index.d.ts.map +1 -0
- package/dist/messenger/Handler/index.js +9 -0
- package/dist/messenger/Handler/index.js.map +1 -0
- package/dist/messenger/Message/AgentBatchMessage.d.ts +115 -0
- package/dist/messenger/Message/AgentBatchMessage.d.ts.map +1 -0
- package/dist/messenger/Message/AgentBatchMessage.js +100 -0
- package/dist/messenger/Message/AgentBatchMessage.js.map +1 -0
- package/dist/messenger/Message/AgentExecutionMessage.d.ts +98 -0
- package/dist/messenger/Message/AgentExecutionMessage.d.ts.map +1 -0
- package/dist/messenger/Message/AgentExecutionMessage.js +77 -0
- package/dist/messenger/Message/AgentExecutionMessage.js.map +1 -0
- package/dist/messenger/Message/index.d.ts +9 -0
- package/dist/messenger/Message/index.d.ts.map +1 -0
- package/dist/messenger/Message/index.js +9 -0
- package/dist/messenger/Message/index.js.map +1 -0
- package/dist/messenger/Middleware/AuthenticationMiddleware.d.ts +41 -0
- package/dist/messenger/Middleware/AuthenticationMiddleware.d.ts.map +1 -0
- package/dist/messenger/Middleware/AuthenticationMiddleware.js +85 -0
- package/dist/messenger/Middleware/AuthenticationMiddleware.js.map +1 -0
- package/dist/messenger/Middleware/LoggingMiddleware.d.ts +30 -0
- package/dist/messenger/Middleware/LoggingMiddleware.d.ts.map +1 -0
- package/dist/messenger/Middleware/LoggingMiddleware.js +57 -0
- package/dist/messenger/Middleware/LoggingMiddleware.js.map +1 -0
- package/dist/messenger/Middleware/RateLimitMiddleware.d.ts +67 -0
- package/dist/messenger/Middleware/RateLimitMiddleware.d.ts.map +1 -0
- package/dist/messenger/Middleware/RateLimitMiddleware.js +90 -0
- package/dist/messenger/Middleware/RateLimitMiddleware.js.map +1 -0
- package/dist/messenger/Middleware/ValidationMiddleware.d.ts +39 -0
- package/dist/messenger/Middleware/ValidationMiddleware.d.ts.map +1 -0
- package/dist/messenger/Middleware/ValidationMiddleware.js +91 -0
- package/dist/messenger/Middleware/ValidationMiddleware.js.map +1 -0
- package/dist/messenger/Middleware/index.d.ts +11 -0
- package/dist/messenger/Middleware/index.d.ts.map +1 -0
- package/dist/messenger/Middleware/index.js +11 -0
- package/dist/messenger/Middleware/index.js.map +1 -0
- package/dist/messenger/Monitoring/MetricsCollector.d.ts +107 -0
- package/dist/messenger/Monitoring/MetricsCollector.d.ts.map +1 -0
- package/dist/messenger/Monitoring/MetricsCollector.js +80 -0
- package/dist/messenger/Monitoring/MetricsCollector.js.map +1 -0
- package/dist/messenger/Monitoring/QueueMonitor.d.ts +74 -0
- package/dist/messenger/Monitoring/QueueMonitor.d.ts.map +1 -0
- package/dist/messenger/Monitoring/QueueMonitor.js +157 -0
- package/dist/messenger/Monitoring/QueueMonitor.js.map +1 -0
- package/dist/messenger/Monitoring/index.d.ts +9 -0
- package/dist/messenger/Monitoring/index.d.ts.map +1 -0
- package/dist/messenger/Monitoring/index.js +9 -0
- package/dist/messenger/Monitoring/index.js.map +1 -0
- package/dist/messenger/index.d.ts +38 -0
- package/dist/messenger/index.d.ts.map +1 -0
- package/dist/messenger/index.js +44 -0
- package/dist/messenger/index.js.map +1 -0
- package/dist/observability/index.d.ts +13 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/index.js +14 -0
- package/dist/observability/index.js.map +1 -0
- package/dist/observability/metrics.d.ts +131 -0
- package/dist/observability/metrics.d.ts.map +1 -0
- package/dist/observability/metrics.js +308 -0
- package/dist/observability/metrics.js.map +1 -0
- package/dist/observability/middleware.d.ts +64 -0
- package/dist/observability/middleware.d.ts.map +1 -0
- package/dist/observability/middleware.js +225 -0
- package/dist/observability/middleware.js.map +1 -0
- package/dist/package.json +17 -12
- package/dist/runtime/agent-runner.d.ts.map +1 -1
- package/dist/runtime/agent-runner.js +23 -23
- package/dist/runtime/agent-runner.js.map +1 -1
- package/dist/sdks/kagent/crd-generator.d.ts +63 -1
- package/dist/sdks/kagent/crd-generator.d.ts.map +1 -1
- package/dist/sdks/kagent/crd-generator.js +769 -20
- package/dist/sdks/kagent/crd-generator.js.map +1 -1
- package/dist/sdks/kagent/index.d.ts +1 -1
- package/dist/sdks/kagent/index.d.ts.map +1 -1
- package/dist/sdks/kagent/k8s-resources-generator.d.ts.map +1 -1
- package/dist/sdks/kagent/k8s-resources-generator.js.map +1 -1
- package/dist/sdks/kagent/types.d.ts +30 -0
- package/dist/sdks/kagent/types.d.ts.map +1 -1
- package/dist/sdks/shared/validation.d.ts +4 -4
- package/dist/services/agent-protocol-client.d.ts +541 -0
- package/dist/services/agent-protocol-client.d.ts.map +1 -0
- package/dist/services/agent-protocol-client.js +166 -0
- package/dist/services/agent-protocol-client.js.map +1 -0
- package/dist/services/ai-architect.service.js.map +1 -1
- package/dist/services/cost-estimation/token-counter.service.js +1 -1
- package/dist/services/cost-estimation/token-counter.service.js.map +1 -1
- package/dist/services/dev-server/websocket-server.d.ts.map +1 -1
- package/dist/services/dev-server/websocket-server.js +2 -1
- package/dist/services/dev-server/websocket-server.js.map +1 -1
- package/dist/services/export/anthropic/anthropic-exporter.d.ts.map +1 -1
- package/dist/services/export/anthropic/anthropic-exporter.js +8 -3
- package/dist/services/export/anthropic/anthropic-exporter.js.map +1 -1
- package/dist/services/export/anthropic/index.d.ts +1 -1
- package/dist/services/export/anthropic/index.d.ts.map +1 -1
- package/dist/services/export/anthropic/index.js +1 -1
- package/dist/services/export/anthropic/index.js.map +1 -1
- package/dist/services/export/langchain/callbacks-generator.d.ts.map +1 -1
- package/dist/services/export/langchain/callbacks-generator.js +16 -8
- package/dist/services/export/langchain/callbacks-generator.js.map +1 -1
- package/dist/services/export/langchain/error-handling-generator.d.ts.map +1 -1
- package/dist/services/export/langchain/error-handling-generator.js +9 -5
- package/dist/services/export/langchain/error-handling-generator.js.map +1 -1
- package/dist/services/export/langchain/langchain-exporter.d.ts.map +1 -1
- package/dist/services/export/langchain/langchain-exporter.js +16 -8
- package/dist/services/export/langchain/langchain-exporter.js.map +1 -1
- package/dist/services/export/langchain/langgraph-generator.d.ts.map +1 -1
- package/dist/services/export/langchain/langgraph-generator.js +34 -20
- package/dist/services/export/langchain/langgraph-generator.js.map +1 -1
- package/dist/services/export/langchain/langserve-generator.d.ts.map +1 -1
- package/dist/services/export/langchain/langserve-generator.js +7 -1
- package/dist/services/export/langchain/langserve-generator.js.map +1 -1
- package/dist/services/export/langchain/memory-generator.d.ts.map +1 -1
- package/dist/services/export/langchain/memory-generator.js.map +1 -1
- package/dist/services/export/langchain/plan-execute-generator.d.ts.map +1 -1
- package/dist/services/export/langchain/plan-execute-generator.js.map +1 -1
- package/dist/services/export/langchain/streaming-generator.d.ts.map +1 -1
- package/dist/services/export/langchain/streaming-generator.js +12 -6
- package/dist/services/export/langchain/streaming-generator.js.map +1 -1
- package/dist/services/export/langchain/tools-generator.d.ts.map +1 -1
- package/dist/services/export/langchain/tools-generator.js.map +1 -1
- package/dist/services/export/npm/npm-exporter.d.ts +40 -0
- package/dist/services/export/npm/npm-exporter.d.ts.map +1 -1
- package/dist/services/export/npm/npm-exporter.js +1294 -1
- package/dist/services/export/npm/npm-exporter.js.map +1 -1
- package/dist/services/export/npm/package-json-generator.js +3 -1
- package/dist/services/export/npm/package-json-generator.js.map +1 -1
- package/dist/services/export/npm/typescript-generator.d.ts.map +1 -1
- package/dist/services/export/npm/typescript-generator.js +7 -3
- package/dist/services/export/npm/typescript-generator.js.map +1 -1
- package/dist/services/export/testing/index.d.ts +1 -1
- package/dist/services/export/testing/index.d.ts.map +1 -1
- package/dist/services/export/testing/test-generator.d.ts.map +1 -1
- package/dist/services/export/testing/test-generator.js +5 -1
- package/dist/services/export/testing/test-generator.js.map +1 -1
- package/dist/services/governance-client.service.d.ts +39 -0
- package/dist/services/governance-client.service.d.ts.map +1 -0
- package/dist/services/governance-client.service.js +124 -0
- package/dist/services/governance-client.service.js.map +1 -0
- package/dist/services/migration/langchain-migration.service.js +2 -2
- package/dist/services/migration/langchain-migration.service.js.map +1 -1
- package/dist/services/release-automation/release.service.d.ts +4 -4
- package/dist/services/release-automation/schemas/release.schema.d.ts +5 -5
- package/dist/services/release-automation/tag.service.d.ts +3 -3
- package/dist/services/taxonomy-service.d.ts +3 -3
- package/dist/services/test-runner/mock-llm.service.d.ts.map +1 -1
- package/dist/services/test-runner/mock-llm.service.js +1 -2
- package/dist/services/test-runner/mock-llm.service.js.map +1 -1
- package/dist/services/test-runner/scenarios.d.ts.map +1 -1
- package/dist/services/test-runner/scenarios.js +9 -3
- package/dist/services/test-runner/scenarios.js.map +1 -1
- package/dist/services/test-runner/test-runner.service.d.ts.map +1 -1
- package/dist/services/test-runner/test-runner.service.js.map +1 -1
- package/dist/services/validation/best-practices-validator.d.ts.map +1 -1
- package/dist/services/validation/best-practices-validator.js.map +1 -1
- package/dist/services/validation/cost-estimator.d.ts.map +1 -1
- package/dist/services/validation/cost-estimator.js +4 -2
- package/dist/services/validation/cost-estimator.js.map +1 -1
- package/dist/services/validation/enhanced-validator.d.ts.map +1 -1
- package/dist/services/validation/enhanced-validator.js +2 -4
- package/dist/services/validation/enhanced-validator.js.map +1 -1
- package/dist/services/validation/security-validator.d.ts.map +1 -1
- package/dist/services/validation/security-validator.js +3 -1
- package/dist/services/validation/security-validator.js.map +1 -1
- package/dist/services/validation-zod.service.js +1 -1
- package/dist/services/validation-zod.service.js.map +1 -1
- package/dist/services/validation.service.d.ts +7 -2
- package/dist/services/validation.service.d.ts.map +1 -1
- package/dist/services/validation.service.js +7 -4
- package/dist/services/validation.service.js.map +1 -1
- package/dist/services/validators/a2a.validator.js.map +1 -1
- package/dist/services/validators/autogen.validator.js.map +1 -1
- package/dist/services/validators/contract.validator.js.map +1 -1
- package/dist/services/validators/crewai.validator.js.map +1 -1
- package/dist/services/validators/dependencies.validator.d.ts +1 -1
- package/dist/services/validators/dependencies.validator.d.ts.map +1 -1
- package/dist/services/validators/kagent.validator.js.map +1 -1
- package/dist/services/validators/langchain.validator.js.map +1 -1
- package/dist/services/validators/langgraph.validator.js.map +1 -1
- package/dist/services/validators/mcp.validator.js.map +1 -1
- package/dist/services/wizard/prompts.d.ts.map +1 -1
- package/dist/services/wizard/prompts.js +12 -5
- package/dist/services/wizard/prompts.js.map +1 -1
- package/dist/services/wizard/wizard.service.d.ts.map +1 -1
- package/dist/services/wizard/wizard.service.js +9 -4
- package/dist/services/wizard/wizard.service.js.map +1 -1
- package/dist/spec/extensions/knowledge-graph/knowledge-graph.schema.json +386 -0
- package/dist/spec/v0.4/agent.schema.json +154 -1
- package/dist/spec/v0.4/validator.schema.json +282 -0
- package/dist/transports/websocket.d.ts +1 -0
- package/dist/transports/websocket.d.ts.map +1 -1
- package/dist/transports/websocket.js +9 -1
- package/dist/transports/websocket.js.map +1 -1
- package/dist/types/architect.d.ts +2 -2
- package/dist/types/architect.d.ts.map +1 -1
- package/dist/types/identity.zod.d.ts +21 -21
- package/dist/types/index.d.ts +65 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/personality.zod.d.ts +65 -65
- package/dist/types/prompts.zod.d.ts +2 -2
- package/dist/utils/logger.d.ts +82 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +250 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/validation/index.d.ts +3 -0
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +6 -0
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/progressive-scorer.d.ts +123 -0
- package/dist/validation/progressive-scorer.d.ts.map +1 -0
- package/dist/validation/progressive-scorer.js +340 -0
- package/dist/validation/progressive-scorer.js.map +1 -0
- package/dist/validation/validation-context.d.ts +86 -0
- package/dist/validation/validation-context.d.ts.map +1 -0
- package/dist/validation/validation-context.js +138 -0
- package/dist/validation/validation-context.js.map +1 -0
- package/dist/validation/validator-registry.d.ts +158 -0
- package/dist/validation/validator-registry.d.ts.map +1 -0
- package/dist/validation/validator-registry.js +245 -0
- package/dist/validation/validator-registry.js.map +1 -0
- package/dist/version-management/api/server.d.ts.map +1 -1
- package/dist/version-management/api/server.js.map +1 -1
- package/dist/version-management/cli/index.js +8 -1
- package/dist/version-management/cli/index.js.map +1 -1
- package/dist/version-management/core/version-manager.d.ts.map +1 -1
- package/dist/version-management/core/version-manager.js +5 -2
- package/dist/version-management/core/version-manager.js.map +1 -1
- package/dist/version-management/core/version-manager.test.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +4 -6
- package/dist/version.js.map +1 -1
- package/examples/agent-mesh/DISCOVERY.md +679 -0
- package/examples/agent-mesh/discovery-system.ts +670 -0
- package/examples/agent-taxonomy-example.ossa.yaml +89 -0
- package/examples/agents/02-code-review-agent/agent.ossa.yaml +49 -0
- package/examples/agents/03-data-analysis-agent/agent.ossa.yaml +55 -0
- package/examples/agents/06-devops-agent/agent.ossa.yaml +47 -0
- package/examples/agents/07-research-assistant/agent.ossa.yaml +61 -1
- package/examples/agents/09-security-scanner/agent.ossa.yaml +46 -0
- package/examples/deployment-workflow.md +601 -0
- package/examples/gitlab-agents/DEPLOYMENT.md +331 -0
- package/examples/gitlab-agents/daily-code-scan/.env.example +11 -0
- package/examples/gitlab-agents/daily-code-scan/.gitlab-ci.yml +34 -0
- package/examples/gitlab-agents/daily-code-scan/Dockerfile +18 -0
- package/examples/gitlab-agents/daily-code-scan/README.md +80 -0
- package/examples/gitlab-agents/daily-code-scan/package.json +28 -0
- package/examples/gitlab-agents/daily-code-scan/src/gitlab-client.ts +59 -0
- package/examples/gitlab-agents/daily-code-scan/src/index.ts +50 -0
- package/examples/gitlab-agents/daily-code-scan/src/types.ts +22 -0
- package/examples/gitlab-agents/daily-code-scan/src/workflow.ts +109 -0
- package/examples/gitlab-agents/daily-code-scan/tsconfig.json +24 -0
- package/examples/gitlab-agents/duo-comment-responder/.env.example +14 -0
- package/examples/gitlab-agents/duo-comment-responder/.gitlab-ci.yml +34 -0
- package/examples/gitlab-agents/duo-comment-responder/Dockerfile +18 -0
- package/examples/gitlab-agents/duo-comment-responder/README.md +98 -0
- package/examples/gitlab-agents/duo-comment-responder/package.json +29 -0
- package/examples/gitlab-agents/duo-comment-responder/src/gitlab-client.ts +56 -0
- package/examples/gitlab-agents/duo-comment-responder/src/index.ts +103 -0
- package/examples/gitlab-agents/duo-comment-responder/src/llm-client.ts +75 -0
- package/examples/gitlab-agents/duo-comment-responder/src/types.ts +22 -0
- package/examples/gitlab-agents/duo-comment-responder/src/workflow.ts +135 -0
- package/examples/gitlab-agents/duo-comment-responder/tsconfig.json +24 -0
- package/examples/gitlab-agents/duo-comment-responder/webhook-config.json +11 -0
- package/examples/gitlab-agents/k8s/deploy-all.yaml +341 -0
- package/examples/gitlab-agents/mr-reviewer/.env.example +14 -0
- package/examples/gitlab-agents/mr-reviewer/.gitlab-ci.yml +34 -0
- package/examples/gitlab-agents/mr-reviewer/Dockerfile +18 -0
- package/examples/gitlab-agents/mr-reviewer/README.md +98 -0
- package/examples/gitlab-agents/mr-reviewer/package.json +29 -0
- package/examples/gitlab-agents/mr-reviewer/src/gitlab-client.ts +66 -0
- package/examples/gitlab-agents/mr-reviewer/src/index.ts +103 -0
- package/examples/gitlab-agents/mr-reviewer/src/llm-client.ts +95 -0
- package/examples/gitlab-agents/mr-reviewer/src/types.ts +22 -0
- package/examples/gitlab-agents/mr-reviewer/src/workflow.ts +144 -0
- package/examples/gitlab-agents/mr-reviewer/tsconfig.json +24 -0
- package/examples/gitlab-agents/mr-reviewer/webhook-config.json +11 -0
- package/examples/gitlab-agents/pipeline-auto-fix/.env.example +14 -0
- package/examples/gitlab-agents/pipeline-auto-fix/.gitlab-ci.yml +34 -0
- package/examples/gitlab-agents/pipeline-auto-fix/Dockerfile +18 -0
- package/examples/gitlab-agents/pipeline-auto-fix/README.md +98 -0
- package/examples/gitlab-agents/pipeline-auto-fix/package.json +29 -0
- package/examples/gitlab-agents/pipeline-auto-fix/src/gitlab-client.ts +77 -0
- package/examples/gitlab-agents/pipeline-auto-fix/src/index.ts +103 -0
- package/examples/gitlab-agents/pipeline-auto-fix/src/llm-client.ts +79 -0
- package/examples/gitlab-agents/pipeline-auto-fix/src/types.ts +22 -0
- package/examples/gitlab-agents/pipeline-auto-fix/src/workflow.ts +146 -0
- package/examples/gitlab-agents/pipeline-auto-fix/tsconfig.json +24 -0
- package/examples/gitlab-agents/pipeline-auto-fix/webhook-config.json +11 -0
- package/examples/gitlab-agents/pre-commit-quality-check/.env.example +11 -0
- package/examples/gitlab-agents/pre-commit-quality-check/.gitlab-ci.yml +34 -0
- package/examples/gitlab-agents/pre-commit-quality-check/Dockerfile +18 -0
- package/examples/gitlab-agents/pre-commit-quality-check/README.md +80 -0
- package/examples/gitlab-agents/pre-commit-quality-check/package.json +28 -0
- package/examples/gitlab-agents/pre-commit-quality-check/src/gitlab-client.ts +20 -0
- package/examples/gitlab-agents/pre-commit-quality-check/src/index.ts +50 -0
- package/examples/gitlab-agents/pre-commit-quality-check/src/types.ts +22 -0
- package/examples/gitlab-agents/pre-commit-quality-check/src/workflow.ts +63 -0
- package/examples/gitlab-agents/pre-commit-quality-check/tsconfig.json +24 -0
- package/examples/gitlab-agents/pre-push-validation/.env.example +11 -0
- package/examples/gitlab-agents/pre-push-validation/.gitlab-ci.yml +34 -0
- package/examples/gitlab-agents/pre-push-validation/Dockerfile +18 -0
- package/examples/gitlab-agents/pre-push-validation/README.md +80 -0
- package/examples/gitlab-agents/pre-push-validation/package.json +28 -0
- package/examples/gitlab-agents/pre-push-validation/src/gitlab-client.ts +20 -0
- package/examples/gitlab-agents/pre-push-validation/src/index.ts +50 -0
- package/examples/gitlab-agents/pre-push-validation/src/types.ts +22 -0
- package/examples/gitlab-agents/pre-push-validation/src/workflow.ts +63 -0
- package/examples/gitlab-agents/pre-push-validation/tsconfig.json +24 -0
- package/examples/gitlab-duo/EXTERNAL_AGENTS.md +466 -0
- package/examples/gitlab-duo/README.md +307 -0
- package/examples/gitlab-duo/code-review-flow.yaml +62 -0
- package/examples/gitlab-duo/external-agent-example.ts +192 -0
- package/examples/gitlab-duo/generated/custom-vars-agent.yaml +45 -0
- package/examples/gitlab-duo/generated/go-agent.yaml +41 -0
- package/examples/gitlab-duo/generated/python-agent.yaml +43 -0
- package/examples/gitlab-duo/generated/webhook-agent.yaml +52 -0
- package/examples/infrastructure/token-rotation/README.md +117 -0
- package/examples/infrastructure/token-rotation/manifest.ossa.yaml +73 -0
- package/examples/infrastructure/token-rotation/openapi.yaml +133 -0
- package/examples/knowledge-graph/drupal-agent-with-kg.ossa.yaml +289 -0
- package/examples/mcp/browser-puppeteer.ossa.yaml +234 -0
- package/examples/mr-reviewer-with-governance.ossa.yaml +130 -0
- package/examples/showcase/PRODUCTION_EXAMPLES.md +499 -0
- package/examples/showcase/compliance-checker.ossa.yaml +207 -0
- package/examples/showcase/customer-support.ossa.yaml +344 -0
- package/examples/showcase/data-processing-pipeline.ossa.yaml +254 -0
- package/examples/showcase/security-scanner-enhanced.ossa.yaml +304 -0
- package/examples/showcase/team-leader.ossa.yaml +306 -0
- package/package.json +17 -12
- package/schemas/governance-extension.yaml +161 -0
- package/spec/extensions/knowledge-graph/knowledge-graph.schema.json +386 -0
- package/spec/v0.4/agent.schema.json +154 -1
- package/spec/v0.4/validator.schema.json +282 -0
- package/templates/agent-types/claude-agent.ossa.yaml +83 -0
- package/templates/agent-types/kagent.ossa.yaml +110 -0
- package/templates/agent-types/langchain-agent.ossa.yaml +106 -0
- package/templates/agent-types/openapi-agent.ossa.yaml +121 -0
- package/templates/agent-types/swarm-agents.ossa.yaml +168 -0
- package/templates/ci-cd/github-actions.deploy.yml +272 -0
- package/templates/ci-cd/gitlab-ci.deploy.yml +205 -0
- package/templates/validators/capability-compatibility.ossa.yaml +174 -0
- package/templates/validators/coordination-consistency.ossa.yaml +160 -0
- package/templates/validators/pattern-requirements.ossa.yaml +182 -0
- package/templates/validators/transport-compatibility.ossa.yaml +185 -0
- package/.wiki-config.json +0 -24
- package/DEMO.md +0 -212
- package/junit.xml +0 -1469
- package/llms-ctx-full.txt +0 -41
- package/llms-ctx.txt +0 -41
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
* SOLID: Single Responsibility - CrewAI export only
|
|
9
9
|
* DRY: Reuses BaseAdapter validation and existing converter
|
|
10
10
|
*/
|
|
11
|
+
import * as yaml from 'yaml';
|
|
11
12
|
import { BaseAdapter } from '../base/adapter.interface.js';
|
|
13
|
+
import { getApiVersion } from '../../utils/version.js';
|
|
12
14
|
import { CrewAIConverter } from './converter.js';
|
|
13
15
|
export class CrewAIAdapter extends BaseAdapter {
|
|
14
16
|
platform = 'crewai';
|
|
@@ -35,27 +37,59 @@ export class CrewAIAdapter extends BaseAdapter {
|
|
|
35
37
|
// Convert to CrewAI config
|
|
36
38
|
const config = this.converter.convert(manifest);
|
|
37
39
|
const files = [];
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// Generate agents.py - Individual agent definitions
|
|
40
|
+
const projectName = manifest.metadata?.name || 'crew';
|
|
41
|
+
// Generate directory structure: agents/, tasks/, crew/, tools/
|
|
42
|
+
// 1. agents/ directory - Individual agent definitions
|
|
42
43
|
const agentsCode = this.generateAgentsCode(config, manifest);
|
|
43
|
-
files.push(this.createFile('
|
|
44
|
-
//
|
|
44
|
+
files.push(this.createFile('agents/__init__.py', agentsCode, 'code', 'python'));
|
|
45
|
+
// 2. tasks/ directory - Task definitions
|
|
45
46
|
const tasksCode = this.generateTasksCode(config, manifest);
|
|
46
|
-
files.push(this.createFile('
|
|
47
|
-
//
|
|
47
|
+
files.push(this.createFile('tasks/__init__.py', tasksCode, 'code', 'python'));
|
|
48
|
+
// 3. tools/ directory - Custom tool implementations
|
|
48
49
|
const toolsCode = this.generateToolsCode(manifest);
|
|
49
|
-
files.push(this.createFile('
|
|
50
|
-
|
|
50
|
+
files.push(this.createFile('tools/__init__.py', toolsCode, 'code', 'python'));
|
|
51
|
+
const customToolsCode = this.generateCustomToolsCode(manifest);
|
|
52
|
+
files.push(this.createFile('tools/custom_tools.py', customToolsCode, 'code', 'python'));
|
|
53
|
+
// 4. crew/ directory - Crew setup and orchestration
|
|
54
|
+
const crewCode = this.generateCrewCode(config, manifest);
|
|
55
|
+
files.push(this.createFile('crew/__init__.py', crewCode, 'code', 'python'));
|
|
56
|
+
const crewSetupCode = this.generateCrewSetupCode(config, manifest);
|
|
57
|
+
files.push(this.createFile('crew/crew.py', crewSetupCode, 'code', 'python'));
|
|
58
|
+
// 5. main.py - Entry point
|
|
59
|
+
const mainCode = this.generateMainCode(manifest);
|
|
60
|
+
files.push(this.createFile('main.py', mainCode, 'code', 'python'));
|
|
61
|
+
// 6. Configuration files
|
|
51
62
|
const requirements = this.generateRequirements();
|
|
52
|
-
files.push(this.createFile('
|
|
53
|
-
|
|
63
|
+
files.push(this.createFile('requirements.txt', requirements, 'config'));
|
|
64
|
+
const envExample = this.generateEnvExample(manifest);
|
|
65
|
+
files.push(this.createFile('.env.example', envExample, 'config'));
|
|
66
|
+
const dockerignore = this.generateDockerignore();
|
|
67
|
+
files.push(this.createFile('.dockerignore', dockerignore, 'config'));
|
|
68
|
+
const gitignore = this.generateGitignore();
|
|
69
|
+
files.push(this.createFile('.gitignore', gitignore, 'config'));
|
|
70
|
+
// 7. Documentation
|
|
54
71
|
const readme = this.generateReadme(manifest, config);
|
|
55
|
-
files.push(this.createFile('
|
|
72
|
+
files.push(this.createFile('README.md', readme, 'documentation'));
|
|
73
|
+
const deployment = this.generateDeploymentGuide(manifest);
|
|
74
|
+
files.push(this.createFile('DEPLOYMENT.md', deployment, 'documentation'));
|
|
75
|
+
// Include source OSSA manifest for provenance
|
|
76
|
+
files.push(this.createFile('agent.ossa.yaml', yaml.stringify(manifest), 'config', 'yaml'));
|
|
77
|
+
// 8. Examples
|
|
78
|
+
const exampleUsage = this.generateExampleUsage(manifest);
|
|
79
|
+
files.push(this.createFile('examples/basic_usage.py', exampleUsage, 'code', 'python'));
|
|
80
|
+
const exampleAsync = this.generateExampleAsync(manifest);
|
|
81
|
+
files.push(this.createFile('examples/async_usage.py', exampleAsync, 'code', 'python'));
|
|
82
|
+
// 9. Tests (if requested)
|
|
83
|
+
if (options?.includeTests) {
|
|
84
|
+
const testsCode = this.generateTestsCode(manifest);
|
|
85
|
+
files.push(this.createFile('tests/test_crew.py', testsCode, 'test', 'python'));
|
|
86
|
+
const testToolsCode = this.generateTestToolsCode(manifest);
|
|
87
|
+
files.push(this.createFile('tests/test_tools.py', testToolsCode, 'test', 'python'));
|
|
88
|
+
}
|
|
56
89
|
return this.createResult(true, files, undefined, {
|
|
57
90
|
duration: Date.now() - startTime,
|
|
58
91
|
version: '0.1.0',
|
|
92
|
+
structure: 'production-grade',
|
|
59
93
|
});
|
|
60
94
|
}
|
|
61
95
|
catch (error) {
|
|
@@ -167,7 +201,7 @@ ${agent.role.replace(/[^a-zA-Z0-9]/g, '_')}_agent = Agent(
|
|
|
167
201
|
goal="${agent.goal}",
|
|
168
202
|
backstory="""${agent.backstory}""",
|
|
169
203
|
tools=get_tools(),
|
|
170
|
-
verbose=${agent.verbose
|
|
204
|
+
verbose=${agent.verbose ? 'True' : 'False'},
|
|
171
205
|
allow_delegation=True,
|
|
172
206
|
)`)
|
|
173
207
|
.join('\n')}
|
|
@@ -234,59 +268,1451 @@ def get_tools() -> list:
|
|
|
234
268
|
return [
|
|
235
269
|
${tools.map((t) => ` ${t.name || 'unknown_tool'}`).join(',\n')}
|
|
236
270
|
]
|
|
271
|
+
`;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Generate crew/__init__.py - Crew module exports
|
|
275
|
+
*/
|
|
276
|
+
generateCrewCode(config, manifest) {
|
|
277
|
+
return `"""
|
|
278
|
+
${manifest.metadata?.name || 'CrewAI'} Crew Module
|
|
279
|
+
Generated from OSSA manifest
|
|
280
|
+
|
|
281
|
+
This module exports the main crew instance.
|
|
282
|
+
"""
|
|
283
|
+
|
|
284
|
+
from .crew import ${this.toPascalCase(manifest.metadata?.name || 'crew')}
|
|
285
|
+
|
|
286
|
+
__all__ = ['${this.toPascalCase(manifest.metadata?.name || 'crew')}']
|
|
287
|
+
`;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Generate crew/crew.py - Main crew setup
|
|
291
|
+
*/
|
|
292
|
+
generateCrewSetupCode(config, manifest) {
|
|
293
|
+
const className = this.toPascalCase(manifest.metadata?.name || 'crew');
|
|
294
|
+
return `"""
|
|
295
|
+
${manifest.metadata?.name || 'CrewAI'} Crew Setup
|
|
296
|
+
Generated from OSSA manifest: ${manifest.metadata?.name || 'unknown'}
|
|
297
|
+
|
|
298
|
+
This module defines the main crew orchestration.
|
|
299
|
+
"""
|
|
300
|
+
|
|
301
|
+
from crewai import Crew, Process
|
|
302
|
+
from agents import agents
|
|
303
|
+
from tasks import tasks
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
class ${className}:
|
|
307
|
+
"""Main crew orchestration class"""
|
|
308
|
+
|
|
309
|
+
def __init__(self):
|
|
310
|
+
"""Initialize the crew"""
|
|
311
|
+
self.agents = agents
|
|
312
|
+
self.tasks = tasks
|
|
313
|
+
self.crew = self._create_crew()
|
|
314
|
+
|
|
315
|
+
def _create_crew(self) -> Crew:
|
|
316
|
+
"""Create and configure the crew"""
|
|
317
|
+
return Crew(
|
|
318
|
+
agents=self.agents,
|
|
319
|
+
tasks=self.tasks,
|
|
320
|
+
process=Process.${config.process || 'sequential'},
|
|
321
|
+
verbose=${config.verbose ? 'True' : 'False'},
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
def kickoff(self, inputs: dict = None) -> str:
|
|
325
|
+
"""
|
|
326
|
+
Execute the crew with optional inputs
|
|
327
|
+
|
|
328
|
+
Args:
|
|
329
|
+
inputs: Dictionary of input parameters
|
|
330
|
+
|
|
331
|
+
Returns:
|
|
332
|
+
Crew execution result
|
|
333
|
+
"""
|
|
334
|
+
if inputs is None:
|
|
335
|
+
inputs = {}
|
|
336
|
+
|
|
337
|
+
return self.crew.kickoff(inputs=inputs)
|
|
338
|
+
|
|
339
|
+
async def kickoff_async(self, inputs: dict = None) -> str:
|
|
340
|
+
"""
|
|
341
|
+
Execute the crew asynchronously
|
|
342
|
+
|
|
343
|
+
Args:
|
|
344
|
+
inputs: Dictionary of input parameters
|
|
345
|
+
|
|
346
|
+
Returns:
|
|
347
|
+
Crew execution result
|
|
348
|
+
"""
|
|
349
|
+
if inputs is None:
|
|
350
|
+
inputs = {}
|
|
351
|
+
|
|
352
|
+
return await self.crew.kickoff_async(inputs=inputs)
|
|
353
|
+
`;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Generate tools/custom_tools.py - Custom tool implementations
|
|
357
|
+
*/
|
|
358
|
+
generateCustomToolsCode(manifest) {
|
|
359
|
+
const tools = (manifest.spec?.tools || []);
|
|
360
|
+
return `"""
|
|
361
|
+
Custom Tool Implementations
|
|
362
|
+
Generated from OSSA manifest: ${manifest.metadata?.name || 'unknown'}
|
|
363
|
+
|
|
364
|
+
Implement your custom tools here following CrewAI's tool decorator pattern.
|
|
365
|
+
"""
|
|
366
|
+
|
|
367
|
+
from crewai_tools import tool
|
|
368
|
+
from typing import Any, Optional
|
|
369
|
+
import os
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
${tools
|
|
373
|
+
.map((t) => `@tool("${t.name || 'unknown_tool'}")
|
|
374
|
+
def ${t.name || 'unknown_tool'}(input_data: str) -> str:
|
|
375
|
+
"""
|
|
376
|
+
${t.description || 'Tool implementation'}
|
|
377
|
+
|
|
378
|
+
Args:
|
|
379
|
+
input_data: Input data for the tool
|
|
380
|
+
|
|
381
|
+
Returns:
|
|
382
|
+
Tool execution result
|
|
383
|
+
"""
|
|
384
|
+
# TODO: Implement ${t.name || 'tool'} logic here
|
|
385
|
+
# Example implementation:
|
|
386
|
+
try:
|
|
387
|
+
result = f"Executed ${t.name || 'tool'} with input: {input_data}"
|
|
388
|
+
return result
|
|
389
|
+
except Exception as e:
|
|
390
|
+
return f"Error executing ${t.name || 'tool'}: {str(e)}"
|
|
391
|
+
`)
|
|
392
|
+
.join('\n\n')}
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
# Add more custom tools as needed
|
|
396
|
+
${tools.length === 0 ? `
|
|
397
|
+
@tool("example_tool")
|
|
398
|
+
def example_tool(query: str) -> str:
|
|
399
|
+
"""
|
|
400
|
+
Example tool implementation
|
|
401
|
+
|
|
402
|
+
Args:
|
|
403
|
+
query: Query string
|
|
404
|
+
|
|
405
|
+
Returns:
|
|
406
|
+
Tool result
|
|
407
|
+
"""
|
|
408
|
+
return f"Processed query: {query}"
|
|
409
|
+
` : ''}
|
|
410
|
+
`;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Generate main.py - Entry point
|
|
414
|
+
*/
|
|
415
|
+
generateMainCode(manifest) {
|
|
416
|
+
const className = this.toPascalCase(manifest.metadata?.name || 'crew');
|
|
417
|
+
const llmProvider = manifest.spec?.llm?.provider || 'openai';
|
|
418
|
+
const primaryApiKey = llmProvider === 'anthropic' ? 'ANTHROPIC_API_KEY' : 'OPENAI_API_KEY';
|
|
419
|
+
return `#!/usr/bin/env python3
|
|
420
|
+
"""
|
|
421
|
+
${manifest.metadata?.name || 'CrewAI Crew'} - Main Entry Point
|
|
422
|
+
Generated from OSSA manifest
|
|
423
|
+
|
|
424
|
+
Run this file to execute the crew.
|
|
425
|
+
"""
|
|
426
|
+
|
|
427
|
+
import os
|
|
428
|
+
import sys
|
|
429
|
+
from dotenv import load_dotenv
|
|
430
|
+
from crew import ${className}
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
def main():
|
|
434
|
+
"""Main execution function"""
|
|
435
|
+
# Load environment variables
|
|
436
|
+
load_dotenv()
|
|
437
|
+
|
|
438
|
+
# Validate required environment variables
|
|
439
|
+
required_vars = ['${primaryApiKey}']
|
|
440
|
+
missing_vars = [var for var in required_vars if not os.getenv(var)]
|
|
441
|
+
|
|
442
|
+
if missing_vars:
|
|
443
|
+
print(f"Error: Missing required environment variables: {', '.join(missing_vars)}")
|
|
444
|
+
print("Please copy .env.example to .env and set the required values")
|
|
445
|
+
sys.exit(1)
|
|
446
|
+
|
|
447
|
+
# Initialize crew
|
|
448
|
+
print("Initializing ${manifest.metadata?.name || 'crew'}...")
|
|
449
|
+
crew = ${className}()
|
|
450
|
+
|
|
451
|
+
# Execute crew
|
|
452
|
+
print("\\nExecuting crew...\\n")
|
|
453
|
+
|
|
454
|
+
inputs = {
|
|
455
|
+
# Add your input parameters here
|
|
456
|
+
# "topic": "AI agents",
|
|
457
|
+
# "context": "research paper",
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
try:
|
|
461
|
+
result = crew.kickoff(inputs=inputs)
|
|
462
|
+
|
|
463
|
+
print("\\n" + "="*80)
|
|
464
|
+
print("CREW EXECUTION RESULT")
|
|
465
|
+
print("="*80)
|
|
466
|
+
print(result)
|
|
467
|
+
print("="*80 + "\\n")
|
|
468
|
+
|
|
469
|
+
except Exception as e:
|
|
470
|
+
print(f"Error executing crew: {str(e)}")
|
|
471
|
+
sys.exit(1)
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
if __name__ == "__main__":
|
|
475
|
+
main()
|
|
237
476
|
`;
|
|
238
477
|
}
|
|
239
478
|
/**
|
|
240
479
|
* Generate requirements.txt
|
|
241
480
|
*/
|
|
242
481
|
generateRequirements() {
|
|
243
|
-
return
|
|
244
|
-
crewai
|
|
482
|
+
return `# CrewAI Framework
|
|
483
|
+
crewai>=0.28.0
|
|
484
|
+
crewai-tools>=0.4.0
|
|
485
|
+
|
|
486
|
+
# LLM Providers
|
|
487
|
+
openai>=1.12.0
|
|
488
|
+
anthropic>=0.18.0
|
|
489
|
+
|
|
490
|
+
# Utilities
|
|
245
491
|
python-dotenv>=1.0.0
|
|
492
|
+
pydantic>=2.6.0
|
|
493
|
+
|
|
494
|
+
# Optional: Enhanced features
|
|
495
|
+
langchain>=0.1.0
|
|
496
|
+
langchain-community>=0.0.20
|
|
497
|
+
`;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Generate .env.example
|
|
501
|
+
*/
|
|
502
|
+
generateEnvExample(manifest) {
|
|
503
|
+
const llmProvider = manifest.spec?.llm?.provider || 'openai';
|
|
504
|
+
const primaryKey = llmProvider === 'anthropic' ? 'ANTHROPIC_API_KEY=sk-ant-...' : 'OPENAI_API_KEY=sk-...';
|
|
505
|
+
const secondaryKey = llmProvider === 'anthropic' ? '# OPENAI_API_KEY=sk-...' : '# ANTHROPIC_API_KEY=sk-ant-...';
|
|
506
|
+
return `# ${manifest.metadata?.name || 'CrewAI Crew'} Environment Configuration
|
|
507
|
+
|
|
508
|
+
# LLM Provider API Keys
|
|
509
|
+
${primaryKey}
|
|
510
|
+
${secondaryKey}
|
|
511
|
+
|
|
512
|
+
# CrewAI Configuration
|
|
513
|
+
CREWAI_VERBOSE=true
|
|
514
|
+
CREWAI_LOG_LEVEL=INFO
|
|
515
|
+
|
|
516
|
+
# Optional: Tool-specific configuration
|
|
517
|
+
# Add your tool-specific env vars here
|
|
518
|
+
|
|
519
|
+
# Optional: Logging and monitoring
|
|
520
|
+
# LANGSMITH_API_KEY=lsv2_pt_...
|
|
521
|
+
# LANGSMITH_PROJECT=${manifest.metadata?.name || 'crew'}
|
|
522
|
+
`;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Generate .dockerignore
|
|
526
|
+
*/
|
|
527
|
+
generateDockerignore() {
|
|
528
|
+
return `# Python
|
|
529
|
+
__pycache__/
|
|
530
|
+
*.py[cod]
|
|
531
|
+
*$py.class
|
|
532
|
+
*.so
|
|
533
|
+
.Python
|
|
534
|
+
env/
|
|
535
|
+
venv/
|
|
536
|
+
ENV/
|
|
537
|
+
.venv/
|
|
538
|
+
|
|
539
|
+
# Environment
|
|
540
|
+
.env
|
|
541
|
+
.env.local
|
|
542
|
+
|
|
543
|
+
# IDE
|
|
544
|
+
.vscode/
|
|
545
|
+
.idea/
|
|
546
|
+
*.swp
|
|
547
|
+
*.swo
|
|
548
|
+
|
|
549
|
+
# Testing
|
|
550
|
+
.pytest_cache/
|
|
551
|
+
.coverage
|
|
552
|
+
htmlcov/
|
|
553
|
+
|
|
554
|
+
# Documentation build
|
|
555
|
+
docs/_build/
|
|
556
|
+
|
|
557
|
+
# OS
|
|
558
|
+
.DS_Store
|
|
559
|
+
Thumbs.db
|
|
560
|
+
|
|
561
|
+
# Git
|
|
562
|
+
.git/
|
|
563
|
+
.gitignore
|
|
246
564
|
`;
|
|
247
565
|
}
|
|
248
566
|
/**
|
|
249
|
-
* Generate
|
|
567
|
+
* Generate .gitignore
|
|
568
|
+
*/
|
|
569
|
+
generateGitignore() {
|
|
570
|
+
return `# Python
|
|
571
|
+
__pycache__/
|
|
572
|
+
*.py[cod]
|
|
573
|
+
*$py.class
|
|
574
|
+
*.so
|
|
575
|
+
.Python
|
|
576
|
+
build/
|
|
577
|
+
develop-eggs/
|
|
578
|
+
dist/
|
|
579
|
+
downloads/
|
|
580
|
+
eggs/
|
|
581
|
+
.eggs/
|
|
582
|
+
lib/
|
|
583
|
+
lib64/
|
|
584
|
+
parts/
|
|
585
|
+
sdist/
|
|
586
|
+
var/
|
|
587
|
+
wheels/
|
|
588
|
+
*.egg-info/
|
|
589
|
+
.installed.cfg
|
|
590
|
+
*.egg
|
|
591
|
+
|
|
592
|
+
# Virtual Environment
|
|
593
|
+
venv/
|
|
594
|
+
ENV/
|
|
595
|
+
env/
|
|
596
|
+
.venv/
|
|
597
|
+
|
|
598
|
+
# Environment Variables
|
|
599
|
+
.env
|
|
600
|
+
.env.local
|
|
601
|
+
.env.*.local
|
|
602
|
+
|
|
603
|
+
# IDE
|
|
604
|
+
.vscode/
|
|
605
|
+
.idea/
|
|
606
|
+
*.swp
|
|
607
|
+
*.swo
|
|
608
|
+
*.sublime-project
|
|
609
|
+
*.sublime-workspace
|
|
610
|
+
|
|
611
|
+
# Testing
|
|
612
|
+
.pytest_cache/
|
|
613
|
+
.coverage
|
|
614
|
+
.coverage.*
|
|
615
|
+
htmlcov/
|
|
616
|
+
.tox/
|
|
617
|
+
|
|
618
|
+
# Jupyter
|
|
619
|
+
.ipynb_checkpoints/
|
|
620
|
+
|
|
621
|
+
# OS
|
|
622
|
+
.DS_Store
|
|
623
|
+
Thumbs.db
|
|
624
|
+
desktop.ini
|
|
625
|
+
|
|
626
|
+
# Logs
|
|
627
|
+
*.log
|
|
628
|
+
logs/
|
|
629
|
+
|
|
630
|
+
# CrewAI specific
|
|
631
|
+
crew_output/
|
|
632
|
+
`;
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Generate examples/basic_usage.py
|
|
636
|
+
*/
|
|
637
|
+
generateExampleUsage(manifest) {
|
|
638
|
+
const className = this.toPascalCase(manifest.metadata?.name || 'crew');
|
|
639
|
+
return `#!/usr/bin/env python3
|
|
640
|
+
"""
|
|
641
|
+
Basic Usage Example for ${manifest.metadata?.name || 'CrewAI Crew'}
|
|
642
|
+
|
|
643
|
+
This example demonstrates how to use the crew in your applications.
|
|
644
|
+
"""
|
|
645
|
+
|
|
646
|
+
import os
|
|
647
|
+
from dotenv import load_dotenv
|
|
648
|
+
from crew import ${className}
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
def basic_example():
|
|
652
|
+
"""Run a basic crew execution"""
|
|
653
|
+
# Load environment
|
|
654
|
+
load_dotenv()
|
|
655
|
+
|
|
656
|
+
# Initialize crew
|
|
657
|
+
crew = ${className}()
|
|
658
|
+
|
|
659
|
+
# Prepare inputs
|
|
660
|
+
inputs = {
|
|
661
|
+
"topic": "artificial intelligence",
|
|
662
|
+
"context": "Write a comprehensive analysis"
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
# Execute crew
|
|
666
|
+
result = crew.kickoff(inputs=inputs)
|
|
667
|
+
|
|
668
|
+
# Process result
|
|
669
|
+
print("Crew Result:")
|
|
670
|
+
print("-" * 80)
|
|
671
|
+
print(result)
|
|
672
|
+
|
|
673
|
+
return result
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
if __name__ == "__main__":
|
|
677
|
+
basic_example()
|
|
678
|
+
`;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Generate examples/async_usage.py
|
|
682
|
+
*/
|
|
683
|
+
generateExampleAsync(manifest) {
|
|
684
|
+
const className = this.toPascalCase(manifest.metadata?.name || 'crew');
|
|
685
|
+
return `#!/usr/bin/env python3
|
|
686
|
+
"""
|
|
687
|
+
Async Usage Example for ${manifest.metadata?.name || 'CrewAI Crew'}
|
|
688
|
+
|
|
689
|
+
This example demonstrates asynchronous crew execution.
|
|
690
|
+
"""
|
|
691
|
+
|
|
692
|
+
import asyncio
|
|
693
|
+
import os
|
|
694
|
+
from dotenv import load_dotenv
|
|
695
|
+
from crew import ${className}
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
async def async_example():
|
|
699
|
+
"""Run crew execution asynchronously"""
|
|
700
|
+
# Load environment
|
|
701
|
+
load_dotenv()
|
|
702
|
+
|
|
703
|
+
# Initialize crew
|
|
704
|
+
crew = ${className}()
|
|
705
|
+
|
|
706
|
+
# Prepare inputs
|
|
707
|
+
inputs = {
|
|
708
|
+
"topic": "machine learning",
|
|
709
|
+
"context": "Generate a detailed report"
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
# Execute crew asynchronously
|
|
713
|
+
print("Starting async crew execution...")
|
|
714
|
+
result = await crew.kickoff_async(inputs=inputs)
|
|
715
|
+
|
|
716
|
+
# Process result
|
|
717
|
+
print("\\nCrew Result:")
|
|
718
|
+
print("-" * 80)
|
|
719
|
+
print(result)
|
|
720
|
+
|
|
721
|
+
return result
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
async def parallel_execution_example():
|
|
725
|
+
"""Run multiple crew executions in parallel"""
|
|
726
|
+
# Load environment
|
|
727
|
+
load_dotenv()
|
|
728
|
+
|
|
729
|
+
# Initialize crew
|
|
730
|
+
crew = ${className}()
|
|
731
|
+
|
|
732
|
+
# Prepare multiple inputs
|
|
733
|
+
inputs_list = [
|
|
734
|
+
{"topic": "AI ethics", "context": "research"},
|
|
735
|
+
{"topic": "neural networks", "context": "technical"},
|
|
736
|
+
{"topic": "robotics", "context": "industry"},
|
|
737
|
+
]
|
|
738
|
+
|
|
739
|
+
# Execute in parallel
|
|
740
|
+
print("Starting parallel executions...")
|
|
741
|
+
tasks = [crew.kickoff_async(inputs=inputs) for inputs in inputs_list]
|
|
742
|
+
results = await asyncio.gather(*tasks)
|
|
743
|
+
|
|
744
|
+
# Process results
|
|
745
|
+
for i, result in enumerate(results, 1):
|
|
746
|
+
print(f"\\nResult {i}:")
|
|
747
|
+
print("-" * 80)
|
|
748
|
+
print(result)
|
|
749
|
+
|
|
750
|
+
return results
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
if __name__ == "__main__":
|
|
754
|
+
# Run async example
|
|
755
|
+
asyncio.run(async_example())
|
|
756
|
+
|
|
757
|
+
# Uncomment to run parallel example
|
|
758
|
+
# asyncio.run(parallel_execution_example())
|
|
759
|
+
`;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Generate tests/test_crew.py
|
|
763
|
+
*/
|
|
764
|
+
generateTestsCode(manifest) {
|
|
765
|
+
const className = this.toPascalCase(manifest.metadata?.name || 'crew');
|
|
766
|
+
return `"""
|
|
767
|
+
Unit Tests for ${manifest.metadata?.name || 'CrewAI Crew'}
|
|
768
|
+
"""
|
|
769
|
+
|
|
770
|
+
import pytest
|
|
771
|
+
from crew import ${className}
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
class Test${className}:
|
|
775
|
+
"""Test suite for ${className}"""
|
|
776
|
+
|
|
777
|
+
@pytest.fixture
|
|
778
|
+
def crew(self):
|
|
779
|
+
"""Fixture to create crew instance"""
|
|
780
|
+
return ${className}()
|
|
781
|
+
|
|
782
|
+
def test_crew_initialization(self, crew):
|
|
783
|
+
"""Test crew initializes correctly"""
|
|
784
|
+
assert crew is not None
|
|
785
|
+
assert crew.agents is not None
|
|
786
|
+
assert crew.tasks is not None
|
|
787
|
+
assert crew.crew is not None
|
|
788
|
+
|
|
789
|
+
def test_crew_has_agents(self, crew):
|
|
790
|
+
"""Test crew has configured agents"""
|
|
791
|
+
assert len(crew.agents) > 0
|
|
792
|
+
|
|
793
|
+
def test_crew_has_tasks(self, crew):
|
|
794
|
+
"""Test crew has configured tasks"""
|
|
795
|
+
assert len(crew.tasks) > 0
|
|
796
|
+
|
|
797
|
+
def test_kickoff_with_empty_inputs(self, crew):
|
|
798
|
+
"""Test crew execution with empty inputs"""
|
|
799
|
+
# This test requires mocking or integration environment
|
|
800
|
+
# Implement based on your testing strategy
|
|
801
|
+
pass
|
|
802
|
+
|
|
803
|
+
def test_kickoff_with_valid_inputs(self, crew):
|
|
804
|
+
"""Test crew execution with valid inputs"""
|
|
805
|
+
# This test requires mocking or integration environment
|
|
806
|
+
# Implement based on your testing strategy
|
|
807
|
+
pass
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
if __name__ == "__main__":
|
|
811
|
+
pytest.main([__file__, "-v"])
|
|
812
|
+
`;
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Generate tests/test_tools.py
|
|
816
|
+
*/
|
|
817
|
+
generateTestToolsCode(manifest) {
|
|
818
|
+
const tools = (manifest.spec?.tools || []);
|
|
819
|
+
return `"""
|
|
820
|
+
Unit Tests for Custom Tools
|
|
821
|
+
"""
|
|
822
|
+
|
|
823
|
+
import pytest
|
|
824
|
+
from tools.custom_tools import *
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
${tools.map((t) => `
|
|
828
|
+
class Test${this.toPascalCase(t.name || 'Tool')}:
|
|
829
|
+
"""Test suite for ${t.name || 'tool'}"""
|
|
830
|
+
|
|
831
|
+
def test_${t.name || 'tool'}_executes(self):
|
|
832
|
+
"""Test ${t.name || 'tool'} executes without error"""
|
|
833
|
+
result = ${t.name || 'tool'}("test input")
|
|
834
|
+
assert result is not None
|
|
835
|
+
assert isinstance(result, str)
|
|
836
|
+
|
|
837
|
+
def test_${t.name || 'tool'}_handles_empty_input(self):
|
|
838
|
+
"""Test ${t.name || 'tool'} handles empty input"""
|
|
839
|
+
result = ${t.name || 'tool'}("")
|
|
840
|
+
assert result is not None
|
|
841
|
+
`).join('\n')}
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
if __name__ == "__main__":
|
|
845
|
+
pytest.main([__file__, "-v"])
|
|
846
|
+
`;
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* Convert string to PascalCase
|
|
850
|
+
*/
|
|
851
|
+
toPascalCase(str) {
|
|
852
|
+
return str
|
|
853
|
+
.replace(/[^a-zA-Z0-9]+(.)/g, (_, char) => char.toUpperCase())
|
|
854
|
+
.replace(/^(.)/, (char) => char.toUpperCase());
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* Generate README.md - Production-grade documentation
|
|
250
858
|
*/
|
|
251
859
|
generateReadme(manifest, config) {
|
|
252
|
-
|
|
860
|
+
const projectName = manifest.metadata?.name || 'crewai-crew';
|
|
861
|
+
const description = manifest.metadata?.description || 'CrewAI multi-agent crew';
|
|
862
|
+
return `# ${projectName}
|
|
863
|
+
|
|
864
|
+
${description}
|
|
865
|
+
|
|
866
|
+
> **Generated from OSSA v${manifest.apiVersion?.split('/')[1] || getApiVersion()} manifest**
|
|
867
|
+
|
|
868
|
+
## Table of Contents
|
|
253
869
|
|
|
254
|
-
|
|
870
|
+
- [Overview](#overview)
|
|
871
|
+
- [Features](#features)
|
|
872
|
+
- [Installation](#installation)
|
|
873
|
+
- [Quick Start](#quick-start)
|
|
874
|
+
- [Configuration](#configuration)
|
|
875
|
+
- [Usage](#usage)
|
|
876
|
+
- [Project Structure](#project-structure)
|
|
877
|
+
- [Agents](#agents)
|
|
878
|
+
- [Tasks](#tasks)
|
|
879
|
+
- [Tools](#tools)
|
|
880
|
+
- [Development](#development)
|
|
881
|
+
- [Testing](#testing)
|
|
882
|
+
- [Deployment](#deployment)
|
|
883
|
+
- [Troubleshooting](#troubleshooting)
|
|
884
|
+
- [Contributing](#contributing)
|
|
885
|
+
- [License](#license)
|
|
886
|
+
|
|
887
|
+
## Overview
|
|
888
|
+
|
|
889
|
+
${manifest.spec?.role || 'This is a multi-agent crew built with CrewAI, designed to collaborate on complex tasks through structured agent orchestration.'}
|
|
890
|
+
|
|
891
|
+
### Key Specifications
|
|
892
|
+
|
|
893
|
+
- **Process Type**: ${config.process || 'sequential'}
|
|
894
|
+
- **Number of Agents**: ${config.agents.length}
|
|
895
|
+
- **Number of Tasks**: ${config.tasks.length}
|
|
896
|
+
- **LLM Provider**: ${manifest.spec?.llm?.provider || 'openai'}
|
|
897
|
+
- **Model**: ${manifest.spec?.llm?.model || 'gpt-4'}
|
|
898
|
+
|
|
899
|
+
## Features
|
|
900
|
+
|
|
901
|
+
- ✅ Multi-agent collaboration with CrewAI
|
|
902
|
+
- ✅ ${config.process === 'sequential' ? 'Sequential task processing' : 'Hierarchical agent organization'}
|
|
903
|
+
- ✅ Custom tool implementations
|
|
904
|
+
- ✅ Async execution support
|
|
905
|
+
- ✅ Environment-based configuration
|
|
906
|
+
- ✅ Production-ready structure
|
|
907
|
+
- ✅ Comprehensive testing
|
|
908
|
+
- ✅ Docker deployment ready
|
|
909
|
+
|
|
910
|
+
## Installation
|
|
911
|
+
|
|
912
|
+
### Prerequisites
|
|
913
|
+
|
|
914
|
+
- Python 3.9 or higher
|
|
915
|
+
- pip or poetry for package management
|
|
916
|
+
- OpenAI API key (or other LLM provider credentials)
|
|
917
|
+
|
|
918
|
+
### Setup
|
|
919
|
+
|
|
920
|
+
1. **Clone the repository**
|
|
921
|
+
|
|
922
|
+
\`\`\`bash
|
|
923
|
+
git clone <repository-url>
|
|
924
|
+
cd ${projectName}
|
|
925
|
+
\`\`\`
|
|
255
926
|
|
|
256
|
-
|
|
927
|
+
2. **Create virtual environment**
|
|
257
928
|
|
|
258
|
-
|
|
929
|
+
\`\`\`bash
|
|
930
|
+
python -m venv venv
|
|
931
|
+
source venv/bin/activate # On Windows: venv\\Scripts\\activate
|
|
932
|
+
\`\`\`
|
|
259
933
|
|
|
260
|
-
|
|
934
|
+
3. **Install dependencies**
|
|
261
935
|
|
|
262
936
|
\`\`\`bash
|
|
263
937
|
pip install -r requirements.txt
|
|
264
|
-
|
|
938
|
+
\`\`\`
|
|
939
|
+
|
|
940
|
+
4. **Configure environment**
|
|
941
|
+
|
|
942
|
+
\`\`\`bash
|
|
943
|
+
cp .env.example .env
|
|
944
|
+
# Edit .env with your API keys and configuration
|
|
945
|
+
\`\`\`
|
|
946
|
+
|
|
947
|
+
## Quick Start
|
|
948
|
+
|
|
949
|
+
### Basic Execution
|
|
950
|
+
|
|
951
|
+
\`\`\`bash
|
|
952
|
+
python main.py
|
|
953
|
+
\`\`\`
|
|
954
|
+
|
|
955
|
+
### Programmatic Usage
|
|
956
|
+
|
|
957
|
+
\`\`\`python
|
|
958
|
+
from crew import ${this.toPascalCase(projectName)}
|
|
959
|
+
|
|
960
|
+
# Initialize crew
|
|
961
|
+
crew = ${this.toPascalCase(projectName)}()
|
|
962
|
+
|
|
963
|
+
# Execute with inputs
|
|
964
|
+
result = crew.kickoff(inputs={
|
|
965
|
+
"topic": "your topic here",
|
|
966
|
+
"context": "additional context"
|
|
967
|
+
})
|
|
968
|
+
|
|
969
|
+
print(result)
|
|
970
|
+
\`\`\`
|
|
971
|
+
|
|
972
|
+
### Async Execution
|
|
973
|
+
|
|
974
|
+
\`\`\`python
|
|
975
|
+
import asyncio
|
|
976
|
+
from crew import ${this.toPascalCase(projectName)}
|
|
977
|
+
|
|
978
|
+
async def run():
|
|
979
|
+
crew = ${this.toPascalCase(projectName)}()
|
|
980
|
+
result = await crew.kickoff_async(inputs={
|
|
981
|
+
"topic": "your topic"
|
|
982
|
+
})
|
|
983
|
+
return result
|
|
984
|
+
|
|
985
|
+
asyncio.run(run())
|
|
265
986
|
\`\`\`
|
|
266
987
|
|
|
267
988
|
## Configuration
|
|
268
989
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
990
|
+
### Environment Variables
|
|
991
|
+
|
|
992
|
+
See \`.env.example\` for all configuration options:
|
|
993
|
+
|
|
994
|
+
- \`OPENAI_API_KEY\`: Your OpenAI API key (required)
|
|
995
|
+
- \`CREWAI_VERBOSE\`: Enable verbose logging (default: true)
|
|
996
|
+
- \`CREWAI_LOG_LEVEL\`: Logging level (default: INFO)
|
|
997
|
+
|
|
998
|
+
### Crew Configuration
|
|
999
|
+
|
|
1000
|
+
Modify \`crew/crew.py\` to adjust:
|
|
1001
|
+
|
|
1002
|
+
- Process type (sequential/hierarchical)
|
|
1003
|
+
- Verbose mode
|
|
1004
|
+
- Custom agent configurations
|
|
1005
|
+
|
|
1006
|
+
## Usage
|
|
1007
|
+
|
|
1008
|
+
### Examples
|
|
1009
|
+
|
|
1010
|
+
See the \`examples/\` directory for detailed usage examples:
|
|
1011
|
+
|
|
1012
|
+
- \`basic_usage.py\`: Simple crew execution
|
|
1013
|
+
- \`async_usage.py\`: Asynchronous and parallel execution
|
|
1014
|
+
|
|
1015
|
+
### Running Examples
|
|
1016
|
+
|
|
1017
|
+
\`\`\`bash
|
|
1018
|
+
python examples/basic_usage.py
|
|
1019
|
+
python examples/async_usage.py
|
|
1020
|
+
\`\`\`
|
|
1021
|
+
|
|
1022
|
+
## Project Structure
|
|
1023
|
+
|
|
1024
|
+
\`\`\`
|
|
1025
|
+
${projectName}/
|
|
1026
|
+
├── agents/ # Agent definitions
|
|
1027
|
+
│ └── __init__.py # Agent configurations
|
|
1028
|
+
├── tasks/ # Task definitions
|
|
1029
|
+
│ └── __init__.py # Task configurations
|
|
1030
|
+
├── tools/ # Custom tools
|
|
1031
|
+
│ ├── __init__.py # Tool exports
|
|
1032
|
+
│ └── custom_tools.py # Tool implementations
|
|
1033
|
+
├── crew/ # Crew orchestration
|
|
1034
|
+
│ ├── __init__.py # Module exports
|
|
1035
|
+
│ └── crew.py # Main crew class
|
|
1036
|
+
├── examples/ # Usage examples
|
|
1037
|
+
│ ├── basic_usage.py
|
|
1038
|
+
│ └── async_usage.py
|
|
1039
|
+
├── tests/ # Test suite
|
|
1040
|
+
│ ├── test_crew.py
|
|
1041
|
+
│ └── test_tools.py
|
|
1042
|
+
├── main.py # Entry point
|
|
1043
|
+
├── requirements.txt # Python dependencies
|
|
1044
|
+
├── .env.example # Environment template
|
|
1045
|
+
├── .gitignore # Git ignore rules
|
|
1046
|
+
├── README.md # This file
|
|
1047
|
+
└── DEPLOYMENT.md # Deployment guide
|
|
1048
|
+
\`\`\`
|
|
272
1049
|
|
|
273
1050
|
## Agents
|
|
274
1051
|
|
|
275
|
-
|
|
1052
|
+
This crew consists of ${config.agents.length} specialized agent(s):
|
|
1053
|
+
|
|
1054
|
+
${config.agents.map((a, i) => `
|
|
1055
|
+
### ${i + 1}. ${a.role}
|
|
1056
|
+
|
|
1057
|
+
**Goal:** ${a.goal}
|
|
1058
|
+
|
|
1059
|
+
**Backstory:** ${a.backstory}
|
|
1060
|
+
|
|
1061
|
+
**Capabilities:**
|
|
1062
|
+
- Utilizes custom tools for enhanced functionality
|
|
1063
|
+
- Collaborates with other agents in the crew
|
|
1064
|
+
- Produces structured outputs for downstream tasks
|
|
1065
|
+
`).join('\n')}
|
|
276
1066
|
|
|
277
1067
|
## Tasks
|
|
278
1068
|
|
|
279
|
-
${config.tasks.
|
|
1069
|
+
The crew executes ${config.tasks.length} task(s) in ${config.process} order:
|
|
1070
|
+
|
|
1071
|
+
${config.tasks.map((t, i) => `
|
|
1072
|
+
### Task ${i + 1}: ${t.description}
|
|
1073
|
+
|
|
1074
|
+
- **Assigned Agent:** ${t.agent}
|
|
1075
|
+
- **Expected Output:** ${t.expected_output || 'Completed task result'}
|
|
1076
|
+
${i < config.tasks.length - 1 ? '- **Flows to:** Task ' + (i + 2) : '- **Final Output:** Yes'}
|
|
1077
|
+
`).join('\n')}
|
|
1078
|
+
|
|
1079
|
+
## Tools
|
|
1080
|
+
|
|
1081
|
+
Custom tools are implemented in \`tools/custom_tools.py\`:
|
|
1082
|
+
|
|
1083
|
+
${(manifest.spec?.tools || []).length > 0 ? (manifest.spec?.tools).map((t) => `
|
|
1084
|
+
### ${t.name || 'Tool'}
|
|
1085
|
+
|
|
1086
|
+
${t.description || 'Custom tool implementation'}
|
|
1087
|
+
|
|
1088
|
+
\`\`\`python
|
|
1089
|
+
from tools.custom_tools import ${t.name || 'tool'}
|
|
1090
|
+
|
|
1091
|
+
result = ${t.name || 'tool'}("input data")
|
|
1092
|
+
\`\`\`
|
|
1093
|
+
`).join('\n') : `
|
|
1094
|
+
No custom tools defined. Add tools in \`tools/custom_tools.py\`.
|
|
1095
|
+
`}
|
|
1096
|
+
|
|
1097
|
+
## Development
|
|
1098
|
+
|
|
1099
|
+
### Adding New Agents
|
|
1100
|
+
|
|
1101
|
+
Edit \`agents/__init__.py\`:
|
|
1102
|
+
|
|
1103
|
+
\`\`\`python
|
|
1104
|
+
from crewai import Agent
|
|
1105
|
+
|
|
1106
|
+
new_agent = Agent(
|
|
1107
|
+
role="New Role",
|
|
1108
|
+
goal="Agent goal",
|
|
1109
|
+
backstory="Agent backstory",
|
|
1110
|
+
tools=get_tools(),
|
|
1111
|
+
verbose=True
|
|
1112
|
+
)
|
|
1113
|
+
|
|
1114
|
+
agents.append(new_agent)
|
|
1115
|
+
\`\`\`
|
|
1116
|
+
|
|
1117
|
+
### Adding New Tasks
|
|
1118
|
+
|
|
1119
|
+
Edit \`tasks/__init__.py\`:
|
|
1120
|
+
|
|
1121
|
+
\`\`\`python
|
|
1122
|
+
from crewai import Task
|
|
1123
|
+
|
|
1124
|
+
new_task = Task(
|
|
1125
|
+
description="Task description",
|
|
1126
|
+
agent=agents[0],
|
|
1127
|
+
expected_output="Expected result"
|
|
1128
|
+
)
|
|
1129
|
+
|
|
1130
|
+
tasks.append(new_task)
|
|
1131
|
+
\`\`\`
|
|
1132
|
+
|
|
1133
|
+
### Adding Custom Tools
|
|
1134
|
+
|
|
1135
|
+
Edit \`tools/custom_tools.py\`:
|
|
1136
|
+
|
|
1137
|
+
\`\`\`python
|
|
1138
|
+
from crewai_tools import tool
|
|
1139
|
+
|
|
1140
|
+
@tool("my_custom_tool")
|
|
1141
|
+
def my_custom_tool(input: str) -> str:
|
|
1142
|
+
"""Tool description"""
|
|
1143
|
+
# Implementation
|
|
1144
|
+
return result
|
|
1145
|
+
\`\`\`
|
|
1146
|
+
|
|
1147
|
+
## Testing
|
|
1148
|
+
|
|
1149
|
+
Run the test suite:
|
|
1150
|
+
|
|
1151
|
+
\`\`\`bash
|
|
1152
|
+
# Install test dependencies
|
|
1153
|
+
pip install pytest pytest-cov pytest-asyncio
|
|
1154
|
+
|
|
1155
|
+
# Run all tests
|
|
1156
|
+
pytest
|
|
1157
|
+
|
|
1158
|
+
# Run with coverage
|
|
1159
|
+
pytest --cov=. --cov-report=html
|
|
1160
|
+
|
|
1161
|
+
# Run specific test file
|
|
1162
|
+
pytest tests/test_crew.py -v
|
|
1163
|
+
\`\`\`
|
|
1164
|
+
|
|
1165
|
+
## Deployment
|
|
1166
|
+
|
|
1167
|
+
See [DEPLOYMENT.md](./DEPLOYMENT.md) for detailed deployment instructions covering:
|
|
1168
|
+
|
|
1169
|
+
- Docker deployment
|
|
1170
|
+
- Kubernetes deployment
|
|
1171
|
+
- Cloud platforms (AWS, GCP, Azure)
|
|
1172
|
+
- Environment configuration
|
|
1173
|
+
- Monitoring and logging
|
|
1174
|
+
- Production best practices
|
|
1175
|
+
|
|
1176
|
+
### Quick Docker Deployment
|
|
1177
|
+
|
|
1178
|
+
\`\`\`bash
|
|
1179
|
+
# Build image
|
|
1180
|
+
docker build -t ${projectName}:latest .
|
|
1181
|
+
|
|
1182
|
+
# Run container
|
|
1183
|
+
docker run -e OPENAI_API_KEY=your-key ${projectName}:latest
|
|
1184
|
+
\`\`\`
|
|
1185
|
+
|
|
1186
|
+
## Troubleshooting
|
|
280
1187
|
|
|
281
|
-
|
|
1188
|
+
### Common Issues
|
|
1189
|
+
|
|
1190
|
+
**Import Errors**
|
|
1191
|
+
|
|
1192
|
+
\`\`\`bash
|
|
1193
|
+
pip install -r requirements.txt --force-reinstall
|
|
1194
|
+
\`\`\`
|
|
282
1195
|
|
|
283
|
-
|
|
1196
|
+
**API Key Errors**
|
|
284
1197
|
|
|
285
|
-
|
|
1198
|
+
Ensure your \`.env\` file has valid API keys:
|
|
1199
|
+
|
|
1200
|
+
\`\`\`bash
|
|
1201
|
+
# Verify .env file exists
|
|
1202
|
+
ls -la .env
|
|
1203
|
+
|
|
1204
|
+
# Check API key is set
|
|
1205
|
+
source .env && echo $OPENAI_API_KEY
|
|
1206
|
+
\`\`\`
|
|
1207
|
+
|
|
1208
|
+
**Agent Execution Failures**
|
|
1209
|
+
|
|
1210
|
+
Enable verbose logging:
|
|
1211
|
+
|
|
1212
|
+
\`\`\`python
|
|
1213
|
+
crew = ${this.toPascalCase(projectName)}()
|
|
1214
|
+
crew.crew.verbose = True
|
|
1215
|
+
\`\`\`
|
|
1216
|
+
|
|
1217
|
+
### Debug Mode
|
|
1218
|
+
|
|
1219
|
+
Run with debug logging:
|
|
1220
|
+
|
|
1221
|
+
\`\`\`bash
|
|
1222
|
+
CREWAI_LOG_LEVEL=DEBUG python main.py
|
|
1223
|
+
\`\`\`
|
|
1224
|
+
|
|
1225
|
+
## Contributing
|
|
1226
|
+
|
|
1227
|
+
Contributions are welcome! Please:
|
|
1228
|
+
|
|
1229
|
+
1. Fork the repository
|
|
1230
|
+
2. Create a feature branch
|
|
1231
|
+
3. Make your changes
|
|
1232
|
+
4. Add tests
|
|
1233
|
+
5. Submit a pull request
|
|
286
1234
|
|
|
287
1235
|
## License
|
|
288
1236
|
|
|
289
1237
|
${manifest.metadata?.license || 'MIT'}
|
|
1238
|
+
|
|
1239
|
+
---
|
|
1240
|
+
|
|
1241
|
+
**Generated by OSSA v${manifest.apiVersion?.split('/')[1] || getApiVersion()}**
|
|
1242
|
+
|
|
1243
|
+
For more information about OSSA, visit: https://openstandardagents.org
|
|
1244
|
+
`;
|
|
1245
|
+
}
|
|
1246
|
+
/**
|
|
1247
|
+
* Generate DEPLOYMENT.md - Production deployment guide
|
|
1248
|
+
*/
|
|
1249
|
+
generateDeploymentGuide(manifest) {
|
|
1250
|
+
const projectName = manifest.metadata?.name || 'crewai-crew';
|
|
1251
|
+
return `# Deployment Guide - ${projectName}
|
|
1252
|
+
|
|
1253
|
+
This guide covers production deployment options for your CrewAI crew.
|
|
1254
|
+
|
|
1255
|
+
## Table of Contents
|
|
1256
|
+
|
|
1257
|
+
- [Prerequisites](#prerequisites)
|
|
1258
|
+
- [Docker Deployment](#docker-deployment)
|
|
1259
|
+
- [Kubernetes Deployment](#kubernetes-deployment)
|
|
1260
|
+
- [Cloud Platforms](#cloud-platforms)
|
|
1261
|
+
- [Environment Configuration](#environment-configuration)
|
|
1262
|
+
- [Monitoring & Logging](#monitoring--logging)
|
|
1263
|
+
- [Security Best Practices](#security-best-practices)
|
|
1264
|
+
- [Scaling](#scaling)
|
|
1265
|
+
- [Troubleshooting](#troubleshooting)
|
|
1266
|
+
|
|
1267
|
+
## Prerequisites
|
|
1268
|
+
|
|
1269
|
+
- Docker (20.10+) and Docker Compose (2.0+)
|
|
1270
|
+
- kubectl (for Kubernetes deployments)
|
|
1271
|
+
- Cloud CLI tools (AWS CLI, gcloud, or az)
|
|
1272
|
+
- Valid LLM provider API keys
|
|
1273
|
+
|
|
1274
|
+
## Docker Deployment
|
|
1275
|
+
|
|
1276
|
+
### Dockerfile
|
|
1277
|
+
|
|
1278
|
+
Create a \`Dockerfile\` in the project root:
|
|
1279
|
+
|
|
1280
|
+
\`\`\`dockerfile
|
|
1281
|
+
FROM python:3.11-slim
|
|
1282
|
+
|
|
1283
|
+
WORKDIR /app
|
|
1284
|
+
|
|
1285
|
+
# Install dependencies
|
|
1286
|
+
COPY requirements.txt .
|
|
1287
|
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
1288
|
+
|
|
1289
|
+
# Copy application
|
|
1290
|
+
COPY . .
|
|
1291
|
+
|
|
1292
|
+
# Run as non-root user
|
|
1293
|
+
RUN useradd -m -u 1000 crewai && chown -R crewai:crewai /app
|
|
1294
|
+
USER crewai
|
|
1295
|
+
|
|
1296
|
+
# Set environment
|
|
1297
|
+
ENV PYTHONUNBUFFERED=1
|
|
1298
|
+
|
|
1299
|
+
# Run application
|
|
1300
|
+
CMD ["python", "main.py"]
|
|
1301
|
+
\`\`\`
|
|
1302
|
+
|
|
1303
|
+
### Build and Run
|
|
1304
|
+
|
|
1305
|
+
\`\`\`bash
|
|
1306
|
+
# Build image
|
|
1307
|
+
docker build -t ${projectName}:latest .
|
|
1308
|
+
|
|
1309
|
+
# Run container
|
|
1310
|
+
docker run -d \\
|
|
1311
|
+
--name ${projectName} \\
|
|
1312
|
+
-e OPENAI_API_KEY=\${OPENAI_API_KEY} \\
|
|
1313
|
+
-e CREWAI_VERBOSE=true \\
|
|
1314
|
+
--restart unless-stopped \\
|
|
1315
|
+
${projectName}:latest
|
|
1316
|
+
|
|
1317
|
+
# View logs
|
|
1318
|
+
docker logs -f ${projectName}
|
|
1319
|
+
\`\`\`
|
|
1320
|
+
|
|
1321
|
+
### Docker Compose
|
|
1322
|
+
|
|
1323
|
+
Create \`docker-compose.yml\`:
|
|
1324
|
+
|
|
1325
|
+
\`\`\`yaml
|
|
1326
|
+
version: '3.8'
|
|
1327
|
+
|
|
1328
|
+
services:
|
|
1329
|
+
crew:
|
|
1330
|
+
build: .
|
|
1331
|
+
image: ${projectName}:latest
|
|
1332
|
+
container_name: ${projectName}
|
|
1333
|
+
env_file:
|
|
1334
|
+
- .env
|
|
1335
|
+
restart: unless-stopped
|
|
1336
|
+
volumes:
|
|
1337
|
+
- ./logs:/app/logs
|
|
1338
|
+
networks:
|
|
1339
|
+
- crew-network
|
|
1340
|
+
|
|
1341
|
+
networks:
|
|
1342
|
+
crew-network:
|
|
1343
|
+
driver: bridge
|
|
1344
|
+
\`\`\`
|
|
1345
|
+
|
|
1346
|
+
Run with Docker Compose:
|
|
1347
|
+
|
|
1348
|
+
\`\`\`bash
|
|
1349
|
+
docker-compose up -d
|
|
1350
|
+
docker-compose logs -f
|
|
1351
|
+
\`\`\`
|
|
1352
|
+
|
|
1353
|
+
## Kubernetes Deployment
|
|
1354
|
+
|
|
1355
|
+
### Deployment Manifest
|
|
1356
|
+
|
|
1357
|
+
Create \`k8s/deployment.yaml\`:
|
|
1358
|
+
|
|
1359
|
+
\`\`\`yaml
|
|
1360
|
+
apiVersion: apps/v1
|
|
1361
|
+
kind: Deployment
|
|
1362
|
+
metadata:
|
|
1363
|
+
name: ${projectName}
|
|
1364
|
+
labels:
|
|
1365
|
+
app: ${projectName}
|
|
1366
|
+
spec:
|
|
1367
|
+
replicas: 3
|
|
1368
|
+
selector:
|
|
1369
|
+
matchLabels:
|
|
1370
|
+
app: ${projectName}
|
|
1371
|
+
template:
|
|
1372
|
+
metadata:
|
|
1373
|
+
labels:
|
|
1374
|
+
app: ${projectName}
|
|
1375
|
+
spec:
|
|
1376
|
+
containers:
|
|
1377
|
+
- name: crew
|
|
1378
|
+
image: ${projectName}:latest
|
|
1379
|
+
ports:
|
|
1380
|
+
- containerPort: 8080
|
|
1381
|
+
env:
|
|
1382
|
+
- name: OPENAI_API_KEY
|
|
1383
|
+
valueFrom:
|
|
1384
|
+
secretKeyRef:
|
|
1385
|
+
name: llm-credentials
|
|
1386
|
+
key: openai-api-key
|
|
1387
|
+
- name: CREWAI_VERBOSE
|
|
1388
|
+
value: "true"
|
|
1389
|
+
resources:
|
|
1390
|
+
requests:
|
|
1391
|
+
memory: "512Mi"
|
|
1392
|
+
cpu: "500m"
|
|
1393
|
+
limits:
|
|
1394
|
+
memory: "1Gi"
|
|
1395
|
+
cpu: "1000m"
|
|
1396
|
+
livenessProbe:
|
|
1397
|
+
exec:
|
|
1398
|
+
command:
|
|
1399
|
+
- python
|
|
1400
|
+
- -c
|
|
1401
|
+
- "import sys; sys.exit(0)"
|
|
1402
|
+
initialDelaySeconds: 30
|
|
1403
|
+
periodSeconds: 10
|
|
1404
|
+
readinessProbe:
|
|
1405
|
+
exec:
|
|
1406
|
+
command:
|
|
1407
|
+
- python
|
|
1408
|
+
- -c
|
|
1409
|
+
- "import sys; sys.exit(0)"
|
|
1410
|
+
initialDelaySeconds: 5
|
|
1411
|
+
periodSeconds: 5
|
|
1412
|
+
\`\`\`
|
|
1413
|
+
|
|
1414
|
+
### Secret Management
|
|
1415
|
+
|
|
1416
|
+
\`\`\`bash
|
|
1417
|
+
# Create secret for API keys
|
|
1418
|
+
kubectl create secret generic llm-credentials \\
|
|
1419
|
+
--from-literal=openai-api-key=\${OPENAI_API_KEY}
|
|
1420
|
+
|
|
1421
|
+
# Deploy
|
|
1422
|
+
kubectl apply -f k8s/deployment.yaml
|
|
1423
|
+
kubectl apply -f k8s/service.yaml
|
|
1424
|
+
|
|
1425
|
+
# Check status
|
|
1426
|
+
kubectl get pods -l app=${projectName}
|
|
1427
|
+
kubectl logs -f deployment/${projectName}
|
|
1428
|
+
\`\`\`
|
|
1429
|
+
|
|
1430
|
+
## Cloud Platforms
|
|
1431
|
+
|
|
1432
|
+
### AWS ECS
|
|
1433
|
+
|
|
1434
|
+
\`\`\`bash
|
|
1435
|
+
# Build and push to ECR
|
|
1436
|
+
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <account>.dkr.ecr.us-east-1.amazonaws.com
|
|
1437
|
+
docker tag ${projectName}:latest <account>.dkr.ecr.us-east-1.amazonaws.com/${projectName}:latest
|
|
1438
|
+
docker push <account>.dkr.ecr.us-east-1.amazonaws.com/${projectName}:latest
|
|
1439
|
+
|
|
1440
|
+
# Create ECS task definition and service
|
|
1441
|
+
aws ecs create-service \\
|
|
1442
|
+
--cluster production \\
|
|
1443
|
+
--service-name ${projectName} \\
|
|
1444
|
+
--task-definition ${projectName}:1 \\
|
|
1445
|
+
--desired-count 3
|
|
1446
|
+
\`\`\`
|
|
1447
|
+
|
|
1448
|
+
### Google Cloud Run
|
|
1449
|
+
|
|
1450
|
+
\`\`\`bash
|
|
1451
|
+
# Build and deploy
|
|
1452
|
+
gcloud builds submit --tag gcr.io/\${PROJECT_ID}/${projectName}
|
|
1453
|
+
gcloud run deploy ${projectName} \\
|
|
1454
|
+
--image gcr.io/\${PROJECT_ID}/${projectName} \\
|
|
1455
|
+
--platform managed \\
|
|
1456
|
+
--region us-central1 \\
|
|
1457
|
+
--set-env-vars OPENAI_API_KEY=\${OPENAI_API_KEY}
|
|
1458
|
+
\`\`\`
|
|
1459
|
+
|
|
1460
|
+
### Azure Container Instances
|
|
1461
|
+
|
|
1462
|
+
\`\`\`bash
|
|
1463
|
+
# Build and push to ACR
|
|
1464
|
+
az acr build --registry <registry-name> --image ${projectName}:latest .
|
|
1465
|
+
|
|
1466
|
+
# Deploy to ACI
|
|
1467
|
+
az container create \\
|
|
1468
|
+
--resource-group <resource-group> \\
|
|
1469
|
+
--name ${projectName} \\
|
|
1470
|
+
--image <registry-name>.azurecr.io/${projectName}:latest \\
|
|
1471
|
+
--environment-variables OPENAI_API_KEY=\${OPENAI_API_KEY}
|
|
1472
|
+
\`\`\`
|
|
1473
|
+
|
|
1474
|
+
## Environment Configuration
|
|
1475
|
+
|
|
1476
|
+
### Production Environment Variables
|
|
1477
|
+
|
|
1478
|
+
\`\`\`bash
|
|
1479
|
+
# Required
|
|
1480
|
+
OPENAI_API_KEY=sk-...
|
|
1481
|
+
|
|
1482
|
+
# Optional
|
|
1483
|
+
CREWAI_VERBOSE=false
|
|
1484
|
+
CREWAI_LOG_LEVEL=WARNING
|
|
1485
|
+
CREWAI_MAX_RETRIES=3
|
|
1486
|
+
CREWAI_TIMEOUT=300
|
|
1487
|
+
|
|
1488
|
+
# Monitoring
|
|
1489
|
+
LANGSMITH_API_KEY=lsv2_pt_...
|
|
1490
|
+
LANGSMITH_PROJECT=${projectName}-production
|
|
1491
|
+
|
|
1492
|
+
# Performance
|
|
1493
|
+
CREWAI_CACHE_ENABLED=true
|
|
1494
|
+
CREWAI_PARALLEL_EXECUTION=true
|
|
1495
|
+
\`\`\`
|
|
1496
|
+
|
|
1497
|
+
### Secrets Management
|
|
1498
|
+
|
|
1499
|
+
**AWS Secrets Manager**
|
|
1500
|
+
|
|
1501
|
+
\`\`\`python
|
|
1502
|
+
import boto3
|
|
1503
|
+
import json
|
|
1504
|
+
|
|
1505
|
+
def get_secret(secret_name):
|
|
1506
|
+
client = boto3.client('secretsmanager')
|
|
1507
|
+
response = client.get_secret_value(SecretId=secret_name)
|
|
1508
|
+
return json.loads(response['SecretString'])
|
|
1509
|
+
\`\`\`
|
|
1510
|
+
|
|
1511
|
+
**Kubernetes Secrets**
|
|
1512
|
+
|
|
1513
|
+
\`\`\`bash
|
|
1514
|
+
kubectl create secret generic ${projectName}-secrets \\
|
|
1515
|
+
--from-literal=openai-api-key=\${OPENAI_API_KEY} \\
|
|
1516
|
+
--from-literal=anthropic-api-key=\${ANTHROPIC_API_KEY}
|
|
1517
|
+
\`\`\`
|
|
1518
|
+
|
|
1519
|
+
## Monitoring & Logging
|
|
1520
|
+
|
|
1521
|
+
### Application Logging
|
|
1522
|
+
|
|
1523
|
+
Configure structured logging in \`main.py\`:
|
|
1524
|
+
|
|
1525
|
+
\`\`\`python
|
|
1526
|
+
import logging
|
|
1527
|
+
import json
|
|
1528
|
+
|
|
1529
|
+
logging.basicConfig(
|
|
1530
|
+
level=logging.INFO,
|
|
1531
|
+
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
|
1532
|
+
handlers=[
|
|
1533
|
+
logging.FileHandler('logs/crew.log'),
|
|
1534
|
+
logging.StreamHandler()
|
|
1535
|
+
]
|
|
1536
|
+
)
|
|
1537
|
+
\`\`\`
|
|
1538
|
+
|
|
1539
|
+
### LangSmith Integration
|
|
1540
|
+
|
|
1541
|
+
\`\`\`python
|
|
1542
|
+
import os
|
|
1543
|
+
os.environ["LANGCHAIN_TRACING_V2"] = "true"
|
|
1544
|
+
os.environ["LANGCHAIN_PROJECT"] = "${projectName}"
|
|
1545
|
+
os.environ["LANGCHAIN_API_KEY"] = "your-langsmith-key"
|
|
1546
|
+
\`\`\`
|
|
1547
|
+
|
|
1548
|
+
### Prometheus Metrics
|
|
1549
|
+
|
|
1550
|
+
Expose metrics for Prometheus scraping:
|
|
1551
|
+
|
|
1552
|
+
\`\`\`python
|
|
1553
|
+
from prometheus_client import Counter, Histogram, start_http_server
|
|
1554
|
+
|
|
1555
|
+
crew_executions = Counter('crew_executions_total', 'Total crew executions')
|
|
1556
|
+
crew_duration = Histogram('crew_duration_seconds', 'Crew execution duration')
|
|
1557
|
+
|
|
1558
|
+
# Start metrics server
|
|
1559
|
+
start_http_server(8000)
|
|
1560
|
+
\`\`\`
|
|
1561
|
+
|
|
1562
|
+
## Security Best Practices
|
|
1563
|
+
|
|
1564
|
+
1. **Never commit secrets to version control**
|
|
1565
|
+
- Use \`.env\` files (gitignored)
|
|
1566
|
+
- Use secret managers in production
|
|
1567
|
+
|
|
1568
|
+
2. **Use environment-specific configurations**
|
|
1569
|
+
- Separate dev/staging/prod configs
|
|
1570
|
+
- Validate all environment variables on startup
|
|
1571
|
+
|
|
1572
|
+
3. **Implement rate limiting**
|
|
1573
|
+
- Prevent API abuse
|
|
1574
|
+
- Use exponential backoff for retries
|
|
1575
|
+
|
|
1576
|
+
4. **Enable audit logging**
|
|
1577
|
+
- Log all crew executions
|
|
1578
|
+
- Track API usage and costs
|
|
1579
|
+
|
|
1580
|
+
5. **Regular security updates**
|
|
1581
|
+
- Keep dependencies updated
|
|
1582
|
+
- Monitor for vulnerabilities
|
|
1583
|
+
|
|
1584
|
+
6. **Network security**
|
|
1585
|
+
- Use private networks where possible
|
|
1586
|
+
- Implement proper firewall rules
|
|
1587
|
+
- Enable TLS for all communications
|
|
1588
|
+
|
|
1589
|
+
## Scaling
|
|
1590
|
+
|
|
1591
|
+
### Horizontal Scaling
|
|
1592
|
+
|
|
1593
|
+
**Kubernetes HPA:**
|
|
1594
|
+
|
|
1595
|
+
\`\`\`yaml
|
|
1596
|
+
apiVersion: autoscaling/v2
|
|
1597
|
+
kind: HorizontalPodAutoscaler
|
|
1598
|
+
metadata:
|
|
1599
|
+
name: ${projectName}-hpa
|
|
1600
|
+
spec:
|
|
1601
|
+
scaleTargetRef:
|
|
1602
|
+
apiVersion: apps/v1
|
|
1603
|
+
kind: Deployment
|
|
1604
|
+
name: ${projectName}
|
|
1605
|
+
minReplicas: 2
|
|
1606
|
+
maxReplicas: 10
|
|
1607
|
+
metrics:
|
|
1608
|
+
- type: Resource
|
|
1609
|
+
resource:
|
|
1610
|
+
name: cpu
|
|
1611
|
+
target:
|
|
1612
|
+
type: Utilization
|
|
1613
|
+
averageUtilization: 70
|
|
1614
|
+
\`\`\`
|
|
1615
|
+
|
|
1616
|
+
### Vertical Scaling
|
|
1617
|
+
|
|
1618
|
+
Adjust resource limits based on actual usage:
|
|
1619
|
+
|
|
1620
|
+
\`\`\`yaml
|
|
1621
|
+
resources:
|
|
1622
|
+
requests:
|
|
1623
|
+
memory: "1Gi"
|
|
1624
|
+
cpu: "1000m"
|
|
1625
|
+
limits:
|
|
1626
|
+
memory: "2Gi"
|
|
1627
|
+
cpu: "2000m"
|
|
1628
|
+
\`\`\`
|
|
1629
|
+
|
|
1630
|
+
## Troubleshooting
|
|
1631
|
+
|
|
1632
|
+
### Container Fails to Start
|
|
1633
|
+
|
|
1634
|
+
\`\`\`bash
|
|
1635
|
+
# Check logs
|
|
1636
|
+
docker logs ${projectName}
|
|
1637
|
+
|
|
1638
|
+
# Verify environment variables
|
|
1639
|
+
docker exec ${projectName} env
|
|
1640
|
+
|
|
1641
|
+
# Test manually
|
|
1642
|
+
docker run -it ${projectName}:latest /bin/bash
|
|
1643
|
+
\`\`\`
|
|
1644
|
+
|
|
1645
|
+
### High Memory Usage
|
|
1646
|
+
|
|
1647
|
+
- Monitor memory consumption
|
|
1648
|
+
- Adjust resource limits
|
|
1649
|
+
- Implement caching strategies
|
|
1650
|
+
- Consider using smaller LLM models
|
|
1651
|
+
|
|
1652
|
+
### API Rate Limits
|
|
1653
|
+
|
|
1654
|
+
- Implement exponential backoff
|
|
1655
|
+
- Use rate limiting middleware
|
|
1656
|
+
- Cache responses when possible
|
|
1657
|
+
- Consider using multiple API keys
|
|
1658
|
+
|
|
1659
|
+
### Network Issues
|
|
1660
|
+
|
|
1661
|
+
\`\`\`bash
|
|
1662
|
+
# Test connectivity
|
|
1663
|
+
kubectl exec -it pod-name -- curl https://api.openai.com/v1/models
|
|
1664
|
+
|
|
1665
|
+
# Check DNS resolution
|
|
1666
|
+
kubectl exec -it pod-name -- nslookup api.openai.com
|
|
1667
|
+
\`\`\`
|
|
1668
|
+
|
|
1669
|
+
## Performance Optimization
|
|
1670
|
+
|
|
1671
|
+
1. **Enable caching** for repeated queries
|
|
1672
|
+
2. **Use async execution** for parallel tasks
|
|
1673
|
+
3. **Implement connection pooling**
|
|
1674
|
+
4. **Optimize tool implementations**
|
|
1675
|
+
5. **Monitor and tune LLM parameters**
|
|
1676
|
+
|
|
1677
|
+
## Rollback Procedures
|
|
1678
|
+
|
|
1679
|
+
**Docker:**
|
|
1680
|
+
|
|
1681
|
+
\`\`\`bash
|
|
1682
|
+
docker tag ${projectName}:latest ${projectName}:backup
|
|
1683
|
+
docker pull ${projectName}:previous
|
|
1684
|
+
docker tag ${projectName}:previous ${projectName}:latest
|
|
1685
|
+
\`\`\`
|
|
1686
|
+
|
|
1687
|
+
**Kubernetes:**
|
|
1688
|
+
|
|
1689
|
+
\`\`\`bash
|
|
1690
|
+
kubectl rollout undo deployment/${projectName}
|
|
1691
|
+
kubectl rollout status deployment/${projectName}
|
|
1692
|
+
\`\`\`
|
|
1693
|
+
|
|
1694
|
+
## Health Checks
|
|
1695
|
+
|
|
1696
|
+
Implement health endpoints:
|
|
1697
|
+
|
|
1698
|
+
\`\`\`python
|
|
1699
|
+
from flask import Flask, jsonify
|
|
1700
|
+
|
|
1701
|
+
app = Flask(__name__)
|
|
1702
|
+
|
|
1703
|
+
@app.route('/health')
|
|
1704
|
+
def health():
|
|
1705
|
+
return jsonify({"status": "healthy"}), 200
|
|
1706
|
+
|
|
1707
|
+
@app.route('/ready')
|
|
1708
|
+
def ready():
|
|
1709
|
+
# Check crew initialization
|
|
1710
|
+
return jsonify({"status": "ready"}), 200
|
|
1711
|
+
\`\`\`
|
|
1712
|
+
|
|
1713
|
+
---
|
|
1714
|
+
|
|
1715
|
+
For additional support, see the main [README.md](./README.md) or consult the OSSA documentation.
|
|
290
1716
|
`;
|
|
291
1717
|
}
|
|
292
1718
|
}
|