@bluefly/openstandardagents 0.4.9 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.version.json +3 -3
- package/CHANGELOG.md +8 -8
- package/README.md +68 -58
- package/bin/postinstall +0 -0
- package/dist/.version.json +3 -3
- package/dist/adapters/claude-code/adapter.js +2 -2
- package/dist/adapters/docker/generators.js +19 -19
- package/dist/adapters/drupal/generator.js +76 -76
- package/dist/adapters/openai-agents/adapter.js +2 -2
- package/dist/cli/schema-driven/schema-loader.js +5 -5
- package/dist/mcp-server/__tests__/mcp-server.spec.js +20 -11
- package/dist/mcp-server/index.js +0 -0
- package/dist/package.json +24 -11
- package/dist/services/export/langchain/langchain-exporter.js +2 -2
- package/dist/services/export/langchain/memory-generator.js +2 -2
- package/dist/services/export/testing/test-generator.js +1 -1
- package/dist/services/taxonomy-service.d.ts +3 -3
- package/dist/skills/test-skill/package.json +1 -1
- package/dist/spec/extensions/role-manifest.md +188 -0
- package/dist/spec/v0.4/extensions/mcp/README.md +1 -1
- package/dist/spec/v0.5/agent.schema.json +2 -1
- package/dist/spec/v0.5/extensions/mcp/README.md +1 -1
- package/dist/spec/v0.5/role.schema.json +268 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/role.d.ts +126 -0
- package/dist/types/role.js +38 -0
- package/dist/validation/validator.js +1 -1
- package/examples/agents/01-customer-support-bot/agent.ossa.yaml +24 -31
- package/examples/agents/05-sales-assistant/agent.ossa.yaml +35 -23
- package/examples/agents/07-research-assistant/agent.ossa.yaml +27 -21
- package/examples/agents/10-meeting-assistant/agent.ossa.yaml +27 -35
- package/examples/agents/security-audit-agent.ossa.yaml +234 -0
- package/examples/agentscope/react-assistant/agent.ossa.yaml +36 -32
- package/examples/drupal/content-moderator.ossa.yaml +2 -2
- package/examples/drupal/drupal-contributor.ossa.yaml +247 -0
- package/examples/export/langchain/production-agent-with-memory/README.md +1 -1
- package/examples/export/langchain/production-agent-with-memory/agent.ossa.yaml +13 -23
- package/examples/export/langchain/production-agent-with-streaming/agent.ossa.yaml +1 -15
- package/examples/export/langchain/production-agent-with-tools/agent.ossa.yaml +28 -29
- package/examples/getting-started/01-minimal-agent.ossa.yaml +1 -1
- package/examples/getting-started/02-agent-with-tools.ossa.yaml +1 -1
- package/examples/getting-started/03-agent-with-safety.ossa.yaml +1 -1
- package/examples/getting-started/04-agent-with-messaging.ossa.yaml +1 -1
- package/examples/getting-started/05-workflow-composition.ossa.yaml +1 -1
- package/examples/getting-started/README.md +3 -3
- package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
- package/examples/gitlab-agents/gitlab-ci-agent.ossa.yaml +221 -0
- package/examples/hierarchical-agent.ossa.yaml +10 -53
- package/examples/kagent/ossa-kagent-anthropic.ossa.yaml +2 -25
- package/examples/kagent/ossa-kagent-mcp-tools.ossa.yaml +2 -30
- package/examples/kagent/ossa-kagent-multi-tool.ossa.yaml +2 -18
- package/examples/kagent/ossa-kagent-poc.ossa.yaml +2 -16
- package/examples/pipeline-agent.ossa.yaml +3 -3
- package/examples/platform-specific/claude-code-subagent.yaml +1 -1
- package/examples/platform-specific/cursor-coding-agent.yaml +1 -1
- package/examples/platform-specific/warp-terminal-agent.yaml +1 -1
- package/examples/production-ready/01-customer-support-bot/agent.ossa.yaml +24 -31
- package/examples/production-ready/05-sales-assistant/agent.ossa.yaml +35 -23
- package/examples/production-ready/07-research-assistant/agent.ossa.yaml +27 -19
- package/examples/production-ready/10-meeting-assistant/agent.ossa.yaml +27 -35
- package/examples/reference-implementations/python-client/examples/basic_usage.py +0 -0
- package/examples/reference-implementations/python-client/examples/publish_agent.py +0 -0
- package/examples/roles/drupal-developer.role.yaml +37 -0
- package/examples/roles/platform-operator.role.yaml +28 -0
- package/examples/roles/security-auditor.role.yaml +27 -0
- package/examples/swarm-agent.ossa.yaml +13 -51
- package/examples/team-agent.ossa.yaml +12 -61
- package/examples/team-lead-teammate.ossa.yaml +12 -17
- package/openapi/agent-communication.yaml +260 -212
- package/openapi/agent-crud.yaml +217 -187
- package/openapi/agent-discovery.yaml +119 -81
- package/openapi/agent-identity.yaml +219 -187
- package/openapi/agent-taxonomy.yaml +95 -38
- package/openapi/agents-md-service.yaml +103 -30
- package/openapi/cli/openapi.yaml +147 -40
- package/openapi/core/ossa-core-api.openapi.yaml +327 -271
- package/openapi/core/ossa-registry-api.openapi.yaml +298 -235
- package/openapi/core/ossa-registry.openapi.yaml +299 -159
- package/openapi/core/unified-agent-gateway.openapi.yaml +234 -170
- package/openapi/daemon-api.openapi.yaml +323 -181
- package/openapi/dev-cli/openapi.yaml +137 -113
- package/openapi/github-sync.yaml +62 -19
- package/openapi/marketplace-plugin.openapi.yaml +539 -466
- package/openapi/ossa-api.openapi.yaml +354 -213
- package/openapi/ossa-cli-enhancements.openapi.yaml +108 -89
- package/openapi/ossa-cli.yaml +260 -184
- package/openapi/protocols/sse-streams.yaml +66 -74
- package/openapi/protocols/websocket-events.yaml +61 -54
- package/openapi/reference-implementations/aiflow-bridge-api.openapi.yaml +37 -20
- package/openapi/reference-implementations/compliance-agent-api.openapi.yaml +35 -23
- package/openapi/reference-implementations/crewai-agent-api.openapi.yaml +29 -18
- package/openapi/reference-implementations/critic-agent-api.openapi.yaml +45 -19
- package/openapi/reference-implementations/document-analyzer-api.openapi.yaml +30 -24
- package/openapi/reference-implementations/drupal-agent-api.openapi.yaml +101 -50
- package/openapi/reference-implementations/getting-started-hello-world-api.openapi.yaml +33 -22
- package/openapi/reference-implementations/gitlab-ml-recommender-api.openapi.yaml +20 -16
- package/openapi/reference-implementations/governor-agent-api.openapi.yaml +41 -23
- package/openapi/reference-implementations/helm-generator.openapi.yaml +88 -46
- package/openapi/reference-implementations/integrator-agent-api.openapi.yaml +30 -20
- package/openapi/reference-implementations/judge-agent-api.openapi.yaml +22 -16
- package/openapi/reference-implementations/k8s-troubleshooter-api.openapi.yaml +32 -18
- package/openapi/reference-implementations/langchain-agent-api.openapi.yaml +32 -21
- package/openapi/reference-implementations/monitor-agent-api.openapi.yaml +34 -21
- package/openapi/reference-implementations/orchestrator-agent-api.openapi.yaml +49 -27
- package/openapi/reference-implementations/quickstart-support-agent-api.openapi.yaml +27 -19
- package/openapi/reference-implementations/self-evolving-ecosystem.openapi.yaml +427 -293
- package/openapi/reference-implementations/worker-agent-api.openapi.yaml +34 -23
- package/openapi/reference-implementations/workflow-orchestrator-api.openapi.yaml +35 -21
- package/openapi/release-automation.openapi.yaml +47 -13
- package/openapi/schemas/common/agent.yaml +30 -29
- package/openapi/schemas/common/errors.yaml +13 -3
- package/openapi/schemas/common/metadata.yaml +22 -7
- package/openapi/schemas/common/pagination.yaml +18 -6
- package/openapi/schemas/common/security.yaml +13 -5
- package/openapi/schemas/index.yaml +49 -42
- package/openapi/uadp-asyncapi.yaml +4 -2
- package/openapi/uadp-openapi.yaml +243 -165
- package/openapi/version-management.openapi.yaml +142 -135
- package/package.json +114 -103
- package/spec/extensions/role-manifest.md +188 -0
- package/spec/v0.4/extensions/mcp/README.md +1 -1
- package/spec/v0.5/agent.schema.json +2 -1
- package/spec/v0.5/extensions/mcp/README.md +1 -1
- package/spec/v0.5/role.schema.json +268 -0
|
@@ -1468,33 +1468,33 @@ class ${toolClassName}Tool extends ToolPluginBase implements ContainerFactoryPlu
|
|
|
1468
1468
|
/**
|
|
1469
1469
|
* Constructs a new ${toolClassName}Tool.
|
|
1470
1470
|
*
|
|
1471
|
-
* @param array
|
|
1471
|
+
* @param array $configuration
|
|
1472
1472
|
* Plugin configuration.
|
|
1473
|
-
* @param string
|
|
1473
|
+
* @param string $plugin_id
|
|
1474
1474
|
* The plugin ID.
|
|
1475
|
-
* @param mixed
|
|
1475
|
+
* @param mixed $plugin_definition
|
|
1476
1476
|
* The plugin definition.
|
|
1477
|
-
* @param \\Drupal\\${moduleName}\\Service\\AgentExecutorService
|
|
1477
|
+
* @param \\Drupal\\${moduleName}\\Service\\AgentExecutorService $agentService
|
|
1478
1478
|
* The agent executor service.
|
|
1479
1479
|
*/
|
|
1480
1480
|
public function __construct(
|
|
1481
|
-
array
|
|
1482
|
-
string
|
|
1483
|
-
mixed
|
|
1484
|
-
private readonly AgentExecutorService
|
|
1481
|
+
array $configuration,
|
|
1482
|
+
string $plugin_id,
|
|
1483
|
+
mixed $plugin_definition,
|
|
1484
|
+
private readonly AgentExecutorService $agentService,
|
|
1485
1485
|
) {
|
|
1486
|
-
parent::__construct(
|
|
1486
|
+
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
|
1487
1487
|
}
|
|
1488
1488
|
|
|
1489
1489
|
/**
|
|
1490
1490
|
* {@inheritdoc}
|
|
1491
1491
|
*/
|
|
1492
|
-
public static function create(ContainerInterface
|
|
1492
|
+
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static {
|
|
1493
1493
|
return new static(
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1494
|
+
$configuration,
|
|
1495
|
+
$plugin_id,
|
|
1496
|
+
$plugin_definition,
|
|
1497
|
+
$container->get('${moduleName}.agent_executor'),
|
|
1498
1498
|
);
|
|
1499
1499
|
}
|
|
1500
1500
|
|
|
@@ -1515,8 +1515,8 @@ class ${toolClassName}Tool extends ToolPluginBase implements ContainerFactoryPlu
|
|
|
1515
1515
|
/**
|
|
1516
1516
|
* {@inheritdoc}
|
|
1517
1517
|
*/
|
|
1518
|
-
public function execute(array
|
|
1519
|
-
return
|
|
1518
|
+
public function execute(array $input): array {
|
|
1519
|
+
return $this->agentService->executeTool('${this.escapePhpString(toolName)}', $input);
|
|
1520
1520
|
}
|
|
1521
1521
|
|
|
1522
1522
|
}
|
|
@@ -1786,43 +1786,43 @@ class ${actionClassName}Action extends ActionBase implements ContainerFactoryPlu
|
|
|
1786
1786
|
/**
|
|
1787
1787
|
* Constructs a new ${actionClassName}Action.
|
|
1788
1788
|
*
|
|
1789
|
-
* @param array
|
|
1789
|
+
* @param array $configuration
|
|
1790
1790
|
* Plugin configuration.
|
|
1791
|
-
* @param string
|
|
1791
|
+
* @param string $plugin_id
|
|
1792
1792
|
* The plugin ID.
|
|
1793
|
-
* @param mixed
|
|
1793
|
+
* @param mixed $plugin_definition
|
|
1794
1794
|
* The plugin definition.
|
|
1795
|
-
* @param \\Drupal\\${moduleName}\\Service\\AgentExecutorService
|
|
1795
|
+
* @param \\Drupal\\${moduleName}\\Service\\AgentExecutorService $agentService
|
|
1796
1796
|
* The agent executor service.
|
|
1797
1797
|
*/
|
|
1798
1798
|
public function __construct(
|
|
1799
|
-
array
|
|
1800
|
-
string
|
|
1801
|
-
mixed
|
|
1802
|
-
private readonly AgentExecutorService
|
|
1799
|
+
array $configuration,
|
|
1800
|
+
string $plugin_id,
|
|
1801
|
+
mixed $plugin_definition,
|
|
1802
|
+
private readonly AgentExecutorService $agentService,
|
|
1803
1803
|
) {
|
|
1804
|
-
parent::__construct(
|
|
1804
|
+
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
|
1805
1805
|
}
|
|
1806
1806
|
|
|
1807
1807
|
/**
|
|
1808
1808
|
* {@inheritdoc}
|
|
1809
1809
|
*/
|
|
1810
|
-
public static function create(ContainerInterface
|
|
1810
|
+
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static {
|
|
1811
1811
|
return new static(
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1812
|
+
$configuration,
|
|
1813
|
+
$plugin_id,
|
|
1814
|
+
$plugin_definition,
|
|
1815
|
+
$container->get('${moduleName}.agent_executor'),
|
|
1816
1816
|
);
|
|
1817
1817
|
}
|
|
1818
1818
|
|
|
1819
1819
|
/**
|
|
1820
1820
|
* {@inheritdoc}
|
|
1821
1821
|
*/
|
|
1822
|
-
public function execute(
|
|
1823
|
-
|
|
1824
|
-
'entity_id' =>
|
|
1825
|
-
'entity_type' =>
|
|
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
1826
|
'operation' => '${operation}',
|
|
1827
1827
|
]);
|
|
1828
1828
|
}
|
|
@@ -1830,8 +1830,8 @@ class ${actionClassName}Action extends ActionBase implements ContainerFactoryPlu
|
|
|
1830
1830
|
/**
|
|
1831
1831
|
* {@inheritdoc}
|
|
1832
1832
|
*/
|
|
1833
|
-
public function access(
|
|
1834
|
-
return
|
|
1833
|
+
public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
|
|
1834
|
+
return $object->access('${accessOp}', $account, $return_as_object);
|
|
1835
1835
|
}
|
|
1836
1836
|
|
|
1837
1837
|
}
|
|
@@ -1901,33 +1901,33 @@ class AgentEnabledCondition extends ConditionPluginBase implements ContainerFact
|
|
|
1901
1901
|
/**
|
|
1902
1902
|
* Constructs a new AgentEnabledCondition.
|
|
1903
1903
|
*
|
|
1904
|
-
* @param array
|
|
1904
|
+
* @param array $configuration
|
|
1905
1905
|
* Plugin configuration.
|
|
1906
|
-
* @param string
|
|
1906
|
+
* @param string $plugin_id
|
|
1907
1907
|
* The plugin ID.
|
|
1908
|
-
* @param mixed
|
|
1908
|
+
* @param mixed $plugin_definition
|
|
1909
1909
|
* The plugin definition.
|
|
1910
|
-
* @param \\Drupal\\Core\\Config\\ConfigFactoryInterface
|
|
1910
|
+
* @param \\Drupal\\Core\\Config\\ConfigFactoryInterface $configFactory
|
|
1911
1911
|
* The config factory service.
|
|
1912
1912
|
*/
|
|
1913
1913
|
public function __construct(
|
|
1914
|
-
array
|
|
1915
|
-
string
|
|
1916
|
-
mixed
|
|
1917
|
-
private readonly ConfigFactoryInterface
|
|
1914
|
+
array $configuration,
|
|
1915
|
+
string $plugin_id,
|
|
1916
|
+
mixed $plugin_definition,
|
|
1917
|
+
private readonly ConfigFactoryInterface $configFactory,
|
|
1918
1918
|
) {
|
|
1919
|
-
parent::__construct(
|
|
1919
|
+
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
|
1920
1920
|
}
|
|
1921
1921
|
|
|
1922
1922
|
/**
|
|
1923
1923
|
* {@inheritdoc}
|
|
1924
1924
|
*/
|
|
1925
|
-
public static function create(ContainerInterface
|
|
1925
|
+
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static {
|
|
1926
1926
|
return new static(
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1927
|
+
$configuration,
|
|
1928
|
+
$plugin_id,
|
|
1929
|
+
$plugin_definition,
|
|
1930
|
+
$container->get('config.factory'),
|
|
1931
1931
|
);
|
|
1932
1932
|
}
|
|
1933
1933
|
|
|
@@ -1943,50 +1943,50 @@ class AgentEnabledCondition extends ConditionPluginBase implements ContainerFact
|
|
|
1943
1943
|
/**
|
|
1944
1944
|
* {@inheritdoc}
|
|
1945
1945
|
*/
|
|
1946
|
-
public function buildConfigurationForm(array
|
|
1947
|
-
|
|
1946
|
+
public function buildConfigurationForm(array $form, FormStateInterface $form_state): array {
|
|
1947
|
+
$form['agent_id'] = [
|
|
1948
1948
|
'#type' => 'textfield',
|
|
1949
|
-
'#title' =>
|
|
1950
|
-
'#default_value' =>
|
|
1951
|
-
'#description' =>
|
|
1949
|
+
'#title' => $this->t('Agent ID'),
|
|
1950
|
+
'#default_value' => $this->configuration['agent_id'],
|
|
1951
|
+
'#description' => $this->t('The OSSA agent identifier to check.'),
|
|
1952
1952
|
'#required' => TRUE,
|
|
1953
1953
|
];
|
|
1954
1954
|
|
|
1955
|
-
return parent::buildConfigurationForm(
|
|
1955
|
+
return parent::buildConfigurationForm($form, $form_state);
|
|
1956
1956
|
}
|
|
1957
1957
|
|
|
1958
1958
|
/**
|
|
1959
1959
|
* {@inheritdoc}
|
|
1960
1960
|
*/
|
|
1961
|
-
public function submitConfigurationForm(array
|
|
1962
|
-
|
|
1963
|
-
parent::submitConfigurationForm(
|
|
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
1964
|
}
|
|
1965
1965
|
|
|
1966
1966
|
/**
|
|
1967
1967
|
* {@inheritdoc}
|
|
1968
1968
|
*/
|
|
1969
1969
|
public function evaluate(): bool {
|
|
1970
|
-
|
|
1970
|
+
$config = $this->configFactory->get('${moduleName}.settings');
|
|
1971
1971
|
|
|
1972
1972
|
// Check if auto-execution is enabled (agent is active)
|
|
1973
|
-
|
|
1973
|
+
$enabled = (bool) $config->get('auto_execute_on_save');
|
|
1974
1974
|
|
|
1975
|
-
return
|
|
1975
|
+
return $this->isNegated() ? !$enabled : $enabled;
|
|
1976
1976
|
}
|
|
1977
1977
|
|
|
1978
1978
|
/**
|
|
1979
1979
|
* {@inheritdoc}
|
|
1980
1980
|
*/
|
|
1981
1981
|
public function summary(): TranslatableMarkup {
|
|
1982
|
-
if (
|
|
1982
|
+
if ($this->isNegated()) {
|
|
1983
1983
|
return new TranslatableMarkup('OSSA agent @agent is disabled', [
|
|
1984
|
-
'@agent' =>
|
|
1984
|
+
'@agent' => $this->configuration['agent_id'],
|
|
1985
1985
|
]);
|
|
1986
1986
|
}
|
|
1987
1987
|
|
|
1988
1988
|
return new TranslatableMarkup('OSSA agent @agent is enabled', [
|
|
1989
|
-
'@agent' =>
|
|
1989
|
+
'@agent' => $this->configuration['agent_id'],
|
|
1990
1990
|
]);
|
|
1991
1991
|
}
|
|
1992
1992
|
|
|
@@ -2011,27 +2011,27 @@ class AgentEnabledCondition extends ConditionPluginBase implements ContainerFact
|
|
|
2011
2011
|
// Build evaluation logic based on guardrail type
|
|
2012
2012
|
let evaluateBody;
|
|
2013
2013
|
if (guardType === 'input' && blockedPatterns.length > 0) {
|
|
2014
|
-
evaluateBody = `
|
|
2015
|
-
|
|
2014
|
+
evaluateBody = ` $content = $this->configuration['content'] ?? '';
|
|
2015
|
+
$blocked_patterns = ${patternsPhp};
|
|
2016
2016
|
|
|
2017
|
-
foreach (
|
|
2018
|
-
if (str_contains(
|
|
2019
|
-
return
|
|
2017
|
+
foreach ($blocked_patterns as $pattern) {
|
|
2018
|
+
if (str_contains($content, $pattern)) {
|
|
2019
|
+
return $this->isNegated() ? TRUE : FALSE;
|
|
2020
2020
|
}
|
|
2021
2021
|
}
|
|
2022
2022
|
|
|
2023
|
-
return
|
|
2023
|
+
return $this->isNegated() ? FALSE : TRUE;`;
|
|
2024
2024
|
}
|
|
2025
2025
|
else if (guardType === 'output' && maxLength) {
|
|
2026
|
-
evaluateBody = `
|
|
2027
|
-
|
|
2028
|
-
|
|
2026
|
+
evaluateBody = ` $content = $this->configuration['content'] ?? '';
|
|
2027
|
+
$max_length = ${maxLength};
|
|
2028
|
+
$within_limit = mb_strlen($content) <= $max_length;
|
|
2029
2029
|
|
|
2030
|
-
return
|
|
2030
|
+
return $this->isNegated() ? !$within_limit : $within_limit;`;
|
|
2031
2031
|
}
|
|
2032
2032
|
else {
|
|
2033
2033
|
evaluateBody = ` // Default: condition passes
|
|
2034
|
-
return
|
|
2034
|
+
return !$this->isNegated();`;
|
|
2035
2035
|
}
|
|
2036
2036
|
return `<?php
|
|
2037
2037
|
|
|
@@ -105,12 +105,12 @@ export class OpenAIAgentsAdapter extends BaseAdapter {
|
|
|
105
105
|
metadata: {
|
|
106
106
|
name: 'platform-assistant',
|
|
107
107
|
version: '1.0.0',
|
|
108
|
-
description: '
|
|
108
|
+
description: 'Agent Platform Assistant with Drupal MCP tools',
|
|
109
109
|
},
|
|
110
110
|
spec: {
|
|
111
111
|
role: 'assistant',
|
|
112
112
|
personality: {
|
|
113
|
-
system_prompt: 'You are the
|
|
113
|
+
system_prompt: 'You are the Agent Platform Assistant. Use MCP tools to manage content and query data on the Drupal agent platform.',
|
|
114
114
|
},
|
|
115
115
|
llm: {
|
|
116
116
|
provider: 'openai',
|
|
@@ -13,19 +13,19 @@ export class SchemaLoader {
|
|
|
13
13
|
validator;
|
|
14
14
|
definitions = new Map();
|
|
15
15
|
constructor(schemaPath) {
|
|
16
|
-
// Default to
|
|
16
|
+
// Default to the current schema - find it relative to this module
|
|
17
17
|
// When installed as npm package, __dirname will be in node_modules/@bluefly/openstandardagents/dist/cli/schema-driven/
|
|
18
|
-
// Schema is at node_modules/@bluefly/openstandardagents/dist/spec/v0.
|
|
18
|
+
// Schema is at node_modules/@bluefly/openstandardagents/dist/spec/v0.5/agent.schema.json
|
|
19
19
|
const __filename = fileURLToPath(import.meta.url);
|
|
20
20
|
const __dirname = path.dirname(__filename);
|
|
21
21
|
// Try multiple paths to find the schema
|
|
22
22
|
const possiblePaths = [
|
|
23
23
|
// When running from dist/ (npm installed or local build)
|
|
24
|
-
path.join(__dirname, '../../../spec/v0.
|
|
24
|
+
path.join(__dirname, '../../../spec/v0.5/agent.schema.json'),
|
|
25
25
|
// When running from source (development)
|
|
26
|
-
path.join(__dirname, '../../../spec/v0.
|
|
26
|
+
path.join(__dirname, '../../../spec/v0.5/agent.schema.json'),
|
|
27
27
|
// Fallback to cwd (for backwards compatibility)
|
|
28
|
-
path.join(process.cwd(), 'spec/v0.
|
|
28
|
+
path.join(process.cwd(), 'spec/v0.5/agent.schema.json'),
|
|
29
29
|
];
|
|
30
30
|
let resolvedPath;
|
|
31
31
|
if (schemaPath) {
|
|
@@ -32,6 +32,15 @@ afterAll(async () => {
|
|
|
32
32
|
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
+
function readTextResource(content) {
|
|
36
|
+
if (typeof content.text === 'string') {
|
|
37
|
+
return content.text;
|
|
38
|
+
}
|
|
39
|
+
if (typeof content.blob === 'string') {
|
|
40
|
+
return Buffer.from(content.blob, 'base64').toString('utf8');
|
|
41
|
+
}
|
|
42
|
+
throw new Error('Expected text resource content');
|
|
43
|
+
}
|
|
35
44
|
describe('ossa_validate', () => {
|
|
36
45
|
it('validates a valid manifest', async () => {
|
|
37
46
|
const manifestPath = path.join(FIXTURE_DIR, 'compliance-auditor/manifest.ossa.yaml');
|
|
@@ -483,30 +492,30 @@ describe('MCP resources', () => {
|
|
|
483
492
|
uri: 'ossa://template/minimal',
|
|
484
493
|
});
|
|
485
494
|
expect(result.contents.length).toBe(1);
|
|
486
|
-
expect(result.contents[0]
|
|
487
|
-
expect(result.contents[0]
|
|
495
|
+
expect(readTextResource(result.contents[0])).toContain('apiVersion: ossa/v0.4');
|
|
496
|
+
expect(readTextResource(result.contents[0])).toContain('kind: Agent');
|
|
488
497
|
});
|
|
489
498
|
it('reads full template with all sections', async () => {
|
|
490
499
|
const result = await client.readResource({ uri: 'ossa://template/full' });
|
|
491
|
-
expect(result.contents[0]
|
|
492
|
-
expect(result.contents[0]
|
|
493
|
-
expect(result.contents[0]
|
|
494
|
-
expect(result.contents[0]
|
|
495
|
-
expect(result.contents[0]
|
|
500
|
+
expect(readTextResource(result.contents[0])).toContain('spec:');
|
|
501
|
+
expect(readTextResource(result.contents[0])).toContain('tools:');
|
|
502
|
+
expect(readTextResource(result.contents[0])).toContain('autonomy:');
|
|
503
|
+
expect(readTextResource(result.contents[0])).toContain('extensions:');
|
|
504
|
+
expect(readTextResource(result.contents[0])).toContain('token_efficiency:');
|
|
496
505
|
});
|
|
497
506
|
it('reads MCP→OSSA→A2A guide', async () => {
|
|
498
507
|
const result = await client.readResource({
|
|
499
508
|
uri: 'ossa://guide/mcp-ossa-a2a',
|
|
500
509
|
});
|
|
501
|
-
expect(result.contents[0]
|
|
502
|
-
expect(result.contents[0]
|
|
503
|
-
expect(result.contents[0]
|
|
510
|
+
expect(readTextResource(result.contents[0])).toContain('MCP');
|
|
511
|
+
expect(readTextResource(result.contents[0])).toContain('OSSA');
|
|
512
|
+
expect(readTextResource(result.contents[0])).toContain('A2A');
|
|
504
513
|
});
|
|
505
514
|
it('reads supported platforms with SDK references', async () => {
|
|
506
515
|
const result = await client.readResource({
|
|
507
516
|
uri: 'ossa://platforms/supported',
|
|
508
517
|
});
|
|
509
|
-
const platforms = JSON.parse(result.contents[0]
|
|
518
|
+
const platforms = JSON.parse(readTextResource(result.contents[0]));
|
|
510
519
|
expect(platforms.total).toBeGreaterThanOrEqual(14);
|
|
511
520
|
expect(platforms.platforms).toBeInstanceOf(Array);
|
|
512
521
|
const openai = platforms.platforms.find((p) => p.id === 'openai');
|
package/dist/mcp-server/index.js
CHANGED
|
File without changes
|
package/dist/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluefly/openstandardagents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"exports": {
|
|
5
|
-
"./schema": "./spec/v0.
|
|
5
|
+
"./schema": "./spec/v0.5/agent.schema.json",
|
|
6
6
|
"./schema/v0.4": "./spec/v0.4/agent.schema.json",
|
|
7
7
|
"./schema/v0.4.1": "./spec/v0.4/agent.schema.json",
|
|
8
|
+
"./schema/v0.5": "./spec/v0.5/agent.schema.json",
|
|
9
|
+
"./schema/v0.5.0": "./spec/v0.5/agent.schema.json",
|
|
8
10
|
".": {
|
|
9
11
|
"types": "./dist/index.d.ts",
|
|
10
12
|
"import": "./dist/index.js",
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
"import": "./dist/services/agent-card-generator.js",
|
|
47
49
|
"require": "./dist/services/agent-card-generator.js"
|
|
48
50
|
},
|
|
49
|
-
"./agent-card-schema": "./spec/v0.
|
|
51
|
+
"./agent-card-schema": "./spec/v0.5/agent-card.schema.json",
|
|
50
52
|
"./sdk": {
|
|
51
53
|
"types": "./dist/sdk.d.ts",
|
|
52
54
|
"import": "./dist/sdk.js",
|
|
@@ -150,8 +152,9 @@
|
|
|
150
152
|
"build:assets": "cp -r spec dist/ && cp package.json .version.json dist/",
|
|
151
153
|
"build:clean": "npm run clean && npm run build",
|
|
152
154
|
"dev": "tsc --watch",
|
|
153
|
-
"clean": "
|
|
155
|
+
"clean": "node -e \"const fs=require('node:fs'); ['dist','coverage','.tsbuildinfo'].forEach((p)=>fs.rmSync(p,{recursive:true,force:true}))\"",
|
|
154
156
|
"// TESTING": "",
|
|
157
|
+
"pretest": "npm run build",
|
|
155
158
|
"test": "jest",
|
|
156
159
|
"test:unit": "jest tests/unit --forceExit",
|
|
157
160
|
"test:integration": "jest tests/integration",
|
|
@@ -185,7 +188,7 @@
|
|
|
185
188
|
"validate:sdk:python": "cd src/sdks/python && python -m pip install --quiet -e . && python -m pytest tests/ -v || true",
|
|
186
189
|
"validate:schema": "npx ajv-cli compile -s $(node -p \"require('./.version.json').spec_path\")/$(node -p \"require('./.version.json').schema_file\") -r $(node -p \"require('./.version.json').spec_path\")/extensions/kagent/kagent.schema.json -r $(node -p \"require('./.version.json').spec_path\")/extensions/mcp/mcp.schema.json -r $(node -p \"require('./.version.json').spec_path\")/extensions/a2a/a2a.schema.json -r $(node -p \"require('./.version.json').spec_path\")/extensions/langchain/langchain.schema.json -r $(node -p \"require('./.version.json').spec_path\")/extensions/langgraph/langgraph.schema.json -r $(node -p \"require('./.version.json').spec_path\")/extensions/ag2/ag2.schema.json -r $(node -p \"require('./.version.json').spec_path\")/extensions/crewai/crewai.schema.json --strict=false --allow-union-types",
|
|
187
190
|
"validate:manifest": "npx ajv-cli validate -s $(node -p \"require('./.version.json').spec_path\")/$(node -p \"require('./.version.json').schema_file\") --strict=false --allow-union-types -d",
|
|
188
|
-
"validate:examples": "
|
|
191
|
+
"validate:examples": "tsx src/tools/validation/validate-examples.ts",
|
|
189
192
|
"validate:versions": "tsx src/tools/validate-versions.ts",
|
|
190
193
|
"fix:versions": "tsx src/tools/fix-versions.ts",
|
|
191
194
|
"validate:power": "tsx src/tools/validation/validate-ossa.ts",
|
|
@@ -245,10 +248,10 @@
|
|
|
245
248
|
"@langchain/anthropic": "^0.3.10",
|
|
246
249
|
"@langchain/core": "^0.3.29",
|
|
247
250
|
"@langchain/openai": "^0.3.17",
|
|
248
|
-
"@modelcontextprotocol/sdk": "^
|
|
251
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
249
252
|
"@noble/ed25519": "^2.3.0",
|
|
250
253
|
"@octokit/rest": "^20.0.0",
|
|
251
|
-
"@openai/agents": "^0.
|
|
254
|
+
"@openai/agents": "^0.7.1",
|
|
252
255
|
"@opentelemetry/api": "^1.9.0",
|
|
253
256
|
"@opentelemetry/exporter-jaeger": "^1.28.0",
|
|
254
257
|
"@opentelemetry/exporter-logs-otlp-http": "^0.211.0",
|
|
@@ -261,7 +264,7 @@
|
|
|
261
264
|
"@opentelemetry/sdk-metrics": "^2.5.0",
|
|
262
265
|
"@opentelemetry/sdk-node": "^0.54.0",
|
|
263
266
|
"@opentelemetry/sdk-trace-base": "^1.28.0",
|
|
264
|
-
"@qdrant/js-client-rest": "^1.
|
|
267
|
+
"@qdrant/js-client-rest": "^1.17.0",
|
|
265
268
|
"@temporalio/activity": "^1.11.3",
|
|
266
269
|
"@temporalio/workflow": "^1.11.3",
|
|
267
270
|
"@types/tar": "^6.1.13",
|
|
@@ -294,7 +297,7 @@
|
|
|
294
297
|
"readline": "^1.3.0",
|
|
295
298
|
"reflect-metadata": "^0.2.2",
|
|
296
299
|
"semver": "^7.7.3",
|
|
297
|
-
"tar": "^7.5.
|
|
300
|
+
"tar": "^7.5.11",
|
|
298
301
|
"uuid": "^11.0.5",
|
|
299
302
|
"web-did-resolver": "^2.0.32",
|
|
300
303
|
"ws": "^8.19.0",
|
|
@@ -302,7 +305,7 @@
|
|
|
302
305
|
"zod": "^4.1.11"
|
|
303
306
|
},
|
|
304
307
|
"devDependencies": {
|
|
305
|
-
"@bluefly/duadp": "^0.1.
|
|
308
|
+
"@bluefly/duadp": "^0.1.4",
|
|
306
309
|
"@jest/globals": "^29.7.0",
|
|
307
310
|
"@octokit/rest": "^22.0.1",
|
|
308
311
|
"@semantic-release/changelog": "^6.0.3",
|
|
@@ -344,7 +347,7 @@
|
|
|
344
347
|
"vitest": "^2.1.8"
|
|
345
348
|
},
|
|
346
349
|
"optionalDependencies": {
|
|
347
|
-
"nodemailer": "^
|
|
350
|
+
"nodemailer": "^8.0.2"
|
|
348
351
|
},
|
|
349
352
|
"engines": {
|
|
350
353
|
"node": ">=20.0.0",
|
|
@@ -353,5 +356,15 @@
|
|
|
353
356
|
"volta": {
|
|
354
357
|
"node": "22.19.0",
|
|
355
358
|
"npm": "11.10.0"
|
|
359
|
+
},
|
|
360
|
+
"overrides": {
|
|
361
|
+
"@hono/node-server": "^1.19.10",
|
|
362
|
+
"express-rate-limit": "^8.2.2",
|
|
363
|
+
"hono": "^4.12.7",
|
|
364
|
+
"langsmith": "^0.4.6",
|
|
365
|
+
"fast-xml-parser": "^5.3.8",
|
|
366
|
+
"@langchain/anthropic": {
|
|
367
|
+
"fast-xml-parser": "^4.5.4"
|
|
368
|
+
}
|
|
356
369
|
}
|
|
357
370
|
}
|
|
@@ -628,7 +628,7 @@ services:
|
|
|
628
628
|
`;
|
|
629
629
|
}
|
|
630
630
|
else if (memoryBackend === 'postgres') {
|
|
631
|
-
compose += ` - POSTGRES_URL=postgresql://postgres
|
|
631
|
+
compose += ` - POSTGRES_URL=postgresql://postgres:\${POSTGRES_PASSWORD}@postgres:5432/agent_memory
|
|
632
632
|
depends_on:
|
|
633
633
|
- postgres
|
|
634
634
|
|
|
@@ -661,7 +661,7 @@ volumes:
|
|
|
661
661
|
'',
|
|
662
662
|
'# Memory Backend',
|
|
663
663
|
'REDIS_URL=redis://localhost:6379',
|
|
664
|
-
'POSTGRES_URL=postgresql://postgres
|
|
664
|
+
'POSTGRES_URL=postgresql://postgres:${POSTGRES_PASSWORD}@localhost:5432/agent_memory',
|
|
665
665
|
'',
|
|
666
666
|
'# API Configuration',
|
|
667
667
|
'API_PORT=8000',
|
|
@@ -815,7 +815,7 @@ def _get_pg_pool():
|
|
|
815
815
|
|
|
816
816
|
postgres_url = os.getenv(
|
|
817
817
|
"POSTGRES_URL",
|
|
818
|
-
"postgresql://postgres:
|
|
818
|
+
"postgresql://postgres:your-password-here@localhost:5432/agent_memory"
|
|
819
819
|
)
|
|
820
820
|
|
|
821
821
|
if _pg_pool is None:
|
|
@@ -943,7 +943,7 @@ def get_memory(session_id: str = "default") -> ConversationBufferMemory:
|
|
|
943
943
|
|
|
944
944
|
postgres_url = os.getenv(
|
|
945
945
|
"POSTGRES_URL",
|
|
946
|
-
"postgresql://postgres:
|
|
946
|
+
"postgresql://postgres:your-password-here@localhost:5432/agent_memory"
|
|
947
947
|
)
|
|
948
948
|
|
|
949
949
|
message_history = PostgresChatMessageHistory(
|
|
@@ -2323,7 +2323,7 @@ class ${className}FunctionalTest extends BrowserTestBase {
|
|
|
2323
2323
|
|
|
2324
2324
|
<php>
|
|
2325
2325
|
<env name="SIMPLETEST_BASE_URL" value="http://localhost:8888"/>
|
|
2326
|
-
<env name="SIMPLETEST_DB" value="mysql://drupal
|
|
2326
|
+
<env name="SIMPLETEST_DB" value="mysql://drupal:\${DRUPAL_DB_PASSWORD}@localhost/drupal"/>
|
|
2327
2327
|
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value="sites/default/files/simpletest"/>
|
|
2328
2328
|
</php>
|
|
2329
2329
|
</phpunit>
|
|
@@ -6,8 +6,8 @@ import { z } from 'zod';
|
|
|
6
6
|
export declare const TaxonomyCategoryTypeSchema: z.ZodEnum<{
|
|
7
7
|
custom: "custom";
|
|
8
8
|
runtime: "runtime";
|
|
9
|
-
capability: "capability";
|
|
10
9
|
role: "role";
|
|
10
|
+
capability: "capability";
|
|
11
11
|
domain: "domain";
|
|
12
12
|
}>;
|
|
13
13
|
export declare const TaxonomyCategoryInputSchema: z.ZodObject<{
|
|
@@ -16,8 +16,8 @@ export declare const TaxonomyCategoryInputSchema: z.ZodObject<{
|
|
|
16
16
|
type: z.ZodEnum<{
|
|
17
17
|
custom: "custom";
|
|
18
18
|
runtime: "runtime";
|
|
19
|
-
capability: "capability";
|
|
20
19
|
role: "role";
|
|
20
|
+
capability: "capability";
|
|
21
21
|
domain: "domain";
|
|
22
22
|
}>;
|
|
23
23
|
level: z.ZodNumber;
|
|
@@ -31,8 +31,8 @@ export declare const TaxonomyCategorySchema: z.ZodObject<{
|
|
|
31
31
|
type: z.ZodEnum<{
|
|
32
32
|
custom: "custom";
|
|
33
33
|
runtime: "runtime";
|
|
34
|
-
capability: "capability";
|
|
35
34
|
role: "role";
|
|
35
|
+
capability: "capability";
|
|
36
36
|
domain: "domain";
|
|
37
37
|
}>;
|
|
38
38
|
level: z.ZodNumber;
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
],
|
|
32
32
|
"ossa": {
|
|
33
33
|
"type": "claude-skill",
|
|
34
|
-
"skillPath": "/var/folders/48/d86hncy50j93r_vzsv6knttr0000gn/T/ossa-export-test-
|
|
34
|
+
"skillPath": "/var/folders/48/d86hncy50j93r_vzsv6knttr0000gn/T/ossa-export-test-1773547554392/test-skill"
|
|
35
35
|
}
|
|
36
36
|
}
|