@celljs/ta-creator 4.32.1 → 4.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +2 -1
- package/README.md +9 -2
- package/host/index.mjs +1529 -279
- package/package.json +3 -3
- package/skills/creator-make/SKILL.md +34 -13
- package/skills/creator-publish/SKILL.md +24 -8
- package/skills/creator-publish/platforms.md +94 -0
- package/web/index.js +1549 -245
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-creator",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.33.0",
|
|
4
4
|
"description": "A pi package for Ta: a channel of content without showing your face, hot topics of your field found three times a day, videos and posts made for each platform, reviewed on your phone and published for you once passed",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@celljs/ta-protocol": "4.
|
|
33
|
-
"@celljs/ta-web": "4.
|
|
32
|
+
"@celljs/ta-protocol": "4.33.0",
|
|
33
|
+
"@celljs/ta-web": "4.33.0",
|
|
34
34
|
"@types/react": "^19.3.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: creator-make
|
|
3
|
-
description: Makes a piece of content for the user's channel (a video
|
|
3
|
+
description: Makes a piece of content for the user's channel (a video, a post of pictures, an article or a note, each platform in the form it takes, public or for their company), from a topic of Creator to the card they review it in; also finds hot topics of their field when asked now. Use it whenever a piece of Creator is to be made, changed after review, or topics are to be found.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Making a piece
|
|
@@ -11,13 +11,17 @@ its server: `ta call @celljs/ta-creator <method> [args as JSON]`.
|
|
|
11
11
|
| Method | What it does |
|
|
12
12
|
|---|---|
|
|
13
13
|
| `settings` | What the channel is about (niche), its series, the platforms picked and their shapes, the voice, what happens once a piece is passed (`publish`) |
|
|
14
|
-
| `list [stage]` | The pieces, of a stage: `topic`, `making`, `review`, `published` |
|
|
14
|
+
| `list [stage]` | The pieces, of a stage: `topic`, `materials`, `making`, `review`, `published` |
|
|
15
|
+
| `brief make <id>` | What making a piece needs: the piece, who it is for (`reach`), each platform it goes to with its form there, the strategy, what the user asked to change before (`lessons`), the voice |
|
|
15
16
|
| `brief topics` | What finding topics needs: niche, platforms, sources, how many to offer, the titles already there, the series (what each is about, how many a week, waiting, published, the lessons of a course) and what the last review concluded |
|
|
16
|
-
| `topics '<JSON array>'` | Adds topics found: `{ title, series (its id or name), form: "video" \| "post", kind: "hot" \| "howto" \| "explain", why, heat, until?, seen, origin? }`; a topic of a course is numbered the next lesson |
|
|
17
|
-
| `update <id> '<JSON>'` | Keeps what you made: `script`, `done` (steps of script, visuals, voice, captions, versions, checks), `versions`, `checks
|
|
17
|
+
| `topics '<JSON array>'` | Adds topics found: `{ title, series (its id or name), form: "video" \| "post" \| "article" \| "note", kind: "hot" \| "howto" \| "explain" \| "original", why, heat, until?, seen, origin?, reach?, comments? }`; a topic of a course is numbered the next lesson |
|
|
18
|
+
| `update <id> '<JSON>'` | Keeps what you made: `script`, `done` (steps of script, visuals, voice, captions, versions, checks), `versions`, `checks`, `reach` (`public`, `internal`, `both`); `series` and `number` when the user moves it |
|
|
19
|
+
| `needs <id> '<JSON array of lines>'` / `give <id> <need id>` / `skip <id>` | What a piece of the user's own needs that you found nowhere: it waits in Materials / one given (all given, it goes on) / made without |
|
|
18
20
|
| `remove <id>` / `restore <id>` | Removes a topic or a piece not published (kept, to be put back) / puts it back |
|
|
19
21
|
| `submit <id>` | Sends it to review, once it has a version for each platform picked and its checks |
|
|
20
|
-
| `published <id> '<JSON array of { platform, url }>'` | The links once it is published |
|
|
22
|
+
| `published <id> '<JSON array of { platform, url, scheduled? }>'` | The links once it is published (`scheduled`: `YYYY-MM-DD HH:mm` when the platform publishes it later); the next piece passed goes |
|
|
23
|
+
| `stopped <id> '<why>'` | Publishing it could not be done; the next piece passed goes |
|
|
24
|
+
| `slots <id>` | When it goes out on each platform (now, or a day to schedule it for) |
|
|
21
25
|
| `stats <id> '<JSON array of { platform, views, likes?, comments?, follows?, completion? }>'` | What a piece published did, as read from the platforms |
|
|
22
26
|
| `brief analysis` | The numbers by series, kind, form and platform, the pieces that did best, the last conclusions |
|
|
23
27
|
| `insights '<JSON array of { text, tone: "good" \| "bad" \| "idea", series? }>'` | Keeps what a review of the numbers concluded; the search for topics follows it |
|
|
@@ -34,6 +38,19 @@ people in the news, films and shows of others, or anything of the user's employe
|
|
|
34
38
|
|
|
35
39
|
## Making it
|
|
36
40
|
|
|
41
|
+
0. **Read first.** `brief make <id>`: the platforms and the form of each (one script, made into each form: a video, a post of
|
|
42
|
+
pictures, an article, a note), the strategy (the user's rules always), and `lessons`, what they asked to change in
|
|
43
|
+
pieces before: start from them, never make them ask twice.
|
|
44
|
+
**Materials.** What a piece shows comes first from the working directory and the user's projects (their code, commits,
|
|
45
|
+
docs, reports, screenshots), then from what you make yourself (diagrams, a fresh example, the host's scenes). Only what
|
|
46
|
+
you found nowhere and only the user has (a recording of their screen, a photo, their own words of how it went) you
|
|
47
|
+
ask for, in a few lines: `needs <id> '["一段 30 秒的录屏:…", "一句话:当时为什么这么做"]'`, and tell them in a line to
|
|
48
|
+
send it here. When they do, keep it in the piece's folder and `give <id> <need id>`; when they say go on, `skip <id>`.
|
|
49
|
+
Never ask for what you can find or make.
|
|
50
|
+
**Who it is for.** A piece is public unless its series or `reach` says otherwise. Anything of the user's company (its
|
|
51
|
+
name, its tools, its people, numbers, what is not public) makes it `internal`: take it out, or, when it is the point,
|
|
52
|
+
`update <id> '{"reach": "internal"}'` and say so in a check. Internal pieces go only to the platforms inside the
|
|
53
|
+
company (`inside` in the brief); when none is picked, say so: the user adds one in Settings.
|
|
37
54
|
1. **Script.** Write it for the platform's audience: a hook in the first 3 seconds, one idea a scene, 30–90 seconds for
|
|
38
55
|
a short video, 6–9 pictures for a post. Only what is true and what you can show: code you write yourself in a fresh,
|
|
39
56
|
public example, never the user's work, a private repository or anything of their employer. Keep it with
|
|
@@ -81,13 +98,16 @@ people in the news, films and shows of others, or anything of the user's employe
|
|
|
81
98
|
`captions.srt` and `voice.m4a`; with `--post`, `post-<shape>-01.png`… Every picture carries the label "AI 合成";
|
|
82
99
|
the captions are burned in. Look at a few frames (`ffmpeg -ss <s> -i 16x9.mp4 -frames:v 1 f.png`) before going on.
|
|
83
100
|
A screen recording may stand for a scene when the user made one; never record their screen yourself.
|
|
84
|
-
3. **Versions.** One for each platform
|
|
85
|
-
|
|
86
|
-
|
|
101
|
+
3. **Versions.** One for each platform of `brief make`, in its form there: a video or the pictures of a post in its
|
|
102
|
+
shape; an article as `article.md` in the piece's folder (headings, the code to copy, the pictures of the post as its
|
|
103
|
+
figures, the source linked; its words also in `text`); a note as a few lines in `text` (files optional, a picture or
|
|
104
|
+
two). A title and words in the platform's voice (B站 a title that says what one learns; 小红书 a title with a number and
|
|
105
|
+
a feeling, words short with line breaks; 视频号 one plain line; an article a title that says what one gets), 3–6 tags.
|
|
106
|
+
Keep them with `update <id> '{"versions": [{ "platform", "form", "title", "text", "tags", "files", "cover" }]}'`.
|
|
87
107
|
4. **Checks.** Before review check, and keep each as `{ text, ok }` with `update`: the AI label is on every picture;
|
|
88
108
|
the declaration of AI content each platform asks for will be ticked (its `declare` in settings); nothing private
|
|
89
|
-
(names, paths, tokens,
|
|
90
|
-
of pictures); a work explained names its source. A check that fails is said plainly for the user to look at.
|
|
109
|
+
(names, paths, tokens, a private repository); nothing of the user's company in a public piece (else internal, as
|
|
110
|
+
above); each version fits its platform (length, number of pictures); a work explained names its source. A check that fails is said plainly for the user to look at.
|
|
91
111
|
5. **Review.** `submit <id>`, then reply with the card the user reviews it in, and nothing long around it:
|
|
92
112
|
|
|
93
113
|
```ta-creator-review
|
|
@@ -95,7 +115,8 @@ people in the news, films and shows of others, or anything of the user's employe
|
|
|
95
115
|
```
|
|
96
116
|
|
|
97
117
|
When the user asks for a change (a message "<id> 要改:…"), change what they said, make it again, `submit` and show the
|
|
98
|
-
card again. When they pass it ("<id> 审过了…"), follow creator-publish: it publishes it on each platform.
|
|
118
|
+
card again (what they asked is kept in `lessons` for the pieces to come). When they pass it ("<id> 审过了…"), follow creator-publish: it publishes it on each platform.
|
|
99
119
|
|
|
100
|
-
Never publish before the user passed it, never like
|
|
101
|
-
|
|
120
|
+
Never publish before the user passed it, never like or follow as the user, never post the same piece twice on a
|
|
121
|
+
platform, never more than one piece a day on a platform. Comments are answered by the comments task of Creator only,
|
|
122
|
+
as far as the user lets it.
|
|
@@ -9,8 +9,21 @@ The user passed the piece; read it with `ta call @celljs/ta-creator list review`
|
|
|
9
9
|
`ta call @celljs/ta-creator settings` each platform's `publish` page and `declare`, where its declaration of AI content
|
|
10
10
|
is. Passing it in review is the user's say-so: you publish it yourself, never leaving Publish for them to press.
|
|
11
11
|
|
|
12
|
+
Creator publishes pieces passed one at a time, in the user's one browser: the message that asks you to publish comes
|
|
13
|
+
when it is this piece's turn, and its context says when it goes out on each platform (now, or a day and time to
|
|
14
|
+
schedule it for: one piece a day on a platform). Nothing else uses the browser for Creator meanwhile: never wait for
|
|
15
|
+
another conversation, keep no lock files or schedules of your own, and do not work the days out again from what was
|
|
16
|
+
published (`ta call @celljs/ta-creator slots <id>` reads them again).
|
|
17
|
+
|
|
18
|
+
Each version goes to its platform in its form (`form`, the piece's own when none): a video or the pictures of a post
|
|
19
|
+
on the page of uploads, an article on the platform's page for articles (B站 专栏, 小红书 长文, 公众号 图文, 知乎 文章), a
|
|
20
|
+
note as a short post (B站 动态, 知乎 想法, YouTube Community). A platform inside the user's company (`internal` in
|
|
21
|
+
settings) takes only pieces for the company; when the user keeps a skill of their own for publishing there (their
|
|
22
|
+
knowledge base), follow it.
|
|
23
|
+
|
|
12
24
|
For each platform of its versions, one at a time, with the tools that operate the user's computer (computer use: the
|
|
13
|
-
user's browser, where they are signed in)
|
|
25
|
+
user's browser, where they are signed in); how each platform's page was filled before is in
|
|
26
|
+
[platforms.md](platforms.md), read it rather than old conversations:
|
|
14
27
|
|
|
15
28
|
1. Open the platform's `publish` page in the user's browser. When they are not signed in, stop and ask them to sign in:
|
|
16
29
|
never type a password, never sign up, never change the account's profile.
|
|
@@ -20,15 +33,18 @@ user's browser, where they are signed in):
|
|
|
20
33
|
the page has no such choice, write "内容由 AI 辅助生成" at the end of the words.
|
|
21
34
|
4. Leave every other choice as the platform sets it (no paid promotion, no sync to other apps) unless the user said
|
|
22
35
|
otherwise.
|
|
23
|
-
5. Press Publish (发布, 发表, 投稿)
|
|
24
|
-
|
|
25
|
-
read the link of the piece from the page of the account's works.
|
|
36
|
+
5. Press Publish (发布, 发表, 投稿) now, or, for a platform given a day and time, set the platform's scheduled
|
|
37
|
+
publishing to it first. Then read the link of the piece from the page of the account's works.
|
|
26
38
|
|
|
27
|
-
When the page shows a warning of the platform (a check of risk, too many posts, a captcha),
|
|
28
|
-
|
|
39
|
+
When the page shows a warning of the platform (a check of risk, too many posts, a captcha), or the user is not signed
|
|
40
|
+
in, stop there, change nothing, tell the user, and say so to Creator, which lets the next piece go:
|
|
41
|
+
`ta call @celljs/ta-creator stopped <id> '<why, a line>'`.
|
|
29
42
|
|
|
30
43
|
Then tell the user in one line where it went, with the links (and the day of any piece scheduled). Keep the links
|
|
31
44
|
as soon as you have them:
|
|
32
|
-
`ta call @celljs/ta-creator published <id> '[{"platform": "bilibili", "url": "https://..."}]' <minutes they took
|
|
45
|
+
`ta call @celljs/ta-creator published <id> '[{"platform": "bilibili", "url": "https://...", "scheduled": "2026-11-28 12:00"}]' <minutes they took>`
|
|
46
|
+
(`scheduled` only for a platform that publishes it later). Always end with `published` or `stopped`: the next piece
|
|
47
|
+
waits for it.
|
|
33
48
|
|
|
34
|
-
Never
|
|
49
|
+
Never like, follow or message anyone as the user, never press anything that spends money. Comments are the comments
|
|
50
|
+
task's (it answers only as far as the user lets it).
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# How the publish pages were filled (2026-11-24, Chrome on macOS)
|
|
2
|
+
|
|
3
|
+
What worked when Ta published on these platforms, so that you start from it rather than from old conversations. Pages
|
|
4
|
+
change: when a selector finds nothing, look at the page (a screenshot, its DOM) and go on from there.
|
|
5
|
+
|
|
6
|
+
## Working a tab of Chrome
|
|
7
|
+
|
|
8
|
+
Run JavaScript in one tab by its id with AppleScript (Chrome: View → Developer → Allow JavaScript from Apple Events,
|
|
9
|
+
which the user has on), not by clicking: it works in the background and leaves the user's mouse alone. Use clicks of
|
|
10
|
+
computer use only where a page takes no synthetic event (a crop box to drag, a picker that opens on a real click).
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
// The ids of the tabs: osascript -e 'tell application "Google Chrome" to get {id, URL} of tabs of window 1'
|
|
14
|
+
// A tab of its own: tell window 1 to make new tab with properties {URL:"…"} → (id of active tab of window 1)
|
|
15
|
+
// A file of JavaScript run in the tab: what its last expression gives, as text.
|
|
16
|
+
globalThis.runFile = async (tab, f) => {
|
|
17
|
+
const r = await Bash({ command: `osascript -e 'set js to read POSIX file "${f}" as «class utf8»' -e 'with timeout of 60 seconds
|
|
18
|
+
tell application "Google Chrome"
|
|
19
|
+
repeat with w in windows
|
|
20
|
+
repeat with t in tabs of w
|
|
21
|
+
if ((id of t) as text) is "${tab}" then return (execute t javascript js)
|
|
22
|
+
end repeat
|
|
23
|
+
end repeat
|
|
24
|
+
return "no tab"
|
|
25
|
+
end tell
|
|
26
|
+
end timeout' 2>&1; rm -f ${f}`, timeout: 90000 });
|
|
27
|
+
return String(r.stdout ?? '').trim();
|
|
28
|
+
};
|
|
29
|
+
globalThis.runJs = async (tab, js) => {
|
|
30
|
+
const f = `/tmp/creator-js-${Date.now()}-${Math.random().toString(36).slice(2, 6)}.js`;
|
|
31
|
+
await Write({ file_path: f, content: js });
|
|
32
|
+
return runFile(tab, f);
|
|
33
|
+
};
|
|
34
|
+
// A file of this computer into the page as window.__taFile, in parts of 400 KB of base64 (one call is too long whole).
|
|
35
|
+
globalThis.putFile = async (tab, path, name, type) => {
|
|
36
|
+
const b = `/tmp/creator-b64-${Date.now()}.txt`;
|
|
37
|
+
const total = Number((await Bash({ command: `base64 -i "${path}" | tr -d '\\n' > ${b}; wc -c < ${b}` })).stdout.trim());
|
|
38
|
+
await runJs(tab, `window.__taParts = []; 'ok'`);
|
|
39
|
+
for (let off = 0; off < total; off += 400000) {
|
|
40
|
+
const f = `/tmp/creator-part-${Date.now()}.js`;
|
|
41
|
+
await Bash({ command: `printf "window.__taParts.push('" > ${f}; cut -c$((${off}+1))-$((${off}+400000)) ${b} | tr -d '\\n' >> ${f}; printf "'); window.__taParts.length" >> ${f}` });
|
|
42
|
+
if (!/^\d+/.test(await runFile(tab, f))) return 'a part failed';
|
|
43
|
+
}
|
|
44
|
+
await Bash({ command: `rm -f ${b}` });
|
|
45
|
+
return runJs(tab, `(() => { const s = atob(window.__taParts.join('')); const u = new Uint8Array(s.length); for (let i = 0; i < s.length; i++) u[i] = s.charCodeAt(i); window.__taFile = new File([u], ${JSON.stringify(name)}, { type: ${JSON.stringify(type)} }); delete window.__taParts; return String(window.__taFile.size); })()`);
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Then, in the page: put `window.__taFile` into an `input[type=file]` with a `DataTransfer` and dispatch `change`; set an
|
|
50
|
+
input's value with `Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set` and dispatch `input` and
|
|
51
|
+
`change`; type into a rich editor with `focus()` and a `ClipboardEvent('paste')` carrying a `DataTransfer` of the text
|
|
52
|
+
(or `document.execCommand('insertText')`); choose an option of a custom select with `mousedown`, `mouseup`, `click`
|
|
53
|
+
(`pointerdown`/`pointerup` too where it wants them). Check every field by reading it back before pressing Publish.
|
|
54
|
+
|
|
55
|
+
## B站 (member.bilibili.com/platform/upload/video/frame)
|
|
56
|
+
|
|
57
|
+
- Video: `input[type=file][accept*=mp4]`; wait for 上传完成 in the page.
|
|
58
|
+
- Title: `input[placeholder=请输入稿件标题]`; words: the first `.ql-editor` (`execCommand('selectAll')`, then
|
|
59
|
+
`insertText`).
|
|
60
|
+
- Tags: remove the ones it suggests (`.tag-pre-wrp .close`), then each tag into `input[placeholder*=按回车键]` with
|
|
61
|
+
Enter (`keydown`/`keypress`/`keyup`, keyCode 13).
|
|
62
|
+
- AI: the select `.bcc-select-input-inner[placeholder*=创作声明]` → the option `.bcc-option` 含AI生成内容.
|
|
63
|
+
- Cover: click 更换封面 (or 添加封面/上传封面), then the last `input[type=file][accept*=image]`; the 4:3 crop box only
|
|
64
|
+
moves with a real drag (computer use), then 完成.
|
|
65
|
+
- Scheduled: `.time-container` → turn on 定时发布 (a real click), pick the day in the calendar, then hour and minute in
|
|
66
|
+
`[class*=time-picker-panel-se]` by their column; read it back from `.time-container`.
|
|
67
|
+
- Publish: 立即投稿; the link (BV…) is in 内容管理 → 稿件管理.
|
|
68
|
+
|
|
69
|
+
## 小红书 (creator.xiaohongshu.com/publish/publish?from=menu&target=video)
|
|
70
|
+
|
|
71
|
+
- Video: `input[type=file][accept*=mp4]`; the form comes once `input[placeholder=填写标题会有更多赞哦]` and
|
|
72
|
+
`.tiptap.ProseMirror` are there.
|
|
73
|
+
- Title: that input; words and tags: paste `text + "\n\n" + #tag #tag` into `.tiptap.ProseMirror`.
|
|
74
|
+
- AI: 添加内容类型声明 → 笔记含AI合成内容.
|
|
75
|
+
- Cover: 设置封面 → upload into the `input[type=file]` whose accept has image → 确定.
|
|
76
|
+
- Scheduled: 定时发布 (a real click to turn it on). The date input `.date-picker-container input` opens its popover on
|
|
77
|
+
`focus`/`focusin` plus pointer and mouse events; the day is `.d-datepicker-cell-main` (not disabled) in the visible
|
|
78
|
+
`.d-popover`, the hour and minute are two columns of two-digit leaves (find the columns by their left; a column has
|
|
79
|
+
more than 5 of them). Read the input back: it must say `YYYY-MM-DD HH:mm` as given.
|
|
80
|
+
- Publish: the red button at the bottom; the link is in 笔记管理 (creator.xiaohongshu.com/new/note-manager). A note
|
|
81
|
+
scheduled is changed at `/publish/update?id=<note>¬eType=video`.
|
|
82
|
+
|
|
83
|
+
## 视频号 (channels.weixin.qq.com/platform/post/create)
|
|
84
|
+
|
|
85
|
+
- The form is inside a shadow root: `const r = document.querySelector('wujie-app').shadowRoot`.
|
|
86
|
+
- Video: `r.querySelector('input[type=file]')`; it takes a while to process (正在处理文件).
|
|
87
|
+
- Words and tags: paste into `r.querySelector('.input-editor')` (end with 内容由 AI 辅助生成 when there is no declaration
|
|
88
|
+
of its own); short title: `input[placeholder*=短标题]`.
|
|
89
|
+
- AI: `.mark-tag-select` → `.mark-tag-option` 含AI生成内容.
|
|
90
|
+
- Cover: 编辑 on the cover → the last `input[type=file]` whose accept has image → 确认.
|
|
91
|
+
- Scheduled: the label 定时, then in `.weui-desktop-picker__date` show the hidden `dd`s (`style.display = ''`), click
|
|
92
|
+
the day (`td a`, not faded or disabled), the hour and minute (`.weui-desktop-picker__time__hour li`,
|
|
93
|
+
`…__minute li`), click the day again and hide the `dd`s; read `.weui-desktop-picker__date input` back.
|
|
94
|
+
- Publish: 发表; the list is at /platform/post/list (its link is that page: 视频号 gives no public link).
|