yidaconnector 2026.6.11

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.
Files changed (79) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +383 -0
  3. package/bin/yida.js +670 -0
  4. package/lib/app/form-navigation.js +58 -0
  5. package/lib/app/get-schema.js +538 -0
  6. package/lib/auth/auth.js +294 -0
  7. package/lib/auth/cdp-browser-login.js +390 -0
  8. package/lib/auth/codex-login.js +71 -0
  9. package/lib/auth/login.js +475 -0
  10. package/lib/auth/org.js +363 -0
  11. package/lib/auth/qr-login.js +1563 -0
  12. package/lib/core/chalk.js +384 -0
  13. package/lib/core/check-update.js +82 -0
  14. package/lib/core/cli-error.js +39 -0
  15. package/lib/core/command-manifest.js +106 -0
  16. package/lib/core/env-cmd.js +545 -0
  17. package/lib/core/env-manager.js +601 -0
  18. package/lib/core/env.js +287 -0
  19. package/lib/core/i18n.js +177 -0
  20. package/lib/core/locales/ar.js +805 -0
  21. package/lib/core/locales/de.js +805 -0
  22. package/lib/core/locales/en.js +1623 -0
  23. package/lib/core/locales/es.js +805 -0
  24. package/lib/core/locales/fr.js +805 -0
  25. package/lib/core/locales/hi.js +805 -0
  26. package/lib/core/locales/ja.js +1197 -0
  27. package/lib/core/locales/ko.js +807 -0
  28. package/lib/core/locales/pt.js +805 -0
  29. package/lib/core/locales/vi.js +805 -0
  30. package/lib/core/locales/zh-HK.js +1233 -0
  31. package/lib/core/locales/zh.js +1584 -0
  32. package/lib/core/query-data.js +781 -0
  33. package/lib/core/redact.js +100 -0
  34. package/lib/core/utils.js +799 -0
  35. package/lib/core/yida-client.js +117 -0
  36. package/package.json +94 -0
  37. package/project/config.json +4 -0
  38. package/project/pages/src/demo-birthday-game.oyd.jsx +832 -0
  39. package/project/pages/src/demo-chip-insight.oyd.jsx +983 -0
  40. package/project/pages/src/demo-compat-smoke.oyd.jsx +58 -0
  41. package/project/pages/src/demo-crm-batch-entry.oyd.jsx +805 -0
  42. package/project/pages/src/demo-crm-dashboard.oyd.jsx +677 -0
  43. package/project/pages/src/demo-future-vision-2026.oyd.jsx +1102 -0
  44. package/project/pages/src/demo-ppt.oyd.jsx +1192 -0
  45. package/project/pages/src/demo-salary-calculator.oyd.jsx +904 -0
  46. package/project/pages/src/yidaconnector-knowledge-doc.oyd.jsx +1714 -0
  47. package/project/prd/demo-birthday-game.md +39 -0
  48. package/project/prd/demo-crm.md +463 -0
  49. package/project/prd/demo-dingtalk-ai-solution-center.md +425 -0
  50. package/project/prd/demo-future-vision-2026.md +78 -0
  51. package/project/prd/demo-salary-calculator.md +101 -0
  52. package/scripts/build-skills-package.js +406 -0
  53. package/scripts/check-syntax.js +59 -0
  54. package/scripts/demo-dws.sh +106 -0
  55. package/scripts/e2e-real/cleanup.js +67 -0
  56. package/scripts/e2e-real/fixtures/form-fields.json +18 -0
  57. package/scripts/e2e-real/full-runner.js +1566 -0
  58. package/scripts/e2e-real/runner.js +293 -0
  59. package/scripts/e2e-real/skill-coverage.js +115 -0
  60. package/scripts/generate-command-docs.js +109 -0
  61. package/scripts/nightly-smoke.js +134 -0
  62. package/scripts/postinstall.js +545 -0
  63. package/scripts/solution-center-runner.js +368 -0
  64. package/scripts/validate-ci.sh +50 -0
  65. package/scripts/validate-command-manifest.js +119 -0
  66. package/scripts/validate-package-size.js +78 -0
  67. package/scripts/validate-skills.js +247 -0
  68. package/scripts/validate-structure.js +66 -0
  69. package/yida-skills/SKILL.md +163 -0
  70. package/yida-skills/references/yida-api.md +1309 -0
  71. package/yida-skills/skills/large-file-write/SKILL.md +91 -0
  72. package/yida-skills/skills/large-file-write/references/write-patterns.md +149 -0
  73. package/yida-skills/skills/large-file-write/scripts/write.js +157 -0
  74. package/yida-skills/skills/yida-data-management/SKILL.md +252 -0
  75. package/yida-skills/skills/yida-data-management/references/api-matrix.md +49 -0
  76. package/yida-skills/skills/yida-data-management/references/data-format-guide.md +159 -0
  77. package/yida-skills/skills/yida-data-management/references/verified-endpoints.md +62 -0
  78. package/yida-skills/skills/yida-login/SKILL.md +159 -0
  79. package/yida-skills/skills/yida-logout/SKILL.md +67 -0
