openyida 2026.8.14 → 2026.8.16-beta.0
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 +4 -3
- package/bin/yida.js +40 -12
- package/lib/app/check-prd-completeness.js +631 -0
- package/lib/app/display-page-readback.js +187 -0
- package/lib/app/publish.js +63 -76
- package/lib/auth/oauth-loopback.js +25 -4
- package/lib/auth/token-auth.js +29 -7
- package/lib/auth/token-store.js +600 -61
- package/lib/core/agent-capabilities.js +211 -9
- package/lib/core/command-manifest.js +8 -1
- package/lib/core/copy.js +55 -20
- package/lib/core/env.js +33 -2
- package/lib/core/locales/en.js +19 -5
- package/lib/core/locales/zh.js +19 -5
- package/lib/core/utils.js +629 -73
- package/lib/core/yida-client.js +4 -0
- package/package.json +1 -1
- package/scripts/postinstall.js +26 -10
- package/yida-skills/references/setup-and-env.md +13 -1
- package/yida-skills/skills/yida-app/SKILL.md +1 -1
- package/yida-skills/skills/yida-app/workflow/step-9-output-finish.md +27 -1
- package/yida-skills/skills/yida-login/SKILL.md +29 -1
- package/yida-skills/skills/yida-publish-page/SKILL.md +4 -4
package/README.md
CHANGED
|
@@ -68,9 +68,9 @@ OpenYida returns a compact machine-readable summary with the version, login stat
|
|
|
68
68
|
openyida login
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
OpenYida login defaults to OAuth token mode. It opens the DingTalk OAuth authorization page, receives the local loopback callback, exchanges `code` / `authCode` with the Yida server, and stores `access_token` / `refresh_token` in the current project cache.
|
|
71
|
+
OpenYida login defaults to OAuth token mode. It opens the DingTalk OAuth authorization page, receives the local loopback callback, exchanges `code` / `authCode` with the Yida server, and stores `access_token` / `refresh_token` in the user auth store when available. If the user auth store is not writable, OpenYida explicitly falls back to the current project cache and reports that narrower persistence scope.
|
|
72
72
|
|
|
73
|
-
When the user names a target Yida entry URL, pass it to the login command so OpenYida can select the matching environment and
|
|
73
|
+
When the user names a target Yida entry URL, pass it to the login command so OpenYida can select the matching environment and auth profile. For example:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
76
|
openyida login https://yida-group.alibaba-inc.com/
|
|
@@ -357,7 +357,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
357
357
|
|
|
358
358
|
| Command | Description |
|
|
359
359
|
|---------|-------------|
|
|
360
|
-
| `openyida login [target-url] [--env <name>\|--intl\|--overseas\|--global\|--yidaapps\|--alibaba] [--client-id <clientId>] [--endpoint <url>]` | Login with OAuth token mode |
|
|
360
|
+
| `openyida login [target-url] [--env <name>\|--intl\|--overseas\|--global\|--yidaapps\|--alibaba] [--client-id <clientId>] [--endpoint <url>] [--no-browser]` | Login with OAuth token mode |
|
|
361
361
|
| `openyida logout` | Logout / clear token |
|
|
362
362
|
| `openyida auth <status\|login\|refresh\|logout>` | Token login state management |
|
|
363
363
|
| `openyida org <list\|switch> [--json] [--corp-id <corpId>]` | Organization management (list / switch by OAuth re-login) |
|
|
@@ -395,6 +395,7 @@ Run `openyida --help` or `openyida <command> --help` for detailed usage.
|
|
|
395
395
|
| `openyida list-forms <appType> [--keyword <text>]` | List forms/pages in an app |
|
|
396
396
|
| `openyida aggregate-table <list\|create-empty\|inspect\|preview\|save\|publish\|status> <appType> ...` | Manage aggregate tables (virtualView) |
|
|
397
397
|
| `openyida get-schema <appType> <formUuid\|--all> [--summary-json\|--field-map-json]` | Get one form Schema or all form Schemas |
|
|
398
|
+
| `openyida check-prd-completeness <prd.md> --app-type <appType> [--build-manifest <file>] [--json]` | Check PRD page/resource count risk |
|
|
398
399
|
| `openyida er <appType> [--format mermaid\|json] [--output file] [--include-system] [--include-pages]` | Export app entity relationship diagram |
|
|
399
400
|
| `openyida create-page <appType> "<name>" [--mode dashboard] [--hide-nav] [--locale zh_CN\|en_US\|ja_JP] [--open\|--no-open]` | Create a custom display page |
|
|
400
401
|
| `openyida build-page <sourceFile> [--output file\|--write]` | Build Yida-compatible page source |
|
package/bin/yida.js
CHANGED
|
@@ -30,13 +30,22 @@ function isAgentEnvironment(env) {
|
|
|
30
30
|
env.CLAUDE_CODE_ENTRYPOINT ||
|
|
31
31
|
env.MULERUN_CHAT_ID ||
|
|
32
32
|
env.MULE_DATA_DIR ||
|
|
33
|
+
env.MULE_WORKSPACE_DIR ||
|
|
33
34
|
env.OPENCODE ||
|
|
34
35
|
env.OPENCODE_CLIENT ||
|
|
35
36
|
env.QODER_IDE ||
|
|
36
37
|
env.QODER_AGENT ||
|
|
37
38
|
env.QODERCLI_INTEGRATION_MODE ||
|
|
39
|
+
env.QODER_WORK_INTEGRATION_PRODUCT ||
|
|
38
40
|
env.QWENWORK_INTEGRATION_MODE ||
|
|
39
41
|
env.QWENWORKCN_INTEGRATION_MODE ||
|
|
42
|
+
env.QWENWORK ||
|
|
43
|
+
env.QWENWORK_CLIENT ||
|
|
44
|
+
env.QWENWORK_WORKSPACE_DIR ||
|
|
45
|
+
env.QWENWORK_SANDBOX_ID ||
|
|
46
|
+
env.QWENWORK_PREVIEW_URL ||
|
|
47
|
+
env.QWENWORK_VNC_URL ||
|
|
48
|
+
(env.AGENT_PLATFORM || '').toLowerCase().includes('qwenwork') ||
|
|
40
49
|
env.CURSOR_TRACE_ID ||
|
|
41
50
|
env.AGENT_WORK_ROOT ||
|
|
42
51
|
env.OPENYIDA_AGENT_MODE ||
|
|
@@ -266,6 +275,12 @@ function printLoginResult(result) {
|
|
|
266
275
|
status: result.status || (tokenUsable ? 'ok' : 'token_not_issued'),
|
|
267
276
|
auth_mode: 'token',
|
|
268
277
|
auth_source: result.auth_source || result.authSource,
|
|
278
|
+
auth_store: result.auth_store || result.authStore,
|
|
279
|
+
auth_profile: result.auth_profile || result.authProfile,
|
|
280
|
+
persistence_scope: result.persistence_scope || result.persistenceScope,
|
|
281
|
+
user_auth_store_writable: result.user_auth_store_writable !== undefined
|
|
282
|
+
? result.user_auth_store_writable
|
|
283
|
+
: result.userAuthStoreWritable,
|
|
269
284
|
can_auto_use: result.can_auto_use !== undefined ? !!result.can_auto_use : tokenUsable,
|
|
270
285
|
token_type: result.token_type || 'Bearer',
|
|
271
286
|
access_token: maskSensitiveAuthOutput({ access_token: result.access_token }).access_token,
|
|
@@ -276,6 +291,7 @@ function printLoginResult(result) {
|
|
|
276
291
|
user_name: result.user_name,
|
|
277
292
|
failure_reason: result.failure_reason,
|
|
278
293
|
message: result.message,
|
|
294
|
+
warning: result.warning,
|
|
279
295
|
raw: tokenUsable ? undefined : result.raw,
|
|
280
296
|
};
|
|
281
297
|
console.log(JSON.stringify(summary));
|
|
@@ -412,6 +428,7 @@ function applyLoginEnvironmentFlags(cliArgs, options = {}) {
|
|
|
412
428
|
const valuePassthroughFlags = new Set([
|
|
413
429
|
'--corp-id',
|
|
414
430
|
'--client-id',
|
|
431
|
+
'--profile',
|
|
415
432
|
'--user-id',
|
|
416
433
|
]);
|
|
417
434
|
const targetUrlFlags = new Set([
|
|
@@ -520,6 +537,17 @@ function printLoginHelp() {
|
|
|
520
537
|
printCommandUsage(t('cli.login_usage'), t('cli.login_example'));
|
|
521
538
|
}
|
|
522
539
|
|
|
540
|
+
function buildTokenLoginOptions(loginArgs) {
|
|
541
|
+
return {
|
|
542
|
+
clientId: getArgValue(loginArgs, '--client-id'),
|
|
543
|
+
corpId: getArgValue(loginArgs, '--corp-id'),
|
|
544
|
+
userId: getArgValue(loginArgs, '--user-id'),
|
|
545
|
+
authProfile: getArgValue(loginArgs, '--profile'),
|
|
546
|
+
quiet: process.env.YIDA_QUIET === '1' || loginArgs.includes('--quiet'),
|
|
547
|
+
noBrowser: loginArgs.includes('--no-browser'),
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
|
|
523
551
|
function printAuthHelp() {
|
|
524
552
|
printCommandUsage(t('cli.auth_usage'), t('cli.auth_example'));
|
|
525
553
|
}
|
|
@@ -618,15 +646,12 @@ async function main() {
|
|
|
618
646
|
} else {
|
|
619
647
|
assertNoUnsupportedLegacyLoginFlags(rawArgs, loginArgs);
|
|
620
648
|
if (loginArgs.includes('--check-only')) {
|
|
621
|
-
console.log(JSON.stringify(getAuthStatus(), null, 2));
|
|
649
|
+
console.log(JSON.stringify(getAuthStatus(buildTokenLoginOptions(loginArgs)), null, 2));
|
|
622
650
|
} else if (isEnvAuthMode()) {
|
|
623
|
-
printLoginResult(getAuthStatus());
|
|
651
|
+
printLoginResult(getAuthStatus(buildTokenLoginOptions(loginArgs)));
|
|
624
652
|
} else {
|
|
625
653
|
const { tokenLogin } = require('../lib/auth/token-auth');
|
|
626
|
-
const result = await tokenLogin(
|
|
627
|
-
clientId: getArgValue(loginArgs, '--client-id'),
|
|
628
|
-
quiet: loginArgs.includes('--quiet'),
|
|
629
|
-
});
|
|
654
|
+
const result = await tokenLogin(buildTokenLoginOptions(loginArgs));
|
|
630
655
|
printLoginResult(result);
|
|
631
656
|
}
|
|
632
657
|
}
|
|
@@ -647,18 +672,15 @@ async function main() {
|
|
|
647
672
|
if (!subCommand || subCommand === '--help' || subCommand === '-h') {
|
|
648
673
|
printAuthHelp();
|
|
649
674
|
} else if (subCommand === 'status') {
|
|
650
|
-
console.log(JSON.stringify(getAuthStatus(), null, 2));
|
|
675
|
+
console.log(JSON.stringify(getAuthStatus(buildTokenLoginOptions(authArgs)), null, 2));
|
|
651
676
|
} else if (subCommand === 'login') {
|
|
652
677
|
if (hasHelpFlag(authArgs)) {
|
|
653
678
|
printLoginHelp();
|
|
654
679
|
} else {
|
|
655
680
|
assertNoUnsupportedLegacyLoginFlags(rawArgs.slice(1), authArgs);
|
|
656
681
|
const result = isEnvAuthMode()
|
|
657
|
-
? getAuthStatus()
|
|
658
|
-
: await tokenLogin(
|
|
659
|
-
clientId: getArgValue(authArgs, '--client-id'),
|
|
660
|
-
quiet: authArgs.includes('--quiet'),
|
|
661
|
-
});
|
|
682
|
+
? getAuthStatus(buildTokenLoginOptions(authArgs))
|
|
683
|
+
: await tokenLogin(buildTokenLoginOptions(authArgs));
|
|
662
684
|
printLoginResult(result);
|
|
663
685
|
}
|
|
664
686
|
} else if (subCommand === 'refresh') {
|
|
@@ -732,6 +754,12 @@ async function main() {
|
|
|
732
754
|
break;
|
|
733
755
|
}
|
|
734
756
|
|
|
757
|
+
case 'check-prd-completeness': {
|
|
758
|
+
const { run } = require('../lib/app/check-prd-completeness');
|
|
759
|
+
await run(args);
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
762
|
+
|
|
735
763
|
case 'er': {
|
|
736
764
|
const { run } = require('../lib/app/er');
|
|
737
765
|
await run(args);
|