Skip to content

Atomic

Low-level primitives: file I/O, git, HTTP, shell, SSH, process management, and testing.

44 modules

ModuleDescription
กรองอาร์เรย์กรององค์ประกอบอาร์เรย์ตามเงื่อนไข
เรียงลำดับอาร์เรย์เรียงลำดับองค์ประกอบอาร์เรย์จากน้อยไปมากหรือมากไปน้อย
อาเรย์ที่ไม่ซ้ำลบค่าซ้ำจากอาร์เรย์
OAuth2 Token ExchangeExchange authorization code, refresh token, or client credentials for an access token
ค้นหา DNSค้นหา DNS สำหรับข้อมูลโดเมน
ความแตกต่างของข้อความสร้างความแตกต่างระหว่างข้อความสองสตริง
แก้ไขไฟล์แทนที่ข้อความในไฟล์โดยใช้การจับคู่สตริงที่ตรงกัน
ตรวจสอบไฟล์มีอยู่ตรวจสอบว่าไฟล์หรือไดเรกทอรีมีอยู่หรือไม่
อ่านไฟล์อ่านเนื้อหาจากไฟล์
เขียนไฟล์เขียนเนื้อหาลงไฟล์
Git Cloneโคลนที่เก็บ Git
Git Commitสร้างคอมมิต Git
Git Diffรับ Git diff
HTTP PaginateAutomatically iterate through paginated API endpoints and collect all results
คำขอ HTTPส่งคำขอ HTTP และรับการตอบกลับ
ยืนยันการตอบกลับ HTTPยืนยันและตรวจสอบคุณสมบัติการตอบกลับ HTTP
HTTP SessionSend a sequence of HTTP requests with persistent cookies (login → action → logout)
Webhook WaitStart a temporary server and wait for an incoming webhook callback
แชท LLMโต้ตอบกับ LLM API สำหรับการดำเนินการอัจฉริยะ
AI แก้ไขโค้ดสร้างการแก้ไขโค้ดอัตโนมัติตามปัญหา
คำนวณดำเนินการคำนวณทางคณิตศาสตร์พื้นฐาน
ตรวจสอบสุขภาพ HTTPตรวจสอบสุขภาพ HTTP / ตรวจสอบเวลาใช้งาน
ตรวจสอบพอร์ตตรวจสอบว่าพอร์ตเครือข่ายเปิดหรือปิด
รอพอร์ตรอให้พอร์ตเครือข่ายพร้อมใช้งาน
แสดงรายการ Processแสดงรายการ process พื้นหลังที่กำลังทำงาน
เริ่ม Process พื้นหลังเริ่ม process พื้นหลัง (เซิร์ฟเวอร์, บริการ ฯลฯ)
หยุด Processหยุด process พื้นหลังที่กำลังทำงาน
รันคำสั่ง Shellรันคำสั่ง shell และจับเอาต์พุต
SSH Executeรันคำสั่งบนเซิร์ฟเวอร์ระยะไกลผ่าน SSH
SFTP Downloadดาวน์โหลดไฟล์จากเซิร์ฟเวอร์ระยะไกลผ่าน SFTP
SFTP Uploadอัปโหลดไฟล์ไปยังเซิร์ฟเวอร์ระยะไกลผ่าน SFTP
รันขั้นตอน E2Eดำเนินการขั้นตอนทดสอบ end-to-end ตามลำดับ
ประตูคุณภาพประเมินเมตริกคุณภาพเทียบกับเกณฑ์ที่กำหนด
รันการทดสอบ HTTPดำเนินการชุดทดสอบ HTTP API
รัน Linterรันการตรวจสอบ lint บนซอร์สโค้ด
สร้างรายงานสร้างรายงานการดำเนินการทดสอบ
รันสถานการณ์ดำเนินการทดสอบตามสถานการณ์ (รูปแบบ BDD)
สแกนความปลอดภัยสแกนหาช่องโหว่ด้านความปลอดภัย
รันชุดทดสอบดำเนินการชุดการทดสอบ
รัน Unit Testsดำเนินการทดสอบ unit
เปรียบเทียบภาพเปรียบเทียบเอาต์พุตภาพเพื่อหาความแตกต่าง
ประเมินคุณภาพ UIประเมินคุณภาพ UI อย่างครอบคลุมด้วยการให้คะแนนหลายมิติ
วิเคราะห์รูปภาพด้วย AIวิเคราะห์รูปภาพโดยใช้ OpenAI Vision API (GPT-4V)
เปรียบเทียบรูปภาพเปรียบเทียบสองรูปภาพและระบุความแตกต่างทางภาพ

Modules

กรองอาร์เรย์

array.filter

กรององค์ประกอบอาร์เรย์ตามเงื่อนไข

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array of items to process. Can be numbers, strings, or objects.
conditionselect (eq, ne, gt, gte, lt, lte, contains, startswith, endswith, regex, in, notin, exists, empty, notempty)Yes-How to compare each item against the value
valuestringYes-Value to compare each item against (leave empty for exists/empty checks)

Output:

FieldTypeDescription
filteredarrayอาร์เรย์ที่กรองแล้ว
countnumberอาร์เรย์ที่กรองแล้ว

Example: Filter numbers greater than 5

yaml
array: [1, 5, 10, 15, 3]
condition: gt
value: 5

เรียงลำดับอาร์เรย์

array.sort

เรียงลำดับองค์ประกอบอาร์เรย์จากน้อยไปมากหรือมากไปน้อย

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array of items to process. Can be numbers, strings, or objects.
orderselect (asc, desc)NoascDirection to sort items

Output:

FieldTypeDescription
sortedarrayอาร์เรย์ที่เรียงลำดับแล้ว
countnumberอาร์เรย์ที่เรียงลำดับแล้ว

Example: Sort numbers ascending

yaml
array: [5, 2, 8, 1, 9]
order: asc

อาเรย์ที่ไม่ซ้ำ

array.unique

ลบค่าซ้ำจากอาร์เรย์

Parameters:

NameTypeRequiredDefaultDescription
arrayarrayYes-Array of items to process. Can be numbers, strings, or objects.
preserve_orderbooleanNoTrueKeep first occurrence order

Output:

FieldTypeDescription
uniquearrayอาร์เรย์พร้อมค่าเฉพาะ
countnumberอาร์เรย์พร้อมค่าเฉพาะ
duplicates_removednumberอาร์เรย์พร้อมค่าเฉพาะ

Example: Remove duplicates

yaml
array: [1, 2, 2, 3, 4, 3, 5]
preserve_order: true

OAuth2 Token Exchange

auth.oauth2

Exchange authorization code, refresh token, or client credentials for an access token

Parameters:

NameTypeRequiredDefaultDescription
token_urlstringYes-OAuth2 token endpoint URL
grant_typestringNoauthorization_codeOAuth2 grant type
client_idstringYes-OAuth2 application client ID
client_secretstringNo-OAuth2 application client secret
codestringNo-Authorization code received from the OAuth2 authorization flow
redirect_uristringNo-Redirect URI used in the authorization request (must match exactly)
refresh_tokenstringNo-Refresh token for obtaining a new access token
scopestringNo-Space-separated list of OAuth2 scopes
code_verifierstringNo-PKCE code verifier for public clients
client_auth_methodstringNobodyHow to send client credentials to the token endpoint
extra_paramsobjectNo{}Additional parameters to include in the token request
timeoutnumberNo15Maximum time to wait in seconds

Output:

FieldTypeDescription
okbooleanWhether token exchange was successful
access_tokenstringThe access token for API requests
token_typestringToken type (usually "Bearer")
expires_innumberToken lifetime in seconds
refresh_tokenstringRefresh token (if provided by the OAuth2 server)
scopestringGranted scopes
rawobjectFull raw response from the token endpoint
duration_msnumberRequest duration in milliseconds

Example: Exchange authorization code (Google)

yaml
token_url: https://oauth2.googleapis.com/token
grant_type: authorization_code
client_id: ${env.GOOGLE_CLIENT_ID}
client_secret: ${env.GOOGLE_CLIENT_SECRET}
code: 4/0AX4XfWh...
redirect_uri: https://yourapp.com/callback

Example: Refresh an expired token

yaml
token_url: https://oauth2.googleapis.com/token
grant_type: refresh_token
client_id: ${env.GOOGLE_CLIENT_ID}
client_secret: ${env.GOOGLE_CLIENT_SECRET}
refresh_token: ${env.REFRESH_TOKEN}

Example: Client credentials (machine-to-machine)

yaml
token_url: https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token
grant_type: client_credentials
client_id: ${env.AZURE_CLIENT_ID}
client_secret: ${env.AZURE_CLIENT_SECRET}
scope: https://graph.microsoft.com/.default

Example: GitHub OAuth (code exchange)

yaml
token_url: https://github.com/login/oauth/access_token
grant_type: authorization_code
client_id: ${env.GITHUB_CLIENT_ID}
client_secret: ${env.GITHUB_CLIENT_SECRET}
code: abc123...

ค้นหา DNS

dns.lookup

ค้นหา DNS สำหรับข้อมูลโดเมน

Parameters:

NameTypeRequiredDefaultDescription
domainstringYes-ชื่อโดเมนที่ต้องการค้นหา
record_typeselect (A, AAAA, CNAME, MX, NS, TXT, SOA, SRV)NoAประเภทของข้อมูล DNS ที่ต้องการค้นหา
timeoutnumberNo10หมดเวลาการค้นหาในหน่วยวินาที

Output:

FieldTypeDescription
okbooleanWhether lookup succeeded
dataobject

Example: A record lookup

yaml
domain: example.com
record_type: A

Example: MX record lookup

yaml
domain: example.com
record_type: MX

ความแตกต่างของข้อความ

file.diff

สร้างความแตกต่างระหว่างข้อความสองสตริง

Parameters:

NameTypeRequiredDefaultDescription
originalstringYes-ข้อความต้นฉบับ
modifiedstringYes-ข้อความที่แก้ไข
context_linesnumberNo3จำนวนบรรทัดบริบทที่อยู่รอบการเปลี่ยนแปลง
filenamestringNofileชื่อไฟล์ที่ใช้ในส่วนหัวของความแตกต่าง

Output:

FieldTypeDescription
diffstringผลลัพธ์ความแตกต่างแบบรวม
changedbooleanมีการเปลี่ยนแปลงหรือไม่
additionsnumberจำนวนบรรทัดที่เพิ่ม
deletionsnumberจำนวนบรรทัดที่ลบ

Example: Diff two strings

yaml
original: hello
world
modified: hello
world!
filename: test.txt

แก้ไขไฟล์

file.edit

แทนที่ข้อความในไฟล์โดยใช้การจับคู่สตริงที่ตรงกัน

Parameters:

NameTypeRequiredDefaultDescription
pathstringYes-เส้นทางไปยังไฟล์ที่จะแก้ไข
old_stringstringYes-ข้อความที่ต้องการค้นหาและแทนที่
new_stringstringYes-ข้อความที่ใช้แทนที่
replace_allbooleanNoFalseแทนที่ทั้งหมดแทนที่จะเป็นเพียงครั้งแรก
encodingselect (utf-8, ascii, latin-1, utf-16, gbk, big5)Noutf-8การเข้ารหัสไฟล์

Output:

FieldTypeDescription
pathstringเส้นทางของไฟล์ที่แก้ไข
replacementsnumberจำนวนการแทนที่ที่ทำ
diffstringความแตกต่างที่แสดงสิ่งที่เปลี่ยนแปลง

Example: Replace string in file

yaml
path: /tmp/example.py
old_string: def hello():
new_string: def hello_world():

ตรวจสอบไฟล์มีอยู่

file.exists

ตรวจสอบว่าไฟล์หรือไดเรกทอรีมีอยู่หรือไม่

Parameters:

NameTypeRequiredDefaultDescription
pathstringYes-Path to the file

Output:

FieldTypeDescription
existsbooleanพาธมีอยู่หรือไม่
is_filebooleanพาธมีอยู่หรือไม่
is_directorybooleanพาธมีอยู่หรือไม่

Example: Check file exists

yaml
path: /tmp/data.txt

อ่านไฟล์

file.read

อ่านเนื้อหาจากไฟล์

Parameters:

NameTypeRequiredDefaultDescription
pathstringYes-Path to the file
encodingselect (utf-8, ascii, latin-1, utf-16, gbk, big5)Noutf-8Character encoding for the file

Output:

FieldTypeDescription
contentstringเนื้อหาไฟล์
sizenumberเนื้อหาไฟล์

Example: Read text file

yaml
path: /tmp/data.txt
encoding: utf-8

เขียนไฟล์

file.write

เขียนเนื้อหาลงไฟล์

Parameters:

NameTypeRequiredDefaultDescription
pathstringYes-Path to the file
contentstringYes-Text content to write to the file
encodingselect (utf-8, ascii, latin-1, utf-16, gbk, big5)Noutf-8Character encoding for the file
modeselect (overwrite, append)NooverwriteHow to write content to the file

Output:

FieldTypeDescription
pathstringพาธไฟล์
bytes_writtennumberพาธไฟล์

Example: Write text file

yaml
path: /tmp/output.txt
content: Hello World
mode: overwrite

Git Clone

git.clone

