@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.
Files changed (125) hide show
  1. package/.version.json +3 -3
  2. package/CHANGELOG.md +8 -8
  3. package/README.md +68 -58
  4. package/bin/postinstall +0 -0
  5. package/dist/.version.json +3 -3
  6. package/dist/adapters/claude-code/adapter.js +2 -2
  7. package/dist/adapters/docker/generators.js +19 -19
  8. package/dist/adapters/drupal/generator.js +76 -76
  9. package/dist/adapters/openai-agents/adapter.js +2 -2
  10. package/dist/cli/schema-driven/schema-loader.js +5 -5
  11. package/dist/mcp-server/__tests__/mcp-server.spec.js +20 -11
  12. package/dist/mcp-server/index.js +0 -0
  13. package/dist/package.json +24 -11
  14. package/dist/services/export/langchain/langchain-exporter.js +2 -2
  15. package/dist/services/export/langchain/memory-generator.js +2 -2
  16. package/dist/services/export/testing/test-generator.js +1 -1
  17. package/dist/services/taxonomy-service.d.ts +3 -3
  18. package/dist/skills/test-skill/package.json +1 -1
  19. package/dist/spec/extensions/role-manifest.md +188 -0
  20. package/dist/spec/v0.4/extensions/mcp/README.md +1 -1
  21. package/dist/spec/v0.5/agent.schema.json +2 -1
  22. package/dist/spec/v0.5/extensions/mcp/README.md +1 -1
  23. package/dist/spec/v0.5/role.schema.json +268 -0
  24. package/dist/types/index.d.ts +2 -0
  25. package/dist/types/index.js +2 -0
  26. package/dist/types/role.d.ts +126 -0
  27. package/dist/types/role.js +38 -0
  28. package/dist/validation/validator.js +1 -1
  29. package/examples/agents/01-customer-support-bot/agent.ossa.yaml +24 -31
  30. package/examples/agents/05-sales-assistant/agent.ossa.yaml +35 -23
  31. package/examples/agents/07-research-assistant/agent.ossa.yaml +27 -21
  32. package/examples/agents/10-meeting-assistant/agent.ossa.yaml +27 -35
  33. package/examples/agents/security-audit-agent.ossa.yaml +234 -0
  34. package/examples/agentscope/react-assistant/agent.ossa.yaml +36 -32
  35. package/examples/drupal/content-moderator.ossa.yaml +2 -2
  36. package/examples/drupal/drupal-contributor.ossa.yaml +247 -0
  37. package/examples/export/langchain/production-agent-with-memory/README.md +1 -1
  38. package/examples/export/langchain/production-agent-with-memory/agent.ossa.yaml +13 -23
  39. package/examples/export/langchain/production-agent-with-streaming/agent.ossa.yaml +1 -15
  40. package/examples/export/langchain/production-agent-with-tools/agent.ossa.yaml +28 -29
  41. package/examples/getting-started/01-minimal-agent.ossa.yaml +1 -1
  42. package/examples/getting-started/02-agent-with-tools.ossa.yaml +1 -1
  43. package/examples/getting-started/03-agent-with-safety.ossa.yaml +1 -1
  44. package/examples/getting-started/04-agent-with-messaging.ossa.yaml +1 -1
  45. package/examples/getting-started/05-workflow-composition.ossa.yaml +1 -1
  46. package/examples/getting-started/README.md +3 -3
  47. package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
  48. package/examples/gitlab-agents/gitlab-ci-agent.ossa.yaml +221 -0
  49. package/examples/hierarchical-agent.ossa.yaml +10 -53
  50. package/examples/kagent/ossa-kagent-anthropic.ossa.yaml +2 -25
  51. package/examples/kagent/ossa-kagent-mcp-tools.ossa.yaml +2 -30
  52. package/examples/kagent/ossa-kagent-multi-tool.ossa.yaml +2 -18
  53. package/examples/kagent/ossa-kagent-poc.ossa.yaml +2 -16
  54. package/examples/pipeline-agent.ossa.yaml +3 -3
  55. package/examples/platform-specific/claude-code-subagent.yaml +1 -1
  56. package/examples/platform-specific/cursor-coding-agent.yaml +1 -1
  57. package/examples/platform-specific/warp-terminal-agent.yaml +1 -1
  58. package/examples/production-ready/01-customer-support-bot/agent.ossa.yaml +24 -31
  59. package/examples/production-ready/05-sales-assistant/agent.ossa.yaml +35 -23
  60. package/examples/production-ready/07-research-assistant/agent.ossa.yaml +27 -19
  61. package/examples/production-ready/10-meeting-assistant/agent.ossa.yaml +27 -35
  62. package/examples/reference-implementations/python-client/examples/basic_usage.py +0 -0
  63. package/examples/reference-implementations/python-client/examples/publish_agent.py +0 -0
  64. package/examples/roles/drupal-developer.role.yaml +37 -0
  65. package/examples/roles/platform-operator.role.yaml +28 -0
  66. package/examples/roles/security-auditor.role.yaml +27 -0
  67. package/examples/swarm-agent.ossa.yaml +13 -51
  68. package/examples/team-agent.ossa.yaml +12 -61
  69. package/examples/team-lead-teammate.ossa.yaml +12 -17
  70. package/openapi/agent-communication.yaml +260 -212
  71. package/openapi/agent-crud.yaml +217 -187
  72. package/openapi/agent-discovery.yaml +119 -81
  73. package/openapi/agent-identity.yaml +219 -187
  74. package/openapi/agent-taxonomy.yaml +95 -38
  75. package/openapi/agents-md-service.yaml +103 -30
  76. package/openapi/cli/openapi.yaml +147 -40
  77. package/openapi/core/ossa-core-api.openapi.yaml +327 -271
  78. package/openapi/core/ossa-registry-api.openapi.yaml +298 -235
  79. package/openapi/core/ossa-registry.openapi.yaml +299 -159
  80. package/openapi/core/unified-agent-gateway.openapi.yaml +234 -170
  81. package/openapi/daemon-api.openapi.yaml +323 -181
  82. package/openapi/dev-cli/openapi.yaml +137 -113
  83. package/openapi/github-sync.yaml +62 -19
  84. package/openapi/marketplace-plugin.openapi.yaml +539 -466
  85. package/openapi/ossa-api.openapi.yaml +354 -213
  86. package/openapi/ossa-cli-enhancements.openapi.yaml +108 -89
  87. package/openapi/ossa-cli.yaml +260 -184
  88. package/openapi/protocols/sse-streams.yaml +66 -74
  89. package/openapi/protocols/websocket-events.yaml +61 -54
  90. package/openapi/reference-implementations/aiflow-bridge-api.openapi.yaml +37 -20
  91. package/openapi/reference-implementations/compliance-agent-api.openapi.yaml +35 -23
  92. package/openapi/reference-implementations/crewai-agent-api.openapi.yaml +29 -18
  93. package/openapi/reference-implementations/critic-agent-api.openapi.yaml +45 -19
  94. package/openapi/reference-implementations/document-analyzer-api.openapi.yaml +30 -24
  95. package/openapi/reference-implementations/drupal-agent-api.openapi.yaml +101 -50
  96. package/openapi/reference-implementations/getting-started-hello-world-api.openapi.yaml +33 -22
  97. package/openapi/reference-implementations/gitlab-ml-recommender-api.openapi.yaml +20 -16
  98. package/openapi/reference-implementations/governor-agent-api.openapi.yaml +41 -23
  99. package/openapi/reference-implementations/helm-generator.openapi.yaml +88 -46
  100. package/openapi/reference-implementations/integrator-agent-api.openapi.yaml +30 -20
  101. package/openapi/reference-implementations/judge-agent-api.openapi.yaml +22 -16
  102. package/openapi/reference-implementations/k8s-troubleshooter-api.openapi.yaml +32 -18
  103. package/openapi/reference-implementations/langchain-agent-api.openapi.yaml +32 -21
  104. package/openapi/reference-implementations/monitor-agent-api.openapi.yaml +34 -21
  105. package/openapi/reference-implementations/orchestrator-agent-api.openapi.yaml +49 -27
  106. package/openapi/reference-implementations/quickstart-support-agent-api.openapi.yaml +27 -19
  107. package/openapi/reference-implementations/self-evolving-ecosystem.openapi.yaml +427 -293
  108. package/openapi/reference-implementations/worker-agent-api.openapi.yaml +34 -23
  109. package/openapi/reference-implementations/workflow-orchestrator-api.openapi.yaml +35 -21
  110. package/openapi/release-automation.openapi.yaml +47 -13
  111. package/openapi/schemas/common/agent.yaml +30 -29
  112. package/openapi/schemas/common/errors.yaml +13 -3
  113. package/openapi/schemas/common/metadata.yaml +22 -7
  114. package/openapi/schemas/common/pagination.yaml +18 -6
  115. package/openapi/schemas/common/security.yaml +13 -5
  116. package/openapi/schemas/index.yaml +49 -42
  117. package/openapi/uadp-asyncapi.yaml +4 -2
  118. package/openapi/uadp-openapi.yaml +243 -165
  119. package/openapi/version-management.openapi.yaml +142 -135
  120. package/package.json +114 -103
  121. package/spec/extensions/role-manifest.md +188 -0
  122. package/spec/v0.4/extensions/mcp/README.md +1 -1
  123. package/spec/v0.5/agent.schema.json +2 -1
  124. package/spec/v0.5/extensions/mcp/README.md +1 -1
  125. package/spec/v0.5/role.schema.json +268 -0
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@bluefly/openstandardagents",
3
- "version": "0.4.9",
3
+ "version": "0.5.0",
4
4
  "exports": {
5
- "./schema": "./spec/v0.4/agent.schema.json",
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.4/agent-card.schema.json",
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",
@@ -141,99 +143,6 @@
141
143
  "url": "https://gitlab.com/blueflyio/ossa/openstandardagents/-/issues"
142
144
  },
