Skip to content

sync_pull

✅ 라이브 (서버)

vault_* / sync_* 도구는 api.ainote.dev 서버에서 동작합니다 — JSON-RPC POST /api/mcp 또는 @ainote/sdk (ai.vault.* / ai.sync.*)로 호출하세요. (일부 vault 도구는 연결된 git-backed vault가 필요. 참고: @ainote/mcp npm 패키지 구버전엔 번들이 안 됐을 수 있으니 직접 JSON-RPC 또는 SDK 사용 권장.)

ainote hub → 로컬. 변경된 파일 받기.

시그니처

단일 파일

json
{
  "name": "sync_pull",
  "arguments": {
    "path": "global/CLAUDE.md"
  }
}

여러 파일 (since)

json
{
  "name": "sync_pull",
  "arguments": {
    "since": "2026-05-06T00:00:00Z",
    "device_id": "macmini-2026-04-A1B2"
  }
}

초기 (모든 파일)

json
{
  "name": "sync_pull",
  "arguments": {
    "initial": true,
    "device_id": "macmini-2026-04-A1B2"
  }
}
파라미터타입설명
pathstring단일 파일
sinceISO 8601이 시각 이후 변경된 것
initialboolean모든 파일 (새 디바이스)
device_idstring자기 디바이스 변경은 제외
pathsarray특정 경로들만

응답

단일

json
{
  "path": "global/CLAUDE.md",
  "content": "<file content>",
  "sha256": "abc123...",
  "hlc": "2026-05-07T14:02:30.0.macbook",
  "git_sha": "def456...",
  "stored_at": "2026-05-07T14:02:30Z",
  "device_id": "macbook-2026-03",
  "remote_mtime": "2026-05-07T14:02:30Z"
}

Multi (since / initial)

json
{
  "files": [
    { "path": "global/CLAUDE.md", "content": "...", "sha256": "...", "hlc": "..." },
    { "path": "global/PERSONAS.md", "content": "...", ... }
  ],
  "total_count": 53,
  "total_size_bytes": 234000
}

Streaming

큰 결과 (since 가 오래됨, initial) 는 NDJSON 자동:

bash
curl -N -X POST .../api/mcp \
  -H "Accept: application/x-ndjson" \
  -d '{"...":"sync_pull","arguments":{"initial":true}}'

각 줄이 한 파일.

에러

코드메시지
-32005path not found
-32602invalid since format

Claude

어제 이후 변경된 거 다 받아
bash
ainote sync_pull '{"since":"2026-05-06T00:00:00Z"}'

다음