@bluefly/openstandardagents 0.3.0 → 0.3.1

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 (87) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +58 -218
  3. package/dist/cli/commands/diff.command.d.ts +7 -0
  4. package/dist/cli/commands/diff.command.d.ts.map +1 -0
  5. package/dist/cli/commands/diff.command.js +181 -0
  6. package/dist/cli/commands/diff.command.js.map +1 -0
  7. package/dist/cli/commands/docs.command.d.ts +7 -0
  8. package/dist/cli/commands/docs.command.d.ts.map +1 -0
  9. package/dist/cli/commands/docs.command.js +274 -0
  10. package/dist/cli/commands/docs.command.js.map +1 -0
  11. package/dist/cli/commands/lint.command.d.ts +7 -0
  12. package/dist/cli/commands/lint.command.d.ts.map +1 -0
  13. package/dist/cli/commands/lint.command.js +342 -0
  14. package/dist/cli/commands/lint.command.js.map +1 -0
  15. package/dist/cli/commands/serve.command.d.ts +7 -0
  16. package/dist/cli/commands/serve.command.d.ts.map +1 -0
  17. package/dist/cli/commands/serve.command.js +232 -0
  18. package/dist/cli/commands/serve.command.js.map +1 -0
  19. package/dist/cli/index.js +4 -0
  20. package/dist/cli/index.js.map +1 -1
  21. package/dist/di-container.d.ts.map +1 -1
  22. package/dist/di-container.js +3 -0
  23. package/dist/di-container.js.map +1 -1
  24. package/dist/services/git.service.d.ts +40 -0
  25. package/dist/services/git.service.d.ts.map +1 -0
  26. package/dist/services/git.service.js +122 -0
  27. package/dist/services/git.service.js.map +1 -0
  28. package/dist/spec/v0.3.1/UNIFIED-SCHEMA.md +120 -0
  29. package/dist/spec/v0.3.1/adapters/drupal.md +541 -0
  30. package/dist/spec/v0.3.1/adapters/symfony.md +659 -0
  31. package/dist/spec/v0.3.1/agent-test.schema.json +75 -0
  32. package/dist/spec/v0.3.1/examples/drupal-content-writer.ossa.yaml +110 -0
  33. package/dist/spec/v0.3.1/examples/drupal-moderation-assistant.ossa.yaml +96 -0
  34. package/dist/spec/v0.3.1/examples/quick-wins/complete-agent-with-quick-wins.ossa.yaml +144 -0
  35. package/dist/spec/v0.3.1/extensions/drupal.md +417 -0
  36. package/dist/spec/v0.3.1/ossa-0.3.0.schema.json +2787 -0
  37. package/dist/spec/v0.3.1/ossa-0.3.1.schema.json +2806 -0
  38. package/dist/spec/v0.3.1/protocols/sse.md +494 -0
  39. package/dist/spec/v0.3.1/protocols/webrtc.md +600 -0
  40. package/dist/spec/v0.3.1/protocols/websocket.md +362 -0
  41. package/dist/spec/v0.3.1/schemas/agent-unified.yaml +165 -0
  42. package/dist/spec/v0.3.1/schemas/capabilities.yaml +102 -0
  43. package/dist/spec/v0.3.1/schemas/functions.yaml +75 -0
  44. package/dist/spec/v0.3.1/schemas/messaging/channel.schema.json +245 -0
  45. package/dist/spec/v0.3.1/schemas/messaging/delivery-receipt.schema.json +192 -0
  46. package/dist/spec/v0.3.1/schemas/messaging/message.schema.json +205 -0
  47. package/dist/spec/v0.3.1/schemas/messaging/subscription.schema.json +214 -0
  48. package/dist/spec/v0.3.1/schemas/runtime.yaml +102 -0
  49. package/dist/spec/v0.3.1/schemas/taxonomy.yaml +533 -0
  50. package/dist/spec/v0.3.1/schemas/unified-llm.yaml +91 -0
  51. package/dist/spec/v0.3.1/taxonomy.yaml +256 -0
  52. package/dist/testing/fixtures.d.ts.map +1 -1
  53. package/dist/testing/fixtures.js +3 -2
  54. package/dist/testing/fixtures.js.map +1 -1
  55. package/package.json +3 -31
  56. package/spec/v0.3.1/UNIFIED-SCHEMA.md +120 -0
  57. package/spec/v0.3.1/adapters/drupal.md +541 -0
  58. package/spec/v0.3.1/adapters/symfony.md +659 -0
  59. package/spec/v0.3.1/agent-test.schema.json +75 -0
  60. package/spec/v0.3.1/examples/drupal-content-writer.ossa.yaml +110 -0
  61. package/spec/v0.3.1/examples/drupal-moderation-assistant.ossa.yaml +96 -0
  62. package/spec/v0.3.1/examples/quick-wins/complete-agent-with-quick-wins.ossa.yaml +144 -0
  63. package/spec/v0.3.1/extensions/drupal.md +417 -0
  64. package/spec/v0.3.1/ossa-0.3.0.schema.json +2787 -0
  65. package/spec/v0.3.1/ossa-0.3.1.schema.json +2806 -0
  66. package/spec/v0.3.1/protocols/sse.md +494 -0
  67. package/spec/v0.3.1/protocols/webrtc.md +600 -0
  68. package/spec/v0.3.1/protocols/websocket.md +362 -0
  69. package/spec/v0.3.1/schemas/agent-unified.yaml +165 -0
  70. package/spec/v0.3.1/schemas/capabilities.yaml +102 -0
  71. package/spec/v0.3.1/schemas/functions.yaml +75 -0
  72. package/spec/v0.3.1/schemas/messaging/channel.schema.json +245 -0
  73. package/spec/v0.3.1/schemas/messaging/delivery-receipt.schema.json +192 -0
  74. package/spec/v0.3.1/schemas/messaging/message.schema.json +205 -0
  75. package/spec/v0.3.1/schemas/messaging/subscription.schema.json +214 -0
  76. package/spec/v0.3.1/schemas/runtime.yaml +102 -0
  77. package/spec/v0.3.1/schemas/taxonomy.yaml +533 -0
  78. package/spec/v0.3.1/schemas/unified-llm.yaml +91 -0
  79. package/spec/v0.3.1/taxonomy.yaml +256 -0
  80. package/dist/types/generated/ossa-0.3.0.types.d.ts +0 -316
  81. package/dist/types/generated/ossa-0.3.0.types.d.ts.map +0 -1
  82. package/dist/types/generated/ossa-0.3.0.types.js +0 -8
  83. package/dist/types/generated/ossa-0.3.0.types.js.map +0 -1
  84. package/dist/types/generated/ossa-0.3.0.zod.d.ts +0 -17
  85. package/dist/types/generated/ossa-0.3.0.zod.d.ts.map +0 -1
  86. package/dist/types/generated/ossa-0.3.0.zod.js +0 -3
  87. package/dist/types/generated/ossa-0.3.0.zod.js.map +0 -1
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://openstandardagents.org/schemas/v0.3.1/agent-test.json",
4
+ "title": "OSSA AgentTest Resource",
5
+ "description": "Test definition for OSSA agents - declarative testing framework for agent behavior, performance, and compliance validation",
6
+ "type": "object",
7
+ "required": [
8
+ "apiVersion",
9
+ "kind",
10
+ "metadata",
11
+ "spec"
12
+ ],
13
+ "properties": {
14
+ "apiVersion": {
15
+ "type": "string",
16
+ "const": "ossa/v0.3.1",
17
+ "description": "OSSA API version for AgentTest resources"
18
+ },
19
+ "kind": {
20
+ "type": "string",
21
+ "const": "AgentTest",
22
+ "description": "Resource type identifier"
23
+ },
24
+ "metadata": {
25
+ "$ref": "#/definitions/Metadata",
26
+ "description": "Test resource metadata including name, version, and labels"
27
+ },
28
+ "spec": {
29
+ "$ref": "#/definitions/TestSpec",
30
+ "description": "Test specification including target, scenarios, and configuration"
31
+ }
32
+ },
33
+ "definitions": {
34
+ "Metadata": {
35
+ "type": "object",
36
+ "required": [
37
+ "name"
38
+ ],
39
+ "properties": {
40
+ "name": {
41
+ "type": "string",
42
+ "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
43
+ "maxLength": 253,
44
+ "description": "Test suite identifier (DNS-1123 subdomain format)"
45
+ },
46
+ "version": {
47
+ "type": "string",
48
+ "pattern": "^(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)\\\\.(0|[1-9]\\\\d*)(?:-((?:0|[1-9]\\\\d*|\\\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\\\.(?:0|[1-9]\\\\d*|\\\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\\\+([0-9a-zA-Z-]+(?:\\\\.[0-9a-zA-Z-]+)*))?$",
49
+ "description": "Test suite version (semver 2.0.0)"
50
+ },
51
+ "description": {
52
+ "type": "string",
53
+ "maxLength": 2000,
54
+ "description": "Human-readable test suite description"
55
+ },
56
+ "labels": {
57
+ "type": "object",
58
+ "additionalProperties": {
59
+ "type": "string",
60
+ "maxLength": 63
61
+ },
62
+ "description": "Labels for test categorization (e.g., team, compliance-level, test-type)"
63
+ },
64
+ "annotations": {
65
+ "type": "object",
66
+ "additionalProperties": {
67
+ "type": "string"
68
+ },
69
+ "description": "Arbitrary metadata for tooling integration"
70
+ }
71
+ },
72
+ "additionalProperties": false
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,110 @@
1
+ apiVersion: ossa/v0.3.1
2
+ kind: Agent
3
+ metadata:
4
+ name: drupal-content-writer
5
+ version: 1.0.0
6
+ description: Autonomous content generation agent for Drupal with background processing
7
+
8
+ spec:
9
+ capabilities:
10
+ - name: content.create
11
+ description: "Create Drupal content entities (nodes, taxonomy terms)"
12
+ - name: seo.optimize
13
+ description: "Optimize content for SEO (meta tags, keywords, structure)"
14
+ - name: media.select
15
+ description: "Select relevant media from media library"
16
+
17
+ role: |
18
+ You are an autonomous content writer for a Drupal website. You generate high-quality articles
19
+ based on content briefs, optimize them for SEO, and select appropriate media assets.
20
+
21
+ Process:
22
+ 1. Analyze content brief and target audience
23
+ 2. Research topic using available tools
24
+ 3. Generate article with proper structure (H1, H2, paragraphs)
25
+ 4. Optimize for SEO (meta description, keywords, readability)
26
+ 5. Select relevant images from media library
27
+ 6. Create content entity in Drupal
28
+
29
+ llm:
30
+ provider: ${OSSA_LLM_PROVIDER:-anthropic}
31
+ model: ${OSSA_LLM_MODEL:-claude-sonnet-4}
32
+ temperature: ${OSSA_LLM_TEMPERATURE:-0.7}
33
+ maxTokens: ${OSSA_LLM_MAX_TOKENS:-8192}
34
+
35
+ tools:
36
+ - name: drupal.node.create
37
+ description: "Create a new Drupal node (article, page, etc.)"
38
+ handler:
39
+ runtime: drupal
40
+ capability: node.create
41
+
42
+ - name: drupal.taxonomy.search
43
+ description: "Search taxonomy terms for tagging"
44
+ handler:
45
+ runtime: drupal
46
+ capability: taxonomy.search
47
+
48
+ - name: drupal.media.search
49
+ description: "Search media library for images"
50
+ handler:
51
+ runtime: drupal
52
+ capability: media.search
53
+
54
+ extensions:
55
+ drupal:
56
+ # Module providing this agent
57
+ module: ai_agents_ossa
58
+
59
+ # Store as exportable config entity
60
+ config_entity: true
61
+
62
+ # Permissions for autonomous execution
63
+ permissions:
64
+ # Core Drupal entity permissions
65
+ entity_permissions:
66
+ - "create article content"
67
+ - "create page content"
68
+ - "edit own article content"
69
+ - "view media"
70
+ - "view taxonomy term"
71
+
72
+ # Custom permissions for agent execution
73
+ custom_permissions:
74
+ - "execute content writer agent"
75
+ - "generate ai content"
76
+
77
+ # Run as admin service account for autonomous operation
78
+ execution_user: "1"
79
+
80
+ # Agent runs with its own permissions (no user context)
81
+ permission_mode: agent_only
82
+
83
+ # Async processing via Symfony Messenger
84
+ messenger:
85
+ # Use Redis for high-performance message queue
86
+ transport: redis
87
+
88
+ # Dedicated queue for content generation
89
+ queue: content_generation
90
+
91
+ # Retry strategy for failed executions
92
+ retry_strategy:
93
+ max_retries: 3
94
+ delay: 2000
95
+ multiplier: 2
96
+ max_delay: 30000
97
+
98
+ # ECA workflow integration
99
+ workflow_engine: eca
100
+
101
+ # Discovery paths for manifest loading
102
+ discovery_paths:
103
+ - "config/agents/*.ossa.yaml"
104
+ - "modules/custom/ai_agents_ossa/agents/*.ossa.yaml"
105
+
106
+ # Drupal hooks for integration
107
+ hooks:
108
+ before_execute: ai_agents_ossa_content_writer_before
109
+ after_execute: ai_agents_ossa_content_writer_after
110
+ on_error: ai_agents_ossa_content_writer_error
@@ -0,0 +1,96 @@
1
+ apiVersion: ossa/v0.3.1
2
+ kind: Agent
3
+ metadata:
4
+ name: drupal-moderation-assistant
5
+ version: 1.0.0
6
+ description: Content moderation assistant that helps users review and publish content
7
+
8
+ spec:
9
+ capabilities:
10
+ - name: content.review
11
+ description: "Review content for quality, SEO, and compliance"
12
+ - name: moderation.suggest
13
+ description: "Suggest moderation workflow transitions"
14
+ - name: quality.score
15
+ description: "Score content quality based on criteria"
16
+
17
+ role: |
18
+ You are a content moderation assistant helping editors review and publish content.
19
+ You work within the user's permission context and respect Drupal's editorial workflow.
20
+
21
+ Responsibilities:
22
+ 1. Review content for quality, readability, and SEO
23
+ 2. Check content against style guide and compliance rules
24
+ 3. Suggest appropriate moderation state transitions
25
+ 4. Provide actionable feedback for improvement
26
+
27
+ You can only suggest transitions the user is authorized to perform.
28
+
29
+ llm:
30
+ provider: ${OSSA_LLM_PROVIDER:-anthropic}
31
+ model: ${OSSA_LLM_MODEL:-claude-sonnet-4}
32
+ temperature: ${OSSA_LLM_TEMPERATURE:-0.3}
33
+ maxTokens: ${OSSA_LLM_MAX_TOKENS:-4096}
34
+
35
+ tools:
36
+ - name: drupal.node.load
37
+ description: "Load a Drupal node for review"
38
+ handler:
39
+ runtime: drupal
40
+ capability: node.load
41
+
42
+ - name: drupal.moderation.transitions
43
+ description: "Get available moderation transitions for user"
44
+ handler:
45
+ runtime: drupal
46
+ capability: moderation.get_transitions
47
+
48
+ - name: drupal.moderation.apply
49
+ description: "Apply moderation state transition"
50
+ handler:
51
+ runtime: drupal
52
+ capability: moderation.apply_transition
53
+
54
+ extensions:
55
+ drupal:
56
+ # Module providing this agent
57
+ module: ai_agents_ossa
58
+
59
+ # Store as config entity for export
60
+ config_entity: true
61
+
62
+ # Permissions for user-context execution
63
+ permissions:
64
+ # Required entity permissions
65
+ entity_permissions:
66
+ - "view any article content"
67
+ - "edit any article content"
68
+ - "use editorial transition review"
69
+ - "use editorial transition publish"
70
+
71
+ # Custom agent permission
72
+ custom_permissions:
73
+ - "use moderation assistant"
74
+
75
+ # Run in user context (no service account)
76
+ # execution_user not specified - uses current user
77
+
78
+ # User must have ALL required permissions (intersection)
79
+ permission_mode: least_permissive
80
+
81
+ # Synchronous execution (no queue)
82
+ messenger:
83
+ transport: sync
84
+
85
+ # Integrated with ECA workflow builder
86
+ workflow_engine: eca
87
+
88
+ # Discovery from module
89
+ discovery_paths:
90
+ - "modules/custom/ai_agents_ossa/agents/*.ossa.yaml"
91
+
92
+ # Hooks for tracking and logging
93
+ hooks:
94
+ before_execute: ai_agents_ossa_log_execution
95
+ after_execute: ai_agents_ossa_track_moderation
96
+ on_error: ai_agents_ossa_alert_admin
@@ -0,0 +1,144 @@
1
+ apiVersion: ossa/v0.3.1
2
+ kind: Agent
3
+ metadata:
4
+ name: example-agent-quick-wins
5
+ namespace: production
6
+ labels:
7
+ app: example
8
+ version: v1.0.0
9
+ spec:
10
+ role: "Example agent demonstrating all quick-win capabilities"
11
+
12
+ # 1. Health Monitoring Configuration
13
+ health:
14
+ enabled: true
15
+ endpoints:
16
+ health: /health
17
+ ready: /ready
18
+ live: /live
19
+ interval_seconds: 30
20
+ timeout_seconds: 5
21
+ restart_policy:
22
+ enabled: true
23
+ max_restarts: 3
24
+ restart_delay_seconds: 10
25
+
26
+ # 2. Secrets Management
27
+ secrets:
28
+ provider: gitlab_vault
29
+ injection:
30
+ method: env_vars
31
+ prefix: AGENT_SECRET_
32
+ rotation:
33
+ enabled: true
34
+ interval_days: 90
35
+ auto_rotate: false
36
+ encryption:
37
+ enabled: true
38
+ algorithm: aes-256-gcm
39
+ audit:
40
+ enabled: true
41
+ log_access: true
42
+
43
+ # 3. LLM Configuration with Circuit Breaker (via retry)
44
+ llm:
45
+ provider: anthropic
46
+ model: claude-sonnet-4
47
+ profile: balanced
48
+ retry:
49
+ max_attempts: 3
50
+ backoff:
51
+ strategy: exponential
52
+ initial_delay_ms: 1000
53
+ max_delay_ms: 30000
54
+ circuit_breaker:
55
+ enabled: true
56
+ failure_threshold: 5
57
+ timeout_ms: 60000
58
+ half_open_max_calls: 3
59
+ success_threshold: 2
60
+
61
+ # 4. Error Handling with Aggregation
62
+ error_handling:
63
+ strategy: fail_fast
64
+ aggregation:
65
+ enabled: true
66
+ window_seconds: 300
67
+ threshold: 10
68
+ alert_channels:
69
+ - slack
70
+ - pagerduty
71
+ categorization:
72
+ enabled: true
73
+ categories:
74
+ - timeout
75
+ - rate_limit
76
+ - validation
77
+
78
+ # 5. State Management with Versioning & Conflict Resolution
79
+ state:
80
+ mode: long_running
81
+ storage:
82
+ type: kv
83
+ config:
84
+ provider: redis
85
+ endpoint: redis://localhost:6379
86
+ versioning:
87
+ enabled: true
88
+ strategy: optimistic_locking
89
+ conflict_resolution:
90
+ strategy: merge_on_conflict
91
+ merge_on_conflict: true
92
+ persistence:
93
+ enabled: true
94
+ backup_interval_seconds: 300
95
+ restore_on_startup: true
96
+
97
+ # 6. Security Boundaries
98
+ safety:
99
+ content_filtering:
100
+ enabled: true
101
+ security_boundaries:
102
+ network_policies:
103
+ enabled: true
104
+ allowed_agents:
105
+ - agent-a
106
+ - agent-b
107
+ rbac:
108
+ enabled: true
109
+ roles:
110
+ - reader
111
+ - writer
112
+ mtls:
113
+ enabled: true
114
+ ca_cert: env:CA_CERT
115
+ audit_logging:
116
+ enabled: true
117
+ retention_days: 90
118
+
119
+ # 7. Rollback Configuration
120
+ rollback:
121
+ triggers:
122
+ - health_check_failure
123
+ - error_rate_threshold
124
+ - cost_exceeded
125
+ automation:
126
+ enabled: true
127
+ approval_required: false
128
+ notification_channels:
129
+ - slack
130
+ - email
131
+
132
+ # 8. Testing Configuration (Optional)
133
+ testing:
134
+ framework: jest
135
+ mock_llm:
136
+ enabled: true
137
+ provider: local_mock
138
+ responses_file: tests/fixtures/mock-llm-responses.json
139
+ coverage:
140
+ threshold: 80
141
+ enforce: true
142
+ test_data:
143
+ management: fixtures
144
+ fixtures_path: tests/fixtures/