โคลนที่เก็บ Git

Parameters:

NameTypeRequiredDefaultDescription
urlstringYes-URL ที่เก็บ Git (HTTPS หรือ SSH)
destinationstringYes-เส้นทางในเครื่องที่จะโคลนเข้า
branchstringNo-สาขาที่จะเช็คเอาท์หลังโคลน
depthnumberNo-ความลึกของการโคลนแบบตื้น (ไม่ระบุสำหรับโคลนเต็ม)
tokenstringNo-โทเค็นการเข้าถึงส่วนตัวสำหรับที่เก็บส่วนตัว

Output:

FieldTypeDescription
okbooleanWhether clone succeeded
dataobject

Example: Clone public repository

yaml
url: https://github.com/user/repo.git
destination: /tmp/repo

Example: Shallow clone specific branch

yaml
url: https://github.com/user/repo.git
destination: /tmp/repo
branch: develop
depth: 1

Git Commit

git.commit

สร้างคอมมิต Git

Parameters:

NameTypeRequiredDefaultDescription
repo_pathstringYes-เส้นทางไปยังที่เก็บ Git
messagestringYes-ข้อความคอมมิต
add_allbooleanNoFalseสเตจการเปลี่ยนแปลงทั้งหมดก่อนคอมมิต (git add -A)
filesarrayNo-ไฟล์เฉพาะที่จะสเตจก่อนคอมมิต
author_namestringNo-แทนที่ชื่อผู้เขียนคอมมิต
author_emailstringNo-แทนที่อีเมลผู้เขียนคอมมิต

Output:

FieldTypeDescription
okbooleanWhether commit succeeded
dataobject

Example: Commit all changes

yaml
repo_path: /home/user/project
message: feat: add user authentication
add_all: true

Example: Commit specific files

yaml
repo_path: /home/user/project
message: fix: correct typo in readme
files: ["README.md"]

Git Diff

git.diff

รับ Git diff

Parameters:

NameTypeRequiredDefaultDescription
repo_pathstringYes-เส้นทางไปยังที่เก็บ Git
ref1stringNoHEADอ้างอิงแรก (คอมมิต, สาขา, แท็ก)
ref2stringNo-อ้างอิงที่สองเพื่อเปรียบเทียบ
stagedbooleanNoFalseแสดงเฉพาะการเปลี่ยนแปลงที่สเตจแล้ว (--cached)
stat_onlybooleanNoFalseแสดงเฉพาะสถิติไฟล์ (--stat)

Output:

FieldTypeDescription
okbooleanWhether diff succeeded
dataobject

Example: Show unstaged changes

yaml
repo_path: /home/user/project

Example: Compare branches

yaml
repo_path: /home/user/project
ref1: main
ref2: feature/login

Example: Show staged changes stats

yaml
repo_path: /home/user/project
staged: true
stat_only: true

HTTP Paginate

http.paginate

Automatically iterate through paginated API endpoints and collect all results

Parameters:

NameTypeRequiredDefaultDescription
urlstringYes-URL to navigate to
methodselect (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS)NoGETHTTP request method
headersobjectNo{}HTTP request headers as key-value pairs
authobjectNo-Authentication credentials for the HTTP request
strategystringNooffsetHow the API implements pagination
data_pathstringNo-Dot-notation path to the array of items in the response (e.g. "data", "results", "items")
offset_paramstringNooffsetQuery parameter name for offset
limit_paramstringNolimitQuery parameter name for page size
page_sizenumberNo100Number of items per page
page_paramstringNopageQuery parameter name for page number
start_pagenumberNo1First page number (usually 0 or 1)
cursor_paramstringNocursorQuery parameter name for cursor token
cursor_pathstringNo-Dot-notation path to the next cursor in the response (e.g. "meta.next_cursor", "pagination.next")
max_pagesnumberNo50Maximum number of pages to fetch (safety limit)
delay_msnumberNo0Milliseconds to wait between page requests (rate limiting)
timeoutnumberNo30Maximum time to wait in seconds
verify_sslbooleanNoTrueVerify SSL certificates

Output:

FieldTypeDescription
okbooleanWhether all pages were fetched successfully
itemsarrayAll collected items across all pages
total_itemsnumberTotal number of items collected
pages_fetchednumberNumber of pages fetched
duration_msnumberTotal duration in milliseconds

Example: Offset pagination (REST API)

yaml
url: https://api.example.com/users
strategy: offset
data_path: data
page_size: 100

Example: Page number pagination

yaml
url: https://api.example.com/products
strategy: page
data_path: results
page_param: page
page_size: 50
start_page: 1

Example: Cursor pagination (Slack, Notion)

yaml
url: https://api.notion.com/v1/databases/{db_id}/query
method: POST
strategy: cursor
data_path: results
cursor_path: next_cursor
cursor_param: start_cursor
auth: {"type": "bearer", "token": "${env.NOTION_TOKEN}"}

Example: Link header pagination (GitHub)

yaml
url: https://api.github.com/repos/octocat/hello-world/issues
strategy: link_header
page_size: 100
auth: {"type": "bearer", "token": "${env.GITHUB_TOKEN}"}

คำขอ HTTP

http.request

ส่งคำขอ HTTP และรับการตอบกลับ

Parameters:

NameTypeRequiredDefaultDescription
urlstringYes-URL to navigate to
methodselect (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS)NoGETHTTP request method
headersobjectNo{}HTTP request headers as key-value pairs
bodyanyNo-HTTP request body content (JSON, text, or form data)
queryobjectNo{}URL query string parameters as key-value pairs
content_typeselect (application/json, application/x-www-form-urlencoded, multipart/form-data, text/plain, text/html, application/xml)Noapplication/jsonContent type of the request body
authobjectNo-Authentication credentials for the HTTP request
timeoutnumberNo30Maximum time to wait in seconds
follow_redirectsbooleanNoTrueAutomatically follow HTTP redirects
verify_sslbooleanNoTrueVerify SSL certificates
response_typeselect (auto, json, text, binary)NoautoHow to parse the response body
retry_countnumberNo0Number of retries on failure or 429/503 status
retry_backoffstringNoexponentialBackoff strategy between retries
retry_delaynumberNo1Initial delay between retries in seconds

Output:

FieldTypeDescription
okbooleanคำขอสำเร็จหรือไม่ (สถานะ 2xx)
statusnumberคำขอสำเร็จหรือไม่ (สถานะ 2xx)
status_textstringคำขอสำเร็จหรือไม่ (สถานะ 2xx)
headersobjectรหัสสถานะ HTTP
bodyanyข้อความสถานะ HTTP
urlstringส่วนหัวการตอบกลับ
duration_msnumberเนื้อหาการตอบกลับ (JSON ที่แปลงแล้วหรือข้อความ)
content_typestringURL สุดท้าย (หลังการเปลี่ยนเส้นทาง)
content_lengthnumberContent-Type ของการตอบกลับ

