@bluefly/openstandardagents 0.4.0 → 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 +117 -0
- package/DEMO.md +212 -0
- package/README.md +75 -15
- 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/npm/adapter.js +2 -2
- package/dist/adapters/npm/converter.js +3 -3
- 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/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-v2.command.js → export-enhanced.command.js} +3 -3
- package/dist/cli/commands/export-enhanced.command.js.map +1 -0
- package/dist/cli/commands/export.command.d.ts.map +1 -1
- package/dist/cli/commands/export.command.js +82 -4
- package/dist/cli/commands/export.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/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/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/workspace.command.js +1 -1
- package/dist/cli/commands/workspace.command.js.map +1 -1
- package/dist/cli/index.js +9 -0
- 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/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/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/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/di-container.d.ts.map +1 -1
- package/dist/di-container.js +2 -0
- package/dist/di-container.js.map +1 -1
- package/dist/package.json +19 -9
- 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/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/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/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/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/types/personality.zod.d.ts +23 -23
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/dist/version-management/core/version-manager.test.js.map +1 -1
- 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/cli/openapi.yaml +221 -5
- package/package.json +17 -7
- package/dist/cli/commands/export-v2.command.d.ts +0 -7
- package/dist/cli/commands/export-v2.command.d.ts.map +0 -1
- package/dist/cli/commands/export-v2.command.js.map +0 -1
|
@@ -0,0 +1,854 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OSSA Wizard - API-FIRST EDITION
|
|
3
|
+
*
|
|
4
|
+
* Schema-driven wizard that validates everything against OpenAPI specs.
|
|
5
|
+
* TRUE API-FIRST APPROACH - Schema is the single source of truth.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* ✓ All prompts generated from schema
|
|
9
|
+
* ✓ All inputs validated against schema
|
|
10
|
+
* ✓ Type-safe with auto-complete
|
|
11
|
+
* ✓ Enum values loaded from schema
|
|
12
|
+
* ✓ Patterns and constraints from schema
|
|
13
|
+
* ✓ Real-time validation as you go
|
|
14
|
+
* ✓ Beautiful error messages
|
|
15
|
+
*/
|
|
16
|
+
import { Command } from 'commander';
|
|
17
|
+
import chalk from 'chalk';
|
|
18
|
+
import * as fs from 'fs';
|
|
19
|
+
import * as path from 'path';
|
|
20
|
+
import * as yaml from 'yaml';
|
|
21
|
+
import { initializeAPIsFirst, inquirer, } from '../schema-driven/index.js';
|
|
22
|
+
import { printBanner, printWizardBanner, printCompletion, printProgress, printStep, printSuccess, printInfo, printWarning, printError, } from '../banner.js';
|
|
23
|
+
// Initialize API-First infrastructure
|
|
24
|
+
const apiFirst = initializeAPIsFirst();
|
|
25
|
+
class APIFirstWizard {
|
|
26
|
+
schema;
|
|
27
|
+
ui;
|
|
28
|
+
agent;
|
|
29
|
+
currentStep = 0;
|
|
30
|
+
totalSteps = 12;
|
|
31
|
+
constructor() {
|
|
32
|
+
this.schema = apiFirst.schema;
|
|
33
|
+
this.ui = apiFirst.ui;
|
|
34
|
+
this.agent = {
|
|
35
|
+
apiVersion: 'ossa/v0.4',
|
|
36
|
+
kind: 'Agent',
|
|
37
|
+
metadata: {
|
|
38
|
+
name: '',
|
|
39
|
+
},
|
|
40
|
+
spec: {
|
|
41
|
+
role: '',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
async run(options) {
|
|
46
|
+
try {
|
|
47
|
+
printBanner();
|
|
48
|
+
printWizardBanner();
|
|
49
|
+
printInfo('🎯 API-FIRST MODE: All inputs validated against OpenAPI schema');
|
|
50
|
+
console.log('');
|
|
51
|
+
// Step 1: Kind Selection (Agent, Task, Workflow, Flow)
|
|
52
|
+
await this.selectKind();
|
|
53
|
+
// Step 2: Basic Metadata (validated against schema)
|
|
54
|
+
await this.configureMetadata();
|
|
55
|
+
// Step 3: LLM Configuration (schema-driven)
|
|
56
|
+
await this.configureLLM();
|
|
57
|
+
// Step 4: Tools (schema-validated types)
|
|
58
|
+
await this.configureTools();
|
|
59
|
+
// Step 5: Extensions (all 22+ frameworks from schema)
|
|
60
|
+
await this.configureExtensions();
|
|
61
|
+
// Step 6: Features (conditional based on selections)
|
|
62
|
+
await this.configureFeatures();
|
|
63
|
+
// Step 7: Safety & Constraints (schema-validated)
|
|
64
|
+
await this.configureSafety();
|
|
65
|
+
// Step 8: Observability (schema-validated)
|
|
66
|
+
await this.configureObservability();
|
|
67
|
+
// Step 9: Final Validation
|
|
68
|
+
await this.validateManifest();
|
|
69
|
+
// Step 10: Export Configuration
|
|
70
|
+
await this.configureExportTargets();
|
|
71
|
+
// Step 11: Testing & Validation Configuration
|
|
72
|
+
await this.configureTestingValidation();
|
|
73
|
+
// Step 12: Output Generation
|
|
74
|
+
await this.generateOutput(options);
|
|
75
|
+
printCompletion();
|
|
76
|
+
this.printNextSteps();
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
printError(error instanceof Error ? error.message : String(error));
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
nextStep(stepName) {
|
|
84
|
+
this.currentStep++;
|
|
85
|
+
printProgress(this.currentStep, this.totalSteps, stepName);
|
|
86
|
+
}
|
|
87
|
+
async selectKind() {
|
|
88
|
+
this.nextStep('Select Resource Kind');
|
|
89
|
+
printStep(1, this.totalSteps, 'Select Resource Kind', 'Choose between Agent, Task, Workflow, or Flow');
|
|
90
|
+
// Get kind enum from schema
|
|
91
|
+
const kindDef = this.schema.getDefinition('kind');
|
|
92
|
+
const kindOptions = kindDef?.enum || ['Agent', 'Task', 'Workflow', 'Flow'];
|
|
93
|
+
const answers = await apiFirst.ui.generatePrompt('kind', 'kind');
|
|
94
|
+
if (answers) {
|
|
95
|
+
const result = await inquirer.prompt([answers]);
|
|
96
|
+
this.agent.kind = result.kind;
|
|
97
|
+
printSuccess(`Selected: ${this.agent.kind}`);
|
|
98
|
+
// Show description of selected kind
|
|
99
|
+
const descriptions = {
|
|
100
|
+
Agent: 'Agentic loops - autonomous decision-making with tools',
|
|
101
|
+
Task: 'Deterministic steps - predefined workflow execution',
|
|
102
|
+
Workflow: 'Composition - orchestrate multiple agents/tasks',
|
|
103
|
+
Flow: 'Visual flow - state machine with transitions',
|
|
104
|
+
};
|
|
105
|
+
if (descriptions[this.agent.kind || '']) {
|
|
106
|
+
printInfo(descriptions[this.agent.kind || '']);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
async configureMetadata() {
|
|
111
|
+
this.nextStep('Basic Metadata');
|
|
112
|
+
printStep(2, this.totalSteps, 'Basic Metadata', 'Schema-validated agent information');
|
|
113
|
+
// Generate all metadata prompts from schema
|
|
114
|
+
const metadata = await this.ui.generateForObject('metadata');
|
|
115
|
+
this.agent.metadata = {
|
|
116
|
+
...metadata,
|
|
117
|
+
labels: {
|
|
118
|
+
'ossa.io/created-by': 'wizard-api-first',
|
|
119
|
+
'ossa.io/schema-validated': 'true',
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
printSuccess('Metadata configured and validated against schema');
|
|
123
|
+
}
|
|
124
|
+
async configureLLM() {
|
|
125
|
+
this.nextStep('LLM Configuration');
|
|
126
|
+
printStep(3, this.totalSteps, 'LLM Configuration', 'Schema-driven LLM setup with all providers from spec');
|
|
127
|
+
printInfo('All LLM providers loaded from OpenAPI schema');
|
|
128
|
+
// Use schema-driven LLM configuration
|
|
129
|
+
const llmConfig = await this.ui.generateLLMConfig();
|
|
130
|
+
this.agent.spec = {
|
|
131
|
+
...this.agent.spec,
|
|
132
|
+
llm: llmConfig,
|
|
133
|
+
};
|
|
134
|
+
printSuccess('LLM configuration complete and schema-validated');
|
|
135
|
+
// Validate immediately
|
|
136
|
+
const validation = this.schema.validate(this.agent);
|
|
137
|
+
if (!validation.valid) {
|
|
138
|
+
printWarning('Validation warnings detected - will fix at final validation');
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
async configureTools() {
|
|
142
|
+
this.nextStep('Tools & Capabilities');
|
|
143
|
+
printStep(4, this.totalSteps, 'Tools & Capabilities', 'All tool types from schema with validation');
|
|
144
|
+
printInfo(`Available tool types: ${this.schema.getToolTypes().length}`);
|
|
145
|
+
// Use schema-driven tool configuration
|
|
146
|
+
const tools = await this.ui.generateToolConfig();
|
|
147
|
+
if (tools.length > 0) {
|
|
148
|
+
this.agent.spec = {
|
|
149
|
+
...this.agent.spec,
|
|
150
|
+
tools,
|
|
151
|
+
};
|
|
152
|
+
printSuccess(`${tools.length} tools configured and validated`);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
async configureExtensions() {
|
|
156
|
+
this.nextStep('Framework Extensions');
|
|
157
|
+
printStep(5, this.totalSteps, 'Framework Extensions', 'All 22+ frameworks loaded from schema');
|
|
158
|
+
const availableExtensions = this.ui.getAvailableExtensions();
|
|
159
|
+
printInfo(`${availableExtensions.length} framework integrations available`);
|
|
160
|
+
const answers = await inquirer.prompt([
|
|
161
|
+
{
|
|
162
|
+
type: 'checkbox',
|
|
163
|
+
name: 'extensions',
|
|
164
|
+
message: 'Select framework integrations:',
|
|
165
|
+
choices: availableExtensions.map((ext) => ({
|
|
166
|
+
name: this.formatExtensionName(ext),
|
|
167
|
+
value: ext,
|
|
168
|
+
checked: false,
|
|
169
|
+
})),
|
|
170
|
+
pageSize: 15,
|
|
171
|
+
},
|
|
172
|
+
]);
|
|
173
|
+
if (answers.extensions.length > 0) {
|
|
174
|
+
this.agent.extensions = {};
|
|
175
|
+
for (const ext of answers.extensions) {
|
|
176
|
+
// For now, enable with basic config
|
|
177
|
+
// Could prompt for extension-specific config here
|
|
178
|
+
this.agent.extensions[ext] = { enabled: true };
|
|
179
|
+
printSuccess(`Enabled: ${this.formatExtensionName(ext)}`);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
formatExtensionName(ext) {
|
|
184
|
+
const names = {
|
|
185
|
+
mcp: 'MCP - Model Context Protocol',
|
|
186
|
+
skills: 'Skills - Claude/Cursor/Kiro format',
|
|
187
|
+
langchain: 'LangChain',
|
|
188
|
+
langgraph: 'LangGraph',
|
|
189
|
+
crewai: 'CrewAI',
|
|
190
|
+
autogen: 'AutoGen (Microsoft)',
|
|
191
|
+
openai_assistants: 'OpenAI Assistants',
|
|
192
|
+
openai_swarm: 'OpenAI Swarm',
|
|
193
|
+
vercel_ai: 'Vercel AI SDK',
|
|
194
|
+
llamaindex: 'LlamaIndex',
|
|
195
|
+
dify: 'Dify',
|
|
196
|
+
bedrock: 'AWS Bedrock Agents',
|
|
197
|
+
semanticKernel: 'Semantic Kernel',
|
|
198
|
+
vertexai: 'Google Vertex AI',
|
|
199
|
+
haystack: 'Haystack',
|
|
200
|
+
pydantic_ai: 'Pydantic AI',
|
|
201
|
+
langflow: 'LangFlow',
|
|
202
|
+
agents_md: 'AGENTS.md generation',
|
|
203
|
+
llms_txt: 'llms.txt generation',
|
|
204
|
+
};
|
|
205
|
+
return names[ext] || ext;
|
|
206
|
+
}
|
|
207
|
+
async configureFeatures() {
|
|
208
|
+
this.nextStep('Advanced Features');
|
|
209
|
+
printStep(6, this.totalSteps, 'Advanced Features', 'Schema-validated advanced capabilities');
|
|
210
|
+
const answers = await inquirer.prompt([
|
|
211
|
+
{
|
|
212
|
+
type: 'checkbox',
|
|
213
|
+
name: 'features',
|
|
214
|
+
message: 'Select advanced features:',
|
|
215
|
+
choices: [
|
|
216
|
+
{ name: '🎯 Skills System', value: 'skills' },
|
|
217
|
+
{ name: '🧠 Knowledge Sources (RAG)', value: 'knowledge_sources' },
|
|
218
|
+
{ name: '📡 Messaging (A2A)', value: 'messaging' },
|
|
219
|
+
{ name: '💾 State Management', value: 'state' },
|
|
220
|
+
{ name: '💰 Cost Tracking', value: 'cost_tracking' },
|
|
221
|
+
{ name: '🔐 Safety Controls', value: 'safety' },
|
|
222
|
+
{ name: '🎯 Autonomy Configuration', value: 'autonomy' },
|
|
223
|
+
],
|
|
224
|
+
},
|
|
225
|
+
]);
|
|
226
|
+
// Configure each selected feature using schema
|
|
227
|
+
for (const feature of answers.features) {
|
|
228
|
+
if (feature === 'skills') {
|
|
229
|
+
await this.configureSkills();
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
await this.configureFeature(feature);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
async configureFeature(feature) {
|
|
237
|
+
printInfo(`Configuring: ${feature}`);
|
|
238
|
+
// Generate prompts from schema for this feature
|
|
239
|
+
const featurePath = `spec.${feature}`;
|
|
240
|
+
const featureConfig = await this.ui.generateForObject(featurePath);
|
|
241
|
+
if (Object.keys(featureConfig).length > 0) {
|
|
242
|
+
this.agent.spec = {
|
|
243
|
+
...this.agent.spec,
|
|
244
|
+
[feature]: featureConfig,
|
|
245
|
+
};
|
|
246
|
+
printSuccess(`${feature} configured`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
async configureSkills() {
|
|
250
|
+
printInfo('Configuring: skills');
|
|
251
|
+
const { addSkills } = await inquirer.prompt([
|
|
252
|
+
{
|
|
253
|
+
type: 'confirm',
|
|
254
|
+
name: 'addSkills',
|
|
255
|
+
message: 'Would you like to add Claude Skills to this agent?',
|
|
256
|
+
default: true,
|
|
257
|
+
},
|
|
258
|
+
]);
|
|
259
|
+
if (!addSkills) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
const skills = [];
|
|
263
|
+
let addingSkills = true;
|
|
264
|
+
while (addingSkills) {
|
|
265
|
+
console.log('');
|
|
266
|
+
printInfo(`Adding skill ${skills.length + 1}`);
|
|
267
|
+
const skillAnswers = await inquirer.prompt([
|
|
268
|
+
{
|
|
269
|
+
type: 'input',
|
|
270
|
+
name: 'id',
|
|
271
|
+
message: 'Skill ID (identifier):',
|
|
272
|
+
validate: (input) => {
|
|
273
|
+
const valid = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/.test(input);
|
|
274
|
+
return (valid ||
|
|
275
|
+
'Must be lowercase alphanumeric with hyphens (e.g., research-skill)');
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
type: 'input',
|
|
280
|
+
name: 'name',
|
|
281
|
+
message: 'Skill name (display name):',
|
|
282
|
+
default: (answers) => answers.id
|
|
283
|
+
.split('-')
|
|
284
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
285
|
+
.join(' '),
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
type: 'input',
|
|
289
|
+
name: 'description',
|
|
290
|
+
message: 'Skill description:',
|
|
291
|
+
validate: (input) => {
|
|
292
|
+
return (input.length >= 10 ||
|
|
293
|
+
'Description must be at least 10 characters');
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
type: 'editor',
|
|
298
|
+
name: 'instructions',
|
|
299
|
+
message: 'Skill instructions (detailed prompt):',
|
|
300
|
+
default: 'You are a skilled assistant. When invoked, you should...\n\nCapabilities:\n- \n\nGuidelines:\n- ',
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
type: 'list',
|
|
304
|
+
name: 'type',
|
|
305
|
+
message: 'Skill type:',
|
|
306
|
+
choices: [
|
|
307
|
+
{ name: 'Task - Execute specific actions', value: 'task' },
|
|
308
|
+
{ name: 'Query - Retrieve information', value: 'query' },
|
|
309
|
+
{ name: 'Creative - Generate content', value: 'creative' },
|
|
310
|
+
{ name: 'Analysis - Analyze data', value: 'analysis' },
|
|
311
|
+
{ name: 'Other', value: 'other' },
|
|
312
|
+
],
|
|
313
|
+
default: 'task',
|
|
314
|
+
},
|
|
315
|
+
]);
|
|
316
|
+
// Ask for parameters
|
|
317
|
+
const { addParams } = await inquirer.prompt([
|
|
318
|
+
{
|
|
319
|
+
type: 'confirm',
|
|
320
|
+
name: 'addParams',
|
|
321
|
+
message: 'Add parameters to this skill?',
|
|
322
|
+
default: false,
|
|
323
|
+
},
|
|
324
|
+
]);
|
|
325
|
+
const parameters = {};
|
|
326
|
+
if (addParams) {
|
|
327
|
+
let addingParams = true;
|
|
328
|
+
while (addingParams) {
|
|
329
|
+
const paramAnswers = await inquirer.prompt([
|
|
330
|
+
{
|
|
331
|
+
type: 'input',
|
|
332
|
+
name: 'paramName',
|
|
333
|
+
message: 'Parameter name:',
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
type: 'list',
|
|
337
|
+
name: 'paramType',
|
|
338
|
+
message: 'Parameter type:',
|
|
339
|
+
choices: ['string', 'number', 'boolean', 'array', 'object'],
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
type: 'input',
|
|
343
|
+
name: 'paramDescription',
|
|
344
|
+
message: 'Parameter description:',
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
type: 'confirm',
|
|
348
|
+
name: 'paramRequired',
|
|
349
|
+
message: 'Is this parameter required?',
|
|
350
|
+
default: false,
|
|
351
|
+
},
|
|
352
|
+
]);
|
|
353
|
+
parameters[paramAnswers.paramName] = {
|
|
354
|
+
type: paramAnswers.paramType,
|
|
355
|
+
description: paramAnswers.paramDescription,
|
|
356
|
+
};
|
|
357
|
+
if (paramAnswers.paramRequired) {
|
|
358
|
+
if (!parameters._required) {
|
|
359
|
+
parameters._required = [];
|
|
360
|
+
}
|
|
361
|
+
parameters._required.push(paramAnswers.paramName);
|
|
362
|
+
}
|
|
363
|
+
const { addAnother } = await inquirer.prompt([
|
|
364
|
+
{
|
|
365
|
+
type: 'confirm',
|
|
366
|
+
name: 'addAnother',
|
|
367
|
+
message: 'Add another parameter?',
|
|
368
|
+
default: false,
|
|
369
|
+
},
|
|
370
|
+
]);
|
|
371
|
+
addingParams = addAnother;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
// Build skill object (schema-validated structure)
|
|
375
|
+
const skill = {
|
|
376
|
+
id: skillAnswers.id,
|
|
377
|
+
name: skillAnswers.name,
|
|
378
|
+
description: skillAnswers.description,
|
|
379
|
+
instructions: skillAnswers.instructions,
|
|
380
|
+
type: skillAnswers.type,
|
|
381
|
+
};
|
|
382
|
+
if (Object.keys(parameters).length > 0) {
|
|
383
|
+
// Extract required array if exists
|
|
384
|
+
const required = parameters._required;
|
|
385
|
+
delete parameters._required;
|
|
386
|
+
skill.parameters = {
|
|
387
|
+
type: 'object',
|
|
388
|
+
properties: parameters,
|
|
389
|
+
};
|
|
390
|
+
if (required && required.length > 0) {
|
|
391
|
+
skill.parameters.required = required;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
skills.push(skill);
|
|
395
|
+
printSuccess(`Skill "${skill.name}" added (schema-validated)`);
|
|
396
|
+
const { addMore } = await inquirer.prompt([
|
|
397
|
+
{
|
|
398
|
+
type: 'confirm',
|
|
399
|
+
name: 'addMore',
|
|
400
|
+
message: 'Add another skill?',
|
|
401
|
+
default: false,
|
|
402
|
+
},
|
|
403
|
+
]);
|
|
404
|
+
addingSkills = addMore;
|
|
405
|
+
}
|
|
406
|
+
if (skills.length > 0) {
|
|
407
|
+
this.agent.spec = {
|
|
408
|
+
...this.agent.spec,
|
|
409
|
+
skills,
|
|
410
|
+
};
|
|
411
|
+
printSuccess(`${skills.length} skill(s) configured and validated`);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
async configureSafety() {
|
|
415
|
+
this.nextStep('Safety & Constraints');
|
|
416
|
+
printStep(7, this.totalSteps, 'Safety & Constraints', 'Schema-validated safety controls');
|
|
417
|
+
const answers = await inquirer.prompt([
|
|
418
|
+
{
|
|
419
|
+
type: 'confirm',
|
|
420
|
+
name: 'enable_safety',
|
|
421
|
+
message: 'Configure safety controls?',
|
|
422
|
+
default: true,
|
|
423
|
+
},
|
|
424
|
+
]);
|
|
425
|
+
if (answers.enable_safety) {
|
|
426
|
+
const safetyConfig = await this.ui.generateForObject('spec.safety');
|
|
427
|
+
if (Object.keys(safetyConfig).length > 0) {
|
|
428
|
+
this.agent.spec = {
|
|
429
|
+
...this.agent.spec,
|
|
430
|
+
safety: safetyConfig,
|
|
431
|
+
};
|
|
432
|
+
printSuccess('Safety controls configured and validated');
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
async configureObservability() {
|
|
437
|
+
this.nextStep('Observability');
|
|
438
|
+
printStep(8, this.totalSteps, 'Observability & Monitoring', 'OpenTelemetry, metrics, and logging from schema');
|
|
439
|
+
const answers = await inquirer.prompt([
|
|
440
|
+
{
|
|
441
|
+
type: 'confirm',
|
|
442
|
+
name: 'enable_observability',
|
|
443
|
+
message: 'Configure observability?',
|
|
444
|
+
default: true,
|
|
445
|
+
},
|
|
446
|
+
]);
|
|
447
|
+
if (answers.enable_observability) {
|
|
448
|
+
const obsConfig = await this.ui.generateForObject('spec.observability');
|
|
449
|
+
if (Object.keys(obsConfig).length > 0) {
|
|
450
|
+
this.agent.spec = {
|
|
451
|
+
...this.agent.spec,
|
|
452
|
+
observability: obsConfig,
|
|
453
|
+
};
|
|
454
|
+
printSuccess('Observability configured and validated');
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
async validateManifest() {
|
|
459
|
+
this.nextStep('Final Validation');
|
|
460
|
+
printStep(9, this.totalSteps, 'Schema Validation', 'Validating complete manifest against OpenAPI schema');
|
|
461
|
+
const validation = this.schema.validate(this.agent);
|
|
462
|
+
if (validation.valid) {
|
|
463
|
+
printSuccess('✓ Manifest is valid according to OSSA schema');
|
|
464
|
+
}
|
|
465
|
+
else {
|
|
466
|
+
printError('Schema validation failed!');
|
|
467
|
+
console.log('');
|
|
468
|
+
console.log(chalk.yellow('Validation Errors:'));
|
|
469
|
+
validation.errors?.forEach((error, index) => {
|
|
470
|
+
console.log(chalk.red(`${index + 1}.`), chalk.white(error.instancePath || 'root'), chalk.gray('-'), error.message);
|
|
471
|
+
});
|
|
472
|
+
console.log('');
|
|
473
|
+
throw new Error('Manifest validation failed');
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
async configureExportTargets() {
|
|
477
|
+
this.nextStep('Export Configuration');
|
|
478
|
+
printStep(10, this.totalSteps, 'Export Targets', 'Schema-validated deployment configuration');
|
|
479
|
+
const { configureExport } = await inquirer.prompt([
|
|
480
|
+
{
|
|
481
|
+
type: 'confirm',
|
|
482
|
+
name: 'configureExport',
|
|
483
|
+
message: 'Configure export targets for deployment?',
|
|
484
|
+
default: true,
|
|
485
|
+
},
|
|
486
|
+
]);
|
|
487
|
+
if (!configureExport) {
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
const { platforms } = await inquirer.prompt([
|
|
491
|
+
{
|
|
492
|
+
type: 'checkbox',
|
|
493
|
+
name: 'platforms',
|
|
494
|
+
message: 'Select export platforms (schema-validated):',
|
|
495
|
+
choices: [
|
|
496
|
+
{
|
|
497
|
+
name: 'LangChain (Python) - Full framework with observability',
|
|
498
|
+
value: 'langchain',
|
|
499
|
+
checked: true,
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
name: 'KAgent (Kubernetes) - Cloud-native deployment',
|
|
503
|
+
value: 'kagent',
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
name: 'Drupal Module - CMS integration',
|
|
507
|
+
value: 'drupal',
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
name: 'Symfony Bundle - PHP framework',
|
|
511
|
+
value: 'symfony',
|
|
512
|
+
},
|
|
513
|
+
],
|
|
514
|
+
validate: (answer) => {
|
|
515
|
+
if (answer.length < 1) {
|
|
516
|
+
return 'You must select at least one export platform.';
|
|
517
|
+
}
|
|
518
|
+
return true;
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
]);
|
|
522
|
+
const exportConfig = {
|
|
523
|
+
enabled: true,
|
|
524
|
+
platforms: platforms,
|
|
525
|
+
};
|
|
526
|
+
// Platform-specific configuration (schema-validated)
|
|
527
|
+
for (const platform of platforms) {
|
|
528
|
+
if (platform === 'langchain') {
|
|
529
|
+
const langchainConfig = await inquirer.prompt([
|
|
530
|
+
{
|
|
531
|
+
type: 'confirm',
|
|
532
|
+
name: 'includeCallbacks',
|
|
533
|
+
message: 'Include observability (LangSmith, LangFuse, OpenTelemetry)?',
|
|
534
|
+
default: true,
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
type: 'confirm',
|
|
538
|
+
name: 'includeErrorHandling',
|
|
539
|
+
message: 'Include production error handling (retry, circuit breaker)?',
|
|
540
|
+
default: true,
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
type: 'confirm',
|
|
544
|
+
name: 'includeLangServe',
|
|
545
|
+
message: 'Generate LangServe REST API deployment?',
|
|
546
|
+
default: false,
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
type: 'confirm',
|
|
550
|
+
name: 'includeTests',
|
|
551
|
+
message: 'Generate pytest test suite?',
|
|
552
|
+
default: true,
|
|
553
|
+
},
|
|
554
|
+
]);
|
|
555
|
+
exportConfig.langchain = langchainConfig;
|
|
556
|
+
}
|
|
557
|
+
else if (platform === 'kagent') {
|
|
558
|
+
const kagentConfig = await inquirer.prompt([
|
|
559
|
+
{
|
|
560
|
+
type: 'confirm',
|
|
561
|
+
name: 'includeRBAC',
|
|
562
|
+
message: 'Include RBAC (ServiceAccount, Roles)?',
|
|
563
|
+
default: true,
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
type: 'confirm',
|
|
567
|
+
name: 'includeTLS',
|
|
568
|
+
message: 'Configure TLS for secure communication?',
|
|
569
|
+
default: true,
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
type: 'confirm',
|
|
573
|
+
name: 'includeNetworkPolicy',
|
|
574
|
+
message: 'Generate NetworkPolicy for isolation?',
|
|
575
|
+
default: true,
|
|
576
|
+
},
|
|
577
|
+
]);
|
|
578
|
+
exportConfig.kagent = kagentConfig;
|
|
579
|
+
}
|
|
580
|
+
else if (platform === 'drupal') {
|
|
581
|
+
const drupalConfig = await inquirer.prompt([
|
|
582
|
+
{
|
|
583
|
+
type: 'input',
|
|
584
|
+
name: 'moduleName',
|
|
585
|
+
message: 'Drupal module name:',
|
|
586
|
+
default: this.agent.metadata?.name?.replace(/-/g, '_') || 'ossa_agent',
|
|
587
|
+
validate: (input) => {
|
|
588
|
+
const valid = /^[a-z][a-z0-9_]*$/.test(input);
|
|
589
|
+
return valid || 'Must be lowercase alphanumeric with underscores';
|
|
590
|
+
},
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
type: 'confirm',
|
|
594
|
+
name: 'includeQueue',
|
|
595
|
+
message: 'Include queue worker for async execution?',
|
|
596
|
+
default: true,
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
type: 'confirm',
|
|
600
|
+
name: 'includeEntity',
|
|
601
|
+
message: 'Generate entity storage with Views integration?',
|
|
602
|
+
default: true,
|
|
603
|
+
},
|
|
604
|
+
]);
|
|
605
|
+
exportConfig.drupal = drupalConfig;
|
|
606
|
+
}
|
|
607
|
+
else if (platform === 'symfony') {
|
|
608
|
+
const symfonyConfig = await inquirer.prompt([
|
|
609
|
+
{
|
|
610
|
+
type: 'input',
|
|
611
|
+
name: 'bundleName',
|
|
612
|
+
message: 'Symfony bundle name:',
|
|
613
|
+
default: (this.agent.metadata?.name
|
|
614
|
+
?.split('-')
|
|
615
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
616
|
+
.join('') || 'Ossa') + 'Bundle',
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
type: 'confirm',
|
|
620
|
+
name: 'includeEvents',
|
|
621
|
+
message: 'Include event system (start, complete, error)?',
|
|
622
|
+
default: true,
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
type: 'confirm',
|
|
626
|
+
name: 'includeCaching',
|
|
627
|
+
message: 'Include caching layer?',
|
|
628
|
+
default: true,
|
|
629
|
+
},
|
|
630
|
+
]);
|
|
631
|
+
exportConfig.symfony = symfonyConfig;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
// Store in annotations (buildkit-specific metadata, schema-compliant)
|
|
635
|
+
this.agent.metadata = {
|
|
636
|
+
...this.agent.metadata,
|
|
637
|
+
annotations: {
|
|
638
|
+
...this.agent.metadata?.annotations,
|
|
639
|
+
'buildkit.ossa.io/export-config': JSON.stringify(exportConfig),
|
|
640
|
+
},
|
|
641
|
+
};
|
|
642
|
+
printSuccess(`Export configured for ${platforms.length} platform(s) with schema validation`);
|
|
643
|
+
}
|
|
644
|
+
async configureTestingValidation() {
|
|
645
|
+
this.nextStep('Testing Configuration');
|
|
646
|
+
printStep(11, this.totalSteps, 'Testing & Validation', 'Schema-validated testing configuration');
|
|
647
|
+
const { enableTesting } = await inquirer.prompt([
|
|
648
|
+
{
|
|
649
|
+
type: 'confirm',
|
|
650
|
+
name: 'enableTesting',
|
|
651
|
+
message: 'Configure testing for this agent?',
|
|
652
|
+
default: true,
|
|
653
|
+
},
|
|
654
|
+
]);
|
|
655
|
+
if (!enableTesting) {
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
const testConfig = await inquirer.prompt([
|
|
659
|
+
{
|
|
660
|
+
type: 'checkbox',
|
|
661
|
+
name: 'types',
|
|
662
|
+
message: 'Which test types to generate (schema-validated)?',
|
|
663
|
+
choices: [
|
|
664
|
+
{ name: 'Unit tests (recommended)', value: 'unit', checked: true },
|
|
665
|
+
{ name: 'Integration tests', value: 'integration' },
|
|
666
|
+
{ name: 'Load tests', value: 'load' },
|
|
667
|
+
{ name: 'Security tests', value: 'security' },
|
|
668
|
+
{ name: 'Cost tests', value: 'cost' },
|
|
669
|
+
],
|
|
670
|
+
validate: (answer) => {
|
|
671
|
+
if (answer.length < 1) {
|
|
672
|
+
return 'You must choose at least one test type.';
|
|
673
|
+
}
|
|
674
|
+
return true;
|
|
675
|
+
},
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
type: 'confirm',
|
|
679
|
+
name: 'mockLLM',
|
|
680
|
+
message: 'Mock LLM by default?',
|
|
681
|
+
default: true,
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
type: 'confirm',
|
|
685
|
+
name: 'generateFixtures',
|
|
686
|
+
message: 'Generate test fixtures?',
|
|
687
|
+
default: true,
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
type: 'confirm',
|
|
691
|
+
name: 'includeCICD',
|
|
692
|
+
message: 'Include CI/CD configurations?',
|
|
693
|
+
default: true,
|
|
694
|
+
},
|
|
695
|
+
]);
|
|
696
|
+
let cicdPlatforms = [];
|
|
697
|
+
if (testConfig.includeCICD) {
|
|
698
|
+
const { platforms } = await inquirer.prompt([
|
|
699
|
+
{
|
|
700
|
+
type: 'checkbox',
|
|
701
|
+
name: 'platforms',
|
|
702
|
+
message: 'Which CI/CD platforms?',
|
|
703
|
+
choices: [
|
|
704
|
+
{ name: 'GitHub Actions', value: 'github-actions', checked: true },
|
|
705
|
+
{ name: 'GitLab CI', value: 'gitlab-ci' },
|
|
706
|
+
],
|
|
707
|
+
validate: (answer) => {
|
|
708
|
+
if (answer.length < 1) {
|
|
709
|
+
return 'You must choose at least one CI/CD platform.';
|
|
710
|
+
}
|
|
711
|
+
return true;
|
|
712
|
+
},
|
|
713
|
+
},
|
|
714
|
+
]);
|
|
715
|
+
cicdPlatforms = platforms;
|
|
716
|
+
}
|
|
717
|
+
const validationConfig = await inquirer.prompt([
|
|
718
|
+
{
|
|
719
|
+
type: 'confirm',
|
|
720
|
+
name: 'manifest',
|
|
721
|
+
message: 'Enable manifest validation?',
|
|
722
|
+
default: true,
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
type: 'confirm',
|
|
726
|
+
name: 'safety',
|
|
727
|
+
message: 'Enable safety checks?',
|
|
728
|
+
default: true,
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
type: 'number',
|
|
732
|
+
name: 'costBudget',
|
|
733
|
+
message: 'Cost budget per test run? (USD)',
|
|
734
|
+
default: 0.1,
|
|
735
|
+
validate: (input) => {
|
|
736
|
+
if (input < 0) {
|
|
737
|
+
return 'Cost budget must be positive';
|
|
738
|
+
}
|
|
739
|
+
return true;
|
|
740
|
+
},
|
|
741
|
+
},
|
|
742
|
+
]);
|
|
743
|
+
const testingConfig = {
|
|
744
|
+
enabled: true,
|
|
745
|
+
types: testConfig.types,
|
|
746
|
+
mockLLM: testConfig.mockLLM,
|
|
747
|
+
generateFixtures: testConfig.generateFixtures,
|
|
748
|
+
cicd: cicdPlatforms,
|
|
749
|
+
validation: validationConfig,
|
|
750
|
+
};
|
|
751
|
+
// Store in annotations (buildkit-specific metadata, schema-compliant)
|
|
752
|
+
this.agent.metadata = {
|
|
753
|
+
...this.agent.metadata,
|
|
754
|
+
annotations: {
|
|
755
|
+
...this.agent.metadata?.annotations,
|
|
756
|
+
'buildkit.ossa.io/testing-config': JSON.stringify(testingConfig),
|
|
757
|
+
},
|
|
758
|
+
};
|
|
759
|
+
printSuccess(`Testing configured: ${testConfig.types.join(', ')} with schema validation`);
|
|
760
|
+
}
|
|
761
|
+
async generateOutput(options) {
|
|
762
|
+
this.nextStep('Generate Output');
|
|
763
|
+
printStep(12, this.totalSteps, 'Generate Files', 'Create manifest and supporting files');
|
|
764
|
+
const outputPath = options.output || 'agent.ossa.yaml';
|
|
765
|
+
// Write manifest
|
|
766
|
+
const yamlContent = yaml.stringify(this.agent, {
|
|
767
|
+
indent: 2,
|
|
768
|
+
lineWidth: 0,
|
|
769
|
+
});
|
|
770
|
+
fs.writeFileSync(outputPath, yamlContent, 'utf-8');
|
|
771
|
+
printSuccess(`Agent manifest: ${outputPath}`);
|
|
772
|
+
// Generate supporting files if extensions enabled
|
|
773
|
+
const directory = path.dirname(outputPath);
|
|
774
|
+
if (this.agent.extensions?.agents_md) {
|
|
775
|
+
this.generateAgentsMd(directory);
|
|
776
|
+
}
|
|
777
|
+
if (this.agent.extensions?.llms_txt) {
|
|
778
|
+
this.generateLlmsTxt(directory);
|
|
779
|
+
}
|
|
780
|
+
printSuccess('All files generated successfully');
|
|
781
|
+
}
|
|
782
|
+
generateAgentsMd(directory) {
|
|
783
|
+
const agentsMdPath = path.join(directory, 'AGENTS.md');
|
|
784
|
+
const content = `# ${this.agent.metadata?.name}
|
|
785
|
+
|
|
786
|
+
${this.agent.metadata?.description}
|
|
787
|
+
|
|
788
|
+
## Schema Validation
|
|
789
|
+
|
|
790
|
+
✓ Validated against OSSA v0.4 OpenAPI schema
|
|
791
|
+
✓ All fields conform to specification
|
|
792
|
+
✓ Type-safe and production-ready
|
|
793
|
+
|
|
794
|
+
## Configuration
|
|
795
|
+
|
|
796
|
+
See \`agent.ossa.yaml\` for complete manifest.
|
|
797
|
+
|
|
798
|
+
---
|
|
799
|
+
|
|
800
|
+
*Generated by OSSA Wizard - API-First Edition*
|
|
801
|
+
*Schema-validated: ${new Date().toISOString()}*
|
|
802
|
+
`;
|
|
803
|
+
fs.writeFileSync(agentsMdPath, content, 'utf-8');
|
|
804
|
+
printSuccess(`AGENTS.md: ${agentsMdPath}`);
|
|
805
|
+
}
|
|
806
|
+
generateLlmsTxt(directory) {
|
|
807
|
+
const llmsTxtPath = path.join(directory, 'llms.txt');
|
|
808
|
+
const content = `# ${this.agent.metadata?.name}
|
|
809
|
+
|
|
810
|
+
Schema: OSSA v0.4
|
|
811
|
+
Validated: ${new Date().toISOString()}
|
|
812
|
+
|
|
813
|
+
## Agent Type
|
|
814
|
+
|
|
815
|
+
${this.agent.kind}
|
|
816
|
+
|
|
817
|
+
## LLM Configuration
|
|
818
|
+
|
|
819
|
+
Provider: ${this.agent.spec?.llm?.provider}
|
|
820
|
+
Model: ${this.agent.spec?.llm?.model}
|
|
821
|
+
|
|
822
|
+
---
|
|
823
|
+
|
|
824
|
+
For complete specification, see agent.ossa.yaml
|
|
825
|
+
`;
|
|
826
|
+
fs.writeFileSync(llmsTxtPath, content, 'utf-8');
|
|
827
|
+
printSuccess(`llms.txt: ${llmsTxtPath}`);
|
|
828
|
+
}
|
|
829
|
+
printNextSteps() {
|
|
830
|
+
console.log(chalk.cyan('\nNext Steps:'));
|
|
831
|
+
console.log(chalk.white('\n1. Validate (already done!)'));
|
|
832
|
+
console.log(chalk.green(' ✓ Schema validation passed'));
|
|
833
|
+
console.log(chalk.white('\n2. Test your agent:'));
|
|
834
|
+
console.log(chalk.gray(' ossa run agent.ossa.yaml'));
|
|
835
|
+
console.log(chalk.white('\n3. Export to platform:'));
|
|
836
|
+
console.log(chalk.gray(' ossa export agent.ossa.yaml --platform langchain'));
|
|
837
|
+
console.log(chalk.white('\n4. Deploy:'));
|
|
838
|
+
console.log(chalk.gray(' # Follow platform-specific guide'));
|
|
839
|
+
console.log('');
|
|
840
|
+
console.log(chalk.green.bold('🎉 Schema-validated agent ready for production!'));
|
|
841
|
+
console.log('');
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
export const wizardAPIFirstCommand = new Command('wizard-api-first')
|
|
845
|
+
.alias('wizard')
|
|
846
|
+
.description('🧙 OSSA Wizard - API-FIRST EDITION (Schema-Driven)')
|
|
847
|
+
.option('-o, --output <path>', 'Output file path', 'agent.ossa.yaml')
|
|
848
|
+
.option('-t, --template <id>', 'Use specific template (future)')
|
|
849
|
+
.option('--validate', 'Extra validation (redundant - always validates)', true)
|
|
850
|
+
.action(async (options) => {
|
|
851
|
+
const wizard = new APIFirstWizard();
|
|
852
|
+
await wizard.run(options);
|
|
853
|
+
});
|
|
854
|
+
//# sourceMappingURL=wizard-api-first.command.js.map
|