senclaw/tiktok-activity

app Bộ điều phối hoạt động TikTok cho MỘT tài khoản: điều khiển một tab TikTok đã đăng nhập trong Chrome thật qua một extension (WebSocket + chrome.debugger). Dựng các 'flow' kéo-thả (chuỗi hành động search / xem / like / comment / share / follow / login...) rồi chạy thủ công hoặc theo lịch. Engine là một graph-walker (logic ở app, extension chỉ chạy primitive DOM), có nhánh success/error/alt, vòng lặp, template {{param}}/{{prev}}/{{step.id}} và bộ atomic Playwright-style. Kèm hệ AI qua SenClaw bridge: AI Playwright Agent (tool-loop LLM ↔ DOM), sinh comment/trả lời, và AI flow-gen từ catalog. Có chế độ stub (không trình duyệt) để dựng & kiểm thử flow. MCP `tiktok-mcp` mở các năng lực run/list/status/generate flow cho agent & app khác dùng chung.

Install

senclaw app install senclaw/tiktok-activity

Verifies sha512 and SenClaw’s signature before writing to disk.

Documentation

TikTok Activity (SenClaw App Space)

Bộ điều phối hoạt động TikTok — port từ backend Go (playwright-go + React) sang Rust (axum + rusqlite) + React/TypeScript, chạy như một App Space của SenClaw.

Quản lý nhiều account (proxy + browser profile riêng), dựng "flow" kéo-thả (chuỗi action: search / xem / like / comment / share / follow / login…), chạy thủ công hoặc theo lịch. Engine là graph-walker điều khiển Chromium thật qua CDP (chromiumoxide) khi bật TIKTOK_USE_PLAYWRIGHT=1, có nhánh success/error/alt, vòng lặp, và template {{param}}/{{prev}}/{{step.id}}.

Chạy

cargo run -p tiktok-activity            # cần web/dist đã build
cd apps/tiktok-activity/web && npm install && npm run build

Biến môi trường chính:

EnvÝ nghĩa
PORTCổng HTTP (mặc định 4580; daemon tự inject)
TIKTOK_DATA_DIRThư mục data (mặc định ~/.senclaw/space-app-data/tiktok-activity)
TIKTOK_SQLITE_PATHĐường dẫn DB (mặc định <data>/app.db, WAL)
TIKTOK_CONTROL_MODEextension (mặc định — điều khiển 1 tab TikTok qua extension) hoặc stub (mô phỏng, không trình duyệt)
TIKTOK_EXT_WS_PORTCổng WS mà extension dial vào (mặc định 9225)
SENCLAW_BASE_URLUI server của daemon (bridge LLM)

Kiến trúc (map từ bản Go)

