@lark-apaas/coding-steering 0.1.32-alpha.zqy-deeplink-coding-20260820123453 → 0.1.32-dev.4f80f68

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/coding-steering",
3
- "version": "0.1.32-alpha.zqy-deeplink-coding-20260820123453",
3
+ "version": "0.1.32-dev.4f80f68",
4
4
  "description": "Stack-specific steering content for miaoda-coding templates",
5
5
  "type": "module",
6
6
  "files": [
@@ -513,6 +513,8 @@ async createArticle(@Req() req: Request, @Body() dto: CreateArticleDto) {
513
513
  | 语音识别、音频转文字、STT | AI语音转文字 |
514
514
  | 插件实例、PluginInstance、Capability | 通用插件调用 |
515
515
 
516
+ > ⚠️ **语义检索 / 相似推荐场景例外**:若需求是对**应用自有数据**做语义检索、向量检索、相似推荐、相关推荐、按内容找相似,**不要**用上表的「AI搜索总结 / AI文本转JSON / AI智能生文」等通用插件替代,必须召回 `/semantic-search`。上表的 AI 搜索/文本插件用于公网搜索、文本生成、结构化抽取,**不具备对自有数据库的向量检索能力**。
517
+
516
518
  ### 关键区分:多维表格 vs 数据库表
517
519
 
518
520
  | 场景 | 判断 | 操作 |
@@ -615,6 +617,14 @@ import { axiosForBackend } from '@lark-apaas/client-toolkit/utils/getAxiosForBac
615
617
 
616
618
  禁止未调用 Skill 直接编写表单/图表/表格代码。
617
619
 
620
+ ### 检索 Skill 召回规则(强制执行)
621
+
622
+ | 场景 | Skill | 说明 |
623
+ |------|-------|------|
624
+ | 语义检索、向量检索、相似推荐、相关推荐、相似内容、按内容找相似、猜你喜欢 | `/semantic-search` | 对应用自有数据库的数据做向量检索 / 相似召回 |
625
+
626
+ 禁止未调用 Skill 直接用「AI搜索总结 / AI文本转JSON / AI智能生文」等通用插件实现对自有数据的语义检索。
627
+
618
628
  ### 组件使用规范
619
629
 
620
630
  - 优先使用 `client/src/components` 下已有组件(Card/Button/Badge 等)
@@ -244,22 +244,15 @@ const structured = await capabilityClient
244
244
 
245
245
  ## 飞书深链 URL 规范
246
246
 
247
- 飞书通知/卡片插件中回链本应用页面的按钮深链,是发给真实收件人的对外链接,必须是 **public runtime origin + `process.env.CLIENT_BASE_PATH` + routePath**。Server 侧构造后作为 input 传给插件(capability 的 url 用 `{% raw %}{{input.xxx}}{% endraw %}` 引用):
247
+ 飞书通知/卡片插件中回链本应用页面的按钮深链,必须是**带 basePath 的绝对 URL**,Server 侧构造后作为 input 传给插件(capability 的 url 用 `{% raw %}{{input.xxx}}{% endraw %}` 引用):
248
248
 
249
249
  ```typescript
250
- // publicAppOrigin = 平台提供、应用配置或调用方显式传入的公开运行态 origin
251
- // allowedPublicOrigins = 应用配置中的公开运行态 origin allowlist,例如 ['https://example.com']
252
- // req.hostname 只有命中 allowedPublicOrigins 的 host 时才可作为候选;preview/dev/internal host(含 `miaoda.feishu.cn`)必须 fallback 或报错
250
+ // req.hostname = 网关公网域名(trust proxy 已开),禁止用 req.headers.host
253
251
  // CLIENT_BASE_PATH = 平台注入的内置 env = /app/{appId},最容易漏、缺它必 404
254
- const trustedRequestOrigin = allowedPublicOrigins.find(
255
- (allowedOrigin) => new URL(allowedOrigin).hostname === req.hostname,
256
- );
257
- const origin = publicAppOrigin ?? trustedRequestOrigin;
258
- if (!origin) throw new Error('Missing public app origin for Feishu message link');
259
- const url = `${origin}${process.env.CLIENT_BASE_PATH}${routePath}`;
252
+ const url = `https://${req.hostname}${process.env.CLIENT_BASE_PATH}${routePath}`;
260
253
  ```
261
254
 
262
- **禁止**:相对路径、占位/硬编码域名、只拼域名漏 basePath、盲信 `req.hostname` / `req.headers.host` / 前端传入的当前 host(含 `miaoda.feishu.cn`)、`FORCE_FRAMEWORK_DOMAIN_MAIN`(客户端编译期父窗口/CORS 域名,不是收件人访问域名)——否则飞书点开可能是「404 资源不存在」或进入开发态权限链。
255
+ **禁止**:相对路径、占位/硬编码域名、只拼域名漏 basePath、`FORCE_FRAMEWORK_DOMAIN_MAIN`(客户端编译期变量,服务端 undefined)——否则飞书点开是「404 资源不存在」。
263
256
 
264
257
  ## 常见错误速查
265
258