Skip to content

Commit e229859

Browse files
committed
Standardize Engine config schema
1 parent 777b6c8 commit e229859

File tree

10 files changed

+288
-181
lines changed

10 files changed

+288
-181
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Validate YAML schemas
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Always run on merges to main
7+
pull_request:
8+
types: [opened, synchronize, reopened] # Run against every push to open PRs
9+
10+
jobs:
11+
validate:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: collect YAML files with $schema
18+
id: collect
19+
run: |
20+
echo "Finding YAML files with a \$schema property…"
21+
files=$(grep -rl "\$schema:" . --include="*.yaml" | paste -sd '|' -)
22+
if [ -z "$files" ]; then
23+
echo "No YAML files with \$schema were found."
24+
else
25+
echo "Files with \$schema: $files"
26+
fi
27+
# Set 'files' as an output so that it can be used later
28+
echo "files=$files" >> $GITHUB_OUTPUT
29+
30+
- name: Validate YAML files using schema-validator-action
31+
# Only run this step if there is at least one file with $schema
32+
if: ${{ steps.collect.outputs.files != '' }}
33+
uses: cardinalby/schema-validator-action@v3
34+
with:
35+
file: ${{ steps.collect.outputs.files }}

examples/code/home/configuration/engine/api.yaml

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

examples/code/home/configuration/engine/auth_tokenstore.inmemory.yaml

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

examples/code/home/configuration/engine/auth_tokenstore.redis.yaml

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

examples/code/home/configuration/engine/config_template.yaml

Lines changed: 61 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,14 @@
1-
telemetry:
2-
environment: ${env:TELEMETRY_ENVIRONMENT}
3-
version: ${env:VERSION}
4-
logging:
5-
level: ${env:TELEMETRY_LOGGING_LEVEL} # debug, info, warn, error
6-
encoding: ${env:TELEMETRY_LOGGING_ENCODING}
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/ArcadeAI/schemas/main/engine/1.0/schema.json
2+
3+
$schema: https://raw.githubusercontent.com/ArcadeAI/schemas/main/engine/1.0/schema.json
74

85
api:
96
development: ${env:API_DEVELOPMENT}
107
host: ${env:ARCADE_API_HOST}
118
port: ${env:ARCADE_API_PORT}
129

13-
llm:
14-
models:
15-
- id: my-openai-model-provider
16-
openai:
17-
api_key: ${env:OPENAI_API_KEY}
18-
#- id: my-anthropic-model-provider
19-
# anthropic:
20-
# api_key: ${env:ANTHROPIC_API_KEY}
21-
# - id: my-ollama-model-provider
22-
# openai:
23-
# base_url: http://localhost:11434
24-
# chat_endpoint: /v1/chat/completions
25-
# model: llama3.2
26-
# api_key: ollama
27-
#- id: my-groq-model-provider
28-
# openai:
29-
# base_url: "https://api.groq.com/openai/v1"
30-
# api_key: ${env:GROQ_API_KEY}
31-
32-
tools:
33-
directors:
34-
- id: default
35-
enabled: true
36-
workers:
37-
- id: "worker"
38-
enabled: true
39-
http:
40-
uri: ${env:ARCADE_WORKER_URI}
41-
timeout: 30
42-
retry: 3
43-
secret: ${env:ARCADE_WORKER_SECRET}
4410

4511
auth:
46-
token_store:
47-
# Uncomment to have persistent storage tokens through redis
48-
# redis:
49-
# addr: ${env:REDIS_HOST}:${env:REDIS_PORT}
50-
# password: ""
51-
in_memory:
52-
max_size: 1000000
53-
5412
providers:
5513
- id: default-atlassian
5614
description: "The default Atlassian provider"
@@ -139,3 +97,61 @@ auth:
13997
provider_id: zoom
14098
client_id: ${env:ZOOM_CLIENT_ID}
14199
client_secret: ${env:ZOOM_CLIENT_SECRET}
100+
101+
102+
llm:
103+
models:
104+
- id: my-openai-model-provider
105+
openai:
106+
api_key: ${env:OPENAI_API_KEY}
107+
#- id: my-anthropic-model-provider
108+
# anthropic:
109+
# api_key: ${env:ANTHROPIC_API_KEY}
110+
# - id: my-ollama-model-provider
111+
# openai:
112+
# base_url: http://localhost:11434
113+
# chat_endpoint: /v1/chat/completions
114+
# model: llama3.2
115+
# api_key: ollama
116+
#- id: my-groq-model-provider
117+
# openai:
118+
# base_url: "https://api.groq.com/openai/v1"
119+
# api_key: ${env:GROQ_API_KEY}
120+
121+
122+
security:
123+
root_keys:
124+
- id: key1
125+
default: true
126+
value: ${env:ROOT_KEY_1}
127+
128+
129+
storage:
130+
postgres:
131+
user: ${env:POSTGRES_USER}
132+
password: ${env:POSTGRES_PASSWORD}
133+
host: ${env:POSTGRES_HOST}
134+
port: ${env:POSTGRES_PORT}
135+
db: ${env:POSTGRES_DB}
136+
sslmode: require
137+
138+
139+
telemetry:
140+
environment: ${env:TELEMETRY_ENVIRONMENT}
141+
logging:
142+
level: ${env:TELEMETRY_LOGGING_LEVEL} # debug, info, warn, error
143+
encoding: ${env:TELEMETRY_LOGGING_ENCODING}
144+
145+
146+
tools:
147+
directors:
148+
- id: default
149+
enabled: true
150+
workers:
151+
- id: "worker"
152+
enabled: true
153+
http:
154+
uri: ${env:ARCADE_WORKER_URI}
155+
timeout: 30
156+
retry: 3
157+
secret: ${env:ARCADE_WORKER_SECRET}

