@aalis/plugin-workflow 0.15.0 → 0.16.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/dist/engine.d.ts +18 -7
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +97 -79
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +268 -149
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +36 -11
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +97 -27
- package/dist/loader.js.map +1 -1
- package/dist/locales/en.d.ts +96 -0
- package/dist/locales/en.d.ts.map +1 -0
- package/dist/locales/en.js +96 -0
- package/dist/locales/en.js.map +1 -0
- package/dist/persistence.d.ts +17 -7
- package/dist/persistence.d.ts.map +1 -1
- package/dist/persistence.js +73 -26
- package/dist/persistence.js.map +1 -1
- package/dist/texts.d.ts +191 -0
- package/dist/texts.d.ts.map +1 -0
- package/dist/texts.js +103 -0
- package/dist/texts.js.map +1 -0
- package/dist/triggers.d.ts +1 -0
- package/dist/triggers.d.ts.map +1 -1
- package/dist/triggers.js +47 -4
- package/dist/triggers.js.map +1 -1
- package/package.json +18 -12
package/dist/persistence.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UserIdentity } from '@aalis/api-authority';
|
|
1
2
|
import { type StorageService } from '@aalis/api-storage';
|
|
2
3
|
import type { WorkflowRun } from '@aalis/api-workflow';
|
|
3
4
|
import type { Logger } from '@aalis/core';
|
|
@@ -9,6 +10,11 @@ export declare class RunStore {
|
|
|
9
10
|
private runs;
|
|
10
11
|
/** once 触发记账:workflowId → 首次触发时刻(ms)。与运行历史同文件,重启后读回即不再触发 */
|
|
11
12
|
private onceFired;
|
|
13
|
+
/**
|
|
14
|
+
* 定义者账本:workflowId → 定义者与写进定义文件的那份文本的哈希。不放进定义文件:工作区能被别的工具写,写在文件里的
|
|
15
|
+
* 定义者伪造得出来。与运行历史同文件,读不出时没有定义者
|
|
16
|
+
*/
|
|
17
|
+
private definers;
|
|
12
18
|
private writeChain;
|
|
13
19
|
/**
|
|
14
20
|
* init 读失败且不是「文件不存在」(storage 不在场、读错误、解析失败、结构不对):写的是整份快照,
|
|
@@ -23,23 +29,27 @@ export declare class RunStore {
|
|
|
23
29
|
/** 等到目前为止排队的写入全部落盘(dispose 时调用:否则 app.stop() 返回后还有写入在飞)。 */
|
|
24
30
|
flushed(): Promise<void>;
|
|
25
31
|
private flush;
|
|
26
|
-
/** 加入一条新 run(push);超过 maxRuns
|
|
32
|
+
/** 加入一条新 run(push);超过 maxRuns 则裁剪最旧的已结束的:在跑的留着,收尾时照常更新,工作流页上也还取消得了 */
|
|
27
33
|
add(run: WorkflowRun): void;
|
|
28
|
-
/** 替换已存在的 run(按 runId
|
|
34
|
+
/** 替换已存在的 run(按 runId),运行结束时整体更新状态:在跑的不会被裁,收尾时总找得到 */
|
|
29
35
|
update(run: WorkflowRun): void;
|
|
30
36
|
/** once 触发器的首次触发时刻;undefined = 从未触发过 */
|
|
31
37
|
onceFiredAt(workflowId: string): number | undefined;
|
|
32
38
|
/** 记下 once 已触发(幂等:已有记账不覆盖、不重复落盘) */
|
|
33
39
|
markOnceFired(workflowId: string): void;
|
|
34
|
-
/**
|
|
35
|
-
|
|
40
|
+
/** 定义文件这份文本的定义者:账本里的哈希对得上才有,手写的、被改过的与没有记账的都没有 */
|
|
41
|
+
definerOf(workflowId: string, sha256: string): UserIdentity | undefined;
|
|
42
|
+
/** 记下写进定义文件的这份文本的定义者;匿名定义的清掉这一条,不留覆盖之前的定义者 */
|
|
43
|
+
recordDefiner(workflowId: string, definer: UserIdentity | undefined, sha256: string): void;
|
|
44
|
+
/** 删除 workflow 时一并清账:同 id 重建视为新工作流,可再触发一次 once,也没有原来的定义者 */
|
|
45
|
+
forget(workflowId: string): void;
|
|
36
46
|
/**
|
|
37
|
-
* 按现存定义集清账:不在 ids 里的 workflowId
|
|
47
|
+
* 按现存定义集清账:不在 ids 里的 workflowId 的 once 记账与定义者一并删除。
|
|
38
48
|
* removeWorkflow 之外还有一条路能让定义消失——直接删 defsDir 里的 yaml 文件,
|
|
39
|
-
* 那条路不经服务、清不了账,同 id
|
|
49
|
+
* 那条路不经服务、清不了账,同 id 重建就会被旧记账永久压住,写回同样的文本还会认回原来的定义者。
|
|
40
50
|
* 启动扫描完定义后调一次,语义收敛为「定义不存在时记账随之清除」。
|
|
41
51
|
*/
|
|
42
|
-
|
|
52
|
+
prune(ids: Set<string>): void;
|
|
43
53
|
get(runId: string): WorkflowRun | undefined;
|
|
44
54
|
list(limit?: number, workflowId?: string): WorkflowRun[];
|
|
45
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../src/persistence.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../src/persistence.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAM1C,qBAAa,QAAQ;IACnB,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,IAAI,CAAqB;IACjC,4DAA4D;IAC5D,OAAO,CAAC,SAAS,CAA8B;IAC/C;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAyD;IACzE,OAAO,CAAC,UAAU,CAAoC;IACtD;;;OAGG;IACH,OAAO,CAAC,UAAU,CAAS;gBAEf,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAOrF,uCAAuC;IACjC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA8C3B,yDAAyD;IACzD,kBAAkB,IAAI,OAAO;IAI7B,4DAA4D;IAC5D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxB,OAAO,CAAC,KAAK;IAab,sEAAsE;IACtE,GAAG,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI;IAO3B,sDAAsD;IACtD,MAAM,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI;IAM9B,wCAAwC;IACxC,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAInD,oCAAoC;IACpC,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAMvC,iDAAiD;IACjD,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAKvE,8CAA8C;IAC9C,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAO1F,4DAA4D;IAC5D,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAOhC;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI;IAY7B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAI3C,IAAI,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,EAAE;CAMzD"}
|
package/dist/persistence.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
// ============================================================
|
|
2
|
-
// persistence.ts — 运行实例持久化(追加 + 滚动)+ once 触发记账
|
|
2
|
+
// persistence.ts — 运行实例持久化(追加 + 滚动)+ once 触发记账 + 定义者账本
|
|
3
3
|
//
|
|
4
4
|
// 通过 @aalis/api-storage 写入 storage URI(默认 data:/workflow-runs.json)。
|
|
5
5
|
// 仍维持 write-on-end 整体重写策略;写入串行化避免覆盖。
|
|
6
|
-
// 文件形状:{ runs: [...], onceFired: { <workflowId>: <firedAt> }
|
|
6
|
+
// 文件形状:{ runs: [...], onceFired: { <workflowId>: <firedAt> },
|
|
7
|
+
// definers: { <workflowId>: { platform, userId, sha256 } } }。
|
|
7
8
|
// ============================================================
|
|
8
9
|
import { isStorageNotFound } from '@aalis/api-storage';
|
|
10
|
+
import { t } from './texts.js';
|
|
11
|
+
const isObject = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
12
|
+
const filled = (v) => typeof v === 'string' && v.length > 0;
|
|
9
13
|
export class RunStore {
|
|
10
14
|
storage;
|
|
11
15
|
fileUri;
|
|
@@ -14,6 +18,11 @@ export class RunStore {
|
|
|
14
18
|
runs = [];
|
|
15
19
|
/** once 触发记账:workflowId → 首次触发时刻(ms)。与运行历史同文件,重启后读回即不再触发 */
|
|
16
20
|
onceFired = {};
|
|
21
|
+
/**
|
|
22
|
+
* 定义者账本:workflowId → 定义者与写进定义文件的那份文本的哈希。不放进定义文件:工作区能被别的工具写,写在文件里的
|
|
23
|
+
* 定义者伪造得出来。与运行历史同文件,读不出时没有定义者
|
|
24
|
+
*/
|
|
25
|
+
definers = {};
|
|
17
26
|
writeChain = Promise.resolve();
|
|
18
27
|
/**
|
|
19
28
|
* init 读失败且不是「文件不存在」(storage 不在场、读错误、解析失败、结构不对):写的是整份快照,
|
|
@@ -42,20 +51,42 @@ export class RunStore {
|
|
|
42
51
|
// 解析与结构校验单独一段:解析报错的文案(会带上短文件原文)不能进「不存在」判据
|
|
43
52
|
try {
|
|
44
53
|
const data = JSON.parse(String(raw));
|
|
45
|
-
if (!
|
|
54
|
+
if (!isObject(data))
|
|
46
55
|
throw new Error('顶层不是 JSON 对象');
|
|
47
56
|
if (data.runs !== undefined && !Array.isArray(data.runs))
|
|
48
57
|
throw new Error('runs 不是数组');
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
58
|
+
const { onceFired = {}, definers = {} } = data;
|
|
59
|
+
if (!isObject(onceFired))
|
|
51
60
|
throw new Error('onceFired 不是对象');
|
|
52
|
-
|
|
61
|
+
if (!isObject(definers))
|
|
62
|
+
throw new Error('definers 不是对象');
|
|
53
63
|
if (data.runs)
|
|
54
64
|
this.runs = data.runs;
|
|
55
|
-
|
|
65
|
+
// 还在「运行中」的是进程没有正常退出时留下的(停机会中止在跑的、等它们收尾):收口成已取消,与停机打断的同一状态;
|
|
66
|
+
// 不知道停在何时,不写结束时刻。节点与引擎取消时同样收:在跑的记失败、等着的记跳过
|
|
67
|
+
for (const run of this.runs) {
|
|
68
|
+
if (run.status !== 'running')
|
|
69
|
+
continue;
|
|
70
|
+
run.status = 'cancelled';
|
|
71
|
+
run.error = t('interruptedByExit');
|
|
72
|
+
for (const node of run.nodes) {
|
|
73
|
+
if (node.status === 'pending')
|
|
74
|
+
node.status = 'skipped';
|
|
75
|
+
if (node.status !== 'running')
|
|
76
|
+
continue;
|
|
77
|
+
node.status = 'failed';
|
|
78
|
+
node.error = t('interruptedByExit');
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
for (const [id, at] of Object.entries(onceFired)) {
|
|
56
82
|
if (typeof at === 'number')
|
|
57
83
|
this.onceFired[id] = at;
|
|
58
84
|
}
|
|
85
|
+
for (const [id, entry] of Object.entries(definers)) {
|
|
86
|
+
if (isObject(entry) && filled(entry.platform) && filled(entry.userId) && filled(entry.sha256)) {
|
|
87
|
+
this.definers[id] = { platform: entry.platform, userId: entry.userId, sha256: entry.sha256 };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
59
90
|
}
|
|
60
91
|
catch (err) {
|
|
61
92
|
this.loadFailed = true;
|
|
@@ -73,28 +104,26 @@ export class RunStore {
|
|
|
73
104
|
flush() {
|
|
74
105
|
if (this.loadFailed)
|
|
75
106
|
return; // init 时已 warn 过
|
|
76
|
-
const payload = JSON.stringify({ runs: this.runs, onceFired: this.onceFired }, null, 2);
|
|
107
|
+
const payload = JSON.stringify({ runs: this.runs, onceFired: this.onceFired, definers: this.definers }, null, 2);
|
|
77
108
|
this.writeChain = this.writeChain
|
|
78
109
|
.then(() => this.storage.writeFile(this.fileUri, payload))
|
|
79
110
|
.then(() => undefined, err => {
|
|
80
111
|
this.logger.warn(`写入运行历史失败: ${err}`);
|
|
81
112
|
});
|
|
82
113
|
}
|
|
83
|
-
/** 加入一条新 run(push);超过 maxRuns
|
|
114
|
+
/** 加入一条新 run(push);超过 maxRuns 则裁剪最旧的已结束的:在跑的留着,收尾时照常更新,工作流页上也还取消得了 */
|
|
84
115
|
add(run) {
|
|
85
116
|
this.runs.push(run);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
117
|
+
let excess = this.runs.length - this.maxRuns;
|
|
118
|
+
if (excess > 0)
|
|
119
|
+
this.runs = this.runs.filter(r => r.status === 'running' || excess-- <= 0);
|
|
89
120
|
this.flush();
|
|
90
121
|
}
|
|
91
|
-
/** 替换已存在的 run(按 runId
|
|
122
|
+
/** 替换已存在的 run(按 runId),运行结束时整体更新状态:在跑的不会被裁,收尾时总找得到 */
|
|
92
123
|
update(run) {
|
|
93
124
|
const i = this.runs.findIndex(r => r.runId === run.runId);
|
|
94
125
|
if (i >= 0)
|
|
95
126
|
this.runs[i] = run;
|
|
96
|
-
else
|
|
97
|
-
this.runs.push(run);
|
|
98
127
|
this.flush();
|
|
99
128
|
}
|
|
100
129
|
/** once 触发器的首次触发时刻;undefined = 从未触发过 */
|
|
@@ -108,26 +137,44 @@ export class RunStore {
|
|
|
108
137
|
this.onceFired[workflowId] = Date.now();
|
|
109
138
|
this.flush();
|
|
110
139
|
}
|
|
111
|
-
/**
|
|
112
|
-
|
|
113
|
-
|
|
140
|
+
/** 定义文件这份文本的定义者:账本里的哈希对得上才有,手写的、被改过的与没有记账的都没有 */
|
|
141
|
+
definerOf(workflowId, sha256) {
|
|
142
|
+
const entry = this.definers[workflowId];
|
|
143
|
+
return entry?.sha256 === sha256 ? { platform: entry.platform, userId: entry.userId } : undefined;
|
|
144
|
+
}
|
|
145
|
+
/** 记下写进定义文件的这份文本的定义者;匿名定义的清掉这一条,不留覆盖之前的定义者 */
|
|
146
|
+
recordDefiner(workflowId, definer, sha256) {
|
|
147
|
+
if (!definer && !this.definers[workflowId])
|
|
148
|
+
return;
|
|
149
|
+
if (definer)
|
|
150
|
+
this.definers[workflowId] = { platform: definer.platform, userId: definer.userId, sha256 };
|
|
151
|
+
else
|
|
152
|
+
delete this.definers[workflowId];
|
|
153
|
+
this.flush();
|
|
154
|
+
}
|
|
155
|
+
/** 删除 workflow 时一并清账:同 id 重建视为新工作流,可再触发一次 once,也没有原来的定义者 */
|
|
156
|
+
forget(workflowId) {
|
|
157
|
+
if (this.onceFired[workflowId] === undefined && this.definers[workflowId] === undefined)
|
|
114
158
|
return;
|
|
115
159
|
delete this.onceFired[workflowId];
|
|
160
|
+
delete this.definers[workflowId];
|
|
116
161
|
this.flush();
|
|
117
162
|
}
|
|
118
163
|
/**
|
|
119
|
-
* 按现存定义集清账:不在 ids 里的 workflowId
|
|
164
|
+
* 按现存定义集清账:不在 ids 里的 workflowId 的 once 记账与定义者一并删除。
|
|
120
165
|
* removeWorkflow 之外还有一条路能让定义消失——直接删 defsDir 里的 yaml 文件,
|
|
121
|
-
* 那条路不经服务、清不了账,同 id
|
|
166
|
+
* 那条路不经服务、清不了账,同 id 重建就会被旧记账永久压住,写回同样的文本还会认回原来的定义者。
|
|
122
167
|
* 启动扫描完定义后调一次,语义收敛为「定义不存在时记账随之清除」。
|
|
123
168
|
*/
|
|
124
|
-
|
|
169
|
+
prune(ids) {
|
|
125
170
|
let changed = false;
|
|
126
|
-
for (const
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
171
|
+
for (const ledger of [this.onceFired, this.definers]) {
|
|
172
|
+
for (const id of Object.keys(ledger)) {
|
|
173
|
+
if (ids.has(id))
|
|
174
|
+
continue;
|
|
175
|
+
delete ledger[id];
|
|
176
|
+
changed = true;
|
|
177
|
+
}
|
|
131
178
|
}
|
|
132
179
|
if (changed)
|
|
133
180
|
this.flush();
|
package/dist/persistence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.js","sourceRoot":"","sources":["../src/persistence.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D
|
|
1
|
+
{"version":3,"file":"persistence.js","sourceRoot":"","sources":["../src/persistence.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,uDAAuD;AACvD,EAAE;AACF,qEAAqE;AACrE,qCAAqC;AACrC,8DAA8D;AAC9D,wEAAwE;AACxE,+DAA+D;AAG/D,OAAO,EAAE,iBAAiB,EAAuB,MAAM,oBAAoB,CAAC;AAG5E,OAAO,EAAE,CAAC,EAAE,MAAM,YAAY,CAAC;AAE/B,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAgC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACjH,MAAM,MAAM,GAAG,CAAC,CAAU,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAElF,MAAM,OAAO,QAAQ;IACX,OAAO,CAAiB;IACxB,OAAO,CAAS;IAChB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,IAAI,GAAkB,EAAE,CAAC;IACjC,4DAA4D;IACpD,SAAS,GAA2B,EAAE,CAAC;IAC/C;;;OAGG;IACK,QAAQ,GAAsD,EAAE,CAAC;IACjE,UAAU,GAAkB,OAAO,CAAC,OAAO,EAAE,CAAC;IACtD;;;OAGG;IACK,UAAU,GAAG,KAAK,CAAC;IAE3B,YAAY,OAAuB,EAAE,OAAe,EAAE,OAAe,EAAE,MAAc;QACn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C,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,GAAG,CAAC,KAAa;QACf,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;IAChD,CAAC;IAED,IAAI,CAAC,KAAc,EAAE,UAAmB;QACtC,IAAI,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACtF,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC;QACzD,IAAI,KAAK,IAAI,KAAK,GAAG,CAAC;YAAE,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAClD,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
package/dist/texts.d.ts
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
declare const SOURCE: {
|
|
2
|
+
readonly displayName: "工作流";
|
|
3
|
+
readonly groupSummary: "定义、运行、查询自主工作流(DAG)";
|
|
4
|
+
readonly defsDirLabel: "工作流定义目录";
|
|
5
|
+
readonly defsDirDescription: "加载存储下的 *.yaml 定义(storage URI);AI 通过 workflow_define 创建的定义也写入此处。";
|
|
6
|
+
readonly runsFileLabel: "运行历史文件";
|
|
7
|
+
readonly runsFileDescription: "保存最近 N 条运行实例(storage URI)。";
|
|
8
|
+
readonly maxRunsLabel: "保留最近运行条数";
|
|
9
|
+
readonly maxRunsDescription: "超过则裁剪最旧的已结束的运行,在跑的不裁;最小 10。";
|
|
10
|
+
readonly enableToolsLabel: "注册 AI 工具";
|
|
11
|
+
readonly enableToolsDescription: "开启后向 LLM 暴露 workflow_define / workflow_run 等工具。";
|
|
12
|
+
readonly badUri: "{key}=\"{value}\" 不是 storage URI,请写成 <根名>:/<路径>(如 {fallback}),或删掉该键使用默认值";
|
|
13
|
+
readonly everySeconds: "每 {seconds}s";
|
|
14
|
+
readonly onceAt: "一次性@{at}";
|
|
15
|
+
readonly manual: "手动";
|
|
16
|
+
readonly workflowMissing: "工作流 {id} 不存在";
|
|
17
|
+
readonly runMissing: "workflow \"{id}\" 不存在";
|
|
18
|
+
readonly runDisabled: "workflow \"{id}\" 已禁用";
|
|
19
|
+
readonly runWorkflow: "立即运行";
|
|
20
|
+
readonly ran: "已运行 {id},用时 {duration}";
|
|
21
|
+
readonly elapsed: "{ms, duration}";
|
|
22
|
+
readonly enableAction: "启用";
|
|
23
|
+
readonly disableAction: "停用";
|
|
24
|
+
readonly delete: "删除";
|
|
25
|
+
readonly deleteConfirm: "删除这个工作流,连同磁盘上的定义文件?";
|
|
26
|
+
readonly deleted: "已删除 {id}";
|
|
27
|
+
readonly deleteFileFailed: "删除 workflow 文件 {file} 失败:{error}";
|
|
28
|
+
readonly defineWorkflow: "新建或覆盖";
|
|
29
|
+
readonly yamlLabel: "YAML 定义";
|
|
30
|
+
readonly yamlDescription: "完整的定义:id、name、trigger、nodes。trigger 支持 cron、interval、once、event、manual;节点支持 tool、send-message、wait、agent(派发指令给 agent 并等回复,配合 deps 与 '{{outputs.X}}' 做多智能体编排)。同 id 的定义被覆盖,保存后立即注册触发器。现有定义的 YAML 在定义表格的详情里,可以照着改。";
|
|
31
|
+
readonly persistLabel: "写入磁盘";
|
|
32
|
+
readonly persistDescription: "关闭后只在内存里注册,重启后丢失";
|
|
33
|
+
readonly yamlFailed: "YAML 解析失败:{error}";
|
|
34
|
+
readonly badDefinition: "定义不合法:缺少 trigger 或 nodes";
|
|
35
|
+
readonly badId: "工作流 id 只能用字母、数字、下划线与连字符(它是定义文件的文件名):{id}";
|
|
36
|
+
readonly fileTaken: "定义文件 {file} 已被工作流 {other} 占用,请给工作流 {id} 换一个 id(文件系统不分大小写或字形时,看着不同的 id 也会落到同一个文件)";
|
|
37
|
+
readonly definitions: "定义";
|
|
38
|
+
readonly stateEnabled: "启用";
|
|
39
|
+
readonly stateDisabled: "停用";
|
|
40
|
+
readonly runs24h: "24 小时运行";
|
|
41
|
+
readonly failures24h: "24 小时失败";
|
|
42
|
+
readonly noWorkflows: "还没有工作流";
|
|
43
|
+
readonly name: "名称";
|
|
44
|
+
readonly trigger: "触发";
|
|
45
|
+
readonly nodeCount: "节点数";
|
|
46
|
+
readonly status: "状态";
|
|
47
|
+
readonly description: "描述";
|
|
48
|
+
readonly recentRuns: "最近运行";
|
|
49
|
+
readonly noRuns: "还没有运行过";
|
|
50
|
+
readonly workflowColumn: "工作流";
|
|
51
|
+
readonly triggerSource: "触发来源";
|
|
52
|
+
readonly startedAt: "开始时间";
|
|
53
|
+
readonly duration: "用时";
|
|
54
|
+
readonly error: "错误";
|
|
55
|
+
readonly runId: "运行 ID";
|
|
56
|
+
readonly cancelled: "运行已取消";
|
|
57
|
+
readonly missingField: "节点 \"{id}\"({type}) 缺少 {field} 字段";
|
|
58
|
+
readonly missingSeconds: "节点 \"{id}\"(wait) 缺少数值字段 seconds";
|
|
59
|
+
readonly secondsTooLong: "节点 \"{id}\"({type}) 的 {field} 不能超过 {max, number} 秒(约 24.8 天):{value}";
|
|
60
|
+
readonly unknownNodeType: "节点 \"{id}\" 类型未知:{type}";
|
|
61
|
+
readonly duplicateNodeId: "节点 id 重复";
|
|
62
|
+
readonly unknownDep: "节点 \"{id}\" 引用未知 dep \"{dep}\"";
|
|
63
|
+
readonly selfDep: "节点 \"{id}\" 自引用";
|
|
64
|
+
readonly dependencyCycle: "节点存在依赖环";
|
|
65
|
+
readonly noTools: "'tools' 服务不可用";
|
|
66
|
+
readonly agentCallerSession: "agent 节点指向调起这次运行的会话,那一轮在等这次运行,节点开不了轮(会话={session})";
|
|
67
|
+
readonly agentNoGateway: "'gateway' 服务不可用,agent 节点的指令送不到(会话={session})";
|
|
68
|
+
readonly agentNotCompleted: "agent 节点未正常完成(outcome={outcome},会话={session})";
|
|
69
|
+
readonly agentTimeout: "agent 节点超时({seconds}s 内未收到 agent:turn:after,会话={session})";
|
|
70
|
+
readonly agentNoTurn: "agent 节点的指令没开轮:在网关相位被挡下或被放掉(会话={session})";
|
|
71
|
+
readonly nodeFailed: "节点 \"{id}\" 失败:{error}";
|
|
72
|
+
readonly statusPending: "等待";
|
|
73
|
+
readonly statusRunning: "运行中";
|
|
74
|
+
readonly statusSuccess: "成功";
|
|
75
|
+
readonly statusFailed: "失败";
|
|
76
|
+
readonly statusCancelled: "已取消";
|
|
77
|
+
readonly runNotSucceeded: "运行没有成功({status})";
|
|
78
|
+
readonly runNotSucceededBecause: "运行没有成功({status}):{error}";
|
|
79
|
+
readonly cancelRun: "取消运行";
|
|
80
|
+
readonly cancelRunConfirm: "取消这次运行?已做完的节点不撤回,agent 节点已派发的那一轮照常跑完;记录留在运行历史里。";
|
|
81
|
+
readonly runCancelled: "已取消 {id}";
|
|
82
|
+
readonly runEnded: "这次运行已经结束";
|
|
83
|
+
readonly interruptedByExit: "进程退出时中断";
|
|
84
|
+
readonly saved: "已保存工作流 {id}";
|
|
85
|
+
readonly enabled: "已启用 {id}";
|
|
86
|
+
readonly disabled: "已停用 {id}";
|
|
87
|
+
readonly onceSkipped: "once 记账读取失败(见日志),本次运行不会触发;可用{manualRun}手动执行";
|
|
88
|
+
readonly onceSkippedPersisted: "once 记账读取失败(见日志),本次运行不会触发;可用{manualRun}手动执行,修复运行历史文件后重启恢复";
|
|
89
|
+
readonly runNow: "「立即运行」";
|
|
90
|
+
readonly blockedEventTrigger: "event 触发器订阅的 {event} 负载带会话内容(会话 id、平台、正文等),不能当触发源";
|
|
91
|
+
readonly badRunAt: "once 触发器的 runAt 不是能解析的时间:{runAt}";
|
|
92
|
+
readonly definedBy: "定义者";
|
|
93
|
+
readonly anonymous: "匿名";
|
|
94
|
+
};
|
|
95
|
+
export type Source = typeof SOURCE;
|
|
96
|
+
export declare const t: import("@aalis/schema-i18n").TextFactory<{
|
|
97
|
+
readonly displayName: "工作流";
|
|
98
|
+
readonly groupSummary: "定义、运行、查询自主工作流(DAG)";
|
|
99
|
+
readonly defsDirLabel: "工作流定义目录";
|
|
100
|
+
readonly defsDirDescription: "加载存储下的 *.yaml 定义(storage URI);AI 通过 workflow_define 创建的定义也写入此处。";
|
|
101
|
+
readonly runsFileLabel: "运行历史文件";
|
|
102
|
+
readonly runsFileDescription: "保存最近 N 条运行实例(storage URI)。";
|
|
103
|
+
readonly maxRunsLabel: "保留最近运行条数";
|
|
104
|
+
readonly maxRunsDescription: "超过则裁剪最旧的已结束的运行,在跑的不裁;最小 10。";
|
|
105
|
+
readonly enableToolsLabel: "注册 AI 工具";
|
|
106
|
+
readonly enableToolsDescription: "开启后向 LLM 暴露 workflow_define / workflow_run 等工具。";
|
|
107
|
+
readonly badUri: "{key}=\"{value}\" 不是 storage URI,请写成 <根名>:/<路径>(如 {fallback}),或删掉该键使用默认值";
|
|
108
|
+
readonly everySeconds: "每 {seconds}s";
|
|
109
|
+
readonly onceAt: "一次性@{at}";
|
|
110
|
+
readonly manual: "手动";
|
|
111
|
+
readonly workflowMissing: "工作流 {id} 不存在";
|
|
112
|
+
readonly runMissing: "workflow \"{id}\" 不存在";
|
|
113
|
+
readonly runDisabled: "workflow \"{id}\" 已禁用";
|
|
114
|
+
readonly runWorkflow: "立即运行";
|
|
115
|
+
readonly ran: "已运行 {id},用时 {duration}";
|
|
116
|
+
readonly elapsed: "{ms, duration}";
|
|
117
|
+
readonly enableAction: "启用";
|
|
118
|
+
readonly disableAction: "停用";
|
|
119
|
+
readonly delete: "删除";
|
|
120
|
+
readonly deleteConfirm: "删除这个工作流,连同磁盘上的定义文件?";
|
|
121
|
+
readonly deleted: "已删除 {id}";
|
|
122
|
+
readonly deleteFileFailed: "删除 workflow 文件 {file} 失败:{error}";
|
|
123
|
+
readonly defineWorkflow: "新建或覆盖";
|
|
124
|
+
readonly yamlLabel: "YAML 定义";
|
|
125
|
+
readonly yamlDescription: "完整的定义:id、name、trigger、nodes。trigger 支持 cron、interval、once、event、manual;节点支持 tool、send-message、wait、agent(派发指令给 agent 并等回复,配合 deps 与 '{{outputs.X}}' 做多智能体编排)。同 id 的定义被覆盖,保存后立即注册触发器。现有定义的 YAML 在定义表格的详情里,可以照着改。";
|
|
126
|
+
readonly persistLabel: "写入磁盘";
|
|
127
|
+
readonly persistDescription: "关闭后只在内存里注册,重启后丢失";
|
|
128
|
+
readonly yamlFailed: "YAML 解析失败:{error}";
|
|
129
|
+
readonly badDefinition: "定义不合法:缺少 trigger 或 nodes";
|
|
130
|
+
readonly badId: "工作流 id 只能用字母、数字、下划线与连字符(它是定义文件的文件名):{id}";
|
|
131
|
+
readonly fileTaken: "定义文件 {file} 已被工作流 {other} 占用,请给工作流 {id} 换一个 id(文件系统不分大小写或字形时,看着不同的 id 也会落到同一个文件)";
|
|
132
|
+
readonly definitions: "定义";
|
|
133
|
+
readonly stateEnabled: "启用";
|
|
134
|
+
readonly stateDisabled: "停用";
|
|
135
|
+
readonly runs24h: "24 小时运行";
|
|
136
|
+
readonly failures24h: "24 小时失败";
|
|
137
|
+
readonly noWorkflows: "还没有工作流";
|
|
138
|
+
readonly name: "名称";
|
|
139
|
+
readonly trigger: "触发";
|
|
140
|
+
readonly nodeCount: "节点数";
|
|
141
|
+
readonly status: "状态";
|
|
142
|
+
readonly description: "描述";
|
|
143
|
+
readonly recentRuns: "最近运行";
|
|
144
|
+
readonly noRuns: "还没有运行过";
|
|
145
|
+
readonly workflowColumn: "工作流";
|
|
146
|
+
readonly triggerSource: "触发来源";
|
|
147
|
+
readonly startedAt: "开始时间";
|
|
148
|
+
readonly duration: "用时";
|
|
149
|
+
readonly error: "错误";
|
|
150
|
+
readonly runId: "运行 ID";
|
|
151
|
+
readonly cancelled: "运行已取消";
|
|
152
|
+
readonly missingField: "节点 \"{id}\"({type}) 缺少 {field} 字段";
|
|
153
|
+
readonly missingSeconds: "节点 \"{id}\"(wait) 缺少数值字段 seconds";
|
|
154
|
+
readonly secondsTooLong: "节点 \"{id}\"({type}) 的 {field} 不能超过 {max, number} 秒(约 24.8 天):{value}";
|
|
155
|
+
readonly unknownNodeType: "节点 \"{id}\" 类型未知:{type}";
|
|
156
|
+
readonly duplicateNodeId: "节点 id 重复";
|
|
157
|
+
readonly unknownDep: "节点 \"{id}\" 引用未知 dep \"{dep}\"";
|
|
158
|
+
readonly selfDep: "节点 \"{id}\" 自引用";
|
|
159
|
+
readonly dependencyCycle: "节点存在依赖环";
|
|
160
|
+
readonly noTools: "'tools' 服务不可用";
|
|
161
|
+
readonly agentCallerSession: "agent 节点指向调起这次运行的会话,那一轮在等这次运行,节点开不了轮(会话={session})";
|
|
162
|
+
readonly agentNoGateway: "'gateway' 服务不可用,agent 节点的指令送不到(会话={session})";
|
|
163
|
+
readonly agentNotCompleted: "agent 节点未正常完成(outcome={outcome},会话={session})";
|
|
164
|
+
readonly agentTimeout: "agent 节点超时({seconds}s 内未收到 agent:turn:after,会话={session})";
|
|
165
|
+
readonly agentNoTurn: "agent 节点的指令没开轮:在网关相位被挡下或被放掉(会话={session})";
|
|
166
|
+
readonly nodeFailed: "节点 \"{id}\" 失败:{error}";
|
|
167
|
+
readonly statusPending: "等待";
|
|
168
|
+
readonly statusRunning: "运行中";
|
|
169
|
+
readonly statusSuccess: "成功";
|
|
170
|
+
readonly statusFailed: "失败";
|
|
171
|
+
readonly statusCancelled: "已取消";
|
|
172
|
+
readonly runNotSucceeded: "运行没有成功({status})";
|
|
173
|
+
readonly runNotSucceededBecause: "运行没有成功({status}):{error}";
|
|
174
|
+
readonly cancelRun: "取消运行";
|
|
175
|
+
readonly cancelRunConfirm: "取消这次运行?已做完的节点不撤回,agent 节点已派发的那一轮照常跑完;记录留在运行历史里。";
|
|
176
|
+
readonly runCancelled: "已取消 {id}";
|
|
177
|
+
readonly runEnded: "这次运行已经结束";
|
|
178
|
+
readonly interruptedByExit: "进程退出时中断";
|
|
179
|
+
readonly saved: "已保存工作流 {id}";
|
|
180
|
+
readonly enabled: "已启用 {id}";
|
|
181
|
+
readonly disabled: "已停用 {id}";
|
|
182
|
+
readonly onceSkipped: "once 记账读取失败(见日志),本次运行不会触发;可用{manualRun}手动执行";
|
|
183
|
+
readonly onceSkippedPersisted: "once 记账读取失败(见日志),本次运行不会触发;可用{manualRun}手动执行,修复运行历史文件后重启恢复";
|
|
184
|
+
readonly runNow: "「立即运行」";
|
|
185
|
+
readonly blockedEventTrigger: "event 触发器订阅的 {event} 负载带会话内容(会话 id、平台、正文等),不能当触发源";
|
|
186
|
+
readonly badRunAt: "once 触发器的 runAt 不是能解析的时间:{runAt}";
|
|
187
|
+
readonly definedBy: "定义者";
|
|
188
|
+
readonly anonymous: "匿名";
|
|
189
|
+
}>;
|
|
190
|
+
export {};
|
|
191
|
+
//# sourceMappingURL=texts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"texts.d.ts","sourceRoot":"","sources":["../src/texts.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgGF,CAAC;AACX,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC;AAEnC,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoG,CAAC"}
|
package/dist/texts.js
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// 本插件自己的原文字典:显示名(同为工作流页标题与工具分组名)与分组概述、配置项与配置报错,工作流页的文字、触发一列、动作
|
|
2
|
+
// 回执与报错(删不掉定义文件的报错与 workflow_remove 共用,工具取原文),运行的错误原因(节点失败与各节点自己的原因)、定义
|
|
3
|
+
// 校验不过的原因与新定义要写的文件被另一条定义占用的报错(与 workflow_define 共用,工具取原文)、运行的状态、「立即运行」没有
|
|
4
|
+
// 成功的报错,保存与启停的回执和 once 记账读不出时的附注(附注与 workflow_define 共用,工具取原文),定义的 event 触发器订阅
|
|
5
|
+
// 不可作触发源的事件时的报错,定义表的定义者一列,运行表的「取消运行」、它的确认与回执,以及进程退出时中断的运行的错误原因
|
|
6
|
+
import { defineTexts } from '@aalis/schema-i18n';
|
|
7
|
+
import en from './locales/en.js';
|
|
8
|
+
const SOURCE = {
|
|
9
|
+
displayName: '工作流',
|
|
10
|
+
groupSummary: '定义、运行、查询自主工作流(DAG)',
|
|
11
|
+
defsDirLabel: '工作流定义目录',
|
|
12
|
+
defsDirDescription: '加载存储下的 *.yaml 定义(storage URI);AI 通过 workflow_define 创建的定义也写入此处。',
|
|
13
|
+
runsFileLabel: '运行历史文件',
|
|
14
|
+
runsFileDescription: '保存最近 N 条运行实例(storage URI)。',
|
|
15
|
+
maxRunsLabel: '保留最近运行条数',
|
|
16
|
+
maxRunsDescription: '超过则裁剪最旧的已结束的运行,在跑的不裁;最小 10。',
|
|
17
|
+
enableToolsLabel: '注册 AI 工具',
|
|
18
|
+
enableToolsDescription: '开启后向 LLM 暴露 workflow_define / workflow_run 等工具。',
|
|
19
|
+
badUri: '{key}="{value}" 不是 storage URI,请写成 <根名>:/<路径>(如 {fallback}),或删掉该键使用默认值',
|
|
20
|
+
everySeconds: '每 {seconds}s',
|
|
21
|
+
onceAt: '一次性@{at}',
|
|
22
|
+
manual: '手动',
|
|
23
|
+
workflowMissing: '工作流 {id} 不存在',
|
|
24
|
+
runMissing: 'workflow "{id}" 不存在',
|
|
25
|
+
runDisabled: 'workflow "{id}" 已禁用',
|
|
26
|
+
runWorkflow: '立即运行',
|
|
27
|
+
ran: '已运行 {id},用时 {duration}',
|
|
28
|
+
elapsed: '{ms, duration}',
|
|
29
|
+
enableAction: '启用',
|
|
30
|
+
disableAction: '停用',
|
|
31
|
+
delete: '删除',
|
|
32
|
+
deleteConfirm: '删除这个工作流,连同磁盘上的定义文件?',
|
|
33
|
+
deleted: '已删除 {id}',
|
|
34
|
+
deleteFileFailed: '删除 workflow 文件 {file} 失败:{error}',
|
|
35
|
+
defineWorkflow: '新建或覆盖',
|
|
36
|
+
yamlLabel: 'YAML 定义',
|
|
37
|
+
yamlDescription: "完整的定义:id、name、trigger、nodes。trigger 支持 cron、interval、once、event、manual;节点支持 tool、send-message、wait、agent(派发指令给 agent 并等回复,配合 deps 与 '{{outputs.X}}' 做多智能体编排)。同 id 的定义被覆盖,保存后立即注册触发器。现有定义的 YAML 在定义表格的详情里,可以照着改。",
|
|
38
|
+
persistLabel: '写入磁盘',
|
|
39
|
+
persistDescription: '关闭后只在内存里注册,重启后丢失',
|
|
40
|
+
yamlFailed: 'YAML 解析失败:{error}',
|
|
41
|
+
badDefinition: '定义不合法:缺少 trigger 或 nodes',
|
|
42
|
+
badId: '工作流 id 只能用字母、数字、下划线与连字符(它是定义文件的文件名):{id}',
|
|
43
|
+
fileTaken: '定义文件 {file} 已被工作流 {other} 占用,请给工作流 {id} 换一个 id(文件系统不分大小写或字形时,看着不同的 id 也会落到同一个文件)',
|
|
44
|
+
definitions: '定义',
|
|
45
|
+
stateEnabled: '启用',
|
|
46
|
+
stateDisabled: '停用',
|
|
47
|
+
runs24h: '24 小时运行',
|
|
48
|
+
failures24h: '24 小时失败',
|
|
49
|
+
noWorkflows: '还没有工作流',
|
|
50
|
+
name: '名称',
|
|
51
|
+
trigger: '触发',
|
|
52
|
+
nodeCount: '节点数',
|
|
53
|
+
status: '状态',
|
|
54
|
+
description: '描述',
|
|
55
|
+
recentRuns: '最近运行',
|
|
56
|
+
noRuns: '还没有运行过',
|
|
57
|
+
workflowColumn: '工作流',
|
|
58
|
+
triggerSource: '触发来源',
|
|
59
|
+
startedAt: '开始时间',
|
|
60
|
+
duration: '用时',
|
|
61
|
+
error: '错误',
|
|
62
|
+
runId: '运行 ID',
|
|
63
|
+
cancelled: '运行已取消',
|
|
64
|
+
missingField: '节点 "{id}"({type}) 缺少 {field} 字段',
|
|
65
|
+
missingSeconds: '节点 "{id}"(wait) 缺少数值字段 seconds',
|
|
66
|
+
secondsTooLong: '节点 "{id}"({type}) 的 {field} 不能超过 {max, number} 秒(约 24.8 天):{value}',
|
|
67
|
+
unknownNodeType: '节点 "{id}" 类型未知:{type}',
|
|
68
|
+
duplicateNodeId: '节点 id 重复',
|
|
69
|
+
unknownDep: '节点 "{id}" 引用未知 dep "{dep}"',
|
|
70
|
+
selfDep: '节点 "{id}" 自引用',
|
|
71
|
+
dependencyCycle: '节点存在依赖环',
|
|
72
|
+
noTools: "'tools' 服务不可用",
|
|
73
|
+
agentCallerSession: 'agent 节点指向调起这次运行的会话,那一轮在等这次运行,节点开不了轮(会话={session})',
|
|
74
|
+
agentNoGateway: "'gateway' 服务不可用,agent 节点的指令送不到(会话={session})",
|
|
75
|
+
agentNotCompleted: 'agent 节点未正常完成(outcome={outcome},会话={session})',
|
|
76
|
+
agentTimeout: 'agent 节点超时({seconds}s 内未收到 agent:turn:after,会话={session})',
|
|
77
|
+
agentNoTurn: 'agent 节点的指令没开轮:在网关相位被挡下或被放掉(会话={session})',
|
|
78
|
+
nodeFailed: '节点 "{id}" 失败:{error}',
|
|
79
|
+
statusPending: '等待',
|
|
80
|
+
statusRunning: '运行中',
|
|
81
|
+
statusSuccess: '成功',
|
|
82
|
+
statusFailed: '失败',
|
|
83
|
+
statusCancelled: '已取消',
|
|
84
|
+
runNotSucceeded: '运行没有成功({status})',
|
|
85
|
+
runNotSucceededBecause: '运行没有成功({status}):{error}',
|
|
86
|
+
cancelRun: '取消运行',
|
|
87
|
+
cancelRunConfirm: '取消这次运行?已做完的节点不撤回,agent 节点已派发的那一轮照常跑完;记录留在运行历史里。',
|
|
88
|
+
runCancelled: '已取消 {id}',
|
|
89
|
+
runEnded: '这次运行已经结束',
|
|
90
|
+
interruptedByExit: '进程退出时中断',
|
|
91
|
+
saved: '已保存工作流 {id}',
|
|
92
|
+
enabled: '已启用 {id}',
|
|
93
|
+
disabled: '已停用 {id}',
|
|
94
|
+
onceSkipped: 'once 记账读取失败(见日志),本次运行不会触发;可用{manualRun}手动执行',
|
|
95
|
+
onceSkippedPersisted: 'once 记账读取失败(见日志),本次运行不会触发;可用{manualRun}手动执行,修复运行历史文件后重启恢复',
|
|
96
|
+
runNow: '「立即运行」',
|
|
97
|
+
blockedEventTrigger: 'event 触发器订阅的 {event} 负载带会话内容(会话 id、平台、正文等),不能当触发源',
|
|
98
|
+
badRunAt: 'once 触发器的 runAt 不是能解析的时间:{runAt}',
|
|
99
|
+
definedBy: '定义者',
|
|
100
|
+
anonymous: '匿名',
|
|
101
|
+
};
|
|
102
|
+
export const t = defineTexts({ ns: '@aalis/plugin-workflow', language: 'zh-CN', source: SOURCE, locales: { en } });
|
|
103
|
+
//# sourceMappingURL=texts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"texts.js","sourceRoot":"","sources":["../src/texts.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,yEAAyE;AACzE,+EAA+E;AAC/E,+DAA+D;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEjC,MAAM,MAAM,GAAG;IACb,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,oBAAoB;IAClC,YAAY,EAAE,SAAS;IACvB,kBAAkB,EAAE,iEAAiE;IACrF,aAAa,EAAE,QAAQ;IACvB,mBAAmB,EAAE,4BAA4B;IACjD,YAAY,EAAE,UAAU;IACxB,kBAAkB,EAAE,6BAA6B;IACjD,gBAAgB,EAAE,UAAU;IAC5B,sBAAsB,EAAE,iDAAiD;IACzE,MAAM,EAAE,wEAAwE;IAChF,YAAY,EAAE,cAAc;IAC5B,MAAM,EAAE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;IACxB,eAAe,EAAE,SAAS;IAC1B,OAAO,EAAE,eAAe;IACxB,kBAAkB,EAAE,oDAAoD;IACxE,cAAc,EAAE,8CAA8C;IAC9D,iBAAiB,EAAE,+CAA+C;IAClE,YAAY,EAAE,2DAA2D;IACzE,WAAW,EAAE,2CAA2C;IACxD,UAAU,EAAE,sBAAsB;IAClC,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,KAAK;IACpB,aAAa,EAAE,IAAI;IACnB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,KAAK;IACtB,eAAe,EAAE,kBAAkB;IACnC,sBAAsB,EAAE,0BAA0B;IAClD,SAAS,EAAE,MAAM;IACjB,gBAAgB,EAAE,iDAAiD;IACnE,YAAY,EAAE,UAAU;IACxB,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,SAAS;IAC5B,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,6CAA6C;IAC1D,oBAAoB,EAClB,2DAA2D;IAC7D,MAAM,EAAE,QAAQ;IAChB,mBAAmB,EAAE,mDAAmD;IACxE,QAAQ,EAAE,kCAAkC;IAC5C,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,IAAI;CACP,CAAC;AAGX,MAAM,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,EAAE,EAAE,EAAE,wBAAwB,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC"}
|
package/dist/triggers.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CronEngine } from '@aalis/api-cron-engine';
|
|
2
2
|
import type { WorkflowDef } from '@aalis/api-workflow';
|
|
3
3
|
import type { Events, Logger, ServiceSelection } from '@aalis/core';
|
|
4
|
+
export declare const BLOCKED_EVENT_TRIGGERS: ReadonlySet<string>;
|
|
4
5
|
type FireFn = (workflowId: string, source: string, payload?: Record<string, unknown>) => void;
|
|
5
6
|
/**
|
|
6
7
|
* once 触发记账(由 RunStore 实现,落在运行历史同一份持久化里)。
|
package/dist/triggers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../src/triggers.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../src/triggers.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAMpE,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAyCrD,CAAC;AAOH,KAAK,MAAM,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;AAE9F;;;;;;GAMG;AACH,UAAU,UAAU;IAClB,kBAAkB,IAAI,OAAO,CAAC;IAC9B,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACpD,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACzC;AAED,mEAAmE;AACnE,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM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