@bluefly/openstandardagents 0.3.6 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +155 -0
- package/DEMO.md +212 -0
- package/README.md +386 -296
- package/bin/ossa-dev +8 -0
- package/dist/adapters/base/adapter.interface.d.ts +233 -0
- package/dist/adapters/base/adapter.interface.d.ts.map +1 -0
- package/dist/adapters/base/adapter.interface.js +89 -0
- package/dist/adapters/base/adapter.interface.js.map +1 -0
- package/dist/adapters/crewai/adapter.d.ts +52 -0
- package/dist/adapters/crewai/adapter.d.ts.map +1 -0
- package/dist/adapters/crewai/adapter.js +293 -0
- package/dist/adapters/crewai/adapter.js.map +1 -0
- package/dist/adapters/drupal/adapter.d.ts +66 -0
- package/dist/adapters/drupal/adapter.d.ts.map +1 -0
- package/dist/adapters/drupal/adapter.js +465 -0
- package/dist/adapters/drupal/adapter.js.map +1 -0
- package/dist/adapters/drupal/generator.d.ts +149 -0
- package/dist/adapters/drupal/generator.d.ts.map +1 -0
- package/dist/adapters/drupal/generator.js +1760 -0
- package/dist/adapters/drupal/generator.js.map +1 -0
- package/dist/adapters/drupal/index.d.ts +2 -0
- package/dist/adapters/drupal/index.d.ts.map +1 -1
- package/dist/adapters/drupal/index.js +3 -0
- package/dist/adapters/drupal/index.js.map +1 -1
- package/dist/adapters/gitlab-duo/adapter.d.ts +67 -0
- package/dist/adapters/gitlab-duo/adapter.d.ts.map +1 -0
- package/dist/adapters/gitlab-duo/adapter.js +330 -0
- package/dist/adapters/gitlab-duo/adapter.js.map +1 -0
- package/dist/adapters/index.d.ts +13 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +34 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/langchain/adapter.d.ts +49 -0
- package/dist/adapters/langchain/adapter.d.ts.map +1 -0
- package/dist/adapters/langchain/adapter.js +356 -0
- package/dist/adapters/langchain/adapter.js.map +1 -0
- 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 +57 -0
- package/dist/adapters/mcp/adapter.d.ts.map +1 -0
- package/dist/adapters/mcp/adapter.js +475 -0
- package/dist/adapters/mcp/adapter.js.map +1 -0
- package/dist/adapters/mcp/converter.d.ts +31 -0
- package/dist/adapters/mcp/converter.d.ts.map +1 -0
- package/dist/adapters/mcp/converter.js +339 -0
- package/dist/adapters/mcp/converter.js.map +1 -0
- package/dist/adapters/npm/adapter.d.ts +44 -0
- package/dist/adapters/npm/adapter.d.ts.map +1 -0
- package/dist/adapters/npm/adapter.js +337 -0
- package/dist/adapters/npm/adapter.js.map +1 -0
- package/dist/adapters/npm/converter.d.ts +44 -0
- package/dist/adapters/npm/converter.d.ts.map +1 -0
- package/dist/adapters/npm/converter.js +390 -0
- package/dist/adapters/npm/converter.js.map +1 -0
- package/dist/adapters/npm/types.d.ts +116 -0
- package/dist/adapters/npm/types.d.ts.map +1 -0
- package/dist/adapters/npm/types.js +6 -0
- package/dist/adapters/npm/types.js.map +1 -0
- package/dist/adapters/opentelemetry.adapter.d.ts.map +1 -1
- package/dist/adapters/opentelemetry.adapter.js +3 -0
- package/dist/adapters/opentelemetry.adapter.js.map +1 -1
- package/dist/adapters/phoenix.adapter.d.ts +1 -1
- package/dist/adapters/registry/platform-registry.d.ts +68 -0
- package/dist/adapters/registry/platform-registry.d.ts.map +1 -0
- package/dist/adapters/registry/platform-registry.js +93 -0
- package/dist/adapters/registry/platform-registry.js.map +1 -0
- package/dist/adapters/temporal/converter.js +1 -1
- package/dist/cli/banner.d.ts +21 -0
- package/dist/cli/banner.d.ts.map +1 -0
- package/dist/cli/banner.js +128 -0
- package/dist/cli/banner.js.map +1 -0
- package/dist/cli/commands/agents/delete.command.d.ts +10 -0
- package/dist/cli/commands/agents/delete.command.d.ts.map +1 -0
- package/dist/cli/commands/agents/delete.command.js +105 -0
- package/dist/cli/commands/agents/delete.command.js.map +1 -0
- package/dist/cli/commands/agents/list.command.d.ts +10 -0
- package/dist/cli/commands/agents/list.command.d.ts.map +1 -0
- package/dist/cli/commands/agents/list.command.js +140 -0
- package/dist/cli/commands/agents/list.command.js.map +1 -0
- package/dist/cli/commands/agents/show.command.d.ts +10 -0
- package/dist/cli/commands/agents/show.command.d.ts.map +1 -0
- package/dist/cli/commands/agents/show.command.js +182 -0
- package/dist/cli/commands/agents/show.command.js.map +1 -0
- package/dist/cli/commands/agents-md.command.d.ts +1 -1
- package/dist/cli/commands/agents-md.command.d.ts.map +1 -1
- package/dist/cli/commands/agents-md.command.js +122 -40
- package/dist/cli/commands/agents-md.command.js.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +35 -22
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/capability/validate.d.ts.map +1 -1
- package/dist/cli/commands/capability/validate.js +2 -0
- package/dist/cli/commands/capability/validate.js.map +1 -1
- package/dist/cli/commands/dev.command.d.ts +20 -0
- package/dist/cli/commands/dev.command.d.ts.map +1 -0
- package/dist/cli/commands/dev.command.js +78 -0
- package/dist/cli/commands/dev.command.js.map +1 -0
- package/dist/cli/commands/estimate.command.d.ts +12 -0
- package/dist/cli/commands/estimate.command.d.ts.map +1 -0
- package/dist/cli/commands/estimate.command.js +226 -0
- package/dist/cli/commands/estimate.command.js.map +1 -0
- package/dist/cli/commands/export-enhanced.command.d.ts +7 -0
- package/dist/cli/commands/export-enhanced.command.d.ts.map +1 -0
- package/dist/cli/commands/export-enhanced.command.js +149 -0
- package/dist/cli/commands/export-enhanced.command.js.map +1 -0
- package/dist/cli/commands/export.command.d.ts +9 -1
- package/dist/cli/commands/export.command.d.ts.map +1 -1
- package/dist/cli/commands/export.command.js +194 -12
- package/dist/cli/commands/export.command.js.map +1 -1
- package/dist/cli/commands/generate/conformance.js +2 -2
- package/dist/cli/commands/github-sync.command.js +1 -1
- package/dist/cli/commands/identity/plan.d.ts.map +1 -1
- package/dist/cli/commands/identity/plan.js +2 -0
- package/dist/cli/commands/identity/plan.js.map +1 -1
- package/dist/cli/commands/import.command.d.ts.map +1 -1
- package/dist/cli/commands/import.command.js +33 -9
- 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 +2 -0
- package/dist/cli/commands/init.command.js.map +1 -1
- package/dist/cli/commands/lint.command.d.ts.map +1 -1
- package/dist/cli/commands/lint.command.js +46 -27
- package/dist/cli/commands/lint.command.js.map +1 -1
- package/dist/cli/commands/migrate.command.d.ts.map +1 -1
- package/dist/cli/commands/migrate.command.js +48 -22
- 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 +59 -21
- 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 +7 -3
- package/dist/cli/commands/quickstart.command.js.map +1 -1
- package/dist/cli/commands/standardize.command.d.ts.map +1 -1
- package/dist/cli/commands/standardize.command.js +39 -27
- package/dist/cli/commands/standardize.command.js.map +1 -1
- package/dist/cli/commands/test.command.d.ts +1 -0
- package/dist/cli/commands/test.command.d.ts.map +1 -1
- package/dist/cli/commands/test.command.js +172 -105
- package/dist/cli/commands/test.command.js.map +1 -1
- package/dist/cli/commands/types/wizard-config.types.d.ts +59 -0
- package/dist/cli/commands/types/wizard-config.types.d.ts.map +1 -0
- package/dist/cli/commands/types/wizard-config.types.js +34 -0
- package/dist/cli/commands/types/wizard-config.types.js.map +1 -0
- package/dist/cli/commands/upgrade.command.d.ts +9 -0
- package/dist/cli/commands/upgrade.command.d.ts.map +1 -0
- package/dist/cli/commands/upgrade.command.js +167 -0
- package/dist/cli/commands/upgrade.command.js.map +1 -0
- package/dist/cli/commands/validate.command.d.ts.map +1 -1
- package/dist/cli/commands/validate.command.js +67 -45
- package/dist/cli/commands/validate.command.js.map +1 -1
- package/dist/cli/commands/wizard-api-first.command.d.ts +18 -0
- package/dist/cli/commands/wizard-api-first.command.d.ts.map +1 -0
- package/dist/cli/commands/wizard-api-first.command.js +854 -0
- package/dist/cli/commands/wizard-api-first.command.js.map +1 -0
- package/dist/cli/commands/wizard-interactive.command.d.ts +25 -0
- package/dist/cli/commands/wizard-interactive.command.d.ts.map +1 -0
- package/dist/cli/commands/wizard-interactive.command.js +1875 -0
- package/dist/cli/commands/wizard-interactive.command.js.map +1 -0
- package/dist/cli/commands/wizard.command.d.ts.map +1 -1
- package/dist/cli/commands/wizard.command.js +3 -29
- package/dist/cli/commands/wizard.command.js.map +1 -1
- package/dist/cli/commands/workspace.command.js +1 -1
- package/dist/cli/commands/workspace.command.js.map +1 -1
- package/dist/cli/index.d.ts +11 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +279 -24
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/schema-driven/index.d.ts +27 -0
- package/dist/cli/schema-driven/index.d.ts.map +1 -0
- package/dist/cli/schema-driven/index.js +34 -0
- package/dist/cli/schema-driven/index.js.map +1 -0
- package/dist/cli/schema-driven/schema-loader.d.ts +115 -0
- package/dist/cli/schema-driven/schema-loader.d.ts.map +1 -0
- package/dist/cli/schema-driven/schema-loader.js +270 -0
- package/dist/cli/schema-driven/schema-loader.js.map +1 -0
- package/dist/cli/schema-driven/ui-generator.d.ts +88 -0
- package/dist/cli/schema-driven/ui-generator.d.ts.map +1 -0
- package/dist/cli/schema-driven/ui-generator.js +326 -0
- package/dist/cli/schema-driven/ui-generator.js.map +1 -0
- package/dist/cli/templates/agent-templates.d.ts +49 -0
- package/dist/cli/templates/agent-templates.d.ts.map +1 -0
- package/dist/cli/templates/agent-templates.js +237 -0
- package/dist/cli/templates/agent-templates.js.map +1 -0
- package/dist/cli/templates/enhanced-templates.d.ts +32 -0
- package/dist/cli/templates/enhanced-templates.d.ts.map +1 -0
- package/dist/cli/templates/enhanced-templates.js +649 -0
- package/dist/cli/templates/enhanced-templates.js.map +1 -0
- package/dist/cli/utils/error-formatter.js.map +1 -1
- package/dist/cli/utils/output.d.ts +0 -1
- package/dist/cli/utils/output.d.ts.map +1 -1
- package/dist/cli/utils/output.js +1 -2
- package/dist/cli/utils/output.js.map +1 -1
- package/dist/cli/utils/standard-options.d.ts +123 -0
- package/dist/cli/utils/standard-options.d.ts.map +1 -0
- package/dist/cli/utils/standard-options.js +215 -0
- package/dist/cli/utils/standard-options.js.map +1 -0
- package/dist/cli/wizard/engine/wizard-engine.d.ts +47 -0
- package/dist/cli/wizard/engine/wizard-engine.d.ts.map +1 -0
- package/dist/cli/wizard/engine/wizard-engine.js +193 -0
- package/dist/cli/wizard/engine/wizard-engine.js.map +1 -0
- package/dist/cli/wizard/interactive-wizard.d.ts +26 -0
- package/dist/cli/wizard/interactive-wizard.d.ts.map +1 -0
- package/dist/cli/wizard/interactive-wizard.js +296 -0
- package/dist/cli/wizard/interactive-wizard.js.map +1 -0
- package/dist/cli/wizard/steps/14-workspace-registration.d.ts.map +1 -1
- package/dist/cli/wizard/steps/14-workspace-registration.js +1 -2
- package/dist/cli/wizard/steps/14-workspace-registration.js.map +1 -1
- package/dist/cli/wizard/template-catalog.d.ts +32 -0
- package/dist/cli/wizard/template-catalog.d.ts.map +1 -0
- package/dist/cli/wizard/template-catalog.js +99 -0
- package/dist/cli/wizard/template-catalog.js.map +1 -0
- package/dist/cli/wizard/types.d.ts +38 -0
- package/dist/cli/wizard/types.d.ts.map +1 -1
- package/dist/cli/wizard/ui/wizard-ui.d.ts +75 -0
- package/dist/cli/wizard/ui/wizard-ui.d.ts.map +1 -0
- package/dist/cli/wizard/ui/wizard-ui.js +171 -0
- package/dist/cli/wizard/ui/wizard-ui.js.map +1 -0
- package/dist/cli/wizard/use-cases.d.ts +37 -0
- package/dist/cli/wizard/use-cases.d.ts.map +1 -0
- package/dist/cli/wizard/use-cases.js +157 -0
- package/dist/cli/wizard/use-cases.js.map +1 -0
- package/dist/dev-cli/commands/env-cleanup.command.d.ts.map +1 -0
- package/dist/dev-cli/commands/env-cleanup.command.js.map +1 -0
- package/dist/dev-cli/commands/migrate.command.d.ts.map +1 -0
- package/dist/dev-cli/commands/migrate.command.js.map +1 -0
- package/dist/dev-cli/commands/release-prep.command.d.ts.map +1 -0
- package/dist/dev-cli/commands/release-prep.command.js.map +1 -0
- package/dist/dev-cli/commands/release.command.d.ts.map +1 -0
- package/dist/dev-cli/commands/release.command.js.map +1 -0
- package/dist/dev-cli/commands/spec.command.d.ts.map +1 -0
- package/dist/dev-cli/commands/spec.command.js.map +1 -0
- package/dist/dev-cli/commands/version.command.d.ts.map +1 -0
- package/dist/dev-cli/{src/commands → commands}/version.command.js +103 -0
- package/dist/dev-cli/{src/commands → commands}/version.command.js.map +1 -1
- package/dist/dev-cli/commands/workflow.command.d.ts.map +1 -0
- package/dist/dev-cli/commands/workflow.command.js.map +1 -0
- package/dist/dev-cli/index.d.ts.map +1 -0
- package/dist/dev-cli/{src/index.js → index.js} +0 -2
- package/dist/dev-cli/index.js.map +1 -0
- package/dist/dev-cli/schemas/migrate.schema.d.ts.map +1 -0
- package/dist/dev-cli/schemas/migrate.schema.js.map +1 -0
- package/dist/dev-cli/schemas/release-prep.schema.d.ts.map +1 -0
- package/dist/dev-cli/schemas/release-prep.schema.js.map +1 -0
- package/dist/dev-cli/schemas/release.schema.d.ts.map +1 -0
- package/dist/dev-cli/schemas/release.schema.js.map +1 -0
- package/dist/dev-cli/schemas/spec.schema.d.ts +6 -10
- package/dist/dev-cli/schemas/spec.schema.d.ts.map +1 -1
- package/dist/dev-cli/schemas/spec.schema.js +11 -15
- package/dist/dev-cli/schemas/spec.schema.js.map +1 -1
- package/dist/dev-cli/schemas/version.schema.d.ts +29 -58
- package/dist/dev-cli/schemas/version.schema.d.ts.map +1 -1
- package/dist/dev-cli/schemas/version.schema.js +21 -61
- package/dist/dev-cli/schemas/version.schema.js.map +1 -1
- package/dist/dev-cli/services/agent-migration.service.d.ts.map +1 -0
- package/dist/dev-cli/services/agent-migration.service.js.map +1 -0
- package/dist/dev-cli/services/file.service.d.ts.map +1 -0
- package/dist/dev-cli/services/file.service.js.map +1 -0
- package/dist/dev-cli/services/git.service.d.ts.map +1 -0
- package/dist/dev-cli/services/git.service.js.map +1 -0
- package/dist/dev-cli/services/npm.service.d.ts.map +1 -0
- package/dist/dev-cli/services/npm.service.js.map +1 -0
- package/dist/dev-cli/services/release-prep.service.d.ts.map +1 -0
- package/dist/dev-cli/services/release-prep.service.js.map +1 -0
- package/dist/dev-cli/services/release-verify.service.d.ts.map +1 -0
- package/dist/dev-cli/services/release-verify.service.js.map +1 -0
- package/dist/dev-cli/services/spec-generate.service.d.ts.map +1 -0
- package/dist/dev-cli/services/spec-generate.service.js.map +1 -0
- package/dist/dev-cli/services/spec-validate.service.d.ts.map +1 -0
- package/dist/dev-cli/services/spec-validate.service.js.map +1 -0
- package/dist/dev-cli/services/version-audit.service.d.ts +24 -24
- package/dist/dev-cli/services/version-audit.service.d.ts.map +1 -1
- package/dist/dev-cli/services/version-audit.service.js +76 -134
- package/dist/dev-cli/services/version-audit.service.js.map +1 -1
- package/dist/dev-cli/services/version-check.service.d.ts +17 -0
- package/dist/dev-cli/services/version-check.service.d.ts.map +1 -0
- package/dist/dev-cli/services/version-check.service.js +54 -0
- package/dist/dev-cli/services/version-check.service.js.map +1 -0
- package/dist/dev-cli/services/version-detection.service.d.ts.map +1 -0
- package/dist/dev-cli/services/version-detection.service.js.map +1 -0
- package/dist/dev-cli/services/version-file.service.d.ts.map +1 -0
- package/dist/dev-cli/services/version-file.service.js.map +1 -0
- package/dist/dev-cli/services/version-release.service.d.ts.map +1 -0
- package/dist/dev-cli/services/version-release.service.js.map +1 -0
- package/dist/dev-cli/services/version-status.service.d.ts +24 -0
- package/dist/dev-cli/services/version-status.service.d.ts.map +1 -0
- package/dist/dev-cli/services/version-status.service.js +55 -0
- package/dist/dev-cli/services/version-status.service.js.map +1 -0
- package/dist/dev-cli/services/version-sync.service.d.ts.map +1 -0
- package/dist/dev-cli/services/version-sync.service.js.map +1 -0
- package/dist/dev-cli/services/version-validate.service.d.ts.map +1 -0
- package/dist/dev-cli/{src/services → services}/version-validate.service.js +1 -1
- package/dist/dev-cli/services/version-validate.service.js.map +1 -0
- package/dist/di-container.d.ts.map +1 -1
- package/dist/di-container.js +2 -0
- package/dist/di-container.js.map +1 -1
- package/dist/generated/types.d.ts +691 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +6 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/package.json +285 -0
- package/dist/repositories/schema.repository.d.ts.map +1 -1
- package/dist/repositories/schema.repository.js +3 -0
- package/dist/repositories/schema.repository.js.map +1 -1
- package/dist/runtime/agent-runner.d.ts +46 -0
- package/dist/runtime/agent-runner.d.ts.map +1 -0
- package/dist/runtime/agent-runner.js +346 -0
- package/dist/runtime/agent-runner.js.map +1 -0
- package/dist/sdks/kagent/crd-generator.d.ts +4 -0
- package/dist/sdks/kagent/crd-generator.d.ts.map +1 -1
- package/dist/sdks/kagent/crd-generator.js +83 -2
- package/dist/sdks/kagent/crd-generator.js.map +1 -1
- package/dist/sdks/kagent/k8s-resources-generator.d.ts +73 -0
- package/dist/sdks/kagent/k8s-resources-generator.d.ts.map +1 -0
- package/dist/sdks/kagent/k8s-resources-generator.js +286 -0
- package/dist/sdks/kagent/k8s-resources-generator.js.map +1 -0
- package/dist/sdks/kagent/types.d.ts +79 -0
- package/dist/sdks/kagent/types.d.ts.map +1 -1
- package/dist/sdks/shared/validation.d.ts +2 -2
- package/dist/sdks/typescript/types.d.ts +3 -3
- package/dist/sdks/typescript/types.js +3 -3
- package/dist/services/audit.d.ts.map +1 -1
- package/dist/services/audit.js +11 -7
- package/dist/services/audit.js.map +1 -1
- package/dist/services/codegen/generators/openapi-zod.generator.js +1 -1
- package/dist/services/cost-estimation/optimization-patterns.d.ts +23 -0
- package/dist/services/cost-estimation/optimization-patterns.d.ts.map +1 -0
- package/dist/services/cost-estimation/optimization-patterns.js +147 -0
- package/dist/services/cost-estimation/optimization-patterns.js.map +1 -0
- package/dist/services/cost-estimation/pricing.d.ts +29 -0
- package/dist/services/cost-estimation/pricing.d.ts.map +1 -0
- package/dist/services/cost-estimation/pricing.js +225 -0
- package/dist/services/cost-estimation/pricing.js.map +1 -0
- package/dist/services/cost-estimation/scenario-estimator.d.ts +59 -0
- package/dist/services/cost-estimation/scenario-estimator.d.ts.map +1 -0
- package/dist/services/cost-estimation/scenario-estimator.js +145 -0
- package/dist/services/cost-estimation/scenario-estimator.js.map +1 -0
- package/dist/services/cost-estimation/token-counter.service.d.ts +51 -0
- package/dist/services/cost-estimation/token-counter.service.d.ts.map +1 -0
- package/dist/services/cost-estimation/token-counter.service.js +125 -0
- package/dist/services/cost-estimation/token-counter.service.js.map +1 -0
- package/dist/services/dev-server/dev-server.service.d.ts +121 -0
- package/dist/services/dev-server/dev-server.service.d.ts.map +1 -0
- package/dist/services/dev-server/dev-server.service.js +290 -0
- package/dist/services/dev-server/dev-server.service.js.map +1 -0
- package/dist/services/dev-server/file-watcher.d.ts +101 -0
- package/dist/services/dev-server/file-watcher.d.ts.map +1 -0
- package/dist/services/dev-server/file-watcher.js +190 -0
- package/dist/services/dev-server/file-watcher.js.map +1 -0
- package/dist/services/dev-server/live-validator.d.ts +157 -0
- package/dist/services/dev-server/live-validator.d.ts.map +1 -0
- package/dist/services/dev-server/live-validator.js +301 -0
- package/dist/services/dev-server/live-validator.js.map +1 -0
- package/dist/services/dev-server/websocket-server.d.ts +137 -0
- package/dist/services/dev-server/websocket-server.d.ts.map +1 -0
- package/dist/services/dev-server/websocket-server.js +229 -0
- package/dist/services/dev-server/websocket-server.js.map +1 -0
- package/dist/services/export/anthropic/anthropic-exporter.d.ts +70 -0
- package/dist/services/export/anthropic/anthropic-exporter.d.ts.map +1 -0
- package/dist/services/export/anthropic/anthropic-exporter.js +576 -0
- package/dist/services/export/anthropic/anthropic-exporter.js.map +1 -0
- package/dist/services/export/anthropic/api-generator.d.ts +39 -0
- package/dist/services/export/anthropic/api-generator.d.ts.map +1 -0
- package/dist/services/export/anthropic/api-generator.js +395 -0
- package/dist/services/export/anthropic/api-generator.js.map +1 -0
- package/dist/services/export/anthropic/index.d.ts +18 -0
- package/dist/services/export/anthropic/index.d.ts.map +1 -0
- package/dist/services/export/anthropic/index.js +16 -0
- package/dist/services/export/anthropic/index.js.map +1 -0
- package/dist/services/export/anthropic/tools-generator.d.ts +35 -0
- package/dist/services/export/anthropic/tools-generator.d.ts.map +1 -0
- package/dist/services/export/anthropic/tools-generator.js +260 -0
- package/dist/services/export/anthropic/tools-generator.js.map +1 -0
- package/dist/services/export/export-orchestrator.d.ts +89 -0
- package/dist/services/export/export-orchestrator.d.ts.map +1 -0
- package/dist/services/export/export-orchestrator.js +181 -0
- package/dist/services/export/export-orchestrator.js.map +1 -0
- package/dist/services/export/langchain/api-generator.d.ts +17 -0
- package/dist/services/export/langchain/api-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/api-generator.js +375 -0
- package/dist/services/export/langchain/api-generator.js.map +1 -0
- package/dist/services/export/langchain/callbacks-generator.d.ts +63 -0
- package/dist/services/export/langchain/callbacks-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/callbacks-generator.js +408 -0
- package/dist/services/export/langchain/callbacks-generator.js.map +1 -0
- package/dist/services/export/langchain/error-handling-generator.d.ts +76 -0
- package/dist/services/export/langchain/error-handling-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/error-handling-generator.js +522 -0
- package/dist/services/export/langchain/error-handling-generator.js.map +1 -0
- package/dist/services/export/langchain/index.d.ts +17 -0
- package/dist/services/export/langchain/index.d.ts.map +1 -0
- package/dist/services/export/langchain/index.js +13 -0
- package/dist/services/export/langchain/index.js.map +1 -0
- package/dist/services/export/langchain/langchain-exporter.d.ts +174 -0
- package/dist/services/export/langchain/langchain-exporter.d.ts.map +1 -0
- package/dist/services/export/langchain/langchain-exporter.js +953 -0
- package/dist/services/export/langchain/langchain-exporter.js.map +1 -0
- package/dist/services/export/langchain/langgraph-generator.d.ts +86 -0
- package/dist/services/export/langchain/langgraph-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/langgraph-generator.js +473 -0
- package/dist/services/export/langchain/langgraph-generator.js.map +1 -0
- package/dist/services/export/langchain/langserve-generator.d.ts +95 -0
- package/dist/services/export/langchain/langserve-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/langserve-generator.js +807 -0
- package/dist/services/export/langchain/langserve-generator.js.map +1 -0
- package/dist/services/export/langchain/memory-generator.d.ts +71 -0
- package/dist/services/export/langchain/memory-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/memory-generator.js +1182 -0
- package/dist/services/export/langchain/memory-generator.js.map +1 -0
- package/dist/services/export/langchain/openapi-generator.d.ts +20 -0
- package/dist/services/export/langchain/openapi-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/openapi-generator.js +364 -0
- package/dist/services/export/langchain/openapi-generator.js.map +1 -0
- package/dist/services/export/langchain/plan-execute-generator.d.ts +60 -0
- package/dist/services/export/langchain/plan-execute-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/plan-execute-generator.js +679 -0
- package/dist/services/export/langchain/plan-execute-generator.js.map +1 -0
- package/dist/services/export/langchain/streaming-generator.d.ts +66 -0
- package/dist/services/export/langchain/streaming-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/streaming-generator.js +749 -0
- package/dist/services/export/langchain/streaming-generator.js.map +1 -0
- package/dist/services/export/langchain/tools-generator.d.ts +67 -0
- package/dist/services/export/langchain/tools-generator.d.ts.map +1 -0
- package/dist/services/export/langchain/tools-generator.js +543 -0
- package/dist/services/export/langchain/tools-generator.js.map +1 -0
- package/dist/services/export/npm/express-generator.d.ts +23 -0
- package/dist/services/export/npm/express-generator.d.ts.map +1 -0
- package/dist/services/export/npm/express-generator.js +296 -0
- package/dist/services/export/npm/express-generator.js.map +1 -0
- package/dist/services/export/npm/index.d.ts +13 -0
- package/dist/services/export/npm/index.d.ts.map +1 -0
- package/dist/services/export/npm/index.js +11 -0
- package/dist/services/export/npm/index.js.map +1 -0
- package/dist/services/export/npm/npm-exporter.d.ts +142 -0
- package/dist/services/export/npm/npm-exporter.d.ts.map +1 -0
- package/dist/services/export/npm/npm-exporter.js +480 -0
- package/dist/services/export/npm/npm-exporter.js.map +1 -0
- package/dist/services/export/npm/openapi-generator.d.ts +19 -0
- package/dist/services/export/npm/openapi-generator.d.ts.map +1 -0
- package/dist/services/export/npm/openapi-generator.js +428 -0
- package/dist/services/export/npm/openapi-generator.js.map +1 -0
- package/dist/services/export/npm/package-json-generator.d.ts +31 -0
- package/dist/services/export/npm/package-json-generator.d.ts.map +1 -0
- package/dist/services/export/npm/package-json-generator.js +153 -0
- package/dist/services/export/npm/package-json-generator.js.map +1 -0
- package/dist/services/export/npm/typescript-generator.d.ts +69 -0
- package/dist/services/export/npm/typescript-generator.d.ts.map +1 -0
- package/dist/services/export/npm/typescript-generator.js +437 -0
- package/dist/services/export/npm/typescript-generator.js.map +1 -0
- package/dist/services/export/testing/index.d.ts +8 -0
- package/dist/services/export/testing/index.d.ts.map +1 -0
- package/dist/services/export/testing/index.js +7 -0
- package/dist/services/export/testing/index.js.map +1 -0
- package/dist/services/export/testing/test-generator.d.ts +178 -0
- package/dist/services/export/testing/test-generator.d.ts.map +1 -0
- package/dist/services/export/testing/test-generator.js +2542 -0
- package/dist/services/export/testing/test-generator.js.map +1 -0
- package/dist/services/framework-import/langchain-importer.service.d.ts.map +1 -1
- package/dist/services/framework-import/langchain-importer.service.js +1 -0
- package/dist/services/framework-import/langchain-importer.service.js.map +1 -1
- package/dist/services/framework-import/langflow-importer.service.d.ts.map +1 -1
- package/dist/services/framework-import/langflow-importer.service.js +1 -0
- package/dist/services/framework-import/langflow-importer.service.js.map +1 -1
- package/dist/services/messaging/messaging.service.d.ts.map +1 -1
- package/dist/services/messaging/messaging.service.js +2 -0
- package/dist/services/messaging/messaging.service.js.map +1 -1
- package/dist/services/migration.service.d.ts +1 -1
- package/dist/services/migration.service.js +9 -9
- package/dist/services/migration.service.js.map +1 -1
- package/dist/services/registry/index.service.d.ts.map +1 -1
- package/dist/services/registry/index.service.js +2 -0
- package/dist/services/registry/index.service.js.map +1 -1
- package/dist/services/structure/agents-folder.service.js +2 -2
- package/dist/services/taxonomy-service.d.ts +103 -0
- package/dist/services/taxonomy-service.d.ts.map +1 -0
- package/dist/services/taxonomy-service.js +343 -0
- package/dist/services/taxonomy-service.js.map +1 -0
- package/dist/services/test-runner/mock-llm.service.d.ts +77 -0
- package/dist/services/test-runner/mock-llm.service.d.ts.map +1 -0
- package/dist/services/test-runner/mock-llm.service.js +173 -0
- package/dist/services/test-runner/mock-llm.service.js.map +1 -0
- package/dist/services/test-runner/scenarios.d.ts +36 -0
- package/dist/services/test-runner/scenarios.d.ts.map +1 -0
- package/dist/services/test-runner/scenarios.js +196 -0
- package/dist/services/test-runner/scenarios.js.map +1 -0
- package/dist/services/test-runner/test-runner.service.d.ts +19 -1
- package/dist/services/test-runner/test-runner.service.d.ts.map +1 -1
- package/dist/services/test-runner/test-runner.service.js +72 -6
- package/dist/services/test-runner/test-runner.service.js.map +1 -1
- package/dist/services/validation/best-practices-validator.d.ts +84 -0
- package/dist/services/validation/best-practices-validator.d.ts.map +1 -0
- package/dist/services/validation/best-practices-validator.js +499 -0
- package/dist/services/validation/best-practices-validator.js.map +1 -0
- package/dist/services/validation/cost-estimator.d.ts +69 -0
- package/dist/services/validation/cost-estimator.d.ts.map +1 -0
- package/dist/services/validation/cost-estimator.js +221 -0
- package/dist/services/validation/cost-estimator.js.map +1 -0
- package/dist/services/validation/enhanced-validator.d.ts +78 -0
- package/dist/services/validation/enhanced-validator.d.ts.map +1 -0
- package/dist/services/validation/enhanced-validator.js +212 -0
- package/dist/services/validation/enhanced-validator.js.map +1 -0
- package/dist/services/validation/index.d.ts +13 -0
- package/dist/services/validation/index.d.ts.map +1 -0
- package/dist/services/validation/index.js +9 -0
- package/dist/services/validation/index.js.map +1 -0
- package/dist/services/validation/security-validator.d.ts +81 -0
- package/dist/services/validation/security-validator.d.ts.map +1 -0
- package/dist/services/validation/security-validator.js +328 -0
- package/dist/services/validation/security-validator.js.map +1 -0
- package/dist/services/validation.service.d.ts.map +1 -1
- package/dist/services/validation.service.js +2 -0
- package/dist/services/validation.service.js.map +1 -1
- package/dist/services/validators/a2a.validator.d.ts.map +1 -1
- package/dist/services/validators/a2a.validator.js +2 -0
- package/dist/services/validators/a2a.validator.js.map +1 -1
- package/dist/services/validators/anthropic.validator.d.ts.map +1 -1
- package/dist/services/validators/anthropic.validator.js +1 -0
- package/dist/services/validators/anthropic.validator.js.map +1 -1
- package/dist/services/validators/autogen.validator.d.ts.map +1 -1
- package/dist/services/validators/autogen.validator.js +2 -0
- package/dist/services/validators/autogen.validator.js.map +1 -1
- package/dist/services/validators/contract.validator.d.ts.map +1 -1
- package/dist/services/validators/contract.validator.js +2 -0
- package/dist/services/validators/contract.validator.js.map +1 -1
- package/dist/services/validators/crewai.validator.d.ts.map +1 -1
- package/dist/services/validators/crewai.validator.js +2 -0
- package/dist/services/validators/crewai.validator.js.map +1 -1
- package/dist/services/validators/cursor.validator.d.ts.map +1 -1
- package/dist/services/validators/cursor.validator.js +1 -0
- package/dist/services/validators/cursor.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/dependencies.validator.js +1 -0
- package/dist/services/validators/dependencies.validator.js.map +1 -1
- package/dist/services/validators/index.d.ts.map +1 -1
- package/dist/services/validators/index.js +1 -0
- package/dist/services/validators/index.js.map +1 -1
- package/dist/services/validators/kagent.validator.d.ts.map +1 -1
- package/dist/services/validators/kagent.validator.js +2 -0
- package/dist/services/validators/kagent.validator.js.map +1 -1
- package/dist/services/validators/langchain.validator.d.ts.map +1 -1
- package/dist/services/validators/langchain.validator.js +2 -0
- package/dist/services/validators/langchain.validator.js.map +1 -1
- package/dist/services/validators/langflow.validator.d.ts.map +1 -1
- package/dist/services/validators/langflow.validator.js +1 -0
- package/dist/services/validators/langflow.validator.js.map +1 -1
- package/dist/services/validators/langgraph.validator.d.ts.map +1 -1
- package/dist/services/validators/langgraph.validator.js +2 -0
- package/dist/services/validators/langgraph.validator.js.map +1 -1
- package/dist/services/validators/llamaindex.validator.d.ts.map +1 -1
- package/dist/services/validators/llamaindex.validator.js +1 -0
- package/dist/services/validators/llamaindex.validator.js.map +1 -1
- package/dist/services/validators/mcp.validator.d.ts.map +1 -1
- package/dist/services/validators/mcp.validator.js +2 -0
- package/dist/services/validators/mcp.validator.js.map +1 -1
- package/dist/services/validators/messaging.validator.d.ts.map +1 -1
- package/dist/services/validators/messaging.validator.js +2 -0
- package/dist/services/validators/messaging.validator.js.map +1 -1
- package/dist/services/validators/openai.validator.d.ts.map +1 -1
- package/dist/services/validators/openai.validator.js +1 -0
- package/dist/services/validators/openai.validator.js.map +1 -1
- package/dist/services/validators/vercel-ai.validator.d.ts.map +1 -1
- package/dist/services/validators/vercel-ai.validator.js +1 -0
- package/dist/services/validators/vercel-ai.validator.js.map +1 -1
- package/dist/services/wizard/prompts.d.ts +71 -0
- package/dist/services/wizard/prompts.d.ts.map +1 -0
- package/dist/services/wizard/prompts.js +322 -0
- package/dist/services/wizard/prompts.js.map +1 -0
- package/dist/services/wizard/wizard.service.d.ts +60 -0
- package/dist/services/wizard/wizard.service.d.ts.map +1 -0
- package/dist/services/wizard/wizard.service.js +261 -0
- package/dist/services/wizard/wizard.service.js.map +1 -0
- package/dist/spec/registry/registry-spec.md +1 -1
- package/dist/spec/v0.3/ossa-0.3.6.schema.json +11035 -13719
- package/dist/spec/v0.4/agent.schema.json +15944 -0
- package/dist/spec/v0.4/extensions/a2a/README.md +193 -0
- package/dist/spec/v0.4/extensions/a2a/a2a.schema.json +77 -0
- package/dist/spec/v0.4/extensions/ag2/ag2.schema.json +277 -0
- package/dist/spec/v0.4/extensions/crewai/crewai.schema.json +256 -0
- package/dist/spec/v0.4/extensions/kagent/README.md +315 -0
- package/dist/spec/v0.4/extensions/kagent/kagent.schema.json +624 -0
- package/dist/spec/v0.4/extensions/langchain/langchain.schema.json +243 -0
- package/dist/spec/v0.4/extensions/langgraph/langgraph.schema.json +211 -0
- package/dist/spec/v0.4/extensions/mcp/README.md +276 -0
- package/dist/spec/v0.4/extensions/mcp/mcp.schema.json +84 -0
- package/dist/testing/runner.d.ts.map +1 -1
- package/dist/testing/runner.js +3 -2
- package/dist/testing/runner.js.map +1 -1
- package/dist/types/identity.zod.d.ts +5 -5
- package/dist/types/index.d.ts +12 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/personality.zod.d.ts +39 -39
- package/dist/utils/version.d.ts +4 -2
- package/dist/utils/version.d.ts.map +1 -1
- package/dist/utils/version.js +16 -8
- package/dist/utils/version.js.map +1 -1
- package/dist/validation/__tests__/error-codes.test.js +1 -1
- package/dist/validation/enhanced-validator.js +6 -6
- package/dist/validation/error-formatter.js +1 -1
- package/dist/validation/index.js +5 -5
- package/dist/validation/validator.d.ts.map +1 -1
- package/dist/validation/validator.js +2 -1
- package/dist/validation/validator.js.map +1 -1
- package/dist/version-management/api/server.d.ts +3 -0
- package/dist/version-management/api/server.d.ts.map +1 -0
- package/dist/version-management/api/server.js +75 -0
- package/dist/version-management/api/server.js.map +1 -0
- package/dist/version-management/cli/index.d.ts +3 -0
- package/dist/version-management/cli/index.d.ts.map +1 -0
- package/dist/version-management/cli/index.js +212 -0
- package/dist/version-management/cli/index.js.map +1 -0
- package/dist/version-management/core/version-manager.d.ts +108 -0
- package/dist/version-management/core/version-manager.d.ts.map +1 -0
- package/dist/version-management/core/version-manager.js +319 -0
- package/dist/version-management/core/version-manager.js.map +1 -0
- package/dist/version-management/core/version-manager.test.d.ts +2 -0
- package/dist/version-management/core/version-manager.test.d.ts.map +1 -0
- package/dist/version-management/core/version-manager.test.js +210 -0
- package/dist/version-management/core/version-manager.test.js.map +1 -0
- package/dist/version-management/index.d.ts +3 -0
- package/dist/version-management/index.d.ts.map +1 -0
- package/dist/version-management/index.js +2 -0
- package/dist/version-management/index.js.map +1 -0
- package/dist/version.d.ts +62 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +73 -0
- package/dist/version.js.map +1 -0
- package/examples/a2a/agent-handoff.ossa.yaml +1 -1
- package/examples/a2a/service-discovery.ossa.yaml +1 -1
- package/examples/adapters/drupal-eca-mapping.yaml +1 -1
- package/examples/adapters/drupal-eca-task.yaml +1 -1
- package/examples/adapters/drupal-flowdrop-mapping.yaml +1 -1
- package/examples/adapters/drupal-maestro-mapping.yaml +1 -1
- package/examples/adapters/mistral-agent.yaml +1 -1
- package/examples/adapters/symfony-messenger-task.yaml +1 -1
- package/examples/adapters/symfony-messenger-workflow.yaml +1 -1
- package/examples/adk-integration/code-review-workflow.yml +1 -1
- package/examples/adk-integration/customer-support.yml +1 -1
- package/examples/adk-integration/data-pipeline.yml +1 -1
- package/examples/advanced/reasoning-agent.yaml +1 -1
- package/examples/advanced/workflows/hybrid-model-strategy.yaml +1 -1
- package/examples/agent-manifests/critics/critic-agent.yaml +1 -1
- package/examples/agent-manifests/governors/governor-agent.yaml +1 -1
- package/examples/agent-manifests/integrators/integrator-agent.yaml +1 -1
- package/examples/agent-manifests/judges/judge-agent.yaml +1 -1
- package/examples/agent-manifests/monitors/monitor-agent.yaml +1 -1
- package/examples/agent-manifests/orchestrators/orchestrator-agent.yaml +1 -1
- package/examples/agent-manifests/sample-compliant-agent.yaml +1 -1
- package/examples/agent-manifests/workers/worker-agent.yaml +1 -1
- package/examples/agents/01-customer-support-bot/.env.example +32 -0
- package/examples/agents/01-customer-support-bot/Dockerfile +30 -0
- package/examples/agents/01-customer-support-bot/README.md +295 -0
- package/examples/agents/01-customer-support-bot/agent.ossa.yaml +172 -0
- package/examples/agents/01-customer-support-bot/docker-compose.yml +55 -0
- package/examples/agents/01-customer-support-bot/openapi.yaml +238 -0
- package/examples/agents/01-customer-support-bot/package.json +48 -0
- package/examples/agents/02-code-review-agent/README.md +72 -0
- package/examples/agents/02-code-review-agent/agent.ossa.yaml +239 -0
- package/examples/agents/02-code-review-agent/docker-compose.yml +22 -0
- package/examples/agents/02-code-review-agent/openapi.yaml +150 -0
- package/examples/agents/03-data-analysis-agent/README.md +51 -0
- package/examples/agents/03-data-analysis-agent/agent.ossa.yaml +97 -0
- package/examples/agents/03-data-analysis-agent/openapi.yaml +74 -0
- package/examples/agents/04-content-moderator/README.md +55 -0
- package/examples/agents/04-content-moderator/agent.ossa.yaml +131 -0
- package/examples/agents/04-content-moderator/openapi.yaml +50 -0
- package/examples/agents/05-sales-assistant/README.md +37 -0
- package/examples/agents/05-sales-assistant/agent.ossa.yaml +146 -0
- package/examples/agents/05-sales-assistant/openapi.yaml +59 -0
- package/examples/agents/06-devops-agent/README.md +39 -0
- package/examples/agents/06-devops-agent/agent.ossa.yaml +141 -0
- package/examples/agents/06-devops-agent/openapi.yaml +51 -0
- package/examples/agents/07-research-assistant/README.md +31 -0
- package/examples/agents/07-research-assistant/agent.ossa.yaml +119 -0
- package/examples/agents/07-research-assistant/openapi.yaml +56 -0
- package/examples/agents/08-email-triage-agent/README.md +33 -0
- package/examples/agents/08-email-triage-agent/agent.ossa.yaml +133 -0
- package/examples/agents/08-email-triage-agent/openapi.yaml +41 -0
- package/examples/agents/09-security-scanner/README.md +49 -0
- package/examples/agents/09-security-scanner/agent.ossa.yaml +174 -0
- package/examples/agents/09-security-scanner/openapi.yaml +46 -0
- package/examples/agents/10-meeting-assistant/README.md +53 -0
- package/examples/agents/10-meeting-assistant/agent.ossa.yaml +211 -0
- package/examples/agents/10-meeting-assistant/docker-compose.yml +27 -0
- package/examples/agents/10-meeting-assistant/openapi.yaml +131 -0
- package/examples/agents/COMPLETION_REPORT.txt +272 -0
- package/examples/agents/INDEX.md +296 -0
- package/examples/agents/README.md +452 -0
- package/examples/agents/SUMMARY.md +362 -0
- package/examples/agents/TEST_RESULTS.md +458 -0
- package/examples/agents/architecture-healer-enterprise.yaml +1 -1
- package/examples/agents/dependency-healer-npm.yaml +1 -1
- package/examples/agents/spec-healer-openapi.yaml +1 -1
- package/examples/agents/wiki-healer-production.yaml +1 -1
- package/examples/agents-md/code-agent.ossa.json +1 -1
- package/examples/agents-md/monorepo-agent.ossa.yaml +1 -1
- package/examples/anthropic/claude-assistant.ossa.json +1 -1
- package/examples/autogen/multi-agent.ossa.json +1 -1
- package/examples/autonomous-evolution/self-evolving-agent.ossa.yaml +1 -1
- package/examples/build-once-use-everywhere/agent.ossa.yaml +1 -1
- package/examples/claude-code/code-reviewer.ossa.yaml +1 -1
- package/examples/claude-code/ossa-validator.ossa.yaml +1 -1
- package/examples/common_npm/agent-router.ossa.yaml +2 -2
- package/examples/contracts/data-consumer.ossa.yaml +1 -1
- package/examples/contracts/data-producer-v2.ossa.yaml +1 -1
- package/examples/contracts/data-producer.ossa.yaml +1 -1
- package/examples/crewai/research-team.ossa.json +1 -1
- package/examples/cursor/code-review-agent.ossa.json +1 -1
- package/examples/drupal/QUICKSTART.md +439 -0
- package/examples/drupal/ai_agents_ossa-module/.agents/example-agent/agent.ossa.yaml +1 -1
- package/examples/drupal/content-moderator.ossa.yaml +107 -0
- package/examples/drupal/gitlab-ml-recommender.ossa.yaml +2 -2
- package/examples/economics/marketplace-agent.ossa.json +1 -1
- package/examples/export/langchain/production-agent-with-memory/README.md +373 -0
- package/examples/export/langchain/production-agent-with-memory/agent.ossa.yaml +97 -0
- package/examples/export/langchain/production-agent-with-streaming/README.md +617 -0
- package/examples/export/langchain/production-agent-with-streaming/agent.ossa.yaml +100 -0
- package/examples/export/langchain/production-agent-with-streaming/client-example.py +263 -0
- package/examples/export/langchain/production-agent-with-tools/README.md +296 -0
- package/examples/export/langchain/production-agent-with-tools/agent.ossa.yaml +216 -0
- package/examples/export/langchain-export-example.ts +246 -0
- package/examples/export/langserve-export-example.ts +246 -0
- package/examples/export/test-generation-example.ts +457 -0
- package/examples/extensions/agents-md-advanced.yml +1 -1
- package/examples/extensions/agents-md-basic.yml +1 -1
- package/examples/extensions/agents-md-sync.yml +1 -1
- package/examples/extensions/agents-md-v1.yml +1 -1
- package/examples/extensions/drupal-v1.yml +1 -1
- package/examples/extensions/encryption-multi-provider.yaml +4 -4
- package/examples/extensions/kagent-v1.yml +1 -1
- package/examples/extensions/knowledge-sources.yaml +1 -1
- package/examples/extensions/mcp-full-featured.yaml +1 -1
- package/examples/genetics/breeding-agent.ossa.json +1 -1
- package/examples/getting-started/01-minimal-agent.ossa.yaml +1 -1
- package/examples/getting-started/02-agent-with-tools.ossa.yaml +1 -1
- package/examples/getting-started/03-agent-with-safety.ossa.yaml +1 -1
- package/examples/getting-started/04-agent-with-messaging.ossa.yaml +1 -1
- package/examples/getting-started/05-workflow-composition.ossa.yaml +1 -1
- package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
- package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +1 -1
- package/examples/kagent/compliance-validator.ossa.yaml +1 -1
- package/examples/kagent/cost-optimizer.ossa.yaml +1 -1
- package/examples/kagent/documentation-agent.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +2 -2
- package/examples/kagent/k8s-troubleshooter.ossa.yaml +1 -1
- package/examples/kagent/security-scanner.ossa.yaml +1 -1
- package/examples/langchain/chain-agent.ossa.json +1 -1
- package/examples/langflow/workflow-agent.ossa.json +1 -1
- package/examples/langgraph/state-machine-agent.ossa.json +1 -1
- package/examples/lifecycle/mentoring-agent.ossa.json +1 -1
- package/examples/llamaindex/rag-agent.ossa.json +1 -1
- package/examples/mcp/database-mcp.ossa.yaml +1 -1
- package/examples/mcp/filesystem-mcp.ossa.yaml +1 -1
- package/examples/messaging/dependency-healer.ossa.yaml +1 -1
- package/examples/messaging/incident-responder.ossa.yaml +1 -1
- package/examples/messaging/routing-rules.ossa.yaml +1 -1
- package/examples/messaging/security-scanner.ossa.yaml +1 -1
- package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
- package/examples/migrations/langchain/01-python-react-agent-after.ossa.yaml +1 -1
- package/examples/migrations/langchain/02-typescript-conversational-after.ossa.yaml +1 -1
- package/examples/migrations/langchain/03-sequential-chain-after.ossa.yaml +1 -1
- package/examples/migrations/langchain/04-config-based-after.ossa.yaml +1 -1
- package/examples/migrations/swarm-to-ossa/after-handoffs.ossa.yaml +6 -6
- package/examples/migrations/swarm-to-ossa/after-triage-agent.ossa.yaml +3 -3
- package/examples/multi-agent/conditional-router.ossa.yaml +1 -1
- package/examples/multi-agent/parallel-execution.ossa.yaml +1 -1
- package/examples/multi-agent/sequential-pipeline.ossa.yaml +1 -1
- package/examples/multi-agent-research-workflow.ossa.yaml +133 -0
- package/examples/multi-platform/single-manifest/agent.ossa.yaml +1 -1
- package/examples/npm-export-example.ts +150 -0
- package/examples/observability/activity-stream-full.yaml +1 -1
- package/examples/openai/basic-agent.ossa.yaml +1 -1
- package/examples/openai/multi-tool-agent.ossa.json +1 -1
- package/examples/openai/swarm-agent.ossa.json +1 -1
- package/examples/ossa-templates/01-code-assistant.ossa.yaml +1 -1
- package/examples/ossa-templates/02-security-scanner.ossa.yaml +1 -1
- package/examples/ossa-templates/03-ci-pipeline.ossa.yaml +1 -1
- package/examples/ossa-templates/04-code-reviewer.ossa.yaml +1 -1
- package/examples/ossa-templates/05-doc-generator.ossa.yaml +1 -1
- package/examples/ossa-templates/06-compliance-validator.ossa.yaml +1 -1
- package/examples/ossa-templates/07-workflow-orchestrator.ossa.yaml +1 -1
- package/examples/ossa-templates/08-content-writer.ossa.yaml +1 -1
- package/examples/ossa-templates/09-test-generator.ossa.yaml +1 -1
- package/examples/ossa-templates/10-data-transformer.ossa.yaml +1 -1
- package/examples/ossa-templates/11-react-performance-expert.ossa.yaml +1 -1
- package/examples/ossa-templates/12-typescript-type-safety-expert.ossa.yaml +1 -1
- package/examples/ossa-templates/13-accessibility-champion.ossa.yaml +1 -1
- package/examples/ossa-templates/14-security-hardening-agent.ossa.yaml +1 -1
- package/examples/production/document-analyzer-openai.yml +1 -1
- package/examples/production-ready/01-customer-support-bot/.env.example +32 -0
- package/examples/production-ready/01-customer-support-bot/Dockerfile +30 -0
- package/examples/production-ready/01-customer-support-bot/README.md +295 -0
- package/examples/production-ready/01-customer-support-bot/agent.ossa.yaml +172 -0
- package/examples/production-ready/01-customer-support-bot/docker-compose.yml +55 -0
- package/examples/production-ready/01-customer-support-bot/openapi.yaml +238 -0
- package/examples/production-ready/01-customer-support-bot/package.json +48 -0
- package/examples/production-ready/02-code-review-agent/README.md +72 -0
- package/examples/production-ready/02-code-review-agent/agent.ossa.yaml +239 -0
- package/examples/production-ready/02-code-review-agent/docker-compose.yml +22 -0
- package/examples/production-ready/02-code-review-agent/openapi.yaml +150 -0
- package/examples/production-ready/03-data-analysis-agent/README.md +51 -0
- package/examples/production-ready/03-data-analysis-agent/agent.ossa.yaml +97 -0
- package/examples/production-ready/03-data-analysis-agent/openapi.yaml +74 -0
- package/examples/production-ready/04-content-moderator/README.md +55 -0
- package/examples/production-ready/04-content-moderator/agent.ossa.yaml +131 -0
- package/examples/production-ready/04-content-moderator/openapi.yaml +50 -0
- package/examples/production-ready/05-sales-assistant/README.md +37 -0
- package/examples/production-ready/05-sales-assistant/agent.ossa.yaml +146 -0
- package/examples/production-ready/05-sales-assistant/openapi.yaml +59 -0
- package/examples/production-ready/06-devops-agent/README.md +39 -0
- package/examples/production-ready/06-devops-agent/agent.ossa.yaml +141 -0
- package/examples/production-ready/06-devops-agent/openapi.yaml +51 -0
- package/examples/production-ready/07-research-assistant/README.md +31 -0
- package/examples/production-ready/07-research-assistant/agent.ossa.yaml +119 -0
- package/examples/production-ready/07-research-assistant/openapi.yaml +56 -0
- package/examples/production-ready/08-email-triage-agent/README.md +33 -0
- package/examples/production-ready/08-email-triage-agent/agent.ossa.yaml +133 -0
- package/examples/production-ready/08-email-triage-agent/openapi.yaml +41 -0
- package/examples/production-ready/09-security-scanner/README.md +49 -0
- package/examples/production-ready/09-security-scanner/agent.ossa.yaml +174 -0
- package/examples/production-ready/09-security-scanner/openapi.yaml +46 -0
- package/examples/production-ready/10-meeting-assistant/README.md +53 -0
- package/examples/production-ready/10-meeting-assistant/agent.ossa.yaml +211 -0
- package/examples/production-ready/10-meeting-assistant/docker-compose.yml +27 -0
- package/examples/production-ready/10-meeting-assistant/openapi.yaml +131 -0
- package/examples/production-ready/COMPLETION_REPORT.txt +272 -0
- package/examples/production-ready/INDEX.md +296 -0
- package/examples/production-ready/README.md +452 -0
- package/examples/production-ready/SUMMARY.md +362 -0
- package/examples/production-ready/TEST_RESULTS.md +458 -0
- package/examples/quickstart/support-agent.ossa.yaml +1 -1
- package/examples/real-world/gitlab-cicd-optimizer.ossa.yaml +1 -1
- package/examples/real-world/rag-documentation-assistant.ossa.yaml +1 -1
- package/examples/registry/agents/code-reviewer/agent.yaml +1 -1
- package/examples/registry/agents/security-scanner/agent.yaml +1 -1
- package/examples/runtime-adapters/bedrock-claude-example.ossa.yaml +1 -1
- package/examples/schema/reusable-components.yaml +1 -1
- package/examples/showcase/ci-pipeline.ossa.yaml +1 -1
- package/examples/showcase/code-assistant.ossa.yaml +1 -1
- package/examples/showcase/code-reviewer.ossa.yaml +1 -1
- package/examples/showcase/compliance-validator.ossa.yaml +1 -1
- package/examples/showcase/content-writer.ossa.yaml +1 -1
- package/examples/showcase/data-transformer.ossa.yaml +1 -1
- package/examples/showcase/doc-generator.ossa.yaml +1 -1
- package/examples/showcase/security-scanner.ossa.yaml +1 -1
- package/examples/showcase/test-generator.ossa.yaml +1 -1
- package/examples/showcase/workflow-orchestrator.ossa.yaml +1 -1
- package/examples/skills-example.ossa.yaml +140 -0
- package/examples/swarm/pso-optimizer.ossa.json +1 -1
- package/examples/tasks/batch-email-sender.yaml +1 -1
- package/examples/tasks/data-transform.yaml +1 -1
- package/examples/tasks/publish-content.yaml +1 -1
- package/examples/templates/ossa-compliance.yaml +1 -1
- package/examples/unified/security-scanner.ossa.yaml +1 -1
- package/examples/v0.3.6-features/genetics-breeding-advanced.ossa.yaml +1 -1
- package/examples/v0.3.6-features/genetics-breeding-simple.ossa.yaml +1 -1
- package/examples/v0.3.6-features/genetics-fitness-scoring.ossa.yaml +1 -1
- package/examples/vercel/edge-agent.ossa.json +1 -1
- package/examples/workflows/batch-email-campaign.yaml +1 -1
- package/examples/workflows/content-review-publish.yaml +1 -1
- package/examples/workflows/simple-etl.yaml +1 -1
- package/openapi/agent-crud.yaml +3 -3
- package/openapi/agent-taxonomy.yaml +323 -0
- package/openapi/{cli-commands.openapi.yaml → cli/openapi.yaml} +221 -5
- package/openapi/{dev-cli.openapi.yml → dev-cli/openapi.yaml} +107 -6
- package/openapi/ossa-cli-enhancements.openapi.yaml +507 -66
- package/openapi/ossa-cli.yaml +688 -0
- package/openapi/schemas/common/agent.yaml +19 -2
- package/openapi/schemas/common/metadata.yaml +9 -0
- package/openapi/version-management.openapi.yaml +754 -0
- package/package.json +41 -49
- package/spec/registry/registry-spec.md +1 -1
- package/spec/v0.3/ossa-0.3.6.schema.json +11035 -13719
- package/spec/v0.4/agent.schema.json +15944 -0
- package/spec/v0.4/extensions/a2a/README.md +193 -0
- package/spec/v0.4/extensions/a2a/a2a.schema.json +77 -0
- package/spec/v0.4/extensions/ag2/ag2.schema.json +277 -0
- package/spec/v0.4/extensions/crewai/crewai.schema.json +256 -0
- package/spec/v0.4/extensions/kagent/README.md +315 -0
- package/spec/v0.4/extensions/kagent/kagent.schema.json +624 -0
- package/spec/v0.4/extensions/langchain/langchain.schema.json +243 -0
- package/spec/v0.4/extensions/langgraph/langgraph.schema.json +211 -0
- package/spec/v0.4/extensions/mcp/README.md +276 -0
- package/spec/v0.4/extensions/mcp/mcp.schema.json +84 -0
- package/.version.json +0 -7
- package/dist/dev-cli/src/commands/env-cleanup.command.d.ts.map +0 -1
- package/dist/dev-cli/src/commands/env-cleanup.command.js.map +0 -1
- package/dist/dev-cli/src/commands/migrate.command.d.ts.map +0 -1
- package/dist/dev-cli/src/commands/migrate.command.js.map +0 -1
- package/dist/dev-cli/src/commands/release-prep.command.d.ts.map +0 -1
- package/dist/dev-cli/src/commands/release-prep.command.js.map +0 -1
- package/dist/dev-cli/src/commands/release.command.d.ts.map +0 -1
- package/dist/dev-cli/src/commands/release.command.js.map +0 -1
- package/dist/dev-cli/src/commands/spec.command.d.ts.map +0 -1
- package/dist/dev-cli/src/commands/spec.command.js.map +0 -1
- package/dist/dev-cli/src/commands/v035.command.d.ts +0 -8
- package/dist/dev-cli/src/commands/v035.command.d.ts.map +0 -1
- package/dist/dev-cli/src/commands/v035.command.js +0 -247
- package/dist/dev-cli/src/commands/v035.command.js.map +0 -1
- package/dist/dev-cli/src/commands/version.command.d.ts.map +0 -1
- package/dist/dev-cli/src/commands/workflow.command.d.ts.map +0 -1
- package/dist/dev-cli/src/commands/workflow.command.js.map +0 -1
- package/dist/dev-cli/src/index.d.ts.map +0 -1
- package/dist/dev-cli/src/index.js.map +0 -1
- package/dist/dev-cli/src/schemas/migrate.schema.d.ts.map +0 -1
- package/dist/dev-cli/src/schemas/migrate.schema.js.map +0 -1
- package/dist/dev-cli/src/schemas/release-prep.schema.d.ts.map +0 -1
- package/dist/dev-cli/src/schemas/release-prep.schema.js.map +0 -1
- package/dist/dev-cli/src/schemas/release.schema.d.ts.map +0 -1
- package/dist/dev-cli/src/schemas/release.schema.js.map +0 -1
- package/dist/dev-cli/src/schemas/spec.schema.d.ts +0 -34
- package/dist/dev-cli/src/schemas/spec.schema.d.ts.map +0 -1
- package/dist/dev-cli/src/schemas/spec.schema.js +0 -32
- package/dist/dev-cli/src/schemas/spec.schema.js.map +0 -1
- package/dist/dev-cli/src/schemas/version.schema.d.ts +0 -53
- package/dist/dev-cli/src/schemas/version.schema.d.ts.map +0 -1
- package/dist/dev-cli/src/schemas/version.schema.js +0 -43
- package/dist/dev-cli/src/schemas/version.schema.js.map +0 -1
- package/dist/dev-cli/src/services/agent-migration.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/agent-migration.service.js.map +0 -1
- package/dist/dev-cli/src/services/file.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/file.service.js.map +0 -1
- package/dist/dev-cli/src/services/git.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/git.service.js.map +0 -1
- package/dist/dev-cli/src/services/npm.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/npm.service.js.map +0 -1
- package/dist/dev-cli/src/services/release-prep.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/release-prep.service.js.map +0 -1
- package/dist/dev-cli/src/services/release-verify.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/release-verify.service.js.map +0 -1
- package/dist/dev-cli/src/services/spec-generate.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/spec-generate.service.js.map +0 -1
- package/dist/dev-cli/src/services/spec-validate.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/spec-validate.service.js.map +0 -1
- package/dist/dev-cli/src/services/version-detection.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/version-detection.service.js.map +0 -1
- package/dist/dev-cli/src/services/version-file.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/version-file.service.js.map +0 -1
- package/dist/dev-cli/src/services/version-release.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/version-release.service.js.map +0 -1
- package/dist/dev-cli/src/services/version-sync.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/version-sync.service.js.map +0 -1
- package/dist/dev-cli/src/services/version-validate.service.d.ts.map +0 -1
- package/dist/dev-cli/src/services/version-validate.service.js.map +0 -1
- package/dist/tools/validation/validate-v0.3.5-features.d.ts +0 -50
- package/dist/tools/validation/validate-v0.3.5-features.d.ts.map +0 -1
- package/dist/tools/validation/validate-v0.3.5-features.js +0 -280
- package/dist/tools/validation/validate-v0.3.5-features.js.map +0 -1
- package/src/dev-cli/README.md +0 -53
- package/src/dev-cli/src/index.ts +0 -47
- /package/dist/dev-cli/{src/commands → commands}/env-cleanup.command.d.ts +0 -0
- /package/dist/dev-cli/{src/commands → commands}/env-cleanup.command.js +0 -0
- /package/dist/dev-cli/{src/commands → commands}/migrate.command.d.ts +0 -0
- /package/dist/dev-cli/{src/commands → commands}/migrate.command.js +0 -0
- /package/dist/dev-cli/{src/commands → commands}/release-prep.command.d.ts +0 -0
- /package/dist/dev-cli/{src/commands → commands}/release-prep.command.js +0 -0
- /package/dist/dev-cli/{src/commands → commands}/release.command.d.ts +0 -0
- /package/dist/dev-cli/{src/commands → commands}/release.command.js +0 -0
- /package/dist/dev-cli/{src/commands → commands}/spec.command.d.ts +0 -0
- /package/dist/dev-cli/{src/commands → commands}/spec.command.js +0 -0
- /package/dist/dev-cli/{src/commands → commands}/version.command.d.ts +0 -0
- /package/dist/dev-cli/{src/commands → commands}/workflow.command.d.ts +0 -0
- /package/dist/dev-cli/{src/commands → commands}/workflow.command.js +0 -0
- /package/dist/dev-cli/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/dev-cli/{src/schemas → schemas}/migrate.schema.d.ts +0 -0
- /package/dist/dev-cli/{src/schemas → schemas}/migrate.schema.js +0 -0
- /package/dist/dev-cli/{src/schemas → schemas}/release-prep.schema.d.ts +0 -0
- /package/dist/dev-cli/{src/schemas → schemas}/release-prep.schema.js +0 -0
- /package/dist/dev-cli/{src/schemas → schemas}/release.schema.d.ts +0 -0
- /package/dist/dev-cli/{src/schemas → schemas}/release.schema.js +0 -0
- /package/dist/dev-cli/{src/services → services}/agent-migration.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/agent-migration.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/file.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/file.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/git.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/git.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/npm.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/npm.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/release-prep.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/release-prep.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/release-verify.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/release-verify.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/spec-generate.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/spec-generate.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/spec-validate.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/spec-validate.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/version-detection.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/version-detection.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/version-file.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/version-file.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/version-release.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/version-release.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/version-sync.service.d.ts +0 -0
- /package/dist/dev-cli/{src/services → services}/version-sync.service.js +0 -0
- /package/dist/dev-cli/{src/services → services}/version-validate.service.d.ts +0 -0
|
@@ -0,0 +1,679 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LangChain Plan-and-Execute Agent Generator (v0.4.1)
|
|
3
|
+
*
|
|
4
|
+
* Generates production-ready Plan-and-Execute agent architecture.
|
|
5
|
+
* Alternative to ReAct agents - separates planning and execution phases.
|
|
6
|
+
*
|
|
7
|
+
* Architecture:
|
|
8
|
+
* - Planner: Creates step-by-step execution plan
|
|
9
|
+
* - Executor: Executes each plan step with tools
|
|
10
|
+
* - Replanner: Adjusts plan based on execution results
|
|
11
|
+
*
|
|
12
|
+
* SOLID: Single Responsibility - Plan-Execute agent generation only
|
|
13
|
+
* DRY: Reusable templates for planner and executor
|
|
14
|
+
*/
|
|
15
|
+
export class PlanExecuteGenerator {
|
|
16
|
+
/**
|
|
17
|
+
* Generate planner_agent.py - Creates execution plans
|
|
18
|
+
*/
|
|
19
|
+
generatePlanner(manifest, config = {}) {
|
|
20
|
+
const agentName = manifest.metadata?.name || 'agent';
|
|
21
|
+
const systemPrompt = manifest.spec?.role || '';
|
|
22
|
+
const maxPlanningIterations = config.maxPlanningIterations || 3;
|
|
23
|
+
const planningPrompt = config.planningPrompt || this.getDefaultPlanningPrompt();
|
|
24
|
+
return `"""
|
|
25
|
+
Planner Agent - Plan Generation
|
|
26
|
+
Generated from OSSA manifest
|
|
27
|
+
|
|
28
|
+
This agent creates step-by-step execution plans for complex tasks.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
from typing import Any, Dict, List, Optional
|
|
32
|
+
from langchain.prompts import ChatPromptTemplate
|
|
33
|
+
from langchain_openai import ChatOpenAI
|
|
34
|
+
from langchain_anthropic import ChatAnthropic
|
|
35
|
+
from pydantic import BaseModel, Field
|
|
36
|
+
import logging
|
|
37
|
+
import os
|
|
38
|
+
|
|
39
|
+
logger = logging.getLogger(__name__)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class Step(BaseModel):
|
|
43
|
+
"""Individual step in execution plan"""
|
|
44
|
+
id: int = Field(..., description="Step number")
|
|
45
|
+
description: str = Field(..., description="What to do in this step")
|
|
46
|
+
tool: Optional[str] = Field(None, description="Tool to use (if applicable)")
|
|
47
|
+
dependencies: List[int] = Field(default_factory=list, description="Step IDs this depends on")
|
|
48
|
+
expected_output: str = Field(..., description="Expected result from this step")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class Plan(BaseModel):
|
|
52
|
+
"""Complete execution plan"""
|
|
53
|
+
goal: str = Field(..., description="Overall goal to achieve")
|
|
54
|
+
steps: List[Step] = Field(..., description="Ordered list of steps")
|
|
55
|
+
reasoning: str = Field(..., description="Why this plan will achieve the goal")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class PlannerAgent:
|
|
59
|
+
"""Agent responsible for creating execution plans"""
|
|
60
|
+
|
|
61
|
+
def __init__(self):
|
|
62
|
+
self.llm = self._create_llm()
|
|
63
|
+
self.max_iterations = ${maxPlanningIterations}
|
|
64
|
+
self.prompt = ChatPromptTemplate.from_messages([
|
|
65
|
+
("system", """${systemPrompt.replace(/"/g, '\\"').replace(/\n/g, '\\n')}
|
|
66
|
+
|
|
67
|
+
${planningPrompt}"""),
|
|
68
|
+
("human", "{input}"),
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
def _create_llm(self):
|
|
72
|
+
"""Initialize LLM for planning"""
|
|
73
|
+
provider = os.getenv("LLM_PROVIDER", "openai")
|
|
74
|
+
model = os.getenv("LLM_MODEL", "gpt-4")
|
|
75
|
+
|
|
76
|
+
if provider == "anthropic":
|
|
77
|
+
return ChatAnthropic(
|
|
78
|
+
model=model,
|
|
79
|
+
temperature=0.0, # Deterministic planning
|
|
80
|
+
api_key=os.getenv("ANTHROPIC_API_KEY"),
|
|
81
|
+
)
|
|
82
|
+
else:
|
|
83
|
+
return ChatOpenAI(
|
|
84
|
+
model=model,
|
|
85
|
+
temperature=0.0, # Deterministic planning
|
|
86
|
+
api_key=os.getenv("OPENAI_API_KEY"),
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
def create_plan(self, goal: str, available_tools: List[str], context: Optional[Dict[str, Any]] = None) -> Plan:
|
|
90
|
+
"""
|
|
91
|
+
Create execution plan for given goal
|
|
92
|
+
|
|
93
|
+
Args:
|
|
94
|
+
goal: The objective to achieve
|
|
95
|
+
available_tools: List of tool names available for execution
|
|
96
|
+
context: Optional context information
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
Structured execution plan
|
|
100
|
+
"""
|
|
101
|
+
try:
|
|
102
|
+
logger.info(f"Creating plan for goal: {goal}")
|
|
103
|
+
|
|
104
|
+
# Prepare context
|
|
105
|
+
tools_str = ", ".join(available_tools) if available_tools else "No tools available"
|
|
106
|
+
context_str = f"\\n\\nContext: {context}" if context else ""
|
|
107
|
+
|
|
108
|
+
# Create planning prompt
|
|
109
|
+
planning_input = f"""Goal: {goal}
|
|
110
|
+
|
|
111
|
+
Available Tools: {tools_str}{context_str}
|
|
112
|
+
|
|
113
|
+
Create a detailed step-by-step plan to achieve this goal. Each step should:
|
|
114
|
+
1. Be concrete and actionable
|
|
115
|
+
2. Specify which tool to use (if applicable)
|
|
116
|
+
3. State dependencies on previous steps
|
|
117
|
+
4. Define expected output
|
|
118
|
+
|
|
119
|
+
Format your response as:
|
|
120
|
+
{{
|
|
121
|
+
"goal": "...",
|
|
122
|
+
"reasoning": "...",
|
|
123
|
+
"steps": [
|
|
124
|
+
{{
|
|
125
|
+
"id": 1,
|
|
126
|
+
"description": "...",
|
|
127
|
+
"tool": "tool_name or null",
|
|
128
|
+
"dependencies": [],
|
|
129
|
+
"expected_output": "..."
|
|
130
|
+
}},
|
|
131
|
+
...
|
|
132
|
+
]
|
|
133
|
+
}}"""
|
|
134
|
+
|
|
135
|
+
# Generate plan
|
|
136
|
+
chain = self.prompt | self.llm
|
|
137
|
+
response = chain.invoke({"input": planning_input})
|
|
138
|
+
|
|
139
|
+
# Parse response into Plan object
|
|
140
|
+
import json
|
|
141
|
+
try:
|
|
142
|
+
plan_dict = json.loads(response.content)
|
|
143
|
+
plan = Plan(**plan_dict)
|
|
144
|
+
except json.JSONDecodeError:
|
|
145
|
+
# Fallback: create simple plan
|
|
146
|
+
logger.warning("Failed to parse structured plan, creating simple plan")
|
|
147
|
+
plan = Plan(
|
|
148
|
+
goal=goal,
|
|
149
|
+
reasoning="Generated fallback plan due to parsing error",
|
|
150
|
+
steps=[
|
|
151
|
+
Step(
|
|
152
|
+
id=1,
|
|
153
|
+
description=f"Execute goal: {goal}",
|
|
154
|
+
tool=available_tools[0] if available_tools else None,
|
|
155
|
+
dependencies=[],
|
|
156
|
+
expected_output=f"Result of {goal}"
|
|
157
|
+
)
|
|
158
|
+
]
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
logger.info(f"Created plan with {len(plan.steps)} steps")
|
|
162
|
+
return plan
|
|
163
|
+
|
|
164
|
+
except Exception as e:
|
|
165
|
+
logger.error(f"Error creating plan: {str(e)}", exc_info=True)
|
|
166
|
+
# Return fallback plan
|
|
167
|
+
return Plan(
|
|
168
|
+
goal=goal,
|
|
169
|
+
reasoning=f"Error in planning: {str(e)}",
|
|
170
|
+
steps=[
|
|
171
|
+
Step(
|
|
172
|
+
id=1,
|
|
173
|
+
description=f"Execute goal: {goal}",
|
|
174
|
+
tool=None,
|
|
175
|
+
dependencies=[],
|
|
176
|
+
expected_output="Error occurred during planning"
|
|
177
|
+
)
|
|
178
|
+
]
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
def replan(
|
|
182
|
+
self,
|
|
183
|
+
original_plan: Plan,
|
|
184
|
+
completed_steps: List[int],
|
|
185
|
+
failed_step: int,
|
|
186
|
+
error: str,
|
|
187
|
+
available_tools: List[str]
|
|
188
|
+
) -> Plan:
|
|
189
|
+
"""
|
|
190
|
+
Create new plan after execution failure
|
|
191
|
+
|
|
192
|
+
Args:
|
|
193
|
+
original_plan: The original execution plan
|
|
194
|
+
completed_steps: Steps that completed successfully
|
|
195
|
+
failed_step: Step ID that failed
|
|
196
|
+
error: Error message from failed step
|
|
197
|
+
available_tools: Available tools
|
|
198
|
+
|
|
199
|
+
Returns:
|
|
200
|
+
Updated execution plan
|
|
201
|
+
"""
|
|
202
|
+
try:
|
|
203
|
+
logger.info(f"Replanning after failure at step {failed_step}")
|
|
204
|
+
|
|
205
|
+
tools_str = ", ".join(available_tools)
|
|
206
|
+
completed_str = ", ".join(map(str, completed_steps))
|
|
207
|
+
|
|
208
|
+
replan_input = f"""Original Goal: {original_plan.goal}
|
|
209
|
+
|
|
210
|
+
Completed Steps: {completed_str}
|
|
211
|
+
Failed Step: {failed_step}
|
|
212
|
+
Error: {error}
|
|
213
|
+
|
|
214
|
+
Available Tools: {tools_str}
|
|
215
|
+
|
|
216
|
+
The execution failed. Create a new plan that:
|
|
217
|
+
1. Accounts for already completed steps
|
|
218
|
+
2. Fixes the issue that caused the failure
|
|
219
|
+
3. Still achieves the original goal
|
|
220
|
+
|
|
221
|
+
Use the same JSON format as before."""
|
|
222
|
+
|
|
223
|
+
chain = self.prompt | self.llm
|
|
224
|
+
response = chain.invoke({"input": replan_input})
|
|
225
|
+
|
|
226
|
+
# Parse response
|
|
227
|
+
import json
|
|
228
|
+
try:
|
|
229
|
+
plan_dict = json.loads(response.content)
|
|
230
|
+
new_plan = Plan(**plan_dict)
|
|
231
|
+
logger.info(f"Created recovery plan with {len(new_plan.steps)} steps")
|
|
232
|
+
return new_plan
|
|
233
|
+
except json.JSONDecodeError:
|
|
234
|
+
logger.warning("Failed to parse recovery plan, returning original")
|
|
235
|
+
return original_plan
|
|
236
|
+
|
|
237
|
+
except Exception as e:
|
|
238
|
+
logger.error(f"Error in replanning: {str(e)}", exc_info=True)
|
|
239
|
+
return original_plan
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
def create_planner() -> PlannerAgent:
|
|
243
|
+
"""Create planner agent instance"""
|
|
244
|
+
return PlannerAgent()
|
|
245
|
+
`;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Generate executor_agent.py - Executes plan steps
|
|
249
|
+
*/
|
|
250
|
+
generateExecutor(manifest, config = {}) {
|
|
251
|
+
const agentName = manifest.metadata?.name || 'agent';
|
|
252
|
+
const systemPrompt = manifest.spec?.role || '';
|
|
253
|
+
const executionPrompt = config.executionPrompt || this.getDefaultExecutionPrompt();
|
|
254
|
+
return `"""
|
|
255
|
+
Executor Agent - Plan Execution
|
|
256
|
+
Generated from OSSA manifest
|
|
257
|
+
|
|
258
|
+
This agent executes individual steps from the plan using available tools.
|
|
259
|
+
"""
|
|
260
|
+
|
|
261
|
+
from typing import Any, Dict, List, Optional
|
|
262
|
+
from langchain.agents import AgentExecutor, create_openai_tools_agent
|
|
263
|
+
from langchain_openai import ChatOpenAI
|
|
264
|
+
from langchain_anthropic import ChatAnthropic
|
|
265
|
+
from langchain.prompts import ChatPromptTemplate, MessagesPlaceholder
|
|
266
|
+
from pydantic import BaseModel, Field
|
|
267
|
+
import logging
|
|
268
|
+
import os
|
|
269
|
+
|
|
270
|
+
logger = logging.getLogger(__name__)
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
class StepResult(BaseModel):
|
|
274
|
+
"""Result from executing a single step"""
|
|
275
|
+
step_id: int = Field(..., description="Step ID that was executed")
|
|
276
|
+
success: bool = Field(..., description="Whether step succeeded")
|
|
277
|
+
output: Any = Field(..., description="Output from step execution")
|
|
278
|
+
error: Optional[str] = Field(None, description="Error message if failed")
|
|
279
|
+
tool_used: Optional[str] = Field(None, description="Tool that was used")
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
class ExecutorAgent:
|
|
283
|
+
"""Agent responsible for executing plan steps"""
|
|
284
|
+
|
|
285
|
+
def __init__(self, tools: List):
|
|
286
|
+
self.tools = tools
|
|
287
|
+
self.llm = self._create_llm()
|
|
288
|
+
self.agent_executor = self._create_executor()
|
|
289
|
+
|
|
290
|
+
def _create_llm(self):
|
|
291
|
+
"""Initialize LLM for execution"""
|
|
292
|
+
provider = os.getenv("LLM_PROVIDER", "openai")
|
|
293
|
+
model = os.getenv("LLM_MODEL", "gpt-4")
|
|
294
|
+
temperature = float(os.getenv("LLM_TEMPERATURE", "0.2"))
|
|
295
|
+
|
|
296
|
+
if provider == "anthropic":
|
|
297
|
+
return ChatAnthropic(
|
|
298
|
+
model=model,
|
|
299
|
+
temperature=temperature,
|
|
300
|
+
api_key=os.getenv("ANTHROPIC_API_KEY"),
|
|
301
|
+
)
|
|
302
|
+
else:
|
|
303
|
+
return ChatOpenAI(
|
|
304
|
+
model=model,
|
|
305
|
+
temperature=temperature,
|
|
306
|
+
api_key=os.getenv("OPENAI_API_KEY"),
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
def _create_executor(self) -> AgentExecutor:
|
|
310
|
+
"""Create agent executor with tools"""
|
|
311
|
+
prompt = ChatPromptTemplate.from_messages([
|
|
312
|
+
("system", """${systemPrompt.replace(/"/g, '\\"').replace(/\n/g, '\\n')}
|
|
313
|
+
|
|
314
|
+
${executionPrompt}"""),
|
|
315
|
+
MessagesPlaceholder(variable_name="chat_history"),
|
|
316
|
+
("human", "{input}"),
|
|
317
|
+
MessagesPlaceholder(variable_name="agent_scratchpad"),
|
|
318
|
+
])
|
|
319
|
+
|
|
320
|
+
agent = create_openai_tools_agent(self.llm, self.tools, prompt)
|
|
321
|
+
|
|
322
|
+
return AgentExecutor(
|
|
323
|
+
agent=agent,
|
|
324
|
+
tools=self.tools,
|
|
325
|
+
verbose=True,
|
|
326
|
+
handle_parsing_errors=True,
|
|
327
|
+
max_iterations=5,
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
def execute_step(
|
|
331
|
+
self,
|
|
332
|
+
step_id: int,
|
|
333
|
+
step_description: str,
|
|
334
|
+
tool_name: Optional[str],
|
|
335
|
+
context: Dict[str, Any]
|
|
336
|
+
) -> StepResult:
|
|
337
|
+
"""
|
|
338
|
+
Execute a single step from the plan
|
|
339
|
+
|
|
340
|
+
Args:
|
|
341
|
+
step_id: Step identifier
|
|
342
|
+
step_description: What to do in this step
|
|
343
|
+
tool_name: Tool to use (if specified)
|
|
344
|
+
context: Context from previous steps
|
|
345
|
+
|
|
346
|
+
Returns:
|
|
347
|
+
Result of step execution
|
|
348
|
+
"""
|
|
349
|
+
try:
|
|
350
|
+
logger.info(f"Executing step {step_id}: {step_description}")
|
|
351
|
+
|
|
352
|
+
# Build execution prompt
|
|
353
|
+
context_str = "\\n".join([f"{k}: {v}" for k, v in context.items()])
|
|
354
|
+
tool_hint = f"\\nUse the '{tool_name}' tool." if tool_name else ""
|
|
355
|
+
|
|
356
|
+
execution_input = f"""Execute this step:
|
|
357
|
+
{step_description}{tool_hint}
|
|
358
|
+
|
|
359
|
+
Context from previous steps:
|
|
360
|
+
{context_str}
|
|
361
|
+
|
|
362
|
+
Provide the result of this step."""
|
|
363
|
+
|
|
364
|
+
# Execute
|
|
365
|
+
response = self.agent_executor.invoke({
|
|
366
|
+
"input": execution_input,
|
|
367
|
+
"chat_history": []
|
|
368
|
+
})
|
|
369
|
+
|
|
370
|
+
result = StepResult(
|
|
371
|
+
step_id=step_id,
|
|
372
|
+
success=True,
|
|
373
|
+
output=response.get("output", "No output"),
|
|
374
|
+
tool_used=tool_name
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
logger.info(f"Step {step_id} completed successfully")
|
|
378
|
+
return result
|
|
379
|
+
|
|
380
|
+
except Exception as e:
|
|
381
|
+
logger.error(f"Error executing step {step_id}: {str(e)}", exc_info=True)
|
|
382
|
+
return StepResult(
|
|
383
|
+
step_id=step_id,
|
|
384
|
+
success=False,
|
|
385
|
+
output=None,
|
|
386
|
+
error=str(e),
|
|
387
|
+
tool_used=tool_name
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
def create_executor(tools: List) -> ExecutorAgent:
|
|
392
|
+
"""Create executor agent instance"""
|
|
393
|
+
return ExecutorAgent(tools)
|
|
394
|
+
`;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Generate plan_execute.py - Main coordinator
|
|
398
|
+
*/
|
|
399
|
+
generatePlanExecute(manifest, config = {}) {
|
|
400
|
+
const agentName = manifest.metadata?.name || 'agent';
|
|
401
|
+
const maxExecutionSteps = config.maxExecutionSteps || 10;
|
|
402
|
+
const enableReplanning = config.enableReplanning !== false;
|
|
403
|
+
return `"""
|
|
404
|
+
Plan-and-Execute Agent (${agentName})
|
|
405
|
+
Generated from OSSA manifest
|
|
406
|
+
|
|
407
|
+
This agent uses a two-phase approach:
|
|
408
|
+
1. Planning: Create step-by-step execution plan
|
|
409
|
+
2. Execution: Execute each step with tools
|
|
410
|
+
|
|
411
|
+
Supports replanning after failures for robust execution.
|
|
412
|
+
"""
|
|
413
|
+
|
|
414
|
+
from typing import Any, Dict, List, Optional
|
|
415
|
+
from planner_agent import create_planner, Plan, Step
|
|
416
|
+
from executor_agent import create_executor, StepResult
|
|
417
|
+
from tools import get_tools
|
|
418
|
+
from memory import get_memory
|
|
419
|
+
from callbacks import get_callbacks, get_cost_tracker, print_cost_summary
|
|
420
|
+
from error_handling import safe_agent_invoke, get_error_stats
|
|
421
|
+
import logging
|
|
422
|
+
import os
|
|
423
|
+
|
|
424
|
+
logger = logging.getLogger(__name__)
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
class PlanExecuteAgent:
|
|
428
|
+
"""Plan-and-Execute agent coordinator"""
|
|
429
|
+
|
|
430
|
+
def __init__(self):
|
|
431
|
+
self.tools = get_tools()
|
|
432
|
+
self.planner = create_planner()
|
|
433
|
+
self.executor = create_executor(self.tools)
|
|
434
|
+
self.memory = get_memory()
|
|
435
|
+
self.callbacks = get_callbacks()
|
|
436
|
+
self.max_execution_steps = ${maxExecutionSteps}
|
|
437
|
+
self.enable_replanning = ${enableReplanning ? 'True' : 'False'}
|
|
438
|
+
|
|
439
|
+
def run(self, goal: str, context: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
|
|
440
|
+
"""
|
|
441
|
+
Execute goal using plan-and-execute architecture
|
|
442
|
+
|
|
443
|
+
Args:
|
|
444
|
+
goal: The objective to achieve
|
|
445
|
+
context: Optional context information
|
|
446
|
+
|
|
447
|
+
Returns:
|
|
448
|
+
Execution results with plan and step outputs
|
|
449
|
+
"""
|
|
450
|
+
try:
|
|
451
|
+
logger.info(f"Starting plan-and-execute for goal: {goal}")
|
|
452
|
+
|
|
453
|
+
# Phase 1: Planning
|
|
454
|
+
tool_names = [tool.name for tool in self.tools]
|
|
455
|
+
plan = self.planner.create_plan(goal, tool_names, context)
|
|
456
|
+
|
|
457
|
+
logger.info(f"Created plan with {len(plan.steps)} steps")
|
|
458
|
+
logger.debug(f"Plan reasoning: {plan.reasoning}")
|
|
459
|
+
|
|
460
|
+
# Phase 2: Execution
|
|
461
|
+
results = self._execute_plan(plan)
|
|
462
|
+
|
|
463
|
+
# Prepare response
|
|
464
|
+
success = all(r.success for r in results)
|
|
465
|
+
final_output = self._synthesize_output(plan, results)
|
|
466
|
+
|
|
467
|
+
# Add cost tracking
|
|
468
|
+
cost_tracker = get_cost_tracker()
|
|
469
|
+
cost_summary = cost_tracker.get_summary()
|
|
470
|
+
|
|
471
|
+
response = {
|
|
472
|
+
"success": success,
|
|
473
|
+
"goal": goal,
|
|
474
|
+
"plan": {
|
|
475
|
+
"reasoning": plan.reasoning,
|
|
476
|
+
"steps": [
|
|
477
|
+
{
|
|
478
|
+
"id": step.id,
|
|
479
|
+
"description": step.description,
|
|
480
|
+
"tool": step.tool,
|
|
481
|
+
}
|
|
482
|
+
for step in plan.steps
|
|
483
|
+
],
|
|
484
|
+
},
|
|
485
|
+
"execution": [
|
|
486
|
+
{
|
|
487
|
+
"step_id": r.step_id,
|
|
488
|
+
"success": r.success,
|
|
489
|
+
"output": r.output,
|
|
490
|
+
"error": r.error,
|
|
491
|
+
"tool_used": r.tool_used,
|
|
492
|
+
}
|
|
493
|
+
for r in results
|
|
494
|
+
],
|
|
495
|
+
"output": final_output,
|
|
496
|
+
"cost": cost_summary,
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
logger.info(f"Plan-and-execute completed: {success}")
|
|
500
|
+
return response
|
|
501
|
+
|
|
502
|
+
except Exception as e:
|
|
503
|
+
logger.error(f"Error in plan-and-execute: {str(e)}", exc_info=True)
|
|
504
|
+
return {
|
|
505
|
+
"success": False,
|
|
506
|
+
"goal": goal,
|
|
507
|
+
"error": str(e),
|
|
508
|
+
"error_type": type(e).__name__,
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
def _execute_plan(self, plan: Plan) -> List[StepResult]:
|
|
512
|
+
"""
|
|
513
|
+
Execute all steps in plan
|
|
514
|
+
|
|
515
|
+
Args:
|
|
516
|
+
plan: Execution plan
|
|
517
|
+
|
|
518
|
+
Returns:
|
|
519
|
+
List of step results
|
|
520
|
+
"""
|
|
521
|
+
results: List[StepResult] = []
|
|
522
|
+
context: Dict[str, Any] = {}
|
|
523
|
+
completed_steps: List[int] = []
|
|
524
|
+
|
|
525
|
+
for step in plan.steps[:self.max_execution_steps]:
|
|
526
|
+
# Check dependencies
|
|
527
|
+
if not self._dependencies_met(step, completed_steps):
|
|
528
|
+
logger.warning(f"Step {step.id} dependencies not met, skipping")
|
|
529
|
+
results.append(StepResult(
|
|
530
|
+
step_id=step.id,
|
|
531
|
+
success=False,
|
|
532
|
+
output=None,
|
|
533
|
+
error="Dependencies not met"
|
|
534
|
+
))
|
|
535
|
+
continue
|
|
536
|
+
|
|
537
|
+
# Execute step
|
|
538
|
+
result = self.executor.execute_step(
|
|
539
|
+
step_id=step.id,
|
|
540
|
+
step_description=step.description,
|
|
541
|
+
tool_name=step.tool,
|
|
542
|
+
context=context
|
|
543
|
+
)
|
|
544
|
+
|
|
545
|
+
results.append(result)
|
|
546
|
+
|
|
547
|
+
if result.success:
|
|
548
|
+
# Update context with result
|
|
549
|
+
context[f"step_{step.id}"] = result.output
|
|
550
|
+
completed_steps.append(step.id)
|
|
551
|
+
else:
|
|
552
|
+
# Handle failure
|
|
553
|
+
if self.enable_replanning:
|
|
554
|
+
logger.info(f"Replanning due to failure at step {step.id}")
|
|
555
|
+
new_plan = self.planner.replan(
|
|
556
|
+
original_plan=plan,
|
|
557
|
+
completed_steps=completed_steps,
|
|
558
|
+
failed_step=step.id,
|
|
559
|
+
error=result.error or "Unknown error",
|
|
560
|
+
available_tools=[tool.name for tool in self.tools]
|
|
561
|
+
)
|
|
562
|
+
# Continue with new plan
|
|
563
|
+
remaining_results = self._execute_plan(new_plan)
|
|
564
|
+
results.extend(remaining_results)
|
|
565
|
+
break
|
|
566
|
+
else:
|
|
567
|
+
logger.warning(f"Step {step.id} failed, continuing without replanning")
|
|
568
|
+
|
|
569
|
+
return results
|
|
570
|
+
|
|
571
|
+
def _dependencies_met(self, step: Step, completed_steps: List[int]) -> bool:
|
|
572
|
+
"""Check if step dependencies are satisfied"""
|
|
573
|
+
return all(dep in completed_steps for dep in step.dependencies)
|
|
574
|
+
|
|
575
|
+
def _synthesize_output(self, plan: Plan, results: List[StepResult]) -> str:
|
|
576
|
+
"""
|
|
577
|
+
Synthesize final output from all step results
|
|
578
|
+
|
|
579
|
+
Args:
|
|
580
|
+
plan: Original plan
|
|
581
|
+
results: Step execution results
|
|
582
|
+
|
|
583
|
+
Returns:
|
|
584
|
+
Human-readable summary
|
|
585
|
+
"""
|
|
586
|
+
successful_steps = [r for r in results if r.success]
|
|
587
|
+
failed_steps = [r for r in results if not r.success]
|
|
588
|
+
|
|
589
|
+
if not successful_steps:
|
|
590
|
+
return f"Failed to complete goal: {plan.goal}. All steps failed."
|
|
591
|
+
|
|
592
|
+
if failed_steps:
|
|
593
|
+
summary = f"Partially completed goal: {plan.goal}\\n\\n"
|
|
594
|
+
summary += f"Completed {len(successful_steps)}/{len(results)} steps.\\n\\n"
|
|
595
|
+
else:
|
|
596
|
+
summary = f"Successfully completed goal: {plan.goal}\\n\\n"
|
|
597
|
+
|
|
598
|
+
summary += "Results:\\n"
|
|
599
|
+
for result in successful_steps:
|
|
600
|
+
summary += f"- Step {result.step_id}: {result.output}\\n"
|
|
601
|
+
|
|
602
|
+
if failed_steps:
|
|
603
|
+
summary += "\\nFailed steps:\\n"
|
|
604
|
+
for result in failed_steps:
|
|
605
|
+
summary += f"- Step {result.step_id}: {result.error}\\n"
|
|
606
|
+
|
|
607
|
+
return summary
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
# Create global agent instance
|
|
611
|
+
agent = PlanExecuteAgent()
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
def run(goal: str, context: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
|
|
615
|
+
"""
|
|
616
|
+
Run plan-and-execute agent
|
|
617
|
+
|
|
618
|
+
Args:
|
|
619
|
+
goal: The objective to achieve
|
|
620
|
+
context: Optional context information
|
|
621
|
+
|
|
622
|
+
Returns:
|
|
623
|
+
Execution results
|
|
624
|
+
"""
|
|
625
|
+
return agent.run(goal, context)
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
if __name__ == "__main__":
|
|
629
|
+
# Example usage
|
|
630
|
+
print(f"Starting ${agentName} (Plan-and-Execute)...")
|
|
631
|
+
|
|
632
|
+
response = run("Research and write a blog post about AI trends in 2024")
|
|
633
|
+
print(f"Success: {response['success']}")
|
|
634
|
+
print(f"Output: {response['output']}")
|
|
635
|
+
|
|
636
|
+
if 'plan' in response:
|
|
637
|
+
print(f"\\nPlan:")
|
|
638
|
+
for step in response['plan']['steps']:
|
|
639
|
+
print(f" {step['id']}. {step['description']}")
|
|
640
|
+
`;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Get default planning prompt
|
|
644
|
+
*/
|
|
645
|
+
getDefaultPlanningPrompt() {
|
|
646
|
+
return `You are an expert planner. Your role is to break down complex goals into step-by-step execution plans.
|
|
647
|
+
|
|
648
|
+
For each step:
|
|
649
|
+
- Be specific and actionable
|
|
650
|
+
- Identify which tool to use (if applicable)
|
|
651
|
+
- Note dependencies on previous steps
|
|
652
|
+
- State expected output
|
|
653
|
+
|
|
654
|
+
Create plans that are:
|
|
655
|
+
- Logical and sequential
|
|
656
|
+
- Achievable with available tools
|
|
657
|
+
- Robust to failures (include verification steps)
|
|
658
|
+
- Efficient (minimize unnecessary steps)`;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Get default execution prompt
|
|
662
|
+
*/
|
|
663
|
+
getDefaultExecutionPrompt() {
|
|
664
|
+
return `You are a precise executor. Your role is to execute individual steps from a plan.
|
|
665
|
+
|
|
666
|
+
For each step:
|
|
667
|
+
- Follow the instructions exactly
|
|
668
|
+
- Use the specified tool if indicated
|
|
669
|
+
- Use context from previous steps
|
|
670
|
+
- Provide clear output
|
|
671
|
+
|
|
672
|
+
Execute steps:
|
|
673
|
+
- Carefully and accurately
|
|
674
|
+
- With proper error handling
|
|
675
|
+
- Using available context
|
|
676
|
+
- Producing useful output for subsequent steps`;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
//# sourceMappingURL=plan-execute-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-execute-generator.js","sourceRoot":"","sources":["../../../../src/services/export/langchain/plan-execute-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA+BH,MAAM,OAAO,oBAAoB;IAC/B;;OAEG;IACH,eAAe,CAAC,QAAmB,EAAE,SAA4B,EAAE;QACjE,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ,EAAE,IAAI,IAAI,OAAO,CAAC;QACrD,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;QAC/C,MAAM,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,IAAI,CAAC,CAAC;QAChE,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAEhF,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAuCqB,qBAAqB;;4BAEzB,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;;EAEjF,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkLf,CAAC;IACA,CAAC;IAED;;OAEG;IACH,gBAAgB,CAAC,QAAmB,EAAE,SAA4B,EAAE;QAClE,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ,EAAE,IAAI,IAAI,OAAO,CAAC;QACrD,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;QAC/C,MAAM,eAAe,GAAG,MAAM,CAAC,eAAe,IAAI,IAAI,CAAC,yBAAyB,EAAE,CAAC;QAEnF,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA0DiB,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;;EAEjF,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFhB,CAAC;IACA,CAAC;IAED;;OAEG;IACH,mBAAmB,CAAC,QAAmB,EAAE,SAA4B,EAAE;QACrE,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ,EAAE,IAAI,IAAI,OAAO,CAAC;QACrD,MAAM,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,IAAI,EAAE,CAAC;QACzD,MAAM,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,KAAK,KAAK,CAAC;QAE3D,OAAO;0BACe,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAgCE,iBAAiB;mCACnB,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAiM/C,SAAS;;;;;;;;;;CAU/B,CAAC;IACA,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,OAAO;;;;;;;;;;;;yCAY8B,CAAC;IACxC,CAAC;IAED;;OAEG;IACK,yBAAyB;QAC/B,OAAO;;;;;;;;;;;;+CAYoC,CAAC;IAC9C,CAAC;CACF"}
|