@glodon-aiot/chat-app-sdk 0.0.13 → 0.0.14

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/es/index.esm.js CHANGED
@@ -15005,6 +15005,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.f93f377f7f3466bb {
15005
15005
  .f93f377f7f3466bb .a78675f9ead11e1c {
15006
15006
  flex: 1 1 auto;
15007
15007
  min-height: 0;
15008
+ position: relative;
15008
15009
  }
15009
15010
  `, ""]);
15010
15011
  // Exports
@@ -15147,15 +15148,38 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.f86baf679567ad27 {
15147
15148
  align-self: stretch;
15148
15149
  border-radius: var(--mini, 5px);
15149
15150
  cursor: pointer;
15151
+ position: relative;
15150
15152
  }
15151
- .b604f7d22988c3dd .d81b38a3a3378ade {
15152
- display: none;
15153
+ .b604f7d22988c3dd .f4df3ee0cadb5d32 {
15154
+ position: absolute;
15155
+ right: 8px;
15156
+ top: 50%;
15157
+ transform: translateY(-50%);
15158
+ opacity: 0;
15159
+ pointer-events: none;
15160
+ transition: opacity 0.2s;
15161
+ width: auto;
15162
+ min-width: 0;
15163
+ flex-shrink: 0;
15164
+ display: flex;
15165
+ align-items: center;
15166
+ justify-content: center;
15167
+ }
15168
+ .b604f7d22988c3dd .def35156ce4da8d3 {
15169
+ width: auto;
15170
+ min-width: 0;
15171
+ flex-shrink: 0;
15172
+ background: #F1F1F1 !important;
15173
+ }
15174
+ .b604f7d22988c3dd .def35156ce4da8d3:hover {
15175
+ background: #DFDFDF !important;
15153
15176
  }
15154
15177
  .b604f7d22988c3dd:hover {
15155
15178
  background: #F1F1F1;
15156
15179
  }
15157
- .b604f7d22988c3dd:hover .d81b38a3a3378ade {
15158
- display: block;
15180
+ .b604f7d22988c3dd:hover .f4df3ee0cadb5d32 {
15181
+ opacity: 1;
15182
+ pointer-events: auto;
15159
15183
  }
15160
15184
  .d20070d79d26fc4c {
15161
15185
  background: #DFDFDF;
@@ -15169,8 +15193,10 @@ ___CSS_LOADER_EXPORT___.locals = {
15169
15193
  "conversationItemTime": `a333a6f519d76789`,
15170
15194
  "conversation-item-content": `b604f7d22988c3dd`,
15171
15195
  "conversationItemContent": `b604f7d22988c3dd`,
15172
- "conversation-operate": `d81b38a3a3378ade`,
15173
- "conversationOperate": `d81b38a3a3378ade`,
15196
+ "conversation-operate-wrapper": `f4df3ee0cadb5d32`,
15197
+ "conversationOperateWrapper": `f4df3ee0cadb5d32`,
15198
+ "conversation-operate-button": `def35156ce4da8d3`,
15199
+ "conversationOperateButton": `def35156ce4da8d3`,
15174
15200
  "conversation-item-content-active": `d20070d79d26fc4c`,
15175
15201
  "conversationItemContentActive": `d20070d79d26fc4c`
15176
15202
  };
@@ -15661,6 +15687,8 @@ ___CSS_LOADER_EXPORT___.push([module.id, `.c64c9a8ea4a38e72 {
15661
15687
  width: 100%;
15662
15688
  height: 100%;
15663
15689
  min-height: 0;
15690
+ padding-bottom: 34px;
15691
+ box-sizing: border-box;
15664
15692
  }
15665
15693
  .c5a6e169fa0cf192 * {
15666
15694
  box-sizing: border-box;
@@ -297047,7 +297075,7 @@ const TextItemList = (param)=>{
297047
297075
  // mix-content 内的文本内容应该和纯文本消息使用相同的样式
297048
297076
  background: '#F4F4F4',
297049
297077
  padding: '10px',
297050
- borderRadius: '10px 0px 10px 10px',
297078
+ borderRadius: '10px 0 10px 10px',
297051
297079
  textAlign: 'right'
297052
297080
  },
297053
297081
  children: [
@@ -298958,7 +298986,7 @@ const FileCard_FileCard = (props)=>{
298958
298986
  }),
298959
298987
  children: nameWithoutExtension
298960
298988
  }),
