openyida 2026.7.13 → 2026.7.14-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -22
- package/bin/yida.js +72 -220
- package/lib/agent-center/api.js +2 -2
- package/lib/aggregate-table/aggregate-table.js +2 -2
- package/lib/ai/ai.js +7 -12
- package/lib/app/canvas-compile.js +2 -2
- package/lib/app/create-app.js +5 -19
- package/lib/app/create-form.js +54 -76
- package/lib/app/create-page.js +4 -19
- package/lib/app/er.js +11 -8
- package/lib/app/export-app.js +2 -2
- package/lib/app/externalize-form.js +12 -10
- package/lib/app/get-schema.js +12 -10
- package/lib/app/import-app.js +6 -22
- package/lib/app/list-forms.js +3 -19
- package/lib/app/nav-group.js +6 -19
- package/lib/app/publish.js +60 -198
- package/lib/app/update-app.js +4 -18
- package/lib/app/update-form-config.js +20 -113
- package/lib/app-permission/app-permission.js +2 -2
- package/lib/auth/oauth-loopback.js +156 -0
- package/lib/auth/org.js +169 -322
- package/lib/auth/token-auth.js +346 -0
- package/lib/auth/token-store.js +174 -0
- package/lib/basic-info/basic-info.js +11 -12
- package/lib/bridge/bridge.js +29 -27
- package/lib/connector/api.js +4 -4
- package/lib/core/agent-capabilities.js +92 -8
- package/lib/core/batch.js +8 -8
- package/lib/core/check-data.js +2 -2
- package/lib/core/command-manifest.js +3 -3
- package/lib/core/doctor.js +19 -22
- package/lib/core/env-cmd.js +1 -3
- package/lib/core/env-manager.js +8 -121
- package/lib/core/env.js +30 -72
- package/lib/core/locales/ar.js +5 -5
- package/lib/core/locales/de.js +5 -5
- package/lib/core/locales/en.js +26 -26
- package/lib/core/locales/es.js +5 -5
- package/lib/core/locales/fr.js +5 -5
- package/lib/core/locales/hi.js +5 -5
- package/lib/core/locales/ja.js +14 -14
- package/lib/core/locales/ko.js +5 -5
- package/lib/core/locales/pt.js +5 -5
- package/lib/core/locales/vi.js +5 -5
- package/lib/core/locales/zh-HK.js +15 -15
- package/lib/core/locales/zh.js +26 -26
- package/lib/core/query-data.js +2 -2
- package/lib/core/task-center.js +2 -2
- package/lib/core/utils.js +156 -400
- package/lib/core/yida-client.js +57 -22
- package/lib/corp-efficiency/corp-efficiency.js +3 -3
- package/lib/corp-manager/api.js +2 -2
- package/lib/db/db-seq-fix.js +20 -25
- package/lib/flash-note/flash-to-prd.js +2 -2
- package/lib/i18n-management/i18n-management.js +2 -2
- package/lib/integration/integration-check.js +10 -7
- package/lib/integration/integration-create.js +11 -8
- package/lib/integration/integration-list.js +11 -8
- package/lib/mcp/server.js +5 -54
- package/lib/page-config/get-page-config.js +2 -2
- package/lib/page-config/save-share-config.js +2 -2
- package/lib/page-config/verify-short-url.js +2 -2
- package/lib/permission/get-permission.js +2 -2
- package/lib/permission/save-permission.js +2 -2
- package/lib/process/ai-form-setting.js +2 -2
- package/lib/process/create-process.js +2 -2
- package/lib/process/preview-process.js +2 -2
- package/lib/report/append.js +3 -3
- package/lib/report/index.js +3 -3
- package/package.json +1 -1
- package/scripts/check-syntax.js +6 -0
- package/scripts/e2e-real/full-runner.js +2 -10
- package/scripts/e2e-real/runner.js +0 -31
- package/scripts/eval/screenshot.js +27 -69
- package/scripts/nightly-smoke.js +16 -34
- package/scripts/postinstall.js +6 -2
- package/yida-skills/SKILL.md +10 -6
- package/yida-skills/references/development-rules.md +2 -2
- package/yida-skills/references/setup-and-env.md +10 -9
- package/yida-skills/skills/sls-log-workbench/SKILL.md +2 -2
- package/yida-skills/skills/sls-log-workbench/sls-query.js +27 -54
- package/yida-skills/skills/yida-flash-note-to-prd/SKILL.md +1 -1
- package/yida-skills/skills/yida-integration/SKILL.md +3 -3
- package/yida-skills/skills/yida-login/SKILL.md +56 -74
- package/yida-skills/skills/yida-logout/SKILL.md +13 -12
- package/yida-skills/skills/yida-process-rule/SKILL.md +1 -1
- package/yida-skills/skills/yida-publish-page/SKILL.md +1 -1
- package/yida-skills/skills/yida-report/references/report-api-guide.md +4 -20
- package/yida-skills/skills-index.json +4 -4
- package/lib/auth/auth.js +0 -313
- package/lib/auth/cdp-browser-login.js +0 -390
- package/lib/auth/codex-login.js +0 -71
- package/lib/auth/login.js +0 -550
- package/lib/auth/qr-login.js +0 -1575
package/lib/core/locales/zh.js
CHANGED
|
@@ -12,11 +12,11 @@ module.exports = {
|
|
|
12
12
|
usage: '用法:',
|
|
13
13
|
alias: '别名:',
|
|
14
14
|
group_auth: '环境 & 认证',
|
|
15
|
-
cmd_login: '
|
|
16
|
-
cmd_logout: '退出登录 /
|
|
17
|
-
cmd_auth: '登录态管理',
|
|
18
|
-
cmd_org: '
|
|
19
|
-
cmd_env: '检测 AI
|
|
15
|
+
cmd_login: '登录(OAuth token 模式)',
|
|
16
|
+
cmd_logout: '退出登录 / 清空 token',
|
|
17
|
+
cmd_auth: 'token 登录态管理',
|
|
18
|
+
cmd_org: '组织管理(列表 / 重新登录切换)',
|
|
19
|
+
cmd_env: '检测 AI 工具环境和 token 登录态',
|
|
20
20
|
cmd_env_management: '管理公有云 / 私有化环境',
|
|
21
21
|
group_app: '应用管理',
|
|
22
22
|
cmd_app_list: '查询我的应用列表',
|
|
@@ -449,27 +449,27 @@ openyida - 宜搭命令行工具
|
|
|
449
449
|
login: {
|
|
450
450
|
title: ' openyida login - 宜搭登录工具',
|
|
451
451
|
logout_title: ' openyida logout - 宜搭退出登录工具',
|
|
452
|
-
cookie_file_label: '\n
|
|
453
|
-
logout_success: ' ✅ 已清空
|
|
454
|
-
logout_hint: ' 下次调用 openyida login
|
|
455
|
-
logout_no_file: ' ℹ️
|
|
456
|
-
using_cache: '🔍 检测到本地
|
|
452
|
+
cookie_file_label: '\n Token 文件: {0}',
|
|
453
|
+
logout_success: ' ✅ 已清空 token,登录态已失效。',
|
|
454
|
+
logout_hint: ' 下次调用 openyida login 时将重新触发 OAuth 登录。',
|
|
455
|
+
logout_no_file: ' ℹ️ Token 文件不存在,无需清空。',
|
|
456
|
+
using_cache: '🔍 检测到本地 token,直接使用...',
|
|
457
457
|
csrf_ok: ' ✅ csrf_token: {0}...',
|
|
458
458
|
corp_id_ok: ' ✅ corpId: {0}',
|
|
459
|
-
no_playwright: '\n❌
|
|
459
|
+
no_playwright: '\n❌ 当前版本仅支持 token 登录,请运行 openyida login。',
|
|
460
460
|
playwright_install1: ' npm install -g playwright',
|
|
461
461
|
playwright_install2: ' npx playwright install chromium',
|
|
462
|
-
browser_opening: '\n🔐
|
|
462
|
+
browser_opening: '\n🔐 正在打开浏览器完成 OAuth 登录...',
|
|
463
463
|
login_url_label: ' 登录地址: {0}',
|
|
464
464
|
waiting_login: ' 等待登录完成(最长等待 10 分钟)...',
|
|
465
465
|
login_timeout: ' ⏰ 登录超时(10分钟),请重试。',
|
|
466
466
|
login_success: ' ✅ 登录成功!',
|
|
467
|
-
no_csrf_in_cookie: ' ❌
|
|
468
|
-
no_cookie_cache: ' ❌ 本地无有效
|
|
469
|
-
no_csrf_in_cache: ' ❌
|
|
467
|
+
no_csrf_in_cookie: ' ❌ token 登录未返回有效用户上下文,请重试。',
|
|
468
|
+
no_cookie_cache: ' ❌ 本地无有效 token,无法刷新,需要重新登录。',
|
|
469
|
+
no_csrf_in_cache: ' ❌ 本地无有效 token,需要重新登录。',
|
|
470
470
|
csrf_extracted: ' ✅ csrf_token 提取成功: {0}...',
|
|
471
|
-
trigger_login: '\n🔐
|
|
472
|
-
csrf_refresh: '\n🔄
|
|
471
|
+
trigger_login: '\n🔐 登录态失效,请运行 openyida login 重新登录。\n',
|
|
472
|
+
csrf_refresh: '\n🔄 token 模式不支持客户端刷新 csrf_token。\n',
|
|
473
473
|
},
|
|
474
474
|
|
|
475
475
|
// ── lib/auth.js ────────────────────────────────────
|
|
@@ -490,8 +490,8 @@ openyida - 宜搭命令行工具
|
|
|
490
490
|
login_success: '\n✅ 登录成功!',
|
|
491
491
|
corp_id_ok: ' ✅ corpId: {0}',
|
|
492
492
|
refresh_start: '\n🔄 正在刷新登录态...',
|
|
493
|
-
no_cookie_cache: ' ❌ 本地无
|
|
494
|
-
no_csrf_in_cache: ' ❌
|
|
493
|
+
no_cookie_cache: ' ❌ 本地无 token 缓存,无法刷新',
|
|
494
|
+
no_csrf_in_cache: ' ❌ 本地无有效 token,需要重新登录',
|
|
495
495
|
refresh_success: ' ✅ 登录态刷新成功!',
|
|
496
496
|
csrf_ok: ' ✅ csrf_token: {0}...',
|
|
497
497
|
auth_config_cleared: ' ✅ 已清空登录配置',
|
|
@@ -787,9 +787,9 @@ openyida - 宜搭命令行工具
|
|
|
787
787
|
import_example2: ' openyida import ./yida-export.json "质量追溯系统(生产环境)"',
|
|
788
788
|
exec_failed: '\n❌ 执行失败: {0}',
|
|
789
789
|
auth_usage: '用法: openyida auth <status|login|refresh|logout>',
|
|
790
|
-
auth_example: '示例:\n openyida auth status # 查看登录状态\n openyida auth login # 执行登录\n openyida auth
|
|
791
|
-
org_usage: '用法: openyida org <list|switch>',
|
|
792
|
-
org_example: '示例:\n openyida org list # 列出可访问的组织\n openyida org switch --corp-id dingXXX
|
|
790
|
+
auth_example: '示例:\n openyida auth status # 查看登录状态\n openyida auth login # 执行登录\n openyida auth refresh # 刷新登录态\n openyida auth logout # 退出登录',
|
|
791
|
+
org_usage: '用法: openyida org <list|switch> [--json] [--corp-id <corpId>]',
|
|
792
|
+
org_example: '示例:\n openyida org list --json # 列出可访问的组织\n openyida org switch --corp-id dingXXX # 重新 OAuth 登录并切换到指定组织',
|
|
793
793
|
title: ' openyida import - 宜搭应用导入工具',
|
|
794
794
|
// ── lib/get-page-config.js ─────────────────────────
|
|
795
795
|
get_page_config: {
|
|
@@ -1608,9 +1608,9 @@ openyida - 宜搭命令行工具
|
|
|
1608
1608
|
title: ' openyida login {0} - {1} 登录模式',
|
|
1609
1609
|
not_codex: '当前环境未检测为 Codex / Qoder / 悟空,仅返回内置浏览器登录 handoff。',
|
|
1610
1610
|
no_playwright: '{0} 登录模式不需要安装 Playwright 或额外 Chromium。',
|
|
1611
|
-
using_browser: '{0}
|
|
1612
|
-
browser_handoff_hint: '{0}
|
|
1613
|
-
handoff_message: '{0}
|
|
1614
|
-
cache_available: '已存在可用的 CLI
|
|
1611
|
+
using_browser: '{0} 内置浏览器仅适合无需登录的页面预览;CLI 鉴权请使用 openyida login。',
|
|
1612
|
+
browser_handoff_hint: '{0} 内置浏览器不参与 CLI 鉴权;请使用 openyida login。',
|
|
1613
|
+
handoff_message: '{0} 内置浏览器不能完成 CLI token 登录;请运行 openyida login。',
|
|
1614
|
+
cache_available: '已存在可用的 CLI token 缓存,无需重新登录。',
|
|
1615
1615
|
},
|
|
1616
1616
|
};
|
package/lib/core/query-data.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
const fs = require('fs');
|
|
16
16
|
const path = require('path');
|
|
17
17
|
const { CliError } = require('./cli-error');
|
|
18
|
-
const { createAuthRef, createYidaClient } = require('./yida-client');
|
|
18
|
+
const { createAuthRef, createYidaClient, isAuthRefReady } = require('./yida-client');
|
|
19
19
|
|
|
20
20
|
const { buildComponentAliasMaps } = require('../app/get-schema');
|
|
21
21
|
|
|
@@ -56,7 +56,7 @@ function parseError(message) {
|
|
|
56
56
|
|
|
57
57
|
function ensureSession() {
|
|
58
58
|
const authRef = createAuthRef();
|
|
59
|
-
if (!authRef
|
|
59
|
+
if (!isAuthRefReady(authRef)) {
|
|
60
60
|
fail('无法获取有效登录态或 CSRF Token');
|
|
61
61
|
}
|
|
62
62
|
return authRef;
|
package/lib/core/task-center.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
'use strict';
|
|
16
16
|
|
|
17
17
|
const { CliError } = require('./cli-error');
|
|
18
|
-
const { createAuthRef, createYidaClient } = require('./yida-client');
|
|
18
|
+
const { createAuthRef, createYidaClient, isAuthRefReady } = require('./yida-client');
|
|
19
19
|
|
|
20
20
|
// ── 常量 ──────────────────────────────────────────────
|
|
21
21
|
|
|
@@ -61,7 +61,7 @@ function fail(message) {
|
|
|
61
61
|
|
|
62
62
|
async function ensureSession() {
|
|
63
63
|
const authRef = createAuthRef();
|
|
64
|
-
if (!authRef
|
|
64
|
+
if (!isAuthRefReady(authRef)) {
|
|
65
65
|
fail('无法获取有效登录态或 CSRF Token');
|
|
66
66
|
}
|
|
67
67
|
return authRef;
|