နမူနာ
{
"requires": {
"interfaces": ["ledger", "mail"],
"plugins": [],
"tools": []
},
"skills": ["@example/skills/receipt-capture"],
"inputs": [
{
"key": "invoice_mailbox",
"label": "Mailbox that receives vendor invoices",
"type": "text",
"id": "finance.ap.invoice_mailbox",
"scope": "company",
"required": true,
"missing": "Ask the owner which mailbox to watch before processing invoices."
}
],
"memory": {
"mode": "separate",
"topics": [
{ "slug": "vendor", "description": "A supplier: terms, usual amounts, contacts, open disputes" }
]
},
"subscribes": ["finance.ap.*"],
"ceiling": { "ledger.bill.create": "approval" },
"workflows": {
"invoice-intake": {
"trigger": { "type": "watch", "plugin": "mail", "event": "email.new" },
"activities": [
{ "id": "record", "intent": "If the message in _watch_payload is a vendor invoice, record it as a bill." }
]
}
}
} Field များ
| Field | အမျိုးအစား | အဓိပ္ပာယ် |
|---|---|---|
requires.interfaces | string စာရင်း | mail သို့မဟုတ် ledger ကဲ့သို့ ရာထူးလိုအပ်သော စွမ်းရည်များ။ ခန့်အပ်ချိန်တွင် ပေးအပ်သည်။ အတည်ပြုချက်ဖြင့် ကာထားသော လုပ်ဆောင်ချက်တိုင်းသည် အတည်ပြုရမည့်အရာအဖြစ် ဆက်ရှိသည်။ စွမ်းရည်များနှင့် ခွင့်ပြုချက်များ ကို ကြည့်ပါ။ |
requires.plugins | string စာရင်း | ဝန်ထမ်းနှင့်အတူ ထည့်သွင်းသော plugin များ။ ရာထူးက plugin တစ်ခုအပေါ် တကယ် မှီခိုမှသာ အသုံးပြုပါ။ စွမ်းရည်ကို ပိုနှစ်သက်ပါ။ |
requires.tools | string စာရင်း | ဝန်ထမ်း၏ session ထဲသို့ ပထမဆုံး အလှည့်မှစ၍ load လုပ်ထားသော ကိရိယာများ။ ၎င်းသည် အတည်ပြုချက်ကို ဘယ်တော့မှ မကျော်ပါ။ |
skills | string စာရင်း | ထည့်သွင်းအသုံးပြုရမည့် စျေးကွက် ကျွမ်းကျင်မှုများ- @org/skills/name၊ ရွေးချယ်နိုင်သော @version သို့မဟုတ် SKIL- ကုဒ်။ package ၏ ကိုယ်ပိုင် skills/ ဖိုလ်ဒါရှိ ကျွမ်းကျင်မှုများအတွက် entry မလိုပါ။ |
inputs | list | ခန့်အပ်ချိန်တွင် ပိုင်ရှင် ဖြေရသော မေးခွန်းများ။ Input များ ကို ကြည့်ပါ။ |
memory | object | စကားပြောဆိုမှုများနှင့် မှတ်ဉာဏ် ထိန်းသိမ်းပုံ။ ပုဂ္ဂိုလ်ရေးလက္ခဏာနှင့် မှတ်ဉာဏ် ကို ကြည့်ပါ။ |
subscribes | string စာရင်း | finance.ar.* ကဲ့သို့ ပြောင်းလဲသည့်အခါ ဝန်ထမ်းက ပြန်ဖတ်သော ကုမ္ပဏီ အချက်အလက် နယ်ပယ်များ။ |
ceiling | map | လုပ်ဆောင်ချက်မှ "approval" သို့။ ထိုလုပ်ဆောင်ချက်သည် ဤဝန်ထမ်းအတွက် ပိုင်ရှင်ကို အမြဲ မေးပါသည်။ အခြား တန်ဖိုးကို လက်မခံပါ။ |
workflows | map | လုပ်ငန်းစဉ် အမည်မှ လုပ်ငန်းစဉ်သို့။ လုပ်ငန်းစဉ်များ ကို ကြည့်ပါ။ |
tools | list | အက်ပ်၏ sidecar က ပေးသော HTTP ကိရိယာများ။ Sidecar ကိရိယာများ ကို ကြည့်ပါ။ |
scopes | map | tools၊ skills နှင့် plugins ၏ အမည်ပေးထားသော အုပ်စုများ။ scope တစ်ခု အသက်ဝင်နေသည့်အခါ ၎င်း၏ plugins ကို ဝန်ထမ်းထံ ဖော်ပြပေးပါသည်။ |
Input များ
input ဆိုသည်မှာ ပိုင်ရှင်က ခန့်အပ်စဉ် ဖြေဆိုသော မေးခွန်း ဖြစ်သည်။ အဖြေများသည် ဝန်ထမ်းထံ "Configured Inputs" အောက်တွင် ပေါ်လာပြီး watch နှင့် folder trigger များရှိ {{key}} placeholder များကို ဖြည့်ပေးသည်။
{
"key": "close_day",
"label": "Business day to finish the close",
"type": "select",
"options": [
{ "value": "3", "label": "Third business day" },
{ "value": "5", "label": "Fifth business day" }
],
"default": "5",
"scope": "company",
"id": "finance.close.day"
} | Field | ပုံသေ | အဓိပ္ပာယ် |
|---|---|---|
key | လိုအပ်သည် | placeholder များတွင် အသုံးပြုသော အမည်။ name ကို အရန်အဖြစ် လက်ခံသည်။ |
label | key မှ | ပိုင်ရှင်ထံ ပြသသော မေးခွန်း။ |
type | text | text၊ textarea၊ number၊ select၊ checkbox သို့မဟုတ် radio။ |
required | false | ပိုင်ရှင် မဖြစ်မနေ ဖြေရမည့် မေးခွန်းအဖြစ် အမှတ်အသားပြုသည်။ |
default | မရှိ | ကြိုတင်ဖြည့်ထားသော အဖြေ။ ငွေကြေး မေးခွန်းတွင် ခွင့်မပြုပါ။ |
placeholder, description | မရှိ | အကူအညီ စာသား။ |
options | မရှိ | select နှင့် radio အတွက်- {value, label} object များ သို့မဟုတ် ရိုးရိုး string များ။ |
id | မရှိ | အခြား ဝန်ထမ်းများ မျှဝေနိုင်ရန် finance.ap.invoice_mailbox ကဲ့သို့ အချက်အလက်အတွက် တည်ငြိမ်သော dot ပါ အမည်။ |
scope | company | company- မျှဝေထားသော ကုမ္ပဏီ အချက်အလက်။ seat- ဤခန့်အပ်မှုအတွက်သာ။ |
missing | မရှိ | မေးခွန်းကို မဖြေရသေးစဉ် ဝန်ထမ်း လုပ်ဆောင်သည့်အရာ။ |
money | false | ငွေပမာဏကို အမှတ်အသားပြုသည်။ ငွေကြေး မေးခွန်းတွင် ပုံသေတန်ဖိုး မရှိနိုင်ပါ။ |
Sidecar ကိရိယာများ
sidecar ပါသော အက်ပ်သည် HTTP endpoint များကို ၎င်း၏ ဝန်ထမ်းထံ ကိရိယာများအဖြစ် ထုတ်ပေးပါသည်။ Nebo က entry တစ်ခုစီကို app__<app>__<name> အဖြစ် မှတ်ပုံတင်ပြီး ခေါ်ဆိုမှုများကို sidecar ၏ method နှင့် path သို့ ပို့ပါသည်။ အက်ပ် Sidecar ကို ကြည့်ပါ။
"tools": [
{
"name": "list_entries",
"description": "List journal entries for a date range.",
"method": "GET",
"path": "/entries",
"input_schema": { "type": "object", "properties": { "from": { "type": "string" } } }
}
] လုပ်ငန်းစဉ်များ
workflows အောက်ရှိ key တစ်ခုစီသည် လုပ်ငန်းစဉ်တစ်ခုကို အမည်တပ်ပြီး အမည်သည် ၎င်း၏ အမှတ်အသား ဖြစ်သည်။ ပုံစံ အပြည့်အစုံကို လုပ်ငန်းစဉ်များ၊ အစပျိုးချက်များ နှင့် လုပ်ဆောင်မှုများ တွင် ဖော်ပြထားသည်။