@social-data/social-neuron-subscription 1.0.0-beta.3 → 1.0.0-beta.5
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/manifest.json +52 -13
- package/package.json +1 -1
- package/skills/social-neuron-subscription/SKILL.md +14 -8
package/manifest.json
CHANGED
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
},
|
|
85
85
|
"SftpTarget": {
|
|
86
86
|
"additionalProperties": false,
|
|
87
|
-
"description": "sftp(本期):把导出文件上传到 SFTP
|
|
87
|
+
"description": "sftp(本期):把导出文件上传到 SFTP 远端目录。\n目录与文件名都支持日期变量 ``yyyyMMdd`` / ``yyyyMM`` / ``yyyy``,同一个 task 重跑多少次,远端路径与文件名都不变。",
|
|
88
88
|
"properties": {
|
|
89
89
|
"type": {
|
|
90
90
|
"const": "sftp",
|
|
@@ -114,10 +114,23 @@
|
|
|
114
114
|
"type": "string"
|
|
115
115
|
},
|
|
116
116
|
"remote_path": {
|
|
117
|
-
"description": "
|
|
117
|
+
"description": "远端目录/路径。可在**任意一层**用日期变量,但变量必须**独占一层**:`/data/sub/yyyyMM/yyyyMMdd` 合法,`/data/sub_yyyyMMdd` 非法。只认 yyyyMMdd / yyyyMM / yyyy 三种;不允许 '..'、空目录层。",
|
|
118
118
|
"title": "Remote Path",
|
|
119
119
|
"type": "string"
|
|
120
120
|
},
|
|
121
|
+
"filename_template": {
|
|
122
|
+
"anyOf": [
|
|
123
|
+
{
|
|
124
|
+
"type": "string"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "null"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"default": null,
|
|
131
|
+
"description": "自定义文件名模板(不含扩展名)。只允许字母、数字、'_'、'-' 与日期变量,且变量前后必须是 '_' 或首尾:`daily_yyyyMMdd_export`、`yyyyMM_summary` 合法,`dailyyyyyMMdd`、`report-yyyyMMdd-x` 非法。系统统一追加 `_<task_id>` 与扩展名。不传=沿用默认 `<job_id>_<task_id>.<ext>`。",
|
|
132
|
+
"title": "Filename Template"
|
|
133
|
+
},
|
|
121
134
|
"format": {
|
|
122
135
|
"default": "json",
|
|
123
136
|
"description": "文件格式:csv/excel/json(默认 json)",
|
|
@@ -144,7 +157,7 @@
|
|
|
144
157
|
"additionalProperties": false,
|
|
145
158
|
"properties": {
|
|
146
159
|
"name": {
|
|
147
|
-
"description": "job
|
|
160
|
+
"description": "job 名称,同一凭证(token)下唯一",
|
|
148
161
|
"maxLength": 128,
|
|
149
162
|
"minLength": 1,
|
|
150
163
|
"title": "Name",
|
|
@@ -248,7 +261,7 @@
|
|
|
248
261
|
"type": "integer"
|
|
249
262
|
},
|
|
250
263
|
"name": {
|
|
251
|
-
"description": "job
|
|
264
|
+
"description": "job 名称,同一凭证(token)下唯一",
|
|
252
265
|
"title": "Name",
|
|
253
266
|
"type": "string"
|
|
254
267
|
},
|
|
@@ -342,7 +355,7 @@
|
|
|
342
355
|
"field": "name",
|
|
343
356
|
"type": "string",
|
|
344
357
|
"required": true,
|
|
345
|
-
"desc": "job
|
|
358
|
+
"desc": "job 名称,同一凭证(token)下唯一"
|
|
346
359
|
},
|
|
347
360
|
{
|
|
348
361
|
"flag": "--rule-ids",
|
|
@@ -506,7 +519,7 @@
|
|
|
506
519
|
"type": "integer"
|
|
507
520
|
},
|
|
508
521
|
"name": {
|
|
509
|
-
"description": "job
|
|
522
|
+
"description": "job 名称,同一凭证(token)下唯一",
|
|
510
523
|
"title": "Name",
|
|
511
524
|
"type": "string"
|
|
512
525
|
},
|
|
@@ -720,7 +733,7 @@
|
|
|
720
733
|
},
|
|
721
734
|
"SftpTarget": {
|
|
722
735
|
"additionalProperties": false,
|
|
723
|
-
"description": "sftp(本期):把导出文件上传到 SFTP
|
|
736
|
+
"description": "sftp(本期):把导出文件上传到 SFTP 远端目录。\n目录与文件名都支持日期变量 ``yyyyMMdd`` / ``yyyyMM`` / ``yyyy``,同一个 task 重跑多少次,远端路径与文件名都不变。",
|
|
724
737
|
"properties": {
|
|
725
738
|
"type": {
|
|
726
739
|
"const": "sftp",
|
|
@@ -750,10 +763,23 @@
|
|
|
750
763
|
"type": "string"
|
|
751
764
|
},
|
|
752
765
|
"remote_path": {
|
|
753
|
-
"description": "
|
|
766
|
+
"description": "远端目录/路径。可在**任意一层**用日期变量,但变量必须**独占一层**:`/data/sub/yyyyMM/yyyyMMdd` 合法,`/data/sub_yyyyMMdd` 非法。只认 yyyyMMdd / yyyyMM / yyyy 三种;不允许 '..'、空目录层。",
|
|
754
767
|
"title": "Remote Path",
|
|
755
768
|
"type": "string"
|
|
756
769
|
},
|
|
770
|
+
"filename_template": {
|
|
771
|
+
"anyOf": [
|
|
772
|
+
{
|
|
773
|
+
"type": "string"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"type": "null"
|
|
777
|
+
}
|
|
778
|
+
],
|
|
779
|
+
"default": null,
|
|
780
|
+
"description": "自定义文件名模板(不含扩展名)。只允许字母、数字、'_'、'-' 与日期变量,且变量前后必须是 '_' 或首尾:`daily_yyyyMMdd_export`、`yyyyMM_summary` 合法,`dailyyyyyMMdd`、`report-yyyyMMdd-x` 非法。系统统一追加 `_<task_id>` 与扩展名。不传=沿用默认 `<job_id>_<task_id>.<ext>`。",
|
|
781
|
+
"title": "Filename Template"
|
|
782
|
+
},
|
|
757
783
|
"format": {
|
|
758
784
|
"default": "json",
|
|
759
785
|
"description": "文件格式:csv/excel/json(默认 json)",
|
|
@@ -992,7 +1018,7 @@
|
|
|
992
1018
|
},
|
|
993
1019
|
"SftpTarget": {
|
|
994
1020
|
"additionalProperties": false,
|
|
995
|
-
"description": "sftp(本期):把导出文件上传到 SFTP
|
|
1021
|
+
"description": "sftp(本期):把导出文件上传到 SFTP 远端目录。\n目录与文件名都支持日期变量 ``yyyyMMdd`` / ``yyyyMM`` / ``yyyy``,同一个 task 重跑多少次,远端路径与文件名都不变。",
|
|
996
1022
|
"properties": {
|
|
997
1023
|
"type": {
|
|
998
1024
|
"const": "sftp",
|
|
@@ -1022,10 +1048,23 @@
|
|
|
1022
1048
|
"type": "string"
|
|
1023
1049
|
},
|
|
1024
1050
|
"remote_path": {
|
|
1025
|
-
"description": "
|
|
1051
|
+
"description": "远端目录/路径。可在**任意一层**用日期变量,但变量必须**独占一层**:`/data/sub/yyyyMM/yyyyMMdd` 合法,`/data/sub_yyyyMMdd` 非法。只认 yyyyMMdd / yyyyMM / yyyy 三种;不允许 '..'、空目录层。",
|
|
1026
1052
|
"title": "Remote Path",
|
|
1027
1053
|
"type": "string"
|
|
1028
1054
|
},
|
|
1055
|
+
"filename_template": {
|
|
1056
|
+
"anyOf": [
|
|
1057
|
+
{
|
|
1058
|
+
"type": "string"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
"type": "null"
|
|
1062
|
+
}
|
|
1063
|
+
],
|
|
1064
|
+
"default": null,
|
|
1065
|
+
"description": "自定义文件名模板(不含扩展名)。只允许字母、数字、'_'、'-' 与日期变量,且变量前后必须是 '_' 或首尾:`daily_yyyyMMdd_export`、`yyyyMM_summary` 合法,`dailyyyyyMMdd`、`report-yyyyMMdd-x` 非法。系统统一追加 `_<task_id>` 与扩展名。不传=沿用默认 `<job_id>_<task_id>.<ext>`。",
|
|
1066
|
+
"title": "Filename Template"
|
|
1067
|
+
},
|
|
1029
1068
|
"format": {
|
|
1030
1069
|
"default": "json",
|
|
1031
1070
|
"description": "文件格式:csv/excel/json(默认 json)",
|
|
@@ -1068,7 +1107,7 @@
|
|
|
1068
1107
|
}
|
|
1069
1108
|
],
|
|
1070
1109
|
"default": null,
|
|
1071
|
-
"description": "新名称(
|
|
1110
|
+
"description": "新名称(同一凭证下唯一)",
|
|
1072
1111
|
"title": "Name"
|
|
1073
1112
|
},
|
|
1074
1113
|
"rule_ids": {
|
|
@@ -1222,7 +1261,7 @@
|
|
|
1222
1261
|
"type": "integer"
|
|
1223
1262
|
},
|
|
1224
1263
|
"name": {
|
|
1225
|
-
"description": "job
|
|
1264
|
+
"description": "job 名称,同一凭证(token)下唯一",
|
|
1226
1265
|
"title": "Name",
|
|
1227
1266
|
"type": "string"
|
|
1228
1267
|
},
|
|
@@ -1323,7 +1362,7 @@
|
|
|
1323
1362
|
"field": "name",
|
|
1324
1363
|
"type": "string",
|
|
1325
1364
|
"required": false,
|
|
1326
|
-
"desc": "新名称(
|
|
1365
|
+
"desc": "新名称(同一凭证下唯一)"
|
|
1327
1366
|
},
|
|
1328
1367
|
{
|
|
1329
1368
|
"flag": "--rule-ids",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@social-data/social-neuron-subscription",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.5",
|
|
4
4
|
"description": "Social Neuron subscription 能力 CLI —— 一能力一命令(social-neuron-subscription),薄客户端直达 /subscription/{op}。",
|
|
5
5
|
"bin": {
|
|
6
6
|
"social-neuron-subscription": "bin/cli.js"
|
|
@@ -21,7 +21,7 @@ metadata:
|
|
|
21
21
|
|
|
22
22
|
| flag | 字段 | 类型 | 必填 | 约束 | 说明 |
|
|
23
23
|
|---|---|---|---|---|---|
|
|
24
|
-
| --name | name | string | 是 | minLen=1, maxLen=128 | job
|
|
24
|
+
| --name | name | string | 是 | minLen=1, maxLen=128 | job 名称,同一凭证(token)下唯一 |
|
|
25
25
|
| --rule-ids | rule_ids | list[string] | 是 | minItems=1, minLen=1 | 魔方规则ID数组,至少 1 个 |
|
|
26
26
|
| --source | source | list[string] | 是 | minItems=1, minLen=1 | 站点数组,至少 1 个;只能取已配置站点 |
|
|
27
27
|
| --published | published | enum(T-0、T-1、T-7) | 是 | - | 发布时间口径:T-0(当天)/ T-1(昨天)/ T-7(近7天到昨天) |
|
|
@@ -46,6 +46,7 @@ metadata:
|
|
|
46
46
|
| format | enum(csv、excel、json) | 否 | - | 文件格式:csv/excel/json(默认 json) |
|
|
47
47
|
|
|
48
48
|
**对象 `SftpTarget`** —— sftp(本期):把导出文件上传到 SFTP 远端目录。
|
|
49
|
+
目录与文件名都支持日期变量 ``yyyyMMdd`` / ``yyyyMM`` / ``yyyy``,同一个 task 重跑多少次,远端路径与文件名都不变。
|
|
49
50
|
|
|
50
51
|
| 键 | 类型 | 必填 | 约束 | 说明 |
|
|
51
52
|
|---|---|---|---|---|
|
|
@@ -54,7 +55,8 @@ metadata:
|
|
|
54
55
|
| port | integer | 否 | - | 端口,默认 22 |
|
|
55
56
|
| username | string | 是 | - | 登录用户名 |
|
|
56
57
|
| password | string | 是 | - | 登录密码 |
|
|
57
|
-
| remote_path | string | 是 | - |
|
|
58
|
+
| remote_path | string | 是 | - | 远端目录/路径。可在**任意一层**用日期变量,但变量必须**独占一层**:`/data/sub/yyyyMM/yyyyMMdd` 合法,`/data/sub_yyyyMMdd` 非法。只认 yyyyMMdd / yyyyMM / yyyy 三种;不允许 '..'、空目录层。 |
|
|
59
|
+
| filename_template | string | 否 | - | 自定义文件名模板(不含扩展名)。只允许字母、数字、'_'、'-' 与日期变量,且变量前后必须是 '_' 或首尾:`daily_yyyyMMdd_export`、`yyyyMM_summary` 合法,`dailyyyyyMMdd`、`report-yyyyMMdd-x` 非法。系统统一追加 `_<task_id>` 与扩展名。不传=沿用默认 `<job_id>_<task_id>.<ext>`。 |
|
|
58
60
|
| format | enum(csv、excel、json) | 否 | - | 文件格式:csv/excel/json(默认 json) |
|
|
59
61
|
|
|
60
62
|
**出参 `SubJob`**
|
|
@@ -62,7 +64,7 @@ metadata:
|
|
|
62
64
|
| 字段 | 类型 | 必填 | 约束 | 说明 |
|
|
63
65
|
|---|---|---|---|---|
|
|
64
66
|
| job_id | integer | 是 | - | job ID |
|
|
65
|
-
| name | string | 是 | - | job
|
|
67
|
+
| name | string | 是 | - | job 名称,同一凭证(token)下唯一 |
|
|
66
68
|
| rule_ids | list[string] | 是 | - | 魔方规则ID数组 |
|
|
67
69
|
| source | list[string] | 是 | - | 站点数组 |
|
|
68
70
|
| published | string | 是 | - | 发布时间口径:T-0(当天)/ T-1(昨天)/ T-7(近7天) |
|
|
@@ -116,7 +118,7 @@ metadata:
|
|
|
116
118
|
| 键 | 类型 | 必填 | 约束 | 说明 |
|
|
117
119
|
|---|---|---|---|---|
|
|
118
120
|
| job_id | integer | 是 | - | job ID |
|
|
119
|
-
| name | string | 是 | - | job
|
|
121
|
+
| name | string | 是 | - | job 名称,同一凭证(token)下唯一 |
|
|
120
122
|
| rule_ids | list[string] | 是 | - | 魔方规则ID数组 |
|
|
121
123
|
| source | list[string] | 是 | - | 站点数组 |
|
|
122
124
|
| published | string | 是 | - | 发布时间口径:T-0(当天)/ T-1(昨天)/ T-7(近7天) |
|
|
@@ -164,6 +166,7 @@ metadata:
|
|
|
164
166
|
| format | enum(csv、excel、json) | 否 | - | 文件格式:csv/excel/json(默认 json) |
|
|
165
167
|
|
|
166
168
|
**对象 `SftpTarget`** —— sftp(本期):把导出文件上传到 SFTP 远端目录。
|
|
169
|
+
目录与文件名都支持日期变量 ``yyyyMMdd`` / ``yyyyMM`` / ``yyyy``,同一个 task 重跑多少次,远端路径与文件名都不变。
|
|
167
170
|
|
|
168
171
|
| 键 | 类型 | 必填 | 约束 | 说明 |
|
|
169
172
|
|---|---|---|---|---|
|
|
@@ -172,7 +175,8 @@ metadata:
|
|
|
172
175
|
| port | integer | 否 | - | 端口,默认 22 |
|
|
173
176
|
| username | string | 是 | - | 登录用户名 |
|
|
174
177
|
| password | string | 是 | - | 登录密码 |
|
|
175
|
-
| remote_path | string | 是 | - |
|
|
178
|
+
| remote_path | string | 是 | - | 远端目录/路径。可在**任意一层**用日期变量,但变量必须**独占一层**:`/data/sub/yyyyMM/yyyyMMdd` 合法,`/data/sub_yyyyMMdd` 非法。只认 yyyyMMdd / yyyyMM / yyyy 三种;不允许 '..'、空目录层。 |
|
|
179
|
+
| filename_template | string | 否 | - | 自定义文件名模板(不含扩展名)。只允许字母、数字、'_'、'-' 与日期变量,且变量前后必须是 '_' 或首尾:`daily_yyyyMMdd_export`、`yyyyMM_summary` 合法,`dailyyyyyMMdd`、`report-yyyyMMdd-x` 非法。系统统一追加 `_<task_id>` 与扩展名。不传=沿用默认 `<job_id>_<task_id>.<ext>`。 |
|
|
176
180
|
| format | enum(csv、excel、json) | 否 | - | 文件格式:csv/excel/json(默认 json) |
|
|
177
181
|
|
|
178
182
|
**出参 `SubJobTriggerResult`**
|
|
@@ -192,7 +196,7 @@ metadata:
|
|
|
192
196
|
| flag | 字段 | 类型 | 必填 | 约束 | 说明 |
|
|
193
197
|
|---|---|---|---|---|---|
|
|
194
198
|
| --job-id | job_id | integer | 是 | - | 目标 job |
|
|
195
|
-
| --name | name | string | 否 | minLen=1, maxLen=128 | 新名称(
|
|
199
|
+
| --name | name | string | 否 | minLen=1, maxLen=128 | 新名称(同一凭证下唯一) |
|
|
196
200
|
| --rule-ids | rule_ids | list[string] | 否 | minItems=1, minLen=1 | 整组全量覆盖 |
|
|
197
201
|
| --source | source | list[string] | 否 | minItems=1, minLen=1 | 整组全量覆盖 |
|
|
198
202
|
| --published | published | enum(T-0、T-1、T-7) | 否 | - | 发布时间口径:T-0 / T-1 / T-7 |
|
|
@@ -218,6 +222,7 @@ metadata:
|
|
|
218
222
|
| format | enum(csv、excel、json) | 否 | - | 文件格式:csv/excel/json(默认 json) |
|
|
219
223
|
|
|
220
224
|
**对象 `SftpTarget`** —— sftp(本期):把导出文件上传到 SFTP 远端目录。
|
|
225
|
+
目录与文件名都支持日期变量 ``yyyyMMdd`` / ``yyyyMM`` / ``yyyy``,同一个 task 重跑多少次,远端路径与文件名都不变。
|
|
221
226
|
|
|
222
227
|
| 键 | 类型 | 必填 | 约束 | 说明 |
|
|
223
228
|
|---|---|---|---|---|
|
|
@@ -226,7 +231,8 @@ metadata:
|
|
|
226
231
|
| port | integer | 否 | - | 端口,默认 22 |
|
|
227
232
|
| username | string | 是 | - | 登录用户名 |
|
|
228
233
|
| password | string | 是 | - | 登录密码 |
|
|
229
|
-
| remote_path | string | 是 | - |
|
|
234
|
+
| remote_path | string | 是 | - | 远端目录/路径。可在**任意一层**用日期变量,但变量必须**独占一层**:`/data/sub/yyyyMM/yyyyMMdd` 合法,`/data/sub_yyyyMMdd` 非法。只认 yyyyMMdd / yyyyMM / yyyy 三种;不允许 '..'、空目录层。 |
|
|
235
|
+
| filename_template | string | 否 | - | 自定义文件名模板(不含扩展名)。只允许字母、数字、'_'、'-' 与日期变量,且变量前后必须是 '_' 或首尾:`daily_yyyyMMdd_export`、`yyyyMM_summary` 合法,`dailyyyyyMMdd`、`report-yyyyMMdd-x` 非法。系统统一追加 `_<task_id>` 与扩展名。不传=沿用默认 `<job_id>_<task_id>.<ext>`。 |
|
|
230
236
|
| format | enum(csv、excel、json) | 否 | - | 文件格式:csv/excel/json(默认 json) |
|
|
231
237
|
|
|
232
238
|
**出参 `SubJob`**
|
|
@@ -234,7 +240,7 @@ metadata:
|
|
|
234
240
|
| 字段 | 类型 | 必填 | 约束 | 说明 |
|
|
235
241
|
|---|---|---|---|---|
|
|
236
242
|
| job_id | integer | 是 | - | job ID |
|
|
237
|
-
| name | string | 是 | - | job
|
|
243
|
+
| name | string | 是 | - | job 名称,同一凭证(token)下唯一 |
|
|
238
244
|
| rule_ids | list[string] | 是 | - | 魔方规则ID数组 |
|
|
239
245
|
| source | list[string] | 是 | - | 站点数组 |
|
|
240
246
|
| published | string | 是 | - | 发布时间口径:T-0(当天)/ T-1(昨天)/ T-7(近7天) |
|