143
145
  "homepage": "https://openstandardagents.org",
144
- "scripts": {
145
- "// ─────────────────────────────────────────────────────────────────────────────": "",
146
- "// BUILD & DEVELOPMENT": "",
147
- "mcp": "node dist/mcp-server/index.js",
148
- "prebuild": "npm run docs:process",
149
- "build": "tsc && npm run build:assets",
150
- "build:assets": "cp -r spec dist/ && cp package.json .version.json dist/",
151
- "build:clean": "npm run clean && npm run build",
152
- "dev": "tsc --watch",
153
- "clean": "rm -rf dist coverage .tsbuildinfo",
154
- "// TESTING": "",
155
- "test": "jest",
156
- "test:unit": "jest tests/unit --forceExit",
157
- "test:integration": "jest tests/integration",
158
- "test:e2e": "jest tests/e2e --passWithNoTests",
159
- "test:smoke": "jest tests/e2e --testPathPattern=smoke.spec.ts --runInBand --forceExit",
160
- "test:smoke:cli": "jest tests/e2e/cli.smoke.spec.ts",
161
- "test:smoke:npm-pack": "jest tests/e2e/npm-pack.smoke.spec.ts",
162
- "test:smoke:schema": "jest tests/e2e/schema-coverage.smoke.spec.ts",
163
- "test:coverage": "jest --coverage",
164
- "test:mutation": "stryker run",
165
- "test:mutation:ci": "stryker run --logLevel error",
166
- "test:watch": "jest --watch",
167
- "test:ci": "jest --ci --coverage --reporters=default --reporters=jest-junit",
168
- "test:mcp": "vitest run src/mcp-server/__tests__/mcp-server.spec.ts",
169
- "test:mcp:watch": "vitest watch src/mcp-server/__tests__/mcp-server.spec.ts",
170
- "ci:validate": "npm run build:clean && npm run quality && npm run test:unit && npm run test:smoke && npm run validate:all",
171
- "ci:validate:fast": "npm run typecheck && npm run test:unit && npm run validate:schema",
172
- "// CODE QUALITY": "",
173
- "typecheck": "tsc --noEmit",
174
- "lint": "eslint src tests --ext .ts",
175
- "lint:fix": "eslint src tests --ext .ts --fix",
176
- "format": "prettier --write 'src/**/*.ts' 'tests/**/*.ts'",
177
- "format:check": "prettier --check 'src/**/*.ts' 'tests/**/*.ts'",
178
- "quality": "npm run typecheck && npm run format:check",
179
- "quality:fix": "npm run format",
180
- "// VALIDATION": "",
181
- "validate": "npm run validate:no-symlinks && npm run validate:schema && npm run validate:openapi && npm run validate:examples",
182
- "validate:all": "npm run validate && npm run validate:sdks",
183
- "validate:sdks": "npm run validate:sdk:typescript && npm run validate:sdk:python",
184
- "validate:sdk:typescript": "cd src/sdks/typescript && npm install && npm run build && npm run typecheck",
185
- "validate:sdk:python": "cd src/sdks/python && python -m pip install --quiet -e . && python -m pytest tests/ -v || true",
186
- "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
- "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": "find examples \\( -name '*.ossa.yaml' -o -name '*.ossa.yml' \\) | grep -v 'swarm-to-ossa' | head -20 | xargs -I {} npm run validate:manifest -- {} || true",
189
- "validate:versions": "tsx src/tools/validate-versions.ts",
190
- "fix:versions": "tsx src/tools/fix-versions.ts",
191
- "validate:power": "tsx src/tools/validation/validate-ossa.ts",
192
- "validate:openapi": "spectral lint openapi/**/*.yaml --ruleset .spectral.yml 2>/dev/null || spectral lint openapi/**/*.yaml",
193
- "validate:openapi:ossa": "tsx src/tools/validation/validate-openapi-extensions.ts",
194
- "validate:no-symlinks": "tsx src/tools/validate-no-symlinks.ts",
195
- "// VERSION MANAGEMENT (via ossa-dev CLI - single source of truth)": "",
196
- "version:release": "tsx src/dev-cli/src/index.ts version release",
197
- "version:validate": "tsx src/dev-cli/src/index.ts version validate",
198
- "version:sync": "tsx src/dev-cli/src/index.ts version sync",
199
- "version:detect": "tsx src/dev-cli/src/index.ts version detect",
200
- "version:audit": "tsx src/dev-cli/src/index.ts version audit",
201
- "// INFRASTRUCTURE (deploy tooling out of scope for OSSA)": "",
202
- "env:list": "tsx src/dev-cli/src/index.ts env-cleanup --list",
203
- "env:cleanup": "tsx src/dev-cli/src/index.ts env-cleanup --stop-stuck",
204
- "// DOCUMENTATION": "",
205
- "wiki:publish": "node .gitlab/wiki-publish.cjs",
206
- "docs:process": "tsx src/tools/docs/process-doc-templates.ts",
207
- "docs:check": "test -f README.md && test -f CHANGELOG.md",
208
- "docs:generate": "tsx src/tools/docs/generate-api-docs.ts && tsx src/tools/docs/generate-cli-docs.ts && tsx src/tools/docs/generate-schema-docs.ts && tsx src/tools/docs/generate-examples-docs.ts && tsx src/tools/generators/generate-agents-catalog.ts && tsx src/tools/docs/generate-types-docs.ts && tsx src/tools/docs/generate-errors-docs.ts && tsx src/tools/docs/generate-config-docs.ts && tsx src/tools/docs/lowercase-docs.ts",
209
- "// CODE GENERATION": "",
210
- "gen:types": "tsx src/tools/generators/gen-types.ts",
211
- "gen:zod": "tsx src/tools/generators/gen-zod.ts",
212
- "gen:all": "npm run gen:types && npm run gen:zod",
213
- "gen:current:schema": "tsx src/tools/generators/merge-v$(node -p \"require('./.version.json').current\")-schema.ts",
214
- "// SYNC & COMPLIANCE": "",
215
- "sync:pr": "tsx src/cli/commands/github-sync.command.ts pr",
216
- "sync:batch": "tsx src/cli/commands/github-sync.command.ts batch",
217
- "sync:list": "tsx src/cli/commands/github-sync.command.ts list",
218
- "migrate:batch": "node dist/cli/index.js migrate-batch",
219
- "compliance:audit": "tsx src/tools/compliance-audit.ts",
220
- "verify:npm-auth": "tsx src/tools/verify-npm-auth.ts",
221
- "audit:mrs": "tsx src/tools/audit-mrs.ts",
222
- "// MAINTENANCE": "",
223
- "fix:schemas": "node src/tools/generators/fix-schema-formats.js",
224
- "hooks:install": "lefthook install",
225
- "hooks:uninstall": "lefthook uninstall",
226
- "prepare": "lefthook install || true",
227
- "postinstall": "node bin/postinstall || true",
228
- "// RELEASE & PUBLISH": "",
229
- "prepublishOnly": "publint && npm run test:unit && npm run build",
230
- "validate:deps": "depcheck --ignore-dirs=examples --ignores='@anthropic-ai/claude-agent-sdk,@langchain/openai,@openai/agents,@temporalio/activity,@temporalio/workflow,pino-pretty,readline,@types/*,ts-jest,eslint*,prettier*,lefthook,jest*,vitest,semantic-release*,@semantic-release/*,keep-a-changelog,jest-junit,publint,conventional-changelog-conventionalcommits,ajv-cli,json-schema-to-typescript,json-schema-to-zod,ts-node,@playwright/test,@langchain/anthropic,@langchain/core,langchain'",
231
- "validate:package": "publint",
232
- "publish:dry-run": "npm publish --dry-run",
233
- "release:check": "npm run typecheck && npm run test:unit && npm run validate:schema && publint",
234
- "release:semantic": "npx semantic-release",
235
- "release:semantic:dry": "npx semantic-release --dry-run"
236
- },
237
146
  "dependencies": {
238
147
  "@anthropic-ai/claude-agent-sdk": "^0.2.50",
239
148
  "@anthropic-ai/sdk": "^0.71.0",
@@ -245,10 +154,10 @@
245
154
  "@langchain/anthropic": "^0.3.10",
246
155
  "@langchain/core": "^0.3.29",
247
156
  "@langchain/openai": "^0.3.17",
248
- "@modelcontextprotocol/sdk": "^0.6.0",
157
+ "@modelcontextprotocol/sdk": "^1.27.1",
249
158
  "@noble/ed25519": "^2.3.0",
250
159
  "@octokit/rest": "^20.0.0",
251
- "@openai/agents": "^0.4.6",
160
+ "@openai/agents": "^0.7.1",
252
161
  "@opentelemetry/api": "^1.9.0",
253
162
  "@opentelemetry/exporter-jaeger": "^1.28.0",
254
163
  "@opentelemetry/exporter-logs-otlp-http": "^0.211.0",
@@ -261,7 +170,7 @@
261
170
  "@opentelemetry/sdk-metrics": "^2.5.0",
262
171
  "@opentelemetry/sdk-node": "^0.54.0",
263
172
  "@opentelemetry/sdk-trace-base": "^1.28.0",
264
- "@qdrant/js-client-rest": "^1.9.0",
173
+ "@qdrant/js-client-rest": "^1.17.0",
265
174
  "@temporalio/activity": "^1.11.3",
266
175
  "@temporalio/workflow": "^1.11.3",
267
176
  "@types/tar": "^6.1.13",
@@ -294,7 +203,7 @@
294
203
  "readline": "^1.3.0",
295
204
  "reflect-metadata": "^0.2.2",
296
205
  "semver": "^7.7.3",
297
- "tar": "^7.5.3",
206
+ "tar": "^7.5.11",
298
207
  "uuid": "^11.0.5",
299
208
  "web-did-resolver": "^2.0.32",
300
209
  "ws": "^8.19.0",
@@ -302,7 +211,7 @@
302
211
  "zod": "^4.1.11"
303
212
  },
