Skip to content

Releases

v0.5.6 — 記得上下文,講得出就做

Choose a tag to compare

@sAKURA4u sAKURA4u released this 04 Nov 11:02

新增

  • 最近對話(短期記憶):每個對話保留最後 20 條(我/佢),每次 turn 把最後 10 條原文放入 prompt,並隨 bridge.json 保存。之前每輪只看最新一句 + 記憶檢索,所以「我叫你改簡介啊」會消失。
  • 【講得出就要做】:有工具做到的(改 bio/名/頭像/私人公開/發帖/send reel)先呼叫工具再講結果;應承了要即刻做。

診斷

  • IG log 完全沒有 accounts/edit:它由頭到尾冇用過 ig_account,不是工具壞,是只講唔做。

v0.5.5 — Log 終於落檔

Choose a tag to compare

@sAKURA4u sAKURA4u released this 04 Nov 10:54

修正

  • bridge.log 冇出現:logger 用了空的 config.dataDir;實際目錄由 pluginDataDir() 解析。
  • 現在會寫入 ~/.dsh/ig-life/bridge.log(0600、2MB 輪替、secret 會 redact)。

同時確認

  • 18:53:54 與 18:54:01 的 direct_v2/threads/broadcast/text 都是 200:它其實已經回了兩條氣泡,只是 log 檔未落。

v0.5.4 — 終於有得睇 Log

Choose a tag to compare

@sAKURA4u sAKURA4u released this 04 Nov 10:50

新增

  • bridge.log — plugin 自己的 log 現在寫入 <dataDir>/bridge.log:
    • ISO 時間戳 + level(INFO/WARN)
    • 0600;2 MB 輪替到 bridge.log.1
    • sessionid/password/token/api_key 寫入前換成 [redacted]
    • 寫入失敗唔會拖死回覆流程

之後再遇「唔覆」,tail -f ~/.dsh/ig-life/bridge.log 就見到被邊個閘擋住。

v0.5.3 — 控制自己個帳號

Choose a tag to compare

@sAKURA4u sAKURA4u released this 04 Nov 10:18

新增

  • ig_account:控制自己的帳號 — 顯示名稱、bio(150 字)、頭像、私人/公開。
    對應 sidecar POST /account(account_set_private / account_set_public / account_edit / account_change_picture)。
  • 提示詞明講能力 — 改名/bio/頭像/私人公開、發帖、發 story、發 reel;唔好再話「我改唔到」。

限制

  • IG 唔准經 API 改 username;改名要人手。
  • 私人/公開切換依賴 instagrapi 3.x。

重啟 DSH 後生效(設定頁標頭應見到 v0.5.3)。

v0.5.2 — 主人永遠唔會被靜音

Choose a tag to compare

@sAKURA4u sAKURA4u released this 04 Nov 10:14

修正

  • 0.5.1 改了預設 dmPerDay: 0,但存過 settings.json 的機器仍然帶著舊的 12,所以照樣靜音。
  • 現在 checkBudget 接收 audience:主人永遠繞過 dm 上限,就算舊 overlay 還在都唔會再被鎖;非主人仍然受上限保護。
  • 你的 settings.json 已把 dmPerDay 改為 0。

重啟 DSH 後生效;舊訊息已標記看過,傳一句新的即可。

v0.5.1 — 唔再數住幾多條

Choose a tag to compare

@sAKURA4u sAKURA4u released this 04 Nov 10:07

修正

  • 每日私訊額度用滿之後連主人都唔回:內部上限仍然是 12,所以測試到第 12 條後 checkBudget 拒絕所有回覆,訊息照樣入 inbox(handled: false)。
  • 現在 limits.dmPerDay: 0 代表無限(預設);帖/留言的 0 同樣代表無限。每小時 40 個 agent turn 的防爆仍然保留。

重啟 DSH 後生效;舊訊息已被標記看過,唔會補回,傳一句新的即可。

v0.5.0 — 群組、社交、更像人

Choose a tag to compare

@sAKURA4u sAKURA4u released this 04 Nov 09:58

新增

  • 群組:sidecar 讀 group thread(isGroup / threadTitle),但唔會逐條回。有人叫名,或者它心情好(valence > 0.2)而隨機覺得有興趣,才出聲。
  • 社交:ig_follow、ig_follow_requests、ig_follow_request、ig_dm_user;對應 sidecar /follow、/follow-requests、/follow-request、/dm-user。
  • 人格預設:設定頁的三個框,空檔會用打包預設補上,永遠有字。
  • 設定簡化:移除每日額度區塊;它自己決定幾時講嘢。

