@bluefly/openstandardagents 0.5.0 → 0.5.3
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/.well-known/agent-card.json +28 -0
- package/.well-known/ossa.json +22 -0
- package/CHANGELOG.md +70 -21
- package/README.md +41 -692
- package/docs/README.md +59 -0
- package/docs/migration-v0.5.2.md +18 -0
- package/docs/spec.md +41 -0
- package/package.json +57 -355
- package/packages/cli/dist/cli.d.ts +1 -0
- package/packages/cli/dist/cli.js +128 -0
- package/packages/cli/package.json +25 -0
- package/packages/discovery/dist/index.d.ts +10 -0
- package/packages/discovery/dist/index.js +20 -0
- package/packages/discovery/package.json +25 -0
- package/packages/identity/dist/index.d.ts +3 -0
- package/packages/identity/dist/index.js +11 -0
- package/packages/identity/package.json +26 -0
- package/packages/policy/dist/index.d.ts +62 -0
- package/packages/policy/dist/index.js +17 -0
- package/packages/policy/package.json +22 -0
- package/packages/schema/package.json +14 -0
- package/packages/validator/dist/index.d.ts +13 -0
- package/packages/validator/dist/index.js +90 -0
- package/packages/validator/package.json +28 -0
- package/spec/reference/compliance-engine.openapi.yaml +84 -0
- package/spec/reference/reference-agents/advisor-pattern-example/manifest.ossa.yaml +57 -0
- package/spec/reference/reference-agents/compliance-auditor/manifest.ossa.yaml +0 -6
- package/spec/reference/reference-agents/doc-agent/manifest.ossa.yaml +1 -1
- package/spec/reference/reference-agents/mr-reviewer/manifest.ossa.yaml +1 -1
- package/spec/reference/reference-agents/mr-reviewer/system-prompt.md +1 -1
- package/spec/reference/reference-agents/ossa-validator-v0.3/manifest.ossa.yaml +1 -4
- package/spec/v0.5/agent-builder-openapi.yaml +230 -0
- package/spec/v0.5/agent-card.schema.json +2 -2
- package/spec/v0.5/agent.schema.json +321 -9
- package/spec/v0.5/conformance/profiles/baseline.json +7 -1
- package/spec/v0.5/extensions/a2a/a2a.schema.json +1 -1
- package/spec/v0.5/extensions/ag2/README.md +38 -0
- package/spec/v0.5/extensions/cognition/README.md +38 -0
- package/spec/v0.5/extensions/cognition/cognition.schema.json +78 -1
- package/spec/v0.5/extensions/crewai/README.md +76 -0
- package/spec/v0.5/extensions/drupal/README.md +39 -0
- package/spec/v0.5/extensions/duadp/duadp-export-bundle.schema.json +47 -0
- package/spec/v0.5/extensions/duadp/duadp-validation-report.schema.json +54 -0
- package/spec/v0.5/extensions/economics/README.md +39 -0
- package/spec/v0.5/extensions/economics/context-pack.schema.json +91 -0
- package/spec/v0.5/extensions/economics/execution-profile.schema.json +148 -0
- package/spec/v0.5/extensions/economics/failure-semantics.schema.json +32 -0
- package/spec/v0.5/extensions/economics/replay-packet.schema.json +120 -0
- package/spec/v0.5/extensions/emotion.schema.json +47 -0
- package/spec/v0.5/extensions/evals/README.md +49 -0
- package/spec/v0.5/extensions/governance/README.md +61 -0
- package/spec/v0.5/extensions/governance/governance.schema.json +117 -0
- package/spec/v0.5/extensions/identity/README.md +50 -0
- package/spec/v0.5/extensions/kagent/kagent.schema.json +51 -0
- package/spec/v0.5/extensions/langchain/README.md +79 -0
- package/spec/v0.5/extensions/langgraph/README.md +97 -0
- package/spec/v0.5/extensions/mcp/README.md +1 -1
- package/spec/v0.5/extensions/memory/README.md +92 -0
- package/spec/v0.5/extensions/memory/governed-memory.schema.json +108 -0
- package/spec/v0.5/extensions/memory/memory-contract.schema.json +240 -0
- package/spec/v0.5/extensions/team/README.md +51 -0
- package/spec/v0.5/extensions/token-efficiency/README.md +55 -0
- package/spec/v0.5/invocation.openapi.yaml +120 -0
- package/spec/v0.5/memory-contract.schema.json +300 -0
- package/spec/v0.5/memory-hierarchy.yaml +120 -0
- package/spec/v0.5/policy-binding.schema.json +38 -0
- package/spec/v0.5/registry.schema.json +31 -0
- package/spec/v0.5/role.schema.json +173 -0
- package/spec/v0.5/workflow.schema.json +53 -0
- package/.version.json +0 -7
- package/bin/ossa +0 -11
- package/bin/ossa-dev +0 -8
- package/bin/ossa-validate-all +0 -55
- package/bin/ossa-version +0 -23
- package/bin/postinstall +0 -62
- package/dist/.version.json +0 -7
- package/dist/adapters/a2a/__tests__/mcp-integration.spec.d.ts +0 -5
- package/dist/adapters/a2a/__tests__/mcp-integration.spec.js +0 -268
- package/dist/adapters/a2a/__tests__/mcp-transport.spec.d.ts +0 -5
- package/dist/adapters/a2a/__tests__/mcp-transport.spec.js +0 -203
- package/dist/adapters/a2a/a2a-protocol.d.ts +0 -398
- package/dist/adapters/a2a/a2a-protocol.js +0 -257
- package/dist/adapters/a2a/a2a-tool.d.ts +0 -110
- package/dist/adapters/a2a/a2a-tool.js +0 -349
- package/dist/adapters/a2a/agent-mesh.d.ts +0 -195
- package/dist/adapters/a2a/agent-mesh.js +0 -347
- package/dist/adapters/a2a/delegation.d.ts +0 -232
- package/dist/adapters/a2a/delegation.js +0 -236
- package/dist/adapters/a2a/index.d.ts +0 -18
- package/dist/adapters/a2a/index.js +0 -24
- package/dist/adapters/a2a/mcp-integration.d.ts +0 -258
- package/dist/adapters/a2a/mcp-integration.js +0 -328
- package/dist/adapters/a2a/mcp-transport.d.ts +0 -124
- package/dist/adapters/a2a/mcp-transport.js +0 -302
- package/dist/adapters/a2a/swarm-orchestration.d.ts +0 -278
- package/dist/adapters/a2a/swarm-orchestration.js +0 -322
- package/dist/adapters/agent-skills/exporter.d.ts +0 -98
- package/dist/adapters/agent-skills/exporter.js +0 -460
- package/dist/adapters/agent-skills/index.d.ts +0 -7
- package/dist/adapters/agent-skills/index.js +0 -6
- package/dist/adapters/anthropic/claude-optimizations.d.ts +0 -44
- package/dist/adapters/anthropic/claude-optimizations.js +0 -187
- package/dist/adapters/anthropic/client.d.ts +0 -56
- package/dist/adapters/anthropic/client.js +0 -105
- package/dist/adapters/anthropic/config-adapter.d.ts +0 -22
- package/dist/adapters/anthropic/config-adapter.js +0 -48
- package/dist/adapters/anthropic/config.d.ts +0 -149
- package/dist/adapters/anthropic/config.js +0 -157
- package/dist/adapters/anthropic/index.d.ts +0 -19
- package/dist/adapters/anthropic/index.js +0 -20
- package/dist/adapters/anthropic/messages.d.ts +0 -93
- package/dist/adapters/anthropic/messages.js +0 -285
- package/dist/adapters/anthropic/tools.d.ts +0 -111
- package/dist/adapters/anthropic/tools.js +0 -272
- package/dist/adapters/autogen/config-adapter.d.ts +0 -22
- package/dist/adapters/autogen/config-adapter.js +0 -72
- package/dist/adapters/base/adapter.interface.d.ts +0 -327
- package/dist/adapters/base/adapter.interface.js +0 -138
- package/dist/adapters/base/base-exporter.d.ts +0 -108
- package/dist/adapters/base/base-exporter.js +0 -165
- package/dist/adapters/base/common-file-generator.d.ts +0 -217
- package/dist/adapters/base/common-file-generator.js +0 -719
- package/dist/adapters/base/index.d.ts +0 -23
- package/dist/adapters/base/index.js +0 -29
- package/dist/adapters/base/manifest-validator.d.ts +0 -82
- package/dist/adapters/base/manifest-validator.js +0 -264
- package/dist/adapters/base/perfect-agent-utils.d.ts +0 -29
- package/dist/adapters/base/perfect-agent-utils.js +0 -327
- package/dist/adapters/base/template-engine.d.ts +0 -52
- package/dist/adapters/base/template-engine.js +0 -157
- package/dist/adapters/base/tool-params.d.ts +0 -42
- package/dist/adapters/base/tool-params.js +0 -123
- package/dist/adapters/claude-agent-sdk/adapter.d.ts +0 -58
- package/dist/adapters/claude-agent-sdk/adapter.js +0 -705
- package/dist/adapters/claude-agent-sdk/index.d.ts +0 -9
- package/dist/adapters/claude-agent-sdk/index.js +0 -8
- package/dist/adapters/claude-agent-sdk/types.d.ts +0 -135
- package/dist/adapters/claude-agent-sdk/types.js +0 -14
- package/dist/adapters/claude-code/adapter.d.ts +0 -64
- package/dist/adapters/claude-code/adapter.js +0 -341
- package/dist/adapters/claude-code/types.d.ts +0 -154
- package/dist/adapters/claude-code/types.js +0 -6
- package/dist/adapters/crewai/adapter.d.ts +0 -109
- package/dist/adapters/crewai/adapter.js +0 -1769
- package/dist/adapters/crewai/converter.d.ts +0 -25
- package/dist/adapters/crewai/converter.js +0 -141
- package/dist/adapters/crewai/index.d.ts +0 -7
- package/dist/adapters/crewai/index.js +0 -6
- package/dist/adapters/crewai/types.d.ts +0 -29
- package/dist/adapters/crewai/types.js +0 -5
- package/dist/adapters/crewai-adapter.d.ts +0 -57
- package/dist/adapters/crewai-adapter.js +0 -166
- package/dist/adapters/cursor/adapter.d.ts +0 -75
- package/dist/adapters/cursor/adapter.js +0 -478
- package/dist/adapters/cursor/types.d.ts +0 -221
- package/dist/adapters/cursor/types.js +0 -6
- package/dist/adapters/docker/config-adapter.d.ts +0 -22
- package/dist/adapters/docker/config-adapter.js +0 -54
- package/dist/adapters/docker/docker-exporter.d.ts +0 -38
- package/dist/adapters/docker/docker-exporter.js +0 -648
- package/dist/adapters/docker/generators.d.ts +0 -85
- package/dist/adapters/docker/generators.js +0 -783
- package/dist/adapters/docker/index.d.ts +0 -8
- package/dist/adapters/docker/index.js +0 -7
- package/dist/adapters/docker/types.d.ts +0 -87
- package/dist/adapters/docker/types.js +0 -5
- package/dist/adapters/drupal/adapter.d.ts +0 -59
- package/dist/adapters/drupal/adapter.js +0 -430
- package/dist/adapters/drupal/drupal-utils.d.ts +0 -213
- package/dist/adapters/drupal/drupal-utils.js +0 -313
- package/dist/adapters/drupal/generator.d.ts +0 -303
- package/dist/adapters/drupal/generator.js +0 -2628
- package/dist/adapters/drupal/index.d.ts +0 -113
- package/dist/adapters/drupal/index.js +0 -299
- package/dist/adapters/drupal/manifest-exporter.d.ts +0 -115
- package/dist/adapters/drupal/manifest-exporter.js +0 -584
- package/dist/adapters/fusioninventory/config-adapter.d.ts +0 -22
- package/dist/adapters/fusioninventory/config-adapter.js +0 -145
- package/dist/adapters/fusioninventory/types.d.ts +0 -40
- package/dist/adapters/fusioninventory/types.js +0 -29
- package/dist/adapters/gitlab/agent-generator.d.ts +0 -103
- package/dist/adapters/gitlab/agent-generator.js +0 -908
- package/dist/adapters/gitlab/converter.d.ts +0 -35
- package/dist/adapters/gitlab/converter.js +0 -113
- package/dist/adapters/gitlab/external-agent-generator.d.ts +0 -70
- package/dist/adapters/gitlab/external-agent-generator.js +0 -347
- package/dist/adapters/gitlab/flow-generator.d.ts +0 -73
- package/dist/adapters/gitlab/flow-generator.js +0 -710
- package/dist/adapters/gitlab/index.d.ts +0 -15
- package/dist/adapters/gitlab/index.js +0 -11
- package/dist/adapters/gitlab/package-generator.d.ts +0 -180
- package/dist/adapters/gitlab/package-generator.js +0 -2400
- package/dist/adapters/gitlab/router-generator.d.ts +0 -113
- package/dist/adapters/gitlab/router-generator.js +0 -545
- package/dist/adapters/gitlab/trigger-generator.d.ts +0 -154
- package/dist/adapters/gitlab/trigger-generator.js +0 -279
- package/dist/adapters/gitlab/types.d.ts +0 -120
- package/dist/adapters/gitlab/types.js +0 -5
- package/dist/adapters/gitlab-duo/adapter.d.ts +0 -72
- package/dist/adapters/gitlab-duo/adapter.js +0 -350
- package/dist/adapters/index.d.ts +0 -14
- package/dist/adapters/index.js +0 -73
- package/dist/adapters/kubernetes/config-adapter.d.ts +0 -22
- package/dist/adapters/kubernetes/config-adapter.js +0 -112
- package/dist/adapters/kubernetes/generator.d.ts +0 -117
- package/dist/adapters/kubernetes/generator.js +0 -1386
- package/dist/adapters/kubernetes/index.d.ts +0 -7
- package/dist/adapters/kubernetes/index.js +0 -6
- package/dist/adapters/kubernetes/kagent-crd-generator.d.ts +0 -72
- package/dist/adapters/kubernetes/kagent-crd-generator.js +0 -237
- package/dist/adapters/kubernetes/types.d.ts +0 -62
- package/dist/adapters/kubernetes/types.js +0 -5
- package/dist/adapters/langchain/adapter.d.ts +0 -46
- package/dist/adapters/langchain/adapter.js +0 -289
- package/dist/adapters/langchain/converter.d.ts +0 -21
- package/dist/adapters/langchain/converter.js +0 -153
- package/dist/adapters/langchain/index.d.ts +0 -7
- package/dist/adapters/langchain/index.js +0 -6
- package/dist/adapters/langchain/types.d.ts +0 -27
- package/dist/adapters/langchain/types.js +0 -5
- package/dist/adapters/langchain-adapter.d.ts +0 -45
- package/dist/adapters/langchain-adapter.js +0 -132
- package/dist/adapters/langflow/platform-adapter.d.ts +0 -23
- package/dist/adapters/langflow/platform-adapter.js +0 -103
- package/dist/adapters/langflow-adapter.d.ts +0 -52
- package/dist/adapters/langflow-adapter.js +0 -247
- package/dist/adapters/langfuse.adapter.d.ts +0 -30
- package/dist/adapters/langfuse.adapter.js +0 -65
- package/dist/adapters/langsmith.adapter.d.ts +0 -29
- package/dist/adapters/langsmith.adapter.js +0 -62
- package/dist/adapters/mcp/adapter.d.ts +0 -49
- package/dist/adapters/mcp/adapter.js +0 -336
- package/dist/adapters/mcp/converter.d.ts +0 -32
- package/dist/adapters/mcp/converter.js +0 -343
- package/dist/adapters/mobile-agent/adapter.d.ts +0 -63
- package/dist/adapters/mobile-agent/adapter.js +0 -678
- package/dist/adapters/n8n/converter.d.ts +0 -17
- package/dist/adapters/n8n/converter.js +0 -77
- package/dist/adapters/n8n/index.d.ts +0 -7
- package/dist/adapters/n8n/index.js +0 -6
- package/dist/adapters/n8n/types.d.ts +0 -23
- package/dist/adapters/n8n/types.js +0 -5
- package/dist/adapters/npm/adapter.d.ts +0 -41
- package/dist/adapters/npm/adapter.js +0 -301
- package/dist/adapters/npm/converter.d.ts +0 -41
- package/dist/adapters/npm/converter.js +0 -357
- package/dist/adapters/npm/package-generator.d.ts +0 -93
- package/dist/adapters/npm/package-generator.js +0 -240
- package/dist/adapters/npm/type-aware-dependencies.d.ts +0 -19
- package/dist/adapters/npm/type-aware-dependencies.js +0 -160
- package/dist/adapters/npm/types.d.ts +0 -116
- package/dist/adapters/npm/types.js +0 -6
- package/dist/adapters/openai-agents/adapter.d.ts +0 -31
- package/dist/adapters/openai-agents/adapter.js +0 -346
- package/dist/adapters/openai-agents/config-adapter.d.ts +0 -25
- package/dist/adapters/openai-agents/config-adapter.js +0 -60
- package/dist/adapters/openai-agents/index.d.ts +0 -10
- package/dist/adapters/openai-agents/index.js +0 -10
- package/dist/adapters/openapi-adapter.d.ts +0 -93
- package/dist/adapters/openapi-adapter.js +0 -317
- package/dist/adapters/opentelemetry.adapter.d.ts +0 -142
- package/dist/adapters/opentelemetry.adapter.js +0 -375
- package/dist/adapters/phoenix.adapter.d.ts +0 -28
- package/dist/adapters/phoenix.adapter.js +0 -65
- package/dist/adapters/registry/platform-registry.d.ts +0 -69
- package/dist/adapters/registry/platform-registry.js +0 -94
- package/dist/adapters/semantic-kernel/config-adapter.d.ts +0 -22
- package/dist/adapters/semantic-kernel/config-adapter.js +0 -64
- package/dist/adapters/symfony/index.d.ts +0 -163
- package/dist/adapters/symfony/index.js +0 -272
- package/dist/adapters/symfony/platform-adapter.d.ts +0 -31
- package/dist/adapters/symfony/platform-adapter.js +0 -317
- package/dist/adapters/temporal/converter.d.ts +0 -17
- package/dist/adapters/temporal/converter.js +0 -96
- package/dist/adapters/temporal/index.d.ts +0 -7
- package/dist/adapters/temporal/index.js +0 -6
- package/dist/adapters/temporal/types.d.ts +0 -23
- package/dist/adapters/temporal/types.js +0 -5
- package/dist/adapters/warp/adapter.d.ts +0 -52
- package/dist/adapters/warp/adapter.js +0 -386
- package/dist/adapters/warp/types.d.ts +0 -140
- package/dist/adapters/warp/types.js +0 -6
- package/dist/api/index.d.ts +0 -13
- package/dist/api/index.js +0 -44
- package/dist/api/middleware/cors.d.ts +0 -6
- package/dist/api/middleware/cors.js +0 -17
- package/dist/api/middleware/error-handler.d.ts +0 -6
- package/dist/api/middleware/error-handler.js +0 -32
- package/dist/api/middleware/request-id.d.ts +0 -6
- package/dist/api/middleware/request-id.js +0 -12
- package/dist/api/middleware/validate.d.ts +0 -8
- package/dist/api/middleware/validate.js +0 -38
- package/dist/api/routes/agents-md.router.d.ts +0 -7
- package/dist/api/routes/agents-md.router.js +0 -93
- package/dist/api/routes/convert.router.d.ts +0 -6
- package/dist/api/routes/convert.router.js +0 -42
- package/dist/api/routes/export.router.d.ts +0 -6
- package/dist/api/routes/export.router.js +0 -44
- package/dist/api/routes/health.router.d.ts +0 -6
- package/dist/api/routes/health.router.js +0 -20
- package/dist/api/routes/manifests.router.d.ts +0 -6
- package/dist/api/routes/manifests.router.js +0 -128
- package/dist/api/routes/mcp.router.d.ts +0 -8
- package/dist/api/routes/mcp.router.js +0 -66
- package/dist/api/routes/skills.router.d.ts +0 -6
- package/dist/api/routes/skills.router.js +0 -53
- package/dist/api/routes/validate.router.d.ts +0 -7
- package/dist/api/routes/validate.router.js +0 -46
- package/dist/api/routes/version.router.d.ts +0 -6
- package/dist/api/routes/version.router.js +0 -28
- package/dist/api/routes/wizard.router.d.ts +0 -6
- package/dist/api/routes/wizard.router.js +0 -108
- package/dist/api/routes/workspace.router.d.ts +0 -6
- package/dist/api/routes/workspace.router.js +0 -52
- package/dist/api/server.d.ts +0 -10
- package/dist/api/server.js +0 -21
- package/dist/bot/agent-architecture_validator.d.ts +0 -8
- package/dist/bot/agent-architecture_validator.js +0 -15
- package/dist/bot/agent-ci_pipeline.d.ts +0 -7
- package/dist/bot/agent-ci_pipeline.js +0 -7
- package/dist/bot/agent-compliance.d.ts +0 -56
- package/dist/bot/agent-compliance.js +0 -222
- package/dist/bot/agent-dependency_updater.d.ts +0 -9
- package/dist/bot/agent-dependency_updater.js +0 -9
- package/dist/bot/agent-security_scanner.d.ts +0 -11
- package/dist/bot/agent-security_scanner.js +0 -21
- package/dist/cli/banner.d.ts +0 -25
- package/dist/cli/banner.js +0 -153
- package/dist/cli/commands/agent/discover-type.command.d.ts +0 -39
- package/dist/cli/commands/agent/discover-type.command.js +0 -332
- package/dist/cli/commands/agent-card.command.d.ts +0 -9
- package/dist/cli/commands/agent-card.command.js +0 -158
- package/dist/cli/commands/agent-wizard.command.d.ts +0 -21
- package/dist/cli/commands/agent-wizard.command.js +0 -1558
- package/dist/cli/commands/agents/delete.command.d.ts +0 -10
- package/dist/cli/commands/agents/delete.command.js +0 -105
- package/dist/cli/commands/agents/list.command.d.ts +0 -10
- package/dist/cli/commands/agents/list.command.js +0 -140
- package/dist/cli/commands/agents/persona.command.d.ts +0 -10
- package/dist/cli/commands/agents/persona.command.js +0 -519
- package/dist/cli/commands/agents/show.command.d.ts +0 -10
- package/dist/cli/commands/agents/show.command.js +0 -182
- package/dist/cli/commands/agents-local.command.d.ts +0 -10
- package/dist/cli/commands/agents-local.command.js +0 -281
- package/dist/cli/commands/agents-md/batch.command.d.ts +0 -3
- package/dist/cli/commands/agents-md/batch.command.js +0 -63
- package/dist/cli/commands/agents-md/generate.command.d.ts +0 -3
- package/dist/cli/commands/agents-md/generate.command.js +0 -43
- package/dist/cli/commands/agents-md/list.command.d.ts +0 -3
- package/dist/cli/commands/agents-md/list.command.js +0 -59
- package/dist/cli/commands/agents-md/validate.command.d.ts +0 -3
- package/dist/cli/commands/agents-md/validate.command.js +0 -42
- package/dist/cli/commands/agents-md.command.d.ts +0 -7
- package/dist/cli/commands/agents-md.command.js +0 -236
- package/dist/cli/commands/agents-sync.command.d.ts +0 -19
- package/dist/cli/commands/agents-sync.command.js +0 -268
- package/dist/cli/commands/agents.command.d.ts +0 -11
- package/dist/cli/commands/agents.command.js +0 -216
- package/dist/cli/commands/audit.d.ts +0 -8
- package/dist/cli/commands/audit.js +0 -268
- package/dist/cli/commands/build.command.d.ts +0 -7
- package/dist/cli/commands/build.command.js +0 -296
- package/dist/cli/commands/capability/create.command.d.ts +0 -7
- package/dist/cli/commands/capability/create.command.js +0 -225
- package/dist/cli/commands/capability/index.d.ts +0 -7
- package/dist/cli/commands/capability/index.js +0 -10
- package/dist/cli/commands/capability/validate.d.ts +0 -3
- package/dist/cli/commands/capability/validate.js +0 -62
- package/dist/cli/commands/catalog/config.d.ts +0 -54
- package/dist/cli/commands/catalog/config.js +0 -113
- package/dist/cli/commands/catalog/convert.command.d.ts +0 -8
- package/dist/cli/commands/catalog/convert.command.js +0 -106
- package/dist/cli/commands/catalog/index.d.ts +0 -17
- package/dist/cli/commands/catalog/index.js +0 -34
- package/dist/cli/commands/catalog/info.command.d.ts +0 -3
- package/dist/cli/commands/catalog/info.command.js +0 -137
- package/dist/cli/commands/catalog/list.command.d.ts +0 -8
- package/dist/cli/commands/catalog/list.command.js +0 -101
- package/dist/cli/commands/catalog/schemas.d.ts +0 -62
- package/dist/cli/commands/catalog/schemas.js +0 -55
- package/dist/cli/commands/catalog/search.command.d.ts +0 -3
- package/dist/cli/commands/catalog/search.command.js +0 -47
- package/dist/cli/commands/catalog/validate.command.d.ts +0 -8
- package/dist/cli/commands/catalog/validate.command.js +0 -140
- package/dist/cli/commands/compliance.command.d.ts +0 -19
- package/dist/cli/commands/compliance.command.js +0 -221
- package/dist/cli/commands/config.command.d.ts +0 -7
- package/dist/cli/commands/config.command.js +0 -92
- package/dist/cli/commands/conformance.command.d.ts +0 -14
- package/dist/cli/commands/conformance.command.js +0 -232
- package/dist/cli/commands/contract.command.d.ts +0 -15
- package/dist/cli/commands/contract.command.js +0 -381
- package/dist/cli/commands/daemon.command.d.ts +0 -9
- package/dist/cli/commands/daemon.command.js +0 -423
- package/dist/cli/commands/dependencies.command.d.ts +0 -15
- package/dist/cli/commands/dependencies.command.js +0 -274
- package/dist/cli/commands/deploy-enhanced.command.d.ts +0 -15
- package/dist/cli/commands/deploy-enhanced.command.js +0 -334
- package/dist/cli/commands/deploy.command.d.ts +0 -7
- package/dist/cli/commands/deploy.command.js +0 -83
- package/dist/cli/commands/deploy.d.ts +0 -22
- package/dist/cli/commands/deploy.js +0 -336
- package/dist/cli/commands/dev.command.d.ts +0 -20
- package/dist/cli/commands/dev.command.js +0 -78
- package/dist/cli/commands/diff.command.d.ts +0 -11
- package/dist/cli/commands/diff.command.js +0 -197
- package/dist/cli/commands/discover.d.ts +0 -15
- package/dist/cli/commands/discover.js +0 -211
- package/dist/cli/commands/docs.command.d.ts +0 -7
- package/dist/cli/commands/docs.command.js +0 -278
- package/dist/cli/commands/enhance.command.d.ts +0 -10
- package/dist/cli/commands/enhance.command.js +0 -119
- package/dist/cli/commands/ensure-uuid.command.d.ts +0 -7
- package/dist/cli/commands/ensure-uuid.command.js +0 -153
- package/dist/cli/commands/estimate.command.d.ts +0 -12
- package/dist/cli/commands/estimate.command.js +0 -226
- package/dist/cli/commands/examples.command.d.ts +0 -10
- package/dist/cli/commands/examples.command.js +0 -73
- package/dist/cli/commands/export-enhanced.command.d.ts +0 -7
- package/dist/cli/commands/export-enhanced.command.js +0 -149
- package/dist/cli/commands/export.command.d.ts +0 -15
- package/dist/cli/commands/export.command.js +0 -1028
- package/dist/cli/commands/extension-team.command.d.ts +0 -15
- package/dist/cli/commands/extension-team.command.js +0 -126
- package/dist/cli/commands/framework.command.d.ts +0 -9
- package/dist/cli/commands/framework.command.js +0 -194
- package/dist/cli/commands/generate/conformance.d.ts +0 -3
- package/dist/cli/commands/generate/conformance.js +0 -106
- package/dist/cli/commands/generate-gaid.command.d.ts +0 -14
- package/dist/cli/commands/generate-gaid.command.js +0 -141
- package/dist/cli/commands/generate.command.d.ts +0 -18
- package/dist/cli/commands/generate.command.js +0 -247
- package/dist/cli/commands/github-sync.command.d.ts +0 -3
- package/dist/cli/commands/github-sync.command.js +0 -51
- package/dist/cli/commands/gitlab-agent.command.d.ts +0 -8
- package/dist/cli/commands/gitlab-agent.command.js +0 -201
- package/dist/cli/commands/governance.command.d.ts +0 -11
- package/dist/cli/commands/governance.command.js +0 -166
- package/dist/cli/commands/identity/plan.d.ts +0 -3
- package/dist/cli/commands/identity/plan.js +0 -182
- package/dist/cli/commands/import.command.d.ts +0 -7
- package/dist/cli/commands/import.command.js +0 -71
- package/dist/cli/commands/info.command.d.ts +0 -3
- package/dist/cli/commands/info.command.js +0 -45
- package/dist/cli/commands/init.command.d.ts +0 -7
- package/dist/cli/commands/init.command.js +0 -165
- package/dist/cli/commands/install.command.d.ts +0 -3
- package/dist/cli/commands/install.command.js +0 -43
- package/dist/cli/commands/knowledge-index.command.d.ts +0 -11
- package/dist/cli/commands/knowledge-index.command.js +0 -111
- package/dist/cli/commands/knowledge-query.command.d.ts +0 -11
- package/dist/cli/commands/knowledge-query.command.js +0 -118
- package/dist/cli/commands/knowledge.command.d.ts +0 -11
- package/dist/cli/commands/knowledge.command.js +0 -16
- package/dist/cli/commands/langchain.command.d.ts +0 -9
- package/dist/cli/commands/langchain.command.js +0 -113
- package/dist/cli/commands/langflow.command.d.ts +0 -9
- package/dist/cli/commands/langflow.command.js +0 -111
- package/dist/cli/commands/lifecycle.command.d.ts +0 -29
- package/dist/cli/commands/lifecycle.command.js +0 -495
- package/dist/cli/commands/lint.command.d.ts +0 -12
- package/dist/cli/commands/lint.command.js +0 -377
- package/dist/cli/commands/llms-txt.command.d.ts +0 -7
- package/dist/cli/commands/llms-txt.command.js +0 -118
- package/dist/cli/commands/manifest/diff.command.d.ts +0 -7
- package/dist/cli/commands/manifest/diff.command.js +0 -186
- package/dist/cli/commands/manifest/explain.command.d.ts +0 -7
- package/dist/cli/commands/manifest/explain.command.js +0 -193
- package/dist/cli/commands/manifest/index.d.ts +0 -7
- package/dist/cli/commands/manifest/index.js +0 -12
- package/dist/cli/commands/mcp.command.d.ts +0 -9
- package/dist/cli/commands/mcp.command.js +0 -110
- package/dist/cli/commands/migrate-batch.command.d.ts +0 -19
- package/dist/cli/commands/migrate-batch.command.js +0 -223
- package/dist/cli/commands/migrate-langchain.command.d.ts +0 -23
- package/dist/cli/commands/migrate-langchain.command.js +0 -167
- package/dist/cli/commands/migrate.command.d.ts +0 -10
- package/dist/cli/commands/migrate.command.js +0 -103
- package/dist/cli/commands/platforms.command.d.ts +0 -7
- package/dist/cli/commands/platforms.command.js +0 -90
- package/dist/cli/commands/policy.command.d.ts +0 -11
- package/dist/cli/commands/policy.command.js +0 -85
- package/dist/cli/commands/publish.command.d.ts +0 -3
- package/dist/cli/commands/publish.command.js +0 -115
- package/dist/cli/commands/quickstart.command.d.ts +0 -10
- package/dist/cli/commands/quickstart.command.js +0 -238
- package/dist/cli/commands/register.d.ts +0 -12
- package/dist/cli/commands/register.js +0 -200
- package/dist/cli/commands/registry.command.d.ts +0 -18
- package/dist/cli/commands/registry.command.js +0 -433
- package/dist/cli/commands/release.command.d.ts +0 -10
- package/dist/cli/commands/release.command.js +0 -73
- package/dist/cli/commands/rollback.command.d.ts +0 -13
- package/dist/cli/commands/rollback.command.js +0 -169
- package/dist/cli/commands/run.command.d.ts +0 -7
- package/dist/cli/commands/run.command.js +0 -141
- package/dist/cli/commands/scaffold.command.d.ts +0 -19
- package/dist/cli/commands/scaffold.command.js +0 -240
- package/dist/cli/commands/schema.command.d.ts +0 -11
- package/dist/cli/commands/schema.command.js +0 -82
- package/dist/cli/commands/search.command.d.ts +0 -3
- package/dist/cli/commands/search.command.js +0 -74
- package/dist/cli/commands/serve-builder-routes.d.ts +0 -17
- package/dist/cli/commands/serve-builder-routes.js +0 -390
- package/dist/cli/commands/serve.command.d.ts +0 -7
- package/dist/cli/commands/serve.command.js +0 -237
- package/dist/cli/commands/sign.command.d.ts +0 -3
- package/dist/cli/commands/sign.command.js +0 -42
- package/dist/cli/commands/skills.command.d.ts +0 -10
- package/dist/cli/commands/skills.command.js +0 -649
- package/dist/cli/commands/standardize.command.d.ts +0 -19
- package/dist/cli/commands/standardize.command.js +0 -290
- package/dist/cli/commands/sync.command.d.ts +0 -3
- package/dist/cli/commands/sync.command.js +0 -51
- package/dist/cli/commands/taxonomy.command.d.ts +0 -10
- package/dist/cli/commands/taxonomy.command.js +0 -379
- package/dist/cli/commands/template.command.d.ts +0 -7
- package/dist/cli/commands/template.command.js +0 -159
- package/dist/cli/commands/test.command.d.ts +0 -12
- package/dist/cli/commands/test.command.js +0 -233
- package/dist/cli/commands/tool/create.command.d.ts +0 -12
- package/dist/cli/commands/tool/create.command.js +0 -276
- package/dist/cli/commands/tool/index.d.ts +0 -7
- package/dist/cli/commands/tool/index.js +0 -14
- package/dist/cli/commands/tool/list.command.d.ts +0 -7
- package/dist/cli/commands/tool/list.command.js +0 -268
- package/dist/cli/commands/tool/validate.command.d.ts +0 -7
- package/dist/cli/commands/tool/validate.command.js +0 -103
- package/dist/cli/commands/types/wizard-config.types.d.ts +0 -59
- package/dist/cli/commands/types/wizard-config.types.js +0 -34
- package/dist/cli/commands/update.command.d.ts +0 -3
- package/dist/cli/commands/update.command.js +0 -43
- package/dist/cli/commands/upgrade.command.d.ts +0 -9
- package/dist/cli/commands/upgrade.command.js +0 -179
- package/dist/cli/commands/validate.command.d.ts +0 -11
- package/dist/cli/commands/validate.command.js +0 -389
- package/dist/cli/commands/verify.d.ts +0 -15
- package/dist/cli/commands/verify.js +0 -301
- package/dist/cli/commands/wizard-api-first.command.d.ts +0 -18
- package/dist/cli/commands/wizard-api-first.command.js +0 -1073
- package/dist/cli/commands/wizard-interactive.command.d.ts +0 -25
- package/dist/cli/commands/wizard-interactive.command.js +0 -3467
- package/dist/cli/commands/wizard.command.d.ts +0 -12
- package/dist/cli/commands/wizard.command.js +0 -844
- package/dist/cli/commands/workspace.command.d.ts +0 -15
- package/dist/cli/commands/workspace.command.js +0 -629
- package/dist/cli/extensions/gitlab-release.commands.d.ts +0 -19
- package/dist/cli/extensions/gitlab-release.commands.js +0 -345
- package/dist/cli/extensions/gitlab.extension.d.ts +0 -24
- package/dist/cli/extensions/gitlab.extension.js +0 -65
- package/dist/cli/extensions/index.d.ts +0 -63
- package/dist/cli/extensions/index.js +0 -182
- package/dist/cli/index.d.ts +0 -17
- package/dist/cli/index.js +0 -350
- package/dist/cli/schema-driven/index.d.ts +0 -27
- package/dist/cli/schema-driven/index.js +0 -34
- package/dist/cli/schema-driven/schema-loader.d.ts +0 -115
- package/dist/cli/schema-driven/schema-loader.js +0 -280
- package/dist/cli/schema-driven/ui-generator.d.ts +0 -88
- package/dist/cli/schema-driven/ui-generator.js +0 -335
- package/dist/cli/skills-wizard/skill-wizard.d.ts +0 -25
- package/dist/cli/skills-wizard/skill-wizard.js +0 -195
- package/dist/cli/templates/agent-templates.d.ts +0 -49
- package/dist/cli/templates/agent-templates.js +0 -237
- package/dist/cli/templates/enhanced-templates.d.ts +0 -32
- package/dist/cli/templates/enhanced-templates.js +0 -650
- package/dist/cli/utils/error-formatter.d.ts +0 -19
- package/dist/cli/utils/error-formatter.js +0 -352
- package/dist/cli/utils/gitlab-config.d.ts +0 -94
- package/dist/cli/utils/gitlab-config.js +0 -182
- package/dist/cli/utils/index.d.ts +0 -12
- package/dist/cli/utils/index.js +0 -17
- package/dist/cli/utils/logo.d.ts +0 -10
- package/dist/cli/utils/logo.js +0 -49
- package/dist/cli/utils/manifest-discovery.d.ts +0 -63
- package/dist/cli/utils/manifest-discovery.js +0 -201
- package/dist/cli/utils/manifest-loader.d.ts +0 -77
- package/dist/cli/utils/manifest-loader.js +0 -153
- package/dist/cli/utils/migration-reporter.d.ts +0 -96
- package/dist/cli/utils/migration-reporter.js +0 -253
- package/dist/cli/utils/output.d.ts +0 -134
- package/dist/cli/utils/output.js +0 -203
- package/dist/cli/utils/standard-options.d.ts +0 -144
- package/dist/cli/utils/standard-options.js +0 -246
- package/dist/cli/utils/validation-builder.d.ts +0 -121
- package/dist/cli/utils/validation-builder.js +0 -322
- package/dist/cli/wizard/data/agent-types.d.ts +0 -7
- package/dist/cli/wizard/data/agent-types.js +0 -192
- package/dist/cli/wizard/data/llm-providers.d.ts +0 -10
- package/dist/cli/wizard/data/llm-providers.js +0 -176
- package/dist/cli/wizard/data/taxonomy.d.ts +0 -39
- package/dist/cli/wizard/data/taxonomy.js +0 -138
- package/dist/cli/wizard/data/templates.d.ts +0 -10
- package/dist/cli/wizard/data/templates.js +0 -228
- package/dist/cli/wizard/engine/wizard-engine.d.ts +0 -47
- package/dist/cli/wizard/engine/wizard-engine.js +0 -193
- package/dist/cli/wizard/interactive-wizard.d.ts +0 -26
- package/dist/cli/wizard/interactive-wizard.js +0 -309
- package/dist/cli/wizard/steps/01-agent-type.d.ts +0 -7
- package/dist/cli/wizard/steps/01-agent-type.js +0 -35
- package/dist/cli/wizard/steps/02-basic-info.d.ts +0 -7
- package/dist/cli/wizard/steps/02-basic-info.js +0 -81
- package/dist/cli/wizard/steps/03-domain-capability.d.ts +0 -7
- package/dist/cli/wizard/steps/03-domain-capability.js +0 -98
- package/dist/cli/wizard/steps/04-llm-config.d.ts +0 -7
- package/dist/cli/wizard/steps/04-llm-config.js +0 -86
- package/dist/cli/wizard/steps/04a-persona.d.ts +0 -16
- package/dist/cli/wizard/steps/04a-persona.js +0 -297
- package/dist/cli/wizard/steps/05-tools.d.ts +0 -7
- package/dist/cli/wizard/steps/05-tools.js +0 -200
- package/dist/cli/wizard/steps/06-autonomy.d.ts +0 -7
- package/dist/cli/wizard/steps/06-autonomy.js +0 -87
- package/dist/cli/wizard/steps/07-observability.d.ts +0 -7
- package/dist/cli/wizard/steps/07-observability.js +0 -149
- package/dist/cli/wizard/steps/08-deployment.d.ts +0 -7
- package/dist/cli/wizard/steps/08-deployment.js +0 -122
- package/dist/cli/wizard/steps/08a-target-platforms.d.ts +0 -7
- package/dist/cli/wizard/steps/08a-target-platforms.js +0 -50
- package/dist/cli/wizard/steps/09-advanced.d.ts +0 -7
- package/dist/cli/wizard/steps/09-advanced.js +0 -160
- package/dist/cli/wizard/steps/09a-token-efficiency.d.ts +0 -8
- package/dist/cli/wizard/steps/09a-token-efficiency.js +0 -153
- package/dist/cli/wizard/steps/09b-separation-of-duties.d.ts +0 -7
- package/dist/cli/wizard/steps/09b-separation-of-duties.js +0 -93
- package/dist/cli/wizard/steps/09c-agents-md.d.ts +0 -8
- package/dist/cli/wizard/steps/09c-agents-md.js +0 -61
- package/dist/cli/wizard/steps/09d-drupal-tools-eca.d.ts +0 -8
- package/dist/cli/wizard/steps/09d-drupal-tools-eca.js +0 -52
- package/dist/cli/wizard/steps/09e-memory-management.d.ts +0 -9
- package/dist/cli/wizard/steps/09e-memory-management.js +0 -188
- package/dist/cli/wizard/steps/10-review.d.ts +0 -7
- package/dist/cli/wizard/steps/10-review.js +0 -173
- package/dist/cli/wizard/steps/12-agents-folder.d.ts +0 -7
- package/dist/cli/wizard/steps/12-agents-folder.js +0 -105
- package/dist/cli/wizard/steps/13-openapi-generation.d.ts +0 -7
- package/dist/cli/wizard/steps/13-openapi-generation.js +0 -68
- package/dist/cli/wizard/steps/14-workspace-registration.d.ts +0 -7
- package/dist/cli/wizard/steps/14-workspace-registration.js +0 -72
- package/dist/cli/wizard/steps/15-cost-estimation.d.ts +0 -7
- package/dist/cli/wizard/steps/15-cost-estimation.js +0 -135
- package/dist/cli/wizard/steps/16-best-practices.d.ts +0 -7
- package/dist/cli/wizard/steps/16-best-practices.js +0 -181
- package/dist/cli/wizard/steps/index.d.ts +0 -21
- package/dist/cli/wizard/steps/index.js +0 -21
- package/dist/cli/wizard/template-catalog.d.ts +0 -32
- package/dist/cli/wizard/template-catalog.js +0 -99
- package/dist/cli/wizard/types.d.ts +0 -132
- package/dist/cli/wizard/types.js +0 -6
- package/dist/cli/wizard/ui/banner.d.ts +0 -20
- package/dist/cli/wizard/ui/banner.js +0 -66
- package/dist/cli/wizard/ui/console.d.ts +0 -26
- package/dist/cli/wizard/ui/console.js +0 -102
- package/dist/cli/wizard/ui/wizard-ui.d.ts +0 -75
- package/dist/cli/wizard/ui/wizard-ui.js +0 -150
- package/dist/cli/wizard/use-cases.d.ts +0 -37
- package/dist/cli/wizard/use-cases.js +0 -157
- package/dist/cli/wizard/validators/index.d.ts +0 -11
- package/dist/cli/wizard/validators/index.js +0 -35
- package/dist/confidence/index.d.ts +0 -67
- package/dist/confidence/index.js +0 -130
- package/dist/config/cli-config.d.ts +0 -33
- package/dist/config/cli-config.js +0 -107
- package/dist/config/defaults.d.ts +0 -197
- package/dist/config/defaults.js +0 -299
- package/dist/converters/skill-md-converter.d.ts +0 -72
- package/dist/converters/skill-md-converter.js +0 -169
- package/dist/data/marketplace-skills-catalog.d.ts +0 -119
- package/dist/data/marketplace-skills-catalog.js +0 -147
- package/dist/data/platform-matrix.d.ts +0 -43
- package/dist/data/platform-matrix.js +0 -500
- package/dist/deploy/base-driver.d.ts +0 -39
- package/dist/deploy/base-driver.js +0 -63
- package/dist/deploy/cloud/aws-driver.d.ts +0 -75
- package/dist/deploy/cloud/aws-driver.js +0 -349
- package/dist/deploy/cloud/azure-driver.d.ts +0 -54
- package/dist/deploy/cloud/azure-driver.js +0 -221
- package/dist/deploy/cloud/gcp-driver.d.ts +0 -56
- package/dist/deploy/cloud/gcp-driver.js +0 -216
- package/dist/deploy/docker-driver.d.ts +0 -32
- package/dist/deploy/docker-driver.js +0 -246
- package/dist/deploy/index.d.ts +0 -15
- package/dist/deploy/index.js +0 -28
- package/dist/deploy/k8s-driver.d.ts +0 -40
- package/dist/deploy/k8s-driver.js +0 -380
- package/dist/deploy/local-driver.d.ts +0 -20
- package/dist/deploy/local-driver.js +0 -150
- package/dist/deploy/types.d.ts +0 -104
- package/dist/deploy/types.js +0 -6
- package/dist/di-container.d.ts +0 -23
- package/dist/di-container.js +0 -200
- package/dist/errors/index.d.ts +0 -154
- package/dist/errors/index.js +0 -327
- package/dist/generated/types.d.ts +0 -691
- package/dist/generated/types.js +0 -6
- package/dist/index.d.ts +0 -10
- package/dist/index.js +0 -12
- package/dist/interfaces/governance-provider.interface.d.ts +0 -95
- package/dist/interfaces/governance-provider.interface.js +0 -17
- package/dist/mcp-server/__tests__/mcp-server.spec.d.ts +0 -8
- package/dist/mcp-server/__tests__/mcp-server.spec.js +0 -566
- package/dist/mcp-server/index.d.ts +0 -21
- package/dist/mcp-server/index.js +0 -2190
- package/dist/mesh/advanced-routing.d.ts +0 -181
- package/dist/mesh/advanced-routing.js +0 -479
- package/dist/mesh/agent-graph.d.ts +0 -218
- package/dist/mesh/agent-graph.js +0 -493
- package/dist/mesh/client.d.ts +0 -144
- package/dist/mesh/client.js +0 -427
- package/dist/mesh/discovery-providers.d.ts +0 -162
- package/dist/mesh/discovery-providers.js +0 -520
- package/dist/mesh/discovery.d.ts +0 -176
- package/dist/mesh/discovery.js +0 -289
- package/dist/mesh/index.d.ts +0 -92
- package/dist/mesh/index.js +0 -98
- package/dist/mesh/routing.d.ts +0 -158
- package/dist/mesh/routing.js +0 -363
- package/dist/mesh/types.d.ts +0 -889
- package/dist/mesh/types.js +0 -6
- package/dist/messaging/broker.d.ts +0 -76
- package/dist/messaging/broker.js +0 -147
- package/dist/messaging/channels.d.ts +0 -70
- package/dist/messaging/channels.js +0 -187
- package/dist/messaging/index.d.ts +0 -10
- package/dist/messaging/index.js +0 -10
- package/dist/messaging/protocols/memory.d.ts +0 -83
- package/dist/messaging/protocols/memory.js +0 -290
- package/dist/messaging/protocols/redis.d.ts +0 -83
- package/dist/messaging/protocols/redis.js +0 -223
- package/dist/messaging/types.d.ts +0 -180
- package/dist/messaging/types.js +0 -6
- package/dist/messenger/Commands/MessengerConsumeCommand.d.ts +0 -57
- package/dist/messenger/Commands/MessengerConsumeCommand.js +0 -49
- package/dist/messenger/Commands/MessengerFailedCommand.d.ts +0 -76
- package/dist/messenger/Commands/MessengerFailedCommand.js +0 -120
- package/dist/messenger/Commands/MessengerStatsCommand.d.ts +0 -61
- package/dist/messenger/Commands/MessengerStatsCommand.js +0 -80
- package/dist/messenger/Commands/index.d.ts +0 -10
- package/dist/messenger/Commands/index.js +0 -10
- package/dist/messenger/EventSubscriber/FailedMessageSubscriber.d.ts +0 -44
- package/dist/messenger/EventSubscriber/FailedMessageSubscriber.js +0 -64
- package/dist/messenger/Handler/AgentBatchHandler.d.ts +0 -80
- package/dist/messenger/Handler/AgentBatchHandler.js +0 -211
- package/dist/messenger/Handler/AgentExecutionHandler.d.ts +0 -76
- package/dist/messenger/Handler/AgentExecutionHandler.js +0 -131
- package/dist/messenger/Handler/index.d.ts +0 -9
- package/dist/messenger/Handler/index.js +0 -9
- package/dist/messenger/Message/AgentBatchMessage.d.ts +0 -115
- package/dist/messenger/Message/AgentBatchMessage.js +0 -102
- package/dist/messenger/Message/AgentExecutionMessage.d.ts +0 -98
- package/dist/messenger/Message/AgentExecutionMessage.js +0 -77
- package/dist/messenger/Message/index.d.ts +0 -9
- package/dist/messenger/Message/index.js +0 -9
- package/dist/messenger/Middleware/AuthenticationMiddleware.d.ts +0 -41
- package/dist/messenger/Middleware/AuthenticationMiddleware.js +0 -84
- package/dist/messenger/Middleware/LoggingMiddleware.d.ts +0 -30
- package/dist/messenger/Middleware/LoggingMiddleware.js +0 -59
- package/dist/messenger/Middleware/RateLimitMiddleware.d.ts +0 -67
- package/dist/messenger/Middleware/RateLimitMiddleware.js +0 -90
- package/dist/messenger/Middleware/ValidationMiddleware.d.ts +0 -39
- package/dist/messenger/Middleware/ValidationMiddleware.js +0 -96
- package/dist/messenger/Middleware/index.d.ts +0 -11
- package/dist/messenger/Middleware/index.js +0 -11
- package/dist/messenger/Monitoring/MetricsCollector.d.ts +0 -107
- package/dist/messenger/Monitoring/MetricsCollector.js +0 -80
- package/dist/messenger/Monitoring/QueueMonitor.d.ts +0 -74
- package/dist/messenger/Monitoring/QueueMonitor.js +0 -160
- package/dist/messenger/Monitoring/index.d.ts +0 -9
- package/dist/messenger/Monitoring/index.js +0 -9
- package/dist/messenger/index.d.ts +0 -38
- package/dist/messenger/index.js +0 -44
- package/dist/observability/index.d.ts +0 -13
- package/dist/observability/index.js +0 -14
- package/dist/observability/metrics.d.ts +0 -131
- package/dist/observability/metrics.js +0 -308
- package/dist/observability/middleware.d.ts +0 -64
- package/dist/observability/middleware.js +0 -225
- package/dist/package.json +0 -370
- package/dist/repositories/manifest.repository.d.ts +0 -26
- package/dist/repositories/manifest.repository.js +0 -96
- package/dist/repositories/schema.repository.d.ts +0 -54
- package/dist/repositories/schema.repository.js +0 -281
- package/dist/runtime/agent-runner.d.ts +0 -46
- package/dist/runtime/agent-runner.js +0 -346
- package/dist/runtime/crewai.runtime.d.ts +0 -30
- package/dist/runtime/crewai.runtime.js +0 -110
- package/dist/runtime/langchain.runtime.d.ts +0 -32
- package/dist/runtime/langchain.runtime.js +0 -75
- package/dist/runtime/langflow.runtime.d.ts +0 -65
- package/dist/runtime/langflow.runtime.js +0 -143
- package/dist/sdk.d.ts +0 -49
- package/dist/sdk.js +0 -66
- package/dist/sdks/index.d.ts +0 -15
- package/dist/sdks/index.js +0 -17
- package/dist/sdks/kagent/crd-generator.d.ts +0 -106
- package/dist/sdks/kagent/crd-generator.js +0 -1114
- package/dist/sdks/kagent/crd-parser.d.ts +0 -13
- package/dist/sdks/kagent/crd-parser.js +0 -92
- package/dist/sdks/kagent/index.d.ts +0 -10
- package/dist/sdks/kagent/index.js +0 -9
- package/dist/sdks/kagent/k8s-resources-generator.d.ts +0 -73
- package/dist/sdks/kagent/k8s-resources-generator.js +0 -286
- package/dist/sdks/kagent/kubectl-apply.d.ts +0 -35
- package/dist/sdks/kagent/kubectl-apply.js +0 -127
- package/dist/sdks/kagent/runtime-adapter.d.ts +0 -45
- package/dist/sdks/kagent/runtime-adapter.js +0 -129
- package/dist/sdks/kagent/tool-registry.d.ts +0 -25
- package/dist/sdks/kagent/tool-registry.js +0 -148
- package/dist/sdks/kagent/types.d.ts +0 -327
- package/dist/sdks/kagent/types.js +0 -10
- package/dist/sdks/kagent/validator.d.ts +0 -17
- package/dist/sdks/kagent/validator.js +0 -73
- package/dist/sdks/shared/index.d.ts +0 -24
- package/dist/sdks/shared/index.js +0 -28
- package/dist/sdks/shared/manifest-loader.d.ts +0 -41
- package/dist/sdks/shared/manifest-loader.js +0 -45
- package/dist/sdks/shared/schema-validator.d.ts +0 -34
- package/dist/sdks/shared/schema-validator.js +0 -103
- package/dist/sdks/shared/types.d.ts +0 -43
- package/dist/sdks/shared/types.js +0 -27
- package/dist/sdks/shared/validation.d.ts +0 -52
- package/dist/sdks/shared/validation.js +0 -41
- package/dist/services/agent-card-generator.d.ts +0 -77
- package/dist/services/agent-card-generator.js +0 -748
- package/dist/services/agent-services/qdrant.service.d.ts +0 -60
- package/dist/services/agent-services/qdrant.service.js +0 -168
- package/dist/services/agent-type-detector.service.d.ts +0 -72
- package/dist/services/agent-type-detector.service.js +0 -197
- package/dist/services/agents-md/agents-md-api.service.d.ts +0 -92
- package/dist/services/agents-md/agents-md-api.service.js +0 -162
- package/dist/services/agents-md/agents-md-discovery.service.d.ts +0 -50
- package/dist/services/agents-md/agents-md-discovery.service.js +0 -190
- package/dist/services/agents-md/agents-md-generator.service.d.ts +0 -29
- package/dist/services/agents-md/agents-md-generator.service.js +0 -252
- package/dist/services/agents-md/agents-md.service.d.ts +0 -65
- package/dist/services/agents-md/agents-md.service.js +0 -379
- package/dist/services/agents-md/repo-agents-md.service.d.ts +0 -87
- package/dist/services/agents-md/repo-agents-md.service.js +0 -202
- package/dist/services/ai-architect.service.d.ts +0 -48
- package/dist/services/ai-architect.service.js +0 -273
- package/dist/services/audit.d.ts +0 -86
- package/dist/services/audit.js +0 -279
- package/dist/services/codegen/codegen.service.d.ts +0 -77
- package/dist/services/codegen/codegen.service.js +0 -142
- package/dist/services/codegen/generators/manifest.generator.d.ts +0 -41
- package/dist/services/codegen/generators/manifest.generator.js +0 -178
- package/dist/services/codegen/generators/openapi-zod.generator.d.ts +0 -79
- package/dist/services/codegen/generators/openapi-zod.generator.js +0 -482
- package/dist/services/codegen/generators/openapi.generator.d.ts +0 -46
- package/dist/services/codegen/generators/openapi.generator.js +0 -157
- package/dist/services/codegen/generators/types.generator.d.ts +0 -27
- package/dist/services/codegen/generators/types.generator.js +0 -97
- package/dist/services/codegen/generators/vscode.generator.d.ts +0 -43
- package/dist/services/codegen/generators/vscode.generator.js +0 -163
- package/dist/services/codegen/generators/zod.generator.d.ts +0 -31
- package/dist/services/codegen/generators/zod.generator.js +0 -135
- package/dist/services/codegen/index.d.ts +0 -35
- package/dist/services/codegen/index.js +0 -38
- package/dist/services/conformance/conformance.service.d.ts +0 -75
- package/dist/services/conformance/conformance.service.js +0 -194
- package/dist/services/conformance/feature-detector.service.d.ts +0 -66
- package/dist/services/conformance/feature-detector.service.js +0 -161
- package/dist/services/conformance/index.d.ts +0 -10
- package/dist/services/conformance/index.js +0 -9
- package/dist/services/conformance/profile-loader.service.d.ts +0 -51
- package/dist/services/conformance/profile-loader.service.js +0 -192
- package/dist/services/conformance/score-calculator.service.d.ts +0 -50
- package/dist/services/conformance/score-calculator.service.js +0 -222
- package/dist/services/conformance/types.d.ts +0 -107
- package/dist/services/conformance/types.js +0 -6
- package/dist/services/convert/convert.service.d.ts +0 -26
- package/dist/services/convert/convert.service.js +0 -72
- package/dist/services/cost-estimation/optimization-patterns.d.ts +0 -23
- package/dist/services/cost-estimation/optimization-patterns.js +0 -147
- package/dist/services/cost-estimation/pricing.d.ts +0 -29
- package/dist/services/cost-estimation/pricing.js +0 -225
- package/dist/services/cost-estimation/scenario-estimator.d.ts +0 -59
- package/dist/services/cost-estimation/scenario-estimator.js +0 -145
- package/dist/services/cost-estimation/token-counter.service.d.ts +0 -51
- package/dist/services/cost-estimation/token-counter.service.js +0 -125
- package/dist/services/daemon/audit-log.service.d.ts +0 -37
- package/dist/services/daemon/audit-log.service.js +0 -79
- package/dist/services/daemon/execution.service.d.ts +0 -103
- package/dist/services/daemon/execution.service.js +0 -329
- package/dist/services/daemon/fs-watcher.service.d.ts +0 -55
- package/dist/services/daemon/fs-watcher.service.js +0 -183
- package/dist/services/daemon/pairing.service.d.ts +0 -61
- package/dist/services/daemon/pairing.service.js +0 -162
- package/dist/services/daemon/skill-aggregator.service.d.ts +0 -61
- package/dist/services/daemon/skill-aggregator.service.js +0 -252
- package/dist/services/daemon/sse-endpoints.d.ts +0 -68
- package/dist/services/daemon/sse-endpoints.js +0 -176
- package/dist/services/daemon/ws-server.d.ts +0 -66
- package/dist/services/daemon/ws-server.js +0 -251
- package/dist/services/deployment/deployment.service.d.ts +0 -19
- package/dist/services/deployment/deployment.service.js +0 -87
- package/dist/services/dev-server/dev-server.service.d.ts +0 -121
- package/dist/services/dev-server/dev-server.service.js +0 -290
- package/dist/services/dev-server/file-watcher.d.ts +0 -101
- package/dist/services/dev-server/file-watcher.js +0 -190
- package/dist/services/dev-server/live-validator.d.ts +0 -157
- package/dist/services/dev-server/live-validator.js +0 -301
- package/dist/services/dev-server/websocket-server.d.ts +0 -137
- package/dist/services/dev-server/websocket-server.js +0 -230
- package/dist/services/evals/evals-generator.service.d.ts +0 -90
- package/dist/services/evals/evals-generator.service.js +0 -1602
- package/dist/services/export/anthropic/anthropic-exporter.d.ts +0 -71
- package/dist/services/export/anthropic/anthropic-exporter.js +0 -590
- package/dist/services/export/anthropic/api-generator.d.ts +0 -39
- package/dist/services/export/anthropic/api-generator.js +0 -395
- package/dist/services/export/anthropic/index.d.ts +0 -18
- package/dist/services/export/anthropic/index.js +0 -16
- package/dist/services/export/anthropic/tools-generator.d.ts +0 -35
- package/dist/services/export/anthropic/tools-generator.js +0 -259
- package/dist/services/export/export-orchestrator.d.ts +0 -90
- package/dist/services/export/export-orchestrator.js +0 -181
- package/dist/services/export/export.service.d.ts +0 -30
- package/dist/services/export/export.service.js +0 -52
- package/dist/services/export/langchain/api-generator.d.ts +0 -17
- package/dist/services/export/langchain/api-generator.js +0 -375
- package/dist/services/export/langchain/callbacks-generator.d.ts +0 -63
- package/dist/services/export/langchain/callbacks-generator.js +0 -416
- package/dist/services/export/langchain/error-handling-generator.d.ts +0 -76
- package/dist/services/export/langchain/error-handling-generator.js +0 -526
- package/dist/services/export/langchain/index.d.ts +0 -17
- package/dist/services/export/langchain/index.js +0 -13
- package/dist/services/export/langchain/langchain-exporter.d.ts +0 -174
- package/dist/services/export/langchain/langchain-exporter.js +0 -961
- package/dist/services/export/langchain/langgraph-generator.d.ts +0 -86
- package/dist/services/export/langchain/langgraph-generator.js +0 -485
- package/dist/services/export/langchain/langserve-generator.d.ts +0 -95
- package/dist/services/export/langchain/langserve-generator.js +0 -813
- package/dist/services/export/langchain/memory-generator.d.ts +0 -71
- package/dist/services/export/langchain/memory-generator.js +0 -1182
- package/dist/services/export/langchain/openapi-generator.d.ts +0 -20
- package/dist/services/export/langchain/openapi-generator.js +0 -364
- package/dist/services/export/langchain/plan-execute-generator.d.ts +0 -60
- package/dist/services/export/langchain/plan-execute-generator.js +0 -679
- package/dist/services/export/langchain/streaming-generator.d.ts +0 -66
- package/dist/services/export/langchain/streaming-generator.js +0 -755
- package/dist/services/export/langchain/tools-generator.d.ts +0 -67
- package/dist/services/export/langchain/tools-generator.js +0 -543
- package/dist/services/export/npm/express-generator.d.ts +0 -23
- package/dist/services/export/npm/express-generator.js +0 -296
- package/dist/services/export/npm/index.d.ts +0 -13
- package/dist/services/export/npm/index.js +0 -11
- package/dist/services/export/npm/npm-exporter.d.ts +0 -182
- package/dist/services/export/npm/npm-exporter.js +0 -1773
- package/dist/services/export/npm/openapi-generator.d.ts +0 -19
- package/dist/services/export/npm/openapi-generator.js +0 -428
- package/dist/services/export/npm/package-json-generator.d.ts +0 -31
- package/dist/services/export/npm/package-json-generator.js +0 -156
- package/dist/services/export/npm/typescript-generator.d.ts +0 -69
- package/dist/services/export/npm/typescript-generator.js +0 -431
- package/dist/services/export/testing/index.d.ts +0 -8
- package/dist/services/export/testing/index.js +0 -7
- package/dist/services/export/testing/test-generator.d.ts +0 -178
- package/dist/services/export/testing/test-generator.js +0 -2546
- package/dist/services/extension-team/extension-team-kickoff.service.d.ts +0 -85
- package/dist/services/extension-team/extension-team-kickoff.service.js +0 -163
- package/dist/services/framework-import/langchain-importer.service.d.ts +0 -55
- package/dist/services/framework-import/langchain-importer.service.js +0 -157
- package/dist/services/framework-import/langflow-importer.service.d.ts +0 -85
- package/dist/services/framework-import/langflow-importer.service.js +0 -264
- package/dist/services/generation.service.d.ts +0 -65
- package/dist/services/generation.service.js +0 -356
- package/dist/services/git-rollback.service.d.ts +0 -75
- package/dist/services/git-rollback.service.js +0 -329
- package/dist/services/git.service.d.ts +0 -49
- package/dist/services/git.service.js +0 -162
- package/dist/services/github-sync/github-client.d.ts +0 -14
- package/dist/services/github-sync/github-client.js +0 -41
- package/dist/services/github-sync/gitlab-client.d.ts +0 -17
- package/dist/services/github-sync/gitlab-client.js +0 -42
- package/dist/services/github-sync/schemas.d.ts +0 -46
- package/dist/services/github-sync/schemas.js +0 -36
- package/dist/services/github-sync/sync.service.d.ts +0 -27
- package/dist/services/github-sync/sync.service.js +0 -101
- package/dist/services/gitlab-agent.service.d.ts +0 -94
- package/dist/services/gitlab-agent.service.js +0 -164
- package/dist/services/governance/cedar-provider.d.ts +0 -27
- package/dist/services/governance/cedar-provider.js +0 -105
- package/dist/services/governance/cedar-validator.service.d.ts +0 -32
- package/dist/services/governance/cedar-validator.service.js +0 -88
- package/dist/services/governance/governance-generator.service.d.ts +0 -120
- package/dist/services/governance/governance-generator.service.js +0 -1089
- package/dist/services/governance-client.service.d.ts +0 -39
- package/dist/services/governance-client.service.js +0 -124
- package/dist/services/id-card.service.d.ts +0 -109
- package/dist/services/id-card.service.js +0 -237
- package/dist/services/identity/identity.service.d.ts +0 -21
- package/dist/services/identity/identity.service.js +0 -36
- package/dist/services/import/framework-to-ossa.d.ts +0 -21
- package/dist/services/import/framework-to-ossa.js +0 -171
- package/dist/services/interfaces/governance-provider.interface.d.ts +0 -59
- package/dist/services/interfaces/governance-provider.interface.js +0 -6
- package/dist/services/knowledge-generation.service.d.ts +0 -46
- package/dist/services/knowledge-generation.service.js +0 -96
- package/dist/services/knowledge.service.d.ts +0 -88
- package/dist/services/knowledge.service.js +0 -214
- package/dist/services/llms-txt/llms-txt.service.d.ts +0 -59
- package/dist/services/llms-txt/llms-txt.service.js +0 -540
- package/dist/services/manifest/manifest-crud.service.d.ts +0 -119
- package/dist/services/manifest/manifest-crud.service.js +0 -319
- package/dist/services/mcp/bridge.service.d.ts +0 -63
- package/dist/services/mcp/bridge.service.js +0 -191
- package/dist/services/mcp-manifest/mcp-manifest.service.d.ts +0 -20
- package/dist/services/mcp-manifest/mcp-manifest.service.js +0 -85
- package/dist/services/messaging/example.d.ts +0 -6
- package/dist/services/messaging/example.js +0 -260
- package/dist/services/messaging/index.d.ts +0 -80
- package/dist/services/messaging/index.js +0 -86
- package/dist/services/messaging/memory-broker.d.ts +0 -103
- package/dist/services/messaging/memory-broker.js +0 -436
- package/dist/services/messaging/messaging.service.d.ts +0 -150
- package/dist/services/messaging/messaging.service.js +0 -458
- package/dist/services/messaging/messaging.types.d.ts +0 -319
- package/dist/services/messaging/messaging.types.js +0 -68
- package/dist/services/migration/langchain-migration.service.d.ts +0 -117
- package/dist/services/migration/langchain-migration.service.js +0 -621
- package/dist/services/migration-transform.service.d.ts +0 -82
- package/dist/services/migration-transform.service.js +0 -322
- package/dist/services/migration.service.d.ts +0 -132
- package/dist/services/migration.service.js +0 -698
- package/dist/services/multi-agent/team-generator.service.d.ts +0 -48
- package/dist/services/multi-agent/team-generator.service.js +0 -584
- package/dist/services/observability/observability-generator.service.d.ts +0 -54
- package/dist/services/observability/observability-generator.service.js +0 -1419
- package/dist/services/registry/bundle.service.d.ts +0 -36
- package/dist/services/registry/bundle.service.js +0 -70
- package/dist/services/registry/index.service.d.ts +0 -76
- package/dist/services/registry/index.service.js +0 -88
- package/dist/services/registry/registry.service.d.ts +0 -39
- package/dist/services/registry/registry.service.js +0 -169
- package/dist/services/registry.service.d.ts +0 -34
- package/dist/services/registry.service.js +0 -162
- package/dist/services/release-automation/base-crud.service.d.ts +0 -93
- package/dist/services/release-automation/base-crud.service.js +0 -68
- package/dist/services/release-automation/generate-changelog.d.ts +0 -7
- package/dist/services/release-automation/generate-changelog.js +0 -288
- package/dist/services/release-automation/increment-dev-tag.d.ts +0 -7
- package/dist/services/release-automation/increment-dev-tag.js +0 -160
- package/dist/services/release-automation/index.d.ts +0 -12
- package/dist/services/release-automation/index.js +0 -12
- package/dist/services/release-automation/merge-request.service.d.ts +0 -119
- package/dist/services/release-automation/merge-request.service.js +0 -212
- package/dist/services/release-automation/milestone.service.d.ts +0 -104
- package/dist/services/release-automation/milestone.service.js +0 -207
- package/dist/services/release-automation/release-agent.service.d.ts +0 -39
- package/dist/services/release-automation/release-agent.service.js +0 -43
- package/dist/services/release-automation/release-buttons.d.ts +0 -7
- package/dist/services/release-automation/release-buttons.js +0 -207
- package/dist/services/release-automation/release.service.d.ts +0 -118
- package/dist/services/release-automation/release.service.js +0 -207
- package/dist/services/release-automation/schemas/release.schema.d.ts +0 -299
- package/dist/services/release-automation/schemas/release.schema.js +0 -272
- package/dist/services/release-automation/tag.service.d.ts +0 -99
- package/dist/services/release-automation/tag.service.js +0 -183
- package/dist/services/release-automation/webhook.service.d.ts +0 -37
- package/dist/services/release-automation/webhook.service.js +0 -187
- package/dist/services/runtime/anthropic.adapter.d.ts +0 -145
- package/dist/services/runtime/anthropic.adapter.js +0 -521
- package/dist/services/runtime/azure.adapter.d.ts +0 -389
- package/dist/services/runtime/azure.adapter.js +0 -517
- package/dist/services/runtime/bedrock.adapter.d.ts +0 -170
- package/dist/services/runtime/bedrock.adapter.js +0 -665
- package/dist/services/runtime/claude/capability-mapper.d.ts +0 -84
- package/dist/services/runtime/claude/capability-mapper.js +0 -245
- package/dist/services/runtime/claude/claude-adapter.d.ts +0 -80
- package/dist/services/runtime/claude/claude-adapter.js +0 -283
- package/dist/services/runtime/claude/manifest-parser.d.ts +0 -77
- package/dist/services/runtime/claude/manifest-parser.js +0 -169
- package/dist/services/runtime/claude/types.d.ts +0 -115
- package/dist/services/runtime/claude/types.js +0 -6
- package/dist/services/runtime/gemini.adapter.d.ts +0 -190
- package/dist/services/runtime/gemini.adapter.js +0 -600
- package/dist/services/runtime/mistral.adapter.d.ts +0 -201
- package/dist/services/runtime/mistral.adapter.js +0 -652
- package/dist/services/runtime/ollama.adapter.d.ts +0 -187
- package/dist/services/runtime/ollama.adapter.js +0 -521
- package/dist/services/runtime/openai.adapter.d.ts +0 -94
- package/dist/services/runtime/openai.adapter.js +0 -209
- package/dist/services/skill-registry.service.d.ts +0 -134
- package/dist/services/skill-registry.service.js +0 -452
- package/dist/services/skills/claude-skills.service.d.ts +0 -59
- package/dist/services/skills/claude-skills.service.js +0 -275
- package/dist/services/skills/skill-manifest.service.d.ts +0 -23
- package/dist/services/skills/skill-manifest.service.js +0 -86
- package/dist/services/skills-pipeline/index.d.ts +0 -9
- package/dist/services/skills-pipeline/index.js +0 -9
- package/dist/services/skills-pipeline/skills-export.service.d.ts +0 -86
- package/dist/services/skills-pipeline/skills-export.service.js +0 -483
- package/dist/services/skills-pipeline/skills-generator.service.d.ts +0 -118
- package/dist/services/skills-pipeline/skills-generator.service.js +0 -648
- package/dist/services/skills-pipeline/skills-install.service.d.ts +0 -42
- package/dist/services/skills-pipeline/skills-install.service.js +0 -219
- package/dist/services/skills-pipeline/skills-research.service.d.ts +0 -110
- package/dist/services/skills-pipeline/skills-research.service.js +0 -426
- package/dist/services/structure/agents-folder.service.d.ts +0 -37
- package/dist/services/structure/agents-folder.service.js +0 -318
- package/dist/services/taxonomy-service.d.ts +0 -103
- package/dist/services/taxonomy-service.js +0 -343
- package/dist/services/taxonomy-validator.service.d.ts +0 -25
- package/dist/services/taxonomy-validator.service.js +0 -149
- package/dist/services/taxonomy.service.d.ts +0 -132
- package/dist/services/taxonomy.service.js +0 -342
- package/dist/services/template-processor.service.d.ts +0 -34
- package/dist/services/template-processor.service.js +0 -123
- package/dist/services/template.service.d.ts +0 -54
- package/dist/services/template.service.js +0 -154
- package/dist/services/test-runner/mock-llm.service.d.ts +0 -77
- package/dist/services/test-runner/mock-llm.service.js +0 -172
- package/dist/services/test-runner/scenarios.d.ts +0 -36
- package/dist/services/test-runner/scenarios.js +0 -202
- package/dist/services/test-runner/test-runner.service.d.ts +0 -39
- package/dist/services/test-runner/test-runner.service.js +0 -165
- package/dist/services/trust/trust.service.d.ts +0 -47
- package/dist/services/trust/trust.service.js +0 -234
- package/dist/services/validation/best-practices-validator.d.ts +0 -84
- package/dist/services/validation/best-practices-validator.js +0 -499
- package/dist/services/validation/cost-estimator.d.ts +0 -69
- package/dist/services/validation/cost-estimator.js +0 -223
- package/dist/services/validation/enhanced-validator.d.ts +0 -78
- package/dist/services/validation/enhanced-validator.js +0 -210
- package/dist/services/validation/index.d.ts +0 -13
- package/dist/services/validation/index.js +0 -9
- package/dist/services/validation/security-validator.d.ts +0 -81
- package/dist/services/validation/security-validator.js +0 -330
- package/dist/services/validation-zod.service.d.ts +0 -36
- package/dist/services/validation-zod.service.js +0 -344
- package/dist/services/validation.service.d.ts +0 -50
- package/dist/services/validation.service.js +0 -445
- package/dist/services/validators/a2a.validator.d.ts +0 -16
- package/dist/services/validators/a2a.validator.js +0 -63
- package/dist/services/validators/anthropic.validator.d.ts +0 -9
- package/dist/services/validators/anthropic.validator.js +0 -111
- package/dist/services/validators/autogen.validator.d.ts +0 -12
- package/dist/services/validators/autogen.validator.js +0 -151
- package/dist/services/validators/contract.validator.d.ts +0 -91
- package/dist/services/validators/contract.validator.js +0 -522
- package/dist/services/validators/crewai.validator.d.ts +0 -12
- package/dist/services/validators/crewai.validator.js +0 -152
- package/dist/services/validators/cursor.validator.d.ts +0 -9
- package/dist/services/validators/cursor.validator.js +0 -93
- package/dist/services/validators/dependencies.validator.d.ts +0 -104
- package/dist/services/validators/dependencies.validator.js +0 -388
- package/dist/services/validators/index.d.ts +0 -19
- package/dist/services/validators/index.js +0 -20
- package/dist/services/validators/kagent.validator.d.ts +0 -13
- package/dist/services/validators/kagent.validator.js +0 -205
- package/dist/services/validators/langchain.validator.d.ts +0 -12
- package/dist/services/validators/langchain.validator.js +0 -139
- package/dist/services/validators/langflow.validator.d.ts +0 -9
- package/dist/services/validators/langflow.validator.js +0 -98
- package/dist/services/validators/langgraph.validator.d.ts +0 -12
- package/dist/services/validators/langgraph.validator.js +0 -161
- package/dist/services/validators/llamaindex.validator.d.ts +0 -9
- package/dist/services/validators/llamaindex.validator.js +0 -125
- package/dist/services/validators/mcp.validator.d.ts +0 -16
- package/dist/services/validators/mcp.validator.js +0 -70
- package/dist/services/validators/messaging.validator.d.ts +0 -77
- package/dist/services/validators/messaging.validator.js +0 -298
- package/dist/services/validators/openai.validator.d.ts +0 -9
- package/dist/services/validators/openai.validator.js +0 -131
- package/dist/services/validators/vercel-ai.validator.d.ts +0 -9
- package/dist/services/validators/vercel-ai.validator.js +0 -101
- package/dist/services/version-detection.service.d.ts +0 -50
- package/dist/services/version-detection.service.js +0 -209
- package/dist/services/wizard/prompts.d.ts +0 -71
- package/dist/services/wizard/prompts.js +0 -345
- package/dist/services/wizard/wizard-state.service.d.ts +0 -111
- package/dist/services/wizard/wizard-state.service.js +0 -548
- package/dist/services/wizard/wizard.service.d.ts +0 -60
- package/dist/services/wizard/wizard.service.js +0 -329
- package/dist/services/workspace/workspace.service.d.ts +0 -44
- package/dist/services/workspace/workspace.service.js +0 -203
- package/dist/skills/test-skill/README.md +0 -36
- package/dist/skills/test-skill/SKILL.md +0 -31
- package/dist/skills/test-skill/index.d.ts +0 -31
- package/dist/skills/test-skill/install.js +0 -44
- package/dist/skills/test-skill/package.json +0 -36
- package/dist/spec/extensions/a2a-messaging.md +0 -471
- package/dist/spec/extensions/knowledge-graph/knowledge-graph.schema.json +0 -386
- package/dist/spec/extensions/manifest-extensions.md +0 -550
- package/dist/spec/extensions/openapi/ossa-openapi-extensions.schema.json +0 -804
- package/dist/spec/extensions/role-manifest.md +0 -188
- package/dist/spec/extensions/skills-compatibility.md +0 -292
- package/dist/spec/ossa-audit-api.yaml +0 -311
- package/dist/spec/reference/reference-agents/compliance-auditor/manifest.ossa.yaml +0 -527
- package/dist/spec/reference/reference-agents/doc-agent/manifest.ossa.yaml +0 -776
- package/dist/spec/reference/reference-agents/mr-reviewer/manifest.ossa.yaml +0 -249
- package/dist/spec/reference/reference-agents/mr-reviewer/system-prompt.md +0 -154
- package/dist/spec/reference/reference-agents/ossa-validator-v0.3/manifest.ossa.yaml +0 -548
- package/dist/spec/reference/reference-agents/ossa-validator-v0.3/system-prompt.md +0 -135
- package/dist/spec/reference/reference-agents/pipeline-fixer/manifest.ossa.yaml +0 -336
- package/dist/spec/reference/reference-agents/release-orchestrator/README.md +0 -35
- package/dist/spec/reference/reference-agents/release-orchestrator/manifest.ossa.yaml +0 -233
- package/dist/spec/registry/README.md +0 -478
- package/dist/spec/registry/openapi.yaml +0 -1124
- package/dist/spec/registry/project-registry.schema.json +0 -62
- package/dist/spec/registry/registry-api.schema.json +0 -731
- package/dist/spec/registry/registry-api.yaml +0 -144
- package/dist/spec/registry/registry-spec.md +0 -2239
- package/dist/spec/schema/agent-test.schema.json +0 -117
- package/dist/spec/schema/components/activity-stream.schema.json +0 -94
- package/dist/spec/schema/components/adapter.schema.json +0 -33
- package/dist/spec/schema/components/constraints.schema.json +0 -84
- package/dist/spec/schema/components/dependencies.schema.json +0 -147
- package/dist/spec/schema/components/encryption.schema.json +0 -115
- package/dist/spec/schema/components/identity.schema.json +0 -126
- package/dist/spec/schema/components/index.json +0 -37
- package/dist/spec/schema/components/llm-config.schema.json +0 -67
- package/dist/spec/schema/components/metadata.schema.json +0 -52
- package/dist/spec/schema/components/tool.schema.json +0 -64
- package/dist/spec/schema/extensions/a2a.extension.schema.json +0 -127
- package/dist/spec/uadp/README.md +0 -393
- package/dist/spec/uadp/openapi.yaml +0 -387
- package/dist/spec/uadp/schemas/uadp-agents-response.schema.json +0 -68
- package/dist/spec/uadp/schemas/uadp-federation-response.schema.json +0 -46
- package/dist/spec/uadp/schemas/uadp-manifest.schema.json +0 -82
- package/dist/spec/uadp/schemas/uadp-skills-response.schema.json +0 -72
- package/dist/spec/v0.4/agent-card.schema.json +0 -477
- package/dist/spec/v0.4/agent.schema.json +0 -1567
- package/dist/spec/v0.4/conformance/profiles/baseline.json +0 -19
- package/dist/spec/v0.4/conformance/profiles/enterprise.json +0 -20
- package/dist/spec/v0.4/extensions/a2a/README.md +0 -193
- package/dist/spec/v0.4/extensions/a2a/a2a.schema.json +0 -77
- package/dist/spec/v0.4/extensions/ag2/ag2.schema.json +0 -277
- package/dist/spec/v0.4/extensions/cognition/cognition.schema.json +0 -94
- package/dist/spec/v0.4/extensions/cognition/thought-node.schema.json +0 -80
- package/dist/spec/v0.4/extensions/crewai/crewai.schema.json +0 -256
- package/dist/spec/v0.4/extensions/drupal/drupal.schema.json +0 -318
- package/dist/spec/v0.4/extensions/evals/evals.schema.json +0 -597
- package/dist/spec/v0.4/extensions/governance/governance-extension.yaml +0 -161
- package/dist/spec/v0.4/extensions/identity/identity.schema.json +0 -302
- package/dist/spec/v0.4/extensions/kagent/README.md +0 -315
- package/dist/spec/v0.4/extensions/kagent/kagent.schema.json +0 -624
- package/dist/spec/v0.4/extensions/langchain/langchain.schema.json +0 -243
- package/dist/spec/v0.4/extensions/langgraph/langgraph.schema.json +0 -211
- package/dist/spec/v0.4/extensions/mcp/README.md +0 -276
- package/dist/spec/v0.4/extensions/mcp/mcp.schema.json +0 -84
- package/dist/spec/v0.4/extensions/memory/memory.schema.json +0 -7
- package/dist/spec/v0.4/extensions/team/team.schema.json +0 -304
- package/dist/spec/v0.4/extensions/token-efficiency/token-efficiency.schema.json +0 -47
- package/dist/spec/v0.4/mcp.schema.json +0 -1
- package/dist/spec/v0.4/skill.schema.json +0 -1
- package/dist/spec/v0.4/validator.schema.json +0 -282
- package/dist/spec/v0.5/agent-card.schema.json +0 -477
- package/dist/spec/v0.5/agent.schema.json +0 -1627
- package/dist/spec/v0.5/conformance/profiles/baseline.json +0 -19
- package/dist/spec/v0.5/conformance/profiles/enterprise.json +0 -20
- package/dist/spec/v0.5/extensions/a2a/README.md +0 -193
- package/dist/spec/v0.5/extensions/a2a/a2a.schema.json +0 -77
- package/dist/spec/v0.5/extensions/ag2/ag2.schema.json +0 -277
- package/dist/spec/v0.5/extensions/cognition/cognition.schema.json +0 -94
- package/dist/spec/v0.5/extensions/cognition/thought-node.schema.json +0 -80
- package/dist/spec/v0.5/extensions/crewai/crewai.schema.json +0 -256
- package/dist/spec/v0.5/extensions/drupal/drupal.schema.json +0 -318
- package/dist/spec/v0.5/extensions/evals/evals.schema.json +0 -597
- package/dist/spec/v0.5/extensions/governance/governance-extension.yaml +0 -161
- package/dist/spec/v0.5/extensions/identity/identity.schema.json +0 -302
- package/dist/spec/v0.5/extensions/kagent/README.md +0 -315
- package/dist/spec/v0.5/extensions/kagent/kagent.schema.json +0 -624
- package/dist/spec/v0.5/extensions/langchain/langchain.schema.json +0 -243
- package/dist/spec/v0.5/extensions/langgraph/langgraph.schema.json +0 -211
- package/dist/spec/v0.5/extensions/mcp/README.md +0 -276
- package/dist/spec/v0.5/extensions/mcp/mcp.schema.json +0 -84
- package/dist/spec/v0.5/extensions/memory/memory.schema.json +0 -7
- package/dist/spec/v0.5/extensions/team/team.schema.json +0 -304
- package/dist/spec/v0.5/extensions/token-efficiency/token-efficiency.schema.json +0 -47
- package/dist/spec/v0.5/mcp.schema.json +0 -1
- package/dist/spec/v0.5/role.schema.json +0 -268
- package/dist/spec/v0.5/skill.schema.json +0 -1
- package/dist/spec/v0.5/validator.schema.json +0 -282
- package/dist/spec/v1/mcp.schema.json +0 -183
- package/dist/spec/v1/skill.schema.json +0 -346
- package/dist/testing/fixtures.d.ts +0 -61
- package/dist/testing/fixtures.js +0 -298
- package/dist/testing/index.d.ts +0 -10
- package/dist/testing/index.js +0 -10
- package/dist/testing/reporters/base.d.ts +0 -24
- package/dist/testing/reporters/base.js +0 -5
- package/dist/testing/reporters/console.d.ts +0 -18
- package/dist/testing/reporters/console.js +0 -78
- package/dist/testing/reporters/json.d.ts +0 -29
- package/dist/testing/reporters/json.js +0 -40
- package/dist/testing/runner.d.ts +0 -96
- package/dist/testing/runner.js +0 -392
- package/dist/transports/index.d.ts +0 -8
- package/dist/transports/index.js +0 -11
- package/dist/transports/sse.d.ts +0 -166
- package/dist/transports/sse.js +0 -314
- package/dist/transports/webrtc.d.ts +0 -183
- package/dist/transports/webrtc.js +0 -481
- package/dist/transports/websocket.d.ts +0 -205
- package/dist/transports/websocket.js +0 -407
- package/dist/types/architect.d.ts +0 -48
- package/dist/types/architect.js +0 -7
- package/dist/types/dynamic-agent-types.d.ts +0 -158
- package/dist/types/dynamic-agent-types.js +0 -473
- package/dist/types/generated/ossa-0.3.2.types.d.ts +0 -367
- package/dist/types/generated/ossa-0.3.2.types.js +0 -10
- package/dist/types/generated/ossa-0.3.2.zod.d.ts +0 -36
- package/dist/types/generated/ossa-0.3.2.zod.js +0 -25
- package/dist/types/generated/ossa-0.3.3.types.d.ts +0 -367
- package/dist/types/generated/ossa-0.3.3.types.js +0 -10
- package/dist/types/generated/ossa-0.3.3.zod.d.ts +0 -36
- package/dist/types/generated/ossa-0.3.3.zod.js +0 -25
- package/dist/types/generated/ossa-0.3.4.types.d.ts +0 -430
- package/dist/types/generated/ossa-0.3.4.types.js +0 -10
- package/dist/types/generated/ossa-0.3.4.zod.d.ts +0 -340
- package/dist/types/generated/ossa-0.3.4.zod.js +0 -120
- package/dist/types/identity.d.ts +0 -82
- package/dist/types/identity.js +0 -10
- package/dist/types/identity.zod.d.ts +0 -622
- package/dist/types/identity.zod.js +0 -272
- package/dist/types/index.d.ts +0 -665
- package/dist/types/index.js +0 -30
- package/dist/types/llms-txt.zod.d.ts +0 -320
- package/dist/types/llms-txt.zod.js +0 -82
- package/dist/types/mcp-server-manifest.d.ts +0 -83
- package/dist/types/mcp-server-manifest.js +0 -17
- package/dist/types/messaging.d.ts +0 -116
- package/dist/types/messaging.js +0 -6
- package/dist/types/openapi-extensions.d.ts +0 -164
- package/dist/types/openapi-extensions.js +0 -6
- package/dist/types/personality.d.ts +0 -141
- package/dist/types/personality.js +0 -72
- package/dist/types/personality.zod.d.ts +0 -483
- package/dist/types/personality.zod.js +0 -190
- package/dist/types/policy.d.ts +0 -377
- package/dist/types/policy.js +0 -84
- package/dist/types/prompts.d.ts +0 -219
- package/dist/types/prompts.js +0 -163
- package/dist/types/prompts.zod.d.ts +0 -252
- package/dist/types/prompts.zod.js +0 -113
- package/dist/types/protocols.d.ts +0 -158
- package/dist/types/protocols.js +0 -8
- package/dist/types/role.d.ts +0 -126
- package/dist/types/role.js +0 -38
- package/dist/types/security.d.ts +0 -123
- package/dist/types/security.js +0 -9
- package/dist/types/skill.d.ts +0 -116
- package/dist/types/skill.js +0 -35
- package/dist/types/task.d.ts +0 -222
- package/dist/types/task.js +0 -40
- package/dist/types/tool.d.ts +0 -73
- package/dist/types/tool.js +0 -66
- package/dist/types/workflow.d.ts +0 -283
- package/dist/types/workflow.js +0 -51
- package/dist/utils/constants.d.ts +0 -31
- package/dist/utils/constants.js +0 -31
- package/dist/utils/index.d.ts +0 -9
- package/dist/utils/index.js +0 -9
- package/dist/utils/logger.d.ts +0 -82
- package/dist/utils/logger.js +0 -250
- package/dist/utils/manifest-scanner.d.ts +0 -41
- package/dist/utils/manifest-scanner.js +0 -71
- package/dist/utils/path-validator.d.ts +0 -24
- package/dist/utils/path-validator.js +0 -70
- package/dist/utils/type-guards.d.ts +0 -59
- package/dist/utils/type-guards.js +0 -190
- package/dist/utils/version.d.ts +0 -79
- package/dist/utils/version.js +0 -239
- package/dist/utils/yaml-parser.d.ts +0 -29
- package/dist/utils/yaml-parser.js +0 -38
- package/dist/validation/__tests__/error-codes.test.d.ts +0 -5
- package/dist/validation/__tests__/error-codes.test.js +0 -252
- package/dist/validation/enhanced-validator.d.ts +0 -38
- package/dist/validation/enhanced-validator.js +0 -242
- package/dist/validation/error-codes.d.ts +0 -170
- package/dist/validation/error-codes.js +0 -1160
- package/dist/validation/error-formatter.d.ts +0 -81
- package/dist/validation/error-formatter.js +0 -375
- package/dist/validation/index.d.ts +0 -19
- package/dist/validation/index.js +0 -26
- package/dist/validation/linter.d.ts +0 -36
- package/dist/validation/linter.js +0 -453
- package/dist/validation/progressive-scorer.d.ts +0 -123
- package/dist/validation/progressive-scorer.js +0 -370
- package/dist/validation/validation-context.d.ts +0 -86
- package/dist/validation/validation-context.js +0 -138
- package/dist/validation/validator-registry.d.ts +0 -158
- package/dist/validation/validator-registry.js +0 -245
- package/dist/validation/validator.d.ts +0 -42
- package/dist/validation/validator.js +0 -290
- package/dist/validation/version-compliance.d.ts +0 -17
- package/dist/validation/version-compliance.js +0 -25
- package/dist/version-management/api/server.d.ts +0 -3
- package/dist/version-management/api/server.js +0 -75
- package/dist/version-management/cli/index.d.ts +0 -3
- package/dist/version-management/cli/index.js +0 -219
- package/dist/version-management/core/version-manager.d.ts +0 -108
- package/dist/version-management/core/version-manager.js +0 -322
- package/dist/version-management/core/version-manager.test.d.ts +0 -2
- package/dist/version-management/core/version-manager.test.js +0 -210
- package/dist/version-management/index.d.ts +0 -3
- package/dist/version-management/index.js +0 -2
- package/dist/version.d.ts +0 -62
- package/dist/version.js +0 -76
- package/examples/a2a/agent-handoff.ossa.yaml +0 -202
- package/examples/a2a/service-discovery.ossa.yaml +0 -194
- package/examples/adapters/anthropic-quickstart.ts +0 -66
- package/examples/adapters/crewai-quickstart.py +0 -86
- package/examples/adapters/drupal-eca-mapping.yaml +0 -153
- package/examples/adapters/drupal-eca-task.yaml +0 -48
- package/examples/adapters/drupal-flowdrop-mapping.yaml +0 -463
- package/examples/adapters/drupal-maestro-mapping.yaml +0 -369
- package/examples/adapters/langchain-quickstart.ts +0 -40
- package/examples/adapters/mistral-README.md +0 -367
- package/examples/adapters/mistral-agent.yaml +0 -147
- package/examples/adapters/symfony-messenger-task.yaml +0 -135
- package/examples/adapters/symfony-messenger-workflow.yaml +0 -352
- package/examples/adk-integration/code-review-workflow.yml +0 -136
- package/examples/adk-integration/customer-support.yml +0 -263
- package/examples/adk-integration/data-pipeline.yml +0 -173
- package/examples/advanced/patterns/compliance-context-production.json +0 -53
- package/examples/advanced/patterns/model-router.ts +0 -274
- package/examples/advanced/patterns/smart-model-routing.ts +0 -300
- package/examples/advanced/reasoning-agent.yaml +0 -136
- package/examples/advanced/workflows/hybrid-model-strategy.yaml +0 -215
- package/examples/agent-manifests/critics/critic-agent.yaml +0 -149
- package/examples/agent-manifests/governors/governor-agent.yaml +0 -128
- package/examples/agent-manifests/integrators/integrator-agent.yaml +0 -103
- package/examples/agent-manifests/judges/judge-agent.yaml +0 -153
- package/examples/agent-manifests/monitors/monitor-agent.yaml +0 -122
- package/examples/agent-manifests/orchestrators/orchestrator-agent.yaml +0 -247
- package/examples/agent-manifests/sample-compliant-agent.yaml +0 -160
- package/examples/agent-manifests/v0.4-identity-security-protocols-full.ossa.yaml +0 -159
- package/examples/agent-manifests/v0.4-minimal-identity-security-protocols.ossa.yaml +0 -37
- package/examples/agent-manifests/v0.5-identity-security-protocols.ossa.yaml +0 -159
- package/examples/agent-manifests/v0.5-minimal.ossa.yaml +0 -37
- package/examples/agent-manifests/workers/worker-agent.yaml +0 -82
- package/examples/agent-mesh/DISCOVERY.md +0 -679
- package/examples/agent-mesh/README.ts +0 -311
- package/examples/agent-mesh/basic-usage.ts +0 -461
- package/examples/agent-mesh/discovery-system.ts +0 -670
- package/examples/agent-skills/SKILLS_CATALOG.md +0 -341
- package/examples/agent-skills/ossa-agent-authoring/SKILL.md +0 -62
- package/examples/agent-skills/react-best-practices/SKILL.md +0 -158
- package/examples/agent-skills/react-best-practices/references/react-performance-guidelines.md +0 -500
- package/examples/agent-taxonomy-example.ossa.yaml +0 -89
- package/examples/agents/01-customer-support-bot/.env.example +0 -32
- package/examples/agents/01-customer-support-bot/Dockerfile +0 -30
- package/examples/agents/01-customer-support-bot/README.md +0 -295
- package/examples/agents/01-customer-support-bot/agent.ossa.yaml +0 -165
- package/examples/agents/01-customer-support-bot/docker-compose.yml +0 -55
- package/examples/agents/01-customer-support-bot/openapi.yaml +0 -238
- package/examples/agents/01-customer-support-bot/package.json +0 -48
- package/examples/agents/02-code-review-agent/README.md +0 -72
- package/examples/agents/02-code-review-agent/agent.ossa.yaml +0 -288
- package/examples/agents/02-code-review-agent/docker-compose.yml +0 -22
- package/examples/agents/02-code-review-agent/openapi.yaml +0 -150
- package/examples/agents/03-data-analysis-agent/README.md +0 -51
- package/examples/agents/03-data-analysis-agent/agent.ossa.yaml +0 -152
- package/examples/agents/03-data-analysis-agent/openapi.yaml +0 -74
- package/examples/agents/04-content-moderator/README.md +0 -55
- package/examples/agents/04-content-moderator/agent.ossa.yaml +0 -131
- package/examples/agents/04-content-moderator/openapi.yaml +0 -50
- package/examples/agents/05-sales-assistant/README.md +0 -37
- package/examples/agents/05-sales-assistant/agent.ossa.yaml +0 -158
- package/examples/agents/05-sales-assistant/openapi.yaml +0 -59
- package/examples/agents/06-devops-agent/README.md +0 -39
- package/examples/agents/06-devops-agent/agent.ossa.yaml +0 -188
- package/examples/agents/06-devops-agent/openapi.yaml +0 -51
- package/examples/agents/07-research-assistant/README.md +0 -31
- package/examples/agents/07-research-assistant/agent.ossa.yaml +0 -185
- package/examples/agents/07-research-assistant/openapi.yaml +0 -56
- package/examples/agents/08-email-triage-agent/README.md +0 -33
- package/examples/agents/08-email-triage-agent/agent.ossa.yaml +0 -133
- package/examples/agents/08-email-triage-agent/openapi.yaml +0 -41
- package/examples/agents/09-security-scanner/README.md +0 -49
- package/examples/agents/09-security-scanner/agent.ossa.yaml +0 -220
- package/examples/agents/09-security-scanner/openapi.yaml +0 -46
- package/examples/agents/10-meeting-assistant/README.md +0 -53
- package/examples/agents/10-meeting-assistant/agent.ossa.yaml +0 -203
- package/examples/agents/10-meeting-assistant/docker-compose.yml +0 -27
- package/examples/agents/10-meeting-assistant/openapi.yaml +0 -131
- package/examples/agents/COMPLETION_REPORT.txt +0 -272
- package/examples/agents/INDEX.md +0 -296
- package/examples/agents/README.md +0 -452
- package/examples/agents/SUMMARY.md +0 -362
- package/examples/agents/TEST_RESULTS.md +0 -458
- package/examples/agents/architecture-healer-enterprise.yaml +0 -143
- package/examples/agents/dependency-healer-npm.yaml +0 -81
- package/examples/agents/security-audit-agent.ossa.yaml +0 -234
- package/examples/agents/spec-healer-openapi.yaml +0 -59
- package/examples/agents/wiki-healer-production.yaml +0 -131
- package/examples/agents-md/code-agent.ossa.json +0 -125
- package/examples/agents-md/monorepo-agent.ossa.yaml +0 -199
- package/examples/agentscope/react-assistant/README.md +0 -111
- package/examples/agentscope/react-assistant/agent.ossa.yaml +0 -136
- package/examples/agentscope/react-assistant/skills/code-analysis/SKILL.md +0 -18
- package/examples/agentscope/react-assistant/skills/question-answering/SKILL.md +0 -18
- package/examples/anthropic/claude-assistant.ossa.json +0 -46
- package/examples/anthropic-adapter-example.ts +0 -374
- package/examples/anthropic-simple.ts +0 -70
- package/examples/architecture/model-configuration/ollama-integration.ts +0 -110
- package/examples/autogen/multi-agent.ossa.json +0 -39
- package/examples/autonomous-evolution/self-evolving-agent.ossa.yaml +0 -34
- package/examples/bridge-configurations.yaml +0 -346
- package/examples/bridges/.gitlab-ci.yml +0 -293
- package/examples/bridges/Dockerfile.production +0 -87
- package/examples/bridges/__pycache__/aiflow-bridge-enhanced.cpython-313.pyc +0 -0
- package/examples/bridges/__pycache__/aiflow-phoenix-tracing.cpython-313.pyc +0 -0
- package/examples/bridges/aiflow-bridge-enhanced.py +0 -462
- package/examples/bridges/aiflow-bridge-example.yml +0 -310
- package/examples/bridges/aiflow-phoenix-tracing.py +0 -310
- package/examples/bridges/aiflow-registration-api.openapi.yml +0 -439
- package/examples/bridges/k8s/configmap.yaml +0 -121
- package/examples/bridges/k8s/deployment-simple.yaml +0 -34
- package/examples/bridges/k8s/deployment.yaml +0 -275
- package/examples/bridges/k8s/hpa.yaml +0 -126
- package/examples/bridges/k8s/ingress.yaml +0 -155
- package/examples/bridges/kagent-bridge-example.yml +0 -94
- package/examples/bridges/load-tests/Dockerfile +0 -28
- package/examples/bridges/load-tests/k6-load-test.js +0 -302
- package/examples/bridges/load-tests/requirements.txt +0 -20
- package/examples/bridges/loadtest/k6-scenarios.js +0 -270
- package/examples/bridges/phase4/SLO-SLA.yaml +0 -249
- package/examples/bridges/phase4/chaos-tests.yaml +0 -226
- package/examples/bridges/requirements.txt +0 -24
- package/examples/bridges/test_aiflow_integration.py +0 -341
- package/examples/build-once-use-everywhere/README.md +0 -184
- package/examples/build-once-use-everywhere/agent.ossa.yaml +0 -38
- package/examples/build-once-use-everywhere/deploy-config.yaml +0 -32
- package/examples/ci/multi-project-release-example.yml +0 -401
- package/examples/claude-code/code-reviewer.ossa.yaml +0 -86
- package/examples/claude-code/ossa-validator.ossa.yaml +0 -86
- package/examples/common_npm/agent-router.ossa.yaml +0 -61
- package/examples/compliance-agent.yml +0 -155
- package/examples/contracts/data-consumer.ossa.yaml +0 -171
- package/examples/contracts/data-producer-v2.ossa.yaml +0 -229
- package/examples/contracts/data-producer.ossa.yaml +0 -219
- package/examples/coordinator-agent/README.md +0 -180
- package/examples/coordinator-agent/index.ts +0 -440
- package/examples/coordinator-agent/manifest.yaml +0 -41
- package/examples/crewai/research-team.ossa.json +0 -45
- package/examples/cursor/code-review-agent.ossa.json +0 -62
- package/examples/deployment-workflow.md +0 -601
- package/examples/drupal/QUICKSTART.md +0 -453
- package/examples/drupal/ai_agents_agentscope/README.md +0 -62
- package/examples/drupal/ai_agents_agentscope/ai_agents_agentscope.info.yml +0 -13
- package/examples/drupal/ai_agents_agentscope/ai_agents_agentscope.services.yml +0 -4
- package/examples/drupal/ai_agents_agentscope/config/install/ai_agents_agentscope.settings.yml +0 -3
- package/examples/drupal/ai_agents_agentscope/config/schema/ai_agents_agentscope.schema.yml +0 -14
- package/examples/drupal/ai_agents_agentscope/src/AgentScopeRuntime.php +0 -11
- package/examples/drupal/ai_agents_agentscope/src/Plugin/AiAgent/AgentScopeAgent.php +0 -10
- package/examples/drupal/ai_agents_agentscope/src/Plugin/AiProvider/AgentScopeProvider.php +0 -217
- package/examples/drupal/ai_agents_agentscope/src/Plugin/Derivative/AgentScopeDeriver.php +0 -10
- package/examples/drupal/ai_agents_agentscope/src/Service/AgentScopeAdapter.php +0 -9
- package/examples/drupal/ai_agents_ossa-module/.agents/example-agent/agent.ossa.yaml +0 -30
- package/examples/drupal/content-moderator.ossa.yaml +0 -217
- package/examples/drupal/drupal-contributor.ossa.yaml +0 -247
- package/examples/drupal/gitlab-ml-recommender.ossa.yaml +0 -69
- package/examples/economics/marketplace-agent.ossa.json +0 -210
- package/examples/enterprise/agent.yml +0 -452
- package/examples/export/langchain/production-agent-with-memory/README.md +0 -373
- package/examples/export/langchain/production-agent-with-memory/agent.ossa.yaml +0 -87
- package/examples/export/langchain/production-agent-with-streaming/README.md +0 -617
- package/examples/export/langchain/production-agent-with-streaming/agent.ossa.yaml +0 -86
- package/examples/export/langchain/production-agent-with-streaming/client-example.py +0 -263
- package/examples/export/langchain/production-agent-with-tools/README.md +0 -296
- package/examples/export/langchain/production-agent-with-tools/agent.ossa.yaml +0 -215
- package/examples/export/langchain-export-example.ts +0 -246
- package/examples/export/langserve-export-example.ts +0 -246
- package/examples/export/test-generation-example.ts +0 -457
- package/examples/extensions/agents-md-advanced.yml +0 -177
- package/examples/extensions/agents-md-basic.yml +0 -74
- package/examples/extensions/agents-md-sync.yml +0 -96
- package/examples/extensions/agents-md-v1.yml +0 -176
- package/examples/extensions/drupal-v1.yml +0 -266
- package/examples/extensions/encryption-multi-provider.yaml +0 -120
- package/examples/extensions/kagent-v1.yml +0 -167
- package/examples/extensions/knowledge-sources.yaml +0 -59
- package/examples/extensions/mcp-full-featured.yaml +0 -150
- package/examples/genetics/breeding-agent.ossa.json +0 -194
- package/examples/getting-started/01-minimal-agent.ossa.yaml +0 -51
- package/examples/getting-started/02-agent-with-tools.ossa.yaml +0 -229
- package/examples/getting-started/03-agent-with-safety.ossa.yaml +0 -137
- package/examples/getting-started/04-agent-with-messaging.ossa.yaml +0 -392
- package/examples/getting-started/05-workflow-composition.ossa.yaml +0 -153
- package/examples/getting-started/README.md +0 -69
- package/examples/getting-started/hello-world-complete.ossa.yaml +0 -112
- package/examples/gitlab-agents/DEPLOYMENT.md +0 -331
- package/examples/gitlab-agents/daily-code-scan/.env.example +0 -11
- package/examples/gitlab-agents/daily-code-scan/.gitlab-ci.yml +0 -34
- package/examples/gitlab-agents/daily-code-scan/Dockerfile +0 -18
- package/examples/gitlab-agents/daily-code-scan/README.md +0 -80
- package/examples/gitlab-agents/daily-code-scan/package.json +0 -28
- package/examples/gitlab-agents/daily-code-scan/src/gitlab-client.ts +0 -135
- package/examples/gitlab-agents/daily-code-scan/src/index.ts +0 -50
- package/examples/gitlab-agents/daily-code-scan/src/types.ts +0 -22
- package/examples/gitlab-agents/daily-code-scan/src/workflow.ts +0 -109
- package/examples/gitlab-agents/daily-code-scan/tsconfig.json +0 -24
- package/examples/gitlab-agents/duo-comment-responder/.env.example +0 -14
- package/examples/gitlab-agents/duo-comment-responder/.gitlab-ci.yml +0 -34
- package/examples/gitlab-agents/duo-comment-responder/Dockerfile +0 -18
- package/examples/gitlab-agents/duo-comment-responder/README.md +0 -98
- package/examples/gitlab-agents/duo-comment-responder/package.json +0 -29
- package/examples/gitlab-agents/duo-comment-responder/src/gitlab-client.ts +0 -56
- package/examples/gitlab-agents/duo-comment-responder/src/index.ts +0 -103
- package/examples/gitlab-agents/duo-comment-responder/src/llm-client.ts +0 -75
- package/examples/gitlab-agents/duo-comment-responder/src/types.ts +0 -22
- package/examples/gitlab-agents/duo-comment-responder/src/workflow.ts +0 -135
- package/examples/gitlab-agents/duo-comment-responder/tsconfig.json +0 -24
- package/examples/gitlab-agents/duo-comment-responder/webhook-config.json +0 -11
- package/examples/gitlab-agents/gitlab-ci-agent.ossa.yaml +0 -221
- package/examples/gitlab-agents/k8s/deploy-all.yaml +0 -341
- package/examples/gitlab-agents/mr-reviewer/.env.example +0 -14
- package/examples/gitlab-agents/mr-reviewer/.gitlab-ci.yml +0 -34
- package/examples/gitlab-agents/mr-reviewer/Dockerfile +0 -18
- package/examples/gitlab-agents/mr-reviewer/README.md +0 -98
- package/examples/gitlab-agents/mr-reviewer/package.json +0 -29
- package/examples/gitlab-agents/mr-reviewer/src/gitlab-client.ts +0 -136
- package/examples/gitlab-agents/mr-reviewer/src/index.ts +0 -103
- package/examples/gitlab-agents/mr-reviewer/src/llm-client.ts +0 -95
- package/examples/gitlab-agents/mr-reviewer/src/types.ts +0 -22
- package/examples/gitlab-agents/mr-reviewer/src/workflow.ts +0 -144
- package/examples/gitlab-agents/mr-reviewer/tsconfig.json +0 -24
- package/examples/gitlab-agents/mr-reviewer/webhook-config.json +0 -11
- package/examples/gitlab-agents/pipeline-auto-fix/.env.example +0 -14
- package/examples/gitlab-agents/pipeline-auto-fix/.gitlab-ci.yml +0 -34
- package/examples/gitlab-agents/pipeline-auto-fix/Dockerfile +0 -18
- package/examples/gitlab-agents/pipeline-auto-fix/README.md +0 -98
- package/examples/gitlab-agents/pipeline-auto-fix/package.json +0 -29
- package/examples/gitlab-agents/pipeline-auto-fix/src/gitlab-client.ts +0 -76
- package/examples/gitlab-agents/pipeline-auto-fix/src/index.ts +0 -103
- package/examples/gitlab-agents/pipeline-auto-fix/src/llm-client.ts +0 -79
- package/examples/gitlab-agents/pipeline-auto-fix/src/types.ts +0 -22
- package/examples/gitlab-agents/pipeline-auto-fix/src/workflow.ts +0 -146
- package/examples/gitlab-agents/pipeline-auto-fix/tsconfig.json +0 -24
- package/examples/gitlab-agents/pipeline-auto-fix/webhook-config.json +0 -11
- package/examples/gitlab-agents/pre-commit-quality-check/.env.example +0 -11
- package/examples/gitlab-agents/pre-commit-quality-check/.gitlab-ci.yml +0 -34
- package/examples/gitlab-agents/pre-commit-quality-check/Dockerfile +0 -18
- package/examples/gitlab-agents/pre-commit-quality-check/README.md +0 -80
- package/examples/gitlab-agents/pre-commit-quality-check/package.json +0 -28
- package/examples/gitlab-agents/pre-commit-quality-check/src/gitlab-client.ts +0 -20
- package/examples/gitlab-agents/pre-commit-quality-check/src/index.ts +0 -50
- package/examples/gitlab-agents/pre-commit-quality-check/src/types.ts +0 -22
- package/examples/gitlab-agents/pre-commit-quality-check/src/workflow.ts +0 -63
- package/examples/gitlab-agents/pre-commit-quality-check/tsconfig.json +0 -24
- package/examples/gitlab-agents/pre-push-validation/.env.example +0 -11
- package/examples/gitlab-agents/pre-push-validation/.gitlab-ci.yml +0 -34
- package/examples/gitlab-agents/pre-push-validation/Dockerfile +0 -18
- package/examples/gitlab-agents/pre-push-validation/README.md +0 -80
- package/examples/gitlab-agents/pre-push-validation/package.json +0 -28
- package/examples/gitlab-agents/pre-push-validation/src/gitlab-client.ts +0 -20
- package/examples/gitlab-agents/pre-push-validation/src/index.ts +0 -50
- package/examples/gitlab-agents/pre-push-validation/src/types.ts +0 -22
- package/examples/gitlab-agents/pre-push-validation/src/workflow.ts +0 -63
- package/examples/gitlab-agents/pre-push-validation/tsconfig.json +0 -24
- package/examples/gitlab-duo/EXTERNAL_AGENTS.md +0 -466
- package/examples/gitlab-duo/README.md +0 -307
- package/examples/gitlab-duo/code-review-flow.yaml +0 -62
- package/examples/gitlab-duo/external-agent-example.ts +0 -192
- package/examples/gitlab-duo/generated/custom-vars-agent.yaml +0 -45
- package/examples/gitlab-duo/generated/go-agent.yaml +0 -41
- package/examples/gitlab-duo/generated/python-agent.yaml +0 -43
- package/examples/gitlab-duo/generated/webhook-agent.yaml +0 -52
- package/examples/hierarchical-agent.ossa.yaml +0 -83
- package/examples/hierarchical-crewai.ossa.yaml +0 -96
- package/examples/infrastructure/token-rotation/README.md +0 -119
- package/examples/infrastructure/token-rotation/manifest.ossa.yaml +0 -73
- package/examples/infrastructure/token-rotation/openapi.yaml +0 -133
- package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +0 -115
- package/examples/kagent/README.md +0 -32
- package/examples/kagent/compliance-validator.ossa.yaml +0 -100
- package/examples/kagent/cost-optimizer.ossa.yaml +0 -81
- package/examples/kagent/documentation-agent.ossa.yaml +0 -79
- package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +0 -87
- package/examples/kagent/k8s-troubleshooter.ossa.yaml +0 -102
- package/examples/kagent/ossa-kagent-anthropic.ossa.yaml +0 -36
- package/examples/kagent/ossa-kagent-mcp-tools.ossa.yaml +0 -40
- package/examples/kagent/ossa-kagent-multi-tool.ossa.yaml +0 -41
- package/examples/kagent/ossa-kagent-poc.ossa.yaml +0 -32
- package/examples/kagent/security-scanner.ossa.yaml +0 -84
- package/examples/knowledge-graph/drupal-agent-with-kg.ossa.yaml +0 -289
- package/examples/langchain/chain-agent.ossa.json +0 -58
- package/examples/langflow/workflow-agent.ossa.json +0 -38
- package/examples/langgraph/state-machine-agent.ossa.json +0 -58
- package/examples/lifecycle/mentoring-agent.ossa.json +0 -293
- package/examples/llamaindex/rag-agent.ossa.json +0 -40
- package/examples/mcp/browser-puppeteer.ossa.yaml +0 -232
- package/examples/mcp/database-mcp.ossa.yaml +0 -134
- package/examples/mcp/filesystem-mcp.ossa.yaml +0 -101
- package/examples/messaging/dependency-healer.ossa.yaml +0 -354
- package/examples/messaging/incident-responder.ossa.yaml +0 -477
- package/examples/messaging/routing-rules.ossa.yaml +0 -200
- package/examples/messaging/security-scanner.ossa.yaml +0 -335
- package/examples/migration-guides/from-langchain-to-ossa.yaml +0 -309
- package/examples/migrations/crewai-to-ossa/README.md +0 -66
- package/examples/migrations/langchain/01-python-react-agent-after.ossa.yaml +0 -38
- package/examples/migrations/langchain/01-python-react-agent-before.py +0 -62
- package/examples/migrations/langchain/02-typescript-conversational-after.ossa.yaml +0 -40
- package/examples/migrations/langchain/02-typescript-conversational-before.ts +0 -79
- package/examples/migrations/langchain/03-sequential-chain-after.ossa.yaml +0 -95
- package/examples/migrations/langchain/03-sequential-chain-before.py +0 -100
- package/examples/migrations/langchain/04-config-based-after.ossa.yaml +0 -54
- package/examples/migrations/langchain/04-config-based-before.yaml +0 -52
- package/examples/migrations/langchain/INTEGRATION-EXAMPLE.txt +0 -335
- package/examples/migrations/langchain/USAGE.txt +0 -121
- package/examples/migrations/langchain/test-migrations.ts +0 -135
- package/examples/migrations/langchain-to-ossa/README.md +0 -73
- package/examples/migrations/swarm-to-ossa/COMPARISON.md +0 -350
- package/examples/migrations/swarm-to-ossa/INDEX.md +0 -355
- package/examples/migrations/swarm-to-ossa/MIGRATION-FLOW.md +0 -410
- package/examples/migrations/swarm-to-ossa/QUICKSTART.md +0 -453
- package/examples/migrations/swarm-to-ossa/README.md +0 -665
- package/examples/migrations/swarm-to-ossa/after-handoffs.ossa.yaml +0 -482
- package/examples/migrations/swarm-to-ossa/after-triage-agent.ossa.yaml +0 -315
- package/examples/migrations/swarm-to-ossa/before-triage-agent.py +0 -234
- package/examples/minimal/agent.yml +0 -152
- package/examples/minimal/openapi.yaml +0 -95
- package/examples/mistral-adapter-example.ts +0 -435
- package/examples/mistral-simple.ts +0 -56
- package/examples/mr-reviewer-with-governance.ossa.yaml +0 -130
- package/examples/multi-agent/README.md +0 -74
- package/examples/multi-agent/conditional-router.ossa.yaml +0 -42
- package/examples/multi-agent/parallel-execution.ossa.yaml +0 -54
- package/examples/multi-agent/sequential-pipeline.ossa.yaml +0 -45
- package/examples/multi-agent-research-workflow.ossa.yaml +0 -133
- package/examples/multi-platform/single-manifest/README.md +0 -72
- package/examples/multi-platform/single-manifest/agent.ossa.yaml +0 -32
- package/examples/npm-export-example.ts +0 -150
- package/examples/observability/activity-stream-full.yaml +0 -133
- package/examples/observability/gitlab-ci-template.yml +0 -304
- package/examples/openai/basic-agent.ossa.yaml +0 -60
- package/examples/openai/multi-tool-agent.ossa.json +0 -188
- package/examples/openai/swarm-agent.ossa.json +0 -72
- package/examples/openapi-extensions/README.md +0 -87
- package/examples/openapi-extensions/minimal-agent-api.openapi.yml +0 -288
- package/examples/openapi-extensions/orchestrator-agent-api.openapi.yml +0 -633
- package/examples/openapi-extensions/worker-agent-api.openapi.yml +0 -533
- package/examples/ossa-templates/01-code-assistant.ossa.yaml +0 -114
- package/examples/ossa-templates/02-security-scanner.ossa.yaml +0 -103
- package/examples/ossa-templates/03-ci-pipeline.ossa.yaml +0 -100
- package/examples/ossa-templates/04-code-reviewer.ossa.yaml +0 -116
- package/examples/ossa-templates/05-doc-generator.ossa.yaml +0 -102
- package/examples/ossa-templates/06-compliance-validator.ossa.yaml +0 -132
- package/examples/ossa-templates/07-workflow-orchestrator.ossa.yaml +0 -110
- package/examples/ossa-templates/08-content-writer.ossa.yaml +0 -136
- package/examples/ossa-templates/09-test-generator.ossa.yaml +0 -113
- package/examples/ossa-templates/10-data-transformer.ossa.yaml +0 -102
- package/examples/ossa-templates/11-react-performance-expert.ossa.yaml +0 -384
- package/examples/ossa-templates/12-typescript-type-safety-expert.ossa.yaml +0 -265
- package/examples/ossa-templates/13-accessibility-champion.ossa.yaml +0 -264
- package/examples/ossa-templates/14-security-hardening-agent.ossa.yaml +0 -267
- package/examples/ossa-templates/README.md +0 -98
- package/examples/pipeline-agent.ossa.yaml +0 -196
- package/examples/platform-specific/claude-code-subagent.yaml +0 -185
- package/examples/platform-specific/cursor-coding-agent.yaml +0 -175
- package/examples/platform-specific/warp-terminal-agent.yaml +0 -122
- package/examples/production/agent.yml +0 -713
- package/examples/production/document-analyzer-openai.yml +0 -134
- package/examples/production-ready/01-customer-support-bot/.env.example +0 -32
- package/examples/production-ready/01-customer-support-bot/Dockerfile +0 -30
- package/examples/production-ready/01-customer-support-bot/README.md +0 -295
- package/examples/production-ready/01-customer-support-bot/agent.ossa.yaml +0 -165
- package/examples/production-ready/01-customer-support-bot/docker-compose.yml +0 -55
- package/examples/production-ready/01-customer-support-bot/openapi.yaml +0 -238
- package/examples/production-ready/01-customer-support-bot/package.json +0 -48
- package/examples/production-ready/02-code-review-agent/README.md +0 -72
- package/examples/production-ready/02-code-review-agent/agent.ossa.yaml +0 -239
- package/examples/production-ready/02-code-review-agent/docker-compose.yml +0 -22
- package/examples/production-ready/02-code-review-agent/openapi.yaml +0 -150
- package/examples/production-ready/03-data-analysis-agent/README.md +0 -51
- package/examples/production-ready/03-data-analysis-agent/agent.ossa.yaml +0 -97
- package/examples/production-ready/03-data-analysis-agent/openapi.yaml +0 -74
- package/examples/production-ready/04-content-moderator/README.md +0 -55
- package/examples/production-ready/04-content-moderator/agent.ossa.yaml +0 -131
- package/examples/production-ready/04-content-moderator/openapi.yaml +0 -50
- package/examples/production-ready/05-sales-assistant/README.md +0 -37
- package/examples/production-ready/05-sales-assistant/agent.ossa.yaml +0 -158
- package/examples/production-ready/05-sales-assistant/openapi.yaml +0 -59
- package/examples/production-ready/06-devops-agent/README.md +0 -39
- package/examples/production-ready/06-devops-agent/agent.ossa.yaml +0 -141
- package/examples/production-ready/06-devops-agent/openapi.yaml +0 -51
- package/examples/production-ready/07-research-assistant/README.md +0 -31
- package/examples/production-ready/07-research-assistant/agent.ossa.yaml +0 -127
- package/examples/production-ready/07-research-assistant/openapi.yaml +0 -56
- package/examples/production-ready/08-email-triage-agent/README.md +0 -33
- package/examples/production-ready/08-email-triage-agent/agent.ossa.yaml +0 -133
- package/examples/production-ready/08-email-triage-agent/openapi.yaml +0 -41
- package/examples/production-ready/09-security-scanner/README.md +0 -49
- package/examples/production-ready/09-security-scanner/agent.ossa.yaml +0 -174
- package/examples/production-ready/09-security-scanner/openapi.yaml +0 -46
- package/examples/production-ready/10-meeting-assistant/README.md +0 -53
- package/examples/production-ready/10-meeting-assistant/agent.ossa.yaml +0 -203
- package/examples/production-ready/10-meeting-assistant/docker-compose.yml +0 -27
- package/examples/production-ready/10-meeting-assistant/openapi.yaml +0 -131
- package/examples/production-ready/COMPLETION_REPORT.txt +0 -272
- package/examples/production-ready/INDEX.md +0 -296
- package/examples/production-ready/README.md +0 -452
- package/examples/production-ready/SUMMARY.md +0 -362
- package/examples/production-ready/TEST_RESULTS.md +0 -458
- package/examples/quickstart/support-agent.ossa.yaml +0 -57
- package/examples/rag-agent/README.md +0 -136
- package/examples/rag-agent/index.ts +0 -272
- package/examples/rag-agent/manifest.yaml +0 -45
- package/examples/real-world/gitlab-cicd-optimizer.ossa.yaml +0 -171
- package/examples/real-world/rag-documentation-assistant.ossa.yaml +0 -229
- package/examples/reference-implementations/README.md +0 -321
- package/examples/reference-implementations/curl-scripts/README.md +0 -277
- package/examples/reference-implementations/python-client/README.md +0 -282
- package/examples/reference-implementations/python-client/examples/basic_usage.py +0 -84
- package/examples/reference-implementations/python-client/examples/publish_agent.py +0 -137
- package/examples/reference-implementations/python-client/ossa_client/__init__.py +0 -80
- package/examples/reference-implementations/python-client/ossa_client/agents.py +0 -240
- package/examples/reference-implementations/python-client/ossa_client/client.py +0 -164
- package/examples/reference-implementations/python-client/ossa_client/discovery.py +0 -153
- package/examples/reference-implementations/python-client/ossa_client/messaging.py +0 -227
- package/examples/reference-implementations/python-client/requirements.txt +0 -2
- package/examples/reference-implementations/python-client/setup.py +0 -40
- package/examples/reference-implementations/typescript-client/README.md +0 -227
- package/examples/reference-implementations/typescript-client/examples/basic-usage.ts +0 -86
- package/examples/reference-implementations/typescript-client/examples/messaging.ts +0 -185
- package/examples/reference-implementations/typescript-client/examples/publish-agent.ts +0 -138
- package/examples/reference-implementations/typescript-client/package.json +0 -40
- package/examples/reference-implementations/typescript-client/src/agents.ts +0 -285
- package/examples/reference-implementations/typescript-client/src/client.ts +0 -161
- package/examples/reference-implementations/typescript-client/src/discovery.ts +0 -244
- package/examples/reference-implementations/typescript-client/src/index.ts +0 -67
- package/examples/reference-implementations/typescript-client/src/messaging.ts +0 -385
- package/examples/reference-implementations/typescript-client/tsconfig.json +0 -25
- package/examples/registry/USAGE.txt +0 -105
- package/examples/registry/agents/code-reviewer/agent.yaml +0 -159
- package/examples/registry/agents/security-scanner/agent.yaml +0 -128
- package/examples/registry/index.json +0 -5
- package/examples/roles/drupal-developer.role.yaml +0 -37
- package/examples/roles/platform-operator.role.yaml +0 -28
- package/examples/roles/security-auditor.role.yaml +0 -27
- package/examples/runtime-adapters/bedrock-claude-example.ossa.yaml +0 -99
- package/examples/schema/reusable-components.yaml +0 -95
- package/examples/service-registry-usage.ts +0 -423
- package/examples/showcase/PRODUCTION_EXAMPLES.md +0 -499
- package/examples/showcase/ci-pipeline.ossa.yaml +0 -55
- package/examples/showcase/code-assistant.ossa.yaml +0 -104
- package/examples/showcase/code-reviewer.ossa.yaml +0 -58
- package/examples/showcase/compliance-checker.ossa.yaml +0 -207
- package/examples/showcase/compliance-validator.ossa.yaml +0 -61
- package/examples/showcase/content-writer.ossa.yaml +0 -70
- package/examples/showcase/customer-support.ossa.yaml +0 -344
- package/examples/showcase/data-processing-pipeline.ossa.yaml +0 -254
- package/examples/showcase/data-transformer.ossa.yaml +0 -76
- package/examples/showcase/doc-generator.ossa.yaml +0 -66
- package/examples/showcase/full-power-agent.ossa.yaml +0 -350
- package/examples/showcase/security-scanner-enhanced.ossa.yaml +0 -304
- package/examples/showcase/security-scanner.ossa.yaml +0 -66
- package/examples/showcase/team-leader.ossa.yaml +0 -306
- package/examples/showcase/test-generator.ossa.yaml +0 -37
- package/examples/showcase/workflow-orchestrator.ossa.yaml +0 -114
- package/examples/single-agent.ossa.yaml +0 -40
- package/examples/skills/drupal-code-analysis/skill.ossa.yaml +0 -111
- package/examples/skills/git-commit-review/skill.ossa.yaml +0 -86
- package/examples/skills/tdd-workflow/skill.ossa.yaml +0 -93
- package/examples/skills-example.ossa.yaml +0 -140
- package/examples/spec-examples/audit-agent.yml +0 -147
- package/examples/spec-examples/chat-agent.yml +0 -189
- package/examples/spec-examples/compliance-agent.yml +0 -204
- package/examples/spec-examples/data-processing-agent.yml +0 -132
- package/examples/spec-examples/development-agent.yml +0 -138
- package/examples/spec-examples/edge-agent.yml +0 -101
- package/examples/spec-examples/integration-agent.yml +0 -129
- package/examples/spec-examples/monitoring-agent.yml +0 -130
- package/examples/spec-examples/serverless-agent.yml +0 -82
- package/examples/spec-examples/workflow-agent.yml +0 -223
- package/examples/subagents-pipeline.ossa.yaml +0 -76
- package/examples/swarm/pso-optimizer.ossa.json +0 -171
- package/examples/swarm-agent.ossa.yaml +0 -98
- package/examples/swarm-handoff.ossa.yaml +0 -67
- package/examples/tasks/batch-email-sender.yaml +0 -105
- package/examples/tasks/data-transform.yaml +0 -82
- package/examples/tasks/publish-content.yaml +0 -86
- package/examples/team-agent.ossa.yaml +0 -110
- package/examples/team-lead-teammate.ossa.yaml +0 -78
- package/examples/templates/ossa-compliance.yaml +0 -56
- package/examples/token-efficiency/security-scanner.ossa.yaml +0 -53
- package/examples/typescript/advanced/demo-registry.ts +0 -168
- package/examples/typescript/mcpb-agent-example.ts +0 -358
- package/examples/unified/security-scanner.ossa.yaml +0 -308
- package/examples/validation/error-codes-demo.ts +0 -254
- package/examples/vercel/edge-agent.ossa.json +0 -44
- package/examples/workflow-agent/README.md +0 -175
- package/examples/workflow-agent/index.ts +0 -408
- package/examples/workflow-agent/manifest.yaml +0 -41
- package/examples/workflows/batch-email-campaign.yaml +0 -140
- package/examples/workflows/content-review-publish.yaml +0 -156
- package/examples/workflows/simple-etl.yaml +0 -151
- package/openapi/CHANGELOG.md +0 -21
- package/openapi/README.md +0 -46
- package/openapi/agent-communication.yaml +0 -1120
- package/openapi/agent-crud.yaml +0 -1102
- package/openapi/agent-discovery.yaml +0 -715
- package/openapi/agent-identity.yaml +0 -652
- package/openapi/agent-taxonomy.yaml +0 -378
- package/openapi/agents-md-service.yaml +0 -411
- package/openapi/cli/openapi.yaml +0 -1732
- package/openapi/core/ossa-core-api.openapi.yaml +0 -1321
- package/openapi/core/ossa-registry-api.openapi.yaml +0 -1043
- package/openapi/core/ossa-registry.openapi.yaml +0 -964
- package/openapi/core/unified-agent-gateway.openapi.yaml +0 -897
- package/openapi/daemon-api.openapi.yaml +0 -968
- package/openapi/dev-cli/openapi.yaml +0 -992
- package/openapi/github-sync.yaml +0 -158
- package/openapi/marketplace-plugin.openapi.yaml +0 -2358
- package/openapi/ossa-api.openapi.yaml +0 -1237
- package/openapi/ossa-cli-enhancements.openapi.yaml +0 -608
- package/openapi/ossa-cli.yaml +0 -1051
- package/openapi/protocols/sse-streams.yaml +0 -471
- package/openapi/protocols/websocket-events.yaml +0 -434
- package/openapi/reference-implementations/aiflow-bridge-api.openapi.yaml +0 -153
- package/openapi/reference-implementations/compliance-agent-api.openapi.yaml +0 -204
- package/openapi/reference-implementations/crewai-agent-api.openapi.yaml +0 -160
- package/openapi/reference-implementations/critic-agent-api.openapi.yaml +0 -177
- package/openapi/reference-implementations/document-analyzer-api.openapi.yaml +0 -223
- package/openapi/reference-implementations/drupal-agent-api.openapi.yaml +0 -399
- package/openapi/reference-implementations/getting-started-hello-world-api.openapi.yaml +0 -160
- package/openapi/reference-implementations/gitlab-ml-recommender-api.openapi.yaml +0 -155
- package/openapi/reference-implementations/governor-agent-api.openapi.yaml +0 -211
- package/openapi/reference-implementations/helm-generator.openapi.yaml +0 -431
- package/openapi/reference-implementations/integrator-agent-api.openapi.yaml +0 -175
- package/openapi/reference-implementations/judge-agent-api.openapi.yaml +0 -154
- package/openapi/reference-implementations/k8s-troubleshooter-api.openapi.yaml +0 -181
- package/openapi/reference-implementations/langchain-agent-api.openapi.yaml +0 -182
- package/openapi/reference-implementations/monitor-agent-api.openapi.yaml +0 -184
- package/openapi/reference-implementations/orchestrator-agent-api.openapi.yaml +0 -264
- package/openapi/reference-implementations/quickstart-support-agent-api.openapi.yaml +0 -195
- package/openapi/reference-implementations/self-evolving-ecosystem.openapi.yaml +0 -1664
- package/openapi/reference-implementations/worker-agent-api.openapi.yaml +0 -219
- package/openapi/reference-implementations/workflow-orchestrator-api.openapi.yaml +0 -207
- package/openapi/registry.yaml +0 -49
- package/openapi/release-automation.openapi.yaml +0 -178
- package/openapi/schemas/common/agent.yaml +0 -264
- package/openapi/schemas/common/errors.yaml +0 -85
- package/openapi/schemas/common/metadata.yaml +0 -86
- package/openapi/schemas/common/pagination.yaml +0 -84
- package/openapi/schemas/common/security.yaml +0 -96
- package/openapi/schemas/discovery.json +0 -488
- package/openapi/schemas/index.yaml +0 -95
- package/openapi/uadp-asyncapi.yaml +0 -434
- package/openapi/uadp-openapi.yaml +0 -865
- package/openapi/version-management.openapi.yaml +0 -761
- package/spec/extensions/a2a-messaging.md +0 -471
- package/spec/extensions/knowledge-graph/knowledge-graph.schema.json +0 -386
- package/spec/extensions/manifest-extensions.md +0 -550
- package/spec/extensions/openapi/ossa-openapi-extensions.schema.json +0 -804
- package/spec/extensions/role-manifest.md +0 -188
- package/spec/extensions/skills-compatibility.md +0 -292
- package/spec/ossa-audit-api.yaml +0 -311
- package/spec/schema/agent-test.schema.json +0 -117
- package/spec/schema/components/activity-stream.schema.json +0 -94
- package/spec/schema/components/adapter.schema.json +0 -33
- package/spec/schema/components/constraints.schema.json +0 -84
- package/spec/schema/components/dependencies.schema.json +0 -147
- package/spec/schema/components/encryption.schema.json +0 -115
- package/spec/schema/components/identity.schema.json +0 -126
- package/spec/schema/components/index.json +0 -37
- package/spec/schema/components/llm-config.schema.json +0 -67
- package/spec/schema/components/metadata.schema.json +0 -52
- package/spec/schema/components/tool.schema.json +0 -64
- package/spec/schema/extensions/a2a.extension.schema.json +0 -127
- package/spec/uadp/README.md +0 -393
- package/spec/uadp/openapi.yaml +0 -387
- package/spec/uadp/schemas/uadp-agents-response.schema.json +0 -68
- package/spec/uadp/schemas/uadp-federation-response.schema.json +0 -46
- package/spec/uadp/schemas/uadp-manifest.schema.json +0 -82
- package/spec/uadp/schemas/uadp-skills-response.schema.json +0 -72
- package/spec/v0.4/agent-card.schema.json +0 -477
- package/spec/v0.4/agent.schema.json +0 -1567
- package/spec/v0.4/conformance/profiles/baseline.json +0 -19
- package/spec/v0.4/conformance/profiles/enterprise.json +0 -20
- package/spec/v0.4/extensions/a2a/README.md +0 -193
- package/spec/v0.4/extensions/a2a/a2a.schema.json +0 -77
- package/spec/v0.4/extensions/ag2/ag2.schema.json +0 -277
- package/spec/v0.4/extensions/cognition/cognition.schema.json +0 -94
- package/spec/v0.4/extensions/cognition/thought-node.schema.json +0 -80
- package/spec/v0.4/extensions/crewai/crewai.schema.json +0 -256
- package/spec/v0.4/extensions/drupal/drupal.schema.json +0 -318
- package/spec/v0.4/extensions/evals/evals.schema.json +0 -597
- package/spec/v0.4/extensions/governance/governance-extension.yaml +0 -161
- package/spec/v0.4/extensions/identity/identity.schema.json +0 -302
- package/spec/v0.4/extensions/kagent/README.md +0 -315
- package/spec/v0.4/extensions/kagent/kagent.schema.json +0 -624
- package/spec/v0.4/extensions/langchain/langchain.schema.json +0 -243
- package/spec/v0.4/extensions/langgraph/langgraph.schema.json +0 -211
- package/spec/v0.4/extensions/mcp/README.md +0 -276
- package/spec/v0.4/extensions/mcp/mcp.schema.json +0 -84
- package/spec/v0.4/extensions/memory/memory.schema.json +0 -7
- package/spec/v0.4/extensions/team/team.schema.json +0 -304
- package/spec/v0.4/extensions/token-efficiency/token-efficiency.schema.json +0 -47
- package/spec/v0.4/mcp.schema.json +0 -1
- package/spec/v0.4/skill.schema.json +0 -1
- package/spec/v0.4/validator.schema.json +0 -282
- package/spec/v1/mcp.schema.json +0 -183
- package/spec/v1/skill.schema.json +0 -346
- package/templates/agent-types/claude-agent.ossa.yaml +0 -83
- package/templates/agent-types/kagent.ossa.yaml +0 -110
- package/templates/agent-types/langchain-agent.ossa.yaml +0 -106
- package/templates/agent-types/openapi-agent.ossa.yaml +0 -121
- package/templates/agent-types/swarm-agents.ossa.yaml +0 -168
- package/templates/ci-cd/github-actions.deploy.yml +0 -272
- package/templates/ci-cd/gitlab-ci.deploy.yml +0 -205
- package/templates/validators/capability-compatibility.ossa.yaml +0 -174
- package/templates/validators/coordination-consistency.ossa.yaml +0 -160
- package/templates/validators/pattern-requirements.ossa.yaml +0 -182
- package/templates/validators/transport-compatibility.ossa.yaml +0 -185
|
@@ -1,2628 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Drupal Module Generator for OSSA Agents
|
|
3
|
-
*
|
|
4
|
-
* Generates complete, production-ready Drupal modules from OSSA agent manifests.
|
|
5
|
-
* Uses modern PHP 8 syntax: attributes instead of annotations, OO hook classes,
|
|
6
|
-
* constructor property promotion, and Drupal AI module integration.
|
|
7
|
-
*
|
|
8
|
-
* Generated modules include:
|
|
9
|
-
* - MODULE.info.yml (module metadata)
|
|
10
|
-
* - MODULE.services.yml (DI configuration)
|
|
11
|
-
* - src/Service/AgentExecutorService.php (uses drupal/ai provider system)
|
|
12
|
-
* - src/Plugin/QueueWorker/ (async execution with #[QueueWorker] attribute)
|
|
13
|
-
* - src/Plugin/Tool/ (Tool API plugins with #[Tool] attributes)
|
|
14
|
-
* - src/Plugin/Action/ (Action plugins for CUD tools with #[Action] attributes)
|
|
15
|
-
* - src/Plugin/Condition/ (Condition plugins from safety guardrails with #[Condition] attributes)
|
|
16
|
-
* - src/Controller/ (admin UI and API endpoints)
|
|
17
|
-
* - src/Entity/ (agent result storage with #[ContentEntityType] attribute)
|
|
18
|
-
* - src/Form/ (configuration forms)
|
|
19
|
-
* - src/Hook/ (OO hook classes with #[Hook] attributes)
|
|
20
|
-
* - MODULE.module (minimal procedural hooks)
|
|
21
|
-
* - templates/*.html.twig (Twig templates)
|
|
22
|
-
* - composer.json (with drupal/ai, drupal/ai_agents, drupal/tool)
|
|
23
|
-
* - config/schema/MODULE.schema.yml (configuration schema)
|
|
24
|
-
* - config/install/*.yml (default configuration)
|
|
25
|
-
* - config/install/eca.model.*.yml (ECA event-condition-action models)
|
|
26
|
-
*
|
|
27
|
-
* SOLID Principles:
|
|
28
|
-
* - Single Responsibility: Drupal module generation only
|
|
29
|
-
* - Dependency Inversion: Uses Drupal AI module for LLM provider access
|
|
30
|
-
* - Interface Segregation: Separate interfaces for different module components
|
|
31
|
-
*
|
|
32
|
-
* DRY: Reuses Drupal AI module patterns, no duplication
|
|
33
|
-
*/
|
|
34
|
-
import { BaseAdapter } from '../base/adapter.interface.js';
|
|
35
|
-
import { sanitizeModuleName, toClassName, toLabel, validateDrupalCompatibility, buildValidationResult, extractCapabilities, extractTools, mapOssaToolToDrupalTool, } from './drupal-utils.js';
|
|
36
|
-
export class DrupalModuleGenerator extends BaseAdapter {
|
|
37
|
-
platform = 'drupal';
|
|
38
|
-
displayName = 'Drupal Module (Full)';
|
|
39
|
-
description = 'Production-ready Drupal module with OSSA/AI module integration';
|
|
40
|
-
status = 'beta';
|
|
41
|
-
supportedVersions = ['v{{VERSION}}'];
|
|
42
|
-
/**
|
|
43
|
-
* Generate complete Drupal module from OSSA manifest
|
|
44
|
-
*/
|
|
45
|
-
async export(manifest, options) {
|
|
46
|
-
const startTime = Date.now();
|
|
47
|
-
try {
|
|
48
|
-
// Validate manifest
|
|
49
|
-
if (options?.validate !== false) {
|
|
50
|
-
const validation = await this.validate(manifest);
|
|
51
|
-
if (!validation.valid) {
|
|
52
|
-
return this.createResult(false, [], `Validation failed: ${validation.errors?.map((e) => e.message).join(', ')}`, {
|
|
53
|
-
duration: Date.now() - startTime,
|
|
54
|
-
warnings: validation.warnings?.map((w) => w.message),
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const moduleName = sanitizeModuleName(manifest.metadata?.name || 'ossa_agent');
|
|
59
|
-
const className = toClassName(moduleName);
|
|
60
|
-
// Default options
|
|
61
|
-
const opts = {
|
|
62
|
-
includeQueueWorker: true,
|
|
63
|
-
includeEntity: true,
|
|
64
|
-
includeController: true,
|
|
65
|
-
includeConfigForm: true,
|
|
66
|
-
includeHooks: true,
|
|
67
|
-
includeViews: true,
|
|
68
|
-
includeToolPlugins: true,
|
|
69
|
-
includeEcaModels: true,
|
|
70
|
-
includeActionPlugins: true,
|
|
71
|
-
includeConditionPlugins: true,
|
|
72
|
-
coreVersion: '^10 || ^11',
|
|
73
|
-
validate: options?.validate ?? true,
|
|
74
|
-
...options,
|
|
75
|
-
};
|
|
76
|
-
const files = [];
|
|
77
|
-
// ===================================================================
|
|
78
|
-
// Core Module Files
|
|
79
|
-
// ===================================================================
|
|
80
|
-
// MODULE.info.yml
|
|
81
|
-
files.push(this.createFile(`${moduleName}/${moduleName}.info.yml`, this.generateInfoYml(manifest, moduleName, opts), 'config'));
|
|
82
|
-
// MODULE.services.yml
|
|
83
|
-
files.push(this.createFile(`${moduleName}/${moduleName}.services.yml`, this.generateServicesYml(manifest, moduleName, className, opts), 'config'));
|
|
84
|
-
// composer.json
|
|
85
|
-
files.push(this.createFile(`${moduleName}/composer.json`, this.generateComposerJson(manifest, moduleName), 'config'));
|
|
86
|
-
// MODULE.module (minimal procedural hooks)
|
|
87
|
-
if (opts.includeHooks) {
|
|
88
|
-
files.push(this.createFile(`${moduleName}/${moduleName}.module`, this.generateModuleHooks(manifest, moduleName, className), 'code', 'php'));
|
|
89
|
-
// OO Hook classes (PHP 8 attribute-based hooks)
|
|
90
|
-
const hookFiles = this.generateHookClasses(manifest, moduleName, className);
|
|
91
|
-
files.push(...hookFiles);
|
|
92
|
-
}
|
|
93
|
-
// ===================================================================
|
|
94
|
-
// Service Classes
|
|
95
|
-
// ===================================================================
|
|
96
|
-
// src/Service/AgentExecutorService.php
|
|
97
|
-
files.push(this.createFile(`${moduleName}/src/Service/AgentExecutorService.php`, this.generateAgentExecutorService(manifest, moduleName, className), 'code', 'php'));
|
|
98
|
-
// ===================================================================
|
|
99
|
-
// Queue Worker (Async Execution)
|
|
100
|
-
// ===================================================================
|
|
101
|
-
if (opts.includeQueueWorker) {
|
|
102
|
-
files.push(this.createFile(`${moduleName}/src/Plugin/QueueWorker/AgentQueueWorker.php`, this.generateQueueWorker(manifest, moduleName, className), 'code', 'php'));
|
|
103
|
-
}
|
|
104
|
-
// ===================================================================
|
|
105
|
-
// Entity (Result Storage)
|
|
106
|
-
// ===================================================================
|
|
107
|
-
if (opts.includeEntity) {
|
|
108
|
-
// Entity class
|
|
109
|
-
files.push(this.createFile(`${moduleName}/src/Entity/AgentResult.php`, this.generateEntityClass(manifest, moduleName, className), 'code', 'php'));
|
|
110
|
-
// Entity interface
|
|
111
|
-
files.push(this.createFile(`${moduleName}/src/Entity/AgentResultInterface.php`, this.generateEntityInterface(moduleName), 'code', 'php'));
|
|
112
|
-
// Views data
|
|
113
|
-
if (opts.includeViews) {
|
|
114
|
-
files.push(this.createFile(`${moduleName}/${moduleName}.views.inc`, this.generateViewsData(moduleName, className), 'code', 'php'));
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
// ===================================================================
|
|
118
|
-
// Controller (Admin UI + API)
|
|
119
|
-
// ===================================================================
|
|
120
|
-
if (opts.includeController) {
|
|
121
|
-
files.push(this.createFile(`${moduleName}/src/Controller/AgentController.php`, this.generateController(manifest, moduleName, className), 'code', 'php'));
|
|
122
|
-
// Routing
|
|
123
|
-
files.push(this.createFile(`${moduleName}/${moduleName}.routing.yml`, this.generateRouting(moduleName), 'config'));
|
|
124
|
-
}
|
|
125
|
-
// ===================================================================
|
|
126
|
-
// Configuration Form
|
|
127
|
-
// ===================================================================
|
|
128
|
-
if (opts.includeConfigForm) {
|
|
129
|
-
files.push(this.createFile(`${moduleName}/src/Form/AgentConfigForm.php`, this.generateConfigForm(manifest, moduleName, className), 'code', 'php'));
|
|
130
|
-
// Menu links
|
|
131
|
-
files.push(this.createFile(`${moduleName}/${moduleName}.links.menu.yml`, this.generateMenuLinks(moduleName), 'config'));
|
|
132
|
-
}
|
|
133
|
-
// ===================================================================
|
|
134
|
-
// Tool API Plugins (drupal/tool integration)
|
|
135
|
-
// ===================================================================
|
|
136
|
-
const tools = extractTools(manifest);
|
|
137
|
-
if (opts.includeToolPlugins && tools.length > 0) {
|
|
138
|
-
for (const tool of tools) {
|
|
139
|
-
const drupalTool = mapOssaToolToDrupalTool(tool, moduleName);
|
|
140
|
-
const toolClassName = toClassName(sanitizeModuleName(tool.name || 'unknown_tool'));
|
|
141
|
-
// Tool plugin class
|
|
142
|
-
files.push(this.createFile(`${moduleName}/src/Plugin/Tool/${toolClassName}Tool.php`, this.generateToolPlugin(manifest, moduleName, className, tool, drupalTool), 'code', 'php'));
|
|
143
|
-
// Tool AI connector config
|
|
144
|
-
files.push(this.createFile(`${moduleName}/config/install/tool_ai_connector.tool.${drupalTool.id}.yml`, this.generateToolAiConnectorConfig(drupalTool), 'config'));
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
// ===================================================================
|
|
148
|
-
// ECA Model YAML (Event-Condition-Action)
|
|
149
|
-
// ===================================================================
|
|
150
|
-
const ecaEvents = this.extractEcaEvents(manifest);
|
|
151
|
-
if (opts.includeEcaModels && ecaEvents.length > 0) {
|
|
152
|
-
const ecaFiles = this.generateEcaModels(manifest, moduleName, ecaEvents);
|
|
153
|
-
files.push(...ecaFiles);
|
|
154
|
-
}
|
|
155
|
-
// ===================================================================
|
|
156
|
-
// Action Plugins (for CUD tools: create/update/delete)
|
|
157
|
-
// ===================================================================
|
|
158
|
-
if (opts.includeActionPlugins && tools.length > 0) {
|
|
159
|
-
const actionFiles = this.generateActionPlugins(manifest, moduleName, tools);
|
|
160
|
-
files.push(...actionFiles);
|
|
161
|
-
}
|
|
162
|
-
// ===================================================================
|
|
163
|
-
// Condition Plugins (from safety guardrails)
|
|
164
|
-
// ===================================================================
|
|
165
|
-
if (opts.includeConditionPlugins) {
|
|
166
|
-
const conditionFiles = this.generateConditionPlugins(manifest, moduleName);
|
|
167
|
-
files.push(...conditionFiles);
|
|
168
|
-
}
|
|
169
|
-
// ===================================================================
|
|
170
|
-
// Configuration Schema
|
|
171
|
-
// ===================================================================
|
|
172
|
-
files.push(this.createFile(`${moduleName}/config/schema/${moduleName}.schema.yml`, this.generateConfigSchema(moduleName), 'config'));
|
|
173
|
-
// Default configuration
|
|
174
|
-
files.push(this.createFile(`${moduleName}/config/install/${moduleName}.settings.yml`, this.generateDefaultConfig(manifest), 'config'));
|
|
175
|
-
// ===================================================================
|
|
176
|
-
// Templates
|
|
177
|
-
// ===================================================================
|
|
178
|
-
files.push(this.createFile(`${moduleName}/templates/agent-result.html.twig`, this.generateAgentResultTemplate(moduleName), 'other'));
|
|
179
|
-
files.push(this.createFile(`${moduleName}/templates/agent-execute-form.html.twig`, this.generateExecuteFormTemplate(moduleName), 'other'));
|
|
180
|
-
// ===================================================================
|
|
181
|
-
// Documentation
|
|
182
|
-
// ===================================================================
|
|
183
|
-
files.push(this.createFile(`${moduleName}/README.md`, this.generateReadme(manifest, moduleName, opts), 'documentation'));
|
|
184
|
-
files.push(this.createFile(`${moduleName}/INSTALL.md`, this.generateInstallGuide(manifest, moduleName), 'documentation'));
|
|
185
|
-
// ===================================================================
|
|
186
|
-
// Original OSSA Manifest
|
|
187
|
-
// ===================================================================
|
|
188
|
-
files.push(this.createFile(`${moduleName}/config/ossa/agent.ossa.yaml`, JSON.stringify(manifest, null, 2), 'config'));
|
|
189
|
-
// ===================================================================
|
|
190
|
-
// Recipe (Composable Installation)
|
|
191
|
-
// ===================================================================
|
|
192
|
-
files.push(this.createFile(`${moduleName}/recipes/${moduleName}-agent/recipe.yml`, this.generateRecipe(manifest, moduleName, tools), 'config'));
|
|
193
|
-
// Perfect Agent files
|
|
194
|
-
files.push(...(await this.generatePerfectAgentFiles(manifest, options)));
|
|
195
|
-
return this.createResult(true, files, undefined, {
|
|
196
|
-
duration: Date.now() - startTime,
|
|
197
|
-
version: '1.0.0',
|
|
198
|
-
moduleName,
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
catch (error) {
|
|
202
|
-
return this.createResult(false, [], error instanceof Error ? error.message : String(error), { duration: Date.now() - startTime });
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Validate manifest for Drupal compatibility
|
|
207
|
-
*/
|
|
208
|
-
async validate(manifest) {
|
|
209
|
-
const errors = [];
|
|
210
|
-
const warnings = [];
|
|
211
|
-
// Base validation
|
|
212
|
-
const baseValidation = await super.validate(manifest);
|
|
213
|
-
if (baseValidation.errors)
|
|
214
|
-
errors.push(...baseValidation.errors);
|
|
215
|
-
if (baseValidation.warnings)
|
|
216
|
-
warnings.push(...baseValidation.warnings);
|
|
217
|
-
// Drupal-specific validation
|
|
218
|
-
const drupalValidation = validateDrupalCompatibility(manifest);
|
|
219
|
-
errors.push(...drupalValidation.errors);
|
|
220
|
-
warnings.push(...drupalValidation.warnings);
|
|
221
|
-
return buildValidationResult(errors, warnings);
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Get example manifest optimized for Drupal
|
|
225
|
-
*/
|
|
226
|
-
getExample() {
|
|
227
|
-
return {
|
|
228
|
-
apiVersion: 'ossa/v{{VERSION}}',
|
|
229
|
-
kind: 'Agent',
|
|
230
|
-
metadata: {
|
|
231
|
-
name: 'content_moderator',
|
|
232
|
-
version: '1.0.0',
|
|
233
|
-
description: 'AI-powered content moderation agent for Drupal',
|
|
234
|
-
},
|
|
235
|
-
spec: {
|
|
236
|
-
role: 'Review and moderate user-generated content for quality and compliance',
|
|
237
|
-
llm: {
|
|
238
|
-
provider: 'anthropic',
|
|
239
|
-
model: 'claude-sonnet-4-20250514',
|
|
240
|
-
temperature: 0.7,
|
|
241
|
-
maxTokens: 2048,
|
|
242
|
-
},
|
|
243
|
-
capabilities: [
|
|
244
|
-
'content-analysis',
|
|
245
|
-
'spam-detection',
|
|
246
|
-
'sentiment-analysis',
|
|
247
|
-
'auto-moderation',
|
|
248
|
-
],
|
|
249
|
-
tools: [
|
|
250
|
-
{
|
|
251
|
-
type: 'api',
|
|
252
|
-
name: 'analyze_content',
|
|
253
|
-
description: 'Analyze content for spam, toxicity, and quality',
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
type: 'api',
|
|
257
|
-
name: 'moderate_node',
|
|
258
|
-
description: 'Publish, unpublish, or flag a Drupal node',
|
|
259
|
-
operation: 'update',
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
type: 'api',
|
|
263
|
-
name: 'delete_spam',
|
|
264
|
-
description: 'Delete confirmed spam content',
|
|
265
|
-
operation: 'delete',
|
|
266
|
-
},
|
|
267
|
-
],
|
|
268
|
-
safety: {
|
|
269
|
-
guardrails: [
|
|
270
|
-
{
|
|
271
|
-
name: 'block_profanity',
|
|
272
|
-
type: 'input',
|
|
273
|
-
blocked_patterns: ['badword1', 'badword2'],
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
name: 'max_output_length',
|
|
277
|
-
type: 'output',
|
|
278
|
-
maxLength: 5000,
|
|
279
|
-
},
|
|
280
|
-
],
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
extensions: {
|
|
284
|
-
drupal: {
|
|
285
|
-
eca_events: ['entity:node:presave'],
|
|
286
|
-
},
|
|
287
|
-
},
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
// ===================================================================
|
|
291
|
-
// Generator Methods
|
|
292
|
-
// ===================================================================
|
|
293
|
-
/**
|
|
294
|
-
* Generate MODULE.info.yml
|
|
295
|
-
*/
|
|
296
|
-
generateInfoYml(manifest, moduleName, options) {
|
|
297
|
-
const dependencies = ['ai:ai', 'ai:ai_agents'];
|
|
298
|
-
if (options.includeEntity) {
|
|
299
|
-
dependencies.push('drupal:views');
|
|
300
|
-
}
|
|
301
|
-
return `name: '${manifest.metadata?.name || moduleName}'
|
|
302
|
-
type: module
|
|
303
|
-
description: '${manifest.metadata?.description || 'OSSA agent module'}'
|
|
304
|
-
core_version_requirement: ${options.coreVersion}
|
|
305
|
-
package: 'OSSA Agents'
|
|
306
|
-
|
|
307
|
-
dependencies:
|
|
308
|
-
${dependencies.map((d) => ` - ${d}`).join('\n')}
|
|
309
|
-
|
|
310
|
-
# OSSA metadata
|
|
311
|
-
ossa:
|
|
312
|
-
version: '${manifest.metadata?.version || '1.0.0'}'
|
|
313
|
-
api_version: '${manifest.apiVersion || 'ossa/v{{VERSION}}'}'
|
|
314
|
-
kind: '${manifest.kind || 'Agent'}'
|
|
315
|
-
`;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Generate MODULE.services.yml with full DI configuration
|
|
319
|
-
*/
|
|
320
|
-
generateServicesYml(manifest, moduleName, className, options) {
|
|
321
|
-
let services = `services:
|
|
322
|
-
# ===================================================================
|
|
323
|
-
# Agent Executor Service (uses Drupal AI module)
|
|
324
|
-
# ===================================================================
|
|
325
|
-
|
|
326
|
-
${moduleName}.agent_executor:
|
|
327
|
-
class: Drupal\\${moduleName}\\Service\\AgentExecutorService
|
|
328
|
-
arguments:
|
|
329
|
-
- '@ai.provider'
|
|
330
|
-
- '@logger.factory'
|
|
331
|
-
- '@config.factory'
|
|
332
|
-
- '@entity_type.manager'
|
|
333
|
-
`;
|
|
334
|
-
if (options.includeEntity) {
|
|
335
|
-
services += ` - '@queue'
|
|
336
|
-
`;
|
|
337
|
-
}
|
|
338
|
-
services += ` tags:
|
|
339
|
-
- { name: ossa_agent }
|
|
340
|
-
`;
|
|
341
|
-
if (options.includeQueueWorker) {
|
|
342
|
-
services += `
|
|
343
|
-
# ===================================================================
|
|
344
|
-
# Queue Service
|
|
345
|
-
# ===================================================================
|
|
346
|
-
|
|
347
|
-
${moduleName}.queue:
|
|
348
|
-
parent: queue
|
|
349
|
-
arguments: ['${moduleName}_agent_queue']
|
|
350
|
-
`;
|
|
351
|
-
}
|
|
352
|
-
return services;
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Generate composer.json with Drupal AI module dependencies
|
|
356
|
-
*/
|
|
357
|
-
generateComposerJson(manifest, moduleName) {
|
|
358
|
-
return JSON.stringify({
|
|
359
|
-
name: `drupal/${moduleName}`,
|
|
360
|
-
type: 'drupal-module',
|
|
361
|
-
description: manifest.metadata?.description || 'OSSA agent module',
|
|
362
|
-
keywords: ['Drupal', 'OSSA', 'AI', 'Agent'],
|
|
363
|
-
license: manifest.metadata?.license || 'GPL-2.0-or-later',
|
|
364
|
-
require: {
|
|
365
|
-
php: '>=8.2',
|
|
366
|
-
'drupal/core': '^10 || ^11',
|
|
367
|
-
'drupal/ai': '^1.0',
|
|
368
|
-
'drupal/ai_agents': '^1.3',
|
|
369
|
-
'drupal/tool': '^1.0@alpha',
|
|
370
|
-
},
|
|
371
|
-
autoload: {
|
|
372
|
-
'psr-4': {
|
|
373
|
-
[`Drupal\\${moduleName}\\`]: 'src/',
|
|
374
|
-
},
|
|
375
|
-
},
|
|
376
|
-
extra: {
|
|
377
|
-
ossa: {
|
|
378
|
-
version: manifest.metadata?.version,
|
|
379
|
-
apiVersion: manifest.apiVersion,
|
|
380
|
-
kind: manifest.kind,
|
|
381
|
-
},
|
|
382
|
-
},
|
|
383
|
-
}, null, 2);
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* Generate MODULE.module with minimal procedural hooks.
|
|
387
|
-
*
|
|
388
|
-
* Most hooks are now implemented as OO classes using PHP 8 #[Hook] attributes
|
|
389
|
-
* in src/Hook/. Only hook_help remains procedural as a legacy convention.
|
|
390
|
-
*/
|
|
391
|
-
generateModuleHooks(manifest, moduleName, className) {
|
|
392
|
-
return `<?php
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* @file
|
|
396
|
-
* ${className} module hooks (minimal procedural file).
|
|
397
|
-
*
|
|
398
|
-
* Most hooks are implemented as OO classes in src/Hook/ using
|
|
399
|
-
* PHP 8 #[Hook] attributes. Only legacy procedural hooks remain here.
|
|
400
|
-
*/
|
|
401
|
-
|
|
402
|
-
use Drupal\\Core\\Routing\\RouteMatchInterface;
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* Implements hook_help().
|
|
406
|
-
*/
|
|
407
|
-
function ${moduleName}_help(string $route_name, RouteMatchInterface $route_match): string|null {
|
|
408
|
-
if ($route_name === 'help.page.${moduleName}') {
|
|
409
|
-
return '<p>' . t('${manifest.metadata?.description || 'OSSA agent module'}') . '</p>';
|
|
410
|
-
}
|
|
411
|
-
return NULL;
|
|
412
|
-
}
|
|
413
|
-
`;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Generate OO hook classes using PHP 8 #[Hook] attributes.
|
|
417
|
-
*
|
|
418
|
-
* Generates:
|
|
419
|
-
* - src/Hook/CronHooks.php (hook_cron)
|
|
420
|
-
* - src/Hook/EntityHooks.php (hook_entity_presave)
|
|
421
|
-
* - src/Hook/ThemeHooks.php (hook_theme)
|
|
422
|
-
*/
|
|
423
|
-
generateHookClasses(manifest, moduleName, className) {
|
|
424
|
-
const files = [];
|
|
425
|
-
// src/Hook/CronHooks.php
|
|
426
|
-
files.push(this.createFile(`${moduleName}/src/Hook/CronHooks.php`, this.generateCronHookClass(manifest, moduleName, className), 'code', 'php'));
|
|
427
|
-
// src/Hook/EntityHooks.php
|
|
428
|
-
files.push(this.createFile(`${moduleName}/src/Hook/EntityHooks.php`, this.generateEntityHookClass(manifest, moduleName, className), 'code', 'php'));
|
|
429
|
-
// src/Hook/ThemeHooks.php
|
|
430
|
-
files.push(this.createFile(`${moduleName}/src/Hook/ThemeHooks.php`, this.generateThemeHookClass(moduleName), 'code', 'php'));
|
|
431
|
-
return files;
|
|
432
|
-
}
|
|
433
|
-
/**
|
|
434
|
-
* Generate src/Hook/CronHooks.php
|
|
435
|
-
*/
|
|
436
|
-
generateCronHookClass(manifest, moduleName, className) {
|
|
437
|
-
return `<?php
|
|
438
|
-
|
|
439
|
-
declare(strict_types=1);
|
|
440
|
-
|
|
441
|
-
namespace Drupal\\${moduleName}\\Hook;
|
|
442
|
-
|
|
443
|
-
use Drupal\\Core\\Hook\\Attribute\\Hook;
|
|
444
|
-
use Drupal\\Core\\Queue\\QueueFactory;
|
|
445
|
-
use Drupal\\Core\\Queue\\QueueWorkerManagerInterface;
|
|
446
|
-
use Psr\\Log\\LoggerInterface;
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Cron hook implementations for ${className}.
|
|
450
|
-
*/
|
|
451
|
-
class CronHooks {
|
|
452
|
-
|
|
453
|
-
public function __construct(
|
|
454
|
-
protected readonly QueueFactory $queueFactory,
|
|
455
|
-
protected readonly QueueWorkerManagerInterface $queueWorkerManager,
|
|
456
|
-
protected readonly LoggerInterface $logger,
|
|
457
|
-
) {}
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Process queued agent tasks during cron.
|
|
461
|
-
*/
|
|
462
|
-
#[Hook('cron')]
|
|
463
|
-
public function processCron(): void {
|
|
464
|
-
$queue = $this->queueFactory->get('${moduleName}_agent_queue');
|
|
465
|
-
$queue_worker = $this->queueWorkerManager->createInstance('${moduleName}_agent_queue');
|
|
466
|
-
|
|
467
|
-
$processed = 0;
|
|
468
|
-
$max_items = 50;
|
|
469
|
-
|
|
470
|
-
while ($processed < $max_items && $item = $queue->claimItem()) {
|
|
471
|
-
try {
|
|
472
|
-
$queue_worker->processItem($item->data);
|
|
473
|
-
$queue->deleteItem($item);
|
|
474
|
-
$processed++;
|
|
475
|
-
}
|
|
476
|
-
catch (\\Exception $e) {
|
|
477
|
-
$this->logger->error('Queue processing failed: @message', [
|
|
478
|
-
'@message' => $e->getMessage(),
|
|
479
|
-
]);
|
|
480
|
-
$queue->releaseItem($item);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
if ($processed > 0) {
|
|
485
|
-
$this->logger->info('Processed @count agent queue items', [
|
|
486
|
-
'@count' => $processed,
|
|
487
|
-
]);
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
}
|
|
492
|
-
`;
|
|
493
|
-
}
|
|
494
|
-
/**
|
|
495
|
-
* Generate src/Hook/EntityHooks.php
|
|
496
|
-
*/
|
|
497
|
-
generateEntityHookClass(manifest, moduleName, className) {
|
|
498
|
-
return `<?php
|
|
499
|
-
|
|
500
|
-
declare(strict_types=1);
|
|
501
|
-
|
|
502
|
-
namespace Drupal\\${moduleName}\\Hook;
|
|
503
|
-
|
|
504
|
-
use Drupal\\Core\\Config\\ConfigFactoryInterface;
|
|
505
|
-
use Drupal\\Core\\Entity\\EntityInterface;
|
|
506
|
-
use Drupal\\Core\\Hook\\Attribute\\Hook;
|
|
507
|
-
use Drupal\\Core\\Queue\\QueueFactory;
|
|
508
|
-
|
|
509
|
-
/**
|
|
510
|
-
* Entity hook implementations for ${className}.
|
|
511
|
-
*/
|
|
512
|
-
class EntityHooks {
|
|
513
|
-
|
|
514
|
-
public function __construct(
|
|
515
|
-
protected readonly ConfigFactoryInterface $configFactory,
|
|
516
|
-
protected readonly QueueFactory $queueFactory,
|
|
517
|
-
) {}
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* Queue agent execution on entity save.
|
|
521
|
-
*/
|
|
522
|
-
#[Hook('entity_presave')]
|
|
523
|
-
public function entityPresave(EntityInterface $entity): void {
|
|
524
|
-
$config = $this->configFactory->get('${moduleName}.settings');
|
|
525
|
-
|
|
526
|
-
if (!$config->get('auto_execute_on_save')) {
|
|
527
|
-
return;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
$enabled_types = $config->get('enabled_entity_types') ?: [];
|
|
531
|
-
if (!in_array($entity->getEntityTypeId(), $enabled_types)) {
|
|
532
|
-
return;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
$queue = $this->queueFactory->get('${moduleName}_agent_queue');
|
|
536
|
-
$queue->createItem([
|
|
537
|
-
'entity_type' => $entity->getEntityTypeId(),
|
|
538
|
-
'entity_id' => $entity->id(),
|
|
539
|
-
'operation' => 'presave',
|
|
540
|
-
'timestamp' => time(),
|
|
541
|
-
]);
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
}
|
|
545
|
-
`;
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* Generate src/Hook/ThemeHooks.php
|
|
549
|
-
*/
|
|
550
|
-
generateThemeHookClass(moduleName) {
|
|
551
|
-
return `<?php
|
|
552
|
-
|
|
553
|
-
declare(strict_types=1);
|
|
554
|
-
|
|
555
|
-
namespace Drupal\\${moduleName}\\Hook;
|
|
556
|
-
|
|
557
|
-
use Drupal\\Core\\Hook\\Attribute\\Hook;
|
|
558
|
-
|
|
559
|
-
/**
|
|
560
|
-
* Theme hook implementations.
|
|
561
|
-
*/
|
|
562
|
-
class ThemeHooks {
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* Register theme templates.
|
|
566
|
-
*/
|
|
567
|
-
#[Hook('theme')]
|
|
568
|
-
public function theme(): array {
|
|
569
|
-
return [
|
|
570
|
-
'agent_result' => [
|
|
571
|
-
'variables' => [
|
|
572
|
-
'result' => NULL,
|
|
573
|
-
'metadata' => NULL,
|
|
574
|
-
],
|
|
575
|
-
'template' => 'agent-result',
|
|
576
|
-
],
|
|
577
|
-
'agent_execute_form' => [
|
|
578
|
-
'render element' => 'form',
|
|
579
|
-
'template' => 'agent-execute-form',
|
|
580
|
-
],
|
|
581
|
-
];
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
`;
|
|
586
|
-
}
|
|
587
|
-
/**
|
|
588
|
-
* Generate src/Service/AgentExecutorService.php
|
|
589
|
-
*
|
|
590
|
-
* Uses Drupal AI module for LLM provider integration
|
|
591
|
-
*/
|
|
592
|
-
generateAgentExecutorService(manifest, moduleName, className) {
|
|
593
|
-
return `<?php
|
|
594
|
-
|
|
595
|
-
declare(strict_types=1);
|
|
596
|
-
|
|
597
|
-
namespace Drupal\\${moduleName}\\Service;
|
|
598
|
-
|
|
599
|
-
use Drupal\\ai\\AiProviderPluginManager;
|
|
600
|
-
use Drupal\\Core\\Config\\ConfigFactoryInterface;
|
|
601
|
-
use Drupal\\Core\\Entity\\EntityTypeManagerInterface;
|
|
602
|
-
use Drupal\\Core\\Logger\\LoggerChannelFactoryInterface;
|
|
603
|
-
use Drupal\\Core\\Queue\\QueueFactory;
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* Agent Executor Service.
|
|
607
|
-
*
|
|
608
|
-
* Uses the Drupal AI module provider system for LLM execution:
|
|
609
|
-
* - AI provider plugin manager for model access
|
|
610
|
-
* - Entity storage for results
|
|
611
|
-
* - Queue integration for async execution
|
|
612
|
-
* - Drupal configuration integration
|
|
613
|
-
* - Logging integration
|
|
614
|
-
*/
|
|
615
|
-
class AgentExecutorService {
|
|
616
|
-
|
|
617
|
-
public function __construct(
|
|
618
|
-
protected readonly AiProviderPluginManager $aiProvider,
|
|
619
|
-
protected readonly LoggerChannelFactoryInterface $loggerFactory,
|
|
620
|
-
protected readonly ConfigFactoryInterface $configFactory,
|
|
621
|
-
protected readonly EntityTypeManagerInterface $entityTypeManager,
|
|
622
|
-
protected readonly QueueFactory $queueFactory,
|
|
623
|
-
) {}
|
|
624
|
-
|
|
625
|
-
/**
|
|
626
|
-
* Execute the agent synchronously.
|
|
627
|
-
*
|
|
628
|
-
* @param string $input
|
|
629
|
-
* Input data for the agent.
|
|
630
|
-
* @param array $context
|
|
631
|
-
* Additional context (Drupal-specific: user_id, site_name, etc.).
|
|
632
|
-
* @param bool $save_result
|
|
633
|
-
* Whether to save the result to the database.
|
|
634
|
-
*
|
|
635
|
-
* @return array
|
|
636
|
-
* Agent execution result with 'success', 'output', and 'metadata' keys.
|
|
637
|
-
*/
|
|
638
|
-
public function execute(string $input, array $context = [], bool $save_result = TRUE): array {
|
|
639
|
-
$logger = $this->loggerFactory->get('${moduleName}');
|
|
640
|
-
|
|
641
|
-
try {
|
|
642
|
-
$logger->info('Agent execution started');
|
|
643
|
-
|
|
644
|
-
$context = $this->enrichContext($context);
|
|
645
|
-
|
|
646
|
-
$config = $this->configFactory->get('${moduleName}.settings');
|
|
647
|
-
$provider_id = $config->get('llm_provider') ?? 'anthropic';
|
|
648
|
-
$model_id = $config->get('llm_model') ?? 'claude-sonnet-4-20250514';
|
|
649
|
-
|
|
650
|
-
/** @var \\Drupal\\ai\\OperationType\\Chat\\ChatInterface $provider */
|
|
651
|
-
$provider = $this->aiProvider->createInstance($provider_id);
|
|
652
|
-
$provider->setConfiguration(['model_id' => $model_id]);
|
|
653
|
-
|
|
654
|
-
$messages = new \\Drupal\\ai\\OperationType\\Chat\\ChatInput([
|
|
655
|
-
new \\Drupal\\ai\\OperationType\\Chat\\ChatMessage('user', $input),
|
|
656
|
-
]);
|
|
657
|
-
|
|
658
|
-
$response = $provider->chat($messages, $model_id);
|
|
659
|
-
|
|
660
|
-
$result = [
|
|
661
|
-
'success' => TRUE,
|
|
662
|
-
'output' => $response->getNormalized()->getText(),
|
|
663
|
-
'metadata' => [
|
|
664
|
-
'provider' => $provider_id,
|
|
665
|
-
'model' => $model_id,
|
|
666
|
-
],
|
|
667
|
-
];
|
|
668
|
-
|
|
669
|
-
if ($save_result) {
|
|
670
|
-
$this->saveResult($input, $result);
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
$logger->info('Agent execution completed successfully');
|
|
674
|
-
|
|
675
|
-
return $result;
|
|
676
|
-
}
|
|
677
|
-
catch (\\Exception $e) {
|
|
678
|
-
$logger->error('Agent execution failed: @message', [
|
|
679
|
-
'@message' => $e->getMessage(),
|
|
680
|
-
]);
|
|
681
|
-
|
|
682
|
-
return [
|
|
683
|
-
'success' => FALSE,
|
|
684
|
-
'error' => $e->getMessage(),
|
|
685
|
-
];
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
/**
|
|
690
|
-
* Execute the agent asynchronously via queue.
|
|
691
|
-
*
|
|
692
|
-
* @param string $input
|
|
693
|
-
* Input data for the agent.
|
|
694
|
-
* @param array $context
|
|
695
|
-
* Additional context.
|
|
696
|
-
*
|
|
697
|
-
* @return int
|
|
698
|
-
* Queue item ID.
|
|
699
|
-
*/
|
|
700
|
-
public function executeAsync(string $input, array $context = []): int {
|
|
701
|
-
$queue = $this->queueFactory->get('${moduleName}_agent_queue');
|
|
702
|
-
|
|
703
|
-
return $queue->createItem([
|
|
704
|
-
'input' => $input,
|
|
705
|
-
'context' => $context,
|
|
706
|
-
'timestamp' => time(),
|
|
707
|
-
]);
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
* Execute a specific tool by name.
|
|
712
|
-
*
|
|
713
|
-
* Called by Tool API plugin classes to delegate execution
|
|
714
|
-
* to the OSSA agent executor.
|
|
715
|
-
*
|
|
716
|
-
* @param string $tool_name
|
|
717
|
-
* The OSSA tool name.
|
|
718
|
-
* @param array $input
|
|
719
|
-
* Tool input parameters.
|
|
720
|
-
*
|
|
721
|
-
* @return array
|
|
722
|
-
* Tool execution result.
|
|
723
|
-
*/
|
|
724
|
-
public function executeTool(string $tool_name, array $input): array {
|
|
725
|
-
$logger = $this->loggerFactory->get('${moduleName}');
|
|
726
|
-
|
|
727
|
-
try {
|
|
728
|
-
$logger->info('Tool execution started: @tool', ['@tool' => $tool_name]);
|
|
729
|
-
|
|
730
|
-
$context = $this->enrichContext([
|
|
731
|
-
'tool' => $tool_name,
|
|
732
|
-
]);
|
|
733
|
-
|
|
734
|
-
$response = $this->agentExecutor->executeTool(
|
|
735
|
-
'${manifest.metadata?.name || 'agent'}',
|
|
736
|
-
$tool_name,
|
|
737
|
-
$input,
|
|
738
|
-
$context
|
|
739
|
-
);
|
|
740
|
-
|
|
741
|
-
$result = [
|
|
742
|
-
'success' => TRUE,
|
|
743
|
-
'output' => $response->getOutput(),
|
|
744
|
-
'metadata' => $response->getMetadata(),
|
|
745
|
-
];
|
|
746
|
-
|
|
747
|
-
$logger->info('Tool execution completed: @tool', ['@tool' => $tool_name]);
|
|
748
|
-
|
|
749
|
-
return $result;
|
|
750
|
-
}
|
|
751
|
-
catch (\\Exception $e) {
|
|
752
|
-
$logger->error('Tool execution failed (@tool): @message', [
|
|
753
|
-
'@tool' => $tool_name,
|
|
754
|
-
'@message' => $e->getMessage(),
|
|
755
|
-
]);
|
|
756
|
-
|
|
757
|
-
return [
|
|
758
|
-
'success' => FALSE,
|
|
759
|
-
'error' => $e->getMessage(),
|
|
760
|
-
];
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
/**
|
|
765
|
-
* Enrich context with Drupal-specific data.
|
|
766
|
-
*
|
|
767
|
-
* @param array $context
|
|
768
|
-
* Base context.
|
|
769
|
-
*
|
|
770
|
-
* @return array
|
|
771
|
-
* Enriched context.
|
|
772
|
-
*/
|
|
773
|
-
protected function enrichContext(array $context): array {
|
|
774
|
-
$context['site_name'] = $this->configFactory
|
|
775
|
-
->get('system.site')
|
|
776
|
-
->get('name');
|
|
777
|
-
|
|
778
|
-
$current_user = \\Drupal::currentUser();
|
|
779
|
-
$context['user_id'] = $current_user->id();
|
|
780
|
-
$context['user_name'] = $current_user->getAccountName();
|
|
781
|
-
$context['drupal_version'] = \\Drupal::VERSION;
|
|
782
|
-
|
|
783
|
-
$module_config = $this->configFactory->get('${moduleName}.settings');
|
|
784
|
-
$context['module_config'] = $module_config->getRawData();
|
|
785
|
-
|
|
786
|
-
return $context;
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
/**
|
|
790
|
-
* Save agent result to entity storage.
|
|
791
|
-
*
|
|
792
|
-
* @param string $input
|
|
793
|
-
* The input that was processed.
|
|
794
|
-
* @param array $result
|
|
795
|
-
* The execution result.
|
|
796
|
-
*/
|
|
797
|
-
protected function saveResult(string $input, array $result): void {
|
|
798
|
-
try {
|
|
799
|
-
$storage = $this->entityTypeManager->getStorage('${moduleName}_result');
|
|
800
|
-
|
|
801
|
-
$entity = $storage->create([
|
|
802
|
-
'name' => 'Result ' . date('Y-m-d H:i:s'),
|
|
803
|
-
'input' => $input,
|
|
804
|
-
'output' => $result['output'] ?? '',
|
|
805
|
-
'metadata' => json_encode($result['metadata'] ?? []),
|
|
806
|
-
'status' => $result['success'] ? 'completed' : 'failed',
|
|
807
|
-
'created' => time(),
|
|
808
|
-
]);
|
|
809
|
-
|
|
810
|
-
$entity->save();
|
|
811
|
-
}
|
|
812
|
-
catch (\\Exception $e) {
|
|
813
|
-
$this->loggerFactory->get('${moduleName}')->error(
|
|
814
|
-
'Failed to save result: @message',
|
|
815
|
-
['@message' => $e->getMessage()]
|
|
816
|
-
);
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
}
|
|
821
|
-
`;
|
|
822
|
-
}
|
|
823
|
-
/**
|
|
824
|
-
* Generate src/Plugin/QueueWorker/AgentQueueWorker.php
|
|
825
|
-
*/
|
|
826
|
-
generateQueueWorker(manifest, moduleName, className) {
|
|
827
|
-
return `<?php
|
|
828
|
-
|
|
829
|
-
declare(strict_types=1);
|
|
830
|
-
|
|
831
|
-
namespace Drupal\\${moduleName}\\Plugin\\QueueWorker;
|
|
832
|
-
|
|
833
|
-
use Drupal\\Core\\Plugin\\ContainerFactoryPluginInterface;
|
|
834
|
-
use Drupal\\Core\\Queue\\Attribute\\QueueWorker;
|
|
835
|
-
use Drupal\\Core\\Queue\\QueueWorkerBase;
|
|
836
|
-
use Drupal\\Core\\StringTranslation\\TranslatableMarkup;
|
|
837
|
-
use Drupal\\${moduleName}\\Service\\AgentExecutorService;
|
|
838
|
-
use Symfony\\Component\\DependencyInjection\\ContainerInterface;
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* Agent Queue Worker.
|
|
842
|
-
*
|
|
843
|
-
* Processes agent execution tasks asynchronously via Drupal's queue system.
|
|
844
|
-
*/
|
|
845
|
-
#[QueueWorker(
|
|
846
|
-
id: '${moduleName}_agent_queue',
|
|
847
|
-
title: new TranslatableMarkup('${className} Agent Queue Worker'),
|
|
848
|
-
cron: ['time' => 60],
|
|
849
|
-
)]
|
|
850
|
-
class AgentQueueWorker extends QueueWorkerBase implements ContainerFactoryPluginInterface {
|
|
851
|
-
|
|
852
|
-
public function __construct(
|
|
853
|
-
array $configuration,
|
|
854
|
-
$plugin_id,
|
|
855
|
-
$plugin_definition,
|
|
856
|
-
protected readonly AgentExecutorService $agentExecutor,
|
|
857
|
-
) {
|
|
858
|
-
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
/**
|
|
862
|
-
* {@inheritdoc}
|
|
863
|
-
*/
|
|
864
|
-
public static function create(
|
|
865
|
-
ContainerInterface $container,
|
|
866
|
-
array $configuration,
|
|
867
|
-
$plugin_id,
|
|
868
|
-
$plugin_definition,
|
|
869
|
-
): static {
|
|
870
|
-
return new static(
|
|
871
|
-
$configuration,
|
|
872
|
-
$plugin_id,
|
|
873
|
-
$plugin_definition,
|
|
874
|
-
$container->get('${moduleName}.agent_executor'),
|
|
875
|
-
);
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
/**
|
|
879
|
-
* {@inheritdoc}
|
|
880
|
-
*/
|
|
881
|
-
public function processItem($data): void {
|
|
882
|
-
$input = $data['input'] ?? '';
|
|
883
|
-
$context = $data['context'] ?? [];
|
|
884
|
-
|
|
885
|
-
if (empty($input)) {
|
|
886
|
-
throw new \\Exception('Queue item missing required input data');
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
$result = $this->agentExecutor->execute($input, $context, TRUE);
|
|
890
|
-
|
|
891
|
-
if (!$result['success']) {
|
|
892
|
-
throw new \\Exception($result['error'] ?? 'Agent execution failed');
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
}
|
|
897
|
-
`;
|
|
898
|
-
}
|
|
899
|
-
/**
|
|
900
|
-
* Generate src/Entity/AgentResult.php
|
|
901
|
-
*/
|
|
902
|
-
generateEntityClass(manifest, moduleName, className) {
|
|
903
|
-
return `<?php
|
|
904
|
-
|
|
905
|
-
declare(strict_types=1);
|
|
906
|
-
|
|
907
|
-
namespace Drupal\\${moduleName}\\Entity;
|
|
908
|
-
|
|
909
|
-
use Drupal\\Core\\Entity\\Attribute\\ContentEntityType;
|
|
910
|
-
use Drupal\\Core\\Entity\\ContentEntityBase;
|
|
911
|
-
use Drupal\\Core\\Entity\\EntityTypeInterface;
|
|
912
|
-
use Drupal\\Core\\Entity\\EntityViewBuilder;
|
|
913
|
-
use Drupal\\Core\\Entity\\EntityListBuilder;
|
|
914
|
-
use Drupal\\Core\\Entity\\EntityAccessControlHandler;
|
|
915
|
-
use Drupal\\Core\\Field\\BaseFieldDefinition;
|
|
916
|
-
use Drupal\\Core\\StringTranslation\\TranslatableMarkup;
|
|
917
|
-
use Drupal\\views\\EntityViewsData;
|
|
918
|
-
|
|
919
|
-
/**
|
|
920
|
-
* Defines the Agent Result entity.
|
|
921
|
-
*
|
|
922
|
-
* Stores agent execution results for auditing and analysis.
|
|
923
|
-
*/
|
|
924
|
-
#[ContentEntityType(
|
|
925
|
-
id: '${moduleName}_result',
|
|
926
|
-
label: new TranslatableMarkup('Agent Result'),
|
|
927
|
-
base_table: '${moduleName}_result',
|
|
928
|
-
entity_keys: [
|
|
929
|
-
'id' => 'id',
|
|
930
|
-
'label' => 'name',
|
|
931
|
-
'uuid' => 'uuid',
|
|
932
|
-
],
|
|
933
|
-
handlers: [
|
|
934
|
-
'view_builder' => EntityViewBuilder::class,
|
|
935
|
-
'list_builder' => EntityListBuilder::class,
|
|
936
|
-
'views_data' => EntityViewsData::class,
|
|
937
|
-
'access' => EntityAccessControlHandler::class,
|
|
938
|
-
],
|
|
939
|
-
links: [
|
|
940
|
-
'canonical' => '/admin/${moduleName}/result/{${moduleName}_result}',
|
|
941
|
-
'collection' => '/admin/${moduleName}/results',
|
|
942
|
-
],
|
|
943
|
-
)]
|
|
944
|
-
class AgentResult extends ContentEntityBase implements AgentResultInterface {
|
|
945
|
-
|
|
946
|
-
/**
|
|
947
|
-
* {@inheritdoc}
|
|
948
|
-
*/
|
|
949
|
-
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
|
|
950
|
-
$fields = parent::baseFieldDefinitions($entity_type);
|
|
951
|
-
|
|
952
|
-
$fields['name'] = BaseFieldDefinition::create('string')
|
|
953
|
-
->setLabel(t('Name'))
|
|
954
|
-
->setDescription(t('Result name/title'))
|
|
955
|
-
->setSettings([
|
|
956
|
-
'max_length' => 255,
|
|
957
|
-
'text_processing' => 0,
|
|
958
|
-
])
|
|
959
|
-
->setDisplayOptions('view', [
|
|
960
|
-
'label' => 'hidden',
|
|
961
|
-
'type' => 'string',
|
|
962
|
-
'weight' => -5,
|
|
963
|
-
])
|
|
964
|
-
->setDisplayOptions('form', [
|
|
965
|
-
'type' => 'string_textfield',
|
|
966
|
-
'weight' => -5,
|
|
967
|
-
]);
|
|
968
|
-
|
|
969
|
-
$fields['input'] = BaseFieldDefinition::create('string_long')
|
|
970
|
-
->setLabel(t('Input'))
|
|
971
|
-
->setDescription(t('Agent input data'))
|
|
972
|
-
->setDisplayOptions('view', [
|
|
973
|
-
'label' => 'above',
|
|
974
|
-
'type' => 'text_default',
|
|
975
|
-
'weight' => 0,
|
|
976
|
-
]);
|
|
977
|
-
|
|
978
|
-
$fields['output'] = BaseFieldDefinition::create('string_long')
|
|
979
|
-
->setLabel(t('Output'))
|
|
980
|
-
->setDescription(t('Agent output/response'))
|
|
981
|
-
->setDisplayOptions('view', [
|
|
982
|
-
'label' => 'above',
|
|
983
|
-
'type' => 'text_default',
|
|
984
|
-
'weight' => 1,
|
|
985
|
-
]);
|
|
986
|
-
|
|
987
|
-
$fields['metadata'] = BaseFieldDefinition::create('string_long')
|
|
988
|
-
->setLabel(t('Metadata'))
|
|
989
|
-
->setDescription(t('Execution metadata (JSON)'))
|
|
990
|
-
->setDisplayOptions('view', [
|
|
991
|
-
'label' => 'above',
|
|
992
|
-
'type' => 'text_default',
|
|
993
|
-
'weight' => 2,
|
|
994
|
-
]);
|
|
995
|
-
|
|
996
|
-
$fields['status'] = BaseFieldDefinition::create('list_string')
|
|
997
|
-
->setLabel(t('Status'))
|
|
998
|
-
->setSettings([
|
|
999
|
-
'allowed_values' => [
|
|
1000
|
-
'pending' => 'Pending',
|
|
1001
|
-
'processing' => 'Processing',
|
|
1002
|
-
'completed' => 'Completed',
|
|
1003
|
-
'failed' => 'Failed',
|
|
1004
|
-
],
|
|
1005
|
-
])
|
|
1006
|
-
->setDefaultValue('pending')
|
|
1007
|
-
->setDisplayOptions('view', [
|
|
1008
|
-
'label' => 'inline',
|
|
1009
|
-
'type' => 'list_default',
|
|
1010
|
-
'weight' => 3,
|
|
1011
|
-
]);
|
|
1012
|
-
|
|
1013
|
-
$fields['created'] = BaseFieldDefinition::create('created')
|
|
1014
|
-
->setLabel(t('Created'))
|
|
1015
|
-
->setDescription(t('Creation timestamp'));
|
|
1016
|
-
|
|
1017
|
-
return $fields;
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
`;
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
* Generate src/Entity/AgentResultInterface.php
|
|
1024
|
-
*/
|
|
1025
|
-
generateEntityInterface(moduleName) {
|
|
1026
|
-
return `<?php
|
|
1027
|
-
|
|
1028
|
-
namespace Drupal\\${moduleName}\\Entity;
|
|
1029
|
-
|
|
1030
|
-
use Drupal\\Core\\Entity\\ContentEntityInterface;
|
|
1031
|
-
|
|
1032
|
-
/**
|
|
1033
|
-
* Interface for Agent Result entities.
|
|
1034
|
-
*/
|
|
1035
|
-
interface AgentResultInterface extends ContentEntityInterface {
|
|
1036
|
-
}
|
|
1037
|
-
`;
|
|
1038
|
-
}
|
|
1039
|
-
/**
|
|
1040
|
-
* Generate MODULE.views.inc
|
|
1041
|
-
*/
|
|
1042
|
-
generateViewsData(moduleName, className) {
|
|
1043
|
-
return `<?php
|
|
1044
|
-
|
|
1045
|
-
/**
|
|
1046
|
-
* @file
|
|
1047
|
-
* Provide views data for ${moduleName}_result entities.
|
|
1048
|
-
*/
|
|
1049
|
-
|
|
1050
|
-
/**
|
|
1051
|
-
* Implements hook_views_data().
|
|
1052
|
-
*/
|
|
1053
|
-
function ${moduleName}_views_data() {
|
|
1054
|
-
$data = [];
|
|
1055
|
-
|
|
1056
|
-
$data['${moduleName}_result']['table']['group'] = t('Agent Result');
|
|
1057
|
-
$data['${moduleName}_result']['table']['base'] = [
|
|
1058
|
-
'field' => 'id',
|
|
1059
|
-
'title' => t('Agent Result'),
|
|
1060
|
-
'help' => t('Agent execution results.'),
|
|
1061
|
-
];
|
|
1062
|
-
|
|
1063
|
-
$data['${moduleName}_result']['id'] = [
|
|
1064
|
-
'title' => t('ID'),
|
|
1065
|
-
'help' => t('The agent result ID.'),
|
|
1066
|
-
'field' => [
|
|
1067
|
-
'id' => 'numeric',
|
|
1068
|
-
],
|
|
1069
|
-
'sort' => [
|
|
1070
|
-
'id' => 'standard',
|
|
1071
|
-
],
|
|
1072
|
-
'filter' => [
|
|
1073
|
-
'id' => 'numeric',
|
|
1074
|
-
],
|
|
1075
|
-
];
|
|
1076
|
-
|
|
1077
|
-
$data['${moduleName}_result']['name'] = [
|
|
1078
|
-
'title' => t('Name'),
|
|
1079
|
-
'help' => t('The result name.'),
|
|
1080
|
-
'field' => [
|
|
1081
|
-
'id' => 'standard',
|
|
1082
|
-
],
|
|
1083
|
-
'sort' => [
|
|
1084
|
-
'id' => 'standard',
|
|
1085
|
-
],
|
|
1086
|
-
'filter' => [
|
|
1087
|
-
'id' => 'string',
|
|
1088
|
-
],
|
|
1089
|
-
];
|
|
1090
|
-
|
|
1091
|
-
$data['${moduleName}_result']['status'] = [
|
|
1092
|
-
'title' => t('Status'),
|
|
1093
|
-
'help' => t('The execution status.'),
|
|
1094
|
-
'field' => [
|
|
1095
|
-
'id' => 'standard',
|
|
1096
|
-
],
|
|
1097
|
-
'sort' => [
|
|
1098
|
-
'id' => 'standard',
|
|
1099
|
-
],
|
|
1100
|
-
'filter' => [
|
|
1101
|
-
'id' => 'string',
|
|
1102
|
-
],
|
|
1103
|
-
];
|
|
1104
|
-
|
|
1105
|
-
$data['${moduleName}_result']['created'] = [
|
|
1106
|
-
'title' => t('Created'),
|
|
1107
|
-
'help' => t('The creation timestamp.'),
|
|
1108
|
-
'field' => [
|
|
1109
|
-
'id' => 'date',
|
|
1110
|
-
],
|
|
1111
|
-
'sort' => [
|
|
1112
|
-
'id' => 'date',
|
|
1113
|
-
],
|
|
1114
|
-
'filter' => [
|
|
1115
|
-
'id' => 'date',
|
|
1116
|
-
],
|
|
1117
|
-
];
|
|
1118
|
-
|
|
1119
|
-
return $data;
|
|
1120
|
-
}
|
|
1121
|
-
`;
|
|
1122
|
-
}
|
|
1123
|
-
/**
|
|
1124
|
-
* Generate src/Controller/AgentController.php
|
|
1125
|
-
*/
|
|
1126
|
-
generateController(manifest, moduleName, className) {
|
|
1127
|
-
return `<?php
|
|
1128
|
-
|
|
1129
|
-
namespace Drupal\\${moduleName}\\Controller;
|
|
1130
|
-
|
|
1131
|
-
use Drupal\\Core\\Controller\\ControllerBase;
|
|
1132
|
-
use Drupal\\${moduleName}\\Service\\AgentExecutorService;
|
|
1133
|
-
use Symfony\\Component\\DependencyInjection\\ContainerInterface;
|
|
1134
|
-
use Symfony\\Component\\HttpFoundation\\JsonResponse;
|
|
1135
|
-
use Symfony\\Component\\HttpFoundation\\Request;
|
|
1136
|
-
|
|
1137
|
-
/**
|
|
1138
|
-
* Agent Controller.
|
|
1139
|
-
*
|
|
1140
|
-
* Provides admin UI and API endpoints for agent execution.
|
|
1141
|
-
*/
|
|
1142
|
-
class AgentController extends ControllerBase {
|
|
1143
|
-
|
|
1144
|
-
/**
|
|
1145
|
-
* The agent executor service.
|
|
1146
|
-
*
|
|
1147
|
-
* @var \\Drupal\\${moduleName}\\Service\\AgentExecutorService
|
|
1148
|
-
*/
|
|
1149
|
-
protected AgentExecutorService $agentExecutor;
|
|
1150
|
-
|
|
1151
|
-
/**
|
|
1152
|
-
* {@inheritdoc}
|
|
1153
|
-
*/
|
|
1154
|
-
public function __construct(AgentExecutorService $agent_executor) {
|
|
1155
|
-
$this->agentExecutor = $agent_executor;
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
/**
|
|
1159
|
-
* {@inheritdoc}
|
|
1160
|
-
*/
|
|
1161
|
-
public static function create(ContainerInterface $container) {
|
|
1162
|
-
return new static(
|
|
1163
|
-
$container->get('${moduleName}.agent_executor')
|
|
1164
|
-
);
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
/**
|
|
1168
|
-
* Execute agent via UI.
|
|
1169
|
-
*/
|
|
1170
|
-
public function executePage() {
|
|
1171
|
-
$form = \\Drupal::formBuilder()->getForm('Drupal\\${moduleName}\\Form\\AgentExecuteForm');
|
|
1172
|
-
|
|
1173
|
-
return [
|
|
1174
|
-
'#theme' => 'agent_execute_form',
|
|
1175
|
-
'#form' => $form,
|
|
1176
|
-
];
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
/**
|
|
1180
|
-
* Execute agent via API.
|
|
1181
|
-
*/
|
|
1182
|
-
public function executeApi(Request $request): JsonResponse {
|
|
1183
|
-
$data = json_decode($request->getContent(), TRUE);
|
|
1184
|
-
|
|
1185
|
-
if (empty($data['input'])) {
|
|
1186
|
-
return new JsonResponse([
|
|
1187
|
-
'success' => FALSE,
|
|
1188
|
-
'error' => 'Missing required field: input',
|
|
1189
|
-
], 400);
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
$result = $this->agentExecutor->execute(
|
|
1193
|
-
$data['input'],
|
|
1194
|
-
$data['context'] ?? [],
|
|
1195
|
-
$data['save_result'] ?? TRUE
|
|
1196
|
-
);
|
|
1197
|
-
|
|
1198
|
-
return new JsonResponse($result);
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
/**
|
|
1202
|
-
* Execute agent asynchronously via API.
|
|
1203
|
-
*/
|
|
1204
|
-
public function executeAsyncApi(Request $request): JsonResponse {
|
|
1205
|
-
$data = json_decode($request->getContent(), TRUE);
|
|
1206
|
-
|
|
1207
|
-
if (empty($data['input'])) {
|
|
1208
|
-
return new JsonResponse([
|
|
1209
|
-
'success' => FALSE,
|
|
1210
|
-
'error' => 'Missing required field: input',
|
|
1211
|
-
], 400);
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
$queue_id = $this->agentExecutor->executeAsync(
|
|
1215
|
-
$data['input'],
|
|
1216
|
-
$data['context'] ?? []
|
|
1217
|
-
);
|
|
1218
|
-
|
|
1219
|
-
return new JsonResponse([
|
|
1220
|
-
'success' => TRUE,
|
|
1221
|
-
'queue_id' => $queue_id,
|
|
1222
|
-
'message' => 'Agent execution queued',
|
|
1223
|
-
]);
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
/**
|
|
1227
|
-
* Results listing page.
|
|
1228
|
-
*/
|
|
1229
|
-
public function resultsPage() {
|
|
1230
|
-
$storage = $this->entityTypeManager()->getStorage('${moduleName}_result');
|
|
1231
|
-
$results = $storage->loadMultiple();
|
|
1232
|
-
|
|
1233
|
-
$rows = [];
|
|
1234
|
-
foreach ($results as $result) {
|
|
1235
|
-
$rows[] = [
|
|
1236
|
-
'id' => $result->id(),
|
|
1237
|
-
'name' => $result->get('name')->value,
|
|
1238
|
-
'status' => $result->get('status')->value,
|
|
1239
|
-
'created' => date('Y-m-d H:i:s', $result->get('created')->value),
|
|
1240
|
-
];
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
return [
|
|
1244
|
-
'#theme' => 'table',
|
|
1245
|
-
'#header' => ['ID', 'Name', 'Status', 'Created'],
|
|
1246
|
-
'#rows' => $rows,
|
|
1247
|
-
'#empty' => $this->t('No results found.'),
|
|
1248
|
-
];
|
|
1249
|
-
}
|
|
1250
|
-
}
|
|
1251
|
-
`;
|
|
1252
|
-
}
|
|
1253
|
-
/**
|
|
1254
|
-
* Generate MODULE.routing.yml
|
|
1255
|
-
*/
|
|
1256
|
-
generateRouting(moduleName) {
|
|
1257
|
-
return `${moduleName}.execute:
|
|
1258
|
-
path: '/admin/${moduleName}/execute'
|
|
1259
|
-
defaults:
|
|
1260
|
-
_controller: '\\Drupal\\${moduleName}\\Controller\\AgentController::executePage'
|
|
1261
|
-
_title: 'Execute Agent'
|
|
1262
|
-
requirements:
|
|
1263
|
-
_permission: 'administer ${moduleName}'
|
|
1264
|
-
|
|
1265
|
-
${moduleName}.api.execute:
|
|
1266
|
-
path: '/api/${moduleName}/execute'
|
|
1267
|
-
defaults:
|
|
1268
|
-
_controller: '\\Drupal\\${moduleName}\\Controller\\AgentController::executeApi'
|
|
1269
|
-
methods: [POST]
|
|
1270
|
-
requirements:
|
|
1271
|
-
_permission: 'access content'
|
|
1272
|
-
|
|
1273
|
-
${moduleName}.api.execute_async:
|
|
1274
|
-
path: '/api/${moduleName}/execute-async'
|
|
1275
|
-
defaults:
|
|
1276
|
-
_controller: '\\Drupal\\${moduleName}\\Controller\\AgentController::executeAsyncApi'
|
|
1277
|
-
methods: [POST]
|
|
1278
|
-
requirements:
|
|
1279
|
-
_permission: 'access content'
|
|
1280
|
-
|
|
1281
|
-
${moduleName}.results:
|
|
1282
|
-
path: '/admin/${moduleName}/results'
|
|
1283
|
-
defaults:
|
|
1284
|
-
_controller: '\\Drupal\\${moduleName}\\Controller\\AgentController::resultsPage'
|
|
1285
|
-
_title: 'Agent Results'
|
|
1286
|
-
requirements:
|
|
1287
|
-
_permission: 'administer ${moduleName}'
|
|
1288
|
-
|
|
1289
|
-
${moduleName}.settings:
|
|
1290
|
-
path: '/admin/config/${moduleName}'
|
|
1291
|
-
defaults:
|
|
1292
|
-
_form: '\\Drupal\\${moduleName}\\Form\\AgentConfigForm'
|
|
1293
|
-
_title: 'Agent Configuration'
|
|
1294
|
-
requirements:
|
|
1295
|
-
_permission: 'administer ${moduleName}'
|
|
1296
|
-
`;
|
|
1297
|
-
}
|
|
1298
|
-
/**
|
|
1299
|
-
* Generate src/Form/AgentConfigForm.php
|
|
1300
|
-
*/
|
|
1301
|
-
generateConfigForm(manifest, moduleName, className) {
|
|
1302
|
-
return `<?php
|
|
1303
|
-
|
|
1304
|
-
namespace Drupal\\${moduleName}\\Form;
|
|
1305
|
-
|
|
1306
|
-
use Drupal\\Core\\Form\\ConfigFormBase;
|
|
1307
|
-
use Drupal\\Core\\Form\\FormStateInterface;
|
|
1308
|
-
|
|
1309
|
-
/**
|
|
1310
|
-
* Configuration form for ${className} agent.
|
|
1311
|
-
*/
|
|
1312
|
-
class AgentConfigForm extends ConfigFormBase {
|
|
1313
|
-
|
|
1314
|
-
/**
|
|
1315
|
-
* {@inheritdoc}
|
|
1316
|
-
*/
|
|
1317
|
-
protected function getEditableConfigNames() {
|
|
1318
|
-
return ['${moduleName}.settings'];
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
/**
|
|
1322
|
-
* {@inheritdoc}
|
|
1323
|
-
*/
|
|
1324
|
-
public function getFormId() {
|
|
1325
|
-
return '${moduleName}_config_form';
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
/**
|
|
1329
|
-
* {@inheritdoc}
|
|
1330
|
-
*/
|
|
1331
|
-
public function buildForm(array $form, FormStateInterface $form_state) {
|
|
1332
|
-
$config = $this->config('${moduleName}.settings');
|
|
1333
|
-
|
|
1334
|
-
$form['auto_execute_on_save'] = [
|
|
1335
|
-
'#type' => 'checkbox',
|
|
1336
|
-
'#title' => $this->t('Auto-execute on entity save'),
|
|
1337
|
-
'#description' => $this->t('Automatically execute agent when configured entities are saved.'),
|
|
1338
|
-
'#default_value' => $config->get('auto_execute_on_save') ?? FALSE,
|
|
1339
|
-
];
|
|
1340
|
-
|
|
1341
|
-
$form['enabled_entity_types'] = [
|
|
1342
|
-
'#type' => 'checkboxes',
|
|
1343
|
-
'#title' => $this->t('Enabled entity types'),
|
|
1344
|
-
'#description' => $this->t('Entity types that trigger agent execution.'),
|
|
1345
|
-
'#options' => [
|
|
1346
|
-
'node' => $this->t('Content'),
|
|
1347
|
-
'comment' => $this->t('Comment'),
|
|
1348
|
-
'user' => $this->t('User'),
|
|
1349
|
-
],
|
|
1350
|
-
'#default_value' => $config->get('enabled_entity_types') ?: [],
|
|
1351
|
-
'#states' => [
|
|
1352
|
-
'visible' => [
|
|
1353
|
-
':input[name="auto_execute_on_save"]' => ['checked' => TRUE],
|
|
1354
|
-
],
|
|
1355
|
-
],
|
|
1356
|
-
];
|
|
1357
|
-
|
|
1358
|
-
$form['llm_provider'] = [
|
|
1359
|
-
'#type' => 'select',
|
|
1360
|
-
'#title' => $this->t('LLM Provider'),
|
|
1361
|
-
'#options' => [
|
|
1362
|
-
'anthropic' => $this->t('Anthropic (Claude)'),
|
|
1363
|
-
'openai' => $this->t('OpenAI (GPT)'),
|
|
1364
|
-
'google' => $this->t('Google (Gemini)'),
|
|
1365
|
-
'azure' => $this->t('Azure OpenAI'),
|
|
1366
|
-
],
|
|
1367
|
-
'#default_value' => $config->get('llm_provider') ?? 'anthropic',
|
|
1368
|
-
];
|
|
1369
|
-
|
|
1370
|
-
$form['llm_model'] = [
|
|
1371
|
-
'#type' => 'textfield',
|
|
1372
|
-
'#title' => $this->t('LLM Model'),
|
|
1373
|
-
'#default_value' => $config->get('llm_model') ?? 'claude-sonnet-4-20250514',
|
|
1374
|
-
];
|
|
1375
|
-
|
|
1376
|
-
$form['temperature'] = [
|
|
1377
|
-
'#type' => 'number',
|
|
1378
|
-
'#title' => $this->t('Temperature'),
|
|
1379
|
-
'#description' => $this->t('Controls randomness (0.0 to 1.0).'),
|
|
1380
|
-
'#min' => 0,
|
|
1381
|
-
'#max' => 1,
|
|
1382
|
-
'#step' => 0.1,
|
|
1383
|
-
'#default_value' => $config->get('temperature') ?? 0.7,
|
|
1384
|
-
];
|
|
1385
|
-
|
|
1386
|
-
return parent::buildForm($form, $form_state);
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
/**
|
|
1390
|
-
* {@inheritdoc}
|
|
1391
|
-
*/
|
|
1392
|
-
public function submitForm(array &$form, FormStateInterface $form_state) {
|
|
1393
|
-
$this->config('${moduleName}.settings')
|
|
1394
|
-
->set('auto_execute_on_save', $form_state->getValue('auto_execute_on_save'))
|
|
1395
|
-
->set('enabled_entity_types', array_filter($form_state->getValue('enabled_entity_types')))
|
|
1396
|
-
->set('llm_provider', $form_state->getValue('llm_provider'))
|
|
1397
|
-
->set('llm_model', $form_state->getValue('llm_model'))
|
|
1398
|
-
->set('temperature', $form_state->getValue('temperature'))
|
|
1399
|
-
->save();
|
|
1400
|
-
|
|
1401
|
-
parent::submitForm($form, $form_state);
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
`;
|
|
1405
|
-
}
|
|
1406
|
-
/**
|
|
1407
|
-
* Generate MODULE.links.menu.yml
|
|
1408
|
-
*/
|
|
1409
|
-
generateMenuLinks(moduleName) {
|
|
1410
|
-
return `${moduleName}.admin:
|
|
1411
|
-
title: 'Agent'
|
|
1412
|
-
description: 'Configure agent settings'
|
|
1413
|
-
route_name: ${moduleName}.settings
|
|
1414
|
-
parent: system.admin_config
|
|
1415
|
-
weight: 100
|
|
1416
|
-
|
|
1417
|
-
${moduleName}.execute:
|
|
1418
|
-
title: 'Execute'
|
|
1419
|
-
route_name: ${moduleName}.execute
|
|
1420
|
-
parent: ${moduleName}.admin
|
|
1421
|
-
weight: 0
|
|
1422
|
-
|
|
1423
|
-
${moduleName}.results:
|
|
1424
|
-
title: 'Results'
|
|
1425
|
-
route_name: ${moduleName}.results
|
|
1426
|
-
parent: ${moduleName}.admin
|
|
1427
|
-
weight: 10
|
|
1428
|
-
`;
|
|
1429
|
-
}
|
|
1430
|
-
// ===================================================================
|
|
1431
|
-
// Tool API Plugin Generation (Phase 3 - Issue #433)
|
|
1432
|
-
// ===================================================================
|
|
1433
|
-
/**
|
|
1434
|
-
* Generate a Drupal Tool API plugin class for a single OSSA tool.
|
|
1435
|
-
*
|
|
1436
|
-
* Uses PHP 8 #[Tool] attributes (not annotations) and implements
|
|
1437
|
-
* ContainerFactoryPluginInterface for proper dependency injection.
|
|
1438
|
-
*/
|
|
1439
|
-
generateToolPlugin(_manifest, moduleName, _className, tool, drupalTool) {
|
|
1440
|
-
const toolClassName = toClassName(sanitizeModuleName(tool.name || 'unknown_tool'));
|
|
1441
|
-
const toolName = tool.name || 'unknown_tool';
|
|
1442
|
-
const inputDef = this.buildSchemaDefinitionArray(tool.inputSchema || tool.input_schema);
|
|
1443
|
-
const outputDef = this.buildSchemaDefinitionArray(tool.outputSchema || tool.output_schema);
|
|
1444
|
-
return `<?php
|
|
1445
|
-
|
|
1446
|
-
namespace Drupal\\${moduleName}\\Plugin\\Tool;
|
|
1447
|
-
|
|
1448
|
-
use Drupal\\tool\\Attribute\\Tool;
|
|
1449
|
-
use Drupal\\tool\\ToolPluginBase;
|
|
1450
|
-
use Drupal\\Core\\StringTranslation\\TranslatableMarkup;
|
|
1451
|
-
use Drupal\\Core\\Plugin\\ContainerFactoryPluginInterface;
|
|
1452
|
-
use Drupal\\${moduleName}\\Service\\AgentExecutorService;
|
|
1453
|
-
use Symfony\\Component\\DependencyInjection\\ContainerInterface;
|
|
1454
|
-
|
|
1455
|
-
/**
|
|
1456
|
-
* Tool plugin: ${this.escapePhpString(drupalTool.label)}.
|
|
1457
|
-
*
|
|
1458
|
-
* Generated from OSSA manifest tool: ${toolName}
|
|
1459
|
-
* Type: ${drupalTool.type}
|
|
1460
|
-
*/
|
|
1461
|
-
#[Tool(
|
|
1462
|
-
id: '${drupalTool.id}',
|
|
1463
|
-
label: new TranslatableMarkup('${this.escapePhpString(drupalTool.label)}'),
|
|
1464
|
-
description: new TranslatableMarkup('${this.escapePhpString(drupalTool.description)}'),
|
|
1465
|
-
)]
|
|
1466
|
-
class ${toolClassName}Tool extends ToolPluginBase implements ContainerFactoryPluginInterface {
|
|
1467
|
-
|
|
1468
|
-
/**
|
|
1469
|
-
* Constructs a new ${toolClassName}Tool.
|
|
1470
|
-
*
|
|
1471
|
-
* @param array $configuration
|
|
1472
|
-
* Plugin configuration.
|
|
1473
|
-
* @param string $plugin_id
|
|
1474
|
-
* The plugin ID.
|
|
1475
|
-
* @param mixed $plugin_definition
|
|
1476
|
-
* The plugin definition.
|
|
1477
|
-
* @param \\Drupal\\${moduleName}\\Service\\AgentExecutorService $agentService
|
|
1478
|
-
* The agent executor service.
|
|
1479
|
-
*/
|
|
1480
|
-
public function __construct(
|
|
1481
|
-
array $configuration,
|
|
1482
|
-
string $plugin_id,
|
|
1483
|
-
mixed $plugin_definition,
|
|
1484
|
-
private readonly AgentExecutorService $agentService,
|
|
1485
|
-
) {
|
|
1486
|
-
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
/**
|
|
1490
|
-
* {@inheritdoc}
|
|
1491
|
-
*/
|
|
1492
|
-
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static {
|
|
1493
|
-
return new static(
|
|
1494
|
-
$configuration,
|
|
1495
|
-
$plugin_id,
|
|
1496
|
-
$plugin_definition,
|
|
1497
|
-
$container->get('${moduleName}.agent_executor'),
|
|
1498
|
-
);
|
|
1499
|
-
}
|
|
1500
|
-
|
|
1501
|
-
/**
|
|
1502
|
-
* {@inheritdoc}
|
|
1503
|
-
*/
|
|
1504
|
-
public function getInputDefinition(): array {
|
|
1505
|
-
return ${inputDef};
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
/**
|
|
1509
|
-
* {@inheritdoc}
|
|
1510
|
-
*/
|
|
1511
|
-
public function getOutputDefinition(): array {
|
|
1512
|
-
return ${outputDef};
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
/**
|
|
1516
|
-
* {@inheritdoc}
|
|
1517
|
-
*/
|
|
1518
|
-
public function execute(array $input): array {
|
|
1519
|
-
return $this->agentService->executeTool('${this.escapePhpString(toolName)}', $input);
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
}
|
|
1523
|
-
`;
|
|
1524
|
-
}
|
|
1525
|
-
/**
|
|
1526
|
-
* Generate tool_ai_connector config YAML for a single tool.
|
|
1527
|
-
*
|
|
1528
|
-
* Registers the tool with Drupal's Tool API AI connector system
|
|
1529
|
-
* so it is discoverable by AI-powered modules.
|
|
1530
|
-
*/
|
|
1531
|
-
generateToolAiConnectorConfig(drupalTool) {
|
|
1532
|
-
return `id: '${drupalTool.id}'
|
|
1533
|
-
status: true
|
|
1534
|
-
ai_callable: true
|
|
1535
|
-
`;
|
|
1536
|
-
}
|
|
1537
|
-
/**
|
|
1538
|
-
* Build a PHP array literal from a JSON Schema definition.
|
|
1539
|
-
*
|
|
1540
|
-
* Converts OSSA tool input/output schema (JSON Schema) into a PHP array
|
|
1541
|
-
* that Drupal's Tool API can consume for input/output definitions.
|
|
1542
|
-
*/
|
|
1543
|
-
buildSchemaDefinitionArray(schema) {
|
|
1544
|
-
if (!schema || Object.keys(schema).length === 0) {
|
|
1545
|
-
return '[]';
|
|
1546
|
-
}
|
|
1547
|
-
const properties = schema.properties;
|
|
1548
|
-
if (!properties || Object.keys(properties).length === 0) {
|
|
1549
|
-
return '[]';
|
|
1550
|
-
}
|
|
1551
|
-
const required = schema.required || [];
|
|
1552
|
-
const entries = [];
|
|
1553
|
-
for (const [propName, propDef] of Object.entries(properties)) {
|
|
1554
|
-
const phpType = this.jsonSchemaTypeToPHP(propDef.type || 'string');
|
|
1555
|
-
const description = propDef.description
|
|
1556
|
-
? this.escapePhpString(propDef.description)
|
|
1557
|
-
: `The ${propName} parameter`;
|
|
1558
|
-
const isRequired = required.includes(propName) ? 'TRUE' : 'FALSE';
|
|
1559
|
-
entries.push(` '${propName}' => [
|
|
1560
|
-
'type' => '${phpType}',
|
|
1561
|
-
'label' => '${toLabel(propName)}',
|
|
1562
|
-
'description' => '${this.escapePhpString(description)}',
|
|
1563
|
-
'required' => ${isRequired},
|
|
1564
|
-
]`);
|
|
1565
|
-
}
|
|
1566
|
-
return `[
|
|
1567
|
-
${entries.join(',\n')},
|
|
1568
|
-
]`;
|
|
1569
|
-
}
|
|
1570
|
-
/**
|
|
1571
|
-
* Map a JSON Schema type to a PHP/Drupal typed data type string.
|
|
1572
|
-
*/
|
|
1573
|
-
jsonSchemaTypeToPHP(jsonType) {
|
|
1574
|
-
const typeMap = {
|
|
1575
|
-
string: 'string',
|
|
1576
|
-
number: 'float',
|
|
1577
|
-
integer: 'integer',
|
|
1578
|
-
boolean: 'boolean',
|
|
1579
|
-
array: 'list',
|
|
1580
|
-
object: 'map',
|
|
1581
|
-
};
|
|
1582
|
-
return typeMap[jsonType] || 'string';
|
|
1583
|
-
}
|
|
1584
|
-
/**
|
|
1585
|
-
* Escape a string for safe inclusion inside PHP single-quoted strings.
|
|
1586
|
-
*/
|
|
1587
|
-
escapePhpString(str) {
|
|
1588
|
-
return str.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
|
|
1589
|
-
}
|
|
1590
|
-
// ===================================================================
|
|
1591
|
-
// ECA Model Generation (Phase 4 - Issue #433)
|
|
1592
|
-
// ===================================================================
|
|
1593
|
-
/**
|
|
1594
|
-
* Extract ECA event definitions from the manifest.
|
|
1595
|
-
*
|
|
1596
|
-
* Looks for extensions.drupal.eca_events in the manifest. Each entry
|
|
1597
|
-
* is a string like 'entity:node:presave' or 'content_entity:presave'.
|
|
1598
|
-
*/
|
|
1599
|
-
extractEcaEvents(manifest) {
|
|
1600
|
-
const extensions = manifest.extensions;
|
|
1601
|
-
if (!extensions?.drupal?.eca_events) {
|
|
1602
|
-
return [];
|
|
1603
|
-
}
|
|
1604
|
-
const events = extensions.drupal.eca_events;
|
|
1605
|
-
if (!Array.isArray(events)) {
|
|
1606
|
-
return [];
|
|
1607
|
-
}
|
|
1608
|
-
return events.filter((e) => typeof e === 'string');
|
|
1609
|
-
}
|
|
1610
|
-
/**
|
|
1611
|
-
* Generate ECA model YAML config files for each event in eca_events.
|
|
1612
|
-
*
|
|
1613
|
-
* Creates config/install/eca.model.MODULE_on_EVENT.yml files that define
|
|
1614
|
-
* the Event-Condition-Action models for Drupal's ECA module. Each model
|
|
1615
|
-
* wires an event trigger to an OSSA agent condition check and tool execution.
|
|
1616
|
-
*/
|
|
1617
|
-
generateEcaModels(manifest, moduleName, ecaEvents) {
|
|
1618
|
-
const files = [];
|
|
1619
|
-
const agentName = manifest.metadata?.name || moduleName;
|
|
1620
|
-
const agentLabel = toLabel(agentName);
|
|
1621
|
-
for (const event of ecaEvents) {
|
|
1622
|
-
// Build a slug from the event: 'entity:node:presave' -> 'entity_node_presave'
|
|
1623
|
-
const eventSlug = sanitizeModuleName(event.replace(/:/g, '_'));
|
|
1624
|
-
const modelId = `${moduleName}_on_${eventSlug}`;
|
|
1625
|
-
const modelLabel = `${agentLabel} - On ${toLabel(eventSlug)}`;
|
|
1626
|
-
// Determine plugin_id and configuration from event string
|
|
1627
|
-
const eventParts = event.split(':');
|
|
1628
|
-
const pluginId = this.mapEcaEventToPluginId(eventParts);
|
|
1629
|
-
const eventConfig = this.buildEcaEventConfiguration(eventParts);
|
|
1630
|
-
// Find tools that should be executed for this event
|
|
1631
|
-
const tools = extractTools(manifest);
|
|
1632
|
-
const toolRef = tools.length > 0
|
|
1633
|
-
? `${moduleName}.${sanitizeModuleName(tools[0].name || 'unknown_tool')}`
|
|
1634
|
-
: `${moduleName}.default_tool`;
|
|
1635
|
-
const yamlContent = `id: '${modelId}'
|
|
1636
|
-
label: '${this.escapeYamlString(modelLabel)}'
|
|
1637
|
-
modeller: core
|
|
1638
|
-
version: '1.0.0'
|
|
1639
|
-
events:
|
|
1640
|
-
- plugin_id: '${pluginId}'
|
|
1641
|
-
configuration:
|
|
1642
|
-
${this.indentYamlObject(eventConfig, 6)}
|
|
1643
|
-
conditions:
|
|
1644
|
-
- plugin_id: 'ossa_agent_enabled'
|
|
1645
|
-
configuration:
|
|
1646
|
-
agent_id: '${agentName}'
|
|
1647
|
-
actions:
|
|
1648
|
-
- plugin_id: 'ossa_execute_tool'
|
|
1649
|
-
configuration:
|
|
1650
|
-
tool: '${toolRef}'
|
|
1651
|
-
async: true
|
|
1652
|
-
`;
|
|
1653
|
-
files.push(this.createFile(`${moduleName}/config/install/eca.model.${modelId}.yml`, yamlContent, 'config'));
|
|
1654
|
-
}
|
|
1655
|
-
return files;
|
|
1656
|
-
}
|
|
1657
|
-
/**
|
|
1658
|
-
* Map ECA event parts to a Drupal ECA plugin ID.
|
|
1659
|
-
*
|
|
1660
|
-
* Converts OSSA event notation (e.g., ['entity', 'node', 'presave'])
|
|
1661
|
-
* to ECA plugin IDs (e.g., 'content_entity:presave').
|
|
1662
|
-
*/
|
|
1663
|
-
mapEcaEventToPluginId(eventParts) {
|
|
1664
|
-
if (eventParts.length >= 3 && eventParts[0] === 'entity') {
|
|
1665
|
-
// 'entity:node:presave' -> 'content_entity:presave'
|
|
1666
|
-
return `content_entity:${eventParts[2]}`;
|
|
1667
|
-
}
|
|
1668
|
-
if (eventParts.length >= 2) {
|
|
1669
|
-
// 'content_entity:presave' -> pass through
|
|
1670
|
-
return eventParts.join(':');
|
|
1671
|
-
}
|
|
1672
|
-
// Fallback: use as-is
|
|
1673
|
-
return eventParts.join(':');
|
|
1674
|
-
}
|
|
1675
|
-
/**
|
|
1676
|
-
* Build ECA event configuration from event parts.
|
|
1677
|
-
*
|
|
1678
|
-
* Returns a key-value map that becomes the configuration block
|
|
1679
|
-
* under the event entry in the ECA model YAML.
|
|
1680
|
-
*/
|
|
1681
|
-
buildEcaEventConfiguration(eventParts) {
|
|
1682
|
-
const config = {};
|
|
1683
|
-
if (eventParts.length >= 3 && eventParts[0] === 'entity') {
|
|
1684
|
-
// 'entity:node:presave' -> type: node
|
|
1685
|
-
config.type = eventParts[1];
|
|
1686
|
-
}
|
|
1687
|
-
else if (eventParts.length >= 2 && eventParts[0] === 'content_entity') {
|
|
1688
|
-
// 'content_entity:presave' -> type: node (default)
|
|
1689
|
-
config.type = 'node';
|
|
1690
|
-
}
|
|
1691
|
-
return config;
|
|
1692
|
-
}
|
|
1693
|
-
/**
|
|
1694
|
-
* Escape a string for safe inclusion in YAML single-quoted values.
|
|
1695
|
-
*/
|
|
1696
|
-
escapeYamlString(str) {
|
|
1697
|
-
return str.replace(/'/g, "''");
|
|
1698
|
-
}
|
|
1699
|
-
/**
|
|
1700
|
-
* Indent a key-value object as YAML at a given indentation level.
|
|
1701
|
-
*/
|
|
1702
|
-
indentYamlObject(obj, indent) {
|
|
1703
|
-
const pad = ' '.repeat(indent);
|
|
1704
|
-
return Object.entries(obj)
|
|
1705
|
-
.map(([key, value]) => `${pad}${key}: ${value}`)
|
|
1706
|
-
.join('\n');
|
|
1707
|
-
}
|
|
1708
|
-
// ===================================================================
|
|
1709
|
-
// Action Plugin Generation (Phase 4 - Issue #433)
|
|
1710
|
-
// ===================================================================
|
|
1711
|
-
/**
|
|
1712
|
-
* Generate Action plugin classes for tools with CUD operations.
|
|
1713
|
-
*
|
|
1714
|
-
* Filters tools where the operation field matches create, update, or delete,
|
|
1715
|
-
* and generates a Drupal Action plugin class for each. Tools without an
|
|
1716
|
-
* explicit operation field are skipped.
|
|
1717
|
-
*
|
|
1718
|
-
* Uses PHP 8 #[Action] attributes and implements ContainerFactoryPluginInterface.
|
|
1719
|
-
*/
|
|
1720
|
-
generateActionPlugins(manifest, moduleName, tools) {
|
|
1721
|
-
const files = [];
|
|
1722
|
-
const cudOperations = ['create', 'update', 'delete'];
|
|
1723
|
-
for (const tool of tools) {
|
|
1724
|
-
const operation = tool.operation;
|
|
1725
|
-
if (!operation || !cudOperations.includes(operation.toLowerCase())) {
|
|
1726
|
-
continue;
|
|
1727
|
-
}
|
|
1728
|
-
const toolName = tool.name || 'unknown_tool';
|
|
1729
|
-
const actionId = `${moduleName}_${sanitizeModuleName(toolName)}`;
|
|
1730
|
-
const actionClassName = toClassName(sanitizeModuleName(toolName));
|
|
1731
|
-
const actionLabel = toLabel(toolName);
|
|
1732
|
-
const entityType = this.inferEntityType(tool);
|
|
1733
|
-
const phpContent = this.generateActionPluginClass(moduleName, actionId, actionClassName, actionLabel, entityType, toolName, operation.toLowerCase());
|
|
1734
|
-
files.push(this.createFile(`${moduleName}/src/Plugin/Action/${actionClassName}Action.php`, phpContent, 'code', 'php'));
|
|
1735
|
-
}
|
|
1736
|
-
return files;
|
|
1737
|
-
}
|
|
1738
|
-
/**
|
|
1739
|
-
* Infer the entity type a tool operates on from its metadata.
|
|
1740
|
-
*
|
|
1741
|
-
* Checks tool.config.entity_type, falls back to 'node'.
|
|
1742
|
-
*/
|
|
1743
|
-
inferEntityType(tool) {
|
|
1744
|
-
const config = tool.config;
|
|
1745
|
-
if (config?.entity_type && typeof config.entity_type === 'string') {
|
|
1746
|
-
return config.entity_type;
|
|
1747
|
-
}
|
|
1748
|
-
return 'node';
|
|
1749
|
-
}
|
|
1750
|
-
/**
|
|
1751
|
-
* Generate a single Action plugin PHP class.
|
|
1752
|
-
*
|
|
1753
|
-
* Produces a Drupal Action plugin using PHP 8 #[Action] attribute syntax,
|
|
1754
|
-
* constructor property promotion, and ContainerFactoryPluginInterface.
|
|
1755
|
-
*/
|
|
1756
|
-
generateActionPluginClass(moduleName, actionId, actionClassName, actionLabel, entityType, toolName, operation) {
|
|
1757
|
-
// Map operation to appropriate access check
|
|
1758
|
-
const accessOp = operation === 'delete' ? 'delete' : 'update';
|
|
1759
|
-
return `<?php
|
|
1760
|
-
|
|
1761
|
-
declare(strict_types=1);
|
|
1762
|
-
|
|
1763
|
-
namespace Drupal\\${moduleName}\\Plugin\\Action;
|
|
1764
|
-
|
|
1765
|
-
use Drupal\\Core\\Action\\Attribute\\Action;
|
|
1766
|
-
use Drupal\\Core\\Action\\ActionBase;
|
|
1767
|
-
use Drupal\\Core\\StringTranslation\\TranslatableMarkup;
|
|
1768
|
-
use Drupal\\Core\\Plugin\\ContainerFactoryPluginInterface;
|
|
1769
|
-
use Drupal\\Core\\Session\\AccountInterface;
|
|
1770
|
-
use Drupal\\${moduleName}\\Service\\AgentExecutorService;
|
|
1771
|
-
use Symfony\\Component\\DependencyInjection\\ContainerInterface;
|
|
1772
|
-
|
|
1773
|
-
/**
|
|
1774
|
-
* Action plugin: ${this.escapePhpString(actionLabel)}.
|
|
1775
|
-
*
|
|
1776
|
-
* Generated from OSSA manifest tool: ${toolName}
|
|
1777
|
-
* Operation: ${operation}
|
|
1778
|
-
*/
|
|
1779
|
-
#[Action(
|
|
1780
|
-
id: '${actionId}',
|
|
1781
|
-
label: new TranslatableMarkup('${this.escapePhpString(actionLabel)}'),
|
|
1782
|
-
type: '${entityType}',
|
|
1783
|
-
)]
|
|
1784
|
-
class ${actionClassName}Action extends ActionBase implements ContainerFactoryPluginInterface {
|
|
1785
|
-
|
|
1786
|
-
/**
|
|
1787
|
-
* Constructs a new ${actionClassName}Action.
|
|
1788
|
-
*
|
|
1789
|
-
* @param array $configuration
|
|
1790
|
-
* Plugin configuration.
|
|
1791
|
-
* @param string $plugin_id
|
|
1792
|
-
* The plugin ID.
|
|
1793
|
-
* @param mixed $plugin_definition
|
|
1794
|
-
* The plugin definition.
|
|
1795
|
-
* @param \\Drupal\\${moduleName}\\Service\\AgentExecutorService $agentService
|
|
1796
|
-
* The agent executor service.
|
|
1797
|
-
*/
|
|
1798
|
-
public function __construct(
|
|
1799
|
-
array $configuration,
|
|
1800
|
-
string $plugin_id,
|
|
1801
|
-
mixed $plugin_definition,
|
|
1802
|
-
private readonly AgentExecutorService $agentService,
|
|
1803
|
-
) {
|
|
1804
|
-
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
/**
|
|
1808
|
-
* {@inheritdoc}
|
|
1809
|
-
*/
|
|
1810
|
-
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static {
|
|
1811
|
-
return new static(
|
|
1812
|
-
$configuration,
|
|
1813
|
-
$plugin_id,
|
|
1814
|
-
$plugin_definition,
|
|
1815
|
-
$container->get('${moduleName}.agent_executor'),
|
|
1816
|
-
);
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
/**
|
|
1820
|
-
* {@inheritdoc}
|
|
1821
|
-
*/
|
|
1822
|
-
public function execute($entity = NULL): void {
|
|
1823
|
-
$this->agentService->executeTool('${this.escapePhpString(toolName)}', [
|
|
1824
|
-
'entity_id' => $entity?->id(),
|
|
1825
|
-
'entity_type' => $entity?->getEntityTypeId(),
|
|
1826
|
-
'operation' => '${operation}',
|
|
1827
|
-
]);
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
/**
|
|
1831
|
-
* {@inheritdoc}
|
|
1832
|
-
*/
|
|
1833
|
-
public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
|
|
1834
|
-
return $object->access('${accessOp}', $account, $return_as_object);
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
}
|
|
1838
|
-
`;
|
|
1839
|
-
}
|
|
1840
|
-
// ===================================================================
|
|
1841
|
-
// Condition Plugin Generation (Phase 4 - Issue #433)
|
|
1842
|
-
// ===================================================================
|
|
1843
|
-
/**
|
|
1844
|
-
* Generate Condition plugin classes from OSSA safety guardrails.
|
|
1845
|
-
*
|
|
1846
|
-
* Maps spec.safety.guardrails[] entries to Drupal Condition plugins.
|
|
1847
|
-
* Also always generates an AgentEnabledCondition that checks whether
|
|
1848
|
-
* the OSSA agent is enabled in module configuration.
|
|
1849
|
-
*
|
|
1850
|
-
* Uses PHP 8 #[Condition] attributes and ConditionPluginBase.
|
|
1851
|
-
*/
|
|
1852
|
-
generateConditionPlugins(manifest, moduleName) {
|
|
1853
|
-
const files = [];
|
|
1854
|
-
const agentName = manifest.metadata?.name || moduleName;
|
|
1855
|
-
// Always generate the AgentEnabledCondition
|
|
1856
|
-
files.push(this.createFile(`${moduleName}/src/Plugin/Condition/AgentEnabledCondition.php`, this.generateAgentEnabledConditionClass(moduleName, agentName), 'code', 'php'));
|
|
1857
|
-
// Generate condition plugins for each safety guardrail
|
|
1858
|
-
const guardrails = manifest.spec?.safety?.guardrails || [];
|
|
1859
|
-
for (const guardrail of guardrails) {
|
|
1860
|
-
const guardName = guardrail.name || 'unknown_guard';
|
|
1861
|
-
const conditionId = `${moduleName}_${sanitizeModuleName(guardName)}`;
|
|
1862
|
-
const conditionClassName = toClassName(sanitizeModuleName(guardName));
|
|
1863
|
-
const conditionLabel = toLabel(guardName);
|
|
1864
|
-
files.push(this.createFile(`${moduleName}/src/Plugin/Condition/${conditionClassName}Condition.php`, this.generateGuardrailConditionClass(moduleName, conditionId, conditionClassName, conditionLabel, guardrail), 'code', 'php'));
|
|
1865
|
-
}
|
|
1866
|
-
return files;
|
|
1867
|
-
}
|
|
1868
|
-
/**
|
|
1869
|
-
* Generate the AgentEnabledCondition plugin class.
|
|
1870
|
-
*
|
|
1871
|
-
* This condition checks whether the OSSA agent is enabled in module
|
|
1872
|
-
* configuration. Used by ECA models to gate event-driven execution.
|
|
1873
|
-
*/
|
|
1874
|
-
generateAgentEnabledConditionClass(moduleName, agentName) {
|
|
1875
|
-
return `<?php
|
|
1876
|
-
|
|
1877
|
-
declare(strict_types=1);
|
|
1878
|
-
|
|
1879
|
-
namespace Drupal\\${moduleName}\\Plugin\\Condition;
|
|
1880
|
-
|
|
1881
|
-
use Drupal\\Core\\Condition\\Attribute\\Condition;
|
|
1882
|
-
use Drupal\\Core\\Condition\\ConditionPluginBase;
|
|
1883
|
-
use Drupal\\Core\\Form\\FormStateInterface;
|
|
1884
|
-
use Drupal\\Core\\StringTranslation\\TranslatableMarkup;
|
|
1885
|
-
use Drupal\\Core\\Plugin\\ContainerFactoryPluginInterface;
|
|
1886
|
-
use Drupal\\Core\\Config\\ConfigFactoryInterface;
|
|
1887
|
-
use Symfony\\Component\\DependencyInjection\\ContainerInterface;
|
|
1888
|
-
|
|
1889
|
-
/**
|
|
1890
|
-
* Condition plugin: OSSA Agent Enabled.
|
|
1891
|
-
*
|
|
1892
|
-
* Evaluates whether the OSSA agent is enabled in module configuration.
|
|
1893
|
-
* Used by ECA models to gate event-driven agent execution.
|
|
1894
|
-
*/
|
|
1895
|
-
#[Condition(
|
|
1896
|
-
id: 'ossa_agent_enabled',
|
|
1897
|
-
label: new TranslatableMarkup('OSSA Agent Enabled'),
|
|
1898
|
-
)]
|
|
1899
|
-
class AgentEnabledCondition extends ConditionPluginBase implements ContainerFactoryPluginInterface {
|
|
1900
|
-
|
|
1901
|
-
/**
|
|
1902
|
-
* Constructs a new AgentEnabledCondition.
|
|
1903
|
-
*
|
|
1904
|
-
* @param array $configuration
|
|
1905
|
-
* Plugin configuration.
|
|
1906
|
-
* @param string $plugin_id
|
|
1907
|
-
* The plugin ID.
|
|
1908
|
-
* @param mixed $plugin_definition
|
|
1909
|
-
* The plugin definition.
|
|
1910
|
-
* @param \\Drupal\\Core\\Config\\ConfigFactoryInterface $configFactory
|
|
1911
|
-
* The config factory service.
|
|
1912
|
-
*/
|
|
1913
|
-
public function __construct(
|
|
1914
|
-
array $configuration,
|
|
1915
|
-
string $plugin_id,
|
|
1916
|
-
mixed $plugin_definition,
|
|
1917
|
-
private readonly ConfigFactoryInterface $configFactory,
|
|
1918
|
-
) {
|
|
1919
|
-
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
/**
|
|
1923
|
-
* {@inheritdoc}
|
|
1924
|
-
*/
|
|
1925
|
-
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static {
|
|
1926
|
-
return new static(
|
|
1927
|
-
$configuration,
|
|
1928
|
-
$plugin_id,
|
|
1929
|
-
$plugin_definition,
|
|
1930
|
-
$container->get('config.factory'),
|
|
1931
|
-
);
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
/**
|
|
1935
|
-
* {@inheritdoc}
|
|
1936
|
-
*/
|
|
1937
|
-
public function defaultConfiguration(): array {
|
|
1938
|
-
return [
|
|
1939
|
-
'agent_id' => '${this.escapePhpString(agentName)}',
|
|
1940
|
-
] + parent::defaultConfiguration();
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
/**
|
|
1944
|
-
* {@inheritdoc}
|
|
1945
|
-
*/
|
|
1946
|
-
public function buildConfigurationForm(array $form, FormStateInterface $form_state): array {
|
|
1947
|
-
$form['agent_id'] = [
|
|
1948
|
-
'#type' => 'textfield',
|
|
1949
|
-
'#title' => $this->t('Agent ID'),
|
|
1950
|
-
'#default_value' => $this->configuration['agent_id'],
|
|
1951
|
-
'#description' => $this->t('The OSSA agent identifier to check.'),
|
|
1952
|
-
'#required' => TRUE,
|
|
1953
|
-
];
|
|
1954
|
-
|
|
1955
|
-
return parent::buildConfigurationForm($form, $form_state);
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
/**
|
|
1959
|
-
* {@inheritdoc}
|
|
1960
|
-
*/
|
|
1961
|
-
public function submitConfigurationForm(array &$form, FormStateInterface $form_state): void {
|
|
1962
|
-
$this->configuration['agent_id'] = $form_state->getValue('agent_id');
|
|
1963
|
-
parent::submitConfigurationForm($form, $form_state);
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
/**
|
|
1967
|
-
* {@inheritdoc}
|
|
1968
|
-
*/
|
|
1969
|
-
public function evaluate(): bool {
|
|
1970
|
-
$config = $this->configFactory->get('${moduleName}.settings');
|
|
1971
|
-
|
|
1972
|
-
// Check if auto-execution is enabled (agent is active)
|
|
1973
|
-
$enabled = (bool) $config->get('auto_execute_on_save');
|
|
1974
|
-
|
|
1975
|
-
return $this->isNegated() ? !$enabled : $enabled;
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
/**
|
|
1979
|
-
* {@inheritdoc}
|
|
1980
|
-
*/
|
|
1981
|
-
public function summary(): TranslatableMarkup {
|
|
1982
|
-
if ($this->isNegated()) {
|
|
1983
|
-
return new TranslatableMarkup('OSSA agent @agent is disabled', [
|
|
1984
|
-
'@agent' => $this->configuration['agent_id'],
|
|
1985
|
-
]);
|
|
1986
|
-
}
|
|
1987
|
-
|
|
1988
|
-
return new TranslatableMarkup('OSSA agent @agent is enabled', [
|
|
1989
|
-
'@agent' => $this->configuration['agent_id'],
|
|
1990
|
-
]);
|
|
1991
|
-
}
|
|
1992
|
-
|
|
1993
|
-
}
|
|
1994
|
-
`;
|
|
1995
|
-
}
|
|
1996
|
-
/**
|
|
1997
|
-
* Generate a Condition plugin class for a specific safety guardrail.
|
|
1998
|
-
*
|
|
1999
|
-
* Maps OSSA spec.safety.guardrails[] entries to Drupal Condition plugins.
|
|
2000
|
-
* Supports 'input' guardrails (check blocked patterns) and 'output' guardrails
|
|
2001
|
-
* (check response constraints like maxLength).
|
|
2002
|
-
*/
|
|
2003
|
-
generateGuardrailConditionClass(moduleName, conditionId, conditionClassName, conditionLabel, guardrail) {
|
|
2004
|
-
const guardType = guardrail.type || 'input';
|
|
2005
|
-
const blockedPatterns = guardrail.blocked_patterns || [];
|
|
2006
|
-
const maxLength = guardrail.maxLength;
|
|
2007
|
-
// Build the patterns array as a PHP literal
|
|
2008
|
-
const patternsPhp = blockedPatterns.length > 0
|
|
2009
|
-
? `[${blockedPatterns.map((p) => `'${this.escapePhpString(p)}'`).join(', ')}]`
|
|
2010
|
-
: '[]';
|
|
2011
|
-
// Build evaluation logic based on guardrail type
|
|
2012
|
-
let evaluateBody;
|
|
2013
|
-
if (guardType === 'input' && blockedPatterns.length > 0) {
|
|
2014
|
-
evaluateBody = ` $content = $this->configuration['content'] ?? '';
|
|
2015
|
-
$blocked_patterns = ${patternsPhp};
|
|
2016
|
-
|
|
2017
|
-
foreach ($blocked_patterns as $pattern) {
|
|
2018
|
-
if (str_contains($content, $pattern)) {
|
|
2019
|
-
return $this->isNegated() ? TRUE : FALSE;
|
|
2020
|
-
}
|
|
2021
|
-
}
|
|
2022
|
-
|
|
2023
|
-
return $this->isNegated() ? FALSE : TRUE;`;
|
|
2024
|
-
}
|
|
2025
|
-
else if (guardType === 'output' && maxLength) {
|
|
2026
|
-
evaluateBody = ` $content = $this->configuration['content'] ?? '';
|
|
2027
|
-
$max_length = ${maxLength};
|
|
2028
|
-
$within_limit = mb_strlen($content) <= $max_length;
|
|
2029
|
-
|
|
2030
|
-
return $this->isNegated() ? !$within_limit : $within_limit;`;
|
|
2031
|
-
}
|
|
2032
|
-
else {
|
|
2033
|
-
evaluateBody = ` // Default: condition passes
|
|
2034
|
-
return !$this->isNegated();`;
|
|
2035
|
-
}
|
|
2036
|
-
return `<?php
|
|
2037
|
-
|
|
2038
|
-
declare(strict_types=1);
|
|
2039
|
-
|
|
2040
|
-
namespace Drupal\\${moduleName}\\Plugin\\Condition;
|
|
2041
|
-
|
|
2042
|
-
use Drupal\\Core\\Condition\\Attribute\\Condition;
|
|
2043
|
-
use Drupal\\Core\\Condition\\ConditionPluginBase;
|
|
2044
|
-
use Drupal\\Core\\StringTranslation\\TranslatableMarkup;
|
|
2045
|
-
|
|
2046
|
-
/**
|
|
2047
|
-
* Condition plugin: ${this.escapePhpString(conditionLabel)}.
|
|
2048
|
-
*
|
|
2049
|
-
* Generated from OSSA safety guardrail: ${guardrail.name}
|
|
2050
|
-
* Type: ${guardType}
|
|
2051
|
-
*/
|
|
2052
|
-
#[Condition(
|
|
2053
|
-
id: '${conditionId}',
|
|
2054
|
-
label: new TranslatableMarkup('${this.escapePhpString(conditionLabel)}'),
|
|
2055
|
-
)]
|
|
2056
|
-
class ${conditionClassName}Condition extends ConditionPluginBase {
|
|
2057
|
-
|
|
2058
|
-
/**
|
|
2059
|
-
* {@inheritdoc}
|
|
2060
|
-
*/
|
|
2061
|
-
public function defaultConfiguration(): array {
|
|
2062
|
-
return [
|
|
2063
|
-
'content' => '',
|
|
2064
|
-
] + parent::defaultConfiguration();
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
/**
|
|
2068
|
-
* {@inheritdoc}
|
|
2069
|
-
*/
|
|
2070
|
-
public function evaluate(): bool {
|
|
2071
|
-
${evaluateBody}
|
|
2072
|
-
}
|
|
2073
|
-
|
|
2074
|
-
/**
|
|
2075
|
-
* {@inheritdoc}
|
|
2076
|
-
*/
|
|
2077
|
-
public function summary(): TranslatableMarkup {
|
|
2078
|
-
return new TranslatableMarkup('${this.escapePhpString(conditionLabel)} guardrail (${guardType})');
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
}
|
|
2082
|
-
`;
|
|
2083
|
-
}
|
|
2084
|
-
// ===================================================================
|
|
2085
|
-
// Recipe Generation (Phase 5 - Issue #433)
|
|
2086
|
-
// ===================================================================
|
|
2087
|
-
/**
|
|
2088
|
-
* Generate a Drupal Recipe YAML file for composable installation.
|
|
2089
|
-
*
|
|
2090
|
-
* Recipes are Drupal's modern approach to distributing reusable
|
|
2091
|
-
* configuration sets. This generates a recipe that installs and
|
|
2092
|
-
* configures the OSSA agent module along with its dependencies.
|
|
2093
|
-
*/
|
|
2094
|
-
generateRecipe(manifest, moduleName, tools) {
|
|
2095
|
-
const displayName = toLabel(manifest.metadata?.name || moduleName);
|
|
2096
|
-
const description = manifest.metadata?.description || `OSSA ${displayName} agent`;
|
|
2097
|
-
const llmConfig = manifest.spec?.llm || {};
|
|
2098
|
-
// Build the install list
|
|
2099
|
-
const installModules = ['ai', 'ai_agents', 'tool', 'eca', moduleName];
|
|
2100
|
-
// Build config actions for tool_ai_connector entities
|
|
2101
|
-
const toolConfigLines = [];
|
|
2102
|
-
if (tools.length > 0) {
|
|
2103
|
-
for (const tool of tools) {
|
|
2104
|
-
const drupalTool = mapOssaToolToDrupalTool(tool, moduleName);
|
|
2105
|
-
toolConfigLines.push(` tool_ai_connector.tool.${drupalTool.id}:`, ` simple_config_update:`, ` status: true`, ` ai_callable: true`);
|
|
2106
|
-
}
|
|
2107
|
-
}
|
|
2108
|
-
let recipe = `name: '${displayName}'
|
|
2109
|
-
description: 'Install and configure the OSSA ${sanitizeModuleName(manifest.metadata?.name || moduleName)} agent'
|
|
2110
|
-
type: 'AI Agent'
|
|
2111
|
-
install:
|
|
2112
|
-
${installModules.map((m) => ` - ${m}`).join('\n')}
|
|
2113
|
-
config:
|
|
2114
|
-
import:
|
|
2115
|
-
${moduleName}:
|
|
2116
|
-
- ${moduleName}.settings
|
|
2117
|
-
actions:
|
|
2118
|
-
${moduleName}.settings:
|
|
2119
|
-
simple_config_update:
|
|
2120
|
-
auto_execute_on_save: true
|
|
2121
|
-
llm_provider: ${llmConfig.provider || 'anthropic'}
|
|
2122
|
-
llm_model: ${llmConfig.model || 'claude-sonnet-4-20250514'}
|
|
2123
|
-
temperature: ${llmConfig.temperature || 0.7}
|
|
2124
|
-
`;
|
|
2125
|
-
if (toolConfigLines.length > 0) {
|
|
2126
|
-
recipe += toolConfigLines.join('\n') + '\n';
|
|
2127
|
-
}
|
|
2128
|
-
return recipe;
|
|
2129
|
-
}
|
|
2130
|
-
/**
|
|
2131
|
-
* Generate config/schema/MODULE.schema.yml
|
|
2132
|
-
*/
|
|
2133
|
-
generateConfigSchema(moduleName) {
|
|
2134
|
-
return `${moduleName}.settings:
|
|
2135
|
-
type: config_object
|
|
2136
|
-
label: 'Agent Settings'
|
|
2137
|
-
mapping:
|
|
2138
|
-
auto_execute_on_save:
|
|
2139
|
-
type: boolean
|
|
2140
|
-
label: 'Auto-execute on entity save'
|
|
2141
|
-
enabled_entity_types:
|
|
2142
|
-
type: sequence
|
|
2143
|
-
label: 'Enabled entity types'
|
|
2144
|
-
sequence:
|
|
2145
|
-
type: string
|
|
2146
|
-
llm_provider:
|
|
2147
|
-
type: string
|
|
2148
|
-
label: 'LLM Provider'
|
|
2149
|
-
llm_model:
|
|
2150
|
-
type: string
|
|
2151
|
-
label: 'LLM Model'
|
|
2152
|
-
temperature:
|
|
2153
|
-
type: float
|
|
2154
|
-
label: 'Temperature'
|
|
2155
|
-
`;
|
|
2156
|
-
}
|
|
2157
|
-
/**
|
|
2158
|
-
* Generate config/install/MODULE.settings.yml
|
|
2159
|
-
*/
|
|
2160
|
-
generateDefaultConfig(manifest) {
|
|
2161
|
-
const llmConfig = manifest.spec?.llm || {};
|
|
2162
|
-
return `auto_execute_on_save: false
|
|
2163
|
-
enabled_entity_types: []
|
|
2164
|
-
llm_provider: '${llmConfig.provider || 'anthropic'}'
|
|
2165
|
-
llm_model: '${llmConfig.model || 'claude-sonnet-4-20250514'}'
|
|
2166
|
-
temperature: ${llmConfig.temperature || 0.7}
|
|
2167
|
-
`;
|
|
2168
|
-
}
|
|
2169
|
-
/**
|
|
2170
|
-
* Generate templates/agent-result.html.twig
|
|
2171
|
-
*/
|
|
2172
|
-
generateAgentResultTemplate(moduleName) {
|
|
2173
|
-
return `{#
|
|
2174
|
-
/**
|
|
2175
|
-
* @file
|
|
2176
|
-
* Theme template for agent execution result.
|
|
2177
|
-
*
|
|
2178
|
-
* Available variables:
|
|
2179
|
-
* - result: The execution result object
|
|
2180
|
-
* - metadata: Execution metadata
|
|
2181
|
-
*/
|
|
2182
|
-
#}
|
|
2183
|
-
<div class="${moduleName}-result">
|
|
2184
|
-
<div class="result-output">
|
|
2185
|
-
<h3>{{ 'Output'|t }}</h3>
|
|
2186
|
-
<div class="output-content">
|
|
2187
|
-
{{ result.output }}
|
|
2188
|
-
</div>
|
|
2189
|
-
</div>
|
|
2190
|
-
|
|
2191
|
-
{% if metadata %}
|
|
2192
|
-
<div class="result-metadata">
|
|
2193
|
-
<h4>{{ 'Metadata'|t }}</h4>
|
|
2194
|
-
<dl>
|
|
2195
|
-
{% if metadata.duration_ms %}
|
|
2196
|
-
<dt>{{ 'Duration'|t }}</dt>
|
|
2197
|
-
<dd>{{ metadata.duration_ms }} ms</dd>
|
|
2198
|
-
{% endif %}
|
|
2199
|
-
|
|
2200
|
-
{% if metadata.model %}
|
|
2201
|
-
<dt>{{ 'Model'|t }}</dt>
|
|
2202
|
-
<dd>{{ metadata.model }}</dd>
|
|
2203
|
-
{% endif %}
|
|
2204
|
-
|
|
2205
|
-
{% if metadata.provider %}
|
|
2206
|
-
<dt>{{ 'Provider'|t }}</dt>
|
|
2207
|
-
<dd>{{ metadata.provider }}</dd>
|
|
2208
|
-
{% endif %}
|
|
2209
|
-
|
|
2210
|
-
{% if metadata.usage %}
|
|
2211
|
-
<dt>{{ 'Token Usage'|t }}</dt>
|
|
2212
|
-
<dd>{{ metadata.usage.total_tokens|default('N/A') }}</dd>
|
|
2213
|
-
{% endif %}
|
|
2214
|
-
</dl>
|
|
2215
|
-
</div>
|
|
2216
|
-
{% endif %}
|
|
2217
|
-
</div>
|
|
2218
|
-
`;
|
|
2219
|
-
}
|
|
2220
|
-
/**
|
|
2221
|
-
* Generate templates/agent-execute-form.html.twig
|
|
2222
|
-
*/
|
|
2223
|
-
generateExecuteFormTemplate(moduleName) {
|
|
2224
|
-
return `{#
|
|
2225
|
-
/**
|
|
2226
|
-
* @file
|
|
2227
|
-
* Theme template for agent execute form.
|
|
2228
|
-
*
|
|
2229
|
-
* Available variables:
|
|
2230
|
-
* - form: The form render array
|
|
2231
|
-
*/
|
|
2232
|
-
#}
|
|
2233
|
-
<div class="${moduleName}-execute-form">
|
|
2234
|
-
<div class="form-header">
|
|
2235
|
-
<h2>{{ 'Execute Agent'|t }}</h2>
|
|
2236
|
-
<p>{{ 'Enter your input and execute the agent.'|t }}</p>
|
|
2237
|
-
</div>
|
|
2238
|
-
|
|
2239
|
-
<div class="form-content">
|
|
2240
|
-
{{ form }}
|
|
2241
|
-
</div>
|
|
2242
|
-
</div>
|
|
2243
|
-
`;
|
|
2244
|
-
}
|
|
2245
|
-
/**
|
|
2246
|
-
* Generate README.md
|
|
2247
|
-
*/
|
|
2248
|
-
generateReadme(manifest, moduleName, options) {
|
|
2249
|
-
const capabilities = extractCapabilities(manifest);
|
|
2250
|
-
const tools = extractTools(manifest);
|
|
2251
|
-
return `# ${manifest.metadata?.name || moduleName}
|
|
2252
|
-
|
|
2253
|
-
${manifest.metadata?.description || 'OSSA agent module for Drupal'}
|
|
2254
|
-
|
|
2255
|
-
## Description
|
|
2256
|
-
|
|
2257
|
-
${manifest.spec?.role || 'AI Agent powered by OSSA'}
|
|
2258
|
-
|
|
2259
|
-
This module provides a complete integration of an OSSA agent with Drupal, including:
|
|
2260
|
-
|
|
2261
|
-
${options.includeQueueWorker ? '- ✅ Queue Worker for asynchronous execution' : ''}
|
|
2262
|
-
${options.includeEntity ? '- ✅ Entity storage for agent results' : ''}
|
|
2263
|
-
${options.includeController ? '- ✅ Admin UI and API endpoints' : ''}
|
|
2264
|
-
${options.includeConfigForm ? '- ✅ Configuration form' : ''}
|
|
2265
|
-
${options.includeHooks ? '- ✅ Drupal hooks (entity_presave, cron)' : ''}
|
|
2266
|
-
${options.includeViews ? '- ✅ Views integration' : ''}
|
|
2267
|
-
|
|
2268
|
-
## Requirements
|
|
2269
|
-
|
|
2270
|
-
- **Drupal**: ${options.coreVersion}
|
|
2271
|
-
- **PHP**: >=8.2
|
|
2272
|
-
- **Composer packages**:
|
|
2273
|
-
- \`drupal/ai\`: ^1.0
|
|
2274
|
-
- \`drupal/ai_agents\`: ^1.3
|
|
2275
|
-
- \`drupal/tool\`: ^1.0@alpha
|
|
2276
|
-
|
|
2277
|
-
## Installation
|
|
2278
|
-
|
|
2279
|
-
### 1. Install via Composer
|
|
2280
|
-
|
|
2281
|
-
\`\`\`bash
|
|
2282
|
-
cd /path/to/drupal
|
|
2283
|
-
composer require drupal/ai drupal/ai_agents drupal/tool
|
|
2284
|
-
\`\`\`
|
|
2285
|
-
|
|
2286
|
-
### 2. Copy module to Drupal
|
|
2287
|
-
|
|
2288
|
-
\`\`\`bash
|
|
2289
|
-
cp -r ${moduleName} web/modules/custom/
|
|
2290
|
-
\`\`\`
|
|
2291
|
-
|
|
2292
|
-
### 3. Enable module
|
|
2293
|
-
|
|
2294
|
-
\`\`\`bash
|
|
2295
|
-
drush en ${moduleName}
|
|
2296
|
-
\`\`\`
|
|
2297
|
-
|
|
2298
|
-
### 4. Configure API keys
|
|
2299
|
-
|
|
2300
|
-
Set your LLM provider API keys in \`settings.php\`:
|
|
2301
|
-
|
|
2302
|
-
\`\`\`php
|
|
2303
|
-
// Anthropic (Claude)
|
|
2304
|
-
$config['ossa']['providers']['anthropic']['api_key'] = getenv('ANTHROPIC_API_KEY');
|
|
2305
|
-
|
|
2306
|
-
// OpenAI
|
|
2307
|
-
$config['ossa']['providers']['openai']['api_key'] = getenv('OPENAI_API_KEY');
|
|
2308
|
-
\`\`\`
|
|
2309
|
-
|
|
2310
|
-
Or use environment variables:
|
|
2311
|
-
|
|
2312
|
-
\`\`\`bash
|
|
2313
|
-
export ANTHROPIC_API_KEY="sk-ant-..."
|
|
2314
|
-
export OPENAI_API_KEY="sk-..."
|
|
2315
|
-
\`\`\`
|
|
2316
|
-
|
|
2317
|
-
## Configuration
|
|
2318
|
-
|
|
2319
|
-
Visit \`/admin/config/${moduleName}\` to configure:
|
|
2320
|
-
|
|
2321
|
-
- LLM provider (Anthropic, OpenAI, Google, Azure)
|
|
2322
|
-
- Model selection
|
|
2323
|
-
- Temperature settings
|
|
2324
|
-
- Auto-execution triggers
|
|
2325
|
-
- Enabled entity types
|
|
2326
|
-
|
|
2327
|
-
## Usage
|
|
2328
|
-
|
|
2329
|
-
### Execute via Admin UI
|
|
2330
|
-
|
|
2331
|
-
1. Navigate to \`/admin/${moduleName}/execute\`
|
|
2332
|
-
2. Enter your input
|
|
2333
|
-
3. Click "Execute"
|
|
2334
|
-
4. View results
|
|
2335
|
-
|
|
2336
|
-
### Execute via Drush
|
|
2337
|
-
|
|
2338
|
-
\`\`\`bash
|
|
2339
|
-
drush ossa:agent:execute ${manifest.metadata?.name || 'agent'} "Your input here"
|
|
2340
|
-
\`\`\`
|
|
2341
|
-
|
|
2342
|
-
### Execute via API
|
|
2343
|
-
|
|
2344
|
-
\`\`\`bash
|
|
2345
|
-
# Synchronous execution
|
|
2346
|
-
curl -X POST https://example.com/api/${moduleName}/execute \\
|
|
2347
|
-
-H "Content-Type: application/json" \\
|
|
2348
|
-
-d '{"input": "Your input here"}'
|
|
2349
|
-
|
|
2350
|
-
# Asynchronous execution (queued)
|
|
2351
|
-
curl -X POST https://example.com/api/${moduleName}/execute-async \\
|
|
2352
|
-
-H "Content-Type: application/json" \\
|
|
2353
|
-
-d '{"input": "Your input here"}'
|
|
2354
|
-
\`\`\`
|
|
2355
|
-
|
|
2356
|
-
### Execute via PHP
|
|
2357
|
-
|
|
2358
|
-
\`\`\`php
|
|
2359
|
-
// Get service
|
|
2360
|
-
$agent = \\Drupal::service('${moduleName}.agent_executor');
|
|
2361
|
-
|
|
2362
|
-
// Execute synchronously
|
|
2363
|
-
$result = $agent->execute('Your input here');
|
|
2364
|
-
|
|
2365
|
-
if ($result['success']) {
|
|
2366
|
-
echo $result['output'];
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
// Execute asynchronously (queued)
|
|
2370
|
-
$queue_id = $agent->executeAsync('Your input here');
|
|
2371
|
-
\`\`\`
|
|
2372
|
-
|
|
2373
|
-
## Capabilities
|
|
2374
|
-
|
|
2375
|
-
${capabilities.map((c) => `- ${c}`).join('\n')}
|
|
2376
|
-
|
|
2377
|
-
## Tools
|
|
2378
|
-
|
|
2379
|
-
${tools.map((t) => `- **${t.name || 'unknown'}**: ${t.description || 'No description'}`).join('\n')}
|
|
2380
|
-
|
|
2381
|
-
${options.includeQueueWorker
|
|
2382
|
-
? `
|
|
2383
|
-
## Queue Processing
|
|
2384
|
-
|
|
2385
|
-
The module includes a queue worker for asynchronous agent execution:
|
|
2386
|
-
|
|
2387
|
-
\`\`\`bash
|
|
2388
|
-
# Process queue via cron
|
|
2389
|
-
drush cron
|
|
2390
|
-
|
|
2391
|
-
# Process queue manually
|
|
2392
|
-
drush queue:run ${moduleName}_agent_queue
|
|
2393
|
-
\`\`\`
|
|
2394
|
-
`
|
|
2395
|
-
: ''}
|
|
2396
|
-
|
|
2397
|
-
${options.includeEntity
|
|
2398
|
-
? `
|
|
2399
|
-
## Results Storage
|
|
2400
|
-
|
|
2401
|
-
All agent execution results are stored in the database and can be viewed at:
|
|
2402
|
-
\`/admin/${moduleName}/results\`
|
|
2403
|
-
|
|
2404
|
-
Results can also be queried via Views or entity queries:
|
|
2405
|
-
|
|
2406
|
-
\`\`\`php
|
|
2407
|
-
$storage = \\Drupal::entityTypeManager()->getStorage('${moduleName}_result');
|
|
2408
|
-
$results = $storage->loadMultiple();
|
|
2409
|
-
\`\`\`
|
|
2410
|
-
`
|
|
2411
|
-
: ''}
|
|
2412
|
-
|
|
2413
|
-
## Hooks
|
|
2414
|
-
|
|
2415
|
-
This module implements the following Drupal hooks:
|
|
2416
|
-
|
|
2417
|
-
${options.includeHooks
|
|
2418
|
-
? `
|
|
2419
|
-
- \`hook_help()\`: Provides help text
|
|
2420
|
-
- \`hook_cron()\`: Processes queue items
|
|
2421
|
-
- \`hook_entity_presave()\`: Triggers agent on entity save (if enabled)
|
|
2422
|
-
- \`hook_theme()\`: Registers theme templates
|
|
2423
|
-
`
|
|
2424
|
-
: ''}
|
|
2425
|
-
|
|
2426
|
-
## Architecture
|
|
2427
|
-
|
|
2428
|
-
This module follows OSSA (Open Standard Agents) specification and uses:
|
|
2429
|
-
|
|
2430
|
-
- **drupal/ai**: LLM provider abstraction (Anthropic, OpenAI, Google, Azure)
|
|
2431
|
-
- **drupal/ai_agents**: AI agent plugin system for Drupal
|
|
2432
|
-
- **drupal/tool**: Tool API plugin system
|
|
2433
|
-
- **PHP 8 Attributes**: Modern \`#[Hook]\`, \`#[QueueWorker]\`, \`#[ContentEntityType]\`
|
|
2434
|
-
- **OO Hook Classes**: All hooks implemented as classes in \`src/Hook/\`
|
|
2435
|
-
- **Queue System**: Drupal queue for async execution
|
|
2436
|
-
- **Entity API**: Drupal entities for result storage
|
|
2437
|
-
- **Configuration API**: Drupal configuration system
|
|
2438
|
-
|
|
2439
|
-
## Generated from OSSA
|
|
2440
|
-
|
|
2441
|
-
This module was generated from an OSSA v${manifest.apiVersion?.split('/')[1] || '{{VERSION}}'} manifest.
|
|
2442
|
-
|
|
2443
|
-
Original manifest: \`config/ossa/agent.ossa.yaml\`
|
|
2444
|
-
|
|
2445
|
-
## Support
|
|
2446
|
-
|
|
2447
|
-
- **OSSA Specification**: https://openstandardagents.org/
|
|
2448
|
-
- **Symfony Bundle**: https://github.com/blueflyio/openstandardagents
|
|
2449
|
-
- **Issue Tracker**: https://gitlab.com/blueflyio/ossa/openstandardagents/-/issues
|
|
2450
|
-
|
|
2451
|
-
## License
|
|
2452
|
-
|
|
2453
|
-
${manifest.metadata?.license || 'GPL-2.0-or-later'}
|
|
2454
|
-
`;
|
|
2455
|
-
}
|
|
2456
|
-
/**
|
|
2457
|
-
* Generate INSTALL.md
|
|
2458
|
-
*/
|
|
2459
|
-
generateInstallGuide(manifest, moduleName) {
|
|
2460
|
-
return `# Installation Guide: ${manifest.metadata?.name || moduleName}
|
|
2461
|
-
|
|
2462
|
-
## Prerequisites
|
|
2463
|
-
|
|
2464
|
-
- Drupal 10.x or 11.x
|
|
2465
|
-
- PHP 8.2 or higher
|
|
2466
|
-
- Composer
|
|
2467
|
-
- LLM provider API key (Anthropic, OpenAI, Google, or Azure)
|
|
2468
|
-
|
|
2469
|
-
## Step 1: Install Dependencies
|
|
2470
|
-
|
|
2471
|
-
\`\`\`bash
|
|
2472
|
-
cd /path/to/drupal
|
|
2473
|
-
composer require drupal/ai drupal/ai_agents drupal/tool
|
|
2474
|
-
\`\`\`
|
|
2475
|
-
|
|
2476
|
-
## Step 2: Install Module
|
|
2477
|
-
|
|
2478
|
-
### Option A: Via Composer (if published)
|
|
2479
|
-
|
|
2480
|
-
\`\`\`bash
|
|
2481
|
-
composer require drupal/${moduleName}
|
|
2482
|
-
drush en ${moduleName}
|
|
2483
|
-
\`\`\`
|
|
2484
|
-
|
|
2485
|
-
### Option B: Manual Installation
|
|
2486
|
-
|
|
2487
|
-
\`\`\`bash
|
|
2488
|
-
# Copy module directory
|
|
2489
|
-
cp -r ${moduleName} /path/to/drupal/web/modules/custom/
|
|
2490
|
-
|
|
2491
|
-
# Enable module
|
|
2492
|
-
drush en ${moduleName}
|
|
2493
|
-
|
|
2494
|
-
# Or via UI: Admin → Extend → Enable "${manifest.metadata?.name || moduleName}"
|
|
2495
|
-
\`\`\`
|
|
2496
|
-
|
|
2497
|
-
## Step 3: Configure API Keys
|
|
2498
|
-
|
|
2499
|
-
### Method 1: Environment Variables (Recommended)
|
|
2500
|
-
|
|
2501
|
-
Add to \`.env\` or export:
|
|
2502
|
-
|
|
2503
|
-
\`\`\`bash
|
|
2504
|
-
export ANTHROPIC_API_KEY="sk-ant-..."
|
|
2505
|
-
export OPENAI_API_KEY="sk-..."
|
|
2506
|
-
export GOOGLE_API_KEY="..."
|
|
2507
|
-
export AZURE_OPENAI_API_KEY="..."
|
|
2508
|
-
export AZURE_OPENAI_ENDPOINT="https://..."
|
|
2509
|
-
\`\`\`
|
|
2510
|
-
|
|
2511
|
-
### Method 2: settings.php
|
|
2512
|
-
|
|
2513
|
-
Add to \`sites/default/settings.php\`:
|
|
2514
|
-
|
|
2515
|
-
\`\`\`php
|
|
2516
|
-
// OSSA Provider Configuration
|
|
2517
|
-
$config['ossa']['providers']['anthropic']['api_key'] = getenv('ANTHROPIC_API_KEY');
|
|
2518
|
-
$config['ossa']['providers']['openai']['api_key'] = getenv('OPENAI_API_KEY');
|
|
2519
|
-
$config['ossa']['providers']['google']['api_key'] = getenv('GOOGLE_API_KEY');
|
|
2520
|
-
$config['ossa']['providers']['azure']['api_key'] = getenv('AZURE_OPENAI_API_KEY');
|
|
2521
|
-
$config['ossa']['providers']['azure']['base_url'] = getenv('AZURE_OPENAI_ENDPOINT');
|
|
2522
|
-
\`\`\`
|
|
2523
|
-
|
|
2524
|
-
## Step 4: Configure Module
|
|
2525
|
-
|
|
2526
|
-
1. Navigate to \`/admin/config/${moduleName}\`
|
|
2527
|
-
2. Select your preferred LLM provider
|
|
2528
|
-
3. Choose model (e.g., \`claude-sonnet-4-20250514\`)
|
|
2529
|
-
4. Adjust temperature (0.0-1.0)
|
|
2530
|
-
5. Configure auto-execution triggers (optional)
|
|
2531
|
-
6. Save configuration
|
|
2532
|
-
|
|
2533
|
-
## Step 5: Verify Installation
|
|
2534
|
-
|
|
2535
|
-
### Test via Drush
|
|
2536
|
-
|
|
2537
|
-
\`\`\`bash
|
|
2538
|
-
# List available agents
|
|
2539
|
-
drush ossa:agent:list
|
|
2540
|
-
|
|
2541
|
-
# Execute agent
|
|
2542
|
-
drush ossa:agent:execute ${manifest.metadata?.name || 'agent'} "Test input"
|
|
2543
|
-
\`\`\`
|
|
2544
|
-
|
|
2545
|
-
### Test via UI
|
|
2546
|
-
|
|
2547
|
-
1. Visit \`/admin/${moduleName}/execute\`
|
|
2548
|
-
2. Enter test input
|
|
2549
|
-
3. Click "Execute"
|
|
2550
|
-
4. Verify output appears
|
|
2551
|
-
|
|
2552
|
-
### Test via API
|
|
2553
|
-
|
|
2554
|
-
\`\`\`bash
|
|
2555
|
-
curl -X POST http://localhost/api/${moduleName}/execute \\
|
|
2556
|
-
-H "Content-Type: application/json" \\
|
|
2557
|
-
-d '{"input": "Hello, agent!"}'
|
|
2558
|
-
\`\`\`
|
|
2559
|
-
|
|
2560
|
-
## Step 6: Set Up Cron (Optional)
|
|
2561
|
-
|
|
2562
|
-
For asynchronous execution via queue:
|
|
2563
|
-
|
|
2564
|
-
\`\`\`bash
|
|
2565
|
-
# Configure Drupal cron
|
|
2566
|
-
drush cron
|
|
2567
|
-
|
|
2568
|
-
# Or set up system cron
|
|
2569
|
-
crontab -e
|
|
2570
|
-
# Add: */5 * * * * drush -r /path/to/drupal cron
|
|
2571
|
-
\`\`\`
|
|
2572
|
-
|
|
2573
|
-
## Troubleshooting
|
|
2574
|
-
|
|
2575
|
-
### Issue: "Missing API key"
|
|
2576
|
-
|
|
2577
|
-
**Solution**: Verify environment variables or settings.php configuration
|
|
2578
|
-
|
|
2579
|
-
\`\`\`bash
|
|
2580
|
-
# Check environment
|
|
2581
|
-
echo $ANTHROPIC_API_KEY
|
|
2582
|
-
|
|
2583
|
-
# Or verify in PHP
|
|
2584
|
-
drush php-eval "print_r(\\Drupal::config('ossa.settings')->get('providers'));"
|
|
2585
|
-
\`\`\`
|
|
2586
|
-
|
|
2587
|
-
### Issue: "Agent not found"
|
|
2588
|
-
|
|
2589
|
-
**Solution**: Clear cache
|
|
2590
|
-
|
|
2591
|
-
\`\`\`bash
|
|
2592
|
-
drush cr
|
|
2593
|
-
\`\`\`
|
|
2594
|
-
|
|
2595
|
-
### Issue: "Queue not processing"
|
|
2596
|
-
|
|
2597
|
-
**Solution**: Run cron manually
|
|
2598
|
-
|
|
2599
|
-
\`\`\`bash
|
|
2600
|
-
drush cron
|
|
2601
|
-
# Or process queue directly
|
|
2602
|
-
drush queue:run ${moduleName}_agent_queue
|
|
2603
|
-
\`\`\`
|
|
2604
|
-
|
|
2605
|
-
### Issue: "Permission denied"
|
|
2606
|
-
|
|
2607
|
-
**Solution**: Grant permissions
|
|
2608
|
-
|
|
2609
|
-
1. Visit \`/admin/people/permissions\`
|
|
2610
|
-
2. Grant "Administer ${moduleName}" permission
|
|
2611
|
-
3. Save permissions
|
|
2612
|
-
|
|
2613
|
-
## Next Steps
|
|
2614
|
-
|
|
2615
|
-
- Configure auto-execution triggers
|
|
2616
|
-
- Set up Views for result browsing
|
|
2617
|
-
- Integrate with custom modules
|
|
2618
|
-
- Monitor execution logs
|
|
2619
|
-
|
|
2620
|
-
## Support
|
|
2621
|
-
|
|
2622
|
-
- Documentation: https://openstandardagents.org/
|
|
2623
|
-
- Issues: https://gitlab.com/blueflyio/ossa/openstandardagents/-/issues
|
|
2624
|
-
- Drupal.org: https://www.drupal.org/project/${moduleName}
|
|
2625
|
-
`;
|
|
2626
|
-
}
|
|
2627
|
-
}
|
|
2628
|
-
//# sourceMappingURL=generator.js.map
|