feat(protocol): expand Obsidian wikilinks in attach_context

When attaching Obsidian notes, extract [[wikilinks]] from the note
content and resolve them to actual vault files. Linked notes are
attached as "obsidian_wikilink" type, bounded by remaining_tokens.

Supports both [[Note]] and [[Note|Display]] syntax.

Closes #102

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
林 駿甫 (Shunsuke Hayashi) 2026-04-10 10:21:01 +09:00
parent 92c551f1b7
commit 263adf87cd
6 changed files with 103 additions and 16 deletions

View file

@ -5,8 +5,11 @@
# ロックされていないファイルへの書き込みをブロックする。
TOOL_INPUT="$1"
MIYABI_BIN="/Users/shunsukehayashi/dev/platform/miyabi-cli-standalone/target/release/miyabi"
STORE="/Users/shunsukehayashi/dev/platform/miyabi-cli-standalone/project_memory/tasks.json"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
# 上書き可: 別ビルドパスやインストール済み miyabi を指す
MIYABI_BIN="${MIYABI_BIN:-$REPO_ROOT/target/release/miyabi}"
STORE="${POLARIS_TASK_STORE:-$REPO_ROOT/project_memory/tasks.json}"
# miyabi バイナリがなければスキップ
if [ ! -x "$MIYABI_BIN" ]; then
@ -33,7 +36,6 @@ if [ -z "$TARGET_FILE" ]; then
fi
# リポルートからの相対パスに変換
REPO_ROOT="/Users/shunsukehayashi/dev/platform/miyabi-cli-standalone"
REL_PATH="${TARGET_FILE#$REPO_ROOT/}"
# ロック一覧を取得

View file

@ -5,8 +5,10 @@
# ここでは軽い状態表示のみ。
TOOL_INPUT="$1"
MIYABI_BIN="/Users/shunsukehayashi/dev/platform/miyabi-cli-standalone/target/release/miyabi"
STORE="/Users/shunsukehayashi/dev/platform/miyabi-cli-standalone/project_memory/tasks.json"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
MIYABI_BIN="${MIYABI_BIN:-$REPO_ROOT/target/release/miyabi}"
STORE="${POLARIS_TASK_STORE:-$REPO_ROOT/project_memory/tasks.json}"
# miyabi バイナリがなければスキップ
if [ ! -x "$MIYABI_BIN" ]; then