references/config.json (or fallback references/config.example.json). Default allowlist should be /OpenClaw/**.references/session_api.json, references/cookies.json, references/login_token.json, references/qr_code.pngreferences/index.json (may contain private filenames/paths)requirements.txt exists for portability/reference.references/config.jsonreferences/config.example.jsonKey fields (example names; see config.example.json):
remoteAllowlist: e.g. ["/OpenClaw/**"]localAllowlist: e.g. ["/path/to/Uploads"]loginTimeoutSeconds1) Run login-prepare to generate QR
2) User scans in Quark App
3) Run login-wait to persist session
Use orchestration pattern:
1) Run: channel-run
2) If exit code == 10 and JSON contains need_login: true:
qr_png back to the current chat/channellogin-wait (poll every ~5s)channel-run ... Machine-readable interaction exit codes (for orchestration):
need_login=trueneed_pick=true (multiple candidates; re-run with --pick)need_confirm=true (destructive ops; re-run with --confirm)Invoke as:
python3 scripts/quark_drive.py [args...] loginlogin-prepare [--no-open]login-waitauth-statuschannel-run [args...] (preferred)telegram-run [args...] (alias)mkdir ls [--json] search [--allow-outside-openclaw] (privacy default: scoped to /OpenClaw/**)upload When the user asks to “生成分享链接/创建分享/分享某个文件(夹)”:
1) Search candidates first (do not ask user to provide full remote path).
2) If multiple candidates: list them with index + path + type/size, ask user to pick.
3) Before creating the share, ask:
4) If user does not answer: default to no passcode + permanent.
share-create [--days 1|7|30|0] [--passcode XXXX] [--title ...] share-create-auto [--pick N] [--days 1|7|30|0] [--passcode XXXX] [--local] [--allow-outside-openclaw] --pick is omitted, returns JSON with need_pick=true and a candidate list.Local index helpers:
index-build --root --max-items [--write] (may issue many API calls; without --write it does not persist)search-local [--top N] (builds ephemeral index; does not persist)share-save [--passcode XXXX] [--to /OpenClaw/FromShares] [--no-wait] Notes:
rename mv rm --confirm (soft-delete into /OpenClaw/.trash)purge-trash --days --confirm auth-status fails (401/403): session expired → run login flow again.share-save fails with “用户禁止转存自己的分享”: you tried saving your own link → test with someone else’s share.共 1 个版本