ထိပ်ဆုံးအဆင့် field များ
| Field | Type | မဖြစ်မနေ | အဓိပ္ပာယ် |
|---|---|---|---|
id | string | ဟုတ် | Plugin ၏ စျေးကွက် identifier။ ဖန်တီးနေစဉ် slug ကို သုံးပါ။ |
slug | string | ဟုတ် | မပြောင်းလဲသော identifier။ [a-z0-9-]၊ စာလုံး 64 လုံးအထိ၊ ရှေ့၊ နောက် သို့မဟုတ် နှစ်ခုဆက် hyphen မပါရ။ plugin__<slug> tool နှင့် <SLUG>_BIN variable ကို အမည်ပေးသည်။ |
name | string | ဟုတ် | ပြသမည့်အမည်။ ၎င်းချိတ်ဆက်သော ဝန်ဆောင်မှု၏ အမည်ကို ထည့်ပါ။ |
version | string | ဟုတ် | 0.1.0 ကဲ့သို့ Semantic version။ |
platforms | map | ဟုတ် | Platform key မှ binary သို့။ Platform များကို ကြည့်ပါ။ |
description | string | မဟုတ် | လူများနှင့် ဝန်ထမ်းများအတွက် ဝါကျတစ်ကြောင်း။ |
author | string | မဟုတ် | ထုတ်ဝေသူ အမည်။ |
category | string | မဟုတ် | ဝန်ထမ်းများ Plugin ကို ရှာတွေ့ရန် ကူညီသည်။ |
triggers | string စာရင်း | မဟုတ် | Plugin ကို မည်သည့်အခါ သုံးရမည်ကို ဖော်ပြသော စကားလုံးများ။ ရှာဖွေမှု အရိပ်အမြွက်များတွင် သုံးသည်။ |
entrySkills | string စာရင်း | မဟုတ် | Plugin ၏ tool ဖော်ပြချက်တွင် ဦးစွာ ဖော်ပြရမည့် ပါဝင်သော ကျွမ်းကျင်မှုများ။ |
dependencies | {name, version, optional} စာရင်း | မဟုတ် | ဤ Plugin က run သော အခြား Plugin များ။ version ၏ မူလတန်ဖိုးမှာ "*" ဖြစ်ပြီး optional ၏ မူလတန်ဖိုးမှာ false ဖြစ်သည်။ ၎င်းတို့၏ <SLUG>_BIN path များကို ခေါ်ဆိုမှုတိုင်းတွင် သတ်မှတ်ပေးသည်။ |
auth | object | မဟုတ် | အကောင့်ဝင်ခြင်းနှင့် အကောင့်များ။ Auth ကို ကြည့်ပါ။ |
capabilities | object | မဟုတ် | configSchema, hooks, commands, routes, providers. |
permissions | object | မဟုတ် | Environment စစ်ထုတ်ခြင်းနှင့် timeout အမြင့်ဆုံးကန့်သတ်ချက်။ |
events | list | မဟုတ် | ဝန်ထမ်း၏ လုပ်ငန်းစဉ်များကို အချက်အလက် ပေးသော watcher များ။ |
interfaceBindings | map | မဟုတ် | Plugin က ပေးသော type သတ်မှတ်ထားသည့် operation များ။ |
channel | object | မဟုတ် | မက်ဆေ့ချ်ပို့ဝန်ဆောင်မှုတစ်ခုသို့ အမြဲတမ်း ချိတ်ဆက်ထားသော bridge။ |
setup | object | မဟုတ် | အဆင့်လိုက် setup wizard တစ်ခု။ |
Nebo သည် စျေးကွက်မှ ထည့်သွင်းမှုများကို စစ်ဆေးသည်- slug စည်းမျဉ်းများ၊ semantic version တစ်ခု၊ အနည်းဆုံး platform တစ်ခု၊ path ခွဲသင်္ကေတ သို့မဟုတ် .. မပါသော binaryName၊ auth.type သည် env မဟုတ်ပါက login command တစ်ခု၊ ဗလာမဟုတ်သော event အမည်များနှင့် command များ၊ parse လုပ်နိုင်သော binding template များ။ အသုံးပြုသူ Plugin ဖိုင်တွဲထဲရှိ Plugin များသည် စစ်ဆေးမှုကို ကျော်သည်။
Platform များ
Key များမှာ darwin-arm64၊ darwin-amd64၊ linux-arm64၊ linux-amd64၊ windows-arm64 နှင့် windows-amd64 ဖြစ်သည်။ Entry တစ်ခုစီတွင် အောက်ပါ field ငါးခုလုံး ပါသည်။ သင်ထုတ်ဝေသောအခါ စျေးကွက်က အမှန်တကယ် hash၊ အရွယ်အစား၊ လက်မှတ်နှင့် ဒေါင်းလုဒ် URL ကို ရေးပေးမည်ဖြစ်သောကြောင့် သင် upload လုပ်သော ဖိုင်တွင် ၎င်းတို့ကို ဗလာထားပါ။
"platforms": {
"darwin-arm64": { "binaryName": "notes-sync", "sha256": "", "signature": "", "size": 0, "downloadUrl": "" },
"linux-amd64": { "binaryName": "notes-sync", "sha256": "", "signature": "", "size": 0, "downloadUrl": "" },
"windows-amd64": { "binaryName": "notes-sync.exe", "sha256": "", "signature": "", "size": 0, "downloadUrl": "" }
} | Field | အဓိပ္ပာယ် |
|---|---|
binaryName | Executable ၏ ဖိုင်အမည်။ Windows တွင် .exe ထည့်ပါ။ |
sha256 | Binary ၏ hash။ ထည့်သွင်းချိန်တွင် စစ်ဆေးသည်။ |
signature | Binary ၏ လက်မှတ်။ Signing key ရှိပါက ထည့်သွင်းချိန်တွင် စစ်ဆေးသည်။ |
size | Byte ဖြင့် အရွယ်အစား။ |
downloadUrl | Nebo က package ကို ဒေါင်းလုဒ်လုပ်သည့်နေရာ။ |
Auth
| Field | အဓိပ္ပာယ် |
|---|---|
type | Plugin က run သော browser အကောင့်ဝင်မှုအတွက် oauth_cli၊ တန်ဖိုးများအဖြစ် ထည့်သွင်းသော credential များအတွက် env၊ _TOKEN ဖြင့်ဆုံးသော auth.env key တိုင်းတွင် ပိုင်ရှင်၏ NeboAI token ကို လက်ခံရန် neboai။ |
env | Variable အမည်မှ မူလတန်ဖိုးသို့ map။ Nebo က login သို့ ပေးပို့သော credential အမည်များမှာလည်း ဤအမည်များသာ ဖြစ်သည်။ |
commands.login | အကောင့်ဝင်သည်။ type သည် env မဟုတ်ပါက မဖြစ်မနေ လိုအပ်သည်။ အကောင့်ဖိုင်တွဲ သတ်မှတ်ပြီးဖြင့် run သည်။ |
commands.status | အကောင့် ဝင်ထား/မဝင်ထားကို ဖော်ပြသော JSON ကို ပြသသည်။ |
commands.refresh | အပြန်အလှန် ဆောင်ရွက်ရန်မလိုဘဲ token ကို သက်တမ်းတိုးသည်။ |
commands.logout | အကောင့်မှ ထွက်သည်။ ပိုင်ရှင်သာ run နိုင်သည်။ |
profileDirEnv | ဝန်ထမ်းနှင့် အကောင့်တစ်ခုစီအတွက် သီးခြား credential ဖိုင်တွဲကို လက်ခံသော variable။ ၎င်းမပါပါက Plugin သည် မျှဝေသုံးသော အကောင့်တစ်ခုသာ ကိုင်ထားသည်။ |
label, description | Connect ကတ်ပေါ်ရှိ စာသား။ |
help | ချိတ်ဆက်နေစဉ် ပြသမည့် {url, urlLabel, text}။ |
publicRedirect | Provider က http://localhost redirect များကို ငြင်းပယ်သောအခါ true ဟု သတ်မှတ်ပါ။ ထိုအခါ အကောင့်ဝင်ခြင်းသည် NeboAI ၏ အများသုံး redirect မှတစ်ဆင့် ဖြစ်မည်။ |
Nebo သည် status output ထဲရှိ authenticated၊ isAuthenticated၊ logged_in၊ loggedIn သို့မဟုတ် token_valid အနက် ပထမဆုံးတစ်ခုကို ဖတ်သည်။ ဗလာမဟုတ်သော token_error သို့မဟုတ် credential_source၊ auth_method၊ storage သို့မဟုတ် status တွင် none တန်ဖိုး ရှိခြင်းသည် အကောင့်မှ ထွက်ထားသည်ဟု ဆိုလိုသည်။ Status command အတွက် 45 စက္ကန့် ရသည်။
{"authenticated": true, "account": "finance@example.com"} configSchema
capabilities.configSchema သည် ပိုင်ရှင်က Plugin အတွက် သတ်မှတ်သော တန်ဖိုးများကို ဖော်ပြသည်။ တန်ဖိုးတစ်ခုစီသည် key ဖြင့် အမည်ပေးထားသော environment variable အဖြစ် binary ထံ ရောက်သည်။ auth.env တွင်လည်း ပါဝင်သော credential key များအတွက် schema သည် ဝန်ထမ်းတစ်ဦးချင်း connect form ၏ field များကို အမည်တပ်ပေးသည်။
| Field | Type | မူလတန်ဖိုး | အဓိပ္ပာယ် |
|---|---|---|---|
key | string | မဖြစ်မနေ | Environment variable အမည်။ |
label | string | မဖြစ်မနေ | Field အမည်။ |
description | string | "" | အကူအညီ စာသား။ |
fieldType | string | "string" | string၊ number၊ boolean၊ select သို့မဟုတ် password ကဲ့သို့ input type။ |
default | string | မရှိ | ကြိုတင်ဖြည့်ထားသော တန်ဖိုး။ |
required | boolean | false | တန်ဖိုး မသတ်မှတ်မချင်း Plugin အသင့်မဖြစ်ပါ။ |
secret | boolean | false | ပြန်ဖတ်သောအခါ တန်ဖိုးကို ဖုံးထားသည်။ |
options | string စာရင်း | မရှိ | select အတွက် ရွေးချယ်စရာများ။ |
permissions
| Field | မူလတန်ဖိုး | အဓိပ္ပာယ် |
|---|---|---|
envAllow | [] | Plugin မြင်နိုင်သော အမွေဆက်ခံ variable များ။ ဗလာထားပါက အားလုံးကို ခွင့်ပြုသည်။ |
envDeny | [] | အမြဲ ဖယ်ရှားသော အမွေဆက်ခံ variable များ။ |
maxTimeoutSeconds | 300 | မည်သည့်ခေါ်ဆိုမှု၏ timeout အတွက်မဆို အမြင့်ဆုံး ကန့်သတ်ချက်။ |
network | false | Network အသုံးပြုမှုကို ကြေညာသည်။ အသိပေးရန်သာ ဖြစ်ပြီး ကန့်သတ်ခြင်း မပြုပါ။ |
events
Event တစ်ခုသည် ကြာရှည်စွာ လည်ပတ်သော watcher တစ်ခု ဖြစ်သည်။ ဝန်ထမ်းတစ်ဦး၏ လုပ်ငန်းစဉ်က ၎င်းကို စောင့်ကြည့်သောအခါ Nebo က စတင်ပေးပြီး ရပ်သွားပါက ပြန်စပေးသည်။ Watcher က stdout သို့ ရေးသော စာကြောင်းတစ်ကြောင်းစီသည် event တစ်ခု ဖြစ်သည်။ Run ချိန်တွင် event အမည်ရှေ့၌ slug ကို ထည့်ပေးသောကြောင့် note.created သည် notes-sync.note.created ဖြစ်လာသည်။
"events": [
{
"name": "note.created",
"description": "A note was created in the watched notebook.",
"command": "watch --notebook {{notebook}} --format ndjson"
}
] | Field | အဓိပ္ပာယ် |
|---|---|
name | Slug မပါသော event အမည်။ မဖြစ်မနေ လိုအပ်သည်။ |
command | Watcher ကို စတင်သော argument များ။ မဖြစ်မနေ လိုအပ်သည်။ {{key}} ကို ဝန်ထမ်း၏ input တန်ဖိုးများဖြင့် အစားထိုးသည်။ |
description | Event ဖြစ်ပေါ်စေသည့်အရာ။ |
multiplexed | true ဖြစ်သောအခါ watcher တစ်ခုက event အမျိုးအစား အများအပြားကို ထုတ်ပေးပြီး စာကြောင်းတစ်ကြောင်းစီတွင် "event" field ပါသည်။ |
လုပ်ငန်းစဉ်များသည် watch trigger ဖြင့် event များကို စာရင်းသွင်းသည်။ Trigger များ ကို ကြည့်ပါ။
interfaceBindings
Binding တစ်ခုသည် interface operation တစ်ခုကို သင့် command တစ်ခုနှင့် ချိတ်ပေးသည်။ Binding တစ်ခုစီသည် ဝန်ထမ်းများအတွက် type သတ်မှတ်ထားသော tool တစ်ခု ဖြစ်လာပြီး operation အမည်ကို စာလုံးအသေးဖြင့်၊ အစက်နှင့် hyphen များကို underscore အဖြစ် ပြောင်း၍ အမည်ပေးသည်- notes.search သည် notes_search ဖြစ်လာသည်။ Binding များသည် ဝန်ထမ်းတစ်ဦး လိုအပ်သော စွမ်းရည်များကို Plugin က ဖြည့်ဆည်းပေးသည့် နည်းလမ်း ဖြစ်သည်။ စွမ်းရည်များ ကို ကြည့်ပါ။
"interfaceBindings": {
"notes.search": "notes search --query {query} {tag[]:--tag} {limit?:--limit}",
"invoice.create": "invoices create --amount {amount_cents:cents->dollars}"
} | Placeholder | ချဲ့ထွင်ပြီးရလဒ် |
|---|---|
{field} | Field ၏တန်ဖိုးကို စကားလုံးတစ်လုံးအဖြစ်။ Field ကို flag အဖြစ်ပါ ထပ်မပေးပါ။ |
{field[]:--flag} | စာရင်း field ထဲရှိ item တစ်ခုစီအတွက် --flag <item> အတွဲတစ်တွဲ။ |
{field?:--flag} | Field ရှိသောအခါ --flag <value>၊ မရှိသောအခါ ဘာမှမပါ။ |
{field:cents->dollars} | ဒေါ်လာဖြင့် ရေးထားသော cent ပမာဏ ကိန်းပြည့်။ |
Template တွင် အမည်မပါသော input field များကို --field value အဖြစ် နောက်တွင် ဆက်ထည့်သည်။ စာရင်းနှင့် မဖြစ်မနေမဟုတ်သော placeholder များသည် စကားလုံးအပြည့် ဖြစ်ရမည်။ ခွင့်ပြုချက် လိုအပ်သော operation ကို plugin__<slug> မှတစ်ဆင့် တူညီသော command ကို ခေါ်ခြင်းဖြင့် မရောက်နိုင်ပါ။
Hook များ၊ slash command များနှင့် route များ
"capabilities": {
"hooks": [
{ "hook": "tool.post_execute", "hookType": "filter", "command": "hook redact", "priority": 50, "timeoutMs": 500 }
],
"commands": [
{ "name": "notes", "description": "Show today's notes", "command": "notes today", "slash": true }
],
"routes": [
{ "path": "/callback", "method": "GET", "command": "http callback" }
]
} hooks
hook တစ်ခုသည် ဝန်ထမ်း၏ အလှည့်အတွင်း အချက်တစ်ခုတွင် သင့် command ကို လုပ်ဆောင်သည်။ Nebo သည် JSON payload ကို stdin သို့ ရေးသည်။ action hook ၏ output ကို လျစ်လျူရှုသည်။ filter hook သည် {"payload": ..., "handled": false} ကို ပြန်ပေးသည်၊ "handled": true က နောက်ပိုင်း hook များကို ရပ်စေသည်။ error များနှင့် အချိန်ကုန်ဆုံးမှုများသည် ယခင် payload ကို ထိန်းထားပြီး အလှည့်ကို ဘယ်တော့မှ မပိတ်ဆို့ပါ။ ဆက်တိုက် သုံးကြိမ် မအောင်မြင်ပြီးနောက် hook ကို ငါးမိနစ် ခေတ္တရပ်ထားသည်။
| Field | မူလတန်ဖိုး | အဓိပ္ပာယ် |
|---|---|---|
hook | မဖြစ်မနေ | tool.pre_execute၊ tool.post_execute၊ message.post_receive၊ session.message_append၊ steering.generate၊ agent.turn၊ agent.should_continue အနက် တစ်ခု။ |
hookType | "action" | action သို့မဟုတ် filter။ |
command | မဖြစ်မနေ | သင့် binary အတွက် argument များ။ |
priority | 100 | နိမ့်သည်က အရင် run သည်။ |
timeoutMs | 500 | Millisecond ဖြင့် အချိန်ကန့်သတ်ချက်။ |
commands
"slash": true ပါလျှင် chat ထဲတွင် /name args ဟု ရိုက်ခြင်းက ဝန်ထမ်းမပါဘဲ command args ကို တိုက်ရိုက် run သည်။ Output သည် အကြောင်းပြန်စာ ဖြစ်သည်။ အချိန်ကန့်သတ်ချက်မှာ 30 စက္ကန့် ဖြစ်သည်။
routes
Route တစ်ခုသည် ဘော့ပေါ်ရှိ /api/v1/plugins/<slug>/api/<path> တွင် HTTP တောင်းဆိုချက်များကို path နှင့် method ဖြင့် ကိုက်ညီစေ၍ တုံ့ပြန်သည်။ Request body သည် stdin သို့ သွားပြီး သင့် stdout သည် response ဖြစ်သည်။ အချိန်ကန့်သတ်ချက်မှာ 30 စက္ကန့် ဖြစ်သည်။
providers
Provider တစ်ခုသည် chat model ရင်းမြစ်တစ်ခုကို ထည့်ပေးသည်။ id၊ displayName၊ providerType၊ modelsCommand နှင့် chatCommand ကို ကြေညာပါ။ Nebo သည် chat တောင်းဆိုချက်ကို JSON အဖြစ် stdin မှတစ်ဆင့် chatCommand သို့ ပို့ပြီး stream လုပ်ထားသော event များကို stdout ပေါ်တွင် စာကြောင်းခွဲ JSON အဖြစ် စက္ကန့် 300 အထိ ဖတ်သည်။ ယနေ့ chat streaming ကိုသာ သုံးသည်။
channel
Channel တစ်ခုသည် မက်ဆေ့ချ်ပို့ဝန်ဆောင်မှုတစ်ခုနှင့် ဆက်သွယ်ပေးသည်။ Nebo သည် command ကို ဆက်လက် run ထားပြီး ဝင်လာသော မက်ဆေ့ချ်များကို ၎င်း၏ stdout မှ ဖတ်ကာ အကြောင်းပြန်စာများကို ၎င်း၏ stdin သို့ ရေးသည်။ နှစ်ခုလုံး စာကြောင်းခွဲ JSON ဖြစ်သည်။
| Field | မူလတန်ဖိုး | အဓိပ္ပာယ် |
|---|---|---|
command | မဖြစ်မနေ | Bridge ကို စတင်သော argument များ။ |
name, description | "" | ဆက်တင်များတွင် ပြသသည်။ |
restartDelaySecs | 5 | Crash ဖြစ်ပြီးနောက် ပြန်မစမီ စောင့်ချိန်။ |
shared | false | ဝန်ထမ်းအားလုံးအတွက် bridge တစ်ခု။ မက်ဆေ့ချ်များကို ဝန်ထမ်းအမည်ဖြင့် လမ်းကြောင်းပေးပြီး အကြောင်းပြန်စာများတွင် ဝန်ထမ်းတစ်ဦးစီ၏ ကိုယ်ပိုင်အမှတ်အသား ပါသည်။ |
needsLocalApi | false | Bridge ကို ဘော့၏ local API လိပ်စာ၊ token တစ်ခုနှင့် ဝန်ထမ်း id ကို ပေးပါ။ မလိုအပ်ပါက ပိတ်ထားသည်။ |
setup
setup wizard တစ်ခုသည် form တစ်ခုတည်းဖြင့် မလွှမ်းခြုံနိုင်သော အဆင့်များကို ပိုင်ရှင်အား တစ်ဆင့်ချင်း လမ်းပြသည်။ form အဆင့်များမှ တန်ဖိုးများသည် နောက်ပိုင်း generate argument များရှိ {{key}} ကို ဖြည့်သည်။ credentials အဆင့်များမှ တန်ဖိုးများကို plugin ၏ environment variable များအဖြစ် သိမ်းသည်။
"setup": {
"title": "Connect Example Chat",
"steps": [
{ "kind": "form", "title": "Bot name", "fields": [ { "key": "bot_name", "label": "Name", "required": true } ] },
{ "kind": "generate", "title": "App manifest", "command": "manifest", "args": ["--name", "{{bot_name}}"], "outputFormat": "yaml" },
{ "kind": "external", "title": "Create the app", "url": "https://example.com/apps", "urlLabel": "Open admin" },
{ "kind": "credentials", "title": "Paste the token", "fields": [ { "key": "EXAMPLE_CHAT_TOKEN", "label": "Token", "inputType": "password", "required": true } ], "verifyCommand": "auth status" }
]
} | အဆင့် အမျိုးအစား | Field များ |
|---|---|
form | title, description, fields |
generate | title၊ description၊ command၊ args၊ outputFormat (yaml၊ json၊ toml၊ text)၊ buttonLabel။ ကူးယူရန် command ၏ output ကို ပြသသည်။ |
external | title, description, url, urlLabel, instructions |
credentials | title၊ description၊ fields၊ verifyCommand။ verifyCommand အောင်မြင်သောအခါ အဆင့် ပြီးဆုံးသည်။ |
Field များတွင် key၊ label၊ default၊ placeholder၊ maxLength၊ help၊ inputType (text၊ textarea၊ password) နှင့် required တို့ ပါသည်။