之前 0.4.x 累積

  • Reels 清單(reels.pool)、reel_share 可省略連結、unofficial 讀 reel 媒體
  • 回覆節奏按情境與心情;壞心情可忽略陌生人,主人一定有回
  • 每行文字變成獨立訊息(最多 4 條)
  • Vision 設定(OpenAI 相容,API key 只寫不讀)
  • 設定頁顯示運行版本

已知限制

  • 群組只在被叫到或隨機有興趣時出聲;未有「讀晒全場再判斷」的深度理解。
  • 追蹤申請 API 依賴 instagrapi 3.x;IG 改動就可能失效。
  • Vision 只睇封面圖與 caption,不會逐格播片。

驗證

node scripts/test.mjs          # 240 tests
python src/test_ig_bridge.py   # 51 tests

v0.3.0 — 普通 IG 帳號那一副身體

Choose a tag to compare

@sAKURA4u sAKURA4u released this 03 Nov 16:45

新增

  • 非官方 transport(transport: unofficial)—— 本機 Python sidecar(instagrapi 3.2)收發私訊、傳圖/語音、發帖、回留言;與 graph 同一介面。
  • 入站輪詢 —— 10 秒地板、隨機 jitter、指數退避;事件形狀與 webhook 一致。
  • GUI 設定頁 —— 設定 → Instagram 人生:帳號、身體、白名單、生命節奏、額度、sidecar;每個選項都有說明;存 <dataDir>/settings.json(只寫改過的欄位,冇 token)。
  • 插件自己管 sidecar —— unofficial.autoStart,無需開終端;設定頁可啟動/重啟/安裝 Python 依賴。
  • sessionid 登入 —— IG 已停止提供密碼加密金鑰(password_publickeys() 會 int(None)),設定頁支援貼 sessionid,並以 login_by_sessionid() 重用 session。
  • 相容性 —— peerDependencies 覆蓋 DSH 0.1.x 與 0.2.x,新裝唔需要 compatibility.json。

安全

  • 兩層每日額度、發訊間隔、媒體白名單、登入退避、session 重用、同源檢查。
  • 密碼/sessionid 只寫入 sidecar 的 0600 檔案;插件唔存、唔 log、唔回傳。

已知限制

  • unofficial 收不到留言;ig_reply_comment 要 mediaId。
  • 2FA 不支援;voice note 要 m4a/opus,mp3 會退回檔案附件。
  • GUI 設定頁在部分環境可能空白(診斷中);可用 /ig-life/console 或 settings.json。
  • 私有協議隨時會壞,壞了不保證修好;用可以犧牲的小號。

驗證

node scripts/test.mjs          # 218 tests
python src/test_ig_bridge.py   # 42 tests

v0.2.0 — 會講話的一版

Choose a tag to compare

@sAKURA4u sAKURA4u released this 03 Nov 13:56

0.1.0 只會打字。這一版它會用聲講話、會忘記、也有自己的社交生活。

新增

  • 語音 — 任何 OpenAI-compatible TTS;語氣標記 [笑] [小聲] 抽走轉成語速,不會被讀出來;驗證通過才算成功
  • 表情包 — 收藏對方發來的圖、標情緒、按情境發;編號單向遞增不重用
  • Reels — 讀 metadata、封面可經 vision 看;分享直接傳連結,IG 自己轉成卡片
  • 潮語學習 — 必須主人 /slang ok 批准才進入提示詞
  • 每人一份印象 — 稱呼、印象、未講完的話題;跨對話隔離寫在程式裡
  • 網頁控制台 與離線狀態報告
  • 對話續接 — DSH 重啟後接回同一 session,不再每次都失憶
  • 24 小時回覆窗口 — 過窗不再白撞 API

修正

  • apply() 回傳物件 → Invalid effect → 整個 profile 起不來
  • CI 三處:node --check 對 top-level await 報錯、平台相關測試、self-check 假設主機有 DSH 套件
  • 桌面捷徑寫到 OneDrive 重定向前的假桌面
  • 表情包編號在刪除後被重用

已知限制

  • Instagram 官方 API 只支援 1:1:沒有群組、沒有原生 sticker、沒有 forward
  • 非官方私有 API(帳密登入)刻意不內建
  • 沒有回讀 API,所以語音的「已驗證」只代表送出請求成功
  • agent 引擎未在長期真實 session 驗證;失敗會退回 llm 引擎

完整日記:CHANGELOG.md

v0.1.0 — 把 DeepSeek 養進 Instagram

Choose a tag to compare

@sAKURA4u sAKURA4u released this 03 Nov 13:12

