dsh-antigravity-bridge
其他 活跃维护

dsh-antigravity-bridge

qvsix/dsh-antigravity-bridge

自动解析本地Antigravity SQLite数据库,列出全部历史会话,支持直接阅读与一键导入,将对话无缝挂载到侧边栏,无需手动导出转换。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
13 KB
仓库大小
2 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:qvsix/dsh-antigravity-bridge
git clone https://github.com/qvsix/dsh-antigravity-bridge.git
git clone git@github.com:qvsix/dsh-antigravity-bridge.git
README.md main

dsh-antigravity-bridge

A Cordis plugin that opens Google Antigravity conversations inside DeepSeek Harness.
Antigravity stores each conversation as SQLite + protobuf blobs under
~/.gemini/antigravity/conversations/<cascade_id>.db; this plugin reads them
and exposes them as native DSH tools and slash commands.

Tools

Tool Description
antigravity_list Recent conversations (id, timestamp, steps, title). Supports limit/offset
antigravity_read Read one conversation as cleaned text (user prompts, tool results, summaries, background task output). Supports max_chars
antigravity_import Convert one conversation into a DSH session (session.jsonl.zstd), attach it to a workspace, and return a conversation:// link

Slash commands (/ autocomplete)

Run directly, no need to ask the agent:

Command Description
/antigravity-list [N] Recent conversations (find IDs)
/antigravity-read <cascade_id> Read one conversation
/antigravity-import <cascade_id \| latest> Import as a DSH session. Bare command shows the 5 most recent plus usage

Requirements

  • Python 3 (stdlib only, no dependencies) — override via ANTIGRAVITY_PYTHON
  • zstd CLI (for import compression, ships with the DSH host)
  • Antigravity conversations default to ~/.gemini/antigravity/conversations
    (override via ANTIGRAVITY_CONVERSATIONS or the conversations_dir argument)
  • DSH_HOME (falls back to the macOS default ~/Library/Application Support/dsh-desktop/harness)

Install

dsh plugin --profile web add dsh-antigravity-bridge

Local path install (no build step — src/index.js + decoder/*.py run as-is):

dsh plugin --profile web add /path/to/dsh-antigravity-bridge

How it works

  1. decoder/antigravity_decode.py copies the .db to tmp first (avoids SQLite
    journal issues) and heuristically decodes steps.step_payload protobuf blobs
    (type 14=user, 132/15=tool, 23=summary, 101=background task).
  2. antigravity_import builds a spec-compliant DSH session log at
    sessions/<projectKey(cwd)>/session-<cascade_id>/session.jsonl.zstd
    (atomic tmp+rename write) and attaches it through the sanctioned path:
    workspaceRegistry.resolveByPath + attachSession while running
    (same write-chain as native flows, sidebar updates without restart),
    atomic workspace.json edit as fallback for profiles without a registry.
    (projectKey/encodeSegment mirror @deepseek-ai/dsh-session-persistence-jsonl)
  3. session_projcache is intentionally untouched. The backend materializes
    projections from the session log on first open (verified in practice).
  4. Re-importing is idempotent — returns the existing link instead of overwriting.

Sidebar-plugin conflicts

Effectively none. attachSession is the same funnel native flows use, so
dsh-better-sidebar / dsh-archived-chats / dsh-rewind-plugin see imported
sessions like any ordinary session. Imports run once per explicit invocation —
no background writes, no projcache edits, no global state changes.

Check

npm run check   # node --check + python py_compile
python3 decoder/antigravity_decode.py list --limit 5

License

MIT