304
213
  "devDependencies": {
305
- "@bluefly/duadp": "^0.1.3",
214
+ "@bluefly/duadp": "^0.1.4",
306
215
  "@jest/globals": "^29.7.0",
307
216
  "@octokit/rest": "^22.0.1",
308
217
  "@semantic-release/changelog": "^6.0.3",
@@ -344,7 +253,7 @@
344
253
  "vitest": "^2.1.8"
345
254
  },
346
255
  "optionalDependencies": {
347
- "nodemailer": "^6.9.0"
256
+ "nodemailer": "^8.0.2"
348
257
  },
349
258
  "engines": {
350
259
  "node": ">=20.0.0",
@@ -353,5 +262,107 @@
353
262
  "volta": {
354
263
  "node": "22.19.0",
355
264
  "npm": "11.10.0"
265
+ },
266
+ "overrides": {
267
+ "@hono/node-server": "^1.19.10",
268
+ "express-rate-limit": "^8.2.2",
269
+ "hono": "^4.12.7",
270
+ "langsmith": "^0.4.6",
271
+ "fast-xml-parser": "^5.3.8",
272
+ "@langchain/anthropic": {
273
+ "fast-xml-parser": "^4.5.4"
274
+ }
275
+ },
276
+ "scripts": {
277
+ "// ─────────────────────────────────────────────────────────────────────────────": "",
278
+ "// BUILD & DEVELOPMENT": "",
279
+ "mcp": "node dist/mcp-server/index.js",
280
+ "prebuild": "npm run docs:process",
281
+ "build": "tsc && npm run build:assets",
282
+ "build:assets": "cp -r spec dist/ && cp package.json .version.json dist/",
283
+ "build:clean": "npm run clean && npm run build",
284
+ "dev": "tsc --watch",
285
+ "clean": "node -e \"const fs=require('node:fs'); ['dist','coverage','.tsbuildinfo'].forEach((p)=>fs.rmSync(p,{recursive:true,force:true}))\"",
286
+ "// TESTING": "",
287
+ "pretest": "npm run build",
288
+ "test": "jest",
289
+ "test:unit": "jest tests/unit --forceExit",
290
+ "test:integration": "jest tests/integration",
291
+ "test:e2e": "jest tests/e2e --passWithNoTests",
292
+ "test:smoke": "jest tests/e2e --testPathPattern=smoke.spec.ts --runInBand --forceExit",
293
+ "test:smoke:cli": "jest tests/e2e/cli.smoke.spec.ts",
294
+ "test:smoke:npm-pack": "jest tests/e2e/npm-pack.smoke.spec.ts",
295
+ "test:smoke:schema": "jest tests/e2e/schema-coverage.smoke.spec.ts",
296
+ "test:coverage": "jest --coverage",
297
+ "test:mutation": "stryker run",
298
+ "test:mutation:ci": "stryker run --logLevel error",
299
+ "test:watch": "jest --watch",
300
+ "test:ci": "jest --ci --coverage --reporters=default --reporters=jest-junit",
301
+ "test:mcp": "vitest run src/mcp-server/__tests__/mcp-server.spec.ts",
302
+ "test:mcp:watch": "vitest watch src/mcp-server/__tests__/mcp-server.spec.ts",
303
+ "ci:validate": "npm run build:clean && npm run quality && npm run test:unit && npm run test:smoke && npm run validate:all",
304
+ "ci:validate:fast": "npm run typecheck && npm run test:unit && npm run validate:schema",
305
+ "// CODE QUALITY": "",
306
+ "typecheck": "tsc --noEmit",
307
+ "lint": "eslint src tests --ext .ts",
308
+ "lint:fix": "eslint src tests --ext .ts --fix",
309
+ "format": "prettier --write 'src/**/*.ts' 'tests/**/*.ts'",
310
+ "format:check": "prettier --check 'src/**/*.ts' 'tests/**/*.ts'",
311
+ "quality": "npm run typecheck && npm run format:check",
312
+ "quality:fix": "npm run format",
313
+ "// VALIDATION": "",
314
+ "validate": "npm run validate:no-symlinks && npm run validate:schema && npm run validate:openapi && npm run validate:examples",
315
+ "validate:all": "npm run validate && npm run validate:sdks",
316
+ "validate:sdks": "npm run validate:sdk:typescript && npm run validate:sdk:python",
317
+ "validate:sdk:typescript": "cd src/sdks/typescript && npm install && npm run build && npm run typecheck",
318
+ "validate:sdk:python": "cd src/sdks/python && python -m pip install --quiet -e . && python -m pytest tests/ -v || true",
319
+ "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",
320
+ "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",
321
+ "validate:examples": "tsx src/tools/validation/validate-examples.ts",
322
+ "validate:versions": "tsx src/tools/validate-versions.ts",
323
+ "fix:versions": "tsx src/tools/fix-versions.ts",
324
+ "validate:power": "tsx src/tools/validation/validate-ossa.ts",
325
+ "validate:openapi": "spectral lint openapi/**/*.yaml --ruleset .spectral.yml 2>/dev/null || spectral lint openapi/**/*.yaml",
326
+ "validate:openapi:ossa": "tsx src/tools/validation/validate-openapi-extensions.ts",
327
+ "validate:no-symlinks": "tsx src/tools/validate-no-symlinks.ts",
328
+ "// VERSION MANAGEMENT (via ossa-dev CLI - single source of truth)": "",
329
+ "version:release": "tsx src/dev-cli/src/index.ts version release",
330
+ "version:validate": "tsx src/dev-cli/src/index.ts version validate",
331
+ "version:sync": "tsx src/dev-cli/src/index.ts version sync",
332
+ "version:detect": "tsx src/dev-cli/src/index.ts version detect",
333
+ "version:audit": "tsx src/dev-cli/src/index.ts version audit",
334
+ "// INFRASTRUCTURE (deploy tooling out of scope for OSSA)": "",
335
+ "env:list": "tsx src/dev-cli/src/index.ts env-cleanup --list",
336
+ "env:cleanup": "tsx src/dev-cli/src/index.ts env-cleanup --stop-stuck",
337
+ "// DOCUMENTATION": "",
338
+ "wiki:publish": "node .gitlab/wiki-publish.cjs",
339
+ "docs:process": "tsx src/tools/docs/process-doc-templates.ts",
340
+ "docs:check": "test -f README.md && test -f CHANGELOG.md",
341
+ "docs:generate": "tsx src/tools/docs/generate-api-docs.ts && tsx src/tools/docs/generate-cli-docs.ts && tsx src/tools/docs/generate-schema-docs.ts && tsx src/tools/docs/generate-examples-docs.ts && tsx src/tools/generators/generate-agents-catalog.ts && tsx src/tools/docs/generate-types-docs.ts && tsx src/tools/docs/generate-errors-docs.ts && tsx src/tools/docs/generate-config-docs.ts && tsx src/tools/docs/lowercase-docs.ts",
342
+ "// CODE GENERATION": "",
343
+ "gen:types": "tsx src/tools/generators/gen-types.ts",
344
+ "gen:zod": "tsx src/tools/generators/gen-zod.ts",
345
+ "gen:all": "npm run gen:types && npm run gen:zod",
346
+ "gen:current:schema": "tsx src/tools/generators/merge-v$(node -p \"require('./.version.json').current\")-schema.ts",
347
+ "// SYNC & COMPLIANCE": "",
348
+ "sync:pr": "tsx src/cli/commands/github-sync.command.ts pr",
349
+ "sync:batch": "tsx src/cli/commands/github-sync.command.ts batch",
350
+ "sync:list": "tsx src/cli/commands/github-sync.command.ts list",
351
+ "migrate:batch": "node dist/cli/index.js migrate-batch",
352
+ "compliance:audit": "tsx src/tools/compliance-audit.ts",
353
+ "verify:npm-auth": "tsx src/tools/verify-npm-auth.ts",
354
+ "audit:mrs": "tsx src/tools/audit-mrs.ts",
355
+ "// MAINTENANCE": "",
356
+ "fix:schemas": "node src/tools/generators/fix-schema-formats.js",
357
+ "hooks:install": "lefthook install",
358
+ "hooks:uninstall": "lefthook uninstall",
359
+ "postinstall": "node bin/postinstall || true",
360
+ "// RELEASE & PUBLISH": "",
361
+ "validate:deps": "depcheck --ignore-dirs=examples --ignores='@anthropic-ai/claude-agent-sdk,@langchain/openai,@openai/agents,@temporalio/activity,@temporalio/workflow,pino-pretty,readline,@types/*,ts-jest,eslint*,prettier*,lefthook,jest*,vitest,semantic-release*,@semantic-release/*,keep-a-changelog,jest-junit,publint,conventional-changelog-conventionalcommits,ajv-cli,json-schema-to-typescript,json-schema-to-zod,ts-node,@playwright/test,@langchain/anthropic,@langchain/core,langchain'",
362
+ "validate:package": "publint",
363
+ "publish:dry-run": "npm publish --dry-run",
364
+ "release:check": "npm run typecheck && npm run test:unit && npm run validate:schema && publint",
365
+ "release:semantic": "npx semantic-release",
366
+ "release:semantic:dry": "npx semantic-release --dry-run"
356
367
  }
357
- }
368
+ }
@@ -0,0 +1,188 @@
1
+ # OSSA Role Manifest Extension
2
+
3
+ **Version:** 0.5.0
4
+ **Status:** Draft
5
+ **Last Updated:** 2026-03-13
6
+
7
+ ## Overview
8
+
9
+ This extension introduces `kind: Role` as a new OSSA manifest type. Roles define **behavioral overlays** for IDE and CLI agents (Claude Code, Cursor, Codex CLI, etc.) — configuring instructions, tool access, hooks, MCP server connections, and activation conditions.
10
+
11
+ ### Role vs Agent
12
+
13
+ | Aspect | `kind: Agent` | `kind: Role` |
14
+ |--------|--------------|--------------|
15
+ | **Purpose** | Autonomous agentic loop | Operator context overlay |
16
+ | **Execution** | Runs independently | Applied to an existing agent session |
17
+ | **Lifecycle** | Deployed, scaled, monitored | Activated, composed, switched |
18
+ | **Identity** | Has its own agent ID | Inherits the host agent's identity |
19
+ | **Example** | A code review bot | "Drupal developer" context for Claude Code |
20
+
21
+ Roles answer the question: *"What context, rules, and tools should an AI coding assistant have when working in this domain?"*
22
+
23
+ ## Manifest Structure
24
+
25
+ ```yaml
26
+ apiVersion: ossa/v0.5
27
+ kind: Role
28
+ metadata:
29
+ name: <role-name> # Required: DNS-style identifier
30
+ version: <semver> # Recommended: e.g. 1.0.0
31
+ description: <string> # Human-readable summary
32
+ labels: # Optional: key-value pairs for filtering
33
+ platform: claude-code
34
+ domain: drupal
35
+ annotations: # Optional: non-identifying metadata
36
+ org: example-corp
37
+ spec:
38
+ role: <string> # System prompt / persona definition
39
+ instructions: # Behavioral instructions
40
+ preamble: <markdown> # Prepended to every conversation
41
+ constraints: # Hard rules (MUST/MUST NOT)
42
+ - <string>
43
+ tools: # Tool access configuration
44
+ allowed: [<string>] # Allowed tool names
45
+ denied: [<string>] # Denied tool names (overrides allowed)
46
+ skills: [<string>] # OSSA skill references
47
+ hooks: # Lifecycle hooks
48
+ on_activate: <string> # Run when role is activated
49
+ on_deactivate: <string> # Run when role is deactivated
50
+ pre_commit: <string> # Run before git commits
51
+ post_save: <string> # Run after file saves
52
+ context: # Context injection
53
+ schemas: [<path>] # JSON/OpenAPI schemas to load
54
+ files: # Files to include in context
55
+ - path: <glob>
56
+ description: <string>
57
+ knowledge: [<path>] # Knowledge base files (markdown, text)
58
+ protocols: # Protocol connections
59
+ mcp: # Model Context Protocol
60
+ servers:
61
+ - name: <string>
62
+ transport: stdio | sse
63
+ command: <string> # For stdio transport
64
+ args: [<string>]
65
+ url: <string> # For SSE transport
66
+ extends: # Role composition
67
+ - role: <role-name> # Inherit from another role
68
+ override: true | false # Whether to override conflicts (default: false)
69
+ activation: # When this role should activate
70
+ file_patterns: [<glob>] # Activate when matching files are open
71
+ command: <string> # CLI command to activate (e.g. "/role drupal")
72
+ env: # Environment variable conditions
73
+ <key>: <value>
74
+ ```
75
+
76
+ ## Field Reference
77
+
78
+ ### `spec.role`
79
+
80
+ A string defining the agent's persona when this role is active. This is the system-level identity statement.
81
+
82
+ ```yaml
83
+ spec:
84
+ role: |
85
+ You are a Drupal module developer following Drupal coding standards.
86
+ You write PHP 8.2+ code with strict typing and dependency injection.
87
+ ```
88
+
89
+ ### `spec.instructions`
90
+
91
+ Structured behavioral instructions.
92
+
93
+ - **`preamble`**: Markdown content prepended to every conversation. Use for rules, conventions, and domain knowledge that should always be present.
94
+ - **`constraints`**: An array of hard rules. Each constraint is a MUST or MUST NOT statement that the agent should never violate.
95
+
96
+ ### `spec.tools`
97
+
98
+ Controls which tools the agent can use within this role.
99
+
100
+ - **`allowed`**: Whitelist of tool names. If specified, only these tools are available.
101
+ - **`denied`**: Blacklist of tool names. Takes precedence over `allowed`.
102
+ - **`skills`**: References to OSSA `kind: Skill` manifests that should be loaded.
103
+
104
+ ### `spec.hooks`
105
+
106
+ Lifecycle hooks executed at specific points. Values are command strings or script references.
107
+
108
+ - **`on_activate`**: Runs when the role is first activated in a session.
109
+ - **`on_deactivate`**: Runs when switching away from this role.
110
+ - **`pre_commit`**: Runs before git commit operations.
111
+ - **`post_save`**: Runs after file save operations.
112
+
113
+ ### `spec.context`
114
+
115
+ Injects additional context into the agent's working memory.
116
+
117
+ - **`schemas`**: Paths to JSON Schema or OpenAPI specification files. The agent can reference these for type-correct code generation.
118
+ - **`files`**: Specific files or globs to include in the agent's context window.
119
+ - **`knowledge`**: Paths to knowledge base documents (markdown, text) that provide domain reference material.
120
+
121
+ ### `spec.protocols.mcp`
122
+
123
+ MCP server connections available when this role is active.
124
+
125
+ Each server entry requires:
126
+ - **`name`**: Identifier for the MCP server.
127
+ - **`transport`**: Either `stdio` (local process) or `sse` (HTTP Server-Sent Events).
128
+ - **`command`** + **`args`**: For `stdio` transport, the command to spawn.
129
+ - **`url`**: For `sse` transport, the endpoint URL.
130
+
131
+ ### `spec.extends`
132
+
133
+ Enables role composition by inheriting from other roles.
134
+
135
+ - **`role`**: Name of the parent role to inherit from.
136
+ - **`override`**: If `true`, child fields replace parent fields. If `false` (default), child fields merge with parent fields (arrays are concatenated, objects are deep-merged).
137
+
138
+ ### `spec.activation`
139
+
140
+ Defines conditions under which this role should automatically activate.
141
+
142
+ - **`file_patterns`**: Glob patterns matched against open files. If any file matches, the role activates.
143
+ - **`command`**: A slash command (e.g., `/role drupal`) that activates the role.
144
+ - **`env`**: Environment variable conditions. All specified variables must match for activation.
145
+
146
+ ## Composition Rules
147
+
148
+ When a role extends another:
149
+
150
+ 1. **`spec.role`**: Child replaces parent (no merge).
151
+ 2. **`spec.instructions.preamble`**: Child is appended after parent.
152
+ 3. **`spec.instructions.constraints`**: Arrays are concatenated (all constraints apply).
153
+ 4. **`spec.tools.allowed`**: Intersection of parent and child (child cannot grant tools the parent denies).
154
+ 5. **`spec.tools.denied`**: Union of parent and child (denials accumulate).
155
+ 6. **`spec.tools.skills`**: Arrays are concatenated.
156
+ 7. **`spec.hooks`**: Child hooks replace parent hooks for the same lifecycle event.
157
+ 8. **`spec.context`**: All context entries are merged (files, schemas, knowledge concatenated).
158
+ 9. **`spec.protocols.mcp.servers`**: Arrays are concatenated (all servers available).
159
+ 10. **`spec.activation`**: Child activation conditions replace parent.
160
+
161
+ ## Relationship to Other OSSA Kinds
162
+
163
+ | Kind | Relationship to Role |
164
+ |------|---------------------|
165
+ | `Agent` | Roles are applied to agents. An agent can have multiple roles. |
166
+ | `Skill` | Roles reference skills via `spec.tools.skills`. Skills provide capabilities; roles provide context. |
167
+ | `Task` | Roles may influence how tasks are executed by setting constraints and tool access. |
168
+ | `Workflow` | Roles can be assigned per workflow step to change agent behavior. |
169
+
170
+ ## Platform Mapping
171
+
172
+ Roles map naturally to platform-specific configuration:
173
+
174
+ | Role Field | Claude Code | Cursor | Codex CLI |
175
+ |-----------|-------------|--------|-----------|
176
+ | `spec.role` | CLAUDE.md system prompt | .cursorrules | instructions |
177
+ | `spec.instructions.preamble` | CLAUDE.md content | .cursorrules content | --instructions |
178
+ | `spec.tools.allowed` | Tool permissions | Tool config | --tools |
179
+ | `spec.protocols.mcp` | .mcp.json servers | MCP config | MCP servers |
180
+ | `spec.activation.file_patterns` | Glob triggers | File associations | --pattern |
181
+
182
+ ## Examples
183
+
184
+ See `examples/roles/` for complete role manifests:
185
+
186
+ - `drupal-developer.role.yaml` — Drupal module development
187
+ - `security-auditor.role.yaml` — Security audit and compliance review
188
+ - `platform-operator.role.yaml` — Full-stack platform operations with composition
@@ -187,7 +187,7 @@ spec:
187
187
  - "-y"