給 DeepSeek Harness 的 Instagram 插件:一副 IG 身體、一副會忘記的記憶、一條會自己生活的時間軸。

An Instagram body for DeepSeek Harness: DMs, plastic memory, and a life that keeps running when nobody is talking.


中文

它會做什麼

  • 收發 IG 私訊 — webhook 進來 → 變成一個真正的 DSH session → 模型自己決定回不回、怎麼回
  • 可塑性記憶 — 記得開頭、最近、真正重要的事;其餘逐日淡忘,每晚三點做一次「睡眠壓縮」
  • 自己生活 — 有體力、有心情、會睡;醒著時可能主動找你、發一篇日記
  • 用聲講話 — 文字 → TTS → 公開 mp3 → IG audio attachment;語氣標記 [笑] [小聲] 會被抽走轉成語速,不會被讀出來
  • 表情包 — 收藏對方發來的圖、標情緒、按情境挑一張發(編號永不重用)
  • 睇/傳 Reels — Graph metadata + 封面經 vision 睇;分享直接傳連結,IG 自己轉成卡片
  • 學潮語 — 提交 → 主人 /slang ok <id> 批准 → 才注入提示詞
  • 記住每個人 — 每人一份印象/話題/細節,跨對話隔離是硬規則

安全(寫在程式裡,不只是提示詞)

白名單 · 每日額度 · 同對話冷卻 · 靜音時段 · 24 小時回覆窗口 · 出站脫敏 · webhook HMAC 驗簽 · 記憶檔損壞隔離

安裝

dsh plugin --profile web add /path/to/dsh-ig-life

預設是 dryrun:一個字都不會發去 IG,全部寫進 ~/.dsh/ig-life/outbox.jsonl。

驗證

node scripts/self-check.mjs    # 一分鐘看它說話,不需帳號、不需 API key
node scripts/test.mjs          # 152 個測試,零依賴、零網絡
node scripts/loader-smoke.mjs  # 用真 Cordis 起一次,釘死載入契約

已知限制(誠實)

  • IG 官方 API 只支援 1:1,沒有群組;沒有 sticker、沒有 forward 概念
  • 非官方私有 API(帳密登入)刻意不內建 —— 違反 IG 條款、會封號
  • IG 沒有回讀 API,所以語音的 verified 只代表「送出請求成功」,失敗時協議要求改打字
  • agent 引擎尚未在長期真實 DSH session 驗證;失敗會自動退回 llm 引擎

English

What it does

  • Instagram DMs as a real channel — a webhook arrives, becomes a DSH session turn, and the model decides whether and how to answer.
  • Plastic memory — it remembers the beginning, the recent, and the genuinely important; everything else fades day by day. A nightly "sleep compression" promotes what it actually used and prunes the rest.
  • A daily rhythm — energy, mood, sleep. While awake it may reach out first, or publish a diary post.
  • Voice — text → TTS → public mp3 → IG audio attachment. Emotion markers are stripped and mapped to speech rate; they are never spoken aloud.
  • Stickers — collect images people send you, tag them, send the fitting one (numbers are never reused).
  • Reels — read metadata + cover via a vision endpoint; sharing just sends the link and Instagram renders the card itself.
  • Slang learning — submit → the owner approves with /slang ok <id> → only then is it injected.
  • Per-person memory — impressions and open topics per handle; cross-conversation leakage is blocked in code.

Safety, enforced in code

Allowlist · daily caps · per-thread cooldown · quiet hours · 24-hour reply window · outbound secret scrubbing · webhook HMAC verification · corrupt-store quarantine.

Install

dsh plugin --profile web add /path/to/dsh-ig-life

Dry-run by default: nothing is sent anywhere, everything lands in ~/.dsh/ig-life/outbox.jsonl.

Verify

node scripts/self-check.mjs    # watch it talk, one minute, no account and no API key
node scripts/test.mjs          # 152 tests, zero dependencies, no network
node scripts/loader-smoke.mjs  # boots under the real Cordis runtime

Honest limitations

  • The official API is 1:1 only — no groups, no stickers, no forwards.
  • The unofficial private API (password login) is deliberately not included: it violates Instagram's terms and gets accounts banned.
  • Instagram has no read-back API, so a voice message's verified only means "the send request succeeded"; the protocol requires falling back to text on failure.
  • The agent engine has not yet been validated over a long-lived real DSH session; it degrades to the llm engine on failure.

Credits

surfcore — a complete "DeepSeek raised on QQ" implementation. Several hard-won decisions here (the model must speak through tools, failures carry code + hint, persona and safety kept apart, budgets enforced in code) came from reading its source and docs.

MIT licensed.