Example: Simple GET request

yaml
url: https://api.example.com/users
method: GET

Example: POST with JSON body

yaml
url: https://api.example.com/users
method: POST
body: {"name": "John", "email": "john@example.com"}

Example: Request with Bearer auth

yaml
url: https://api.example.com/protected
method: GET
auth: {"type": "bearer", "token": "${env.API_TOKEN}"}

Example: Request with query params

yaml
url: https://api.example.com/search
method: GET
query: {"q": "flyto", "limit": 10}

ยืนยันการตอบกลับ HTTP

http.response_assert

ยืนยันและตรวจสอบคุณสมบัติการตอบกลับ HTTP

Parameters:

NameTypeRequiredDefaultDescription
responseobjectYes-HTTP response object from http.request
statusanyNo-Expected status code (number, array of numbers, or range string "200-299")
body_containsanyNo-String or array of strings that body should contain
body_not_containsanyNo-String or array of strings that body should NOT contain
body_matchesstringYes-Regular expression pattern
json_pathobjectNo-Object mapping JSON paths to expected values (e.g., {"data.id": 123})
json_path_existsarrayNo-Array of JSON paths that should exist
header_containsobjectNo-Object mapping header names to expected values
content_typeselect (application/json, application/x-www-form-urlencoded, multipart/form-data, text/plain, text/html, application/xml)No-Content type of the request body
max_duration_msnumberNo-Maximum allowed response time in milliseconds
schemaobjectNo-JSON Schema to validate response body against
fail_fastbooleanNoFalseStop on first assertion failure

Output:

FieldTypeDescription
okbooleanการยืนยันทั้งหมดผ่านหรือไม่
passednumberการยืนยันทั้งหมดผ่านหรือไม่
failednumberการยืนยันทั้งหมดผ่านหรือไม่
totalnumberจำนวนการยืนยันที่ผ่าน
assertionsarrayจำนวนการยืนยันที่ล้มเหลว
errorsarrayผลการยืนยันโดยละเอียด

Example: Assert status 200

yaml
response: ${http_request.result}
status: 200

Example: Assert JSON structure

yaml
response: ${http_request.result}
status: 200
json_path: {"data.id": "${expected_id}", "data.name": "John"}
json_path_exists: ["data.created_at", "data.email"]

Example: Assert API response

yaml
response: ${api_result}
status: [200, 201]
content_type: application/json
max_duration_ms: 1000
json_path: {"success": true}

HTTP Session

http.session

Send a sequence of HTTP requests with persistent cookies (login → action → logout)

Parameters:

NameTypeRequiredDefaultDescription
requestsarrayYes-Ordered list of HTTP requests to execute with shared cookies
authobjectNo-Authentication applied to all requests in the session
stop_on_errorbooleanNoTrueStop executing remaining requests if one fails (non-2xx)
timeoutnumberNo30Maximum time per individual request
verify_sslbooleanNoTrueVerify SSL certificates

Output:

FieldTypeDescription
okbooleanWhether all requests succeeded
resultsarrayResults from each request in order
cookiesobjectFinal session cookies as key-value pairs
duration_msnumberTotal duration in milliseconds

Example: Login and fetch data

yaml
requests: [{"label": "Login", "url": "https://example.com/api/login", "method": "POST", "body": {"username": "${env.USER}", "password": "${env.PASS}"}}, {"label": "Get Profile", "url": "https://example.com/api/profile", "method": "GET"}]
stop_on_error: true

Example: CSRF token flow

yaml
requests: [{"label": "Get CSRF Token", "url": "https://example.com/csrf-token", "method": "GET"}, {"label": "Submit Form", "url": "https://example.com/api/submit", "method": "POST", "body": {"data": "value"}}]

Webhook Wait

http.webhook_wait

Start a temporary server and wait for an incoming webhook callback

Parameters:

NameTypeRequiredDefaultDescription
pathstringNo/webhookURL path to listen on (e.g. /webhook, /callback)
portnumberNo0Port to listen on (0 = auto-assign)
timeoutnumberNo300Maximum time to wait for the webhook callback
use_ngrokbooleanNoFalseCreate an ngrok tunnel for public access (requires pyngrok)
ngrok_tokenstringNo-ngrok authentication token (free at ngrok.com)
expected_methodstringNoPOSTOnly accept this HTTP method (empty = accept any)
response_statusnumberNo200HTTP status code to respond with when webhook is received
response_bodystringNo{"ok": true}Response body to send back to the webhook caller

Output:

FieldTypeDescription
okbooleanWhether webhook was received before timeout
webhook_urlstringThe URL to send webhooks to (public if ngrok enabled)
methodstringHTTP method of the received webhook
headersobjectHeaders from the received webhook
bodyanyBody from the received webhook (parsed JSON or raw text)
queryobjectQuery parameters from the received webhook
duration_msnumberTime waited for the webhook in milliseconds

Example: Wait for Stripe webhook (local)

yaml
path: /webhook/stripe
port: 8765
timeout: 120
use_ngrok: false

Example: Wait for webhook with ngrok tunnel

yaml
path: /webhook
timeout: 300
use_ngrok: true
ngrok_token: ${env.NGROK_AUTH_TOKEN}

แชท LLM

llm.chat

โต้ตอบกับ LLM API สำหรับการดำเนินการอัจฉริยะ

Parameters:

NameTypeRequiredDefaultDescription
promptstringYes-The prompt or question to send to the AI model
system_promptstringNo-System instructions to set AI behavior and context
contextobjectNo-Additional context data to include
messagesarrayNo-Previous messages for multi-turn conversation
providerselect (openai, anthropic, ollama)NoopenaiAI model provider
modelstringNogpt-4oSpecific model to use
temperaturenumberNo0.7Creativity level (0=deterministic, 1=creative)
max_tokensnumberNo2000Maximum tokens in response
response_formatselect (text, json, code, markdown)NotextExpected format of the AI response
api_keystringNo-API key (defaults to provider env var)
base_urlstringNo-Custom API base URL (for Ollama or proxies)

Output:

FieldTypeDescription
okbooleanคำขอสำเร็จหรือไม่
responsestringคำขอสำเร็จหรือไม่
parsedanyคำขอสำเร็จหรือไม่
modelstringข้อความตอบกลับจาก LLM
tokens_usednumberการตอบกลับที่แปลงแล้ว (หากร้องขอรูปแบบ JSON)
finish_reasonstringโมเดลที่ใช้

Example: Code Review

yaml
prompt: Review this code for bugs and improvements:

${code}
system_prompt: You are an expert code reviewer. Be specific and actionable.
model: gpt-4o

Example: Generate Fix

yaml
prompt: The UI evaluation found these issues: ${issues}

Generate code fixes.
system_prompt: You are a frontend developer. Return only valid code.
response_format: code

Example: Decision Making

yaml
prompt: Based on these test results, should we deploy? ${test_results}
system_prompt: You are a DevOps engineer. Return JSON: {"decision": "yes/no", "reason": "..."}
response_format: json

AI แก้ไขโค้ด

llm.code_fix

สร้างการแก้ไขโค้ดอัตโนมัติตามปัญหา

Parameters:

NameTypeRequiredDefaultDescription
issuesarrayYes-List of issues to fix (from ui.evaluate, test results, etc.)
source_filesarrayYes-Files to analyze and potentially fix
fix_modeselect (suggest, apply, dry_run)NosuggestHow to handle the suggested fixes
backupbooleanNoTrueCreate .bak backup before modifying files
contextstringNo-Text content to process
modelstringNogpt-4oSpecific model to use
api_keystringNo-API key (defaults to provider env var)

Output:

FieldTypeDescription
okbooleanการดำเนินการสำเร็จหรือไม่
fixesarrayการดำเนินการสำเร็จหรือไม่
appliedarrayการดำเนินการสำเร็จหรือไม่
failedarrayรายการการแก้ไขที่สร้าง
summarystringรายการการแก้ไขที่ใช้ (หาก fix_mode เป็น apply)

Example: Fix UI Issues

yaml
issues: ${ui_evaluation.issues}
source_files: ["./src/components/Footer.tsx", "./src/styles/footer.css"]
fix_mode: suggest
context: React + Tailwind CSS project

Example: Auto-fix and Apply

yaml
issues: ${test_results.failures}
source_files: ["./src/App.tsx"]
fix_mode: apply
backup: true

คำนวณ

math.calculate

ดำเนินการคำนวณทางคณิตศาสตร์พื้นฐาน

Parameters:

NameTypeRequiredDefaultDescription
operationselect (add, subtract, multiply, divide, power, modulo, sqrt, abs)Yes-Operation to perform
anumberYes-First operand
bnumberNo-Second operand (not required for sqrt and abs)
precisionnumberNo2Number of decimal places

Output:

FieldTypeDescription
resultnumberผลการคำนวณ
operationstringผลการคำนวณ
expressionstringผลการคำนวณ

Example: Add two numbers

yaml
operation: add
a: 10
b: 5

Example: Calculate power

yaml
operation: power
a: 2
b: 8

ตรวจสอบสุขภาพ HTTP

monitor.http_check

ตรวจสอบสุขภาพ HTTP / ตรวจสอบเวลาใช้งาน

Parameters:

NameTypeRequiredDefaultDescription
urlstringYes-URL ที่จะตรวจสอบ
methodselect (GET, HEAD, POST)NoGETวิธีการ HTTP
expected_statusnumberNo200รหัสสถานะ HTTP ที่คาดหวัง
timeout_msnumberNo10000หมดเวลาคำขอในหน่วยมิลลิวินาที
headersobjectNo-หัวข้อคำขอที่กำหนดเอง
bodystringNo-เนื้อหาคำขอ (สำหรับ POST)
check_sslbooleanNoTrueตรวจสอบความถูกต้องและวันหมดอายุของใบรับรอง SSL
containsstringNo-เนื้อหาการตอบกลับต้องมีสตริงนี้
follow_redirectsbooleanNoTrueติดตามการเปลี่ยนเส้นทาง HTTP

Output:

FieldTypeDescription
okbooleanWhether check completed
dataobject

Example: Basic health check

yaml
url: https://api.example.com/health
expected_status: 200

Example: Check with content validation

yaml
url: https://api.example.com/health
contains: "status":"ok"
timeout_ms: 5000

ตรวจสอบพอร์ต

port.check

ตรวจสอบว่าพอร์ตเครือข่ายเปิดหรือปิด

Parameters:

NameTypeRequiredDefaultDescription
portanyYes-หมายเลขพอร์ตหรืออาร์เรย์ของพอร์ตที่จะตรวจสอบ
hoststringNolocalhostหมายเลขพอร์ตหรืออาร์เรย์ของพอร์ตที่จะตรวจสอบ
connect_timeoutnumberNo2โฮสต์ที่จะเชื่อมต่อ
expect_openbooleanNo-หมดเวลาสำหรับแต่ละความพยายามเชื่อมต่อ

Output:

FieldTypeDescription
okbooleanตั้งค่า true เพื่อยืนยันว่าพอร์ตเปิด, false สำหรับปิด
resultsarrayการตรวจสอบทั้งหมดผ่านหรือไม่ (ถ้าตั้งค่า expect_open)
open_portsarrayการตรวจสอบทั้งหมดผ่านหรือไม่ (ถ้าตั้งค่า expect_open)
closed_portsarrayอาร์เรย์ผลการตรวจสอบพอร์ต
summaryobjectรายการพอร์ตที่เปิด

Example: Check single port

yaml
port: 3000

Example: Check multiple ports

yaml
port: [3000, 8080, 5432]
host: localhost

Example: Assert ports are open

yaml
port: [80, 443]
host: example.com
expect_open: true

รอพอร์ต

port.wait

รอให้พอร์ตเครือข่ายพร้อมใช้งาน

Parameters:

NameTypeRequiredDefaultDescription
portnumberYes-หมายเลขพอร์ตที่จะรอ
hoststringNolocalhostโฮสต์ที่จะเชื่อมต่อ
timeoutnumberNo60โฮสต์ที่จะเชื่อมต่อ
intervalnumberNo500เวลาสูงสุดที่รอ
expect_closedbooleanNoFalseเวลาระหว่างความพยายามเชื่อมต่อเป็นมิลลิวินาที

Output:

FieldTypeDescription
okbooleanรอให้พอร์ตไม่พร้อมใช้งานแทน
availablebooleanพอร์ตอยู่ในสถานะที่คาดหวังหรือไม่
hoststringพอร์ตอยู่ในสถานะที่คาดหวังหรือไม่
portnumberพอร์ตพร้อมใช้งานในปัจจุบันหรือไม่
wait_time_msnumberโฮสต์ที่ตรวจสอบ
attemptsnumberพอร์ตที่ตรวจสอบ

Example: Wait for dev server

yaml
port: 3000
timeout: 30

Example: Wait for database

yaml
port: 5432
host: localhost
timeout: 60

Example: Wait for port to close

yaml
port: 8080
expect_closed: true
timeout: 10

แสดงรายการ Process

process.list

แสดงรายการ process พื้นหลังที่กำลังทำงาน