188
188
  - "@modelcontextprotocol/server-postgres"
189
189
  env:
190
- DATABASE_URL: "postgresql://user:pass@localhost:5432/db"
190
+ DATABASE_URL: "postgresql://user:${POSTGRES_PASSWORD}@localhost:5432/db"
191
191
  capabilities:
192
192
  tools:
193
193
  listChanged: false
@@ -25,11 +25,12 @@
25
25
  "type": "string",
26
26
  "enum": [
27
27
  "Agent",
28
+ "Role",
28
29
  "Task",
29
30
  "Workflow",
30
31
  "Flow"
31
32
  ],
32
- "description": "Resource type: Agent (agentic loops), Task (deterministic steps), Workflow (composition), or Flow (streaming)"
33
+ "description": "Resource type: Agent (agentic loops), Role (IDE operator overlay), Task (deterministic steps), Workflow (composition), or Flow (streaming)"
33
34
  },
34
35
  "metadata": {
35
36
  "$ref": "#/definitions/Metadata"
@@ -187,7 +187,7 @@ spec:
187
187
  - "-y"
188
188
  - "@modelcontextprotocol/server-postgres"
189
189
  env:
190
- DATABASE_URL: "postgresql://user:pass@localhost:5432/db"
190
+ DATABASE_URL: "postgresql://user:${POSTGRES_PASSWORD}@localhost:5432/db"
191
191
  capabilities:
192
192
  tools:
193
193
  listChanged: false