테마
sync_list
✅ 라이브 (서버)
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 의 sync 대상 파일 메타데이터 조회 (content 없이). 응답은 페이지 단위다(기본 200개, 최대 1000개).
시그니처
json
{
"name": "sync_list",
"arguments": {
"path": "global",
"since": "2026-05-01T00:00:00Z",
"limit": 1000
}
}| 파라미터 | 타입 | 설명 |
|---|---|---|
path | string | 디렉터리(하위 전체) 또는 정확한 파일 경로. 끝 슬래시는 무시 |
since | ISO 8601 | 이 시각 이후(초과) 변경된 파일만. 삭제는 알려주지 않는다 |
limit | integer | 페이지 크기. 기본 200, 최대 1000 |
cursor | string | 직전 응답의 next_cursor |
응답
json
{
"entries": [
{
"path": "global/CLAUDE.md",
"updated_at": "2026-05-07T14:01:00Z",
"kind": "note",
"git_sha": "def456..."
}
],
"count": 1,
"has_more": false,
"next_cursor": null
}content 없음 — 받으려면 sync_pull 의 paths 로 필요한 것만 받는다. git_sha 는 내용 자체의 SHA1 이다.
사용 시나리오
sync 전 diff 확인
python
import hashlib
remote = {}
cursor = None
while True:
args = {"limit": 1000, **({"cursor": cursor} if cursor else {})}
page = mcp_call("sync_list", args)
remote.update({e["path"]: e["git_sha"] for e in page["entries"]})
if not page["has_more"]:
break
cursor = page["next_cursor"]
local = {path: hashlib.sha1(text.encode()).hexdigest() for path, text in scan_local()}
changed = [p for p, sha in remote.items() if local.get(p) != sha]
deleted = [p for p in local if p not in remote]디렉터리 하나 / 파일 하나
bash
ainote sync_list '{"path":"global"}'
ainote sync_list '{"path":"global/CLAUDE.md"}'최근 변경 모니터
bash
# 매 시간
ainote sync_list '{"since":"<1h ago>"}'에러
| 코드 | 메시지 |
|---|---|
| -32602 | since 형식 오류 |
Claude
지난주 변경된 sync 파일 보여줘
launchcrew 폴더에 뭐 있나