@@ -0,0 +1,805 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Gói ngôn ngữ tiếng Việt (Vietnamese)
5
+ */
6
+ module.exports = {
7
+ // ── bin/yida.js printHelp() ────────────────────────
8
+ help: {
9
+ subtitle: 'Công cụ phát triển AI low-code cho Yida',
10
+ usage: 'Cách dùng:',
11
+ alias: 'Bí danh:',
12
+ group_auth: 'Môi trường & Xác thực',
13
+ cmd_login: 'Đăng nhập (ưu tiên cache, dùng --browser hoặc --agent-qr khi cần)',
14
+ cmd_logout: 'Đăng xuất / chuyển tài khoản',
15
+ cmd_auth: 'Quản lý trạng thái đăng nhập',
16
+ cmd_org: 'Quản lý tổ chức (liệt kê / chuyển)',
17
+ cmd_env: 'Phát hiện môi trường AI và trạng thái đăng nhập',
18
+ cmd_env_management: 'Manage public/private environment profiles',
19
+ group_app: 'Quản lý ứng dụng',
20
+ cmd_app_list: 'Liệt kê ứng dụng Yida của tôi',
21
+ cmd_corp_efficiency: 'Truy vấn tổng quan hiệu quả doanh nghiệp và báo cáo chi tiết',
22
+ cmd_create_app: 'Tạo ứng dụng Yida',
23
+ cmd_update_app: 'Cập nhật thông tin ứng dụng',
24
+ cmd_nav_group: 'Quản lý nhóm điều hướng thanh bên của ứng dụng',
25
+ cmd_app_permission: 'Quản lý quản trị chính, dữ liệu và phát triển của ứng dụng',
26
+ cmd_i18n: 'Quản lý nội dung đa ngôn ngữ và cấu hình ngôn ngữ của ứng dụng',
27
+ cmd_export: 'Xuất ứng dụng (tạo gói di chuyển)',
28
+ cmd_import: 'Nhập gói di chuyển, xây dựng lại ứng dụng',
29
+ group_form: 'Biểu mẫu & Trang',
30
+ cmd_create_form: 'Tạo trang biểu mẫu',
31
+ cmd_update_form: 'Cập nhật trang biểu mẫu',
32
+ cmd_list_forms: 'List forms/pages in an app',
33
+ cmd_aggregate_table: 'Manage aggregate tables (virtualView)',
34
+ cmd_get_schema: 'Lấy Schema biểu mẫu',
35
+ cmd_create_page: 'Tạo trang hiển thị tùy chỉnh',
36
+ cmd_generate_page: 'Generate page from curated template',
37
+ cmd_check_page: 'Check custom page standards',
38
+ cmd_compile: 'Biên dịch trang tùy chỉnh cục bộ',
39
+ cmd_publish: 'Biên dịch và xuất bản trang tùy chỉnh',
40
+ cmd_update_form_config: 'Cập nhật cấu hình biểu mẫu',
41
+ group_data: 'Dữ liệu & Quyền',
42
+ cmd_data: 'Quản lý dữ liệu thống nhất (biểu mẫu/quy trình/tác vụ/biểu mẫu con)',
43
+ cmd_task_center: 'Trung tâm tác vụ toàn cầu (cần làm/đã xử lý/CC v.v.)',
44
+ cmd_basic_info: 'Truy van thong tin to chuc, dung luong, han muc va mien',
45
+ cmd_get_permission: 'Truy vấn cấu hình quyền biểu mẫu',
46
+ cmd_save_permission: 'Lưu cấu hình quyền biểu mẫu',
47
+ cmd_corp_manager: 'Quản lý quyền nền tảng',
48
+ cmd_agent_center: 'Quản lý ủy quyền quy trình và nghỉ việc',
49
+ group_process: 'Quy trình',
50
+ cmd_configure_process: 'Cấu hình và xuất bản quy tắc quy trình',
51
+ cmd_create_process: 'Tạo biểu mẫu quy trình (tích hợp)',
52
+ cmd_ai_form_setting: 'Manage process form AI approval prompts',
53
+ cmd_process_preview: 'Xem trước phiên bản quy trình (sơ đồ luồng)',
54
+ group_share: 'Cấu hình & Chia sẻ trang',
55
+ cmd_verify_url: 'Xác minh URL ngắn',
56
+ cmd_save_share: 'Lưu cấu hình truy cập công khai / chia sẻ',
57
+ cmd_get_page_config: 'Truy vấn cấu hình truy cập công khai',
58
+ cmd_externalize_form: 'Plan external access-safe mirror fields',
59
+ group_report: 'Báo cáo',
60
+ cmd_create_report: 'Tạo báo cáo Yida',
61
+ cmd_append_chart: 'Thêm biểu đồ vào báo cáo hiện có',
62
+ group_connector: 'Trình kết nối',
63
+ cmd_connector_list: 'Liệt kê trình kết nối HTTP',
64
+ cmd_connector_create: 'Tạo trình kết nối',
65
+ cmd_connector_detail: 'Xem chi tiết trình kết nối',
66
+ cmd_connector_delete: 'Xóa trình kết nối',
67
+ cmd_connector_add_action: 'Add an action',
68
+ cmd_connector_list_actions: 'List actions',
69
+ cmd_connector_delete_action: 'Delete an action',
70
+ cmd_connector_test: 'Test an action',
71
+ cmd_connector_list_connections: 'List auth connections',
72
+ cmd_connector_create_connection: 'Create an auth connection',
73
+ cmd_connector_smart: 'Tạo thông minh (từ cURL)',
74
+ cmd_connector_parse_api: 'Parse API information',
75
+ cmd_connector_gen_template: 'Generate API document template',
76
+ cmd_connector_more: 'Xem thêm lệnh con',
77
+ group_integration: 'Tích hợp & DingTalk',
78
+ cmd_integration: 'Tạo luồng tự động hóa tích hợp',
79
+ cmd_integration_list: 'List integration automation flows',
80
+ cmd_integration_enable: 'Enable integration automation flow',
81
+ cmd_integration_disable: 'Disable integration automation flow',
82
+ cmd_integration_check: 'Check abnormal integration automation run logs',
83
+ cmd_dws: 'DingTalk CLI (danh bạ/lịch/việc cần làm/phê duyệt v.v.)',
84
+ cmd_dingtalk_link: 'Tạo liên kết DingTalk AppLink / dingtalk:// cũ',
85
+ group_utility: 'Tiện ích',
86
+ cmd_commands: 'Output machine-readable command manifest',
87
+ cmd_a2a: 'Start local read-only A2A adapter or print Agent Card',
88
+ cmd_bridge: 'Start YidaConnector local web bridge service',
89
+ cmd_db_seq_fix: 'Detect and repair PostgreSQL sequence drift',
90
+ cmd_copy: 'Sao chép thư mục làm việc project',
91
+ cmd_sample: 'Xuất mẫu ví dụ/mẫu mã',
92
+ cmd_doctor: 'Chẩn đoán môi trường và sửa tự động',
93
+ cmd_update: 'Kiểm tra và cập nhật lên phiên bản mới nhất',
94
+ cmd_export_conversation: 'Xuất bản ghi hội thoại AI',
95
+ cmd_feedback: 'Configure experience feedback form and local reminder state',
96
+ cmd_batch: 'Run YidaConnector commands in batch',
97
+ cmd_flash_to_prd: 'Convert flash notes or meeting notes to a PRD prompt',
98
+ cmd_ai: 'Call Yida AI text and image recognition APIs',
99
+ cmd_cdn: 'Quản lý hình ảnh CDN (cấu hình/tải lên/làm mới)',
100
+ cmd_cdn_config: 'Configure CDN / OSS upload',
101
+ cmd_cdn_upload: 'Upload image to CDN',
102
+ cmd_cdn_refresh: 'Refresh CDN cache',
103
+ quickstart_title: 'Bắt đầu nhanh',
104
+ quickstart_app_name: 'Quản lý chấm công',
105
+ quickstart_form_name: 'Thông tin nhân viên',
106
+ docs: '📚 Tài liệu:',
107
+ },
108
+
109
+ // ── bin/yida.js ────────────────────────────────────
110
+ cli: {
111
+ integration_help: 'Cach dung: yidaconnector integration <create|list|enable|disable> ...',
112
+ integration_unknown: 'Lenh con integration khong xac dinh: {0}',
113
+ integration_help_hint: 'Chay yidaconnector integration --help de xem cac lenh con kha dung',
114
+ integration_list_usage: 'Cach dung: yidaconnector integration list <appType> [--form-uuid <uuid>] [--status y|n] [--key <kw>] [--page <n>] [--size <n>] [--json]',
115
+ integration_list_example: 'Vi du: yidaconnector integration list APP_XXX --form-uuid FORM-XXX --json',
116
+ integration_enable_usage: 'Cach dung: yidaconnector integration enable <appType> <formUuid> <processCode>',
117
+ integration_enable_example: 'Vi du: yidaconnector integration enable APP_XXX FORM-XXX LPROC-XXX',
118
+ integration_disable_usage: 'Cach dung: yidaconnector integration disable <appType> <formUuid> <processCode>',
119
+ integration_disable_example: 'Vi du: yidaconnector integration disable APP_XXX FORM-XXX LPROC-XXX',
120
+ compile_usage: 'Cách dùng: yidaconnector compile <sourceFile>',
121
+ compile_example: 'Ví dụ: yidaconnector compile pages/src/home.oyd.jsx',
122
+ check_page_usage: 'Usage: yidaconnector check-page <sourceFile> [--compat] [--json]',
123
+ check_page_example: 'Example: yidaconnector check-page pages/src/home.oyd.jsx --json',
124
+ generate_page_usage: 'Usage: yidaconnector generate-page <template> --output pages/src/home.oyd.jsx [--spec .cache/yidaconnector/page-specs/home.json] [--compile]',
125
+ generate_page_example: 'Example: yidaconnector generate-page product-homepage --brand-name OpenKuma --brand-initials OK --output pages/src/home.oyd.jsx --compile',
126
+ },
127
+
128
+ // ── lib/integration/integration-check.js ─────────
129
+ integration_check: {
130
+ result_sheet: 'Result',
131
+ header_app: 'App',
132
+ header_form_title: 'Form name',
133
+ header_form_uuid: 'Form ID',
134
+ header_flow_name: 'Automation name',
135
+ header_process_code: 'Automation ID',
136
+ header_flow_status: 'Automation status',
137
+ header_event_name: 'Trigger event',
138
+ header_last_action: 'Last action',
139
+ header_modifier: 'Modifier',
140
+ header_modified_time: 'Modified time',
141
+ header_abnormal_log_count: 'Abnormal log count',
142
+ header_proc_inst_id: 'Run instance ID',
143
+ header_form_inst_id: 'Form instance ID',
144
+ header_execution_status: 'Execution status',
145
+ header_exception: 'Exception',
146
+ header_diagnosis: 'Diagnosis',
147
+ header_recommendation: 'Recommendation',
148
+ header_start_time: 'Start time',
149
+ header_finish_time: 'Finish time',
150
+ header_elapsed_ms: 'Elapsed (ms)',
151
+ no_abnormal: 'No abnormal execution logs found',
152
+ app_failed: 'App check failed: {0}',
153
+ summary: 'Check complete: {0} apps, {1} automations, {2} with abnormal logs',
154
+ apps_failed: '{0} app(s) failed to check. See JSON output or error summary for details.',
155
+ no_logs: 'No abnormal execution logs found.',
156
+ usage: 'yidaconnector integration check <appType...> [--json] [--output result.xlsx] [--no-progress] [--flow-types 1,2,3,5,6] [--log-page-size 10] [--max-log-pages 1]',
157
+ example: 'yidaconnector integration check APP_XXX --output project/output/automation-errors.xlsx',
158
+ missing_app: 'Missing appType. Usage: yidaconnector integration check <appType...>',
159
+ banner_title: 'Check integration automation abnormal logs',
160
+ status_filter: 'Execution status filter: {0}',
161
+ checking_app: 'Checking app: {0}',
162
+ progress: 'Progress {0}{1}',
163
+ current: ', current: {0}',
164
+ excel_exported: 'Excel exported: {0}',
165
+ },
166
+
167
+ // ── lib/env.js ─────────────────────────────────────
168
+ env: {
169
+ title: ' yidaconnector env - Phát hiện môi trường công cụ AI',
170
+ detecting: ' Đang phát hiện môi trường công cụ AI...',
171
+ tool_label: ' Công cụ AI: {0}',
172
+ login_label: ' Trạng thái: {0}',
173
+ logged_in: 'Đã đăng nhập',
174
+ not_logged_in: 'Chưa đăng nhập',
175
+ corp_label: ' Tổ chức: {0}',
176
+ version_label: ' Phiên bản: {0}',
177
+ },
178
+
179
+ // ── lib/login.js ────────────────────────────────────
180
+ login: {
181
+ title: '🔐 Đăng nhập Yida',
182
+ cache_found: ' Tìm thấy thông tin đăng nhập đã lưu, đang xác thực...',
183
+ cache_valid: '✅ Thông tin đăng nhập đã lưu hợp lệ!',
184
+ cache_invalid: ' Thông tin đăng nhập đã lưu đã hết hạn. Cần đăng nhập lại.',
185
+ starting_qr: ' Đang khởi động đăng nhập bằng mã QR...',
186
+ success: '✅ Đăng nhập thành công!',
187
+ failed: '❌ Đăng nhập thất bại: {0}',
188
+ usage: 'Cách dùng: yidaconnector login',
189
+ },
190
+
191
+ // ── lib/logout.js ───────────────────────────────────
192
+ logout: {
193
+ title: '🚪 Đăng xuất Yida',
194
+ success: '✅ Đăng xuất thành công! Thông tin đăng nhập đã được xóa.',
195
+ no_cache: ' Không tìm thấy thông tin đăng nhập. Đã đăng xuất.',
196
+ failed: '❌ Đăng xuất thất bại: {0}',
197
+ },
198
+
199
+ // ── lib/create-app.js ───────────────────────────────
200
+ create_app: {
201
+ usage: 'Cách dùng: yidaconnector create-app "<tên ứng dụng>" hoặc yidaconnector create-app --name "<tên ứng dụng>" [--desc "..."] [--theme deepBlue]',
202
+ example: 'Ví dụ: yidaconnector create-app --name "Ứng dụng của tôi" --desc "Mô tả ứng dụng" --theme deepBlue',
203
+ title: ' create-app - Công cụ tạo ứng dụng Yida',
204
+ app_name: '\n Tên ứng dụng: {0}',
205
+ app_desc: ' Mô tả: {0}',
206
+ app_icon: ' Biểu tượng: {0} ({1})',
207
+ app_theme: ' Chủ đề: colour={0} navTheme={1} layout={2}',
208
+ step_create: '\n🚀 Đang tạo ứng dụng...',
209
+ sending_request: ' Đang gửi yêu cầu createApp...',
210
+ success: ' ✅ Tạo ứng dụng thành công!',
211
+ app_id: ' ID ứng dụng: {0}',
212
+ failed: ' ❌ Tạo thất bại: {0}',
213
+ error: '\n❌ Lỗi tạo ứng dụng: {0}',
214
+ },
215
+
216
+ // ── lib/create-form.js ──────────────────────────────
217
+ create_form: {
218
+ usage: 'Cách dùng: yidaconnector create-form <appType> <tên trang> [JSON schema]',
219
+ title: ' create-form - Công cụ tạo/cập nhật biểu mẫu Yida',
220
+ app_id: '\n ID ứng dụng: {0}',
221
+ page_name: ' Tên trang: {0}',
222
+ step_create: '\n📝 Đang tạo trang biểu mẫu...',
223
+ sending_request: ' Đang gửi yêu cầu saveFormSchema...',
224
+ success: ' ✅ Tạo trang biểu mẫu thành công!',
225
+ form_uuid: ' UUID biểu mẫu: {0}',
226
+ failed: ' ❌ Tạo thất bại: {0}',
227
+ error: '\n❌ Lỗi tạo biểu mẫu: {0}',
228
+ step_check_data: '\n🔍 Bước {0}: Kiểm tra biểu mẫu có dữ liệu hiện có không',
229
+ data_exists_warning: ' ⚠️ Biểu mẫu này đã có {0} bản ghi! Thay đổi cấu trúc có thể gây ra:',
230
+ data_exists_impact: ' - Mất hoặc hỏng dữ liệu lịch sử\n - Bất thường trạng thái quy trình\n - Không nhất quán dữ liệu',
231
+ data_exists_abort: ' ❌ Đã hủy sửa đổi. Thêm --force để tiếp tục.',
232
+ data_exists_confirm_message: 'Biểu mẫu này có {0} bản ghi hiện có. Thay đổi cấu trúc có thể ảnh hưởng đến dữ liệu hiện có. Thêm --force để xác nhận.',
233
+ data_exists_force_hint: 'Cách dùng: yidaconnector create-form update <appType> <formUuid> <changesJson> --force',
234
+ data_exists_force_proceed: ' ⚠️ Chế độ --force: bỏ qua xác nhận, buộc thay đổi cấu trúc biểu mẫu với {0} bản ghi hiện có',
235
+ data_check_empty: ' ✅ Biểu mẫu không có dữ liệu, có thể sửa đổi an toàn',
236
+ data_check_failed: ' ⚠️ Kiểm tra dữ liệu thất bại, tiếp tục sửa đổi',
237
+ },
238
+
239
+ // ── lib/create-page.js ──────────────────────────────
240
+ create_page: {
241
+ usage: 'Cách dùng: yidaconnector create-page <appType> <tên trang> [--mode dashboard]',
242
+ example: 'Ví dụ: yidaconnector create-page APP_XXX "Dashboard" --mode dashboard',
243
+ title: ' create-page - Công cụ tạo trang tùy chỉnh Yida',
244
+ app_id: '\n ID ứng dụng: {0}',
245
+ page_name: ' Tên trang: {0}',
246
+ step_create: '\n📄 Đang tạo trang tùy chỉnh...',
247
+ success: ' ✅ Tạo trang tùy chỉnh thành công!',
248
+ step_dashboard_config: '\n🖥️ Step 3: Configure dashboard fullscreen mode',
249
+ dashboard_config_ok: ' ✅ Dashboard mode configured: top nav hidden, chromeless custom URL enabled',
250
+ dashboard_config_failed: ' ⚠️ Dashboard mode config failed: {0}',
251
+ err_mode_invalid: 'Unsupported page mode: {0}',
252
+ mode_hint: 'Available modes: default, dashboard',
253
+ form_uuid: ' UUID trang: {0}',
254
+ failed: ' ❌ Tạo thất bại: {0}',
255
+ error: '\n❌ Lỗi tạo trang: {0}',
256
+ },
257
+
258
+ // ── lib/get-schema.js ───────────────────────────────
259
+ get_schema: {
260
+ usage: 'Cách dùng: yidaconnector get-schema <appType> <formUuid>',
261
+ title: ' get-schema - Công cụ lấy schema biểu mẫu Yida',
262
+ app_id: '\n ID ứng dụng: {0}',
263
+ form_uuid: ' UUID biểu mẫu: {0}',
264
+ step_get: '\n📋 Đang lấy schema biểu mẫu...',
265
+ success: ' ✅ Lấy schema thành công!',
266
+ failed: ' ❌ Lấy thất bại: {0}',
267
+ error: '\n❌ Lỗi lấy schema: {0}',
268
+ },
269
+
270
+ // ── lib/check-update.js ─────────────────────────────
271
+ check_update: {
272
+ new_version: '\n🎉 Phiên bản mới có sẵn: {0} → {1}',
273
+ update_cmd: ' Cập nhật: npm install -g yidaconnector',
274
+ check_failed: 'Kiểm tra phiên bản thất bại: {0}',
275
+ },
276
+
277
+ // ── lib/update.js ──────────────────────────────────
278
+ update: {
279
+ checking: 'Đang kiểm tra phiên bản mới nhất...',
280
+ fetch_failed: 'Không thể lấy thông tin phiên bản mới nhất. Vui lòng kiểm tra kết nối mạng',
281
+ already_latest: 'Đã là phiên bản mới nhất ({0}), không cần cập nhật',
282
+ found_new_version: 'Phát hiện phiên bản mới: {0} (hiện tại: {1})',
283
+ installing: 'Đang cài đặt yidaconnector@latest...',
284
+ success: 'Cập nhật thành công! Phiên bản hiện tại: {0}',
285
+ install_failed: 'Cập nhật thất bại: {0}',
286
+ manual_hint: 'Vui lòng thử thủ công: npm install -g yidaconnector@latest',
287
+ available: 'có bản cập nhật',
288
+ up_to_date: 'đã cập nhật',
289
+ label_install: 'Install',
290
+ label_channel: 'Channel',
291
+ label_version: 'Version',
292
+ label_update: 'Update',
293
+ done: 'Cập nhật hoàn tất!',
294
+ done_hint: 'Chạy yidaconnector --version để xác nhận phiên bản mới',
295
+ },
296
+
297
+ // ── lib/export-app.js ───────────────────────────────
298
+ export_app: {
299
+ usage: 'Cách dùng: yidaconnector export-app <appType>',
300
+ title: ' export-app - Công cụ xuất ứng dụng Yida',
301
+ app_id: '\n ID ứng dụng: {0}',
302
+ step_export: '\n📦 Đang xuất ứng dụng...',
303
+ success: ' ✅ Xuất ứng dụng thành công!',
304
+ failed: ' ❌ Xuất thất bại: {0}',
305
+ error: '\n❌ Lỗi xuất ứng dụng: {0}',
306
+ },
307
+
308
+ // ── lib/import-app.js ───────────────────────────────
309
+ import_app: {
310
+ usage: 'Cách dùng: yidaconnector import-app <đường dẫn tệp>',
311
+ title: ' import-app - Công cụ nhập ứng dụng Yida',
312
+ file_path: '\n Đường dẫn tệp: {0}',
313
+ step_import: '\n📥 Đang nhập ứng dụng...',
314
+ success: ' ✅ Nhập ứng dụng thành công!',
315
+ failed: ' ❌ Nhập thất bại: {0}',
316
+ error: '\n❌ Lỗi nhập ứng dụng: {0}',
317
+ },
318
+
319
+ // ── lib/get-page-config.js ──────────────────────────
320
+ get_page_config: {
321
+ usage: 'Cách dùng: yidaconnector get-page-config <appType> <formUuid>',
322
+ title: ' get-page-config - Công cụ lấy cấu hình trang Yida',
323
+ app_id: '\n ID ứng dụng: {0}',
324
+ form_uuid: ' UUID biểu mẫu: {0}',
325
+ step_get: '\n🔍 Đang lấy cấu hình trang...',
326
+ success: ' ✅ Lấy cấu hình thành công!',
327
+ failed: ' ❌ Lấy thất bại: {0}',
328
+ error: '\n❌ Lỗi lấy cấu hình: {0}',
329
+ },
330
+
331
+ // ── lib/save-share-config.js ────────────────────────
332
+ save_share_config: {
333
+ usage: 'Cách dùng: yidaconnector save-share-config <appType> <formUuid> <openUrl> <isOpen> [openAuth]',
334
+ title: ' save-share-config - Công cụ lưu cấu hình truy cập công khai Yida',
335
+ app_id: '\n ID ứng dụng: {0}',
336
+ form_uuid: ' UUID biểu mẫu: {0}',
337
+ open_url: ' URL công khai: {0}',
338
+ is_open: ' Truy cập công khai: {0}',
339
+ open_auth: ' Yêu cầu xác thực: {0}',
340
+ step_validate: '\n📋 Step 0: Xác thực tham số',
341
+ validate_ok: ' ✅ Xác thực thành công',
342
+ validate_failed: ' ❌ Xác thực thất bại: {0}',
343
+ step_save: '\n💾 Step 2: Lưu cấu hình truy cập công khai',
344
+ sending_request: ' Đang gửi yêu cầu saveShareConfig...',
345
+ save_ok: ' ✅ Lưu cấu hình thành công!',
346
+ save_ok_msg: 'Đã lưu cấu hình truy cập công khai',
347
+ save_failed: ' ❌ Lưu thất bại: {0}',
348
+ save_failed_msg: 'Lưu thất bại',
349
+ err_is_open_invalid: 'isOpen phải là y hoặc n. Giá trị hiện tại: {0}',
350
+ err_open_auth_invalid: 'openAuth phải là y hoặc n. Giá trị hiện tại: {0}',
351
+ err_open_url_required: 'openUrl là bắt buộc khi bật truy cập công khai',
352
+ err_open_url_prefix: 'openUrl phải bắt đầu bằng /o/. Giá trị hiện tại: {0}',
353
+ err_open_url_chars: 'Đường dẫn openUrl chỉ hỗ trợ a-z A-Z 0-9 _ - và / làm dấu phân tách đoạn. Giá trị hiện tại: {0}',
354
+ err_open_url_empty: 'Đường dẫn openUrl không được để trống: {0}',
355
+ },
356
+
357
+ // ── lib/update-form-config.js ──────────────────────
358
+ update_form_config: {
359
+ usage: 'Cách dùng: yidaconnector update-form-config <appType> <formUuid> <isRenderNav> <title>',
360
+ title: ' update-form-config - Công cụ cập nhật cấu hình biểu mẫu Yida',
361
+ app_id: '\n ID ứng dụng: {0}',
362
+ form_uuid: ' UUID biểu mẫu: {0}',
363
+ is_render_nav: ' Hiển thị nav: {0}',
364
+ page_title: ' Tiêu đề trang: {0}',
365
+ step_update: '\n💾 Step 2: Cập nhật cấu hình biểu mẫu',
366
+ sending_request: ' Đang gửi yêu cầu updateFormSchemaInfo...',
367
+ update_ok: ' ✅ Cập nhật cấu hình thành công!',
368
+ nav_shown: 'Đã hiển thị thanh điều hướng trên cùng',
369
+ nav_hidden: 'Đã ẩn thanh điều hướng trên cùng',
370
+ update_failed: ' ❌ Cập nhật thất bại: {0}',
371
+ update_failed_msg: 'Cập nhật thất bại',
372
+ },
373
+
374
+ // ── lib/verify-short-url.js ────────────────────────
375
+ verify_short_url: {
376
+ usage: 'Cách dùng: yidaconnector verify-short-url <appType> <formUuid> <url>',
377
+ title: ' verify-short-url - Công cụ xác minh URL Yida',
378
+ app_id: '\n ID ứng dụng: {0}',
379
+ form_uuid: ' UUID biểu mẫu: {0}',
380
+ step_validate: '\n📋 Step 0: Xác thực định dạng URL',
381
+ validate_ok: ' ✅ Định dạng hợp lệ',
382
+ validate_failed: ' ❌ Xác thực thất bại: {0}',
383
+ step_verify: '\n🔍 Step 2: Xác minh URL',
384
+ sending_request: ' Đang gửi yêu cầu verifyShortUrl...',
385
+ url_available: ' ✅ URL có thể sử dụng!',
386
+ open_available_msg: 'URL truy cập công khai này có thể sử dụng',
387
+ share_available_msg: 'URL chia sẻ nội bộ này có thể sử dụng',
388
+ url_taken: ' ❌ URL đã được sử dụng',
389
+ url_taken_msg: 'URL rút gọn này đã được sử dụng',
390
+ verify_failed: ' ❌ Yêu cầu xác minh thất bại',
391
+ err_url_prefix: 'URL phải bắt đầu bằng /o/ hoặc /s/. Giá trị hiện tại: {0}',
392
+ err_url_chars: 'Đường dẫn URL chỉ hỗ trợ a-z A-Z 0-9 _ - và / làm dấu phân tách đoạn. Giá trị hiện tại: {0}',
393
+ err_url_empty: 'Đường dẫn URL không được để trống: {0}',
394
+ },
395
+
396
+ // ── lib/copy.js ────────────────────────────────────
397
+ copy: {
398
+ title: ' yidaconnector copy - Khởi tạo thư mục làm việc Yida',
399
+ package_root: '\n📦 Thư mục gốc gói: {0}',
400
+ dest_root: '🤖 Thư mục đích: {0}',
401
+ dest_empty_flatten: '📂 Thư mục đích trống, nội dung project/ sẽ được sao chép trực tiếp (không tạo thư mục con project/)',
402
+ force_mode: '⚠️ Chế độ --force: thư mục đích sẽ được xóa trước khi sao chép',
403
+ no_package: '\n❌ Không tìm thấy thư mục gói yidaconnector',
404
+ no_package_hint1: ' Hãy đảm bảo yidaconnector đã được cài đặt toàn cục:',
405
+ no_package_hint2: ' npm install -g yidaconnector',
406
+ no_active_tool: '\n❌ Không phát hiện môi trường công cụ AI nào đang hoạt động',
407
+ supported_tools: ' Công cụ hỗ trợ: Wukong, Codex, OpenCode, Claude Code, Aone Copilot, Cursor, Qoder',
408
+ current_result: '\n Kết quả phát hiện hiện tại:',
409
+ force_hint: '\n Để buộc sao chép vào thư mục hiện tại:\n yidaconnector copy --force',
410
+ force_cmd: ' yidaconnector copy --force',
411
+ copying_label: '\n📂 Đang sao chép {0}...',
412
+ creating_symlink: '\n📂 Đang tạo liên kết tượng trưng yida-skills/...',
413
+ file_copied: ' Đã sao chép: {0}',
414
+ cleared: ' 🗑️ Đã xóa: {0}',
415
+ symlink_removed: ' 🗑️ Đã xóa liên kết tượng trưng cũ: {0}',
416
+ dir_deleted: ' 🗑️ Đã xóa thư mục: {0}',
417
+ removed: ' 🗑️ Đã xóa: {0}',
418
+ symlink_created: ' 🔗 Liên kết tượng trưng: {0} -> {1}',
419
+ symlink_label: 'liên kết tượng trưng',
420
+ done: '✅ Hoàn thành!',
421
+ files_copied: ' Tệp đã sao chép: {0}',
422
+ files_count: '{0} tệp',
423
+ symlinks_created: ' Liên kết tượng trưng đã tạo: {0}',
424
+ result_symlink: ' {0} → {1} (liên kết tượng trưng)',
425
+ result_copy: ' {0} → {1} ({2} tệp)',
426
+ wukong_skills_cleanup: '\n🗑️ Môi trường Wukong: Đang dọn dẹp liên kết tượng trưng yida-skills/...',
427
+ wukong_skills_cleaned: 'đã dọn dẹp',
428
+ wukong_skills_not_found: ' ℹ️ Không tìm thấy liên kết tượng trưng hoặc thư mục yida-skills/: {0}',
429
+ remove_failed: ' ❌ Xóa thất bại: {0} ({1})',
430
+ symlink_fallback_copy: ' ⚠️ Tạo liên kết tượng trưng Windows thất bại (cần quyền admin), sử dụng sao chép thư mục: {0}',
431
+ symlink_failed: ' ❌ Tạo liên kết tượng trưng thất bại: {0} ({1})',
432
+ },
433
+
434
+ // ── lib/publish.js ─────────────────────────────────
435
+ generate_page: {
436
+ spec_not_found: 'Spec file not found: {0}',
437
+ spec_invalid: 'Failed to parse spec JSON: {0}',
438
+ unknown_template: 'Unknown page template: {0}',
439
+ available_templates: 'Available templates: {0}',
440
+ template_not_found: 'Template file not found: {0}',
441
+ done: 'Page generated: {0}',
442
+ hint: 'Next run yidaconnector compile <file>, or pass --compile to compile immediately.',
443
+ success: 'Page generation complete',
444
+ },
445
+ page_size: {
446
+ large_source: 'Phát hiện mã nguồn trang lớn: {0} ({1}, khoảng {2} dòng)',
447
+ long_line_hint: 'Phát hiện một dòng rất dài (khoảng {0} ký tự), thường là vendor đã minify hoặc base64; hãy tách ra ngoài.',
448
+ base64_hint: 'Phát hiện nội dung base64 inline dài; hãy tải lên CDN/OSS và tham chiếu bằng URL.',
449
+ memory_hint: 'publish/compile giữ source, build output, minified output và bản sao schema trong bộ nhớ; tách vendor/base64 hoặc tải bằng this.utils.loadScript.',
450
+ windows_hint: 'Trên Windows, không ghi JSX lớn bằng PowerShell Get-Content -Raw + ConvertTo-Json; hãy dùng Node fs.writeFileSync/appendFileSync theo từng phần.',
451
+ },
452
+ publish: {
453
+ title: ' yida-publish - Công cụ xuất bản trang Yida',
454
+ platform: ' Nền tảng: {0}',
455
+ app_id: ' ID ứng dụng: {0}',
456
+ form_uuid: ' ID biểu mẫu: {0}',
457
+ source_file: ' Nguồn: {0}',
458
+ compiled_file: ' Đầu ra: {0}',
459
+ step_lint: '\n🔍 Step 0: Kiểm tra trước tiêu chuẩn mã hóa Yida\n',
460
+ lint_title: '⚠️ Yida page code check:',
461
+ lint_error_line: ' ❌ Dòng {0}: {1}',
462
+ lint_warning_line: ' ⚠️ Dòng {0}: {1}',
463
+ lint_event_function: 'Liên kết sự kiện sử dụng function, nên dùng hàm mũi tên (e) => { this.xxx() }',
464
+ lint_missing_render_jsx: 'Missing export function renderJsx(); Yida custom pages must export renderJsx',
465
+ lint_import_require: 'Found import/require. Yida custom pages cannot import modules; load third-party scripts with this.utils.loadScript',
466
+ lint_react_hooks: 'Found React Hooks. Yida runtime uses React 16 class-component style and does not support useState/useEffect hooks',
467
+ lint_export_default: 'Found export default. Yida needs named exports such as export function renderJsx/didMount',
468
+ lint_jsx_extension: 'This .js file contains JSX; prefer .jsx for source files. The compiled output is still .js',
469
+ lint_event_direct_method: 'Event binding passes this.xxx directly and will lose this; use (e) => { this.xxx(e); }',
470
+ lint_event_bind_this: 'Event binding uses .bind(this); use (e) => { this.xxx(e); } instead',
471
+ lint_lifecycle_case: 'Detected lifecycle export {0}; Yida only recognizes {1} (case-sensitive)',
472
+ lint_react_lifecycle_method: 'Detected React lifecycle {0}; export {1} for Yida custom pages',
473
+ lint_event_lowercase: 'Detected lowercase event prop {0}; React/Yida will not bind it. Use {1}',
474
+ lint_event_call_result: 'Event binding invokes a function or is not an expression handler; use (e) => { self.xxx(e); }',
475
+ lint_event_noop_arrow: 'Event arrow function references a handler without calling it; use (e) => { self.xxx(e); }',
476
+ lint_button_missing_handler: 'Visible <button> has no onClick/onMouseDown/onKeyDown or disabled state; bind an event handler or use span/div for static labels',
477
+ lint_array_callback_function: '.{0}(function ...) may lose this in callbacks; use .{0}((item) => ...) instead',
478
+ lint_foreach_callback_function: '.forEach(function ...) may lose this in callbacks; prefer .forEach((item) => ...)',
479
+ lint_controlled_input: 'input uses controlled value mode. Yida pages should use defaultValue + onChange to update _customState',
480
+ lint_native_select_ui: 'Found a native select. User-facing custom page dropdowns should use a Tailwind-styled custom dropdown component for consistent visual quality',
481
+ lint_iframe_self_navigation: 'Yida custom pages run in an iframe. Use target="_top"/target="_blank" or window.top.location for Yida page navigation to avoid nested pages.',
482
+ lint_page_size_limit: 'pageSize={0} exceeds the Yida API limit of 100; use 100 or less',
483
+ lint_yida_api_catch: 'this.utils.yida API call has no detected .catch(); add error handling and toast the user',
484
+ lint_echarts_legacy_map_china: 'ECharts 5 no longer supports echarts/map/js/china.js. Load DataV GeoJSON and call echarts.registerMap("china", geoJson) instead',
485
+ lint_echarts_rich_label_formatter: 'ECharts label.formatter returning rich text templates is unstable in Yida custom pages; prefer plain formatter strings or precomputed label text',
486
+ lint_const_let: 'Sử dụng khai báo const/let, khuyến nghị đổi thành var (tương thích môi trường Yida)',
487
+ lint_computed_property: 'Sử dụng tên thuộc tính tính toán ES6 { [key]: value }, không được hỗ trợ bởi engine JS Yida, gây lỗi im lặng. Hãy dùng var obj = {}; obj[key] = value;',
488
+ lint_pad_method: 'Sử dụng String.{0}(), không được hỗ trợ bởi engine JS Yida, gây gián đoạn im lặng callback Promise. Hãy dùng toán tử ba ngôi: x < 10 ? "0" + x : "" + x',
489
+ lint_large_then_callback: 'Callback Promise .then() quá lớn ({0} dòng, khuyến nghị tối đa {1} dòng), có thể gây cắt ngắn im lặng. Hãy tách logic vào hàm export riêng biệt',
490
+ lint_fix_errors: '❌ Vui lòng sửa các lỗi trên trước khi xuất bản',
491
+ lint_skip_hint: '💡 Thêm --skip-lint để bỏ qua kiểm tra',
492
+ lint_passed: ' ✅ Kiểm tra mã thành công\n',
493
+ lint_skipped: '\n⏭️ Đã bỏ qua kiểm tra mã trước (--skip-lint)\n',
494
+ duplicate_source_mismatch: ' ⚠️ Found another copy with the same file name but different content. Publishing: {0}; other copy: {1}',
495
+ data_source_fetching: ' Reading existing page data sources...',
496
+ data_source_preserved: ' ✅ Preserved existing page data sources: {0}',
497
+ data_source_none: ' No custom page data sources to preserve',
498
+ data_source_fetch_failed: 'Could not read the existing page Schema, so publishing stopped to avoid clearing existing data sources: {0}',
499
+ target_checking: ' Checking publish target type...',
500
+ target_check_forced: ' ⚠️ Skipped publish target type check (--force)',
501
+ target_check_ok: ' ✅ Publish target confirmed: {0} ({1})',
502
+ target_check_failed: 'Could not verify publish target: {0}',
503
+ target_not_found: 'Publish target was not found in app navigation: {0}',
504
+ target_type_invalid: 'Publish target is not a custom display page: {0} current type is {1}',
505
+ target_type_hint: 'The current target "{0}" does not look like a custom page (type: {1}). Do not publish JSX to data forms or process forms.',
506
+ target_list_hint: 'Run yidaconnector list-forms {0} --keyword <page name>, then choose a custom page formUuid with formType=display.',
507
+ target_force_hint: 'Append --force only when you intentionally bypass this guard; it overwrites the target Schema and should be used only for a known custom page.',
508
+ step_compile: '\n📦 Step 1: Biên dịch nguồn và xây dựng schema\n',
509
+ reading_source: '[1/4] Đang đọc nguồn {0}...',
510
+ compiling: '[2/4] Đang biên dịch {0} với Babel...',
511
+ compile_failed: ' ❌ Biên dịch thất bại: {0}',
512
+ compile_location: '\n Vị trí: dòng {0}, cột {1}',
513
+ compile_error_code: ' Mã lỗi: {0}',
514
+ minifying: '[3/4] Đang nén với UglifyJS → {0}...',
515
+ minify_failed: ' Nén thất bại: {0}',
516
+ compile_done: ' ✅ Biên dịch hoàn thành: {0}',
517
+ building_schema: '[4/4] Đang xây dựng schema...',
518
+ schema_built: ' ✅ Xây dựng schema thành công!',
519
+ step_login: '\n🔑 Step 2: Đọc thông tin đăng nhập',
520
+ step_publish: '\n📤 Step 3: Xuất bản schema\n',
521
+ publish_failed: '\n❌ Xuất bản thất bại: {0}',
522
+ schema_published: ' ✅ Xuất bản schema thành công!',
523
+ step_config: '\n⚙️ Step 4: Cập nhật cấu hình biểu mẫu\n',
524
+ success: ' ✅ Xuất bản thành công!',
525
+ config_failed: ' ⚠️ Cập nhật cấu hình thất bại: {0}',
526
+ schema_ok_config_failed: 'Schema published, but config update failed',
527
+ step_health_check: '\n🩺 Step 5: Health check published page\n',
528
+ health_check_ok: ' ✅ Health check passed: HTTP {0}',
529
+ health_check_failed: ' ⚠️ Health check failed: HTTP {0} {1}',
530
+ exception: '\n❌ Lỗi xuất bản: {0}',
531
+ source_not_found: '❌ Không tìm thấy tệp nguồn: {0}',
532
+ usage: 'Cách dùng: yidaconnector publish <tệpNguồn> <appType> <formUuid> [--health-check]',
533
+ example: 'Ví dụ: yidaconnector publish pages/src/xxx.js APP_XXX FORM-XXX --health-check',
534
+ },
535
+
536
+ // ── lib/qr-login.js ────────────────────────────────
537
+ qr_login: {
538
+ title: '🔐 Đăng nhập Yida bằng mã QR trên terminal',
539
+ step_init: ' Step 1: Đang khởi tạo phiên...',
540
+ step_get_qr: ' Step 2: Đang lấy mã QR...',
541
+ scan_hint: ' 📱 Vui lòng quét mã QR bên dưới bằng DingTalk:',
542
+ qr_url_label: ' URL mã QR: {0}',
543
+ waiting_scan: ' ⏳ Đang chờ quét (tối đa 2 phút)...',
544
+ scanned_confirm: ' ✅ Đã quét mã QR! Vui lòng xác nhận đăng nhập trên điện thoại...',
545
+ scan_success: ' ✅ Đã xác nhận quét!',
546
+ step_exchange: ' Step 4: Đang trao đổi thông tin đăng nhập...',
547
+ step_get_corps: ' Step 5: Đang lấy danh sách tổ chức...',
548
+ step_switch_corp: ' Step 7: Đang chuyển sang tổ chức đã chọn...',
549
+ only_one_corp: ' ✅ Phát hiện một tổ chức: {0}, tự động chọn',
550
+ select_corp_prompt: ' 🏢 Tìm thấy nhiều tổ chức, vui lòng chọn một:',
551
+ select_corp_input: ' Nhập số (1-{0}): ',
552
+ select_corp_invalid: ' ❌ Đầu vào không hợp lệ, vui lòng nhập số từ 1 đến {0}',
553
+ target_corp_not_found: 'Không tìm thấy corpId đã chỉ định trong các tổ chức có thể truy cập: {0}',
554
+ corp_selected: ' ✅ Đã chọn tổ chức: {0}',
555
+ login_success: '✅ Đăng nhập thành công!',
556
+ qrcode_fallback: ' ⚠️ Gói qrcode chưa được cài đặt, vui lòng truy cập URL bên dưới thủ công:',
557
+ qrcode_render_failed: ' ⚠️ Hiển thị mã QR thất bại ({0}), vui lòng truy cập URL bên dưới:',
558
+ qr_expired: 'Mã QR đã hết hạn, vui lòng đăng nhập lại',
559
+ poll_timeout: 'Hết thời gian chờ quét (2 phút), vui lòng đăng nhập lại',
560
+ no_corp_available: 'Không tìm thấy tổ chức nào có thể truy cập',
561
+ no_csrf_in_cookie: 'Đăng nhập thành công nhưng không tìm thấy csrf_token, vui lòng thử lại',
562
+ stdin_closed: 'Luồng đầu vào đã đóng, không thể chọn tổ chức',
563
+ },
564
+
565
+ // ── scripts/postinstall.js ─────────────────────────
566
+ postinstall: {
567
+ welcome_title: ' 🎉 Chào mừng đến với YidaConnector! ',
568
+ install_success: ' ✅ Cài đặt hoàn tất! {0} Công cụ phát triển AI Yida đã sẵn sàng.',
569
+ update_success: ' ✅ Cập nhật hoàn tất! {0} YidaConnector đã được nâng cấp lên phiên bản mới nhất.',
570
+ ai_mode_title: ' 🚀 Chế độ hội thoại AI',
571
+ ai_mode_desc: ' Trong Codex / Claude Code / Aone Copilot / Cursor, hãy trò chuyện trực tiếp:',
572
+ prompt1: ' 📋 "Tạo cho tôi hệ thống quản lý chấm công với Yida"',
573
+ prompt2: ' 💰 "Xây dựng ứng dụng tính lương cá nhân"',
574
+ prompt3: ' 🏢 "Tạo hệ thống CRM quản lý khách hàng"',
575
+ prompt4: ' 🎂 "Làm mini-app chúc mừng sinh nhật"',
576
+ steps_title: ' 📖 Bắt đầu',
577
+ step1: ' {0}Step 1{1} Mở công cụ AI của bạn (Codex / Claude Code / Cursor, v.v.)',
578
+ step2: ' {0}Step 2{1} Mô tả ứng dụng bạn muốn bằng ngôn ngữ tự nhiên',
579
+ step3: ' {0}Step 3{1} AI tự động chạy các lệnh yidaconnector để tạo và xuất bản',
580
+ step4: ' {0}Step 4{1} Nhận liên kết ứng dụng Yida của bạn 🎉',
581
+ commands_title: ' ⚡ Lệnh nhanh',
582
+ cmd_env: ' {0}yidaconnector env{1} {2}# Phát hiện môi trường công cụ AI và trạng thái đăng nhập{3}',
583
+ cmd_login: ' {0}yidaconnector login{1} {2}# Đăng nhập Yida{3}',
584
+ cmd_help: ' {0}yidaconnector --help{1} {2}# Xem tất cả lệnh{3}',
585
+ footer1: ' 📚 Tài liệu: https://github.com/bunnyrui/yidaconnector',
586
+ footer2: ' 💬 Cộng đồng: Tham gia cộng đồng YidaConnector trên DingTalk',
587
+ },
588
+
589
+ // ── lib/cdn-*.js ───────────────────────────────────
590
+ cdn: {
591
+ config_load_error: 'Tải cấu hình CDN thất bại: {0}',
592
+ config_saved: '✅ Cấu hình CDN đã được lưu vào: {0}',
593
+ config_usage: 'Cách dùng: yidaconnector cdn-config [tùy chọn]',
594
+ config_file_path: '📄 Tệp cấu hình: {0}',
595
+ config_section_aliyun: '🔐 Thông tin xác thực Alibaba Cloud',
596
+ config_section_cdn: '🌐 Cấu hình CDN',
597
+ config_section_oss: '📦 Cấu hình OSS',
598
+ config_section_upload: '📤 Cấu hình tải lên',
599
+ config_cdn_domain: 'Tên miền CDN',
600
+ config_oss_region: 'Khu vực OSS',
601
+ config_oss_bucket: 'Bucket OSS',
602
+ config_oss_endpoint: 'Endpoint OSS',
603
+ config_upload_path: 'Đường dẫn tải lên',
604
+ config_compress: 'Nén ảnh',
605
+ config_max_width: 'Chiều rộng tối đa',
606
+ config_quality: 'Chất lượng ảnh',
607
+ config_not_set: 'Chưa cài đặt',
608
+ config_enabled: 'Đã bật',
609
+ config_disabled: 'Đã tắt',
610
+ config_status_valid: '✅ Cấu hình đầy đủ, sẵn sàng sử dụng',
611
+ config_status_invalid: '⚠️ Cấu hình chưa đầy đủ',
612
+ config_missing: ' Trường còn thiếu: {0}',
613
+ config_updated: '✅ Cấu hình đã được cập nhật!',
614
+ config_init_title: '🔧 Trình hướng dẫn khởi tạo CDN',
615
+ config_init_desc: 'Để sử dụng tải ảnh CDN, hãy cấu hình các mục sau:',
616
+ upload_no_files: '❌ Vui lòng chỉ định tệp ảnh để tải lên',
617
+ config_incomplete: '❌ Cấu hình CDN chưa đầy đủ',
618
+ missing_fields: ' Trường còn thiếu: {0}',
619
+ run_config_init: ' Vui lòng chạy trước: yidaconnector cdn-config --init',
620
+ no_config: '❌ Không tìm thấy cấu hình CDN',
621
+ oss_sdk_required: '❌ Thiếu SDK ali-oss',
622
+ run_npm_install: ' Chạy: npm install {0}',
623
+ no_images_found: '❌ Không tìm thấy tệp ảnh được hỗ trợ',
624
+ uploading_images: '📤 Đang tải lên {0} ảnh...',
625
+ uploading_file: ' Đang tải: {0}',
626
+ upload_success: ' ✅ {0}',
627
+ upload_failed: ' ❌ {0} tải lên thất bại: {1}',
628
+ upload_summary: '\n📊 Tóm tắt tải lên',
629
+ upload_success_count: ' Thành công: {0}',
630
+ upload_fail_count: ' Thất bại: {0}',
631
+ cdn_urls: '\n🔗 Danh sách URL CDN:',
632
+ upload_error: '❌ Tải lên thất bại: {0}',
633
+ refresh_no_targets: '❌ Vui lòng chỉ định URL hoặc thư mục để làm mới',
634
+ cdn_sdk_required: '❌ Thiếu SDK CDN Alibaba Cloud',
635
+ querying_quota: '📊 Đang truy vấn hạn mức làm mới...',
636
+ quota_info: ' Làm mới URL: {0}/ngày, còn {1} | Thư mục: {2}/ngày, còn {3}',
637
+ refreshing_urls: '🔄 Đang làm mới {0} URL...',
638
+ refreshing_paths: '🔄 Đang làm mới {0} thư mục...',
639
+ refresh_task_id: ' ✅ ID tác vụ: {0}',
640
+ refresh_urls_failed: ' ❌ Làm mới URL thất bại: {0}',
641
+ refresh_paths_failed: ' ❌ Làm mới thư mục thất bại: {0}',
642
+ refresh_summary: '\n📊 Tóm tắt làm mới',
643
+ url_refresh_success: ' ✅ Làm mới URL thành công, ID tác vụ: {0}',
644
+ path_refresh_success: ' ✅ Làm mới thư mục thành công, ID tác vụ: {0}',
645
+ refresh_error: '❌ Làm mới thất bại: {0}',
646
+ file_not_found: '❌ Không tìm thấy tệp: {0}',
647
+ },
648
+
649
+ // ── src/flash-note/flash-to-prd.ts ──────────────
650
+ flashNote: {
651
+ toPrd: {
652
+ title: '📋 Ghi chu nhanh DingTalk sang PRD',
653
+ help_usage: 'Cach dung: yidaconnector flash-to-prd --file <duong-dan> [--name <ten-du-an>]',
654
+ help_usage2: ' yidaconnector flash-to-prd --name <ten-du-an> (doc tu stdin)',
655
+ help_args_title: 'Tham so:',
656
+ help_arg_file: ' --file, -f <duong dan> Duong dan file ghi chu nhanh (.txt / .md)',
657
+ help_arg_name: ' --name, -n <ten> Ten du an (tuy chon, tu dong trich xuat)',
658
+ help_arg_max_tokens: ' --max-tokens <so> Token dau ra AI toi da (mac dinh 8000)',
659
+ help_examples_title: 'Vi du:',
660
+ help_example1: ' yidaconnector flash-to-prd --file ./meeting-notes.txt --name "Kiem tra thiet bi"',
661
+ help_example2: ' cat meeting.txt | yidaconnector flash-to-prd --name "Kiem tra thiet bi"',
662
+ step_read: '[Buoc 1] Dang doc noi dung ghi chu nhanh...',
663
+ file_not_found: 'Khong tim thay file: {0}',
664
+ no_input: 'Khong co noi dung ghi chu nhanh. Dung --file de chi dinh file hoac chuyen huong noi dung qua stdin.',
665
+ stdin_empty: 'Dau vao tieu chuan trong',
666
+ read_success: '✅ Doc thanh cong, {0} ky tu',
667
+ step_load_module: '[Buoc 2] Dang tai module xay dung prompt...',
668
+ module_loaded_builtin: '✅ Da tai module prompt tich hop',
669
+ module_loaded_local: '✅ Da tai module prompt cuc bo: {0}',
670
+ module_not_found: '❌ Khong tim thay module build-flash-note-prompt.js',
671
+ module_path_tried: ' Duong dan da thu {0}: {1}',
672
+ step_preprocess: '[Buoc 3] Tien xu ly + nhan dang cuoc hop...',
673
+ preprocess_result: ' Tien xu ly: {0} ky tu -> {1} ky tu',
674
+ meeting_meta: ' Thong tin cuoc hop: {0} truong{1}',
675
+ a1_sections: ' Phan tom tat A1: {0}{1}',
676
+ speakers: ' Nguoi phat bieu: {0}{1}',
677
+ speakers_with_role: ' (co {0} chu thich vai tro)',
678
+ step_login: '[Buoc 4] Kiem tra trang thai dang nhap...',
679
+ no_login: ' Khong tim thay phien dang nhap, bat dau dang nhap...',
680
+ login_ready: '✅ Dang nhap san sang ({0})',
681
+ step_ai: '[Buoc 5] Goi AI de tao PRD...',
682
+ single_segment: ' Che do doan don, do dai prompt: {0} ky tu',
683
+ multi_segment: ' Che do da doan, tong cong {0} doan',
684
+ extracting_segment: ' Dang trich xuat doan {0}/{1} ({2} ky tu)...',
685
+ merging_segments: ' Dang hop nhat ket qua cac doan...',
686
+ ai_success: '✅ Tao PRD thanh cong',
687
+ ai_error: 'Goi API AI that bai: {0}',
688
+ done: '✅ Chuyen doi ghi chu nhanh sang PRD hoan tat',
689
+ done_project: ' Ten du an: {0}',
690
+ done_file: ' File dau ra: {0}',
691
+ done_size: ' Kich thuoc file: {0} ky tu',
692
+ done_meeting: ' Nhan dang cuoc hop: {0} thong tin, {1} phan A1, {2} nguoi phat bieu',
693
+ },
694
+ },
695
+ update_app: {
696
+ layout_notice: 'Note: layoutDirection is consumed by the Yida app shell during creation/refresh. If the top action bar does not recover immediately after a backend switch, reopen the workbench or recreate the app with the target layout.',
697
+ },
698
+ aggregate_table: {
699
+ usage: 'Usage: yidaconnector aggregate-table <list|create-empty|inspect|preview|save|publish|status> <appType> ...',
700
+ commands_title: 'Subcommands:',
701
+ cmd_list: 'list <appType> [--keyword <text>] [--json] List aggregate tables in an app',
702
+ cmd_create_empty: 'create-empty <appType> "<name>" [--open|--no-open] Create a blank aggregate table and return the designer URL',
703
+ cmd_inspect: 'inspect <appType> <formUuid> [--json] Read aggregate table design config',
704
+ cmd_preview: 'preview <appType> <formUuid> <design.json> [--json] Preview config without saving',
705
+ cmd_save: 'save <appType> <formUuid> <design.json> [--json] Save an aggregate table draft',
706
+ cmd_publish: 'publish <appType> <formUuid> <design.json> [--json] Publish aggregate table config',
707
+ cmd_status: 'status <appType> <formUuid> [--json] Query aggregate table build status',
708
+ examples_title: 'Examples:',
709
+ example_list: 'yidaconnector aggregate-table list APP_XXX',
710
+ example_create_empty: 'yidaconnector aggregate-table create-empty APP_XXX "Customer Contract Aggregate" --open',
711
+ example_inspect: 'yidaconnector aggregate-table inspect APP_XXX FORM_XXX --json',
712
+ example_preview: 'yidaconnector aggregate-table preview APP_XXX FORM_XXX .cache/yidaconnector/aggregate/design.json',
713
+ example_save: 'yidaconnector aggregate-table save APP_XXX FORM_XXX .cache/yidaconnector/aggregate/design.json',
714
+ example_publish: 'yidaconnector aggregate-table publish APP_XXX FORM_XXX .cache/yidaconnector/aggregate/design.json',
715
+ example_status: 'yidaconnector aggregate-table status APP_XXX FORM_XXX',
716
+ list_usage: 'Usage: yidaconnector aggregate-table list <appType> [--keyword <text>] [--json]',
717
+ create_empty_usage: 'Usage: yidaconnector aggregate-table create-empty <appType> "<name>" [--locale zh_CN|en_US|ja_JP] [--open|--no-open]',
718
+ inspect_usage: 'Usage: yidaconnector aggregate-table inspect <appType> <formUuid> [--json]',
719
+ preview_usage: 'Usage: yidaconnector aggregate-table preview <appType> <formUuid> <design.json> [--json]',
720
+ save_usage: 'Usage: yidaconnector aggregate-table save <appType> <formUuid> <design.json> [--json]',
721
+ publish_usage: 'Usage: yidaconnector aggregate-table publish <appType> <formUuid> <design.json> [--json]',
722
+ status_usage: 'Usage: yidaconnector aggregate-table status <appType> <formUuid> [--json]',
723
+ no_login: 'No login state found. Run yidaconnector login first.',
724
+ unsupported_locale: 'Unsupported locale: {0}',
725
+ unknown_subcommand: 'Unknown aggregate-table subcommand: {0}',
726
+ design_required: 'Missing aggregate table design JSON or file path',
727
+ invalid_json: 'Aggregate table design config is not valid JSON: {0}',
728
+ design_object_required: 'Aggregate table design config must be a JSON object',
729
+ check_feature: 'Check aggregate table capability',
730
+ feature_disabled: 'Aggregate table is not enabled for this app/org, or the edition quota has been reached',
731
+ create_empty: 'Create blank aggregate table',
732
+ inspect: 'Read aggregate table config',
733
+ preview: 'Preview aggregate table config',
734
+ save: 'Save aggregate table draft',
735
+ publish: 'Publish aggregate table config',
736
+ status: 'Query aggregate table build status',
737
+ publish_requires_source: 'Publishing requires at least one data source. Configure relationForms first.',
738
+ list_success: 'Aggregate table list',
739
+ create_empty_success: 'Aggregate table created',
740
+ inspect_success: 'Aggregate table config loaded',
741
+ preview_success: 'Aggregate table preview succeeded',
742
+ save_success: 'Aggregate table draft saved',
743
+ publish_success: 'Aggregate table published',
744
+ status_success: 'Aggregate table status loaded',
745
+ },
746
+ ai_form_setting: {
747
+ usage: 'Usage: yidaconnector ai-form-setting <get|fields|models|enable|disable|save> <appType> ...',
748
+ commands_title: 'Subcommands:',
749
+ cmd_get: 'get <appType> <formUuid> [--raw] [--json] Query AI approval prompt config',
750
+ cmd_fields: 'fields <appType> <formUuid> [--type TEXT|IMAGE|ATTACHMENT] List insertable fields',
751
+ cmd_models: 'models <appType> [--type TEXT|IMAGE|ATTACHMENT] List available models',
752
+ cmd_enable: 'enable <appType> <formUuid> [--json] Enable AI approval prompts',
753
+ cmd_disable: 'disable <appType> <formUuid> [--json] Disable AI approval prompts',
754
+ cmd_save: 'save <appType> <formUuid> <config.json> [--enable] Save prompts and model config',
755
+ examples_title: 'Examples:',
756
+ example_get: 'yidaconnector ai-form-setting get APP_XXX FORM_XXX --json',
757
+ example_fields: 'yidaconnector ai-form-setting fields APP_XXX FORM_XXX --type ATTACHMENT',
758
+ example_models: 'yidaconnector ai-form-setting models APP_XXX --type IMAGE',
759
+ example_enable: 'yidaconnector ai-form-setting enable APP_XXX FORM_XXX',
760
+ example_save: 'yidaconnector ai-form-setting save APP_XXX FORM_XXX .cache/yidaconnector/ai-form-setting/config.json --enable',
761
+ enable_disable_conflict: '--enable and --disable cannot be used together',
762
+ invalid_type: 'Invalid prompt type: {0}. Valid values: {1}',
763
+ invalid_status: 'Invalid AI approval prompt status: {0}',
764
+ config_required: 'Missing AI approval prompt JSON config or file path',
765
+ invalid_json: 'AI approval prompt config is not valid JSON: {0}',
766
+ invalid_variable: 'Variable #{0} must be an object',
767
+ variable_required: 'Variable #{0} must contain varName and fieldId',
768
+ prompt_required: 'Prompt {0} is missing prompt/content',
769
+ variables_array_required: 'variables must be an array',
770
+ invalid_item: 'Prompt config #{0} must be an object',
771
+ model_required: 'Prompt {0} is missing modelId',
772
+ invalid_config_part: '{0} must be a JSON object or a valid JSON string',
773
+ config_object_required: 'AI approval prompt config must be a JSON object or array',
774
+ items_array_required: 'AI approval prompt config must contain an items array',
775
+ too_many_items: 'AI approval prompts support up to {0} items',
776
+ duplicate_item_id: 'Duplicate itemId: {0}',
777
+ no_login: 'No login state found. Run yidaconnector login first.',
778
+ get_usage: 'Usage: yidaconnector ai-form-setting get <appType> <formUuid> [--raw] [--json]',
779
+ fields_usage: 'Usage: yidaconnector ai-form-setting fields <appType> <formUuid> [--type TEXT|IMAGE|ATTACHMENT] [--json]',
780
+ models_usage: 'Usage: yidaconnector ai-form-setting models <appType> [--type TEXT|IMAGE|ATTACHMENT] [--json]',
781
+ status_usage: 'Usage: yidaconnector ai-form-setting <enable|disable> <appType> <formUuid> [--json]',
782
+ save_usage: 'Usage: yidaconnector ai-form-setting save <appType> <formUuid> <config.json> [--enable|--disable] [--json]',
783
+ get_action: 'Query AI approval prompt config',
784
+ fields_action: 'Query AI approval prompt fields',
785
+ models_action: 'Query AI approval prompt models',
786
+ status_action: 'Update AI approval prompt status',
787
+ save_action: 'Save AI approval prompt config',
788
+ get_success: 'AI approval prompt config',
789
+ fields_success: 'AI approval prompt fields',
790
+ models_success: 'AI approval prompt models',
791
+ save_success: 'AI approval prompt config saved',
792
+ enabled: 'AI approval prompts enabled',
793
+ disabled: 'AI approval prompts disabled',
794
+ unknown_subcommand: 'Unknown ai-form-setting subcommand: {0}',
795
+ },
796
+ codex_login: {
797
+ title: ' yidaconnector login {0} - {1} Login Mode',
798
+ not_codex: 'Current environment is not detected as Codex / Qoder / Wukong; returning an in-app browser login handoff only.',
799
+ no_playwright: '{0} mode does not require Playwright or a separate Chromium install.',
800
+ using_browser: '{0} in-app Browser is only suitable for unauthenticated page previews; use yidaconnector login --browser for Yida login cookies.',
801
+ browser_handoff_hint: '{0} in-app Browser does not support authentication Cookie export. Use yidaconnector login --browser when CLI cookies are required.',
802
+ handoff_message: '{0} in-app Browser cannot export Yida login cookies. Run fallback_command when CLI cookies are required.',
803
+ cache_available: 'Existing CLI Cookie cache is available; no browser login needed.',
804
+ },
805
+ };