openyida 2026.7.21 → 2026.7.23-1
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/bin/yida.js +29 -2
- package/lib/app/canvas-compile.js +44 -12
- package/lib/app/create-form/definition-reader.js +22 -2
- package/lib/app/create-form.js +378 -43
- package/lib/app/generate-page.js +42 -1
- package/lib/app/publish.js +27 -0
- package/lib/app/services/form-compiler.js +66 -4
- package/lib/core/agent-capabilities.js +258 -0
- package/lib/core/command-manifest.js +236 -0
- package/lib/core/locales/en.js +11 -0
- package/lib/core/locales/zh.js +11 -0
- package/package.json +1 -1
- package/scripts/postinstall.js +4 -0
- package/scripts/validate-command-manifest.js +72 -0
- package/yida-skills/SKILL.md +12 -5
- package/yida-skills/references/setup-and-env.md +12 -10
- package/yida-skills/skills/yida-app/SKILL.md +24 -3
- package/yida-skills/skills/yida-canvas-custom-page/SKILL.md +9 -3
- package/yida-skills/skills/yida-canvas-custom-page/references/dependencies-and-cdn.md +5 -1
- package/yida-skills/skills/yida-canvas-custom-page/references/page-generation-guide.md +2 -0
- package/yida-skills/skills/yida-canvas-data-binding/SKILL.md +1 -0
- package/yida-skills/skills/yida-create-form-page/SKILL.md +10 -0
- package/yida-skills/skills/yida-custom-page/SKILL.md +3 -0
- package/yida-skills/skills/yida-get-schema/SKILL.md +8 -2
- package/yida-skills/skills/yida-login/SKILL.md +9 -7
- package/yida-skills/skills/yida-publish-page/SKILL.md +3 -1
- package/yida-skills/skills-index.json +1 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yida-login
|
|
3
|
-
description:
|
|
3
|
+
description: 宜搭登录态管理。以 OpenYida auth snapshot 为准;默认 OAuth token,snapshot 返回 env 注入状态时使用宿主 token。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# yida-login
|
|
7
7
|
|
|
8
8
|
## Mode
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
10
|
+
- Do not infer auth mode from agent name, host product, workspace path, or a guessed environment variable.
|
|
11
|
+
- First read `openyida agent-capabilities --summary-json`; fallback to `openyida login --check-only --json` only when needed.
|
|
12
|
+
- If the snapshot reports `login.auth_source=env` or `failure_reason=env_token_missing`, treat it as host-injected token mode. The only credential sources are host-injected token env such as `OPENYIDA_ACCESS_TOKEN` and `OPENYIDA_REFRESH_TOKEN`.
|
|
13
|
+
- Otherwise, `auth_mode=token` uses the default OAuth token session flow.
|
|
12
14
|
- NEVER infer auth from `.cache/cookies*.json`.
|
|
13
15
|
|
|
14
16
|
## Preflight
|
|
@@ -31,12 +33,12 @@ openyida login --check-only --json
|
|
|
31
33
|
| Observed status | Action |
|
|
32
34
|
|---|---|
|
|
33
35
|
| `auth_mode=token`, `status=ok` or `can_auto_use=true` | Continue business command |
|
|
34
|
-
| `failure_reason=env_token_missing` |
|
|
35
|
-
| `auth_mode=token`, not logged in,
|
|
36
|
+
| `auth_source=env` / `failure_reason=env_token_missing` | Treat as host-injected token mode; if token is missing, STOP and ask host to inject `OPENYIDA_ACCESS_TOKEN` or `OPENYIDA_REFRESH_TOKEN`; do not OAuth |
|
|
37
|
+
| `auth_mode=token`, not logged in, and snapshot does not report env injection | Run `openyida login`, then verify with `openyida login --check-only --json` |
|
|
36
38
|
|
|
37
39
|
## Token Mode Commands
|
|
38
40
|
|
|
39
|
-
Use OAuth login only when
|
|
41
|
+
Use OAuth login only when the auth snapshot does not report env injection.
|
|
40
42
|
|
|
41
43
|
```bash
|
|
42
44
|
openyida login
|
|
@@ -58,7 +60,7 @@ Overseas / international / global / Japan / Global YiDA => add `--intl` or equiv
|
|
|
58
60
|
|
|
59
61
|
## Host-Injected Token Mode Commands
|
|
60
62
|
|
|
61
|
-
Use only
|
|
63
|
+
Use only after the auth snapshot reports `auth_source=env` or `failure_reason=env_token_missing`.
|
|
62
64
|
|
|
63
65
|
```bash
|
|
64
66
|
openyida agent-capabilities --summary-json
|
|
@@ -63,6 +63,8 @@ description: 自定义页面 JSX 编译发布技能;schema-managed 页面由
|
|
|
63
63
|
openyida publish <源文件路径> <appType> <formUuid> [--compat] [--canvas] [--health-check] [--force]
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
+
路径口径:从仓库根执行时,源文件用 `project/pages/src/...`;如果 Bash cwd 已经是 `<workspace>/project`,源文件用 `pages/src/...`,不要传 `project/pages/src/...` 导致查找 `project/project/pages/src/...`。发布失败提示源文件不存在时,先按该规则切换路径,不要自动发布另一份文件。
|
|
67
|
+
|
|
66
68
|
> 本技能覆盖两条并列发布链路:**普通自定义页面 JSX/Jsx 组件链路**(`.oyd.jsx` / `.jsx`,Babel + UglifyJS + `Jsx` 组件 Schema)和 **Code Canvas 链路**(`.canvas.jsx`,本地 Babel 编译 + `YidaCodeCanvas` Schema)。从零写普通自定义页面见 `yida-custom-page`;从零写或迁移 Canvas 页见 `yida-canvas-custom-page` / `yida-canvas-upgrade`。
|
|
67
69
|
> 注意:`openyida check-page` / `openyida compile` 当前是普通自定义页面检查器,不适合作为 `.canvas.jsx` 的预检;Canvas 预检以 `publish` 的「编译 Code Canvas 源码」阶段为准。
|
|
68
70
|
|
|
@@ -139,7 +141,7 @@ body { background-color: #f2f3f5; }
|
|
|
139
141
|
|
|
140
142
|
## 注意事项
|
|
141
143
|
|
|
142
|
-
- 发布目标地址由当前环境配置和 auth
|
|
144
|
+
- 发布目标地址由当前环境配置和 auth snapshot(本地 OAuth token session 或 snapshot 明确返回的宿主注入 env token)中的 `base_url` 决定
|
|
143
145
|
- 碰到组织 corpId 不匹配时,询问用户是重新登录到目标组织,还是确认在当前组织继续发布到已解析页面;不要通过新建应用规避不匹配
|
|
144
146
|
- **编写源码前必须先加载对应页面子技能**:普通自定义页面 JSX/Jsx 组件链路调用 `use_skill("yida-custom-page", "编写宜搭普通自定义页面 JSX")`;Code Canvas 链路调用 `use_skill("yida-canvas-custom-page", "编写 Code Canvas 自定义页面")`。旧式 `renderJsx` 写法不要使用 Hooks,现代普通自定义页面 authoring 写法必须走 `.oyd.jsx` 兼容编译;Canvas 源码写成 `.canvas.jsx`
|
|
145
147
|
|
|
@@ -713,7 +713,7 @@
|
|
|
713
713
|
"name": "yida-login",
|
|
714
714
|
"path": "skills/yida-login/SKILL.md",
|
|
715
715
|
"display_name": "宜搭登录态管理",
|
|
716
|
-
"description": "
|
|
716
|
+
"description": "宜搭登录态管理。以 OpenYida auth snapshot 为准;默认 OAuth token,snapshot 返回 env 注入状态时使用宿主 token。",
|
|
717
717
|
"category": "yida-skills/context",
|
|
718
718
|
"tags": [
|
|
719
719
|
"登录",
|