← 返回
内容创作 Key 中文

EVC Team Relay

Read and write Obsidian notes stored in EVC Team Relay collaborative vault. Use when agent needs to: read note content from a shared Obsidian vault, create o...
读取和写入存储在 EVC Team Relay 协作库中的 Obsidian 笔记。适用于代理需要从共享 Obsidian 库读取笔记内容、创建或更新笔记的场景。
venturecrew
内容创作 clawhub v1.1.2 1 版本 100000 Key: 需要
★ 0
Stars
📥 628
下载
💾 22
安装
1
版本
#latest

概述

EVC Team Relay

REST API skill for reading and writing collaborative Obsidian vault documents via EVC Team Relay.

Environment variables

VariableRequiredDescription
---------------------------------
RELAY_CP_URLyesControl plane URL, e.g. https://cp.tr.entire.vc
RELAY_EMAILyesUser email for authentication
RELAY_PASSWORDyesUser password
RELAY_TOKENnoJWT token (set via export RELAY_TOKEN=$(scripts/auth.sh))

Quick start

# 1. Authenticate — get a JWT token (stored in env var, not visible in ps)
export RELAY_TOKEN=$(scripts/auth.sh)

# 2. List shares to find available documents
scripts/list-shares.sh

# 3. Read a file from a folder share BY PATH (most common)
scripts/read-file.sh <folder_share_id> "Marketing/plan.md"

# 4. Create or update a file in a folder share
scripts/upsert-file.sh <folder_share_id> "note.md" "# Content"

# 5. List all files in a folder share
scripts/list-files.sh <folder_share_id>

# 6. Delete a file from a folder share
scripts/delete-file.sh <folder_share_id> "old-note.md"

# 7. Read a doc share (single document, share_id = doc_id)
scripts/read.sh <share_id>

# 8. Write to a doc share
scripts/write.sh <share_id> <share_id> "# Updated content"

All scripts accept the token via RELAY_TOKEN env var (preferred) or as the first CLI argument (backward-compatible).

Two kinds of shares

Doc shareFolder share
---------------------------
ContainsSingle documentMultiple files
doc_idSame as share_idEach file has its own doc_id (in folder metadata)
Readread.sh read-file.sh "path/to/file.md"
Writewrite.sh upsert-file.sh "path"
DeleteN/Adelete-file.sh "path"

Most shares are folder shares. Use read-file.sh and upsert-file.sh — they handle path resolution automatically.

> Warning: write.sh does NOT work for folder shares — it writes content but does not register the file in folder metadata, so Obsidian will never see it. The script detects folder shares and refuses with an error.

Scripts reference

ScriptPurposeArgs
-----------------------
auth.shGet JWT token
list-shares.shList all shares[kind] [owned_only]
list-files.shList files in folder share
read-file.shRead file by path (folder share)
read.shRead by doc_id (low-level) [doc_id]
upsert-file.shCreate/update file (folder share)
write.shWrite by doc_id (doc shares only)
delete-file.shDelete file from folder share
create-file.shCreate new file (low-level)

Bold = recommended for most use cases. All scripts use RELAY_TOKEN env var (or accept token as first arg).

Authentication

All API calls require a Bearer JWT token. Get one via login:

curl -s -X POST "$RELAY_CP_URL/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"email": "'$RELAY_EMAIL'", "password": "'$RELAY_PASSWORD'"}' \
  | jq -r '.access_token'

Response:

{
  "access_token": "eyJ...",
  "refresh_token": "...",
  "token_type": "bearer",
  "expires_in": 3600
}

Use the access_token as Authorization: Bearer header on all subsequent requests.

When the token expires (1 hour), refresh it:

curl -s -X POST "$RELAY_CP_URL/v1/auth/refresh" \
  -H "Content-Type: application/json" \
  -d '{"refresh_token": "'$REFRESH_TOKEN'"}'

Listing shares

Shares are the access units — each share maps to a document or folder in the Obsidian vault.

curl -s "$RELAY_CP_URL/v1/shares" \
  -H "Authorization: Bearer $TOKEN" | jq

