@bluefly/openstandardagents 0.1.9
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/.buildkit/agent-first-policy.sh +65 -0
- package/.buildkit/branching-workflow.json +41 -0
- package/.buildkit/hooks.yaml +23 -0
- package/.buildkit/install-buildkit-setup.cjs +483 -0
- package/.cursor/plans/ossa-comprehensive-enhancement-issue-audit-plan.plan.md +735 -0
- package/.cursor/plans/ossa-enterprise-transformation-plan-0ccaf09b.plan.md +373 -0
- package/.cursor/plans/ossa-milestone-organization-and-v0-2-4-release-6dafa4ec.plan.md +214 -0
- package/.cursor/rules/problems.json +483 -0
- package/.cursor/settings.json +29 -0
- package/.cursor/worktrees.json +95 -0
- package/.env.example +41 -0
- package/.env.local +31 -0
- package/.github/ISSUE_TEMPLATE/README.md +33 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +61 -0
- package/.github/ISSUE_TEMPLATE/config.yml +12 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +75 -0
- package/.github/wiki_templates/home.md +39 -0
- package/.gitignore.bak +489 -0
- package/.gitlab-ci-trigger +1 -0
- package/.husky/pre-commit +31 -0
- package/.lintstagedrc.json +16 -0
- package/.redocly.yaml +63 -0
- package/.vscode/extensions.json +6 -0
- package/.vscode/settings.json +3 -0
- package/AUDIT_FIXES.md +139 -0
- package/AUDIT_REPORT.md +308 -0
- package/BUILDKIT_INTEGRATION.md +146 -0
- package/Dockerfile +35 -0
- package/README.md +559 -0
- package/dist/adk/adapters/index.d.ts +64 -0
- package/dist/adk/adapters/index.d.ts.map +1 -0
- package/dist/adk/adapters/index.js +257 -0
- package/dist/adk/adapters/index.js.map +1 -0
- package/dist/adk/agents/custom-agent.d.ts +55 -0
- package/dist/adk/agents/custom-agent.d.ts.map +1 -0
- package/dist/adk/agents/custom-agent.js +167 -0
- package/dist/adk/agents/custom-agent.js.map +1 -0
- package/dist/adk/agents/index.d.ts +64 -0
- package/dist/adk/agents/index.d.ts.map +1 -0
- package/dist/adk/agents/index.js +125 -0
- package/dist/adk/agents/index.js.map +1 -0
- package/dist/adk/agents/llm-agent.d.ts +27 -0
- package/dist/adk/agents/llm-agent.d.ts.map +1 -0
- package/dist/adk/agents/llm-agent.js +63 -0
- package/dist/adk/agents/llm-agent.js.map +1 -0
- package/dist/adk/agents/workflow-agent.d.ts +42 -0
- package/dist/adk/agents/workflow-agent.d.ts.map +1 -0
- package/dist/adk/agents/workflow-agent.js +144 -0
- package/dist/adk/agents/workflow-agent.js.map +1 -0
- package/dist/adk/index.d.ts +10 -0
- package/dist/adk/index.d.ts.map +1 -0
- package/dist/adk/index.js +10 -0
- package/dist/adk/index.js.map +1 -0
- package/dist/adk/orchestration/index.d.ts +63 -0
- package/dist/adk/orchestration/index.d.ts.map +1 -0
- package/dist/adk/orchestration/index.js +264 -0
- package/dist/adk/orchestration/index.js.map +1 -0
- package/dist/adk/state/index.d.ts +73 -0
- package/dist/adk/state/index.d.ts.map +1 -0
- package/dist/adk/state/index.js +177 -0
- package/dist/adk/state/index.js.map +1 -0
- package/dist/adk/tools/index.d.ts +65 -0
- package/dist/adk/tools/index.d.ts.map +1 -0
- package/dist/adk/tools/index.js +252 -0
- package/dist/adk/tools/index.js.map +1 -0
- package/dist/cli/agent-deployment.d.ts +34 -0
- package/dist/cli/agent-deployment.d.ts.map +1 -0
- package/dist/cli/agent-deployment.js +396 -0
- package/dist/cli/agent-deployment.js.map +1 -0
- package/dist/cli/commands/discover.command.d.ts +7 -0
- package/dist/cli/commands/discover.command.d.ts.map +1 -0
- package/dist/cli/commands/discover.command.js +80 -0
- package/dist/cli/commands/discover.command.js.map +1 -0
- package/dist/cli/commands/export.command.d.ts +7 -0
- package/dist/cli/commands/export.command.d.ts.map +1 -0
- package/dist/cli/commands/export.command.js +56 -0
- package/dist/cli/commands/export.command.js.map +1 -0
- package/dist/cli/commands/generate.command.d.ts +7 -0
- package/dist/cli/commands/generate.command.d.ts.map +1 -0
- package/dist/cli/commands/generate.command.js +66 -0
- package/dist/cli/commands/generate.command.js.map +1 -0
- package/dist/cli/commands/gitlab-agent.command.d.ts +8 -0
- package/dist/cli/commands/gitlab-agent.command.d.ts.map +1 -0
- package/dist/cli/commands/gitlab-agent.command.js +201 -0
- package/dist/cli/commands/gitlab-agent.command.js.map +1 -0
- package/dist/cli/commands/import.command.d.ts +7 -0
- package/dist/cli/commands/import.command.d.ts.map +1 -0
- package/dist/cli/commands/import.command.js +36 -0
- package/dist/cli/commands/import.command.js.map +1 -0
- package/dist/cli/commands/init.command.d.ts +7 -0
- package/dist/cli/commands/init.command.d.ts.map +1 -0
- package/dist/cli/commands/init.command.js +146 -0
- package/dist/cli/commands/init.command.js.map +1 -0
- package/dist/cli/commands/migrate.command.d.ts +7 -0
- package/dist/cli/commands/migrate.command.d.ts.map +1 -0
- package/dist/cli/commands/migrate.command.js +110 -0
- package/dist/cli/commands/migrate.command.js.map +1 -0
- package/dist/cli/commands/ossa.d.ts +9 -0
- package/dist/cli/commands/ossa.d.ts.map +1 -0
- package/dist/cli/commands/ossa.js +234 -0
- package/dist/cli/commands/ossa.js.map +1 -0
- package/dist/cli/commands/run.command.d.ts +7 -0
- package/dist/cli/commands/run.command.d.ts.map +1 -0
- package/dist/cli/commands/run.command.js +114 -0
- package/dist/cli/commands/run.command.js.map +1 -0
- package/dist/cli/commands/schema.command.d.ts +7 -0
- package/dist/cli/commands/schema.command.d.ts.map +1 -0
- package/dist/cli/commands/schema.command.js +72 -0
- package/dist/cli/commands/schema.command.js.map +1 -0
- package/dist/cli/commands/validate.command.d.ts +7 -0
- package/dist/cli/commands/validate.command.d.ts.map +1 -0
- package/dist/cli/commands/validate.command.js +125 -0
- package/dist/cli/commands/validate.command.js.map +1 -0
- package/dist/cli/commands/worktree.d.ts +7 -0
- package/dist/cli/commands/worktree.d.ts.map +1 -0
- package/dist/cli/commands/worktree.js +509 -0
- package/dist/cli/commands/worktree.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +50 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/ossa-cli.d.ts +52 -0
- package/dist/cli/ossa-cli.d.ts.map +1 -0
- package/dist/cli/ossa-cli.js +1061 -0
- package/dist/cli/ossa-cli.js.map +1 -0
- package/dist/core/index.d.ts +31 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +37 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/mcp-server-implementation.d.ts +39 -0
- package/dist/core/mcp-server-implementation.d.ts.map +1 -0
- package/dist/core/mcp-server-implementation.js +1262 -0
- package/dist/core/mcp-server-implementation.js.map +1 -0
- package/dist/core/orchestrator/index.d.ts +156 -0
- package/dist/core/orchestrator/index.d.ts.map +1 -0
- package/dist/core/orchestrator/index.js +446 -0
- package/dist/core/orchestrator/index.js.map +1 -0
- package/dist/core/orchestrator/ossa-orchestrator.d.ts +106 -0
- package/dist/core/orchestrator/ossa-orchestrator.d.ts.map +1 -0
- package/dist/core/orchestrator/ossa-orchestrator.js +396 -0
- package/dist/core/orchestrator/ossa-orchestrator.js.map +1 -0
- package/dist/di-container.d.ts +18 -0
- package/dist/di-container.d.ts.map +1 -0
- package/dist/di-container.js +46 -0
- package/dist/di-container.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/protocols/acap.d.ts +61 -0
- package/dist/protocols/acap.d.ts.map +1 -0
- package/dist/protocols/acap.js +92 -0
- package/dist/protocols/acap.js.map +1 -0
- package/dist/protocols/index.d.ts +8 -0
- package/dist/protocols/index.d.ts.map +1 -0
- package/dist/protocols/index.js +8 -0
- package/dist/protocols/index.js.map +1 -0
- package/dist/protocols/rasp.d.ts +58 -0
- package/dist/protocols/rasp.d.ts.map +1 -0
- package/dist/protocols/rasp.js +212 -0
- package/dist/protocols/rasp.js.map +1 -0
- package/dist/repositories/manifest.repository.d.ts +26 -0
- package/dist/repositories/manifest.repository.d.ts.map +1 -0
- package/dist/repositories/manifest.repository.js +90 -0
- package/dist/repositories/manifest.repository.js.map +1 -0
- package/dist/repositories/schema.repository.d.ts +30 -0
- package/dist/repositories/schema.repository.d.ts.map +1 -0
- package/dist/repositories/schema.repository.js +144 -0
- package/dist/repositories/schema.repository.js.map +1 -0
- package/dist/server/simple-app.d.ts +18 -0
- package/dist/server/simple-app.d.ts.map +1 -0
- package/dist/server/simple-app.js +155 -0
- package/dist/server/simple-app.js.map +1 -0
- package/dist/server/types/agent.d.ts +498 -0
- package/dist/server/types/agent.d.ts.map +1 -0
- package/dist/server/types/agent.js +37 -0
- package/dist/server/types/agent.js.map +1 -0
- package/dist/server/types/server.d.ts +370 -0
- package/dist/server/types/server.d.ts.map +1 -0
- package/dist/server/types/server.js +68 -0
- package/dist/server/types/server.js.map +1 -0
- package/dist/services/discovery.service.d.ts +78 -0
- package/dist/services/discovery.service.d.ts.map +1 -0
- package/dist/services/discovery.service.js +212 -0
- package/dist/services/discovery.service.js.map +1 -0
- package/dist/services/generation.service.d.ts +54 -0
- package/dist/services/generation.service.d.ts.map +1 -0
- package/dist/services/generation.service.js +298 -0
- package/dist/services/generation.service.js.map +1 -0
- package/dist/services/gitlab-agent.service.d.ts +94 -0
- package/dist/services/gitlab-agent.service.d.ts.map +1 -0
- package/dist/services/gitlab-agent.service.js +158 -0
- package/dist/services/gitlab-agent.service.js.map +1 -0
- package/dist/services/migration.service.d.ts +30 -0
- package/dist/services/migration.service.d.ts.map +1 -0
- package/dist/services/migration.service.js +231 -0
- package/dist/services/migration.service.js.map +1 -0
- package/dist/services/orchestration/worktree-orchestrator.d.ts +146 -0
- package/dist/services/orchestration/worktree-orchestrator.d.ts.map +1 -0
- package/dist/services/orchestration/worktree-orchestrator.js +591 -0
- package/dist/services/orchestration/worktree-orchestrator.js.map +1 -0
- package/dist/services/runtime/openai.adapter.d.ts +94 -0
- package/dist/services/runtime/openai.adapter.d.ts.map +1 -0
- package/dist/services/runtime/openai.adapter.js +209 -0
- package/dist/services/runtime/openai.adapter.js.map +1 -0
- package/dist/services/validation.service.d.ts +45 -0
- package/dist/services/validation.service.d.ts.map +1 -0
- package/dist/services/validation.service.js +362 -0
- package/dist/services/validation.service.js.map +1 -0
- package/dist/services/validators/anthropic.validator.d.ts +9 -0
- package/dist/services/validators/anthropic.validator.d.ts.map +1 -0
- package/dist/services/validators/anthropic.validator.js +105 -0
- package/dist/services/validators/anthropic.validator.js.map +1 -0
- package/dist/services/validators/autogen.validator.d.ts +9 -0
- package/dist/services/validators/autogen.validator.d.ts.map +1 -0
- package/dist/services/validators/autogen.validator.js +111 -0
- package/dist/services/validators/autogen.validator.js.map +1 -0
- package/dist/services/validators/crewai.validator.d.ts +9 -0
- package/dist/services/validators/crewai.validator.d.ts.map +1 -0
- package/dist/services/validators/crewai.validator.js +117 -0
- package/dist/services/validators/crewai.validator.js.map +1 -0
- package/dist/services/validators/cursor.validator.d.ts +9 -0
- package/dist/services/validators/cursor.validator.d.ts.map +1 -0
- package/dist/services/validators/cursor.validator.js +88 -0
- package/dist/services/validators/cursor.validator.js.map +1 -0
- package/dist/services/validators/index.d.ts +15 -0
- package/dist/services/validators/index.d.ts.map +1 -0
- package/dist/services/validators/index.js +15 -0
- package/dist/services/validators/index.js.map +1 -0
- package/dist/services/validators/langchain.validator.d.ts +9 -0
- package/dist/services/validators/langchain.validator.d.ts.map +1 -0
- package/dist/services/validators/langchain.validator.js +103 -0
- package/dist/services/validators/langchain.validator.js.map +1 -0
- package/dist/services/validators/langflow.validator.d.ts +9 -0
- package/dist/services/validators/langflow.validator.d.ts.map +1 -0
- package/dist/services/validators/langflow.validator.js +92 -0
- package/dist/services/validators/langflow.validator.js.map +1 -0
- package/dist/services/validators/langgraph.validator.d.ts +9 -0
- package/dist/services/validators/langgraph.validator.d.ts.map +1 -0
- package/dist/services/validators/langgraph.validator.js +123 -0
- package/dist/services/validators/langgraph.validator.js.map +1 -0
- package/dist/services/validators/llamaindex.validator.d.ts +9 -0
- package/dist/services/validators/llamaindex.validator.d.ts.map +1 -0
- package/dist/services/validators/llamaindex.validator.js +121 -0
- package/dist/services/validators/llamaindex.validator.js.map +1 -0
- package/dist/services/validators/openai.validator.d.ts +9 -0
- package/dist/services/validators/openai.validator.d.ts.map +1 -0
- package/dist/services/validators/openai.validator.js +126 -0
- package/dist/services/validators/openai.validator.js.map +1 -0
- package/dist/services/validators/vercel-ai.validator.d.ts +9 -0
- package/dist/services/validators/vercel-ai.validator.d.ts.map +1 -0
- package/dist/services/validators/vercel-ai.validator.js +99 -0
- package/dist/services/validators/vercel-ai.validator.js.map +1 -0
- package/dist/services/worktree/branching-strategy.d.ts +17 -0
- package/dist/services/worktree/branching-strategy.d.ts.map +1 -0
- package/dist/services/worktree/branching-strategy.js +66 -0
- package/dist/services/worktree/branching-strategy.js.map +1 -0
- package/dist/services/worktree/git-worktree-manager.d.ts +32 -0
- package/dist/services/worktree/git-worktree-manager.d.ts.map +1 -0
- package/dist/services/worktree/git-worktree-manager.js +61 -0
- package/dist/services/worktree/git-worktree-manager.js.map +1 -0
- package/dist/spec/v0.1.9/agent-autonomous-extensions.json +234 -0
- package/dist/spec/v0.1.9/ecosystem-compliance.json +235 -0
- package/dist/spec/v0.1.9/ossa-v0.1.9.schema.json +695 -0
- package/dist/spec/v0.1.9/ossa-v0.1.9.schema.json.backup +695 -0
- package/dist/spec/v0.1.9/reasoning-compliance.json +654 -0
- package/dist/spec/v0.2.0/ossa-0.2.0.schema.json +0 -0
- package/dist/spec/v0.2.1/ossa-0.2.1.schema.json +555 -0
- package/dist/spec/v0.2.2/kagent-enhancements.json +395 -0
- package/dist/spec/v0.2.2/ossa-0.2.2.schema.json +906 -0
- package/dist/spec/v0.2.2/ossa-0.2.2.yaml +448 -0
- package/dist/spec/v0.2.2/ossa-reasoning-compliance-1.0.schema.json +424 -0
- package/dist/spec/v0.2.3/README.md +154 -0
- package/dist/spec/v0.2.3/migrations/v0.2.2-to-v0.2.3.md +343 -0
- package/dist/spec/v0.2.3/ossa-0.2.3.schema.json +1397 -0
- package/dist/spec/v0.2.3/ossa-0.2.3.yaml +448 -0
- package/dist/spec/v0.2.4-dev/README.md +61 -0
- package/dist/spec/v0.2.4-dev/RELEASE-PROCESS.md +130 -0
- package/dist/spec/v0.2.4-dev/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/dist/spec/v0.2.4-dev/openapi/CHANGELOG-0.2.4.md +177 -0
- package/dist/spec/v0.2.4-dev/openapi/README-0.2.4.md +51 -0
- package/dist/spec/v0.2.4-dev/openapi/VERIFICATION-0.2.4.md +147 -0
- package/dist/spec/v0.2.4-dev/ossa-0.2.4-dev.schema.json +1717 -0
- package/dist/spec/v0.2.4-dev/ossa-0.2.4-dev.yaml +581 -0
- package/dist/spec/v0.2.5-dev/migrations/v0.2.4-to-v0.2.5.md +317 -0
- package/dist/spec/v0.2.5-dev/ossa-0.2.5-dev.schema.json +1732 -0
- package/dist/spec/v0.2.5-dev/ossa-0.2.5-dev.yaml +409 -0
- package/dist/specification/validator.d.ts +82 -0
- package/dist/specification/validator.d.ts.map +1 -0
- package/dist/specification/validator.js +562 -0
- package/dist/specification/validator.js.map +1 -0
- package/dist/types/acdl-api.d.ts +335 -0
- package/dist/types/acdl-api.d.ts.map +1 -0
- package/dist/types/acdl-api.js +6 -0
- package/dist/types/acdl-api.js.map +1 -0
- package/dist/types/agents/index.d.ts +53 -0
- package/dist/types/agents/index.d.ts.map +1 -0
- package/dist/types/agents/index.js +5 -0
- package/dist/types/agents/index.js.map +1 -0
- package/dist/types/api.d.ts +225 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +6 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/architecture/index.d.ts +530 -0
- package/dist/types/architecture/index.d.ts.map +1 -0
- package/dist/types/architecture/index.js +258 -0
- package/dist/types/architecture/index.js.map +1 -0
- package/dist/types/index.d.ts +279 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +68 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/openapi-extensions.d.ts +164 -0
- package/dist/types/openapi-extensions.d.ts.map +1 -0
- package/dist/types/openapi-extensions.js +6 -0
- package/dist/types/openapi-extensions.js.map +1 -0
- package/dist/types/policies/index.d.ts +35 -0
- package/dist/types/policies/index.d.ts.map +1 -0
- package/dist/types/policies/index.js +5 -0
- package/dist/types/policies/index.js.map +1 -0
- package/dist/types/workflows/index.d.ts +40 -0
- package/dist/types/workflows/index.d.ts.map +1 -0
- package/dist/types/workflows/index.js +5 -0
- package/dist/types/workflows/index.js.map +1 -0
- package/dist/utils/version-resolver.d.ts +28 -0
- package/dist/utils/version-resolver.d.ts.map +1 -0
- package/dist/utils/version-resolver.js +110 -0
- package/dist/utils/version-resolver.js.map +1 -0
- package/docker-compose.yml +160 -0
- package/junit.xml +1 -0
- package/package.json +105 -0
- package/public/api-docs.html +206 -0
- package/public/assets/favicon.svg +8 -0
- package/public/assets/script.js +279 -0
- package/public/assets/style.css +632 -0
- package/public/index.html +307 -0
- package/public/redocly-config.yaml +80 -0
- package/public/src/api/acdl-specification.yml +531 -0
- package/public/src/api/clean-architecture.openapi.yml +1435 -0
- package/public/src/api/context7-mcp.openapi.yml +313 -0
- package/public/src/api/magic-mcp.openapi.yml +647 -0
- package/public/src/api/mcp-infrastructure.openapi.yml +904 -0
- package/public/src/api/orchestration.openapi.yml +444 -0
- package/public/src/api/ossa-complete.openapi.yml +2250 -0
- package/public/src/api/project-discovery.openapi.yml +1293 -0
- package/public/src/api/rebuild-audit.openapi.yml +800 -0
- package/public/src/api/specification.openapi.yml +498 -0
- package/public/src/api/voice-agent-specification.yml +640 -0
- package/public/src/api/web-eval-mcp.openapi.yml +426 -0
- package/pyrightconfig.json +13 -0
- package/redocly.yaml +56 -0
- package/spec/v0.1.9/ossa-v0.1.9.schema.json.backup +695 -0
- package/spec/v0.2.0/ossa-0.2.0.schema.json +0 -0
- package/spec/v0.2.1/ossa-0.2.1.schema.json +555 -0
- package/spec/v0.2.4/ossa-0.2.4.schema.json +1717 -0
- package/spec/v0.2.4/ossa-0.2.4.yaml +581 -0
- package/specs/README.md +31 -0
- package/specs/acdl-specification.yml +531 -0
- package/specs/clean-architecture.openapi.yml +1435 -0
- package/specs/context7-mcp.openapi.yml +313 -0
- package/specs/magic-mcp.openapi.yml +647 -0
- package/specs/mcp-infrastructure.openapi.yml +904 -0
- package/specs/orchestration.openapi.yml +444 -0
- package/specs/ossa-complete.openapi.yml +2250 -0
- package/specs/project-discovery.openapi.yml +1293 -0
- package/specs/rebuild-audit.openapi.yml +800 -0
- package/specs/specification.openapi.yml +498 -0
- package/specs/test-api.openapi.yml +20 -0
- package/specs/voice-agent-specification.yml +640 -0
- package/specs/web-eval-mcp.openapi.yml +426 -0
- package/src/adk/adapters/index.ts +310 -0
- package/src/adk/agents/custom-agent.ts +206 -0
- package/src/adk/agents/index.ts +158 -0
- package/src/adk/agents/llm-agent.ts +76 -0
- package/src/adk/agents/workflow-agent.ts +191 -0
- package/src/adk/index.ts +10 -0
- package/src/adk/orchestration/index.ts +352 -0
- package/src/adk/state/index.ts +217 -0
- package/src/adk/tools/index.ts +291 -0
- package/src/api/acdl-specification.yml +531 -0
- package/src/api/agent-manifest.schema.json +859 -0
- package/src/api/agent-worktree-schema.json +320 -0
- package/src/api/clean-architecture.openapi.yml +1435 -0
- package/src/api/context7-mcp.openapi.yml +313 -0
- package/src/api/magic-mcp.openapi.yml +647 -0
- package/src/api/mcp-infrastructure.openapi.yml +904 -0
- package/src/api/openapi.redoc.config.json +6 -0
- package/src/api/orchestration.openapi.yml +444 -0
- package/src/api/ossa-complete.openapi.yml +2250 -0
- package/src/api/project-discovery.openapi.yml +1293 -0
- package/src/api/rebuild-audit.openapi.yml +800 -0
- package/src/api/specification.openapi.yml +498 -0
- package/src/api/test-api.openapi.yml +20 -0
- package/src/api/voice-agent-specification.yml +640 -0
- package/src/api/web-eval-mcp.openapi.yml +426 -0
- package/src/api/workflow.schema.json +524 -0
- package/src/cli/agent-deployment.ts +452 -0
- package/src/cli/commands/ossa.ts +272 -0
- package/src/cli/commands/worktree.ts +603 -0
- package/src/cli/ossa-cli.ts +1176 -0
- package/src/core/index.ts +42 -0
- package/src/core/mcp-server-implementation.ts +1409 -0
- package/src/core/orchestrator/index.ts +611 -0
- package/src/core/orchestrator/ossa-orchestrator.ts +504 -0
- package/src/mcp/simple-server.ts +322 -0
- package/src/protocols/acap.ts +146 -0
- package/src/protocols/index.ts +8 -0
- package/src/protocols/rasp.ts +263 -0
- package/src/server/app.ts +472 -0
- package/src/server/middleware/agentAccess.ts +10 -0
- package/src/server/middleware/asyncHandler.ts +10 -0
- package/src/server/middleware/auth.ts +10 -0
- package/src/server/middleware/errorHandler.ts +9 -0
- package/src/server/middleware/logging.ts +10 -0
- package/src/server/middleware/metrics.ts +10 -0
- package/src/server/middleware/validation.ts +10 -0
- package/src/server/routes/agents.ts +632 -0
- package/src/server/routes/monitoring.ts +13 -0
- package/src/server/routes/orchestration.ts +13 -0
- package/src/server/routes/specifications.ts +13 -0
- package/src/server/services/AgentService.ts +46 -0
- package/src/server/services/ExecutionService.ts +51 -0
- package/src/server/services/SpecificationService.ts +22 -0
- package/src/server/services/WebhookService.ts +24 -0
- package/src/server/simple-app.ts +174 -0
- package/src/server/types/agent.ts +612 -0
- package/src/server/types/server.ts +465 -0
- package/src/services/orchestration/worktree-orchestrator.ts +779 -0
- package/src/services/worktree/branching-strategy.ts +76 -0
- package/src/services/worktree/git-worktree-manager.ts +86 -0
- package/website/.next/BUILD_ID +1 -0
- package/website/.next/app-build-manifest.json +151 -0
- package/website/.next/app-path-routes-manifest.json +19 -0
- package/website/.next/build-manifest.json +33 -0
- package/website/.next/cache/.previewinfo +1 -0
- package/website/.next/cache/.rscinfo +1 -0
- package/website/.next/cache/.tsbuildinfo +1 -0
- package/website/.next/cache/fetch-cache/920aec34c288eefa97c5efba3baf95a846a0beb0c48a5064980a2c24b83e941c +1 -0
- package/website/.next/cache/fetch-cache/c2ad7a72b43463a0daaa85ca926a8af38defd17ecb64f1fdd2dd4fe2293e8b26 +1 -0
- package/website/.next/cache/fetch-cache/d10eb963d5980c8a50ee9ed24472339ee6da054ead33e00676e61e8b8e62cc83 +1 -0
- package/website/.next/cache/fetch-cache/f243d84640477f3205b74a85013018acd63b692144675630a74d1af8a3e9eab5 +1 -0
- package/website/.next/cache/webpack/client-production/0.pack +0 -0
- package/website/.next/cache/webpack/client-production/1.pack +0 -0
- package/website/.next/cache/webpack/client-production/10.pack +0 -0
- package/website/.next/cache/webpack/client-production/11.pack +0 -0
- package/website/.next/cache/webpack/client-production/12.pack +0 -0
- package/website/.next/cache/webpack/client-production/13.pack +0 -0
- package/website/.next/cache/webpack/client-production/14.pack +0 -0
- package/website/.next/cache/webpack/client-production/15.pack +0 -0
- package/website/.next/cache/webpack/client-production/16.pack +0 -0
- package/website/.next/cache/webpack/client-production/17.pack +0 -0
- package/website/.next/cache/webpack/client-production/18.pack +0 -0
- package/website/.next/cache/webpack/client-production/2.pack +0 -0
- package/website/.next/cache/webpack/client-production/3.pack +0 -0
- package/website/.next/cache/webpack/client-production/4.pack +0 -0
- package/website/.next/cache/webpack/client-production/5.pack +0 -0
- package/website/.next/cache/webpack/client-production/6.pack +0 -0
- package/website/.next/cache/webpack/client-production/7.pack +0 -0
- package/website/.next/cache/webpack/client-production/8.pack +0 -0
- package/website/.next/cache/webpack/client-production/9.pack +0 -0
- package/website/.next/cache/webpack/client-production/index.pack +0 -0
- package/website/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/website/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/website/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/website/.next/cache/webpack/server-production/0.pack +0 -0
- package/website/.next/cache/webpack/server-production/1.pack +0 -0
- package/website/.next/cache/webpack/server-production/10.pack +0 -0
- package/website/.next/cache/webpack/server-production/11.pack +0 -0
- package/website/.next/cache/webpack/server-production/12.pack +0 -0
- package/website/.next/cache/webpack/server-production/2.pack +0 -0
- package/website/.next/cache/webpack/server-production/3.pack +0 -0
- package/website/.next/cache/webpack/server-production/4.pack +0 -0
- package/website/.next/cache/webpack/server-production/5.pack +0 -0
- package/website/.next/cache/webpack/server-production/6.pack +0 -0
- package/website/.next/cache/webpack/server-production/7.pack +0 -0
- package/website/.next/cache/webpack/server-production/8.pack +0 -0
- package/website/.next/cache/webpack/server-production/9.pack +0 -0
- package/website/.next/cache/webpack/server-production/index.pack +0 -0
- package/website/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/website/.next/diagnostics/build-diagnostics.json +6 -0
- package/website/.next/diagnostics/framework.json +1 -0
- package/website/.next/export-detail.json +5 -0
- package/website/.next/export-marker.json +6 -0
- package/website/.next/images-manifest.json +57 -0
- package/website/.next/next-minimal-server.js.nft.json +1 -0
- package/website/.next/next-server.js.nft.json +1 -0
- package/website/.next/package.json +1 -0
- package/website/.next/prerender-manifest.json +2143 -0
- package/website/.next/react-loadable-manifest.json +1898 -0
- package/website/.next/required-server-files.json +320 -0
- package/website/.next/routes-manifest.json +161 -0
- package/website/.next/server/app/_not-found/page.js +2 -0
- package/website/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/website/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/_not-found.html +1 -0
- package/website/.next/server/app/_not-found.meta +8 -0
- package/website/.next/server/app/_not-found.rsc +23 -0
- package/website/.next/server/app/about/page.js +2 -0
- package/website/.next/server/app/about/page.js.nft.json +1 -0
- package/website/.next/server/app/about/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/about.html +1 -0
- package/website/.next/server/app/about.meta +7 -0
- package/website/.next/server/app/about.rsc +40 -0
- package/website/.next/server/app/blog/OpenAPI-AI-Agents-Standard.html +217 -0
- package/website/.next/server/app/blog/OpenAPI-AI-Agents-Standard.meta +7 -0
- package/website/.next/server/app/blog/OpenAPI-AI-Agents-Standard.rsc +308 -0
- package/website/.next/server/app/blog/Why-Formal-Standards-Matter-Now.html +180 -0
- package/website/.next/server/app/blog/Why-Formal-Standards-Matter-Now.meta +7 -0
- package/website/.next/server/app/blog/Why-Formal-Standards-Matter-Now.rsc +232 -0
- package/website/.next/server/app/blog/[slug]/page.js +2 -0
- package/website/.next/server/app/blog/[slug]/page.js.nft.json +1 -0
- package/website/.next/server/app/blog/[slug]/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/blog/introducing-ossa-framework.html +263 -0
- package/website/.next/server/app/blog/introducing-ossa-framework.meta +7 -0
- package/website/.next/server/app/blog/introducing-ossa-framework.rsc +351 -0
- package/website/.next/server/app/blog/ossa-production-results.html +198 -0
- package/website/.next/server/app/blog/ossa-production-results.meta +7 -0
- package/website/.next/server/app/blog/ossa-production-results.rsc +302 -0
- package/website/.next/server/app/blog/page.js +2 -0
- package/website/.next/server/app/blog/page.js.nft.json +1 -0
- package/website/.next/server/app/blog/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/blog/welcome-to-ossa.html +22 -0
- package/website/.next/server/app/blog/welcome-to-ossa.meta +7 -0
- package/website/.next/server/app/blog/welcome-to-ossa.rsc +31 -0
- package/website/.next/server/app/blog/why-ai-agents-need-open-standard.html +63 -0
- package/website/.next/server/app/blog/why-ai-agents-need-open-standard.meta +7 -0
- package/website/.next/server/app/blog/why-ai-agents-need-open-standard.rsc +121 -0
- package/website/.next/server/app/blog.html +1 -0
- package/website/.next/server/app/blog.meta +7 -0
- package/website/.next/server/app/blog.rsc +35 -0
- package/website/.next/server/app/design-guide/page.js +12 -0
- package/website/.next/server/app/design-guide/page.js.nft.json +1 -0
- package/website/.next/server/app/design-guide/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/design-guide.html +11 -0
- package/website/.next/server/app/design-guide.meta +7 -0
- package/website/.next/server/app/design-guide.rsc +41 -0
- package/website/.next/server/app/docs.html +1 -0
- package/website/.next/server/app/docs.meta +7 -0
- package/website/.next/server/app/docs.rsc +42 -0
- package/website/.next/server/app/ecosystem/page.js +2 -0
- package/website/.next/server/app/ecosystem/page.js.nft.json +1 -0
- package/website/.next/server/app/ecosystem/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/ecosystem.html +1 -0
- package/website/.next/server/app/ecosystem.meta +7 -0
- package/website/.next/server/app/ecosystem.rsc +40 -0
- package/website/.next/server/app/examples.html +1 -0
- package/website/.next/server/app/examples.meta +7 -0
- package/website/.next/server/app/examples.rsc +14559 -0
- package/website/.next/server/app/index.html +3 -0
- package/website/.next/server/app/index.meta +7 -0
- package/website/.next/server/app/index.rsc +40 -0
- package/website/.next/server/app/license/page.js +2 -0
- package/website/.next/server/app/license/page.js.nft.json +1 -0
- package/website/.next/server/app/license/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/license.html +191 -0
- package/website/.next/server/app/license.meta +7 -0
- package/website/.next/server/app/license.rsc +222 -0
- package/website/.next/server/app/page.js +4 -0
- package/website/.next/server/app/page.js.nft.json +1 -0
- package/website/.next/server/app/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/playground/page.js +111 -0
- package/website/.next/server/app/playground/page.js.nft.json +1 -0
- package/website/.next/server/app/playground/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/playground.html +1 -0
- package/website/.next/server/app/playground.meta +7 -0
- package/website/.next/server/app/playground.rsc +30 -0
- package/website/.next/server/app/robots.txt/route.js +1 -0
- package/website/.next/server/app/robots.txt/route.js.nft.json +1 -0
- package/website/.next/server/app/robots.txt/route_client-reference-manifest.js +1 -0
- package/website/.next/server/app/robots.txt.body +6 -0
- package/website/.next/server/app/robots.txt.meta +1 -0
- package/website/.next/server/app/rss.xml/route.js +18 -0
- package/website/.next/server/app/rss.xml/route.js.nft.json +1 -0
- package/website/.next/server/app/rss.xml/route_client-reference-manifest.js +1 -0
- package/website/.next/server/app/rss.xml.body +11 -0
- package/website/.next/server/app/rss.xml.meta +1 -0
- package/website/.next/server/app/schema/page.js +76 -0
- package/website/.next/server/app/schema/page.js.nft.json +1 -0
- package/website/.next/server/app/schema/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/schema.html +1 -0
- package/website/.next/server/app/schema.meta +7 -0
- package/website/.next/server/app/schema.rsc +26 -0
- package/website/.next/server/app/sitemap.xml/route.js +1 -0
- package/website/.next/server/app/sitemap.xml/route.js.nft.json +1 -0
- package/website/.next/server/app/sitemap.xml/route_client-reference-manifest.js +1 -0
- package/website/.next/server/app/sitemap.xml.body +39 -0
- package/website/.next/server/app/sitemap.xml.meta +1 -0
- package/website/.next/server/app/specification/page.js +10 -0
- package/website/.next/server/app/specification/page.js.nft.json +1 -0
- package/website/.next/server/app/specification/page_client-reference-manifest.js +1 -0
- package/website/.next/server/app/specification.html +9 -0
- package/website/.next/server/app/specification.meta +7 -0
- package/website/.next/server/app/specification.rsc +32 -0
- package/website/.next/server/app-paths-manifest.json +19 -0
- package/website/.next/server/chunks/18.js +1 -0
- package/website/.next/server/chunks/227.js +9 -0
- package/website/.next/server/chunks/339.js +25 -0
- package/website/.next/server/chunks/49.js +1 -0
- package/website/.next/server/chunks/51.js +1 -0
- package/website/.next/server/chunks/57.js +1 -0
- package/website/.next/server/chunks/579.js +16 -0
- package/website/.next/server/chunks/611.js +6 -0
- package/website/.next/server/chunks/873.js +22 -0
- package/website/.next/server/chunks/900.js +1 -0
- package/website/.next/server/chunks/97.js +1 -0
- package/website/.next/server/functions-config-manifest.json +4 -0
- package/website/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/website/.next/server/middleware-build-manifest.js +1 -0
- package/website/.next/server/middleware-manifest.json +6 -0
- package/website/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/website/.next/server/next-font-manifest.js +1 -0
- package/website/.next/server/next-font-manifest.json +1 -0
- package/website/.next/server/pages/404.html +1 -0
- package/website/.next/server/pages/500.html +1 -0
- package/website/.next/server/pages/_app.js +1 -0
- package/website/.next/server/pages/_app.js.nft.json +1 -0
- package/website/.next/server/pages/_document.js +1 -0
- package/website/.next/server/pages/_document.js.nft.json +1 -0
- package/website/.next/server/pages/_error.js +19 -0
- package/website/.next/server/pages/_error.js.nft.json +1 -0
- package/website/.next/server/pages-manifest.json +6 -0
- package/website/.next/server/server-reference-manifest.js +1 -0
- package/website/.next/server/server-reference-manifest.json +1 -0
- package/website/.next/server/webpack-runtime.js +1 -0
- package/website/.next/static/IDhDQiozPwOaA3PpMqvTE/_buildManifest.js +1 -0
- package/website/.next/static/IDhDQiozPwOaA3PpMqvTE/_ssgManifest.js +1 -0
- package/website/.next/static/chunks/119.05f66060d7798fc9.js +25 -0
- package/website/.next/static/chunks/255-bf407b21685f2318.js +1 -0
- package/website/.next/static/chunks/451-235273497e501ae9.js +1 -0
- package/website/.next/static/chunks/4bd1b696-409494caf8c83275.js +1 -0
- package/website/.next/static/chunks/619-f072ac750404f9da.js +1 -0
- package/website/.next/static/chunks/651-5cd3c87d43b7eb46.js +1 -0
- package/website/.next/static/chunks/778.278ac2aadb2a1105.js +1 -0
- package/website/.next/static/chunks/890-ab915e0570e1961b.js +1 -0
- package/website/.next/static/chunks/app/_not-found/page-ccdaf9d90b537c5d.js +1 -0
- package/website/.next/static/chunks/app/about/page-bd4cb2219b41f933.js +1 -0
- package/website/.next/static/chunks/app/blog/[slug]/page-8fd43000c4969233.js +1 -0
- package/website/.next/static/chunks/app/blog/page-bd4cb2219b41f933.js +1 -0
- package/website/.next/static/chunks/app/design-guide/page-bd4cb2219b41f933.js +1 -0
- package/website/.next/static/chunks/app/ecosystem/page-bd4cb2219b41f933.js +1 -0
- package/website/.next/static/chunks/app/layout-ccacbd90656baa78.js +1 -0
- package/website/.next/static/chunks/app/license/page-bd4cb2219b41f933.js +1 -0
- package/website/.next/static/chunks/app/page-31241dc7465f9590.js +1 -0
- package/website/.next/static/chunks/app/playground/page-c2af00885374900f.js +1 -0
- package/website/.next/static/chunks/app/robots.txt/route-032c05054032342f.js +1 -0
- package/website/.next/static/chunks/app/rss.xml/route-032c05054032342f.js +1 -0
- package/website/.next/static/chunks/app/schema/page-f7c224b281771083.js +1 -0
- package/website/.next/static/chunks/app/sitemap.xml/route-032c05054032342f.js +1 -0
- package/website/.next/static/chunks/app/specification/page-bd4cb2219b41f933.js +1 -0
- package/website/.next/static/chunks/framework-1ce91eb6f9ecda85.js +1 -0
- package/website/.next/static/chunks/main-3099e141650ec47a.js +1 -0
- package/website/.next/static/chunks/main-app-a2fc6ac9305e3090.js +1 -0
- package/website/.next/static/chunks/pages/_app-5addca2b3b969fde.js +1 -0
- package/website/.next/static/chunks/pages/_error-022e4ac7bbb9914f.js +1 -0
- package/website/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/website/.next/static/chunks/webpack-6ecb09e5c6e34cb4.js +1 -0
- package/website/.next/static/css/23135390005d4468.css +3 -0
- package/website/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- package/website/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
- package/website/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- package/website/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- package/website/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- package/website/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- package/website/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- package/website/.next/trace +3 -0
- package/website/.next/types/app/about/page.ts +84 -0
- package/website/.next/types/app/blog/[slug]/page.ts +84 -0
- package/website/.next/types/app/blog/page.ts +84 -0
- package/website/.next/types/app/design-guide/page.ts +84 -0
- package/website/.next/types/app/ecosystem/page.ts +84 -0
- package/website/.next/types/app/license/page.ts +84 -0
- package/website/.next/types/app/page.ts +84 -0
- package/website/.next/types/app/playground/page.ts +84 -0
- package/website/.next/types/app/rss.xml/route.ts +347 -0
- package/website/.next/types/app/schema/page.ts +84 -0
- package/website/.next/types/app/specification/page.ts +84 -0
- package/website/.next/types/cache-life.d.ts +141 -0
- package/website/.next/types/package.json +1 -0
- package/website/.next/types/routes.d.ts +85 -0
- package/website/.next/types/validator.ts +187 -0
- package/website/.wiki-export/Agent-Folder-Structure.md +215 -0
- package/website/.wiki-export/CI-STATUS.md +66 -0
- package/website/.wiki-export/COMPLETE-IMPLEMENTATION-CHECKLIST.md +74 -0
- package/website/.wiki-export/DRUPAL-MODULE-INTEGRATION.md +103 -0
- package/website/.wiki-export/FINAL-STATUS.md +63 -0
- package/website/.wiki-export/Getting-Started.md +87 -0
- package/website/.wiki-export/INSTRUCTIONS.md +46 -0
- package/website/.wiki-export/INTEGRATION-ANALYSIS.md +216 -0
- package/website/.wiki-export/MANIFEST.json +62 -0
- package/website/.wiki-export/OSSA-COMPLIANT-BADGE.md +247 -0
- package/website/.wiki-export/Openapi-Extensions.md +930 -0
- package/website/.wiki-export/README.md +31 -0
- package/website/.wiki-export/RELEASE-READINESS.md +95 -0
- package/website/.wiki-export/VERSIONING.md +284 -0
- package/website/lib/versions.json +77 -0
- package/website/next-env.d.ts +6 -0
- package/website/out/app-build-manifest.json +3 -0
- package/website/out/build-manifest.json +17 -0
- package/website/out/cache/.rscinfo +1 -0
- package/website/out/cache/next-devtools-config.json +1 -0
- package/website/out/cache/webpack/client-development/0.pack.gz +0 -0
- package/website/out/cache/webpack/client-development/1.pack.gz +0 -0
- package/website/out/cache/webpack/client-development/2.pack.gz +0 -0
- package/website/out/cache/webpack/client-development/3.pack.gz +0 -0
- package/website/out/cache/webpack/client-development/index.pack.gz +0 -0
- package/website/out/cache/webpack/client-development/index.pack.gz.old +0 -0
- package/website/out/cache/webpack/client-development-fallback/0.pack.gz +0 -0
- package/website/out/cache/webpack/client-development-fallback/index.pack.gz +0 -0
- package/website/out/cache/webpack/server-development/0.pack.gz +0 -0
- package/website/out/cache/webpack/server-development/1.pack.gz +0 -0
- package/website/out/cache/webpack/server-development/2.pack.gz +0 -0
- package/website/out/cache/webpack/server-development/3.pack.gz +0 -0
- package/website/out/cache/webpack/server-development/index.pack.gz +0 -0
- package/website/out/cache/webpack/server-development/index.pack.gz.old +0 -0
- package/website/out/package.json +1 -0
- package/website/out/prerender-manifest.json +11 -0
- package/website/out/react-loadable-manifest.json +1 -0
- package/website/out/routes-manifest.json +1 -0
- package/website/out/server/app-paths-manifest.json +1 -0
- package/website/out/server/interception-route-rewrite-manifest.js +1 -0
- package/website/out/server/middleware-build-manifest.js +19 -0
- package/website/out/server/middleware-manifest.json +6 -0
- package/website/out/server/middleware-react-loadable-manifest.js +1 -0
- package/website/out/server/next-font-manifest.js +1 -0
- package/website/out/server/next-font-manifest.json +1 -0
- package/website/out/server/pages-manifest.json +1 -0
- package/website/out/server/server-reference-manifest.js +1 -0
- package/website/out/server/server-reference-manifest.json +5 -0
- package/website/out/static/chunks/polyfills.js +1 -0
- package/website/out/static/development/_buildManifest.js +1 -0
- package/website/out/static/development/_ssgManifest.js +1 -0
- package/website/out/trace +2 -0
- package/website/out/types/cache-life.d.ts +141 -0
- package/website/out/types/package.json +1 -0
- package/website/out/types/routes.d.ts +85 -0
- package/website/out/types/validator.ts +187 -0
- package/website/public/examples.json +476 -0
- package/website/public/schemas/openapi-extensions.schema.json +486 -0
- package/website/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,603 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OSSA CLI Worktree Management Commands
|
|
3
|
+
* Provides git worktree integration with intelligent branching and adaptive flows
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { Command } from 'commander';
|
|
7
|
+
import GitWorktreeManager, { type WorktreeConfig } from '../../services/worktree/git-worktree-manager.js';
|
|
8
|
+
import BranchingStrategyManager from '../../services/worktree/branching-strategy.js';
|
|
9
|
+
import { existsSync, readFileSync } from 'fs';
|
|
10
|
+
import { resolve, join } from 'path';
|
|
11
|
+
import chalk from 'chalk';
|
|
12
|
+
import * as yaml from 'js-yaml';
|
|
13
|
+
|
|
14
|
+
const worktreeManager = new GitWorktreeManager();
|
|
15
|
+
const branchingStrategy = new BranchingStrategyManager();
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Extract agent dependencies from agent configuration
|
|
19
|
+
*/
|
|
20
|
+
function extractAgentDependencies(agentName: string): string[] {
|
|
21
|
+
try {
|
|
22
|
+
const agentPath = join('.agents', agentName, 'agent.yml');
|
|
23
|
+
|
|
24
|
+
if (!existsSync(agentPath)) {
|
|
25
|
+
console.warn(chalk.yellow(`ā ļø Agent config not found at ${agentPath}`));
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const agentConfig = yaml.load(readFileSync(agentPath, 'utf8')) as any;
|
|
30
|
+
|
|
31
|
+
if (!agentConfig?.spec?.dependencies?.agents) {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Extract agent dependency names
|
|
36
|
+
return agentConfig.spec.dependencies.agents
|
|
37
|
+
.filter((dep: any) => !dep.optional) // Only required dependencies
|
|
38
|
+
.map((dep: any) => dep.name);
|
|
39
|
+
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.warn(chalk.yellow(`ā ļø Unable to extract dependencies for ${agentName}: ${(error as Error).message}`));
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Display comprehensive flow status for agents
|
|
48
|
+
*/
|
|
49
|
+
function displayFlowStatus(specificAgent?: string): void {
|
|
50
|
+
console.log(chalk.blue('š Agentic Flow Status\n'));
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
const activeWorktrees = worktreeManager.listActiveWorktrees();
|
|
54
|
+
|
|
55
|
+
if (activeWorktrees.length === 0) {
|
|
56
|
+
console.log(chalk.gray('š No active agent worktrees found'));
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Filter for specific agent if requested
|
|
61
|
+
const targetWorktrees = specificAgent
|
|
62
|
+
? activeWorktrees.filter(w => w.agentName === specificAgent)
|
|
63
|
+
: activeWorktrees;
|
|
64
|
+
|
|
65
|
+
if (specificAgent && targetWorktrees.length === 0) {
|
|
66
|
+
console.log(chalk.red(`ā Agent '${specificAgent}' not found in active worktrees`));
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
console.log(chalk.cyan(`š Found ${targetWorktrees.length} active agent${targetWorktrees.length === 1 ? '' : 's'}\n`));
|
|
71
|
+
|
|
72
|
+
for (const worktree of targetWorktrees) {
|
|
73
|
+
displayAgentFlowStatus(worktree);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Overall summary if showing all agents
|
|
77
|
+
if (!specificAgent && targetWorktrees.length > 1) {
|
|
78
|
+
displayFlowSummary(targetWorktrees);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
} catch (error) {
|
|
82
|
+
console.error(chalk.red(`ā Error retrieving flow status: ${(error as Error).message}`));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Display flow status for a single agent
|
|
88
|
+
*/
|
|
89
|
+
function displayAgentFlowStatus(worktree: any): void {
|
|
90
|
+
const config = worktreeManager.loadWorktreeConfig(worktree.agentName);
|
|
91
|
+
const branchAwareness = worktreeManager.getBranchAwareness(worktree.agentName);
|
|
92
|
+
|
|
93
|
+
console.log(chalk.bold(`š¤ ${worktree.agentName}`));
|
|
94
|
+
console.log(` ${chalk.gray('Path:')} ${worktree.path}`);
|
|
95
|
+
|
|
96
|
+
if (config) {
|
|
97
|
+
console.log(` ${chalk.gray('Priority:')} ${getPriorityDisplay(config.priority)}`);
|
|
98
|
+
console.log(` ${chalk.gray('Phase:')} ${config.phase}`);
|
|
99
|
+
console.log(` ${chalk.gray('Base Branch:')} ${chalk.green(config.baseBranch)}`);
|
|
100
|
+
|
|
101
|
+
if (config.dependencies && config.dependencies.length > 0) {
|
|
102
|
+
console.log(` ${chalk.gray('Dependencies:')} ${config.dependencies.join(', ')}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Git status
|
|
107
|
+
console.log(` ${chalk.gray('Commits Ahead:')} ${branchAwareness.commitsAhead}`);
|
|
108
|
+
console.log(` ${chalk.gray('Commits Behind:')} ${branchAwareness.commitsBehind}`);
|
|
109
|
+
console.log(` ${chalk.gray('Uncommitted Changes:')} ${branchAwareness.hasUncommittedChanges ? chalk.yellow('Yes') : chalk.green('No')}`);
|
|
110
|
+
console.log(` ${chalk.gray('Conflicts:')} ${branchAwareness.hasConflicts ? chalk.red('Yes') : chalk.green('No')}`);
|
|
111
|
+
|
|
112
|
+
// Flow recommendations
|
|
113
|
+
const flowStatus = getFlowStatus(branchAwareness, config);
|
|
114
|
+
console.log(` ${chalk.gray('Flow Status:')} ${flowStatus}`);
|
|
115
|
+
|
|
116
|
+
console.log(); // Empty line for spacing
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Get priority display with color coding
|
|
121
|
+
*/
|
|
122
|
+
function getPriorityDisplay(priority: string): string {
|
|
123
|
+
switch (priority) {
|
|
124
|
+
case 'critical': return chalk.red('š“ Critical');
|
|
125
|
+
case 'high': return chalk.yellow('š” High');
|
|
126
|
+
case 'medium': return chalk.blue('šµ Medium');
|
|
127
|
+
case 'low': return chalk.gray('ā« Low');
|
|
128
|
+
default: return priority;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Get flow status with recommendations
|
|
134
|
+
*/
|
|
135
|
+
function getFlowStatus(branchAwareness: any, config: any): string {
|
|
136
|
+
if (branchAwareness.hasConflicts) {
|
|
137
|
+
return chalk.red('šØ Conflicts need resolution');
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (branchAwareness.commitsAhead > 0 && !branchAwareness.hasUncommittedChanges) {
|
|
141
|
+
return chalk.green('ā
Ready for integration');
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (branchAwareness.hasUncommittedChanges) {
|
|
145
|
+
return chalk.yellow('ā” Active development');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (branchAwareness.commitsBehind > 0) {
|
|
149
|
+
return chalk.cyan('š Needs sync with base');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return chalk.gray('āøļø Idle');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Display overall flow summary
|
|
157
|
+
*/
|
|
158
|
+
function displayFlowSummary(worktrees: any[]): void {
|
|
159
|
+
console.log(chalk.bold('š Flow Summary\n'));
|
|
160
|
+
|
|
161
|
+
const stats = {
|
|
162
|
+
total: worktrees.length,
|
|
163
|
+
readyForIntegration: 0,
|
|
164
|
+
activeDevelopment: 0,
|
|
165
|
+
conflicts: 0,
|
|
166
|
+
needsSync: 0,
|
|
167
|
+
idle: 0
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
for (const worktree of worktrees) {
|
|
171
|
+
const branchAwareness = worktreeManager.getBranchAwareness(worktree.agentName);
|
|
172
|
+
|
|
173
|
+
if (branchAwareness.hasConflicts) {
|
|
174
|
+
stats.conflicts++;
|
|
175
|
+
} else if (branchAwareness.commitsAhead > 0 && !branchAwareness.hasUncommittedChanges) {
|
|
176
|
+
stats.readyForIntegration++;
|
|
177
|
+
} else if (branchAwareness.hasUncommittedChanges) {
|
|
178
|
+
stats.activeDevelopment++;
|
|
179
|
+
} else if (branchAwareness.commitsBehind > 0) {
|
|
180
|
+
stats.needsSync++;
|
|
181
|
+
} else {
|
|
182
|
+
stats.idle++;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
console.log(` ${chalk.green('ā
Ready for Integration:')} ${stats.readyForIntegration}`);
|
|
187
|
+
console.log(` ${chalk.yellow('ā” Active Development:')} ${stats.activeDevelopment}`);
|
|
188
|
+
console.log(` ${chalk.red('šØ Conflicts:')} ${stats.conflicts}`);
|
|
189
|
+
console.log(` ${chalk.cyan('š Needs Sync:')} ${stats.needsSync}`);
|
|
190
|
+
console.log(` ${chalk.gray('āøļø Idle:')} ${stats.idle}`);
|
|
191
|
+
|
|
192
|
+
// Recommendations
|
|
193
|
+
if (stats.conflicts > 0) {
|
|
194
|
+
console.log(chalk.red(`\nā ļø ${stats.conflicts} agent${stats.conflicts === 1 ? '' : 's'} have conflicts that need resolution`));
|
|
195
|
+
}
|
|
196
|
+
if (stats.readyForIntegration > 0) {
|
|
197
|
+
console.log(chalk.green(`\nš ${stats.readyForIntegration} agent${stats.readyForIntegration === 1 ? '' : 's'} ready for integration`));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export const worktreeCommand = new Command('worktree');
|
|
202
|
+
|
|
203
|
+
worktreeCommand
|
|
204
|
+
.description('Manage git worktrees for parallel agent development')
|
|
205
|
+
.addCommand(createWorktreeCommand())
|
|
206
|
+
.addCommand(listWorktreesCommand())
|
|
207
|
+
.addCommand(syncWorktreeCommand())
|
|
208
|
+
.addCommand(integrateCommand())
|
|
209
|
+
.addCommand(cleanupCommand())
|
|
210
|
+
.addCommand(flowCommand())
|
|
211
|
+
.addCommand(branchCommand())
|
|
212
|
+
.addCommand(statusCommand());
|
|
213
|
+
|
|
214
|
+
function createWorktreeCommand(): Command {
|
|
215
|
+
return new Command('create')
|
|
216
|
+
.description('Create a new worktree for an agent')
|
|
217
|
+
.requiredOption('-a, --agent <name>', 'Agent name (must follow OSSA naming conventions)')
|
|
218
|
+
.option('-b, --base-branch <branch>', 'Base branch to branch from', 'v0.1.9-dev')
|
|
219
|
+
.option('-v, --version <version>', 'OSSA version', '0.1.9')
|
|
220
|
+
.option('-p, --priority <priority>', 'Priority level', 'medium')
|
|
221
|
+
.option('-s, --specialization <spec>', 'Agent specialization')
|
|
222
|
+
.option('--phase <phase>', 'Development phase', '1')
|
|
223
|
+
.option('--task-type <type>', 'Task type for branch naming')
|
|
224
|
+
.option('--flow <flow>', 'Agentic flow type', 'adaptive')
|
|
225
|
+
.option('--auto-branch', 'Automatically determine branch type and name')
|
|
226
|
+
.action(async (options) => {
|
|
227
|
+
try {
|
|
228
|
+
console.log(chalk.blue('š Creating agent worktree with intelligent branching...'));
|
|
229
|
+
|
|
230
|
+
// Validate agent name follows OSSA conventions
|
|
231
|
+
if (!isValidAgentName(options.agent)) {
|
|
232
|
+
console.error(chalk.red('ā Agent name must follow OSSA naming convention: [scope-]domain-role[-framework]'));
|
|
233
|
+
console.log(chalk.yellow('Examples: openapi-expert, security-auditor, workflow-orchestrator'));
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Get repository path
|
|
238
|
+
const gitRepository = findGitRepository();
|
|
239
|
+
if (!gitRepository) {
|
|
240
|
+
console.error(chalk.red('ā Not in a git repository. Please run from OSSA project root.'));
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Determine optimal branching strategy
|
|
245
|
+
let taskType = options.taskType;
|
|
246
|
+
let branchRecommendations;
|
|
247
|
+
|
|
248
|
+
if (options.autoBranch && options.specialization) {
|
|
249
|
+
branchRecommendations = branchingStrategy.getBranchNamingRecommendations(
|
|
250
|
+
options.agent,
|
|
251
|
+
options.specialization,
|
|
252
|
+
parseInt(options.phase),
|
|
253
|
+
options.priority
|
|
254
|
+
);
|
|
255
|
+
console.log(chalk.green(`⨠Recommended branch: ${branchRecommendations.primary}`));
|
|
256
|
+
console.log(chalk.gray(` Reasoning: ${branchRecommendations.reasoning}`));
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Determine optimal agentic flow
|
|
260
|
+
const flowContext = {
|
|
261
|
+
agentCount: 1, // Individual agent for now
|
|
262
|
+
priority: options.priority,
|
|
263
|
+
complexity: options.specialization?.includes('protocol') ? 'high' : 'medium',
|
|
264
|
+
dependencies: extractAgentDependencies(options.agent),
|
|
265
|
+
riskTolerance: options.priority === 'critical' ? 'conservative' : 'moderate',
|
|
266
|
+
timeline: options.priority === 'critical' ? 'immediate' : 'standard'
|
|
267
|
+
} as const;
|
|
268
|
+
|
|
269
|
+
const optimalFlow = branchingStrategy.determineOptimalFlow(options.agent);
|
|
270
|
+
const flowConfig = branchingStrategy.getFlowConfig(optimalFlow);
|
|
271
|
+
|
|
272
|
+
console.log(chalk.cyan(`š Using ${optimalFlow} flow with ${flowConfig?.coordinationLevel} coordination`));
|
|
273
|
+
|
|
274
|
+
// Create worktree configuration
|
|
275
|
+
const worktreeConfig: WorktreeConfig = {
|
|
276
|
+
agentName: options.agent,
|
|
277
|
+
baseBranch: options.baseBranch,
|
|
278
|
+
featureBranch: '', // Will be generated by manager
|
|
279
|
+
workingDirectory: '', // Will be set by manager
|
|
280
|
+
gitRepository,
|
|
281
|
+
ossaVersion: options.version,
|
|
282
|
+
priority: options.priority as any,
|
|
283
|
+
phase: parseInt(options.phase),
|
|
284
|
+
dependencies: extractAgentDependencies(options.agent)
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
// Create the worktree
|
|
288
|
+
const worktreePath = await worktreeManager.createAgentWorktree(worktreeConfig);
|
|
289
|
+
|
|
290
|
+
// Get branch awareness information
|
|
291
|
+
const branchAwareness = worktreeManager.getBranchAwareness(options.agent);
|
|
292
|
+
const versionAwareness = worktreeManager.getProjectVersionAwareness();
|
|
293
|
+
|
|
294
|
+
console.log(chalk.green('ā
Agent worktree created successfully!'));
|
|
295
|
+
console.log(chalk.gray('š Path:'), chalk.white(worktreePath));
|
|
296
|
+
console.log(chalk.gray('šæ Branch:'), chalk.white(branchAwareness?.currentBranch));
|
|
297
|
+
console.log(chalk.gray('šÆ Target:'), chalk.white(versionAwareness?.targetVersion));
|
|
298
|
+
console.log(chalk.gray('š Flow:'), chalk.white(optimalFlow));
|
|
299
|
+
|
|
300
|
+
console.log(chalk.yellow('\nš Next steps:'));
|
|
301
|
+
console.log(` cd ${worktreePath}`);
|
|
302
|
+
console.log(` ossa worktree status ${options.agent}`);
|
|
303
|
+
console.log(` # Begin agent development...`);
|
|
304
|
+
|
|
305
|
+
} catch (error) {
|
|
306
|
+
console.error(chalk.red('ā Failed to create worktree:'), (error as Error).message);
|
|
307
|
+
process.exit(1);
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function listWorktreesCommand(): Command {
|
|
313
|
+
return new Command('list')
|
|
314
|
+
.description('List all active agent worktrees')
|
|
315
|
+
.option('--phase <phase>', 'Filter by development phase')
|
|
316
|
+
.option('--priority <priority>', 'Filter by priority level')
|
|
317
|
+
.action((options) => {
|
|
318
|
+
try {
|
|
319
|
+
const worktrees = worktreeManager.listActiveWorktrees();
|
|
320
|
+
|
|
321
|
+
let filtered = worktrees;
|
|
322
|
+
if (options.phase) {
|
|
323
|
+
filtered = filtered.filter(w => w.phase.toString() === options.phase);
|
|
324
|
+
}
|
|
325
|
+
if (options.priority) {
|
|
326
|
+
filtered = filtered.filter(w => w.priority === options.priority);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (filtered.length === 0) {
|
|
330
|
+
console.log(chalk.yellow('š No active agent worktrees found'));
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
console.log(chalk.blue(`š³ Active Agent Worktrees (${filtered.length})`));
|
|
335
|
+
console.log('');
|
|
336
|
+
|
|
337
|
+
// Group by phase for better organization
|
|
338
|
+
const byPhase = filtered.reduce((groups, worktree) => {
|
|
339
|
+
const phase = worktree.phase;
|
|
340
|
+
if (!groups[phase]) groups[phase] = [];
|
|
341
|
+
groups[phase].push(worktree);
|
|
342
|
+
return groups;
|
|
343
|
+
}, {} as Record<number, typeof filtered>);
|
|
344
|
+
|
|
345
|
+
Object.keys(byPhase)
|
|
346
|
+
.sort((a, b) => parseInt(a) - parseInt(b))
|
|
347
|
+
.forEach(phase => {
|
|
348
|
+
console.log(chalk.cyan(`Phase ${phase}:`));
|
|
349
|
+
byPhase[parseInt(phase)].forEach((worktree: any) => {
|
|
350
|
+
const priorityColor = ({
|
|
351
|
+
critical: chalk.red,
|
|
352
|
+
high: chalk.yellow,
|
|
353
|
+
medium: chalk.blue,
|
|
354
|
+
low: chalk.gray
|
|
355
|
+
} as any)[worktree.priority] || chalk.white;
|
|
356
|
+
|
|
357
|
+
console.log(` ${priorityColor('ā')} ${chalk.white(worktree.agent)}`);
|
|
358
|
+
console.log(` Branch: ${chalk.gray(worktree.branch)}`);
|
|
359
|
+
console.log(` Path: ${chalk.gray(worktree.path)}`);
|
|
360
|
+
console.log(` Version: ${chalk.gray(worktree.ossaVersion)}`);
|
|
361
|
+
});
|
|
362
|
+
console.log('');
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
} catch (error) {
|
|
366
|
+
console.error(chalk.red('ā Failed to list worktrees:'), (error as Error).message);
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
function syncWorktreeCommand(): Command {
|
|
372
|
+
return new Command('sync')
|
|
373
|
+
.description('Synchronize agent worktree with remote repository')
|
|
374
|
+
.argument('<agent>', 'Agent name')
|
|
375
|
+
.option('--force', 'Force sync even with uncommitted changes')
|
|
376
|
+
.action(async (agent, options) => {
|
|
377
|
+
try {
|
|
378
|
+
console.log(chalk.blue(`š Synchronizing worktree for ${agent}...`));
|
|
379
|
+
|
|
380
|
+
await worktreeManager.syncWorktree(agent);
|
|
381
|
+
|
|
382
|
+
const branchAwareness = worktreeManager.getBranchAwareness(agent);
|
|
383
|
+
console.log(chalk.green(`ā
Worktree synchronized successfully!`));
|
|
384
|
+
console.log(chalk.gray('šæ Branch:'), chalk.white(branchAwareness?.currentBranch));
|
|
385
|
+
|
|
386
|
+
} catch (error) {
|
|
387
|
+
console.error(chalk.red('ā Failed to sync worktree:'), (error as Error).message);
|
|
388
|
+
process.exit(1);
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
function integrateCommand(): Command {
|
|
394
|
+
return new Command('integrate')
|
|
395
|
+
.description('Coordinate integration between multiple agent worktrees')
|
|
396
|
+
.argument('<agents...>', 'Agent names to integrate')
|
|
397
|
+
.option('--branch <name>', 'Integration branch name (auto-generated if not provided)')
|
|
398
|
+
.option('--strategy <strategy>', 'Integration strategy', 'parallel')
|
|
399
|
+
.action(async (agents, options) => {
|
|
400
|
+
try {
|
|
401
|
+
console.log(chalk.blue(`š Coordinating integration for ${agents.length} agents...`));
|
|
402
|
+
console.log(chalk.gray('Agents:'), agents.join(', '));
|
|
403
|
+
|
|
404
|
+
const integrationBranch = await worktreeManager.coordinateIntegration(agents);
|
|
405
|
+
|
|
406
|
+
console.log(chalk.green('ā
Integration coordination complete!'));
|
|
407
|
+
console.log(chalk.gray('šæ Integration branch:'), chalk.white(integrationBranch));
|
|
408
|
+
|
|
409
|
+
console.log(chalk.yellow('\nš Next steps:'));
|
|
410
|
+
console.log(` git checkout ${integrationBranch}`);
|
|
411
|
+
console.log(` # Review integrated changes`);
|
|
412
|
+
console.log(` # Create merge request to v0.1.9-dev`);
|
|
413
|
+
|
|
414
|
+
} catch (error) {
|
|
415
|
+
console.error(chalk.red('ā Failed to coordinate integration:'), (error as Error).message);
|
|
416
|
+
process.exit(1);
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
function cleanupCommand(): Command {
|
|
422
|
+
return new Command('cleanup')
|
|
423
|
+
.description('Clean up completed agent worktrees')
|
|
424
|
+
.argument('<agent>', 'Agent name')
|
|
425
|
+
.option('--keep-branch', 'Keep the feature branch after cleanup')
|
|
426
|
+
.option('--force', 'Force cleanup even if work is not merged')
|
|
427
|
+
.action(async (agent, options) => {
|
|
428
|
+
try {
|
|
429
|
+
console.log(chalk.yellow(`š§¹ Cleaning up worktree for ${agent}...`));
|
|
430
|
+
|
|
431
|
+
await worktreeManager.cleanupWorktree(agent);
|
|
432
|
+
|
|
433
|
+
console.log(chalk.green(`ā
Worktree cleaned up successfully!`));
|
|
434
|
+
if (options.keepBranch) {
|
|
435
|
+
console.log(chalk.gray('šæ Feature branch preserved for future reference'));
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
} catch (error) {
|
|
439
|
+
console.error(chalk.red('ā Failed to cleanup worktree:'), (error as Error).message);
|
|
440
|
+
process.exit(1);
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
function flowCommand(): Command {
|
|
446
|
+
const flowCmd = new Command('flow');
|
|
447
|
+
flowCmd.description('Manage agentic development flows');
|
|
448
|
+
|
|
449
|
+
flowCmd
|
|
450
|
+
.command('status')
|
|
451
|
+
.description('Show current flow status for agents')
|
|
452
|
+
.option('--agent <name>', 'Show status for specific agent')
|
|
453
|
+
.action((options) => {
|
|
454
|
+
displayFlowStatus(options.agent);
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
flowCmd
|
|
458
|
+
.command('adapt')
|
|
459
|
+
.description('Adapt flow based on current metrics')
|
|
460
|
+
.requiredOption('--flow <current>', 'Current flow type')
|
|
461
|
+
.option('--completion-rate <rate>', 'Completion rate (0-1)', '0.8')
|
|
462
|
+
.option('--error-rate <rate>', 'Error rate (0-1)', '0.05')
|
|
463
|
+
.option('--conflict-rate <rate>', 'Conflict rate (0-1)', '0.03')
|
|
464
|
+
.action((options) => {
|
|
465
|
+
const metrics = {
|
|
466
|
+
completionRate: parseFloat(options.completionRate),
|
|
467
|
+
errorRate: parseFloat(options.errorRate),
|
|
468
|
+
conflictRate: parseFloat(options.conflictRate),
|
|
469
|
+
agentUtilization: 0.7,
|
|
470
|
+
timeToCompletion: 24
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
const constraints = {
|
|
474
|
+
deadline: new Date(Date.now() + 48 * 60 * 60 * 1000) // 48 hours from now
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
const recommendation = branchingStrategy.adaptFlow({ flow: options.flow, metrics, constraints });
|
|
478
|
+
|
|
479
|
+
console.log(chalk.blue('š§ Flow Adaptation Analysis'));
|
|
480
|
+
console.log(chalk.gray('Current flow:'), chalk.white(options.flow));
|
|
481
|
+
console.log(chalk.gray('Recommended:'), chalk.white(recommendation.recommendedFlow));
|
|
482
|
+
console.log(chalk.gray('Reason:'), chalk.yellow(recommendation.reason));
|
|
483
|
+
|
|
484
|
+
if (recommendation.suggestedActions.length > 0) {
|
|
485
|
+
console.log(chalk.gray('\nš Suggested actions:'));
|
|
486
|
+
recommendation.suggestedActions.forEach((action: string) => {
|
|
487
|
+
console.log(chalk.gray(' ā¢'), chalk.white(action));
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
return flowCmd;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
function branchCommand(): Command {
|
|
496
|
+
const branchCmd = new Command('branch');
|
|
497
|
+
branchCmd.description('Intelligent branch naming and management');
|
|
498
|
+
|
|
499
|
+
branchCmd
|
|
500
|
+
.command('suggest')
|
|
501
|
+
.description('Get branch naming suggestions for an agent')
|
|
502
|
+
.requiredOption('-a, --agent <name>', 'Agent name')
|
|
503
|
+
.requiredOption('-s, --specialization <spec>', 'Agent specialization')
|
|
504
|
+
.option('--phase <phase>', 'Development phase', '1')
|
|
505
|
+
.option('--priority <priority>', 'Priority level', 'medium')
|
|
506
|
+
.action((options) => {
|
|
507
|
+
const recommendations = branchingStrategy.getBranchNamingRecommendations(
|
|
508
|
+
options.agent,
|
|
509
|
+
options.specialization,
|
|
510
|
+
parseInt(options.phase),
|
|
511
|
+
options.priority
|
|
512
|
+
);
|
|
513
|
+
|
|
514
|
+
console.log(chalk.blue('šæ Branch Naming Recommendations'));
|
|
515
|
+
console.log(chalk.gray('Primary:'), chalk.green(recommendations.primary));
|
|
516
|
+
console.log(chalk.gray('Reasoning:'), chalk.yellow(recommendations.reasoning));
|
|
517
|
+
|
|
518
|
+
if (recommendations.alternatives.length > 0) {
|
|
519
|
+
console.log(chalk.gray('\nš Alternatives:'));
|
|
520
|
+
recommendations.alternatives.forEach((alt: any, index: number) => {
|
|
521
|
+
console.log(chalk.gray(` ${index + 1}.`), chalk.white(alt));
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
|
|
526
|
+
return branchCmd;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
function statusCommand(): Command {
|
|
530
|
+
return new Command('status')
|
|
531
|
+
.description('Show comprehensive status for an agent worktree')
|
|
532
|
+
.argument('<agent>', 'Agent name')
|
|
533
|
+
.action(async (agent) => {
|
|
534
|
+
try {
|
|
535
|
+
const config = worktreeManager.loadWorktreeConfig(agent);
|
|
536
|
+
if (!config) {
|
|
537
|
+
console.log(chalk.red(`ā No worktree found for agent: ${agent}`));
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
const branchAwareness = worktreeManager.getBranchAwareness(agent);
|
|
542
|
+
const versionAwareness = worktreeManager.getProjectVersionAwareness();
|
|
543
|
+
|
|
544
|
+
console.log(chalk.blue(`š Agent Worktree Status: ${agent}`));
|
|
545
|
+
console.log('');
|
|
546
|
+
|
|
547
|
+
console.log(chalk.cyan('š§ Configuration:'));
|
|
548
|
+
console.log(` Agent: ${chalk.white(config.agentName)}`);
|
|
549
|
+
console.log(` Phase: ${chalk.white(config.phase)}`);
|
|
550
|
+
console.log(` Priority: ${chalk.white(config.priority)}`);
|
|
551
|
+
console.log(` Path: ${chalk.gray(config.workingDirectory)}`);
|
|
552
|
+
console.log('');
|
|
553
|
+
|
|
554
|
+
if (branchAwareness) {
|
|
555
|
+
console.log(chalk.cyan('šæ Branch Information:'));
|
|
556
|
+
console.log(` Current: ${chalk.white(branchAwareness.currentBranch)}`);
|
|
557
|
+
console.log(` Base: ${chalk.gray(branchAwareness.baseBranch)}`);
|
|
558
|
+
console.log(` Type: ${chalk.white(branchAwareness.branchType)}`);
|
|
559
|
+
console.log(` Merge Target: ${chalk.white(branchAwareness.mergeTarget)}`);
|
|
560
|
+
console.log(` Auto-merge: ${branchAwareness.canAutoMerge ? chalk.green('Yes') : chalk.red('No')}`);
|
|
561
|
+
console.log(` Review Required: ${branchAwareness.requiresReview ? chalk.yellow('Yes') : chalk.green('No')}`);
|
|
562
|
+
console.log('');
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
if (versionAwareness) {
|
|
566
|
+
console.log(chalk.cyan('šÆ Version Awareness:'));
|
|
567
|
+
console.log(` Current: ${chalk.white(versionAwareness.currentVersion)}`);
|
|
568
|
+
console.log(` Target: ${chalk.white(versionAwareness.targetVersion)}`);
|
|
569
|
+
console.log(` Phase: ${chalk.white(versionAwareness.developmentPhase)}`);
|
|
570
|
+
console.log(` Compatibility: ${chalk.white(versionAwareness.compatibilityLevel)}`);
|
|
571
|
+
console.log('');
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
console.log(chalk.cyan('š Available Commands:'));
|
|
575
|
+
console.log(` ossa worktree sync ${agent} # Sync with remote`);
|
|
576
|
+
console.log(` ossa worktree integrate ${agent} # Coordinate integration`);
|
|
577
|
+
console.log(` ossa worktree cleanup ${agent} # Clean up when done`);
|
|
578
|
+
|
|
579
|
+
} catch (error) {
|
|
580
|
+
console.error(chalk.red('ā Failed to get status:'), (error as Error).message);
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
// Utility functions
|
|
586
|
+
function isValidAgentName(name: string): boolean {
|
|
587
|
+
// OSSA naming convention: [scope-]domain-role[-framework]
|
|
588
|
+
const pattern = /^([a-z0-9]+-)?(([a-z0-9]+)-([a-z0-9]+))(-[a-z0-9]+)?$/;
|
|
589
|
+
return pattern.test(name);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
function findGitRepository(): string | null {
|
|
593
|
+
let currentDir = process.cwd();
|
|
594
|
+
|
|
595
|
+
while (currentDir !== '/') {
|
|
596
|
+
if (existsSync(resolve(currentDir, '.git'))) {
|
|
597
|
+
return currentDir;
|
|
598
|
+
}
|
|
599
|
+
currentDir = resolve(currentDir, '..');
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
return null;
|
|
603
|
+
}
|