aitable-workflow-core 0.1.18 → 0.1.19

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": "aitable-workflow-core",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "配置驱动的 AI 表格工作流自动化引擎(core):YAML 定义业务流程,AI 逐步执行并回写钉钉 AI 表格;含 CLI 与工作流引擎。",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "aitable-workflow-base": "0.1.18",
27
+ "aitable-workflow-base": "0.1.19",
28
28
  "@inquirer/prompts": "^8.5.2",
29
29
  "cron-parser": "^5.6.2",
30
30
  "cross-spawn": "^7.0.6",
@@ -84,6 +84,16 @@ export type RecipeContext = {
84
84
  setGlobalVar: (key: string, value: unknown) => void;
85
85
  /** 读取进程内共享变量;path 支持点路径(如 "a.b")。未命中返回 undefined。 */
86
86
  getGlobalVar: <T = unknown>(path: string) => T | undefined;
87
+ /**
88
+ * 上报一条 SLS 遥测事件(WebTracking 直发)。fire-and-forget:立即返回、
89
+ * 绝不抛错、绝不阻断 recipe;AITABLE_WORKFLOW_SLS_REPORT=off 后为 no-op。
90
+ *
91
+ * 事件自动携带引擎入口注入的 project/version/身份等公共字段(口径见 shared/sls-report.ts)。
92
+ * 不要在 recipe 里直接 import reportCliEvent——客户现场项目自装的 core 与引擎的 core
93
+ * 可能是两个模块实例,引擎侧初始化的 project/version 模块状态对 recipe 侧不可见,
94
+ * 经 ctx 注入则恒为引擎实例。
95
+ */
96
+ report: (event: string, data?: Record<string, unknown>) => void;
87
97
  /**
88
98
  * 角色上下文(persona/skills/guardrails/memory/输出规范)。
89
99
  * 由 recipe.meta.role 解析而来;无角色引用或未接入 resolver 时为 undefined。