Response (array):

[
  {
    "id": "a1b2c3d4-...",
    "kind": "doc",
    "path": "Projects/meeting-notes.md",
    "visibility": "private",
    "is_owner": true,
    "user_role": null,
    "web_published": false
  },
  {
    "id": "e5f6g7h8-...",
    "kind": "folder",
    "path": "Projects/",
    "visibility": "private",
    "is_owner": false,
    "user_role": "editor"
  }
]

Key fields:

  • id — share UUID, used as share_id in all operations
  • kinddoc (single file) or folder (directory)
  • path — Obsidian vault-relative path
  • user_roleviewer (read-only), editor (read-write), or null (owner)

Filter options: ?kind=doc, ?owned_only=true, ?member_only=true, ?skip=0&limit=50.

Listing files in a folder share

scripts/list-files.sh <share_id>

Response:

{
  "doc_id": "e5f6g7h8-...",
  "files": {
    "meeting-notes.md": {"doc_id": "abc123-...", "type": "markdown"},
    "project-plan.md": {"doc_id": "def456-...", "type": "markdown"}
  }
}

Each key is the file's path within the folder. The doc_id field is the document identifier used for content operations. The share_id for content requests is always the folder share's ID.

> Note: The API response uses id as the field name. This is the same as doc_id — use it wherever doc_id is needed.

Reading files

By path (recommended for folder shares)

scripts/read-file.sh <folder_share_id> "Marketing/plan.md"

This resolves the path to a doc_id internally and returns:

{
  "doc_id": "abc123-...",
  "content": "# Marketing Plan\n\nContent here...",
  "format": "text",
  "path": "Marketing/plan.md"
}

By doc_id (low-level)

scripts/read.sh <share_id> [doc_id] [key]

For doc shares, omit doc_id (defaults to share_id). For folder shares, pass the file's doc_id from list-files.sh.

Writing files

Folder shares — use upsert-file.sh

# Create or update — auto-detects which operation is needed
scripts/upsert-file.sh <folder_share_id> "note.md" "# Updated content"

# Pipe content from stdin
echo "# Content" | scripts/upsert-file.sh <folder_share_id> "note.md" -

Response includes an operation field: "created" or "updated".

Doc shares — use write.sh

scripts/write.sh <share_id> <share_id> "# Updated Notes"

> write.sh refuses folder shares — if you accidentally pass a folder share_id as doc_id, it detects this and exits with an error directing you to upsert-file.sh.

Common workflows

Read a specific note by path (most common)

# If you know the folder share_id:
scripts/read-file.sh <folder_share_id> "Marketing/docs/plan.md"

# If you need to find the share first:
scripts/list-shares.sh  # find the folder share
scripts/read-file.sh <share_id> "path/to/file.md"

Create or update a file

# Always works, whether the file exists or not
scripts/upsert-file.sh <folder_share_id> "note.md" "# Content"

Delete a file

scripts/delete-file.sh <folder_share_id> "old-note.md"

Error codes

StatusMeaning
-----------------
400Invalid share_id format
401Missing or expired token — re-authenticate
403Insufficient permissions (viewer trying to write, or non-member)
404Share or file not found (check path spelling, use list-files.sh to verify)
422Missing required field (share_id, content)
502Relay server unavailable — retry later

Terminology

TermMeaning
---------------
share_idUUID of a share (doc or folder). Used for ACL checks in all requests.
doc_idUUID of an individual document. For doc shares, equals share_id. For folder shares, each file has its own doc_id.
idSame as doc_id — the API response field name. Use interchangeably.
file_pathRelative path within a folder share (e.g. "Marketing/plan.md").

References

  • references/api.md — full API reference with all endpoints

版本历史

共 1 个版本

  • v1.1.2 当前
    2026-03-29 22:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,502
content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,213
content-creation

YouTube

byungkyu
使用托管OAuth集成YouTube Data API,支持搜索视频、管理播放列表、获取频道数据及评论互动,适用于用户需要时使用此技能。
★ 142 📥 41,080