examples/code/home/configuration/engine/arcade.sh renamed to examples/code/home/configuration/engine/engine.env

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,37 @@
1-
### Engine Configuration ###
2-
3-
TELEMETRY_ENVIRONMENT=local
4-
TELEMETRY_LOGGING_LEVEL=debug
5-
TELEMETRY_LOGGING_ENCODING=console
1+
### Engine configuration ###
62
API_DEVELOPMENT=true
73
ARCADE_API_HOST=localhost
84
ARCADE_API_PORT=9099
95

106

11-
### Model Provider API Keys ###
12-
7+
### Model Provider API keys ###
138
# OPENAI_API_KEY=
149
# ANTHROPIC_API_KEY=
1510
# GROQ_API_KEY=
1611

17-
### Worker Configuration ###
1812

13+
### Security configuration ###
14+
ROOT_KEY_1=
15+
16+
17+
### Storage configuration ###
18+
# POSTGRES_USER=
19+
# POSTGRES_PASSWORD=
20+
# POSTGRES_HOST=
21+
# POSTGRES_PORT=
22+
# POSTGRES_DB=
23+
24+
25+
### Telemetry (OTEL) configuration ###
26+
TELEMETRY_ENVIRONMENT=local
27+
TELEMETRY_LOGGING_LEVEL=debug
28+
TELEMETRY_LOGGING_ENCODING=console
29+
30+
31+
### Worker Configuration ###
1932
ARCADE_WORKER_URI=http://localhost:8002
2033
# ARCADE_WORKER_SECRET=
2134

22-
### Token Storage ###
23-
# REDIS_HOST=
24-
# REDIS_PORT=
2535

2636
### Auth Providers ###
2737

Lines changed: 54 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,11 @@
1+
$schema: https://raw.githubusercontent.com/ArcadeAI/schemas/main/engine/1.0/schema.json
2+
13
api:
2-
development: false
4+
development: false # Set to true for local development and testing
35
host: localhost
46
port: 9099
57

6-
llm:
7-
models:
8-
- id: my-openai-model-provider
9-
openai:
10-
api_key: ${env:OPENAI_API_KEY}
11-
default_params:
12-
temperature: 0
13-
14-
tools:
15-
directors:
16-
- id: default
17-
enabled: true
18-
workers:
19-
- id: "localworker"
20-
enabled: true
21-
http:
22-
uri: "http://localhost:8002"
23-
timeout: 30
24-
retry: 3
25-
secret: ${env:ARCADE_WORKER_SECRET}
26-
278
auth:
28-
token_store:
29-
redis:
30-
addr: "redis:6379"
31-
password: ${env:REDIS_PASSWORD}
32-
339
providers:
3410
- id: default-github
3511
description: "The default GitHub provider"
@@ -48,9 +24,58 @@ auth:
4824
oauth2:
4925
# Connection details here...
5026

27+
cache:
28+
api_key_ttl: 10s
29+
redis:
30+
addr: 'localhost:6379'
31+
password: ''
32+
db: 0
33+
34+
llm:
35+
models:
36+
- id: primary
37+
openai:
38+
api_key: ${env:OPENAI_API_KEY}
39+
- id: secondary
40+
anthropic:
41+
api_key: ${env:ANTHROPIC_API_KEY}
42+
api_version: "2023-06-01"
43+
44+
security:
45+
root_keys:
46+
- id: key1
47+
default: true
48+
value: ${env:ROOT_KEY_1}
49+
- id: key2
50+
value: ${env:ROOT_KEY_2}
51+
52+
storage:
53+
postgres:
54+
user: ${env:POSTGRES_USER}
55+
password: ${env:POSTGRES_PASSWORD}
56+
host: ${env:POSTGRES_HOST}
57+
port: ${env:POSTGRES_PORT}
58+
db: ${env:POSTGRES_DB}
59+
sslmode: require
60+
5161
telemetry:
52-
environment: local
53-
version: ${env:VERSION}
62+
environment: prod
5463
logging:
5564
level: info
5665
encoding: console
66+
67+
tools:
68+
directors:
69+
- id: default
70+
enabled: true
71+
workers:
72+
- id: "localworker"
73+
enabled: true
74+
http:
75+
uri: "http://localhost:8002"
76+
timeout: 30
77+
retry: 3
78+
secret: ${env:ARCADE_WORKER_SECRET}
79+
80+
81+

examples/code/home/configuration/engine/llm_models.yaml

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

0 commit comments

Comments
 (0)