-
Notifications
You must be signed in to change notification settings - Fork 1
/
spin.toml
40 lines (36 loc) · 1.39 KB
/
spin.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
spin_manifest_version = 2
# General identification information
[application]
name = "moonbit-ai-agent"
version = "1.0.0"
description = "An application that reviews GitHub PR upon request."
# Secrets
[variables]
openapi_key = { required = true, secret = true }
private_key = { required = true, secret = true }
client_id = { required = true }
app_id = { required = true }
user_agent = { required = true }
# The application's sole trigger. This application responds to HTTP requests
# on the path "/...", and handles them using the "agent" component.
[[trigger.http]]
route = "/..."
component = "agent"
# The "agent" component
[component.agent]
description = "The MoonBit Agent"
# The Wasm module to run for the component
source = "target/agent.wasm"
# Permitted outgoing HTTP requests
allowed_outbound_hosts = ["https://api.github.com", "https://api.deepseek.com", "https://www.github.com", "https://api.siliconflow.cn"]
# How to build the Wasm module from source
[component.agent.build]
command = """moon build --target wasm -g
wasm-tools component embed --encoding utf16 wit target/wasm/debug/build/agent/agent.wasm --world http-trigger -o target/agent.core.wasm
wasm-tools component new target/agent.core.wasm -o target/agent.wasm"""
[component.agent.variables]
open_api_key = "{{ openapi_key }}"
private_key = "{{ private_key }}"
client_id = "{{ client_id }}"
app_id = "{{ app_id }}"
user_agent = "{{ user_agent }}"