Parameters:

NameTypeRequiredDefaultDescription
filter_namestringNo-Filter processes by name (substring match)
include_statusbooleanNoTrueInclude running/stopped status check for each process

Output:

FieldTypeDescription
okbooleanการดำเนินการสำเร็จ
processesarrayการดำเนินการสำเร็จ
countnumberการดำเนินการสำเร็จ
runningnumberรายการข้อมูล process
stoppednumberจำนวน process ทั้งหมด

Example: List all processes

yaml

Example: Filter by name

yaml
filter_name: dev

เริ่ม Process พื้นหลัง

process.start

เริ่ม process พื้นหลัง (เซิร์ฟเวอร์, บริการ ฯลฯ)

Parameters:

NameTypeRequiredDefaultDescription
commandstringYes-Shell command to execute
cwdstringNo-Directory to execute command in
envobjectNo-Additional environment variables to set
namestringNo-Friendly name to identify the process
wait_for_outputstringNo-String to wait for in stdout before returning
wait_timeoutnumberNo60Maximum time to wait in seconds
capture_outputbooleanNoTrueCapture stdout/stderr output from the process
log_filestringNo-File path to write process output to
auto_restartbooleanNoFalseAutomatically restart the process if it exits

Output:

FieldTypeDescription
okbooleanprocess เริ่มต้นสำเร็จหรือไม่
pidnumberprocess เริ่มต้นสำเร็จหรือไม่
process_idstringprocess เริ่มต้นสำเร็จหรือไม่
namestringรหัส process
commandstringตัวระบุ process ภายในสำหรับ process.stop
cwdstringชื่อ process
started_atstringคำสั่งที่ดำเนินการ
initial_outputstringเวลา ISO เมื่อ process เริ่มต้น

Example: Start dev server

yaml
command: npm run dev
cwd: ./frontend
name: frontend-dev
wait_for_output: ready on
wait_timeout: 30

Example: Start Python HTTP server

yaml
command: python -m http.server 8000
name: static-server

Example: Start with environment

yaml
command: node server.js
env: {"PORT": "3000", "NODE_ENV": "test"}
name: api-server
wait_for_output: listening

หยุด Process

process.stop

หยุด process พื้นหลังที่กำลังทำงาน

Parameters:

NameTypeRequiredDefaultDescription
process_idstringNo-Internal process identifier (from process.start)
namestringNo-Friendly name to identify the process
pidnumberNo-System process ID (PID) of the process
signalselect (SIGTERM, SIGKILL, SIGINT)NoSIGTERMSignal to send to the process
timeoutnumberNo10Maximum time to wait in seconds
forcebooleanNoFalseForce kill the process immediately with SIGKILL
stop_allbooleanNoFalseStop all tracked processes

Output:

FieldTypeDescription
okbooleanprocess ทั้งหมดหยุดสำเร็จหรือไม่
stoppedarrayprocess ทั้งหมดหยุดสำเร็จหรือไม่
failedarrayรายการข้อมูล process ที่หยุด
countnumberรายการข้อมูล process ที่หยุด

Example: Stop by process ID

yaml
process_id: ${start_result.process_id}

Example: Stop by name

yaml
name: dev-server

Example: Force kill by PID

yaml
pid: 12345
force: true

Example: Stop all processes

yaml
stop_all: true

รันคำสั่ง Shell

shell.exec

รันคำสั่ง shell และจับเอาต์พุต

Parameters:

NameTypeRequiredDefaultDescription
commandstringYes-Shell command to execute
cwdstringNo-Directory to execute command in
envobjectNo-Additional environment variables to set
timeoutnumberNo300Maximum time to wait in seconds
shellbooleanNoFalseExecute command through shell (enables pipes, redirects)
capture_stderrbooleanNoTrueCapture stderr separately from stdout
encodingselect (utf-8, ascii, latin-1, utf-16, gbk, big5)Noutf-8Character encoding for the file
raise_on_errorbooleanNoFalseRaise exception if command returns non-zero exit code

Output:

FieldTypeDescription
okbooleanคำสั่งดำเนินการสำเร็จหรือไม่ (exit code 0)
exit_codenumberคำสั่งดำเนินการสำเร็จหรือไม่ (exit code 0)
stdoutstringคำสั่งดำเนินการสำเร็จหรือไม่ (exit code 0)
stderrstringรหัส exit ของคำสั่ง
commandstringเอาต์พุตมาตรฐาน
cwdstringเอาต์พุตข้อผิดพลาดมาตรฐาน
duration_msnumberคำสั่งที่ดำเนินการ

Example: Run npm install

yaml
command: npm install
cwd: ./my-project

Example: Run tests with pytest

yaml
command: python -m pytest tests/ -v
timeout: 120

Example: Git status

yaml
command: git status --porcelain

Example: Build project

yaml
command: npm run build
cwd: ./frontend
env: {"NODE_ENV": "production"}

SSH Execute

ssh.exec

รันคำสั่งบนเซิร์ฟเวอร์ระยะไกลผ่าน SSH

Parameters:

NameTypeRequiredDefaultDescription
hoststringYes-ชื่อโฮสต์หรือ IP ของเซิร์ฟเวอร์ SSH
portnumberNo22พอร์ต SSH
usernamestringYes-ชื่อผู้ใช้ SSH
passwordstringNo-รหัสผ่าน SSH
private_keystringNo-กุญแจส่วนตัวรูปแบบ PEM
commandstringYes-คำสั่งที่จะรันบนเซิร์ฟเวอร์ระยะไกล
timeoutnumberNo30เวลาหมดของคำสั่งในวินาที

Output:

FieldTypeDescription
okbooleanWhether command succeeded
dataobject

Example: List files on remote server

yaml
host: 192.168.1.100
username: deploy
command: ls -la /var/www

Example: Restart service

yaml
host: 10.0.0.5
username: root
command: systemctl restart nginx

SFTP Download

ssh.sftp_download

ดาวน์โหลดไฟล์จากเซิร์ฟเวอร์ระยะไกลผ่าน SFTP

Parameters:

NameTypeRequiredDefaultDescription
hoststringYes-ชื่อโฮสต์หรือ IP ของเซิร์ฟเวอร์ SSH
portnumberNo22พอร์ต SSH
usernamestringYes-ชื่อผู้ใช้ SSH
passwordstringNo-รหัสผ่าน SSH
private_keystringNo-คีย์ส่วนตัวรูปแบบ PEM
remote_pathstringYes-เส้นทางไปยังไฟล์บนเซิร์ฟเวอร์ระยะไกล
local_pathstringYes-เส้นทางปลายทางบนเครื่องในพื้นที่

Output:

FieldTypeDescription
okbooleanWhether download succeeded
dataobject

