@geoly-ai/social-hub-cli 0.3.6 → 0.3.7
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/CHANGELOG.md +6 -0
- package/dist/cmd-manifest.json +2 -2
- package/dist/register-subreddit-post-style.d.ts +8 -0
- package/dist/register-subreddit-post-style.d.ts.map +1 -0
- package/dist/register-subreddit-post-style.js +161 -0
- package/dist/register-subreddit-post-style.js.map +1 -0
- package/package.json +3 -3
- package/skills/manifest.json +1 -1
- package/skills/social-hub-accounts/SKILL.md +8 -8
- package/skills/social-hub-posts/SKILL.md +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to `@geoly-ai/social-hub-cli` are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
Release workflow: `pnpm release:cli` → `pnpm publish:cli`.
|
|
6
6
|
|
|
7
|
+
## [0.3.7] - 2026-08-03
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- 遗留事项四路并行收敛 —— 共享桶写隔离 / 通知后台页 / 权限即时生效 / 技术债清零
|
|
12
|
+
|
|
7
13
|
## [0.3.6] - 2026-08-03
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/dist/cmd-manifest.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* 板块运营数据 Phase 1 —— 热帖风格标注(subreddit_post_style_labels)CLI 读 + 单人复核。
|
|
4
|
+
* SDK 未覆盖(同 subreddit-style/annotations 域约定,HTTP 走 hubRequest)。复核 user-only、
|
|
5
|
+
* 单人(非四眼);accept 可修正 primary/secondary/other,写一条 team 级 human 行(不改 LLM 行)。
|
|
6
|
+
*/
|
|
7
|
+
export declare function registerSubredditPostStyleCommands(program: Command): void;
|
|
8
|
+
//# sourceMappingURL=register-subreddit-post-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-subreddit-post-style.d.ts","sourceRoot":"","sources":["../src/register-subreddit-post-style.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2LzE"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { hubRequest, resolveTeamId } from "./client.js";
|
|
2
|
+
import { assertApplyOrDryRun } from "./dry-run.js";
|
|
3
|
+
import { printResult, withCliErrorBoundary } from "./output.js";
|
|
4
|
+
import { withPermissionGates } from "./permission-runner.js";
|
|
5
|
+
/**
|
|
6
|
+
* 板块运营数据 Phase 1 —— 热帖风格标注(subreddit_post_style_labels)CLI 读 + 单人复核。
|
|
7
|
+
* SDK 未覆盖(同 subreddit-style/annotations 域约定,HTTP 走 hubRequest)。复核 user-only、
|
|
8
|
+
* 单人(非四眼);accept 可修正 primary/secondary/other,写一条 team 级 human 行(不改 LLM 行)。
|
|
9
|
+
*/
|
|
10
|
+
export function registerSubredditPostStyleCommands(program) {
|
|
11
|
+
const group = program
|
|
12
|
+
.command("subreddit-post-styles")
|
|
13
|
+
.description("Reddit 热帖风格标注(风格标签底座 Phase 1;分析数据,非发布 gate)");
|
|
14
|
+
group
|
|
15
|
+
.command("list")
|
|
16
|
+
.description("GET /v1/teams/:teamId/subreddit-post-styles(本团队行+全局行;teamId=null 为全局)")
|
|
17
|
+
.requiredOption("--subreddit <name>", "板块名")
|
|
18
|
+
.option("-t, --team <teamId>", "Team UUID(缺省用当前 context)")
|
|
19
|
+
.option("--taxonomy <v>", "taxonomyVersion 过滤")
|
|
20
|
+
.option("--source <s>", "llm | human")
|
|
21
|
+
.option("--review-status <s>", "proposed | accepted | rejected")
|
|
22
|
+
.option("--no-global", "只看本团队行(排除全局)")
|
|
23
|
+
.option("-n, --limit <n>", "limit", "50")
|
|
24
|
+
.option("--offset <n>", "offset", "0")
|
|
25
|
+
.action(async (opts) => {
|
|
26
|
+
await withCliErrorBoundary(async () => {
|
|
27
|
+
const teamId = resolveTeamId(opts.team);
|
|
28
|
+
await withPermissionGates({
|
|
29
|
+
command: "subreddit-post-styles list",
|
|
30
|
+
gates: [{ resource: "subredditPostAnnotation", action: "read" }],
|
|
31
|
+
teamId,
|
|
32
|
+
}, async () => {
|
|
33
|
+
const params = new URLSearchParams();
|
|
34
|
+
params.set("subreddit", opts.subreddit);
|
|
35
|
+
if (opts.taxonomy)
|
|
36
|
+
params.set("taxonomyVersion", opts.taxonomy);
|
|
37
|
+
if (opts.source)
|
|
38
|
+
params.set("source", opts.source);
|
|
39
|
+
if (opts.reviewStatus)
|
|
40
|
+
params.set("reviewStatus", opts.reviewStatus);
|
|
41
|
+
if (opts.global === false)
|
|
42
|
+
params.set("includeGlobal", "false");
|
|
43
|
+
params.set("limit", String(opts.limit));
|
|
44
|
+
params.set("offset", String(opts.offset));
|
|
45
|
+
printResult(await hubRequest(`/v1/teams/${encodeURIComponent(teamId)}/subreddit-post-styles?${params.toString()}`));
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
group
|
|
50
|
+
.command("summary")
|
|
51
|
+
.description("GET .../subreddit-post-styles/summary — 风格分布 + 覆盖率 + 表现关联(posted_at 窗口;human>llm、team>global)")
|
|
52
|
+
.requiredOption("--subreddit <name>", "板块名")
|
|
53
|
+
.option("-t, --team <teamId>", "Team UUID(缺省用当前 context)")
|
|
54
|
+
.option("--taxonomy <v>", "taxonomyVersion 过滤")
|
|
55
|
+
.option("--since <iso>", "posted_at 窗口起(ISO)")
|
|
56
|
+
.option("--until <iso>", "posted_at 窗口止(ISO)")
|
|
57
|
+
.option("--no-global", "只看本团队行(排除全局)")
|
|
58
|
+
.action(async (opts) => {
|
|
59
|
+
await withCliErrorBoundary(async () => {
|
|
60
|
+
const teamId = resolveTeamId(opts.team);
|
|
61
|
+
await withPermissionGates({
|
|
62
|
+
command: "subreddit-post-styles summary",
|
|
63
|
+
gates: [{ resource: "subredditPostAnnotation", action: "read" }],
|
|
64
|
+
teamId,
|
|
65
|
+
}, async () => {
|
|
66
|
+
const params = new URLSearchParams();
|
|
67
|
+
params.set("subreddit", opts.subreddit);
|
|
68
|
+
if (opts.taxonomy)
|
|
69
|
+
params.set("taxonomyVersion", opts.taxonomy);
|
|
70
|
+
if (opts.since)
|
|
71
|
+
params.set("since", opts.since);
|
|
72
|
+
if (opts.until)
|
|
73
|
+
params.set("until", opts.until);
|
|
74
|
+
if (opts.global === false)
|
|
75
|
+
params.set("includeGlobal", "false");
|
|
76
|
+
printResult(await hubRequest(`/v1/teams/${encodeURIComponent(teamId)}/subreddit-post-styles/summary?${params.toString()}`));
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
group
|
|
81
|
+
.command("accept")
|
|
82
|
+
.description("POST .../subreddit-post-styles/accept — 单人接受一条 LLM proposed 标签(写 team 级 human accepted 行;可修正)")
|
|
83
|
+
.requiredOption("--label-id <uuid>", "被接受的 LLM proposed 标签 id")
|
|
84
|
+
.option("-t, --team <teamId>", "Team UUID(缺省用当前 context)")
|
|
85
|
+
.option("--primary-style <s>", "修正主风格(省略则原样采纳)")
|
|
86
|
+
.option("--secondary-styles <csv>", "修正副风格(逗号分隔,≤3)")
|
|
87
|
+
.option("--other-label <text>", "primary=other 时的自由标签")
|
|
88
|
+
.option("--note <text>", "备注(≤2000)")
|
|
89
|
+
.option("--dry-run", "预览", false)
|
|
90
|
+
.option("--apply", "执行写入", false)
|
|
91
|
+
.action(async (opts) => {
|
|
92
|
+
await withCliErrorBoundary(async () => {
|
|
93
|
+
const teamId = resolveTeamId(opts.team);
|
|
94
|
+
const body = { labelId: opts.labelId };
|
|
95
|
+
if (opts.primaryStyle)
|
|
96
|
+
body.primaryStyle = opts.primaryStyle;
|
|
97
|
+
if (opts.secondaryStyles)
|
|
98
|
+
body.secondaryStyles = String(opts.secondaryStyles)
|
|
99
|
+
.split(",")
|
|
100
|
+
.map((s) => s.trim())
|
|
101
|
+
.filter(Boolean);
|
|
102
|
+
if (opts.otherLabel !== undefined)
|
|
103
|
+
body.otherLabel = opts.otherLabel;
|
|
104
|
+
if (opts.note)
|
|
105
|
+
body.note = opts.note;
|
|
106
|
+
await withPermissionGates({
|
|
107
|
+
command: "subreddit-post-styles accept",
|
|
108
|
+
gates: [
|
|
109
|
+
{ resource: "subredditPostAnnotation", action: "create" },
|
|
110
|
+
{ resource: "subredditPostAnnotation", action: "update" },
|
|
111
|
+
],
|
|
112
|
+
teamId,
|
|
113
|
+
userOnly: true,
|
|
114
|
+
}, async () => {
|
|
115
|
+
if (!assertApplyOrDryRun(opts, {
|
|
116
|
+
command: "subreddit-post-styles accept",
|
|
117
|
+
danger: "write",
|
|
118
|
+
summary: { teamId, ...body },
|
|
119
|
+
})) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
printResult(await hubRequest(`/v1/teams/${encodeURIComponent(teamId)}/subreddit-post-styles/accept`, { method: "POST", body }));
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
group
|
|
127
|
+
.command("reject")
|
|
128
|
+
.description("POST .../subreddit-post-styles/reject — 单人拒绝一条 LLM proposed 标签(写 team 级 human rejected 行)")
|
|
129
|
+
.requiredOption("--label-id <uuid>", "被拒绝的 LLM proposed 标签 id")
|
|
130
|
+
.option("-t, --team <teamId>", "Team UUID(缺省用当前 context)")
|
|
131
|
+
.option("--note <text>", "备注(≤2000)")
|
|
132
|
+
.option("--dry-run", "预览", false)
|
|
133
|
+
.option("--apply", "执行写入", false)
|
|
134
|
+
.action(async (opts) => {
|
|
135
|
+
await withCliErrorBoundary(async () => {
|
|
136
|
+
const teamId = resolveTeamId(opts.team);
|
|
137
|
+
const body = { labelId: opts.labelId };
|
|
138
|
+
if (opts.note)
|
|
139
|
+
body.note = opts.note;
|
|
140
|
+
await withPermissionGates({
|
|
141
|
+
command: "subreddit-post-styles reject",
|
|
142
|
+
gates: [
|
|
143
|
+
{ resource: "subredditPostAnnotation", action: "create" },
|
|
144
|
+
{ resource: "subredditPostAnnotation", action: "update" },
|
|
145
|
+
],
|
|
146
|
+
teamId,
|
|
147
|
+
userOnly: true,
|
|
148
|
+
}, async () => {
|
|
149
|
+
if (!assertApplyOrDryRun(opts, {
|
|
150
|
+
command: "subreddit-post-styles reject",
|
|
151
|
+
danger: "write",
|
|
152
|
+
summary: { teamId, ...body },
|
|
153
|
+
})) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
printResult(await hubRequest(`/v1/teams/${encodeURIComponent(teamId)}/subreddit-post-styles/reject`, { method: "POST", body }));
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=register-subreddit-post-style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-subreddit-post-style.js","sourceRoot":"","sources":["../src/register-subreddit-post-style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D;;;;GAIG;AACH,MAAM,UAAU,kCAAkC,CAAC,OAAgB;IACjE,MAAM,KAAK,GAAG,OAAO;SAClB,OAAO,CAAC,uBAAuB,CAAC;SAChC,WAAW,CACV,6CAA6C,CAC9C,CAAC;IAEJ,KAAK;SACF,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CACV,uEAAuE,CACxE;SACA,cAAc,CAAC,oBAAoB,EAAE,KAAK,CAAC;SAC3C,MAAM,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;SACzD,MAAM,CAAC,gBAAgB,EAAE,oBAAoB,CAAC;SAC9C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|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geoly-ai/social-hub-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "social-hub CLI for Social Ops Hub",
|
|
6
6
|
"repository": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"commander": "^12.1.0",
|
|
25
|
-
"@geoly-ai/social-hub-
|
|
26
|
-
"@geoly-ai/social-hub-
|
|
25
|
+
"@geoly-ai/social-hub-authz": "0.0.10",
|
|
26
|
+
"@geoly-ai/social-hub-sdk": "0.0.47"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^22.10.2",
|
package/skills/manifest.json
CHANGED
|
@@ -304,14 +304,14 @@ social-hub personas pools-set --id <persona-uuid> --clear
|
|
|
304
304
|
六维均可选,值必须是**行为规则短句**(描述频率/顺序/条件/取舍的行为,不是文案模板、
|
|
305
305
|
few-shot 示例或成品台词):
|
|
306
306
|
|
|
307
|
-
| 维度 | 写什么(行为规则,非文案)
|
|
308
|
-
| --------------------- |
|
|
309
|
-
| `attentionPriority` | 优先关注/回应什么
|
|
310
|
-
| `stanceOnUncertainty` | 面对不确定时的处理方式
|
|
311
|
-
| `disagreementStyle` | 表达反对/分歧的方式
|
|
312
|
-
| `closingBehavior` | 收尾习惯
|
|
313
|
-
| `detailDepth` | 展开到多细
|
|
314
|
-
| `topicReflex` | 遇到某类话题的条件反射
|
|
307
|
+
| 维度 | 写什么(行为规则,非文案) |
|
|
308
|
+
| --------------------- | -------------------------- |
|
|
309
|
+
| `attentionPriority` | 优先关注/回应什么 |
|
|
310
|
+
| `stanceOnUncertainty` | 面对不确定时的处理方式 |
|
|
311
|
+
| `disagreementStyle` | 表达反对/分歧的方式 |
|
|
312
|
+
| `closingBehavior` | 收尾习惯 |
|
|
313
|
+
| `detailDepth` | 展开到多细 |
|
|
314
|
+
| `topicReflex` | 遇到某类话题的条件反射 |
|
|
315
315
|
|
|
316
316
|
写入侧走 §5.5 确定性反模板校验:单维 2–160 字符;含 `{{}}`/代码围栏/`<占位>`/URL/
|
|
317
317
|
`template`/`模板`/`few-shot`/列表多段、或像成品文案(opener+句末标点、整句引号包裹、
|
|
@@ -157,7 +157,12 @@ social-hub reddit stats -t "$BUCKET" # 桶内聚合
|
|
|
157
157
|
- `reddit team-buckets` 要求角色对帖子表现的 `teamId` **且** `teamName` 字段可见,`client` 角色一律 403。
|
|
158
158
|
- **桶不是权限旁路**:品牌/(账号,品牌) 成对授权在桶里照常生效,受限主体在桶路径下也只看得到自己品牌的帖子;`batch-upsert` 对受限(client)主体**整条关闭**,不看权限矩阵怎么配。
|
|
159
159
|
- 环境变量 API key(`SOCIAL_HUB_API_KEY`)**不能**访问桶路径,也不能把帖子改派进桶——API key 严格绑定单团队。回填一律用 `auth login` 的 CLI token。
|
|
160
|
-
-
|
|
160
|
+
- 桶是**多方共享**的团队,桶里的行有**归属主体**(谁导入/创建/改派进来的)。
|
|
161
|
+
- ⚠️ 当前归属只在 **`batch-upsert` 的覆盖**和**刷新批次的查询/取消**这两处强制;按 ID 的 `update`/`delete`/批量 patch **还没接**这条闸门,别把它当完整的写隔离。
|
|
162
|
+
- `batch-upsert` 命中别人的行、或迁移前就存在的存量桶行时**不会覆盖**,计入返回的 `conflicted`(`{imported, updated, skipped, conflicted}`)。`conflicted > 0` 不是失败,是"这些行不归你"——不要改 permalink 绕开,找归属方或管理员处理。
|
|
163
|
+
- 用 `create-snapshot` 往桶里补录时,若该 permalink 已属于别人,返回 404(与"不存在"同码),不会把别人的行 id 交给你。
|
|
164
|
+
- 归属按**用户身份**(登录 `auth login` 的那个人),不按 token:换一把 CLI token 仍能维护自己导入的行。
|
|
165
|
+
- 刷新批次同理按发起方归属:桶上的 `refresh-all` 进度查询/取消**只对发起者可见**,别人的批次一律 404。桶上跑 `refresh-all` 时行级品牌授权照常生效(受限主体只刷得到自己品牌的行)。
|
|
161
166
|
|
|
162
167
|
### 幂等与风险
|
|
163
168
|
|