GoRust
internal/domainsrc/domain.rs
internal/store (SQLite)src/db.rs
internal/engine/runner.go (graph walker)src/engine/mod.rs
playwrightexec/run_state.go (templating)src/engine/run_state.rs
cmd/server/*.go (HTTP)src/api.rs
schedules.go (run lifecycle + scheduler)src/run_manager.rs
internal/agent (LLM)src/ai.rs (qua SenClaw bridge llm.request)
— MCPsrc/mcp.rs (tiktok-mcp)
web/ (React+Vite+AntD+@xyflow)web/ (giữ nguyên, chỉnh proxy port)

LLM đi qua SenClaw bridge — không có temperature, có trần output (finish=length bị coi là lỗi).

Trạng thái port

  • ✅ Data model + SQLite store (đầy đủ bảng: accounts/proxies/profiles/flows/runs/schedules/notifications/agent_skills/saved_actions/settings/engine_kv/activity).
  • ✅ Engine graph-walker: nhánh, vòng lặp (loop_repeat/loop_if), control-flow (log/notification/set_params/run_next_flow/record_*/account_meta), templating.
  • ✅ StubDriver (mặc định như bản Go khi chưa bật Playwright).
  • ✅ Toàn bộ HTTP /api/* + scheduler + notification rules.
  • ✅ AI qua bridge: sinh flow từ catalog, gợi ý bước, nháp profile.
  • ✅ MCP tiktok-mcp (list/run/status/generate).
  • ✅ Frontend React/TS chạy end-to-end trên backend Rust.
  • ExtensionDriver (1 tài khoản) — điều khiển một tab TikTok đã đăng nhập qua extension (WS :9225 + chrome.debugger), serialized (Semaphore(1)). Logic ở app; extension chỉ chạy primitive (eval/mouse_click/type_text/press_key/wheel/navigate/url). Đã verify RPC round-trip + báo lỗi khi chưa kết nối.
  • Executor TikTok từng action — navigate/engage/comment/share/reply/auth_login/check_login/if_condition/check_scroll_end/random_yes_no + atomic kinds (click/click_button_text/fill/press/wait_ms/wait_load/goto/scroll/assert/click_unless_contains) + legacy like/follow/next_video (qua rules JSON import). Chạy trên PageOps (không phụ thuộc transport).
  • AI executors qua bridge — ai_gent_comment, get_info_post, get_comments_in_page, reply_comment_ai, ai_playwright_agent (tool-loop rút gọn: goto/click_text/fill/done).
  • Extension MV3 tại extension/ (load unpacked) — popup chọn tab, tự reconnect, callback fallback.
  • ⏳ Còn lại (đã flag): analyze-page (agent-skills / saved-actions) trả 503; AI flow-gen bỏ live browser probe; AI-memory panel disabled (dùng bridge knowledge.save). Bỏ chế độ đa-account/CDP theo yêu cầu refactor (1 tài khoản qua extension).

Declared permissions

{
  "network": [
    "127.0.0.1",
    "api.deepseek.com",
    "www.tiktok.com"
  ],
  "exec": [
    "./tiktok-activity"
  ]
}

Declared by the publisher, not enforced by SenClaw. The CLI compares this against what you already have installed and asks before anything widens.

Published by

@senclawtrusted
benji
44 packages · 0 downloads · member since 2026-07 · GitHub since 2015-06

The checkmark means SenClaw confirmed who this publisher is. It says nothing about whether their packages are safe.

About

Owner@senclaw
Latest1.0.0
Downloads (30d)0

Versions

VersionTagsArtifactsPublished
1.0.0latestdarwin-arm64, linux-x64, win32-x642026-08-07

Artifacts · 1.0.0

PlatformFormatSignatureFileSize
darwin-arm64zipunsignedtiktok-activity-app.zip4290 KB
linux-x64zipunsignedtiktok-activity-app.zip4817 KB
win32-x64zipunsignedtiktok-activity-app.zip4729 KB

Unsigned builds require sign-in to download and are not distributed to the auto-updater, because unsigned executables from a new domain get flagged as unsafe. Sign and notarize (macOS) or Authenticode-sign (Windows) to distribute publicly.

Auto-update endpoints

For a Tauri app — add to tauri.conf.json:

"endpoints": ["https://senclaw.bacnd.com/api/v1/updates/tauri/senclaw/tiktok-activity/{{target}}/{{arch}}/{{current_version}}"]

For an electron-updater app — generic provider URL:

https://senclaw.bacnd.com/updates/senclaw/tiktok-activity/stable

Only signed/notarized artifacts are offered as updates — a client fetches the update without credentials, and unsigned binaries are not publicly downloadable.

Something wrong with this package?

Report this package

Report this package

Tell us what is wrong and a moderator will look at it. Be specific — a report that names a version and a behaviour can be checked in minutes; one that says “looks sketchy” cannot be acted on at all.

Not about this package? Contact us instead. What happens to a report is described in reporting and moderation.

API: GET https://senclaw.bacnd.com/api/v1/packages/senclaw/tiktok-activity