跳到內容
繁體中文

備註

Pixling 正在準備於 Mac App Store 上架。歡迎到 pixling.app 加入候補名單,上架時會通知你。

備註是附加在素材、書桌居民或代理工作階段上的選用本機筆記。使用者在 Pixling 的 備註 下檢視和編輯它們,分成 這位、圖鑑,以及綁定了工作階段時的 對話。

每次 note.get 和 note.set 呼叫都會指定以下三種範圍之一:

scope to 備註屬於
asset 素材庫的 No.N 或確切名字 素材,由它的所有複製共用
entity 一位居民(不能是 auto 或 everyone) 書桌上的那位居民
session 只能是 client:<namespace>/<key> resident.ensure 的綁定,包括保留中和收起來的綁定

其他任何 scope/to 組合都會以 to 上的 invalidArguments 被拒絕。

MCP:pixling_note_get 和 pixling_note_set

「MCP:pixling_note_get 和 pixling_note_set」一節
MCP 請求(pixling_note_set)
{
"scope": "session",
"to": "client:my-agent/conversation-1",
"note": "Reviews pull requests"
}
MCP 結果
{
"scope": "session",
"target": "client:my-agent/conversation-1",
"note": "Reviews pull requests"
}
  • note.get:需要 scope 和 to。
  • note.set:需要 scope、to 和 note(字串)。傳入空字串會清除備註。因為 note.set 會取代整份備註,所以標註為具破壞性(destructive)。
  • 回傳格式:兩者都回傳 {scope, target, note},其中 target 是解析後的識別碼:素材 ID、居民的實體 ID,或 client:<namespace>/<key>。

上限與權限:

  • 字數上限:最多 200 個字元,以擴展字素叢集計算,而非位元組或 Unicode 碼位。一個中文字或組合表情符號算 1 個字元。
  • 允許字元:允許換行和 tab;其他控制字元會被拒絕。
  • 錯誤與所有權:未知目標會回傳 targetNotFound。寫入被其他用戶端綁定的居民的 entity 備註,適用標準的綁定規則。

在建立時設定備註

「在建立時設定備註」一節

你也可以在叫出、綁定或採用時一併附上備註:

操作欄位 設定項目 CLI 旗標
resident.summon.note 新居民的 entity 備註 resident summon --note
resident.ensure.note session 備註 resident ensure --note
resident.ensure.initial.note 新居民的 entity 備註 resident ensure --initial-note,或 --initial JSON 裡的 initial.note(不能兩者並用)
import.adopt.note asset 備註(僅限首次採用) import adopt --note
終端機
pixling note get --scope entity --to 'No.7#1'
pixling note set --scope session --to 'client:my-agent/conversation-1' --note 'Reviews pull requests'
pixling note set --scope asset --to No.7 --note ''

--scope 和 --to 直接對應 scope 和 to;note set 需要 --note。給人看的輸出是一行 SCOPE TARGET: NOTE,--json 則印出 {scope, target, note} 文件。