@bluefly/openstandardagents 0.3.1 → 0.3.2

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 (338) hide show
  1. package/.devfile.yaml +87 -0
  2. package/.gitlab-ci-trigger +1 -0
  3. package/.wiki-config.json +24 -0
  4. package/CHANGELOG.md +212 -1
  5. package/README.md +31 -56
  6. package/dist/adapters/anthropic/runtime.js +2 -2
  7. package/dist/adapters/anthropic/runtime.js.map +1 -1
  8. package/dist/bot/architecture-validator-bot.d.ts +8 -0
  9. package/dist/bot/architecture-validator-bot.d.ts.map +1 -0
  10. package/dist/bot/architecture-validator-bot.js +15 -0
  11. package/dist/bot/architecture-validator-bot.js.map +1 -0
  12. package/dist/bot/ci-pipeline-bot.d.ts +7 -0
  13. package/dist/bot/ci-pipeline-bot.d.ts.map +1 -0
  14. package/dist/bot/ci-pipeline-bot.js +7 -0
  15. package/dist/bot/ci-pipeline-bot.js.map +1 -0
  16. package/dist/bot/compliance-bot.d.ts +56 -0
  17. package/dist/bot/compliance-bot.d.ts.map +1 -0
  18. package/dist/bot/compliance-bot.js +203 -0
  19. package/dist/bot/compliance-bot.js.map +1 -0
  20. package/dist/bot/dependency-updater-bot.d.ts +9 -0
  21. package/dist/bot/dependency-updater-bot.d.ts.map +1 -0
  22. package/dist/bot/dependency-updater-bot.js +9 -0
  23. package/dist/bot/dependency-updater-bot.js.map +1 -0
  24. package/dist/bot/security-scanner-bot.d.ts +11 -0
  25. package/dist/bot/security-scanner-bot.d.ts.map +1 -0
  26. package/dist/bot/security-scanner-bot.js +21 -0
  27. package/dist/bot/security-scanner-bot.js.map +1 -0
  28. package/dist/cli/commands/agent-card.command.d.ts +11 -0
  29. package/dist/cli/commands/agent-card.command.d.ts.map +1 -0
  30. package/dist/cli/commands/agent-card.command.js +285 -0
  31. package/dist/cli/commands/agent-card.command.js.map +1 -0
  32. package/dist/cli/commands/agents.command.d.ts +11 -0
  33. package/dist/cli/commands/agents.command.d.ts.map +1 -0
  34. package/dist/cli/commands/agents.command.js +326 -0
  35. package/dist/cli/commands/agents.command.js.map +1 -0
  36. package/dist/cli/commands/generate.command.d.ts +13 -2
  37. package/dist/cli/commands/generate.command.d.ts.map +1 -1
  38. package/dist/cli/commands/generate.command.js +204 -29
  39. package/dist/cli/commands/generate.command.js.map +1 -1
  40. package/dist/cli/commands/registry.command.d.ts +14 -0
  41. package/dist/cli/commands/registry.command.d.ts.map +1 -0
  42. package/dist/cli/commands/registry.command.js +428 -0
  43. package/dist/cli/commands/registry.command.js.map +1 -0
  44. package/dist/cli/commands/workspace.command.d.ts +14 -0
  45. package/dist/cli/commands/workspace.command.d.ts.map +1 -0
  46. package/dist/cli/commands/workspace.command.js +467 -0
  47. package/dist/cli/commands/workspace.command.js.map +1 -0
  48. package/dist/cli/index.js +9 -0
  49. package/dist/cli/index.js.map +1 -1
  50. package/dist/di-container.d.ts.map +1 -1
  51. package/dist/di-container.js +20 -0
  52. package/dist/di-container.js.map +1 -1
  53. package/dist/services/codegen/codegen.service.d.ts +75 -0
  54. package/dist/services/codegen/codegen.service.d.ts.map +1 -0
  55. package/dist/services/codegen/codegen.service.js +136 -0
  56. package/dist/services/codegen/codegen.service.js.map +1 -0
  57. package/dist/services/codegen/generators/manifest.generator.d.ts +41 -0
  58. package/dist/services/codegen/generators/manifest.generator.d.ts.map +1 -0
  59. package/dist/services/codegen/generators/manifest.generator.js +178 -0
  60. package/dist/services/codegen/generators/manifest.generator.js.map +1 -0
  61. package/dist/services/codegen/generators/openapi.generator.d.ts +46 -0
  62. package/dist/services/codegen/generators/openapi.generator.d.ts.map +1 -0
  63. package/dist/services/codegen/generators/openapi.generator.js +157 -0
  64. package/dist/services/codegen/generators/openapi.generator.js.map +1 -0
  65. package/dist/services/codegen/generators/types.generator.d.ts +27 -0
  66. package/dist/services/codegen/generators/types.generator.d.ts.map +1 -0
  67. package/dist/services/codegen/generators/types.generator.js +97 -0
  68. package/dist/services/codegen/generators/types.generator.js.map +1 -0
  69. package/dist/services/codegen/generators/vscode.generator.d.ts +43 -0
  70. package/dist/services/codegen/generators/vscode.generator.d.ts.map +1 -0
  71. package/dist/services/codegen/generators/vscode.generator.js +163 -0
  72. package/dist/services/codegen/generators/vscode.generator.js.map +1 -0
  73. package/dist/services/codegen/generators/zod.generator.d.ts +31 -0
  74. package/dist/services/codegen/generators/zod.generator.d.ts.map +1 -0
  75. package/dist/services/codegen/generators/zod.generator.js +134 -0
  76. package/dist/services/codegen/generators/zod.generator.js.map +1 -0
  77. package/dist/services/codegen/index.d.ts +33 -0
  78. package/dist/services/codegen/index.d.ts.map +1 -0
  79. package/dist/services/codegen/index.js +36 -0
  80. package/dist/services/codegen/index.js.map +1 -0
  81. package/dist/spec/extensions/openapi/ossa-openapi-extensions.schema.json +804 -0
  82. package/dist/spec/v0.3.0/examples/drupal-content-writer.ossa.yaml +1 -1
  83. package/dist/spec/v0.3.0/examples/drupal-moderation-assistant.ossa.yaml +1 -1
  84. package/dist/spec/v0.3.0/examples/quick-wins/complete-agent-with-quick-wins.ossa.yaml +1 -1
  85. package/dist/spec/v0.3.0/runtime-bindings/anthropic.yaml +209 -0
  86. package/dist/spec/v0.3.1/examples/agent-with-identity.ossa.yaml +68 -0
  87. package/dist/spec/v0.3.1/examples/drupal-content-writer.ossa.yaml +1 -1
  88. package/dist/spec/v0.3.1/examples/drupal-moderation-assistant.ossa.yaml +1 -1
  89. package/dist/spec/v0.3.1/examples/multi-provider-identity.ossa.yaml +236 -0
  90. package/dist/spec/v0.3.1/examples/quick-wins/complete-agent-with-quick-wins.ossa.yaml +1 -1
  91. package/dist/spec/v0.3.1/extensions/agent-identity.yaml +594 -0
  92. package/dist/spec/v0.3.1/ossa-0.3.1.schema.json +300 -21
  93. package/dist/spec/v0.3.2/MIGRATION-v0.3.1-to-v0.3.2.md +293 -0
  94. package/dist/spec/v0.3.2/UNIFIED-SCHEMA.md +120 -0
  95. package/dist/spec/v0.3.2/access_tiers.yaml +375 -0
  96. package/dist/spec/v0.3.2/adapters/drupal.md +541 -0
  97. package/dist/spec/v0.3.2/adapters/symfony.md +659 -0
  98. package/dist/spec/v0.3.2/agent-test.schema.json +75 -0
  99. package/dist/spec/v0.3.2/examples/access-tiers/README.md +106 -0
  100. package/dist/spec/v0.3.2/examples/access-tiers/code-critic.ossa.yaml +119 -0
  101. package/dist/spec/v0.3.2/examples/access-tiers/compliance-governor.ossa.yaml +234 -0
  102. package/dist/spec/v0.3.2/examples/access-tiers/deployment-operator.ossa.yaml +201 -0
  103. package/dist/spec/v0.3.2/examples/access-tiers/doc-generator.ossa.yaml +117 -0
  104. package/dist/spec/v0.3.2/examples/access-tiers/security-scanner.ossa.yaml +133 -0
  105. package/dist/spec/v0.3.2/examples/agent-with-identity.ossa.yaml +68 -0
  106. package/dist/spec/v0.3.2/examples/drupal-content-writer.ossa.yaml +110 -0
  107. package/dist/spec/v0.3.2/examples/drupal-moderation-assistant.ossa.yaml +96 -0
  108. package/dist/spec/v0.3.2/examples/multi-provider-identity.ossa.yaml +236 -0
  109. package/dist/spec/v0.3.2/examples/quick-wins/complete-agent-with-quick-wins.ossa.yaml +144 -0
  110. package/dist/spec/v0.3.2/examples/tasks/data-transform.ossa.yaml +147 -0
  111. package/dist/spec/v0.3.2/examples/tasks/publish-content.ossa.yaml +125 -0
  112. package/dist/spec/v0.3.2/examples/workflows/content-publishing.ossa.yaml +190 -0
  113. package/dist/spec/v0.3.2/examples/workflows/deployment-pipeline.ossa.yaml +247 -0
  114. package/dist/spec/v0.3.2/extensions/agent-identity.yaml +594 -0
  115. package/dist/spec/v0.3.2/extensions/drupal.md +417 -0
  116. package/dist/spec/v0.3.2/infrastructure/service-ports.yaml +324 -0
  117. package/dist/spec/{v0.3.1/ossa-0.3.0.schema.json → v0.3.2/ossa-0.3.2.schema.json} +563 -34
  118. package/dist/spec/v0.3.2/protocols/delegation.yaml +239 -0
  119. package/dist/spec/v0.3.2/protocols/sse.md +494 -0
  120. package/dist/spec/v0.3.2/protocols/webrtc.md +600 -0
  121. package/dist/spec/v0.3.2/protocols/websocket.md +362 -0
  122. package/dist/spec/v0.3.2/runtime/RUNTIME.md +457 -0
  123. package/dist/spec/v0.3.2/runtime/memory-model.yaml +871 -0
  124. package/dist/spec/v0.3.2/runtime/runtime.yaml +926 -0
  125. package/dist/spec/v0.3.2/schemas/agent-unified.yaml +165 -0
  126. package/dist/spec/v0.3.2/schemas/capabilities.yaml +102 -0
  127. package/dist/spec/v0.3.2/schemas/functions.yaml +75 -0
  128. package/dist/spec/v0.3.2/schemas/messaging/channel.schema.json +245 -0
  129. package/dist/spec/v0.3.2/schemas/messaging/delivery-receipt.schema.json +192 -0
  130. package/dist/spec/v0.3.2/schemas/messaging/message.schema.json +205 -0
  131. package/dist/spec/v0.3.2/schemas/messaging/subscription.schema.json +214 -0
  132. package/dist/spec/v0.3.2/schemas/runtime.yaml +102 -0
  133. package/dist/spec/v0.3.2/schemas/taxonomy.yaml +533 -0
  134. package/dist/spec/v0.3.2/schemas/unified-llm.yaml +91 -0
  135. package/dist/spec/v0.3.2/taxonomy.yaml +363 -0
  136. package/dist/types/generated/ossa-0.3.2.types.d.ts +367 -0
  137. package/dist/types/generated/ossa-0.3.2.types.d.ts.map +1 -0
  138. package/dist/types/generated/ossa-0.3.2.types.js +10 -0
  139. package/dist/types/generated/ossa-0.3.2.types.js.map +1 -0
  140. package/dist/types/generated/ossa-0.3.2.zod.d.ts +36 -0
  141. package/dist/types/generated/ossa-0.3.2.zod.d.ts.map +1 -0
  142. package/dist/types/generated/ossa-0.3.2.zod.js +25 -0
  143. package/dist/types/generated/ossa-0.3.2.zod.js.map +1 -0
  144. package/examples/adapters/drupal-eca-mapping.yaml +1 -1
  145. package/examples/adapters/drupal-eca-task.yaml +1 -1
  146. package/examples/adapters/drupal-flowdrop-mapping.yaml +1 -1
  147. package/examples/adapters/drupal-maestro-mapping.yaml +1 -1
  148. package/examples/adapters/mistral-agent.yaml +1 -1
  149. package/examples/adapters/symfony-messenger-task.yaml +1 -1
  150. package/examples/adapters/symfony-messenger-workflow.yaml +1 -1
  151. package/examples/adk-integration/code-review-workflow.yml +1 -1
  152. package/examples/adk-integration/customer-support.yml +1 -1
  153. package/examples/adk-integration/data-pipeline.yml +1 -1
  154. package/examples/advanced/reasoning-agent.yaml +1 -1
  155. package/examples/advanced/workflows/hybrid-model-strategy.yaml +1 -1
  156. package/examples/agent-manifests/critics/critic-agent.yaml +1 -1
  157. package/examples/agent-manifests/governors/governor-agent.yaml +1 -1
  158. package/examples/agent-manifests/integrators/integrator-agent.yaml +1 -1
  159. package/examples/agent-manifests/judges/judge-agent.yaml +1 -1
  160. package/examples/agent-manifests/monitors/monitor-agent.yaml +1 -1
  161. package/examples/agent-manifests/orchestrators/orchestrator-agent.yaml +1 -1
  162. package/examples/agent-manifests/sample-compliant-agent.yaml +1 -1
  163. package/examples/agent-manifests/workers/worker-agent.yaml +1 -1
  164. package/examples/agents/architecture-healer-enterprise.yaml +1 -1
  165. package/examples/agents/dependency-healer-npm.yaml +1 -1
  166. package/examples/agents/spec-healer-openapi.yaml +1 -1
  167. package/examples/agents/wiki-healer-production.yaml +1 -1
  168. package/examples/agents-md/code-agent.ossa.json +36 -11
  169. package/examples/agents-md/monorepo-agent.ossa.yaml +1 -1
  170. package/examples/anthropic/claude-assistant.ossa.json +4 -4
  171. package/examples/autogen/multi-agent.ossa.json +2 -2
  172. package/examples/autonomous-evolution/self-evolving-agent.ossa.yaml +1 -1
  173. package/examples/claude-code/code-reviewer.ossa.yaml +1 -1
  174. package/examples/claude-code/ossa-validator.ossa.yaml +1 -1
  175. package/examples/common_npm/agent-router.ossa.yaml +1 -1
  176. package/examples/contracts/data-consumer.ossa.yaml +1 -1
  177. package/examples/contracts/data-producer-v2.ossa.yaml +1 -1
  178. package/examples/contracts/data-producer.ossa.yaml +1 -1
  179. package/examples/crewai/research-team.ossa.json +2 -2
  180. package/examples/cursor/code-review-agent.ossa.json +2 -2
  181. package/examples/drupal/ai_agents_ossa-module/.agents/example-agent/agent.ossa.yaml +1 -1
  182. package/examples/drupal/gitlab-ml-recommender.ossa.yaml +1 -1
  183. package/examples/extensions/agents-md-advanced.yml +1 -1
  184. package/examples/extensions/agents-md-basic.yml +1 -1
  185. package/examples/extensions/agents-md-sync.yml +1 -1
  186. package/examples/extensions/agents-md-v1.yml +1 -1
  187. package/examples/extensions/drupal-v1.yml +1 -1
  188. package/examples/extensions/encryption-multi-provider.yaml +4 -4
  189. package/examples/extensions/kagent-v1.yml +1 -1
  190. package/examples/extensions/knowledge-sources.yaml +1 -1
  191. package/examples/extensions/mcp-full-featured.yaml +1 -1
  192. package/examples/getting-started/01-minimal-agent.ossa.yaml +3 -3
  193. package/examples/getting-started/02-agent-with-tools.ossa.yaml +1 -1
  194. package/examples/getting-started/03-agent-with-safety.ossa.yaml +1 -1
  195. package/examples/getting-started/04-agent-with-messaging.ossa.yaml +2 -2
  196. package/examples/getting-started/05-workflow-composition.ossa.yaml +1 -1
  197. package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
  198. package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +4 -4
  199. package/examples/kagent/compliance-validator.ossa.yaml +1 -1
  200. package/examples/kagent/cost-optimizer.ossa.yaml +1 -1
  201. package/examples/kagent/documentation-agent.ossa.yaml +1 -1
  202. package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +1 -1
  203. package/examples/kagent/k8s-troubleshooter.ossa.yaml +1 -1
  204. package/examples/kagent/security-scanner.ossa.yaml +1 -1
  205. package/examples/langchain/chain-agent.ossa.json +2 -2
  206. package/examples/langflow/workflow-agent.ossa.json +2 -2
  207. package/examples/langgraph/state-machine-agent.ossa.json +2 -2
  208. package/examples/llamaindex/rag-agent.ossa.json +2 -2
  209. package/examples/messaging/dependency-healer.ossa.yaml +1 -1
  210. package/examples/messaging/incident-responder.ossa.yaml +1 -1
  211. package/examples/messaging/routing-rules.ossa.yaml +3 -3
  212. package/examples/messaging/security-scanner.ossa.yaml +1 -1
  213. package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
  214. package/examples/multi-agent/conditional-router.ossa.yaml +1 -1
  215. package/examples/multi-agent/parallel-execution.ossa.yaml +1 -1
  216. package/examples/multi-agent/sequential-pipeline.ossa.yaml +1 -1
  217. package/examples/observability/activity-stream-full.yaml +1 -1
  218. package/examples/openai/basic-agent.ossa.yaml +1 -1
  219. package/examples/openai/multi-tool-agent.ossa.json +2 -2
  220. package/examples/openai/swarm-agent.ossa.json +2 -2
  221. package/examples/production/document-analyzer-openai.yml +1 -1
  222. package/examples/quickstart/support-agent.ossa.yaml +1 -1
  223. package/examples/real-world/gitlab-cicd-optimizer.ossa.yaml +1 -1
  224. package/examples/real-world/rag-documentation-assistant.ossa.yaml +1 -1
  225. package/examples/runtime-adapters/bedrock-claude-example.ossa.yaml +1 -1
  226. package/examples/schema/reusable-components.yaml +1 -1
  227. package/examples/showcase/ci-pipeline.ossa.yaml +59 -0
  228. package/examples/showcase/code-assistant.ossa.yaml +118 -0
  229. package/examples/showcase/code-reviewer.ossa.yaml +61 -0
  230. package/examples/showcase/compliance-validator.ossa.yaml +62 -0
  231. package/examples/showcase/content-writer.ossa.yaml +67 -0
  232. package/examples/showcase/data-transformer.ossa.yaml +78 -0
  233. package/examples/showcase/doc-generator.ossa.yaml +68 -0
  234. package/examples/showcase/security-scanner.ossa.yaml +65 -0
  235. package/examples/showcase/test-generator.ossa.yaml +63 -0
  236. package/examples/showcase/workflow-orchestrator.ossa.yaml +129 -0
  237. package/examples/tasks/batch-email-sender.yaml +1 -1
  238. package/examples/tasks/data-transform.yaml +1 -1
  239. package/examples/tasks/publish-content.yaml +1 -1
  240. package/examples/templates/ossa-compliance.yaml +1 -1
  241. package/examples/unified/security-scanner.ossa.yaml +1 -1
  242. package/examples/vercel/edge-agent.ossa.json +2 -2
  243. package/examples/workflows/batch-email-campaign.yaml +1 -1
  244. package/examples/workflows/content-review-publish.yaml +1 -1
  245. package/examples/workflows/simple-etl.yaml +1 -1
  246. package/llms-ctx-full.txt +39 -0
  247. package/llms-ctx.txt +39 -0
  248. package/openapi/agent-communication.yaml +1 -1
  249. package/openapi/agent-crud.yaml +8 -8
  250. package/openapi/agent-discovery.yaml +2 -2
  251. package/openapi/agent-identity.yaml +8 -8
  252. package/openapi/cli-commands.openapi.yaml +231 -0
  253. package/openapi/core/ossa-core-api.openapi.yaml +1 -1
  254. package/openapi/core/ossa-registry-api.openapi.yaml +1 -1
  255. package/openapi/core/ossa-registry.openapi.yaml +1 -1
  256. package/openapi/core/unified-agent-gateway.openapi.yaml +1 -1
  257. package/openapi/github-sync.yaml +1 -1
  258. package/openapi/protocols/sse-streams.yaml +1 -1
  259. package/openapi/protocols/websocket-events.yaml +2 -2
  260. package/openapi/reference-implementations/aiflow-bridge-api.openapi.yaml +2 -2
  261. package/openapi/reference-implementations/compliance-agent-api.openapi.yaml +1 -1
  262. package/openapi/reference-implementations/crewai-agent-api.openapi.yaml +1 -1
  263. package/openapi/reference-implementations/critic-agent-api.openapi.yaml +2 -2
  264. package/openapi/reference-implementations/document-analyzer-api.openapi.yaml +2 -2
  265. package/openapi/reference-implementations/drupal-agent-api.openapi.yaml +1 -1
  266. package/openapi/reference-implementations/getting-started-hello-world-api.openapi.yaml +1 -1
  267. package/openapi/reference-implementations/gitlab-ml-recommender-api.openapi.yaml +2 -2
  268. package/openapi/reference-implementations/governor-agent-api.openapi.yaml +1 -1
  269. package/openapi/reference-implementations/helm-generator.openapi.yaml +1 -1
  270. package/openapi/reference-implementations/integrator-agent-api.openapi.yaml +1 -1
  271. package/openapi/reference-implementations/judge-agent-api.openapi.yaml +1 -1
  272. package/openapi/reference-implementations/k8s-troubleshooter-api.openapi.yaml +2 -2
  273. package/openapi/reference-implementations/langchain-agent-api.openapi.yaml +1 -1
  274. package/openapi/reference-implementations/monitor-agent-api.openapi.yaml +2 -2
  275. package/openapi/reference-implementations/orchestrator-agent-api.openapi.yaml +1 -1
  276. package/openapi/reference-implementations/quickstart-support-agent-api.openapi.yaml +2 -2
  277. package/openapi/reference-implementations/self-evolving-ecosystem.openapi.yaml +1 -1
  278. package/openapi/reference-implementations/worker-agent-api.openapi.yaml +2 -2
  279. package/openapi/reference-implementations/workflow-orchestrator-api.openapi.yaml +1 -1
  280. package/package.json +13 -3
  281. package/spec/extensions/openapi/ossa-openapi-extensions.schema.json +804 -0
  282. package/spec/v0.3.0/examples/drupal-content-writer.ossa.yaml +1 -1
  283. package/spec/v0.3.0/examples/drupal-moderation-assistant.ossa.yaml +1 -1
  284. package/spec/v0.3.0/examples/quick-wins/complete-agent-with-quick-wins.ossa.yaml +1 -1
  285. package/spec/v0.3.0/runtime-bindings/anthropic.yaml +209 -0
  286. package/spec/v0.3.1/examples/agent-with-identity.ossa.yaml +68 -0
  287. package/spec/v0.3.1/examples/drupal-content-writer.ossa.yaml +1 -1
  288. package/spec/v0.3.1/examples/drupal-moderation-assistant.ossa.yaml +1 -1
  289. package/spec/v0.3.1/examples/multi-provider-identity.ossa.yaml +236 -0
  290. package/spec/v0.3.1/examples/quick-wins/complete-agent-with-quick-wins.ossa.yaml +1 -1
  291. package/spec/v0.3.1/extensions/agent-identity.yaml +594 -0
  292. package/spec/v0.3.1/ossa-0.3.1.schema.json +300 -21
  293. package/spec/v0.3.2/MIGRATION-v0.3.1-to-v0.3.2.md +293 -0
  294. package/spec/v0.3.2/UNIFIED-SCHEMA.md +120 -0
  295. package/spec/v0.3.2/access_tiers.yaml +375 -0
  296. package/spec/v0.3.2/adapters/drupal.md +541 -0
  297. package/spec/v0.3.2/adapters/symfony.md +659 -0
  298. package/spec/v0.3.2/agent-test.schema.json +75 -0
  299. package/spec/v0.3.2/examples/access-tiers/README.md +106 -0
  300. package/spec/v0.3.2/examples/access-tiers/code-critic.ossa.yaml +119 -0
  301. package/spec/v0.3.2/examples/access-tiers/compliance-governor.ossa.yaml +234 -0
  302. package/spec/v0.3.2/examples/access-tiers/deployment-operator.ossa.yaml +201 -0
  303. package/spec/v0.3.2/examples/access-tiers/doc-generator.ossa.yaml +117 -0
  304. package/spec/v0.3.2/examples/access-tiers/security-scanner.ossa.yaml +133 -0
  305. package/spec/v0.3.2/examples/agent-with-identity.ossa.yaml +68 -0
  306. package/spec/v0.3.2/examples/drupal-content-writer.ossa.yaml +110 -0
  307. package/spec/v0.3.2/examples/drupal-moderation-assistant.ossa.yaml +96 -0
  308. package/spec/v0.3.2/examples/multi-provider-identity.ossa.yaml +236 -0
  309. package/spec/v0.3.2/examples/quick-wins/complete-agent-with-quick-wins.ossa.yaml +144 -0
  310. package/spec/v0.3.2/examples/tasks/data-transform.ossa.yaml +147 -0
  311. package/spec/v0.3.2/examples/tasks/publish-content.ossa.yaml +125 -0
  312. package/spec/v0.3.2/examples/workflows/content-publishing.ossa.yaml +190 -0
  313. package/spec/v0.3.2/examples/workflows/deployment-pipeline.ossa.yaml +247 -0
  314. package/spec/v0.3.2/extensions/agent-identity.yaml +594 -0
  315. package/spec/v0.3.2/extensions/drupal.md +417 -0
  316. package/spec/v0.3.2/infrastructure/service-ports.yaml +324 -0
  317. package/spec/{v0.3.1/ossa-0.3.0.schema.json → v0.3.2/ossa-0.3.2.schema.json} +563 -34
  318. package/spec/v0.3.2/protocols/delegation.yaml +239 -0
  319. package/spec/v0.3.2/protocols/sse.md +494 -0
  320. package/spec/v0.3.2/protocols/webrtc.md +600 -0
  321. package/spec/v0.3.2/protocols/websocket.md +362 -0
  322. package/spec/v0.3.2/runtime/RUNTIME.md +457 -0
  323. package/spec/v0.3.2/runtime/memory-model.yaml +871 -0
  324. package/spec/v0.3.2/runtime/runtime.yaml +926 -0
  325. package/spec/v0.3.2/schemas/agent-unified.yaml +165 -0
  326. package/spec/v0.3.2/schemas/capabilities.yaml +102 -0
  327. package/spec/v0.3.2/schemas/functions.yaml +75 -0
  328. package/spec/v0.3.2/schemas/messaging/channel.schema.json +245 -0
  329. package/spec/v0.3.2/schemas/messaging/delivery-receipt.schema.json +192 -0
  330. package/spec/v0.3.2/schemas/messaging/message.schema.json +205 -0
  331. package/spec/v0.3.2/schemas/messaging/subscription.schema.json +214 -0
  332. package/spec/v0.3.2/schemas/runtime.yaml +102 -0
  333. package/spec/v0.3.2/schemas/taxonomy.yaml +533 -0
  334. package/spec/v0.3.2/schemas/unified-llm.yaml +91 -0
  335. package/spec/v0.3.2/taxonomy.yaml +363 -0
  336. package/examples/common_npm/agent-router.v0.2.2.ossa.yaml +0 -60
  337. package/examples/drupal/gitlab-ml-recommender.v0.2.2.ossa.yaml +0 -68
  338. package/examples/kagent/k8s-troubleshooter-v1.v0.2.2.ossa.yaml +0 -106