Example: Download server log

yaml
host: 10.0.0.5
username: deploy
remote_path: /var/log/nginx/access.log
local_path: /tmp/access.log

SFTP Upload

ssh.sftp_upload

อัปโหลดไฟล์ไปยังเซิร์ฟเวอร์ระยะไกลผ่าน SFTP

Parameters:

NameTypeRequiredDefaultDescription
hoststringYes-ชื่อโฮสต์หรือ IP ของเซิร์ฟเวอร์ SSH
portnumberNo22พอร์ต SSH
usernamestringYes-ชื่อผู้ใช้ SSH
passwordstringNo-รหัสผ่าน SSH
private_keystringNo-กุญแจส่วนตัวรูปแบบ PEM
local_pathstringYes-เส้นทางไปยังไฟล์ในเครื่องที่จะอัปโหลด
remote_pathstringYes-เส้นทางปลายทางบนเซิร์ฟเวอร์ระยะไกล
overwritebooleanNoTrueเขียนทับไฟล์ระยะไกลที่มีอยู่

Output:

FieldTypeDescription
okbooleanWhether upload succeeded
dataobject

Example: Upload deployment archive

yaml
host: 10.0.0.5
username: deploy
local_path: /tmp/app.tar.gz
remote_path: /opt/releases/app.tar.gz

รันขั้นตอน E2E

testing.e2e.run_steps

ดำเนินการขั้นตอนทดสอบ end-to-end ตามลำดับ

Parameters:

NameTypeRequiredDefaultDescription
stepsarrayYes-อาร์เรย์ของคำนิยามขั้นตอนทดสอบ
stop_on_failurebooleanNoTrueWhether to stop on failure
timeout_per_stepnumberNo30000Timeout Per Step value

Output:

FieldTypeDescription
okbooleanการดำเนินการสำเร็จหรือไม่
passednumberการดำเนินการสำเร็จหรือไม่
failednumberการดำเนินการสำเร็จหรือไม่
resultsarrayจำนวนการทดสอบที่ผ่าน

ประตูคุณภาพ

testing.gate.evaluate

ประเมินเมตริกคุณภาพเทียบกับเกณฑ์ที่กำหนด

Parameters:

NameTypeRequiredDefaultDescription
metricsobjectYes-เมตริกที่จะประเมิน
thresholdsobjectYes-เมตริกที่จะประเมิน
fail_on_breachbooleanNoTrueWhether to fail on breach

Output:

FieldTypeDescription
okbooleanค่าเกณฑ์สำหรับแต่ละเมตริก
passedbooleanการดำเนินการสำเร็จหรือไม่
resultsarrayการดำเนินการสำเร็จหรือไม่
summarystringจำนวนการทดสอบที่ผ่าน

รันการทดสอบ HTTP

testing.http.run_suite

ดำเนินการชุดทดสอบ HTTP API

Parameters:

NameTypeRequiredDefaultDescription
testsarrayYes-อาร์เรย์ของคำนิยามการทดสอบ HTTP
base_urlstringNo-Base URL for API requests
headersobjectNo{}HTTP request headers

Output:

FieldTypeDescription
okbooleanการดำเนินการสำเร็จหรือไม่
passednumberการดำเนินการสำเร็จหรือไม่
failednumberการดำเนินการสำเร็จหรือไม่
resultsarrayจำนวนการทดสอบที่ผ่าน

รัน Linter

testing.lint.run

รันการตรวจสอบ lint บนซอร์สโค้ด

Parameters:

NameTypeRequiredDefaultDescription
pathsarrayYes-ไฟล์หรือไดเรกทอรีที่จะ lint
linterstringNoautoLinter
fixbooleanNoFalseWhether to fix

Output:

FieldTypeDescription
okbooleanการดำเนินการสำเร็จหรือไม่
errorsnumberการดำเนินการสำเร็จหรือไม่
warningsnumberการดำเนินการสำเร็จหรือไม่
issuesarrayจำนวนข้อผิดพลาดที่พบ

สร้างรายงาน

testing.report.generate

สร้างรายงานการดำเนินการทดสอบ

Parameters:

NameTypeRequiredDefaultDescription
resultsobjectYes-Results data
formatstringNojsonFormat
titlestringNoTest ReportTitle

Output:

FieldTypeDescription
okbooleanการดำเนินการสำเร็จหรือไม่
reportstringการดำเนินการสำเร็จหรือไม่
formatstringการดำเนินการสำเร็จหรือไม่
summaryobjectรายงาน

รันสถานการณ์

testing.scenario.run

ดำเนินการทดสอบตามสถานการณ์ (รูปแบบ BDD)

Parameters:

NameTypeRequiredDefaultDescription
scenarioobjectYes-คำนิยามสถานการณ์พร้อม given/when/then
contextobjectNo{}Additional context data

Output:

FieldTypeDescription
okbooleanคำนิยามสถานการณ์พร้อม given/when/then
passedbooleanการดำเนินการสำเร็จหรือไม่
stepsarrayการดำเนินการสำเร็จหรือไม่

สแกนความปลอดภัย

testing.security.scan

สแกนหาช่องโหว่ด้านความปลอดภัย

Parameters:

NameTypeRequiredDefaultDescription
targetsarrayYes-ไฟล์, URL หรือพาธที่จะสแกน
scan_typestringNoallScan Type
severity_thresholdstringNomediumSeverity Threshold

Output:

FieldTypeDescription
okbooleanการดำเนินการสำเร็จหรือไม่
vulnerabilitiesarrayการดำเนินการสำเร็จหรือไม่
summaryobjectการดำเนินการสำเร็จหรือไม่

รันชุดทดสอบ

testing.suite.run

ดำเนินการชุดการทดสอบ

Parameters:

NameTypeRequiredDefaultDescription
testsarrayYes-อาร์เรย์ของคำนิยามการทดสอบ
parallelbooleanNoFalseWhether to parallel
max_failuresnumberNo0อาร์เรย์ของคำนิยามการทดสอบ

Output:

FieldTypeDescription
okboolean0 = ไม่จำกัด
passednumber0 = ไม่จำกัด
failednumberการดำเนินการสำเร็จหรือไม่
skippednumberจำนวนการทดสอบที่ผ่าน
resultsarrayจำนวนการทดสอบที่ล้มเหลว

รัน Unit Tests

testing.unit.run

ดำเนินการทดสอบ unit

Parameters:

NameTypeRequiredDefaultDescription
pathsarrayYes-พาธไปยังไฟล์ทดสอบหรือไดเรกทอรี
patternstringNotest_*.pyPattern
verbosebooleanNoFalseWhether to verbose

Output:

FieldTypeDescription
okbooleanการดำเนินการสำเร็จหรือไม่
passednumberการดำเนินการสำเร็จหรือไม่
failednumberการดำเนินการสำเร็จหรือไม่
errorsnumberจำนวนการทดสอบที่ผ่าน
resultsarrayจำนวนการทดสอบที่ล้มเหลว

เปรียบเทียบภาพ

testing.visual.compare

เปรียบเทียบเอาต์พุตภาพเพื่อหาความแตกต่าง

Parameters:

NameTypeRequiredDefaultDescription
actualstringYes-พาธหรือ base64 ของรูปภาพจริง
expectedstringYes-พาธหรือ base64 ของรูปภาพจริง
thresholdnumberNo0.1พาธหรือ base64 ของรูปภาพที่คาดหวัง
output_diffbooleanNoTrueWhether to output diff

Output:

FieldTypeDescription
okbooleanความแตกต่างสูงสุดที่อนุญาต (0-1)
matchbooleanการดำเนินการสำเร็จหรือไม่
differencenumberการดำเนินการสำเร็จหรือไม่
diff_imagestringการจับคู่

ประเมินคุณภาพ UI

ui.evaluate

ประเมินคุณภาพ UI อย่างครอบคลุมด้วยการให้คะแนนหลายมิติ

Parameters:

NameTypeRequiredDefaultDescription
screenshotstringYes-พาธหรือ URL ภาพหน้าจอที่จะประเมิน
app_typestringNoweb_appพาธหรือ URL ภาพหน้าจอที่จะประเมิน
page_typestringNo-ประเภทของหน้าที่ประเมิน
evaluation_criteriaarrayNo['visual_design', 'usability', 'accessibility', 'consistency', 'responsiveness']เกณฑ์เฉพาะที่จะประเมิน (ค่าเริ่มต้นทั้งหมด)
target_audiencestringNo-คำอธิบายผู้ใช้เป้าหมาย
brand_guidelinesstringNo-แนวทางแบรนด์สั้นๆ เพื่อตรวจสอบ
min_scorenumberNo70คะแนนขั้นต่ำเพื่อผ่าน (0-100)
api_keystringNo-OpenAI API key (ค่าเริ่มต้นใช้ OPENAI_API_KEY env var)

Output:

FieldTypeDescription
okbooleanOpenAI API key (ค่าเริ่มต้นใช้ OPENAI_API_KEY env var)
passedbooleanการประเมินสำเร็จหรือไม่
overall_scorenumberการประเมินสำเร็จหรือไม่
scoresobjectคะแนนคุณภาพ UI โดยรวม (0-100)
strengthsarrayคะแนนคุณภาพ UI โดยรวม (0-100)
issuesarrayคะแนนตามเกณฑ์การประเมิน
recommendationsarrayรายการจุดแข็งของ UI
summarystringคำแนะนำการปรับปรุงเฉพาะ

Example: Evaluate Dashboard

yaml
screenshot: ./screenshots/dashboard.png
app_type: dashboard
page_type: analytics dashboard
target_audience: business analysts
min_score: 75

Example: E-commerce Page Review

yaml
screenshot: ./screenshots/product.png
app_type: e_commerce
page_type: product detail
evaluation_criteria: ["usability", "cta_effectiveness", "visual_design"]

วิเคราะห์รูปภาพด้วย AI

vision.analyze

วิเคราะห์รูปภาพโดยใช้ OpenAI Vision API (GPT-4V)

Parameters:

NameTypeRequiredDefaultDescription
imagestringYes-Image file path, URL, or base64 data
promptstringYes-What to analyze in the image
analysis_typeselect (general, ui_review, accessibility, bug_detection, comparison, data_extraction)NogeneralType of analysis to perform
contextstringNo-Additional context about the image
output_formatselect (text, structured, json, checklist)NostructuredFormat of the analysis output
modelstringNogpt-4oSpecific model to use
max_tokensnumberNo1000Maximum tokens in response
api_keystringYes-API key for authentication
header_namestringNoX-API-KeyHTTP header name
detailselect (low, high, auto)NohighLevel of detail for image analysis

Output:

FieldTypeDescription
okbooleanการวิเคราะห์สำเร็จหรือไม่
analysisstringการวิเคราะห์สำเร็จหรือไม่
structuredobjectผลการวิเคราะห์ AI
modelstringข้อมูลการวิเคราะห์แบบมีโครงสร้าง (ถ้า output_format เป็น structured/json)
tokens_usednumberโมเดลที่ใช้ในการวิเคราะห์

Example: UI Review

yaml
image: ./screenshots/dashboard.png
prompt: Review this dashboard UI. Evaluate: 1) Visual hierarchy 2) Color contrast 3) Button visibility 4) Overall usability. Suggest specific improvements.
analysis_type: ui_review
output_format: structured

Example: Bug Detection

yaml
image: ./screenshots/form.png
prompt: Find any visual bugs, layout issues, or broken elements in this form
analysis_type: bug_detection

Example: Accessibility Check

yaml
image: ./screenshots/page.png
prompt: Evaluate accessibility: color contrast, text readability, button sizes, clear labels
analysis_type: accessibility

เปรียบเทียบรูปภาพ

vision.compare

เปรียบเทียบสองรูปภาพและระบุความแตกต่างทางภาพ

Parameters:

NameTypeRequiredDefaultDescription
image_beforestringYes-Path to baseline/before image
image_afterstringYes-Path to current/after image
comparison_typeselect (visual_regression, layout_diff, content_diff, full_analysis)Novisual_regressionType of comparison to perform
thresholdnumberNo5Acceptable difference percentage
focus_areasarrayNo-Specific areas to focus on
ignore_areasarrayNo-Areas to ignore (dynamic content, ads, etc.)
modelstringNogpt-4oSpecific model to use
api_keystringYes-API key for authentication
header_namestringNoX-API-KeyHTTP header name

Output:

FieldTypeDescription
okbooleanการเปรียบเทียบสำเร็จหรือไม่
has_differencesbooleanการเปรียบเทียบสำเร็จหรือไม่
similarity_scorenumberพบความแตกต่างที่สำคัญหรือไม่
differencesarrayเปอร์เซ็นต์ความคล้ายคลึง (0-100)
summarystringรายการความแตกต่างที่พบ
recommendationstringสรุปผลการเปรียบเทียบ

Example: Visual Regression Test

yaml
image_before: ./screenshots/baseline/home.png
image_after: ./screenshots/current/home.png
comparison_type: visual_regression
threshold: 5

Example: Layout Comparison

yaml
image_before: ./design/mockup.png
image_after: ./screenshots/implementation.png
comparison_type: layout_diff
focus_areas: ["header", "main content"]

Released under the Apache 2.0 License.