Skip to content

Commit 5c3f9ba

Browse files
authored
Merge pull request #623 from pitabwire/ai-assistant-mode-wt
AI Assistant Mode + Blueprints + Monolith/Polylith Support
2 parents bc410c6 + 2e4d018 commit 5c3f9ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2312
-322
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ tests_runner/*.srl
2323
bin/
2424
docs/venv/
2525
site/
26+
_generated/

blueprint/blueprint.go

Lines changed: 0 additions & 33 deletions
This file was deleted.

blueprint/merge.go

Lines changed: 0 additions & 111 deletions
This file was deleted.

blueprint/merge_test.go

Lines changed: 0 additions & 89 deletions
This file was deleted.

blueprints/blueprint.schema.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Frame Blueprint",
4+
"type": "object",
5+
"properties": {
6+
"schema_version": {"type": "string"},
7+
"runtime_mode": {"type": "string", "enum": ["monolith", "polylith"]},
8+
"service": {"$ref": "#/definitions/service"},
9+
"services": {
10+
"type": "array",
11+
"items": {"$ref": "#/definitions/service"}
12+
},
13+
"http": {"type": "array", "items": {"$ref": "#/definitions/http"}},
14+
"plugins": {"type": "array", "items": {"type": "string"}},
15+
"datastore": {"$ref": "#/definitions/datastore"},
16+
"queues": {"type": "array", "items": {"$ref": "#/definitions/queue"}}
17+
},
18+
"required": ["schema_version"],
19+
"definitions": {
20+
"service": {
21+
"type": "object",
22+
"properties": {
23+
"name": {"type": "string"},
24+
"module": {"type": "string"},
25+
"runtime_mode": {"type": "string", "enum": ["monolith", "polylith"]},
26+
"service_id": {},
27+
"service_group": {"type": "string"},
28+
"port": {"type": "string"},
29+
"http": {"type": "array", "items": {"$ref": "#/definitions/http"}},
30+
"plugins": {"type": "array", "items": {"type": "string"}},
31+
"datastore": {"$ref": "#/definitions/datastore"},
32+
"queues": {"type": "array", "items": {"$ref": "#/definitions/queue"}}
33+
},
34+
"required": ["name"]
35+
},
36+
"http": {
37+
"type": "object",
38+
"properties": {
39+
"name": {"type": "string"},
40+
"route": {"type": "string"},
41+
"method": {"type": "string"},
42+
"handler": {"type": "string"},
43+
"response": {"type": "string"}
44+
},
45+
"required": ["route", "method", "handler"]
46+
},
47+
"datastore": {
48+
"type": "object",
49+
"properties": {
50+
"migrate": {"type": "boolean"},
51+
"primary_url_env": {"type": "string"}
52+
}
53+
},
54+
"queue": {
55+
"type": "object",
56+
"properties": {
57+
"publisher": {"type": "string"},
58+
"subscriber": {"type": "string"},
59+
"url": {"type": "string"},
60+
"handler": {"type": "string"}
61+
},
62+
"required": ["url"]
63+
}
64+
}
65+
}

blueprints/monolith.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
schema_version: 0.1
2+
runtime_mode: monolith
3+
services:
4+
- name: devices
5+
port: ":8081"
6+
http:
7+
- route: /devices
8+
method: GET
9+
handler: GetDevices
10+
- name: geolocation
11+
port: ":8082"
12+
http:
13+
- route: /geo
14+
method: GET
15+
handler: GetGeo

blueprints/polylith.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
schema_version: 0.1
2+
runtime_mode: polylith
3+
service:
4+
name: users
5+
port: ":8080"
6+
http:
7+
- route: /users
8+
method: GET
9+
handler: GetUsers
10+
plugins:
11+
- logger
12+
queues:
13+
- publisher: user-events
14+
url: mem://events

0 commit comments

Comments
 (0)