@@ -0,0 +1,239 @@
1
+ # ============================================================================
2
+ # OSSA Cross-Tier Delegation Protocol (Reference)
3
+ # ============================================================================
4
+ # Defines how agents delegate tasks across access tiers while maintaining
5
+ # separation of duties and audit compliance.
6
+ #
7
+ # NOTE: This is a reference specification, not an OSSA manifest.
8
+ # It documents the delegation protocol for implementation guidance.
9
+ #
10
+ # @see https://openstandardagents.org/spec/v0.3.2/access-tiers
11
+ # ============================================================================
12
+
13
+ # Specification metadata
14
+ name: cross-tier-delegation
15
+ version: 1.0.0
16
+ description: "Protocol for delegating tasks between agents of different access tiers"
17
+
18
+ # Delegation Matrix
19
+ # =================
20
+ # Defines which tiers can delegate to which other tiers
21
+ # Key: source tier, Value: allowed target tiers
22
+
23
+ delegation_matrix:
24
+ tier_1_read:
25
+ can_delegate_to:
26
+ - tier_1_read # Peer delegation OK
27
+ cannot_delegate_to:
28
+ - tier_2_write_limited
29
+ - tier_3_write_elevated
30
+ - tier_4_policy
31
+ reason: "Read-only agents cannot initiate write operations"
32
+
33
+ tier_2_write_limited:
34
+ can_delegate_to:
35
+ - tier_1_read # Can request analysis
36
+ - tier_2_write_limited # Peer delegation OK
37
+ cannot_delegate_to:
38
+ - tier_3_write_elevated # Cannot escalate privileges
39
+ - tier_4_policy # Cannot influence policy
40
+ reason: "Limited write agents cannot escalate to elevated or policy tiers"
41
+
42
+ tier_3_write_elevated:
43
+ can_delegate_to:
44
+ - tier_1_read # Can request analysis
45
+ - tier_2_write_limited # Can request documentation
46
+ - tier_3_write_elevated # Peer delegation with approval
47
+ cannot_delegate_to:
48
+ - tier_4_policy # Executor/Governor separation
49
+ reason: "Operators cannot influence policy definitions"
50
+
51
+ tier_4_policy:
52
+ can_delegate_to:
53
+ - tier_1_read # Can request compliance audits
54
+ - tier_4_policy # Peer delegation for policy review
55
+ cannot_delegate_to:
56
+ - tier_2_write_limited # Governor/Executor separation
57
+ - tier_3_write_elevated # Governor/Executor separation
58
+ execution_only_via: "tier_3_write_elevated with approval chain"
59
+ reason: "Policy tier enforces separation - execution through operators only"
60
+
61
+ # Delegation Request Schema
62
+ delegation_request:
63
+ type: object
64
+ required:
65
+ - request_id
66
+ - source_agent
67
+ - target_agent
68
+ - task
69
+ - justification
70
+ properties:
71
+ request_id:
72
+ type: string
73
+ format: uuid
74
+ description: "Unique delegation request identifier"
75
+
76
+ source_agent:
77
+ type: object
78
+ required:
79
+ - agent_id
80
+ - tier
81
+ properties:
82
+ agent_id:
83
+ type: string
84
+ tier:
85
+ type: string
86
+ enum: [tier_1_read, tier_2_write_limited, tier_3_write_elevated, tier_4_policy]
87
+ session_id:
88
+ type: string
89
+
90
+ target_agent:
91
+ type: object
92
+ required:
93
+ - agent_id
94
+ - tier
95
+ properties:
96
+ agent_id:
97
+ type: string
98
+ tier:
99
+ type: string
100
+ capabilities_required:
101
+ type: array
102
+ items:
103
+ type: string
104
+
105
+ task:
106
+ type: object
107
+ required:
108
+ - type
109
+ - payload
110
+ properties:
111
+ type:
112
+ type: string
113
+ description: "Task type identifier"
114
+ payload:
115
+ type: object
116
+ description: "Task-specific payload"
117
+ timeout_seconds:
118
+ type: integer
119
+ default: 300
120
+ priority:
121
+ type: string
122
+ enum: [low, normal, high, critical]
123
+ default: normal
124
+
125
+ justification:
126
+ type: string
127
+ minLength: 10
128
+ description: "Reason for delegation (required for audit)"
129
+
130
+ context:
131
+ type: object
132
+ properties:
133
+ parent_request_id:
134
+ type: string
135
+ description: "Parent request if this is a sub-delegation"
136
+ trace_id:
137
+ type: string
138
+ description: "Distributed tracing ID"
139
+ workflow_id:
140
+ type: string
141
+ description: "Associated workflow if any"
142
+
143
+ # Delegation Response Schema
144
+ delegation_response:
145
+ type: object
146
+ required:
147
+ - request_id
148
+ - status
149
+ - timestamp
150
+ properties:
151
+ request_id:
152
+ type: string
153
+ format: uuid
154
+
155
+ status:
156
+ type: string
157
+ enum:
158
+ - accepted # Delegation accepted, processing
159
+ - completed # Task completed successfully
160
+ - rejected # Delegation denied (tier violation, etc.)
161
+ - failed # Task execution failed
162
+ - timeout # Task timed out
163
+ - cancelled # Delegation cancelled by source
164
+
165
+ error:
166
+ type: object
167
+ properties:
168
+ code:
169
+ type: string
170
+ enum:
171
+ - TIER_VIOLATION # Delegation matrix violation
172
+ - CAPABILITY_MISSING # Target lacks required capability
173
+ - APPROVAL_REQUIRED # Needs human approval
174
+ - APPROVAL_DENIED # Human rejected delegation
175
+ - TARGET_UNAVAILABLE # Target agent not available
176
+ - EXECUTION_ERROR # Task execution failed
177
+ - TIMEOUT # Task exceeded timeout
178
+ - RESOURCE_EXHAUSTED # Rate limit or quota exceeded
179
+ message:
180
+ type: string
181
+
182
+ # Approval Chains for Elevated Delegations
183
+ approval_chains:
184
+ standard:
185
+ description: "Standard approval for tier_3 operations"
186
+ approvers:
187
+ - role: team-lead
188
+ - role: security-reviewer
189
+ require: 1
190
+ timeout_hours: 4
191
+
192
+ elevated:
193
+ description: "Elevated approval for sensitive operations"
194
+ approvers:
195
+ - role: security-lead
196
+ - role: compliance-officer
197
+ - role: engineering-manager
198
+ require: 2
199
+ timeout_hours: 8
200
+ escalation:
201
+ after_hours: 2
202
+ to: [cto, ciso]
203
+
204
+ critical:
205
+ description: "Critical approval for production changes"
206
+ approvers:
207
+ - role: sre-lead
208
+ - role: security-lead
209
+ - role: release-manager
210
+ require: 2
211
+ timeout_hours: 24
212
+
213
+ # Audit Requirements by Tier Combination
214
+ audit_requirements:
215
+ tier_1_to_tier_1:
216
+ level: standard
217
+ retention_days: 30
218
+
219
+ tier_2_to_tier_1:
220
+ level: standard
221
+ retention_days: 30
222
+
223
+ tier_3_to_any:
224
+ level: detailed
225
+ retention_days: 90
226
+
227
+ tier_4_to_any:
228
+ level: comprehensive
229
+ retention_days: 365
230
+
231
+ # Rate Limiting
232
+ rate_limits:
233
+ per_source_agent:
234
+ requests_per_minute: 60
235
+ requests_per_hour: 1000
236
+
237
+ per_target_agent:
238
+ concurrent_delegations: 10
239
+ queue_depth: 50
@@ -0,0 +1,494 @@
1
+ # Server-Sent Events (SSE) Transport Protocol
2
+
3
+ ## Overview
4
+
5
+ Server-Sent Events (SSE) provides unidirectional server-to-client streaming over HTTP. This specification defines how OSSA agents use SSE for real-time event delivery, status updates, and streaming responses.
6
+
7
+ ## Connection Model
8
+
9
+ SSE is a **one-way protocol**: server sends events to client. For bidirectional communication, combine SSE (server→client) with HTTP POST (client→server).
10
+
11
+ ```
12
+ Client ─────POST───────> Server (Commands/Requests)
13
+ <────SSE Events── Server (Events/Responses)
14
+ ```
15
+
16
+ ## Connection Establishment
17
+
18
+ ### Client Connection
19
+
20
+ ```typescript
21
+ const eventSource = new EventSource('https://agent.example.com/events', {
22
+ withCredentials: true
23
+ });
24
+
25
+ eventSource.addEventListener('message', (event) => {
26
+ const data = JSON.parse(event.data);
27
+ console.log('Received:', data);
28
+ });
29
+
30
+ eventSource.addEventListener('error', (error) => {
31
+ console.error('Connection error:', error);
32
+ });
33
+ ```
34
+
35
+ ### Server Response Format
36
+
37
+ ```http
38
+ HTTP/1.1 200 OK
39
+ Content-Type: text/event-stream
40
+ Cache-Control: no-cache, no-store, must-revalidate
41
+ Connection: keep-alive
42
+ X-Accel-Buffering: no
43
+
44
+ data: {"type":"connected","timestamp":"2025-12-18T14:00:00Z"}
45
+
46
+ ```
47
+
48
+ ## Event Format
49
+
50
+ ### SSE Message Structure
51
+
52
+ ```
53
+ event: <event-type>
54
+ id: <message-id>
55
+ retry: <reconnect-time-ms>
56
+ data: <json-payload>
57
+
58
+ ```
59
+
60
+ ### OSSA Event Schema
61
+
62
+ ```typescript
63
+ interface SSEEvent {
64
+ type: 'message' | 'status' | 'capability_response' | 'error';
65
+ id: string; // Unique event ID
66
+ timestamp: string; // ISO 8601 timestamp
67
+ payload: unknown; // Event-specific data
68
+ metadata: {
69
+ agentId: string; // Source agent URI
70
+ streamId?: string; // For multi-stream scenarios
71
+ correlationId?: string; // Links to originating request
72
+ sequence?: number; // Event sequence number
73
+ final?: boolean; // Indicates last event in sequence
74
+ };
75
+ }
76
+ ```
77
+
78
+ ## Event Types
79
+
80
+ ### 1. Message Event
81
+
82
+ Standard event delivery:
83
+
84
+ ```
85
+ event: message
86
+ id: msg-123e4567-e89b-12d3-a456-426614174000
87
+ data: {
88
+ data: "type": "message",
89
+ data: "timestamp": "2025-12-18T14:00:00Z",
90
+ data: "payload": {
91
+ data: "channel": "content.published",
92
+ data: "data": {"contentId": "node-123", "status": "published"}
93
+ data: },
94
+ data: "metadata": {
95
+ data: "agentId": "agent://example.com/publisher",
96
+ data: "sequence": 42
97
+ data: }
98
+ data: }
99
+
100
+ ```
101
+
102
+ ### 2. Status Update
103
+
104
+ Agent health and status streams:
105
+
106
+ ```
107
+ event: status
108
+ id: status-456e7890-a12b-34c5-d678-901234567890
109
+ data: {
110
+ data: "type": "status",
111
+ data: "timestamp": "2025-12-18T14:00:00Z",
112
+ data: "payload": {
113
+ data: "status": "healthy",
114
+ data: "load": 0.45,
115
+ data: "uptime": 86400
116
+ data: },
117
+ data: "metadata": {
118
+ data: "agentId": "agent://example.com/worker-1"
119
+ data: }
120
+ data: }
121
+
122
+ ```
123
+
124
+ ### 3. Capability Response
125
+
126
+ Streaming response to capability invocation:
127
+
128
+ ```
129
+ event: capability_response
130
+ id: resp-789a0123-b45c-67d8-e901-234567890123
131
+ data: {
132
+ data: "type": "capability_response",
133
+ data: "timestamp": "2025-12-18T14:00:00Z",
134
+ data: "payload": {
135
+ data: "capability": "analyze_content",
136
+ data: "result": {"sentiment": "positive", "score": 0.85}
137
+ data: },
138
+ data: "metadata": {
139
+ data: "agentId": "agent://example.com/analyzer",
140
+ data: "correlationId": "req-789",
141
+ data: "final": true
142
+ data: }
143
+ data: }
144
+
145
+ ```
146
+
147
+ ### 4. Error Event
148
+
149
+ Error notifications:
150
+
151
+ ```
152
+ event: error
153
+ id: err-234f5678-g90h-12i3-j456-789012345678
154
+ data: {
155
+ data: "type": "error",
156
+ data: "timestamp": "2025-12-18T14:00:00Z",
157
+ data: "payload": {
158
+ data: "code": "PROCESSING_ERROR",
159
+ data: "message": "Failed to process request",
160
+ data: "retryable": true
161
+ data: },
162
+ data: "metadata": {
163
+ data: "agentId": "agent://example.com/agent",
164
+ data: "correlationId": "req-789"
165
+ data: }
166
+ data: }
167
+
168
+ ```
169
+
170
+ ## Authentication
171
+
172
+ ### Bearer Token
173
+
174
+ ```typescript
175
+ // Modern browsers
176
+ const eventSource = new EventSource('https://agent.example.com/events', {
177
+ withCredentials: true
178
+ });
179
+
180
+ // Server sets cookie or client sends Authorization header
181
+ // Note: EventSource doesn't support custom headers in browsers
182
+ // Use cookie-based auth or proxy
183
+ ```
184
+
185
+ ### Query Parameter Authentication
186
+
187
+ For environments without cookie support:
188
+
189
+ ```typescript
190
+ const token = await getAuthToken();
191
+ const eventSource = new EventSource(
192
+ `https://agent.example.com/events?token=${token}`
193
+ );
194
+ ```
195
+
196
+ ## Reconnection and Reliability
197
+
198
+ ### Automatic Reconnection
199
+
200
+ EventSource automatically reconnects with:
201
+
202
+ - Default retry: 3 seconds
203
+ - Server can customize via `retry` field
204
+
205
+ ```
206
+ retry: 5000
207
+ data: {"type":"message","payload":{...}}
208
+
209
+ ```
210
+
211
+ ### Last-Event-ID
212
+
213
+ Client sends last received event ID on reconnect:
214
+
215
+ ```http
216
+ GET /events HTTP/1.1
217
+ Host: agent.example.com
218
+ Last-Event-ID: msg-123e4567-e89b-12d3-a456-426614174000
219
+ ```
220
+
221
+ Server resumes from that event:
222
+
223
+ ```typescript
224
+ app.get('/events', (req, res) => {
225
+ const lastEventId = req.headers['last-event-id'];
226
+
227
+ // Replay events after lastEventId
228
+ if (lastEventId) {
229
+ const missedEvents = getEventsSince(lastEventId);
230
+ missedEvents.forEach(event => sendSSE(res, event));
231
+ }
232
+
233
+ // Continue with live events
234
+ streamLiveEvents(res);
235
+ });
236
+ ```
237
+
238
+ ## Streaming Patterns
239
+
240
+ ### 1. Event Stream
241
+
242
+ Continuous event delivery:
243
+
244
+ ```typescript
245
+ // Server
246
+ app.get('/events', (req, res) => {
247
+ res.setHeader('Content-Type', 'text/event-stream');
248
+ res.setHeader('Cache-Control', 'no-cache');
249
+ res.setHeader('Connection', 'keep-alive');
250
+
251
+ const sendEvent = (event: SSEEvent) => {
252
+ res.write(`event: ${event.type}\n`);
253
+ res.write(`id: ${event.id}\n`);
254
+ res.write(`data: ${JSON.stringify(event)}\n\n`);
255
+ };
256
+
257
+ // Subscribe to events
258
+ const subscription = eventBus.subscribe((event) => {
259
+ sendEvent(event);
260
+ });
261
+
262
+ req.on('close', () => {
263
+ subscription.unsubscribe();
264
+ });
265
+ });
266
+ ```
267
+
268
+ ### 2. Request-Response Streaming
269
+
270
+ Long-running capability execution:
271
+
272
+ ```typescript
273
+ // Client initiates capability call via POST
274
+ const response = await fetch('/capabilities/analyze', {
275
+ method: 'POST',
276
+ body: JSON.stringify({ contentId: 'node-123' })
277
+ });
278
+
279
+ const { streamId } = await response.json();
280
+
281
+ // Subscribe to result stream
282
+ const eventSource = new EventSource(`/events?stream=${streamId}`);
283
+
284
+ eventSource.addEventListener('capability_response', (event) => {
285
+ const data = JSON.parse(event.data);
286
+
287
+ if (data.metadata.final) {
288
+ eventSource.close();
289
+ console.log('Final result:', data.payload.result);
290
+ } else {
291
+ console.log('Progress:', data.payload);
292
+ }
293
+ });
294
+ ```
295
+
296
+ ### 3. Multiplexed Streams
297
+
298
+ Multiple logical streams over one SSE connection:
299
+
300
+ ```typescript
301
+ // Client subscribes to multiple channels
302
+ const eventSource = new EventSource(
303
+ '/events?channels=content.published,user.login,agent.status'
304
+ );
305
+
306
+ eventSource.addEventListener('message', (event) => {
307
+ const data = JSON.parse(event.data);
308
+
309
+ switch (data.payload.channel) {
310
+ case 'content.published':
311
+ handleContentPublished(data);
312
+ break;
313
+ case 'user.login':
314
+ handleUserLogin(data);
315
+ break;
316
+ case 'agent.status':
317
+ handleAgentStatus(data);
318
+ break;
319
+ }
320
+ });
321
+ ```
322
+
323
+ ## Heartbeat and Keepalive
324
+
325
+ Server SHOULD send periodic comments to prevent connection timeout:
326
+
327
+ ```
328
+ : heartbeat - 2025-12-18T14:00:00Z
329
+
330
+ data: {"type":"message","payload":{...}}
331
+
332
+ : heartbeat - 2025-12-18T14:01:00Z
333
+
334
+ ```
335
+
336
+ Recommended heartbeat interval: 30 seconds
337
+
338
+ ## Error Handling
339
+
340
+ ### Connection Errors
341
+
342
+ ```typescript
343
+ eventSource.addEventListener('error', (error) => {
344
+ if (eventSource.readyState === EventSource.CLOSED) {
345
+ console.log('Connection closed permanently');
346
+ // Implement custom reconnection logic if needed
347
+ } else {
348
+ console.log('Connection error, auto-reconnecting...');
349
+ }
350
+ });
351
+ ```
352
+
353
+ ### Event Processing Errors
354
+
355
+ ```typescript
356
+ eventSource.addEventListener('message', (event) => {
357
+ try {
358
+ const data = JSON.parse(event.data);
359
+ processEvent(data);
360
+ } catch (error) {
361
+ console.error('Failed to process event:', error);
362
+ // Log but don't close connection
363
+ }
364
+ });
365
+ ```
366
+
367
+ ## Performance Considerations
368
+
369
+ ### Buffering
370
+
371
+ Disable buffering for real-time delivery:
372
+
373
+ ```http
374
+ X-Accel-Buffering: no
375
+ ```
376
+
377
+ Nginx:
378
+
379
+ ```nginx
380
+ location /events {
381
+ proxy_pass http://backend;
382
+ proxy_buffering off;
383
+ proxy_cache off;
384
+ }
385
+ ```
386
+
387
+ ### Connection Limits
388
+
389
+ - Browser limit: 6 connections per domain
390
+ - Use single SSE connection per domain
391
+ - Multiplex channels over one connection
392
+
393
+ ### Memory Management
394
+
395
+ Server SHOULD:
396
+
397
+ 1. Limit event buffer size (e.g., last 100 events)
398
+ 2. Implement event expiry (e.g., 5 minutes)
399
+ 3. Track active connections and enforce limits
400
+
401
+ ## Security Considerations
402
+
403
+ 1. **HTTPS Required** - Always use HTTPS in production
404
+ 2. **CORS** - Configure proper CORS headers
405
+ 3. **Authentication** - Use cookie-based or query param auth
406
+ 4. **Rate Limiting** - Limit events per connection
407
+ 5. **Event Filtering** - Only send events user has permission to see
408
+
409
+ ```http
410
+ Access-Control-Allow-Origin: https://trusted-domain.com
411
+ Access-Control-Allow-Credentials: true
412
+ ```
413
+
414
+ ## Bidirectional Communication
415
+
416
+ Combine SSE with HTTP POST for bidirectional flow:
417
+
418
+ ```typescript
419
+ // Client sends command
420
+ const response = await fetch('/capabilities/process', {
421
+ method: 'POST',
422
+ body: JSON.stringify({ data: 'input' })
423
+ });
424
+
425
+ const { taskId } = await response.json();
426
+
427
+ // Server streams progress via SSE
428
+ const eventSource = new EventSource(`/events?task=${taskId}`);
429
+
430
+ eventSource.addEventListener('capability_response', (event) => {
431
+ const data = JSON.parse(event.data);
432
+ updateProgress(data.payload);
433
+
434
+ if (data.metadata.final) {
435
+ eventSource.close();
436
+ }
437
+ });
438
+ ```
439
+
440
+ ## Examples
441
+
442
+ ### Real-time Status Dashboard
443
+
444
+ ```typescript
445
+ // Server
446
+ app.get('/agent-status', (req, res) => {
447
+ res.setHeader('Content-Type', 'text/event-stream');
448
+ res.setHeader('Cache-Control', 'no-cache');
449
+ res.setHeader('Connection', 'keep-alive');
450
+
451
+ const interval = setInterval(() => {
452
+ const status = {
453
+ type: 'status',
454
+ id: uuid(),
455
+ timestamp: new Date().toISOString(),
456
+ payload: {
457
+ activeAgents: getActiveAgentCount(),
458
+ queueDepth: getQueueDepth(),
459
+ throughput: getThroughput()
460
+ },
461
+ metadata: {
462
+ agentId: 'agent://example.com/monitor'
463
+ }
464
+ };
465
+
466
+ res.write(`event: status\n`);
467
+ res.write(`id: ${status.id}\n`);
468
+ res.write(`data: ${JSON.stringify(status)}\n\n`);
469
+ }, 5000);
470
+
471
+ req.on('close', () => clearInterval(interval));
472
+ });
473
+
474
+ // Client
475
+ const eventSource = new EventSource('/agent-status');
476
+ eventSource.addEventListener('status', (event) => {
477
+ const status = JSON.parse(event.data);
478
+ updateDashboard(status.payload);
479
+ });
480
+ ```
481
+
482
+ ## Compatibility
483
+
484
+ - Protocol: SSE (HTML5 EventSource API)
485
+ - Content-Type: `text/event-stream`
486
+ - Character encoding: UTF-8
487
+ - Browser support: All modern browsers
488
+ - Fallback: Long-polling for older browsers
489
+
490
+ ## References
491
+
492
+ - [HTML5 Server-Sent Events](https://html.spec.whatwg.org/multipage/server-sent-events.html)
493
+ - [MDN EventSource API](https://developer.mozilla.org/en-US/docs/Web/API/EventSource)
494
+ - [OSSA Message Envelope Specification](../messaging.md)