298961
- /*#__PURE__*/ (0,jsx_runtime.jsx)("span", {
298989
+ file.file_size > 0 && /*#__PURE__*/ (0,jsx_runtime.jsx)("span", {
298962
298990
  // chat-uikit-file-card__info__size
298963
298991
  className: classnames_default()('text-base font-normal leading-[16px]', isCanceled ? 'coz-fg-dim' : 'coz-fg-secondary'),
298964
298992
  children: convertBytes(file.file_size)
@@ -299081,6 +299109,19 @@ FileCard_FileCard.displayName = 'FileCard';
299081
299109
  */
299082
299110
 
299083
299111
 
299112
+ // 默认的 fileAttributeKeys,用于混合消息中的文件显示
299113
+ // 注意:这些值需要与实际的 FileStatus 枚举值匹配
299114
+ // FileStatus: Init=0, Uploading=1, Success=2, Canceled=3, Error=4
299115
+ const DEFAULT_FILE_ATTRIBUTE_KEYS = {
299116
+ statusKey: 'upload_status',
299117
+ statusEnum: {
299118
+ successEnum: 2,
299119
+ failEnum: 4,
299120
+ cancelEnum: 3,
299121
+ uploadingEnum: 1
299122
+ },
299123
+ percentKey: 'upload_percent'
299124
+ };
299084
299125
  const FileItemList = (param)=>{
299085
299126
  let { fileItemList, fileAttributeKeys, fileCopywriting, readonly, onRetry, onCancel, onCopy, message, layout, showBackground } = param;
299086
299127
  /**
@@ -299107,13 +299148,15 @@ const FileItemList = (param)=>{
299107
299148
  extra: {}
299108
299149
  });
299109
299150
  };
299151
+ // 使用传入的 fileAttributeKeys 或默认值
299152
+ const effectiveFileAttributeKeys = fileAttributeKeys || DEFAULT_FILE_ATTRIBUTE_KEYS;
299110
299153
  return /*#__PURE__*/ (0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
299111
299154
  children: fileItemList.map((item)=>{
299112
- if (isFileMixItem(item) && fileAttributeKeys) {
299155
+ if (isFileMixItem(item)) {
299113
299156
  return /*#__PURE__*/ (0,jsx_runtime.jsx)(components_FileCard, {
299114
299157
  className: "chat-uikit-multi-modal-file-image-content select-none",
299115
299158
  file: item.file,
299116
- attributeKeys: fileAttributeKeys,
299159
+ attributeKeys: effectiveFileAttributeKeys,
299117
299160
  tooltipsCopywriting: fileCopywriting === null || fileCopywriting === void 0 ? void 0 : fileCopywriting.tooltips,
299118
299161
  readonly: readonly,
299119
299162
  onCancel: handleCancel,
@@ -383278,9 +383321,9 @@ const scroll_view_ScrollView = /*#__PURE__*/ (0,react.forwardRef)(function Scrol
383278
383321
  className: classnames_default()(src_scroll_view_index_module.scrollable, showScrollbar && src_scroll_view_index_module["show-scrollbar"], autoShowScrollbar && src_scroll_view_index_module["auto-show-scrollbar"], scrollbarWidthNone && src_scroll_view_index_module["scrollbar-width-none"], {
383279
383322
  [src_scroll_view_index_module.reverse]: reverse
383280
383323
  }),
383281
- style: {
383282
- height: '100%'
383283
- },
383324
+ // style={{
383325
+ // height: '100%',
383326
+ // }}
383284
383327
  onScroll: handleScroll,
383285
383328
  children: [
383286
383329
  lodash_es_isFunction(children) ? children(controller) : children,
@@ -408356,23 +408399,26 @@ const PcConversationItem = (param)=>{
408356
408399
  },
408357
408400
  children: item.title || intl_i18n.t('web_sdk_conversation_default_name')
408358
408401
  }),
408359
- /*#__PURE__*/ (0,jsx_runtime.jsx)(Operate, {
408360
- onRename: ()=>{
408361
- onRename(item);
408362
- setVisible(false);
408363
- },
408364
- onDelete: ()=>{
408365
- onDelete(item);
408366
- setVisible(false);
408367
- },
408368
- visible: visible,
408369
- setVisible: setVisible,
408370
- children: /*#__PURE__*/ (0,jsx_runtime.jsx)(esm_webpack_exports_IconButton, {
408371
- className: conversation_item_pc_index_module["conversation-operate"],
408372
- onClick: handleClick,
408373
- size: "small",
408374
- icon: /*#__PURE__*/ (0,jsx_runtime.jsx)(__webpack_exports__IconCozMore, {}),
408375
- color: "secondary"
408402
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
408403
+ className: conversation_item_pc_index_module["conversation-operate-wrapper"],
408404
+ children: /*#__PURE__*/ (0,jsx_runtime.jsx)(Operate, {
408405
+ onRename: ()=>{
408406
+ onRename(item);
408407
+ setVisible(false);
408408
+ },
408409
+ onDelete: ()=>{
408410
+ onDelete(item);
408411
+ setVisible(false);
408412
+ },
408413
+ visible: visible,
408414
+ setVisible: setVisible,
408415
+ children: /*#__PURE__*/ (0,jsx_runtime.jsx)(esm_webpack_exports_IconButton, {
408416
+ className: conversation_item_pc_index_module["conversation-operate-button"],
408417
+ onClick: handleClick,
408418
+ size: "small",
408419
+ icon: /*#__PURE__*/ (0,jsx_runtime.jsx)(__webpack_exports__IconCozMore, {}),
408420
+ color: "secondary"
408421
+ })
408376
408422
  })
408377
408423
  })
408378
408424
  ]
@@ -416930,7 +416976,45 @@ const convertShortcutData = (shortcutCommands, botInfo)=>//@ts-expect-error: 不
416930
416976
 
416931
416977
 
416932
416978
 
416979
+
416980
+
416981
+
416933
416982
  const microSeconds = 1000;
416983
+ /**
416984
+ * 从URL中提取文件名
416985
+ * @param url 文件URL
416986
+ * @returns 文件名,如果无法提取则返回空字符串
416987
+ */ const extractFileNameFromUrl = (url)=>{
416988
+ if (!url) {
416989
+ return '';
416990
+ }
416991
+ try {
416992
+ const urlObj = new URL(url);
416993
+ const { pathname } = urlObj;
416994
+ let fileName = pathname.split('/').pop() || '';
416995
+ // 移除查询参数和hash
416996
+ fileName = fileName.split('?')[0].split('#')[0] || '';
416997
+ // 解码URI编码的文件名
416998
+ try {
416999
+ return decodeURIComponent(fileName);
417000
+ } catch {
417001
+ // 如果解码失败,返回原始文件名
417002
+ return fileName;
417003
+ }
417004
+ } catch {
417005
+ // 如果不是有效的URL,尝试直接解析路径
417006
+ const parts = url.split('/');
417007
+ let fileName = parts[parts.length - 1] || '';
417008
+ fileName = fileName.split('?')[0].split('#')[0] || '';
417009
+ // 解码URI编码的文件名
417010
+ try {
417011
+ return decodeURIComponent(fileName);
417012
+ } catch {
417013
+ // 如果解码失败,返回原始文件名
417014
+ return fileName;
417015
+ }
417016
+ }
417017
+ };
416934
417018
  // 消息转换成 Coze的消息,主要用于消息接收后,在页面显示。
416935
417019
  class MessageConverseToCoze {
416936
417020
  convertMessageListResponse(res) {
@@ -417081,22 +417165,25 @@ class MessageConverseToCoze {
417081
417165
  }
417082
417166
  case 'file':
417083
417167
  {
417084
- const { fileType = const_FileTypeEnum.DEFAULT_UNKNOWN } = // @ts-expect-error -- linter-disable-autofix, 新添加参数,sdk中还未支持到
417085
- getFileInfo(new File([], item === null || item === void 0 ? void 0 : item.name)) || {};
417086
- return {
417168
+ const fileName = (item === null || item === void 0 ? void 0 : item.name) || extractFileNameFromUrl(item === null || item === void 0 ? void 0 : item.file_url);
417169
+ const { fileType = const_FileTypeEnum.DEFAULT_UNKNOWN } = getFileInfo(new File([], fileName)) || {};
417170
+ console.log('convertMixContent file', item);
417171
+ // 当没有 file_id 时,使用 file_url 作为 file_key
417172
+ const fileKey = item.file_id || item.file_url || '';
417173
+ const fileData = {
417087
417174
  type: types_ContentType.File,
417088
417175
  file: {
417089
- file_key: item.file_id || '',
417090
- // @ts-expect-error -- linter-disable-autofix, 新添加参数,sdk中还未支持到
417091
- file_name: item === null || item === void 0 ? void 0 : item.name,
417092
- // @ts-expect-error -- linter-disable-autofix, 新添加参数,sdk中还未支持到
417093
- file_size: item === null || item === void 0 ? void 0 : item.size,
417176
+ file_key: fileKey,
417177
+ file_name: fileName || '未知文件',
417178
+ file_size: (item === null || item === void 0 ? void 0 : item.size) ?? 0,
417094
417179
  file_type: fileType,
417095
- file_url: item === null || item === void 0 ? void 0 : item.file_url
417180
+ file_url: (item === null || item === void 0 ? void 0 : item.file_url) || ''
417096
417181
  },
417097
417182
  // @ts-expect-error -- linter-disable-autofix
417098
417183
  is_refer: item.is_refer || undefined
417099
417184
  };
417185
+ console.log('convertMixContent file result', fileData);
417186
+ return fileData;
417100
417187
  }
417101
417188
  case 'json':
417102
417189
  {
@@ -417613,6 +417700,35 @@ const useClearMessageContextAdapter = ()=>{
417613
417700
  ]);
417614
417701
  };
417615
417702
 
417703
+ ;// CONCATENATED MODULE: ../open-chat/src/chat/builder-chat/helper/get-connector-id.ts
417704
+ /*
417705
+ * Copyright 2025 coze-dev Authors
417706
+ *
417707
+ * Licensed under the Apache License, Version 2.0 (the "License");
417708
+ * you may not use this file except in compliance with the License.
417709
+ * You may obtain a copy of the License at
417710
+ *
417711
+ * http://www.apache.org/licenses/LICENSE-2.0
417712
+ *
417713
+ * Unless required by applicable law or agreed to in writing, software
417714
+ * distributed under the License is distributed on an "AS IS" BASIS,
417715
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
417716
+ * See the License for the specific language governing permissions and
417717
+ * limitations under the License.
417718
+ */
417719
+ const getConnectorId = (props)=>{
417720
+ const { project } = props;
417721
+ const { mode, connectorId } = project || {};
417722
+ if (!connectorId) {
417723
+ if (mode === 'websdk') {
417724
+ return webSdkDefaultConnectorId;
417725
+ } else if (mode === 'draft') {
417726
+ return chatflowDraftConnectorId;
417727
+ }
417728
+ }
417729
+ return connectorId;
417730
+ };
417731
+
417616
417732
  ;// CONCATENATED MODULE: ../open-chat/src/chat/builder-chat/services/create-conversation.ts
417617
417733
  /*
417618
417734
  * Copyright 2025 coze-dev Authors
@@ -417630,6 +417746,7 @@ const useClearMessageContextAdapter = ()=>{
417630
417746
  * limitations under the License.
417631
417747
  */
417632
417748
 
417749
+
417633
417750
  // 用于发送消息时创建 conversation 的函数
417634
417751
  const createConversationForMessage = async (apiSdk, props)=>{
417635
417752
  let conversationId = '';
@@ -417750,13 +417867,87 @@ const createConversationForMessage = async (apiSdk, props)=>{
417750
417867
  throw new Error(`Failed to create conversation: ${JSON.stringify(error)}`);
417751
417868
  }
417752
417869
  };
417753
- const createOrGetConversation = (apiSdk, props)=>// 初始化时不创建 conversation,返回空值
417870
+ const createOrGetConversation = async (apiSdk, props)=>{
417871
+ // 如果没有 conversationName,保持现有行为:不创建会话,返回空值
417754
417872
  // conversation 将在用户发送第一条消息时创建
417755
- Promise.resolve({
417873
+ if (!props.project.conversationName || props.project.conversationName.trim() === '') {
417874
+ return {
417875
+ conversationId: '',
417876
+ sectionId: '',
417877
+ conversationName: undefined
417878
+ };
417879
+ }
417880
+ // 如果有 conversationName,在初始化时就创建/获取会话
417881
+ if (props.project.type === 'app') {
417882
+ try {
417883
+ const connectorId = getConnectorId(props);
417884
+ const createPayload = {
417885
+ app_id: props.project.id,
417886
+ draft_mode: props.project.mode === 'draft',
417887
+ workflow_id: props.workflow.id || '',
417888
+ connector_id: connectorId,
417889
+ get_or_create: true,
417890
+ conversation_name: props.project.conversationName
417891
+ };
417892
+ const res = await (apiSdk === null || apiSdk === void 0 ? void 0 : apiSdk.post('/v1/workflow/conversation/create', createPayload, false, {
417893
+ headers: {
417894
+ 'Accept-Language': intl.language === 'zh-CN' ? 'zh' : 'en'
417895
+ }
417896
+ }));
417897
+ if ((res === null || res === void 0 ? void 0 : res.code) === 0 && (res === null || res === void 0 ? void 0 : res.data)) {
417898
+ const conversationId = res.data.id || '';
417899
+ const sectionId = res.data.last_section_id || '';
417900
+ // 确保 conversationId 不为空
417901
+ if (!conversationId || conversationId.trim() === '') {
417902
+ throw new Error('Failed to create conversation: empty conversationId returned');
417903
+ }
417904
+ // 获取会话详情以获取 conversation_name
417905
+ let conversationName = undefined;
417906
+ if (conversationId) {
417907
+ try {
417908
+ const detailRes = await (apiSdk === null || apiSdk === void 0 ? void 0 : apiSdk.get(`/v1/workflow/conversations/${conversationId}`, {
417909
+ app_id: props.project.id,
417910
+ workflow_id: props.workflow.id || '',
417911
+ connector_id: connectorId
417912
+ }));
417913
+ if ((detailRes === null || detailRes === void 0 ? void 0 : detailRes.code) === 0 && (detailRes === null || detailRes === void 0 ? void 0 : detailRes.data)) {
417914
+ const name = detailRes.data.conversation_name || detailRes.data.name || detailRes.data.title;
417915
+ conversationName = name || undefined;
417916
+ }
417917
+ } catch (detailError) {
417918
+ console.warn('Failed to fetch conversation detail:', detailError);
417919
+ conversationName = props.project.conversationName;
417920
+ }
417921
+ }
417922
+ return {
417923
+ conversationId,
417924
+ sectionId,
417925
+ conversationName: conversationName || props.project.conversationName
417926
+ };
417927
+ } else {
417928
+ const errorMsg = (res === null || res === void 0 ? void 0 : res.msg) || `code=${(res === null || res === void 0 ? void 0 : res.code) ?? 'unknown'}`;
417929
+ throw new Error(`Failed to create conversation: ${errorMsg}`);
417930
+ }
417931
+ } catch (error) {
417932
+ console.error('createOrGetConversation error:', error);
417933
+ // 如果创建失败,返回空值,让系统在发送消息时再创建
417934
+ if (error instanceof Error) {
417935
+ console.warn('Failed to create conversation during init, will create on first message:', error.message);
417936
+ }
417937
+ return {
417938
+ conversationId: '',
417939
+ sectionId: '',
417940
+ conversationName: undefined
417941
+ };
417942
+ }
417943
+ }
417944
+ // Bot 模式:保持现有行为,不在这里创建会话
417945
+ return {
417756
417946
  conversationId: '',
417757
417947
  sectionId: '',
417758
417948
  conversationName: undefined
417759
- });
417949
+ };
417950
+ };
417760
417951
 
417761
417952
  ;// CONCATENATED MODULE: ../open-chat/src/components/studio-open-chat/provider/coz-sdk/api-adapter/message/message-convert-to-sdk.ts
417762
417953
  /*
@@ -436935,35 +437126,6 @@ const getBuilderEventCallbackPlugin = (props)=>{
436935
437126
 
436936
437127
  ;// CONCATENATED MODULE: ../open-chat/src/assets/chatflow-logo.png
436937
437128
  const chatflow_logo_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAwkSURBVHgB7d2xblRXGsDxwyrQGGkxhaHACmsatgEiUQSKYCRoSBHnCYAngDxBnCcIPAEgP0BIkTRBwk4RUiCF0EADSwQFuABWwg0p2PkGhiUBxL0zd+z57v39pNGwu83OzJ2/zzn33DubytLSiwKQwD8KQBKCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWk8VGBEe2emirbtmz5yyPce/as//z0+fNyb22t/wyjECwqixAdmJ7uP/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PYSqGYLVsAjX/MxMOblnTzkwPV22bdlS6I4IU6xtfn//fn+PlVA1S7DGbBCtwYN2iiWB/sOdF8bqo8JYOZMIzbHoDqQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGoIFpCFYQBqCBaQhWEAaggWkIVhAGv8DJbWhlGwbFtYAAAAASUVORK5CYII=";
436938
- ;// CONCATENATED MODULE: ../open-chat/src/chat/builder-chat/helper/get-connector-id.ts
436939
- /*
436940
- * Copyright 2025 coze-dev Authors
436941
- *
436942
- * Licensed under the Apache License, Version 2.0 (the "License");
436943
- * you may not use this file except in compliance with the License.
436944
- * You may obtain a copy of the License at
436945
- *
436946
- * http://www.apache.org/licenses/LICENSE-2.0
436947
- *
436948
- * Unless required by applicable law or agreed to in writing, software
436949
- * distributed under the License is distributed on an "AS IS" BASIS,
436950
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
436951
- * See the License for the specific language governing permissions and
436952
- * limitations under the License.
436953
- */
436954
- const getConnectorId = (props)=>{
436955
- const { project } = props;
436956
- const { mode, connectorId } = project || {};
436957
- if (!connectorId) {
436958
- if (mode === 'websdk') {
436959
- return webSdkDefaultConnectorId;
436960
- } else if (mode === 'draft') {
436961
- return chatflowDraftConnectorId;
436962
- }
436963
- }
436964
- return connectorId;
436965
- };
436966
-
436967
437129
  ;// CONCATENATED MODULE: ../open-chat/src/chat/builder-chat/services/get-bot-info.ts
436968
437130
  /*
436969
437131
  * Copyright 2025 coze-dev Authors