opencode-supertask 0.2.0 → 0.3.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/CHANGELOG.md +28 -0
- package/README.md +10 -1
- package/README.zh-CN.md +10 -1
- package/dist/cli/{chunk-5VKFECHP.js → chunk-764OMIPC.js} +2 -2
- package/dist/cli/{chunk-J34FWHQU.js → chunk-ETLJ4YXW.js} +3 -2
- package/dist/cli/chunk-ETLJ4YXW.js.map +1 -0
- package/dist/cli/{chunk-AZM76ISG.js → chunk-INW2NH3O.js} +6 -5
- package/dist/cli/chunk-INW2NH3O.js.map +1 -0
- package/dist/cli/{chunk-CMEP6IB4.js → chunk-K6UTYKN5.js} +19 -5
- package/dist/cli/{chunk-CMEP6IB4.js.map → chunk-K6UTYKN5.js.map} +1 -1
- package/dist/cli/{chunk-DF56RPNL.js → chunk-MZLIVCEU.js} +10 -2
- package/dist/cli/{chunk-DF56RPNL.js.map → chunk-MZLIVCEU.js.map} +1 -1
- package/dist/cli/{chunk-DIJEKFBV.js → chunk-USBQGFQZ.js} +3 -3
- package/dist/cli/{chunk-EQWICVCJ.js → chunk-XUCZLWCB.js} +48 -6
- package/dist/cli/chunk-XUCZLWCB.js.map +1 -0
- package/dist/cli/{chunk-YGELD2E5.js → chunk-ZIR7RA5B.js} +7 -4
- package/dist/cli/{chunk-YGELD2E5.js.map → chunk-ZIR7RA5B.js.map} +1 -1
- package/dist/cli/{database-maintenance.service-F3IZU52F.js → database-maintenance.service-VZCH7ZEV.js} +4 -4
- package/dist/cli/{db-H7GIFWS2.js → db-KWSXP22E.js} +2 -2
- package/dist/cli/{doctor-smoke-QXHF7UNN.js → doctor-smoke-ZKWNHC3O.js} +5 -5
- package/dist/cli/{gateway-HNMX5ZTO.js → gateway-HUXVEDMU.js} +183 -14
- package/dist/cli/gateway-HUXVEDMU.js.map +1 -0
- package/dist/cli/{gateway-wake-U4HTV56Q.js → gateway-wake-M5EXAIGD.js} +2 -2
- package/dist/cli/index.js +32 -32
- package/dist/cli/{job-templates-RPQJ4XXW.js → job-templates-FH7SGS34.js} +5 -5
- package/dist/cli/{logs-QD2N62KK.js → logs-XNLR23TK.js} +5 -5
- package/dist/cli/{task-run.service-QMDINJKG.js → task-run.service-HCMHWOGW.js} +3 -3
- package/dist/cli/task-template.service-VA4WBJA4.js +12 -0
- package/dist/cli/{task.service-ZVDJ6VSQ.js → task.service-RB6RKV7T.js} +3 -3
- package/dist/cli/{web-2S7DW7XA.js → web-TQO6JLBN.js} +1262 -693
- package/dist/cli/web-TQO6JLBN.js.map +1 -0
- package/dist/gateway/index.js +1617 -786
- package/dist/gateway/index.js.map +1 -1
- package/dist/plugin/supertask.js +64 -10
- package/dist/plugin/supertask.js.map +1 -1
- package/dist/web/index.js +1321 -694
- package/dist/web/index.js.map +1 -1
- package/dist/worker/index.js +221 -13
- package/dist/worker/index.js.map +1 -1
- package/drizzle/0010_task_metadata.sql +2 -0
- package/drizzle/meta/0010_snapshot.json +695 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/dist/cli/chunk-AZM76ISG.js.map +0 -1
- package/dist/cli/chunk-EQWICVCJ.js.map +0 -1
- package/dist/cli/chunk-J34FWHQU.js.map +0 -1
- package/dist/cli/gateway-HNMX5ZTO.js.map +0 -1
- package/dist/cli/task-template.service-SZBKGLCB.js +0 -12
- package/dist/cli/web-2S7DW7XA.js.map +0 -1
- /package/dist/cli/{chunk-5VKFECHP.js.map → chunk-764OMIPC.js.map} +0 -0
- /package/dist/cli/{chunk-DIJEKFBV.js.map → chunk-USBQGFQZ.js.map} +0 -0
- /package/dist/cli/{database-maintenance.service-F3IZU52F.js.map → database-maintenance.service-VZCH7ZEV.js.map} +0 -0
- /package/dist/cli/{db-H7GIFWS2.js.map → db-KWSXP22E.js.map} +0 -0
- /package/dist/cli/{doctor-smoke-QXHF7UNN.js.map → doctor-smoke-ZKWNHC3O.js.map} +0 -0
- /package/dist/cli/{gateway-wake-U4HTV56Q.js.map → gateway-wake-M5EXAIGD.js.map} +0 -0
- /package/dist/cli/{job-templates-RPQJ4XXW.js.map → job-templates-FH7SGS34.js.map} +0 -0
- /package/dist/cli/{logs-QD2N62KK.js.map → logs-XNLR23TK.js.map} +0 -0
- /package/dist/cli/{task-run.service-QMDINJKG.js.map → task-run.service-HCMHWOGW.js.map} +0 -0
- /package/dist/cli/{task-template.service-SZBKGLCB.js.map → task-template.service-VA4WBJA4.js.map} +0 -0
- /package/dist/cli/{task.service-ZVDJ6VSQ.js.map → task.service-RB6RKV7T.js.map} +0 -0
package/dist/gateway/index.js
CHANGED
|
@@ -6068,7 +6068,9 @@ var init_schema = __esm({
|
|
|
6068
6068
|
retryAfter: integer("retry_after"),
|
|
6069
6069
|
timeoutMs: integer("timeout_ms"),
|
|
6070
6070
|
templateId: integer("template_id"),
|
|
6071
|
-
scheduledAt: integer("scheduled_at")
|
|
6071
|
+
scheduledAt: integer("scheduled_at"),
|
|
6072
|
+
// 调用方不透明元数据(JSON 对象字符串,供上层平台存储归属/应用标识等)
|
|
6073
|
+
metadata: text("metadata")
|
|
6072
6074
|
}, (table) => [
|
|
6073
6075
|
index("tasks_queue_idx").on(table.status, table.retryAfter, table.urgency, table.importance, table.createdAt, table.id),
|
|
6074
6076
|
index("tasks_batch_status_idx").on(table.batchId, table.status),
|
|
@@ -6148,7 +6150,8 @@ var init_schema = __esm({
|
|
|
6148
6150
|
nextRunAt: integer("next_run_at"),
|
|
6149
6151
|
enabled: integer("enabled", { mode: "boolean" }).default(true),
|
|
6150
6152
|
createdAt: integer("created_at").default(0),
|
|
6151
|
-
updatedAt: integer("updated_at").default(0)
|
|
6153
|
+
updatedAt: integer("updated_at").default(0),
|
|
6154
|
+
metadata: text("metadata")
|
|
6152
6155
|
}, (table) => [
|
|
6153
6156
|
index("task_templates_due_idx").on(table.enabled, table.nextRunAt, table.id),
|
|
6154
6157
|
index("task_templates_retention_idx").on(
|
|
@@ -6314,7 +6317,7 @@ var init_db2 = __esm({
|
|
|
6314
6317
|
init_schema();
|
|
6315
6318
|
DEFAULT_DB_PATH = join(homedir(), ".local/share/opencode/tasks.db");
|
|
6316
6319
|
DB_FILE_PATH = process.env.SUPERTASK_DB_PATH || DEFAULT_DB_PATH;
|
|
6317
|
-
EXPECTED_SCHEMA_USER_VERSION =
|
|
6320
|
+
EXPECTED_SCHEMA_USER_VERSION = 11;
|
|
6318
6321
|
_sqlite = null;
|
|
6319
6322
|
_db = null;
|
|
6320
6323
|
_migrationRan = false;
|
|
@@ -6554,6 +6557,47 @@ var init_model_variant = __esm({
|
|
|
6554
6557
|
}
|
|
6555
6558
|
});
|
|
6556
6559
|
|
|
6560
|
+
// src/core/metadata.ts
|
|
6561
|
+
function normalizeTaskMetadata(input) {
|
|
6562
|
+
if (input === void 0) return void 0;
|
|
6563
|
+
if (input === null || input === "") return null;
|
|
6564
|
+
let parsed = input;
|
|
6565
|
+
if (typeof input === "string") {
|
|
6566
|
+
const trimmed = input.trim();
|
|
6567
|
+
if (!trimmed) return null;
|
|
6568
|
+
try {
|
|
6569
|
+
parsed = JSON.parse(trimmed);
|
|
6570
|
+
} catch {
|
|
6571
|
+
throw new Error("metadata \u5FC5\u987B\u662F\u5408\u6CD5\u7684 JSON \u5BF9\u8C61");
|
|
6572
|
+
}
|
|
6573
|
+
}
|
|
6574
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
6575
|
+
throw new Error("metadata \u5FC5\u987B\u662F JSON \u5BF9\u8C61");
|
|
6576
|
+
}
|
|
6577
|
+
const serialized = JSON.stringify(parsed);
|
|
6578
|
+
if (Buffer.byteLength(serialized, "utf8") > MAX_METADATA_BYTES) {
|
|
6579
|
+
throw new Error(`metadata \u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7 ${MAX_METADATA_BYTES} \u5B57\u8282`);
|
|
6580
|
+
}
|
|
6581
|
+
return serialized;
|
|
6582
|
+
}
|
|
6583
|
+
function parseTaskMetadata(raw2) {
|
|
6584
|
+
if (!raw2 || typeof raw2 !== "string") return null;
|
|
6585
|
+
try {
|
|
6586
|
+
const parsed = JSON.parse(raw2);
|
|
6587
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return null;
|
|
6588
|
+
return parsed;
|
|
6589
|
+
} catch {
|
|
6590
|
+
return null;
|
|
6591
|
+
}
|
|
6592
|
+
}
|
|
6593
|
+
var MAX_METADATA_BYTES;
|
|
6594
|
+
var init_metadata = __esm({
|
|
6595
|
+
"src/core/metadata.ts"() {
|
|
6596
|
+
"use strict";
|
|
6597
|
+
MAX_METADATA_BYTES = 16 * 1024;
|
|
6598
|
+
}
|
|
6599
|
+
});
|
|
6600
|
+
|
|
6557
6601
|
// src/core/services/task.service.ts
|
|
6558
6602
|
function validateIntegerField(name, value, min, max) {
|
|
6559
6603
|
if (value === void 0 || value === null) return;
|
|
@@ -6836,6 +6880,7 @@ var init_task_service = __esm({
|
|
|
6836
6880
|
init_task_working_directory();
|
|
6837
6881
|
init_task_batch();
|
|
6838
6882
|
init_model_variant();
|
|
6883
|
+
init_metadata();
|
|
6839
6884
|
({ tasks: tasks2, taskRuns: taskRuns2 } = schema_exports);
|
|
6840
6885
|
cleanupInvocation = 0;
|
|
6841
6886
|
TaskDeletionConflictError = class extends Error {
|
|
@@ -7035,7 +7080,8 @@ var init_task_service = __esm({
|
|
|
7035
7080
|
const normalizedData = {
|
|
7036
7081
|
...data,
|
|
7037
7082
|
batchId: normalizeTaskBatchId(data.batchId),
|
|
7038
|
-
variant: normalizeModelVariant(data.variant)
|
|
7083
|
+
variant: normalizeModelVariant(data.variant),
|
|
7084
|
+
metadata: normalizeTaskMetadata(data.metadata) ?? null
|
|
7039
7085
|
};
|
|
7040
7086
|
this.validateNewTask(normalizedData);
|
|
7041
7087
|
return db.transaction((tx) => {
|
|
@@ -7078,7 +7124,8 @@ var init_task_service = __esm({
|
|
|
7078
7124
|
dependsOn: overrides.dependsOn === void 0 ? null : overrides.dependsOn,
|
|
7079
7125
|
maxRetries: overrides.maxRetries ?? original.maxRetries ?? 3,
|
|
7080
7126
|
retryBackoffMs: overrides.retryBackoffMs ?? original.retryBackoffMs ?? 3e4,
|
|
7081
|
-
timeoutMs: overrides.timeoutMs === void 0 ? original.timeoutMs : overrides.timeoutMs
|
|
7127
|
+
timeoutMs: overrides.timeoutMs === void 0 ? original.timeoutMs : overrides.timeoutMs,
|
|
7128
|
+
metadata: overrides.metadata === void 0 ? original.metadata : overrides.metadata
|
|
7082
7129
|
});
|
|
7083
7130
|
}
|
|
7084
7131
|
static async update(id, data, scope = {}) {
|
|
@@ -7086,7 +7133,8 @@ var init_task_service = __esm({
|
|
|
7086
7133
|
const normalizedData = {
|
|
7087
7134
|
...data,
|
|
7088
7135
|
...data.batchId === void 0 ? {} : { batchId: normalizeTaskBatchId(data.batchId) ?? null },
|
|
7089
|
-
...data.variant === void 0 ? {} : { variant: normalizeModelVariant(data.variant) ?? null }
|
|
7136
|
+
...data.variant === void 0 ? {} : { variant: normalizeModelVariant(data.variant) ?? null },
|
|
7137
|
+
...data.metadata === void 0 ? {} : { metadata: normalizeTaskMetadata(data.metadata) ?? null }
|
|
7090
7138
|
};
|
|
7091
7139
|
return db.transaction((tx) => {
|
|
7092
7140
|
const task = tx.select().from(tasks2).where(and(
|
|
@@ -7679,7 +7727,8 @@ var init_task_service = __esm({
|
|
|
7679
7727
|
retryAfter: tasks2.retryAfter,
|
|
7680
7728
|
timeoutMs: tasks2.timeoutMs,
|
|
7681
7729
|
templateId: tasks2.templateId,
|
|
7682
|
-
scheduledAt: tasks2.scheduledAt
|
|
7730
|
+
scheduledAt: tasks2.scheduledAt,
|
|
7731
|
+
metadata: tasks2.metadata
|
|
7683
7732
|
}).from(tasks2) : db.select().from(tasks2)).$dynamic();
|
|
7684
7733
|
if (conditions.length > 0) {
|
|
7685
7734
|
query = query.where(and(...conditions));
|
|
@@ -7719,6 +7768,7 @@ var init_task_service = __esm({
|
|
|
7719
7768
|
timeoutMs: tasks2.timeoutMs,
|
|
7720
7769
|
templateId: tasks2.templateId,
|
|
7721
7770
|
scheduledAt: tasks2.scheduledAt,
|
|
7771
|
+
metadata: tasks2.metadata,
|
|
7722
7772
|
hasResultLog: sql`CASE WHEN ${tasks2.resultLog} IS NOT NULL AND length(${tasks2.resultLog}) > 0 THEN 1 ELSE 0 END`,
|
|
7723
7773
|
resultLogPreview: sql`CASE WHEN ${tasks2.resultLog} IS NULL THEN NULL WHEN ${tasks2.status} IN ('failed', 'dead_letter') THEN substr(${tasks2.resultLog}, -512) ELSE substr(${tasks2.resultLog}, 1, 512) END`
|
|
7724
7774
|
}).from(tasks2).$dynamic();
|
|
@@ -9029,6 +9079,7 @@ function getGatewayHealth(now = Date.now()) {
|
|
|
9029
9079
|
pid: process.pid,
|
|
9030
9080
|
dbPath: DB_FILE_PATH,
|
|
9031
9081
|
uptimeMs: state ? Math.max(0, now - state.startedAt) : 0,
|
|
9082
|
+
maxConcurrency: state?.config.workerMaxConcurrency ?? 0,
|
|
9032
9083
|
lock,
|
|
9033
9084
|
components: { worker, scheduler, watchdog, watchdogCleanup }
|
|
9034
9085
|
};
|
|
@@ -18586,6 +18637,7 @@ var init_task_template_service = __esm({
|
|
|
18586
18637
|
init_cron_parser();
|
|
18587
18638
|
init_task_batch();
|
|
18588
18639
|
init_model_variant();
|
|
18640
|
+
init_metadata();
|
|
18589
18641
|
init_task_service();
|
|
18590
18642
|
({ taskTemplates: taskTemplates2 } = schema_exports);
|
|
18591
18643
|
TaskTemplateService = class {
|
|
@@ -18593,7 +18645,8 @@ var init_task_template_service = __esm({
|
|
|
18593
18645
|
const normalizedData = {
|
|
18594
18646
|
...data,
|
|
18595
18647
|
batchId: normalizeTaskBatchId(data.batchId),
|
|
18596
|
-
variant: normalizeModelVariant(data.variant)
|
|
18648
|
+
variant: normalizeModelVariant(data.variant),
|
|
18649
|
+
metadata: normalizeTaskMetadata(data.metadata) ?? null
|
|
18597
18650
|
};
|
|
18598
18651
|
this.validate(normalizedData);
|
|
18599
18652
|
const now = Date.now();
|
|
@@ -18629,6 +18682,17 @@ var init_task_template_service = __esm({
|
|
|
18629
18682
|
static async list(limit = 50, offset = 0) {
|
|
18630
18683
|
return await db.select().from(taskTemplates2).orderBy(desc(taskTemplates2.createdAt), desc(taskTemplates2.id)).limit(limit).offset(offset);
|
|
18631
18684
|
}
|
|
18685
|
+
static async listFiltered(options = {}) {
|
|
18686
|
+
const conditions = [];
|
|
18687
|
+
if (options.cwd) conditions.push(eq(taskTemplates2.cwd, options.cwd));
|
|
18688
|
+
if (options.enabled !== void 0) conditions.push(eq(taskTemplates2.enabled, options.enabled));
|
|
18689
|
+
let query = db.select().from(taskTemplates2).$dynamic();
|
|
18690
|
+
if (conditions.length > 0) query = query.where(and(...conditions));
|
|
18691
|
+
query = query.orderBy(desc(taskTemplates2.enabled), desc(taskTemplates2.id));
|
|
18692
|
+
if (options.limit) query = query.limit(options.limit);
|
|
18693
|
+
if (options.offset) query = query.offset(options.offset);
|
|
18694
|
+
return await query;
|
|
18695
|
+
}
|
|
18632
18696
|
static async stats() {
|
|
18633
18697
|
const result = await db.select({
|
|
18634
18698
|
total: sql`count(*)`,
|
|
@@ -18646,7 +18710,8 @@ var init_task_template_service = __esm({
|
|
|
18646
18710
|
const normalizedData = {
|
|
18647
18711
|
...data,
|
|
18648
18712
|
batchId: normalizeTaskBatchId(data.batchId) ?? null,
|
|
18649
|
-
...data.variant === void 0 ? {} : { variant: normalizeModelVariant(data.variant) ?? null }
|
|
18713
|
+
...data.variant === void 0 ? {} : { variant: normalizeModelVariant(data.variant) ?? null },
|
|
18714
|
+
...data.metadata === void 0 ? {} : { metadata: normalizeTaskMetadata(data.metadata) ?? null }
|
|
18650
18715
|
};
|
|
18651
18716
|
this.validate(normalizedData);
|
|
18652
18717
|
const now = Date.now();
|
|
@@ -18820,7 +18885,8 @@ function createTaskFromTemplate(templateId, options) {
|
|
|
18820
18885
|
retryBackoffMs: tmpl.retryBackoffMs ?? 3e4,
|
|
18821
18886
|
timeoutMs: tmpl.timeoutMs,
|
|
18822
18887
|
templateId: tmpl.id,
|
|
18823
|
-
scheduledAt: options.advanceSchedule ? tmpl.nextRunAt ?? nowMs : nowMs
|
|
18888
|
+
scheduledAt: options.advanceSchedule ? tmpl.nextRunAt ?? nowMs : nowMs,
|
|
18889
|
+
metadata: tmpl.metadata ?? null
|
|
18824
18890
|
}).returning().get();
|
|
18825
18891
|
if (options.advanceSchedule) {
|
|
18826
18892
|
tx.update(taskTemplates3).set({
|
|
@@ -22182,36 +22248,28 @@ code, pre, .mono, .m {
|
|
|
22182
22248
|
align-items: center;
|
|
22183
22249
|
gap: 6px;
|
|
22184
22250
|
}
|
|
22185
|
-
.
|
|
22186
|
-
display: inline-flex;
|
|
22187
|
-
padding: 2px;
|
|
22188
|
-
border: 1px solid var(--border);
|
|
22189
|
-
border-radius: var(--radius-sm);
|
|
22190
|
-
background: var(--surface);
|
|
22191
|
-
}
|
|
22192
|
-
.lang-switch button {
|
|
22193
|
-
height: 24px; min-width: 28px; padding: 0 6px;
|
|
22194
|
-
border: 0; border-radius: 5px; background: transparent;
|
|
22195
|
-
color: var(--text-3); font-size: 11px; font-weight: 650; cursor: pointer;
|
|
22196
|
-
}
|
|
22197
|
-
.lang-switch button.active { background: var(--surface-3); color: var(--text); }
|
|
22198
|
-
.theme-select-wrap {
|
|
22251
|
+
.sidebar-select-wrap {
|
|
22199
22252
|
position: relative;
|
|
22200
22253
|
flex: 1;
|
|
22201
22254
|
min-width: 0;
|
|
22202
22255
|
display: flex;
|
|
22203
22256
|
align-items: center;
|
|
22204
22257
|
}
|
|
22205
|
-
.
|
|
22258
|
+
.sidebar-select-wrap .icon {
|
|
22206
22259
|
position: absolute; left: 8px; width: 13px; height: 13px;
|
|
22207
22260
|
color: var(--text-3); pointer-events: none;
|
|
22208
22261
|
}
|
|
22209
|
-
.
|
|
22262
|
+
.sidebar-select-wrap select {
|
|
22210
22263
|
width: 100%; height: 28px;
|
|
22211
|
-
padding: 0
|
|
22264
|
+
padding: 0 18px 0 25px;
|
|
22212
22265
|
border: 1px solid var(--border); border-radius: var(--radius-sm);
|
|
22213
22266
|
background: var(--surface); color: var(--text-2);
|
|
22214
22267
|
font-size: 11.5px; appearance: none; cursor: pointer;
|
|
22268
|
+
text-overflow: ellipsis;
|
|
22269
|
+
}
|
|
22270
|
+
.sidebar-select-wrap select:hover {
|
|
22271
|
+
border-color: var(--border-strong);
|
|
22272
|
+
color: var(--text);
|
|
22215
22273
|
}
|
|
22216
22274
|
|
|
22217
22275
|
/* Main area */
|
|
@@ -23014,781 +23072,1247 @@ dialog::backdrop { background: rgba(8, 12, 20, 0.56); backdrop-filter: blur(2px)
|
|
|
23014
23072
|
}
|
|
23015
23073
|
});
|
|
23016
23074
|
|
|
23017
|
-
// src/web/
|
|
23018
|
-
|
|
23019
|
-
|
|
23020
|
-
|
|
23021
|
-
}
|
|
23022
|
-
function statusText(locale, status) {
|
|
23023
|
-
const key = `status.${status}`;
|
|
23024
|
-
return key in ZH ? t(locale, key) : t(locale, "status.unknown");
|
|
23025
|
-
}
|
|
23026
|
-
function runStatusText(locale, status) {
|
|
23027
|
-
const key = `runStatus.${status}`;
|
|
23028
|
-
return key in ZH ? t(locale, key) : t(locale, "status.unknown");
|
|
23029
|
-
}
|
|
23030
|
-
function resolveEditedRunAt(originalEpoch, originalLocal, currentLocal) {
|
|
23031
|
-
if (originalEpoch !== null && originalLocal === currentLocal) return originalEpoch;
|
|
23032
|
-
return new Date(currentLocal).getTime();
|
|
23033
|
-
}
|
|
23034
|
-
function formatRelative(timestamp2, locale) {
|
|
23035
|
-
if (!timestamp2) return "\u2014";
|
|
23036
|
-
const deltaMs = timestamp2 - Date.now();
|
|
23037
|
-
const abs = Math.abs(deltaMs);
|
|
23038
|
-
const language = locale === "en" ? "en" : "zh-CN";
|
|
23039
|
-
const formatter = new Intl.RelativeTimeFormat(language, { numeric: "auto" });
|
|
23040
|
-
if (abs < 6e4) return formatter.format(Math.round(deltaMs / 1e3), "second");
|
|
23041
|
-
if (abs < 36e5) return formatter.format(Math.round(deltaMs / 6e4), "minute");
|
|
23042
|
-
if (abs < 864e5) return formatter.format(Math.round(deltaMs / 36e5), "hour");
|
|
23043
|
-
return formatter.format(Math.round(deltaMs / 864e5), "day");
|
|
23044
|
-
}
|
|
23045
|
-
function formatFuture(timestamp2, locale) {
|
|
23046
|
-
if (!timestamp2) return "\u2014";
|
|
23047
|
-
if (timestamp2 < Date.now()) return t(locale, "schedule.overdue");
|
|
23048
|
-
return formatRelative(timestamp2, locale);
|
|
23049
|
-
}
|
|
23050
|
-
function formatDateTime(value, locale) {
|
|
23051
|
-
if (!value) return "\u2014";
|
|
23052
|
-
const date = value instanceof Date ? value : new Date(value);
|
|
23053
|
-
return new Intl.DateTimeFormat(locale === "en" ? "en-US" : "zh-CN", {
|
|
23054
|
-
month: "short",
|
|
23055
|
-
day: "2-digit",
|
|
23056
|
-
hour: "2-digit",
|
|
23057
|
-
minute: "2-digit"
|
|
23058
|
-
}).format(date);
|
|
23059
|
-
}
|
|
23060
|
-
function formatInterval(milliseconds, locale) {
|
|
23061
|
-
const formatter = new Intl.NumberFormat(locale === "en" ? "en-US" : "zh-CN", {
|
|
23062
|
-
maximumFractionDigits: 1
|
|
23063
|
-
});
|
|
23064
|
-
if (milliseconds < 6e4) {
|
|
23065
|
-
return t(locale, "schedule.seconds", { count: formatter.format(milliseconds / 1e3) });
|
|
23066
|
-
}
|
|
23067
|
-
if (milliseconds < 36e5) {
|
|
23068
|
-
return t(locale, "schedule.minutes", { count: formatter.format(milliseconds / 6e4) });
|
|
23069
|
-
}
|
|
23070
|
-
if (milliseconds < 864e5) {
|
|
23071
|
-
return t(locale, "schedule.hours", { count: formatter.format(milliseconds / 36e5) });
|
|
23072
|
-
}
|
|
23073
|
-
return t(locale, "schedule.days", { count: formatter.format(milliseconds / 864e5) });
|
|
23074
|
-
}
|
|
23075
|
-
function formatDuration(startAt, endAt) {
|
|
23076
|
-
if (!startAt) return "\u2014";
|
|
23077
|
-
const start = new Date(startAt).getTime();
|
|
23078
|
-
const end = endAt ? new Date(endAt).getTime() : Date.now();
|
|
23079
|
-
const diffMs = end - start;
|
|
23080
|
-
if (diffMs < 1e3) return "<1s";
|
|
23081
|
-
const seconds = Math.floor(diffMs / 1e3);
|
|
23082
|
-
if (seconds < 60) return `${seconds}s`;
|
|
23083
|
-
if (seconds < 3600) return `${Math.floor(seconds / 60)}m ${seconds % 60}s`;
|
|
23084
|
-
return `${Math.floor(seconds / 3600)}h ${Math.floor(seconds % 3600 / 60)}m`;
|
|
23085
|
-
}
|
|
23086
|
-
function formatCountdown(targetMs, locale) {
|
|
23087
|
-
if (!targetMs) return null;
|
|
23088
|
-
const remaining = targetMs - Date.now();
|
|
23089
|
-
if (remaining <= 0) return null;
|
|
23090
|
-
return formatInterval(remaining, locale);
|
|
23091
|
-
}
|
|
23092
|
-
function clientMessages(locale) {
|
|
23093
|
-
return Object.fromEntries(
|
|
23094
|
-
Object.keys(ZH).map((key) => [key, t(locale, key)])
|
|
23095
|
-
);
|
|
23096
|
-
}
|
|
23097
|
-
function esc(value) {
|
|
23098
|
-
if (!value) return "";
|
|
23099
|
-
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
23100
|
-
}
|
|
23101
|
-
var ZH, EN;
|
|
23102
|
-
var init_i18n = __esm({
|
|
23103
|
-
"src/web/i18n.ts"() {
|
|
23075
|
+
// src/web/locales/en.ts
|
|
23076
|
+
var EN;
|
|
23077
|
+
var init_en = __esm({
|
|
23078
|
+
"src/web/locales/en.ts"() {
|
|
23104
23079
|
"use strict";
|
|
23105
|
-
|
|
23080
|
+
EN = {
|
|
23106
23081
|
"app.name": "SuperTask",
|
|
23107
|
-
"app.local": "
|
|
23108
|
-
"nav.tasks": "
|
|
23109
|
-
"nav.templates": "
|
|
23110
|
-
"nav.runs": "
|
|
23111
|
-
"nav.system": "
|
|
23112
|
-
"page.tasks.title": "
|
|
23113
|
-
"page.templates.title": "
|
|
23114
|
-
"page.runs.title": "
|
|
23115
|
-
"page.system.title": "
|
|
23116
|
-
"theme.label": "
|
|
23117
|
-
"theme.system": "
|
|
23118
|
-
"theme.light": "
|
|
23119
|
-
"theme.dark": "
|
|
23120
|
-
"language.label": "
|
|
23121
|
-
"action.refresh": "
|
|
23122
|
-
"action.createTask": "
|
|
23123
|
-
"action.createTemplate": "
|
|
23124
|
-
"action.saveTask": "
|
|
23125
|
-
"action.updateTask": "
|
|
23126
|
-
"action.saveTemplate": "
|
|
23127
|
-
"action.edit": "
|
|
23128
|
-
"action.clone": "
|
|
23129
|
-
"action.details": "
|
|
23130
|
-
"action.retry": "
|
|
23131
|
-
"action.cancel": "
|
|
23132
|
-
"action.delete": "
|
|
23133
|
-
"action.trigger": "
|
|
23134
|
-
"action.enable": "
|
|
23135
|
-
"action.disable": "
|
|
23136
|
-
"action.logs": "
|
|
23137
|
-
"action.hideLogs": "
|
|
23138
|
-
"action.save": "
|
|
23139
|
-
"action.saveAndRestart": "
|
|
23140
|
-
"action.clearDatabase": "
|
|
23141
|
-
"action.copy": "
|
|
23142
|
-
"action.copyCommand": "
|
|
23143
|
-
"action.continueSession": "
|
|
23144
|
-
"action.chooseFolder": "
|
|
23145
|
-
"action.home": "
|
|
23146
|
-
"action.up": "
|
|
23147
|
-
"action.showHidden": "
|
|
23148
|
-
"action.hideHidden": "
|
|
23149
|
-
"action.chooseThisFolder": "
|
|
23150
|
-
"action.close": "
|
|
23151
|
-
"action.confirm": "
|
|
23152
|
-
"action.clearSelection": "
|
|
23153
|
-
"action.viewTasks": "
|
|
23154
|
-
"action.more": "
|
|
23155
|
-
"action.selectAll": "
|
|
23156
|
-
"action.openMenu": "
|
|
23157
|
-
"filter.all": "
|
|
23158
|
-
"filter.searchTasks": "
|
|
23159
|
-
"filter.allAgents": "
|
|
23160
|
-
"filter.allBatches": "
|
|
23161
|
-
"filter.noResults": "
|
|
23162
|
-
"filter.templateScope": "
|
|
23163
|
-
"filter.clearFilter": "
|
|
23164
|
-
"projects.title": "
|
|
23165
|
-
"projects.all": "
|
|
23166
|
-
"projects.legacy": "
|
|
23167
|
-
"projects.counts": "
|
|
23082
|
+
"app.local": "Local",
|
|
23083
|
+
"nav.tasks": "Tasks",
|
|
23084
|
+
"nav.templates": "Schedules",
|
|
23085
|
+
"nav.runs": "Runs",
|
|
23086
|
+
"nav.system": "System",
|
|
23087
|
+
"page.tasks.title": "Task queue",
|
|
23088
|
+
"page.templates.title": "Scheduled tasks",
|
|
23089
|
+
"page.runs.title": "Execution runs",
|
|
23090
|
+
"page.system.title": "System",
|
|
23091
|
+
"theme.label": "Theme",
|
|
23092
|
+
"theme.system": "System",
|
|
23093
|
+
"theme.light": "Light",
|
|
23094
|
+
"theme.dark": "Dark",
|
|
23095
|
+
"language.label": "Language",
|
|
23096
|
+
"action.refresh": "Refresh",
|
|
23097
|
+
"action.createTask": "New task",
|
|
23098
|
+
"action.createTemplate": "New schedule",
|
|
23099
|
+
"action.saveTask": "Enqueue",
|
|
23100
|
+
"action.updateTask": "Save",
|
|
23101
|
+
"action.saveTemplate": "Save",
|
|
23102
|
+
"action.edit": "Edit",
|
|
23103
|
+
"action.clone": "Clone",
|
|
23104
|
+
"action.details": "Inspect",
|
|
23105
|
+
"action.retry": "Retry",
|
|
23106
|
+
"action.cancel": "Cancel",
|
|
23107
|
+
"action.delete": "Delete",
|
|
23108
|
+
"action.trigger": "Run now",
|
|
23109
|
+
"action.enable": "Enable",
|
|
23110
|
+
"action.disable": "Disable",
|
|
23111
|
+
"action.logs": "Logs",
|
|
23112
|
+
"action.hideLogs": "Hide",
|
|
23113
|
+
"action.save": "Save config",
|
|
23114
|
+
"action.saveAndRestart": "Save & restart",
|
|
23115
|
+
"action.clearDatabase": "Clear data",
|
|
23116
|
+
"action.copy": "Copy",
|
|
23117
|
+
"action.copyCommand": "Copy command",
|
|
23118
|
+
"action.continueSession": "Resume",
|
|
23119
|
+
"action.chooseFolder": "Browse",
|
|
23120
|
+
"action.home": "Home",
|
|
23121
|
+
"action.up": "Up",
|
|
23122
|
+
"action.showHidden": "Show hidden",
|
|
23123
|
+
"action.hideHidden": "Hide dotfiles",
|
|
23124
|
+
"action.chooseThisFolder": "Select folder",
|
|
23125
|
+
"action.close": "Close",
|
|
23126
|
+
"action.confirm": "Confirm",
|
|
23127
|
+
"action.clearSelection": "Clear",
|
|
23128
|
+
"action.viewTasks": "View tasks",
|
|
23129
|
+
"action.more": "More",
|
|
23130
|
+
"action.selectAll": "Select all",
|
|
23131
|
+
"action.openMenu": "Menu",
|
|
23132
|
+
"filter.all": "All",
|
|
23133
|
+
"filter.searchTasks": "Search tasks, batch, or #ID\u2026",
|
|
23134
|
+
"filter.allAgents": "All agents",
|
|
23135
|
+
"filter.allBatches": "All batches",
|
|
23136
|
+
"filter.noResults": "No matching tasks",
|
|
23137
|
+
"filter.templateScope": "Template #{id}",
|
|
23138
|
+
"filter.clearFilter": "Clear",
|
|
23139
|
+
"projects.title": "Projects",
|
|
23140
|
+
"projects.all": "All projects",
|
|
23141
|
+
"projects.legacy": "Ungrouped",
|
|
23142
|
+
"projects.counts": "{running} running \xB7 {pending} queued \xB7 {failed} issues",
|
|
23168
23143
|
"projects.successRate": "{rate}%",
|
|
23169
|
-
"
|
|
23170
|
-
"stats.
|
|
23171
|
-
"stats.
|
|
23172
|
-
"stats.
|
|
23173
|
-
"stats.
|
|
23174
|
-
"stats.
|
|
23175
|
-
"stats.
|
|
23176
|
-
"stats.
|
|
23177
|
-
"stats.
|
|
23178
|
-
"stats.
|
|
23179
|
-
"stats.
|
|
23180
|
-
"
|
|
23181
|
-
"table.
|
|
23182
|
-
"table.
|
|
23183
|
-
"table.
|
|
23184
|
-
"table.
|
|
23185
|
-
"table.
|
|
23186
|
-
"table.
|
|
23187
|
-
"table.
|
|
23188
|
-
"table.
|
|
23189
|
-
"table.
|
|
23190
|
-
"table.
|
|
23191
|
-
"table.
|
|
23192
|
-
"table.
|
|
23193
|
-
"table.
|
|
23194
|
-
"table.
|
|
23195
|
-
"table.
|
|
23196
|
-
"table.
|
|
23197
|
-
"table.
|
|
23198
|
-
"
|
|
23199
|
-
"
|
|
23200
|
-
"status.
|
|
23201
|
-
"status.
|
|
23202
|
-
"status.
|
|
23203
|
-
"status.
|
|
23204
|
-
"status.
|
|
23205
|
-
"status.
|
|
23206
|
-
"status.
|
|
23207
|
-
"status.
|
|
23208
|
-
"status.
|
|
23209
|
-
"
|
|
23210
|
-
"
|
|
23211
|
-
"runStatus.
|
|
23144
|
+
"projects.rate7d": "7d success rate",
|
|
23145
|
+
"stats.pending": "Queued",
|
|
23146
|
+
"stats.running": "Running",
|
|
23147
|
+
"stats.done": "Done",
|
|
23148
|
+
"stats.failedDead": "Issues",
|
|
23149
|
+
"stats.templates": "Total",
|
|
23150
|
+
"stats.enabled": "Enabled",
|
|
23151
|
+
"stats.disabled": "Disabled",
|
|
23152
|
+
"stats.records": "Total",
|
|
23153
|
+
"stats.pageDone": "Done",
|
|
23154
|
+
"stats.pageFailed": "Failed",
|
|
23155
|
+
"stats.pageRunning": "Running",
|
|
23156
|
+
"table.id": "ID",
|
|
23157
|
+
"table.task": "Task",
|
|
23158
|
+
"table.name": "Name",
|
|
23159
|
+
"table.agent": "Agent",
|
|
23160
|
+
"table.model": "Model",
|
|
23161
|
+
"table.status": "Status",
|
|
23162
|
+
"table.duration": "Duration",
|
|
23163
|
+
"table.retries": "Retries",
|
|
23164
|
+
"table.actions": "Actions",
|
|
23165
|
+
"table.type": "Type",
|
|
23166
|
+
"table.rule": "Rule",
|
|
23167
|
+
"table.lastRun": "Last run",
|
|
23168
|
+
"table.nextRun": "Next run",
|
|
23169
|
+
"table.run": "Run",
|
|
23170
|
+
"table.session": "Session",
|
|
23171
|
+
"table.heartbeat": "Heartbeat",
|
|
23172
|
+
"table.startedAt": "Started",
|
|
23173
|
+
"table.pid": "PID",
|
|
23174
|
+
"table.pidTooltip": "Worker \u203A Guardian",
|
|
23175
|
+
"status.pending": "Queued",
|
|
23176
|
+
"status.running": "Running",
|
|
23177
|
+
"status.done": "Done",
|
|
23178
|
+
"status.failed": "Retrying",
|
|
23179
|
+
"status.dead_letter": "Stopped",
|
|
23180
|
+
"status.cancelled": "Cancelled",
|
|
23181
|
+
"status.unknown": "Unknown",
|
|
23182
|
+
"status.executionStillActive": "Stopping",
|
|
23183
|
+
"status.waitingDep": "Wait #{id}",
|
|
23184
|
+
"status.batchBusy": "Batch busy",
|
|
23185
|
+
"status.retryIn": "Retry in {duration}",
|
|
23186
|
+
"runStatus.running": "Running",
|
|
23187
|
+
"runStatus.done": "Done",
|
|
23188
|
+
"runStatus.failed": "Failed",
|
|
23212
23189
|
"schedule.cron": "Cron",
|
|
23213
|
-
"schedule.recurring": "
|
|
23214
|
-
"schedule.delayed": "
|
|
23215
|
-
"schedule.unknown": "
|
|
23216
|
-
"schedule.enabled": "
|
|
23217
|
-
"schedule.disabled": "
|
|
23218
|
-
"schedule.overdue": "
|
|
23219
|
-
"schedule.seconds": "{count}
|
|
23220
|
-
"schedule.minutes": "{count}
|
|
23221
|
-
"schedule.hours": "{count}
|
|
23222
|
-
"schedule.days": "{count}
|
|
23223
|
-
"schedule.cronPreset.hourly": "
|
|
23224
|
-
"schedule.cronPreset.daily9": "
|
|
23225
|
-
"schedule.cronPreset.weekday9": "
|
|
23226
|
-
"schedule.cronPreset.weeklyMon": "
|
|
23227
|
-
"duration.seconds": "
|
|
23228
|
-
"duration.minutes": "
|
|
23229
|
-
"duration.hours": "
|
|
23230
|
-
"duration.days": "
|
|
23231
|
-
"duration.every": "
|
|
23232
|
-
"duration.immediate": "
|
|
23233
|
-
"duration.systemDefault": "
|
|
23234
|
-
"duration.custom": "
|
|
23235
|
-
"duration.unit": "
|
|
23236
|
-
"pagination.previous": "
|
|
23237
|
-
"pagination.next": "
|
|
23238
|
-
"pagination.summary": "{page} / {pages} \xB7
|
|
23239
|
-
"empty.tasks": "
|
|
23240
|
-
"empty.templates": "
|
|
23241
|
-
"empty.runs": "
|
|
23242
|
-
"empty.running": "
|
|
23243
|
-
"task.createTitle": "
|
|
23244
|
-
"task.editTitle": "
|
|
23245
|
-
"task.projectExisting": "
|
|
23246
|
-
"task.projectNew": "
|
|
23247
|
-
"template.createTitle": "
|
|
23248
|
-
"template.editTitle": "
|
|
23249
|
-
"template.name": "
|
|
23250
|
-
"template.cwd": "
|
|
23190
|
+
"schedule.recurring": "Recurring",
|
|
23191
|
+
"schedule.delayed": "One-off",
|
|
23192
|
+
"schedule.unknown": "Unknown",
|
|
23193
|
+
"schedule.enabled": "Enabled",
|
|
23194
|
+
"schedule.disabled": "Disabled",
|
|
23195
|
+
"schedule.overdue": "Due now",
|
|
23196
|
+
"schedule.seconds": "{count}s",
|
|
23197
|
+
"schedule.minutes": "{count}m",
|
|
23198
|
+
"schedule.hours": "{count}h",
|
|
23199
|
+
"schedule.days": "{count}d",
|
|
23200
|
+
"schedule.cronPreset.hourly": "Hourly",
|
|
23201
|
+
"schedule.cronPreset.daily9": "Daily 09:00",
|
|
23202
|
+
"schedule.cronPreset.weekday9": "Weekdays 09:00",
|
|
23203
|
+
"schedule.cronPreset.weeklyMon": "Mon 09:00",
|
|
23204
|
+
"duration.seconds": "s",
|
|
23205
|
+
"duration.minutes": "min",
|
|
23206
|
+
"duration.hours": "h",
|
|
23207
|
+
"duration.days": "d",
|
|
23208
|
+
"duration.every": "Every {duration}",
|
|
23209
|
+
"duration.immediate": "Immediate",
|
|
23210
|
+
"duration.systemDefault": "Default",
|
|
23211
|
+
"duration.custom": "Custom",
|
|
23212
|
+
"duration.unit": "Unit",
|
|
23213
|
+
"pagination.previous": "Prev",
|
|
23214
|
+
"pagination.next": "Next",
|
|
23215
|
+
"pagination.summary": "{page} / {pages} \xB7 {total} total",
|
|
23216
|
+
"empty.tasks": "No tasks",
|
|
23217
|
+
"empty.templates": "No schedules",
|
|
23218
|
+
"empty.runs": "No runs",
|
|
23219
|
+
"empty.running": "No active runs",
|
|
23220
|
+
"task.createTitle": "New task",
|
|
23221
|
+
"task.editTitle": "Edit task",
|
|
23222
|
+
"task.projectExisting": "{running} running \xB7 {pending} queued \xB7 {failed} issues",
|
|
23223
|
+
"task.projectNew": "New project directory",
|
|
23224
|
+
"template.createTitle": "New schedule",
|
|
23225
|
+
"template.editTitle": "Edit schedule",
|
|
23226
|
+
"template.name": "Name",
|
|
23227
|
+
"template.cwd": "Project directory",
|
|
23251
23228
|
"template.agent": "Agent",
|
|
23252
|
-
"template.model": "
|
|
23229
|
+
"template.model": "Model",
|
|
23253
23230
|
"template.variant": "Variant",
|
|
23254
|
-
"template.prompt": "
|
|
23255
|
-
"template.dependsOn": "
|
|
23256
|
-
"template.dependsOnNone": "
|
|
23257
|
-
"template.scheduleType": "
|
|
23258
|
-
"template.cronExpr": "Cron
|
|
23259
|
-
"template.interval": "
|
|
23260
|
-
"template.runAt": "
|
|
23261
|
-
"template.advanced": "
|
|
23262
|
-
"template.category": "
|
|
23263
|
-
"template.batchId": "
|
|
23264
|
-
"template.importance": "
|
|
23265
|
-
"template.urgency": "
|
|
23266
|
-
"template.maxInstances": "
|
|
23267
|
-
"template.maxRetries": "
|
|
23268
|
-
"template.retryBackoff": "
|
|
23269
|
-
"template.timeout": "
|
|
23270
|
-
"catalog.chooseProject": "
|
|
23271
|
-
"catalog.defaultProvider": "
|
|
23272
|
-
"catalog.defaultModel": "
|
|
23273
|
-
"catalog.defaultVariant": "
|
|
23274
|
-
"catalog.loading": "\
|
|
23275
|
-
"catalog.loaded": "{agents}
|
|
23276
|
-
"catalog.failed": "
|
|
23277
|
-
"catalog.primary": "
|
|
23278
|
-
"catalog.subagent": "
|
|
23279
|
-
"catalog.all": "
|
|
23280
|
-
"directory.title": "
|
|
23281
|
-
"directory.empty": "
|
|
23231
|
+
"template.prompt": "Prompt",
|
|
23232
|
+
"template.dependsOn": "Depends on",
|
|
23233
|
+
"template.dependsOnNone": "None",
|
|
23234
|
+
"template.scheduleType": "Schedule type",
|
|
23235
|
+
"template.cronExpr": "Cron expression",
|
|
23236
|
+
"template.interval": "Interval",
|
|
23237
|
+
"template.runAt": "Run at",
|
|
23238
|
+
"template.advanced": "Advanced",
|
|
23239
|
+
"template.category": "Category",
|
|
23240
|
+
"template.batchId": "Batch",
|
|
23241
|
+
"template.importance": "Importance",
|
|
23242
|
+
"template.urgency": "Urgency",
|
|
23243
|
+
"template.maxInstances": "Max instances",
|
|
23244
|
+
"template.maxRetries": "Max retries",
|
|
23245
|
+
"template.retryBackoff": "Retry backoff",
|
|
23246
|
+
"template.timeout": "Timeout",
|
|
23247
|
+
"catalog.chooseProject": "Select directory first",
|
|
23248
|
+
"catalog.defaultProvider": "Default",
|
|
23249
|
+
"catalog.defaultModel": "Default model",
|
|
23250
|
+
"catalog.defaultVariant": "Default",
|
|
23251
|
+
"catalog.loading": "Loading catalog\u2026",
|
|
23252
|
+
"catalog.loaded": "{agents} agents \xB7 {models} models",
|
|
23253
|
+
"catalog.failed": "Failed: {error}",
|
|
23254
|
+
"catalog.primary": "primary",
|
|
23255
|
+
"catalog.subagent": "subagent",
|
|
23256
|
+
"catalog.all": "all",
|
|
23257
|
+
"directory.title": "Select project directory",
|
|
23258
|
+
"directory.empty": "No subdirectories",
|
|
23282
23259
|
"system.worker": "Worker",
|
|
23283
23260
|
"system.scheduler": "Scheduler",
|
|
23284
23261
|
"system.watchdog": "Watchdog",
|
|
23285
|
-
"system.watchdogCleanup": "
|
|
23286
|
-
"system.health": "
|
|
23287
|
-
"system.healthy": "
|
|
23288
|
-
"system.degraded": "
|
|
23289
|
-
"system.reconnecting": "
|
|
23290
|
-
"system.disabled": "
|
|
23291
|
-
"system.uptime": "
|
|
23292
|
-
"system.failures": "
|
|
23293
|
-
"system.lastActivity": "
|
|
23294
|
-
"system.lock": "
|
|
23295
|
-
"system.concurrency": "
|
|
23296
|
-
"system.maxConcurrency": "
|
|
23297
|
-
"system.pollInterval": "
|
|
23298
|
-
"system.heartbeatInterval": "
|
|
23299
|
-
"system.taskTimeout": "
|
|
23300
|
-
"system.schedulerEnabled": "
|
|
23301
|
-
"system.checkInterval": "
|
|
23302
|
-
"system.activeTemplates": "
|
|
23303
|
-
"system.heartbeatTimeout": "
|
|
23304
|
-
"system.cleanupInterval": "
|
|
23305
|
-
"system.retentionDays": "
|
|
23262
|
+
"system.watchdogCleanup": "Cleanup",
|
|
23263
|
+
"system.health": "Gateway health",
|
|
23264
|
+
"system.healthy": "Healthy",
|
|
23265
|
+
"system.degraded": "Degraded",
|
|
23266
|
+
"system.reconnecting": "Reconnecting",
|
|
23267
|
+
"system.disabled": "Disabled",
|
|
23268
|
+
"system.uptime": "Uptime",
|
|
23269
|
+
"system.failures": "Failures",
|
|
23270
|
+
"system.lastActivity": "Last active",
|
|
23271
|
+
"system.lock": "Lock",
|
|
23272
|
+
"system.concurrency": "Concurrency",
|
|
23273
|
+
"system.maxConcurrency": "Max concurrency",
|
|
23274
|
+
"system.pollInterval": "Poll interval",
|
|
23275
|
+
"system.heartbeatInterval": "Heartbeat interval",
|
|
23276
|
+
"system.taskTimeout": "Default timeout",
|
|
23277
|
+
"system.schedulerEnabled": "Enable scheduler",
|
|
23278
|
+
"system.checkInterval": "Check interval",
|
|
23279
|
+
"system.activeTemplates": "Active templates",
|
|
23280
|
+
"system.heartbeatTimeout": "Heartbeat timeout",
|
|
23281
|
+
"system.cleanupInterval": "Cleanup interval",
|
|
23282
|
+
"system.retentionDays": "Retention",
|
|
23306
23283
|
"system.milliseconds": "ms",
|
|
23307
23284
|
"system.seconds": "s",
|
|
23308
23285
|
"system.minutes": "min",
|
|
23309
23286
|
"system.hours": "h",
|
|
23310
23287
|
"system.days": "d",
|
|
23311
|
-
"system.configForeground": "
|
|
23312
|
-
"system.configApplied": "
|
|
23313
|
-
"system.configPending": "
|
|
23314
|
-
"system.configRestartManually": "
|
|
23315
|
-
"system.savedValue": "
|
|
23316
|
-
"system.runtimeValue": "
|
|
23317
|
-
"system.runningTasks": "
|
|
23318
|
-
"system.configFile": "
|
|
23319
|
-
"system.path": "
|
|
23320
|
-
"system.fileExists": "
|
|
23321
|
-
"system.yes": "
|
|
23322
|
-
"system.noDefault": "
|
|
23323
|
-
"system.danger": "
|
|
23324
|
-
"system.dangerDescription": "
|
|
23325
|
-
"logs.command": "
|
|
23326
|
-
"logs.output": "
|
|
23327
|
-
"logs.error": "
|
|
23328
|
-
"logs.tools": "
|
|
23329
|
-
"logs.raw": "
|
|
23330
|
-
"logs.noText": "
|
|
23331
|
-
"logs.loading": "\
|
|
23332
|
-
"logs.live": "
|
|
23333
|
-
"logs.steps": "
|
|
23288
|
+
"system.configForeground": "Foreground \xB7 restart required",
|
|
23289
|
+
"system.configApplied": "Runtime matches saved config",
|
|
23290
|
+
"system.configPending": "Pending changes \xB7 restart Gateway to apply",
|
|
23291
|
+
"system.configRestartManually": "Pending changes \xB7 restart Gateway manually",
|
|
23292
|
+
"system.savedValue": "Saved",
|
|
23293
|
+
"system.runtimeValue": "Runtime",
|
|
23294
|
+
"system.runningTasks": "Active runs \xB7 {running} / {limit}",
|
|
23295
|
+
"system.configFile": "Config file",
|
|
23296
|
+
"system.path": "Path",
|
|
23297
|
+
"system.fileExists": "Status",
|
|
23298
|
+
"system.yes": "Exists",
|
|
23299
|
+
"system.noDefault": "Default",
|
|
23300
|
+
"system.danger": "Danger zone",
|
|
23301
|
+
"system.dangerDescription": "Clears all tasks, runs, and schedules after creating a verified backup.",
|
|
23302
|
+
"logs.command": "Command",
|
|
23303
|
+
"logs.output": "Output",
|
|
23304
|
+
"logs.error": "Error",
|
|
23305
|
+
"logs.tools": "Tool calls",
|
|
23306
|
+
"logs.raw": "Raw JSONL",
|
|
23307
|
+
"logs.noText": "No text output",
|
|
23308
|
+
"logs.loading": "Loading log\u2026",
|
|
23309
|
+
"logs.live": "Live",
|
|
23310
|
+
"logs.steps": "Steps",
|
|
23334
23311
|
"logs.tokens": "Tokens",
|
|
23335
|
-
"logs.tokInput": "
|
|
23336
|
-
"logs.tokOutput": "
|
|
23337
|
-
"logs.tokReasoning": "
|
|
23338
|
-
"logs.tokCache": "
|
|
23339
|
-
"logs.tokCacheRead": "
|
|
23340
|
-
"logs.tokCacheWrite": "
|
|
23341
|
-
"logs.cost": "
|
|
23342
|
-
"logs.autoScroll": "
|
|
23343
|
-
"logs.rootCause": "
|
|
23344
|
-
"
|
|
23345
|
-
"
|
|
23346
|
-
"inspector.tab.
|
|
23347
|
-
"inspector.
|
|
23348
|
-
"inspector.
|
|
23349
|
-
"inspector.
|
|
23350
|
-
"inspector.
|
|
23351
|
-
"
|
|
23352
|
-
"
|
|
23353
|
-
"details.
|
|
23354
|
-
"details.
|
|
23355
|
-
"details.
|
|
23356
|
-
"details.
|
|
23357
|
-
"details.raw": "\u539F\u59CB JSON",
|
|
23358
|
-
"details.copySuccess": "\u5DF2\u590D\u5236",
|
|
23312
|
+
"logs.tokInput": "In",
|
|
23313
|
+
"logs.tokOutput": "Out",
|
|
23314
|
+
"logs.tokReasoning": "Reasoning",
|
|
23315
|
+
"logs.tokCache": "Cache",
|
|
23316
|
+
"logs.tokCacheRead": "R",
|
|
23317
|
+
"logs.tokCacheWrite": "W",
|
|
23318
|
+
"logs.cost": "Cost",
|
|
23319
|
+
"logs.autoScroll": "Auto-scroll",
|
|
23320
|
+
"logs.rootCause": "Root cause",
|
|
23321
|
+
"inspector.tab.overview": "Overview",
|
|
23322
|
+
"inspector.tab.output": "Live output",
|
|
23323
|
+
"inspector.tab.history": "History",
|
|
23324
|
+
"inspector.dependencies": "Dependencies",
|
|
23325
|
+
"inspector.upstream": "Upstream",
|
|
23326
|
+
"inspector.downstream": "Downstream",
|
|
23327
|
+
"inspector.failureSummary": "Failure",
|
|
23328
|
+
"details.title": "Inspector",
|
|
23329
|
+
"details.taskTitle": "Task #{id}",
|
|
23330
|
+
"details.runTitle": "Run #{id}",
|
|
23331
|
+
"details.templateTitle": "Schedule #{id}",
|
|
23332
|
+
"details.raw": "Raw JSON",
|
|
23333
|
+
"details.copySuccess": "Copied",
|
|
23359
23334
|
"details.id": "ID",
|
|
23360
|
-
"details.project": "
|
|
23335
|
+
"details.project": "Project",
|
|
23361
23336
|
"details.variant": "Variant",
|
|
23362
|
-
"details.prompt": "
|
|
23363
|
-
"details.result": "
|
|
23364
|
-
"details.category": "
|
|
23365
|
-
"details.batch": "
|
|
23366
|
-
"details.dependency": "
|
|
23367
|
-
"details.importance": "
|
|
23368
|
-
"details.urgency": "
|
|
23369
|
-
"details.retryCount": "
|
|
23370
|
-
"details.retryBackoff": "
|
|
23371
|
-
"details.timeout": "
|
|
23372
|
-
"details.createdAt": "
|
|
23373
|
-
"details.updatedAt": "
|
|
23374
|
-
"details.startedAt": "
|
|
23375
|
-
"details.finishedAt": "
|
|
23376
|
-
"details.scheduledAt": "
|
|
23377
|
-
"details.enabled": "
|
|
23378
|
-
"details.scheduleRule": "
|
|
23379
|
-
"details.maxInstances": "
|
|
23380
|
-
"details.maxRetries": "
|
|
23381
|
-
"details.lastRun": "
|
|
23382
|
-
"details.nextRun": "
|
|
23383
|
-
"details.taskId": "
|
|
23384
|
-
"details.session": "
|
|
23385
|
-
"details.heartbeat": "
|
|
23386
|
-
"details.process": "
|
|
23387
|
-
"details.history": "
|
|
23388
|
-
"details.noHistory": "
|
|
23337
|
+
"details.prompt": "Prompt",
|
|
23338
|
+
"details.result": "Result",
|
|
23339
|
+
"details.category": "Category",
|
|
23340
|
+
"details.batch": "Batch",
|
|
23341
|
+
"details.dependency": "Dependency",
|
|
23342
|
+
"details.importance": "Importance",
|
|
23343
|
+
"details.urgency": "Urgency",
|
|
23344
|
+
"details.retryCount": "Retries",
|
|
23345
|
+
"details.retryBackoff": "Backoff",
|
|
23346
|
+
"details.timeout": "Timeout",
|
|
23347
|
+
"details.createdAt": "Created",
|
|
23348
|
+
"details.updatedAt": "Updated",
|
|
23349
|
+
"details.startedAt": "Started",
|
|
23350
|
+
"details.finishedAt": "Finished",
|
|
23351
|
+
"details.scheduledAt": "Scheduled",
|
|
23352
|
+
"details.enabled": "Enabled",
|
|
23353
|
+
"details.scheduleRule": "Rule",
|
|
23354
|
+
"details.maxInstances": "Max instances",
|
|
23355
|
+
"details.maxRetries": "Max retries",
|
|
23356
|
+
"details.lastRun": "Last run",
|
|
23357
|
+
"details.nextRun": "Next run",
|
|
23358
|
+
"details.taskId": "Task",
|
|
23359
|
+
"details.session": "Session",
|
|
23360
|
+
"details.heartbeat": "Heartbeat",
|
|
23361
|
+
"details.process": "Process",
|
|
23362
|
+
"details.history": "Run history",
|
|
23363
|
+
"details.noHistory": "No runs yet",
|
|
23389
23364
|
"details.none": "\u2014",
|
|
23390
|
-
"details.default": "
|
|
23391
|
-
"details.enabledYes": "
|
|
23392
|
-
"details.enabledNo": "
|
|
23393
|
-
"batch.selected": "
|
|
23394
|
-
"batch.retry": "
|
|
23395
|
-
"batch.cancel": "
|
|
23396
|
-
"batch.delete": "
|
|
23397
|
-
"dialog.cancelTask": "
|
|
23398
|
-
"dialog.cancelTaskBody": "
|
|
23399
|
-
"dialog.retryTask": "
|
|
23400
|
-
"dialog.retryTaskBody": "
|
|
23401
|
-
"dialog.deleteTask": "
|
|
23402
|
-
"dialog.deleteTaskBody": "
|
|
23403
|
-
"dialog.batchRetry": "
|
|
23404
|
-
"dialog.batchRetryBody": "
|
|
23405
|
-
"dialog.batchCancel": "
|
|
23406
|
-
"dialog.batchCancelBody": "
|
|
23407
|
-
"dialog.batchDelete": "
|
|
23408
|
-
"dialog.batchDeleteBody": "
|
|
23409
|
-
"dialog.disableTemplate": "
|
|
23410
|
-
"dialog.disableTemplateBody": "
|
|
23411
|
-
"dialog.deleteTemplate": "
|
|
23412
|
-
"dialog.deleteTemplateBody": "
|
|
23413
|
-
"dialog.triggerTemplate": "
|
|
23414
|
-
"dialog.triggerTemplateBody": "
|
|
23415
|
-
"dialog.clearTitle": "
|
|
23416
|
-
"dialog.clearBody": "
|
|
23417
|
-
"dialog.clearInstruction": "
|
|
23418
|
-
"dialog.restartGateway": "
|
|
23419
|
-
"dialog.restartGatewayBody": "
|
|
23420
|
-
"dialog.restartGatewayRunningBody": "
|
|
23421
|
-
"dialog.copyManualTitle": "
|
|
23422
|
-
"dialog.copyManualBody": "
|
|
23423
|
-
"feedback.retryFailed": "
|
|
23424
|
-
"feedback.cancelFailed": "
|
|
23425
|
-
"feedback.deleteFailed": "
|
|
23426
|
-
"feedback.requestFailed": "
|
|
23427
|
-
"feedback.triggered": "
|
|
23428
|
-
"feedback.taskCreated": "
|
|
23429
|
-
"feedback.taskUpdated": "
|
|
23430
|
-
"feedback.taskCloned": "
|
|
23431
|
-
"feedback.taskRetried": "
|
|
23432
|
-
"feedback.taskCancelled": "
|
|
23433
|
-
"feedback.taskDeleted": "
|
|
23434
|
-
"feedback.batchDone": "
|
|
23435
|
-
"feedback.templateCreated": "
|
|
23436
|
-
"feedback.templateUpdated": "
|
|
23437
|
-
"feedback.configSaved": "
|
|
23438
|
-
"feedback.sessionCommandCopied": "
|
|
23439
|
-
"feedback.commandCopied": "
|
|
23440
|
-
"feedback.restarting": "Gateway
|
|
23441
|
-
"feedback.restartTimeout": "Gateway
|
|
23442
|
-
"feedback.databaseCleared": "
|
|
23443
|
-
"feedback.copyFailed": "
|
|
23444
|
-
"a11y.skip": "
|
|
23445
|
-
"a11y.refreshing": "
|
|
23446
|
-
};
|
|
23447
|
-
|
|
23448
|
-
|
|
23449
|
-
|
|
23450
|
-
|
|
23451
|
-
|
|
23452
|
-
|
|
23453
|
-
|
|
23454
|
-
|
|
23455
|
-
|
|
23456
|
-
"
|
|
23457
|
-
"
|
|
23458
|
-
"
|
|
23459
|
-
"
|
|
23460
|
-
"
|
|
23461
|
-
"
|
|
23462
|
-
"
|
|
23463
|
-
"
|
|
23464
|
-
"
|
|
23465
|
-
"
|
|
23466
|
-
"
|
|
23467
|
-
"
|
|
23468
|
-
"
|
|
23469
|
-
"
|
|
23470
|
-
"
|
|
23471
|
-
"action.
|
|
23472
|
-
"action.
|
|
23473
|
-
"action.
|
|
23474
|
-
"action.
|
|
23475
|
-
"action.
|
|
23476
|
-
"action.
|
|
23477
|
-
"action.
|
|
23478
|
-
"action.
|
|
23479
|
-
"action.
|
|
23480
|
-
"action.
|
|
23481
|
-
"action.
|
|
23482
|
-
"action.
|
|
23483
|
-
"action.
|
|
23484
|
-
"action.
|
|
23485
|
-
"action.
|
|
23486
|
-
"action.
|
|
23487
|
-
"action.
|
|
23488
|
-
"action.
|
|
23489
|
-
"action.
|
|
23490
|
-
"action.
|
|
23491
|
-
"action.
|
|
23492
|
-
"action.
|
|
23493
|
-
"action.
|
|
23494
|
-
"action.
|
|
23495
|
-
"action.
|
|
23496
|
-
"action.
|
|
23497
|
-
"action.
|
|
23498
|
-
"action.
|
|
23499
|
-
"
|
|
23500
|
-
"
|
|
23501
|
-
"
|
|
23502
|
-
"
|
|
23503
|
-
"
|
|
23504
|
-
"
|
|
23505
|
-
"
|
|
23506
|
-
"
|
|
23507
|
-
"
|
|
23508
|
-
"
|
|
23509
|
-
"
|
|
23510
|
-
"
|
|
23511
|
-
"
|
|
23512
|
-
"
|
|
23513
|
-
"
|
|
23514
|
-
"
|
|
23515
|
-
"
|
|
23516
|
-
"
|
|
23517
|
-
"
|
|
23518
|
-
"
|
|
23519
|
-
"
|
|
23520
|
-
"stats.
|
|
23521
|
-
"stats.
|
|
23522
|
-
"
|
|
23523
|
-
"
|
|
23524
|
-
"
|
|
23525
|
-
"
|
|
23526
|
-
"
|
|
23527
|
-
"
|
|
23528
|
-
"
|
|
23529
|
-
"
|
|
23530
|
-
"
|
|
23531
|
-
"table.
|
|
23532
|
-
"table.
|
|
23533
|
-
"table.
|
|
23534
|
-
"table.
|
|
23535
|
-
"table.
|
|
23536
|
-
"table.
|
|
23365
|
+
"details.default": "Default",
|
|
23366
|
+
"details.enabledYes": "Enabled",
|
|
23367
|
+
"details.enabledNo": "Disabled",
|
|
23368
|
+
"batch.selected": "{count} selected",
|
|
23369
|
+
"batch.retry": "Retry",
|
|
23370
|
+
"batch.cancel": "Cancel",
|
|
23371
|
+
"batch.delete": "Delete",
|
|
23372
|
+
"dialog.cancelTask": "Cancel task #{id}",
|
|
23373
|
+
"dialog.cancelTaskBody": "Stop queuing or terminate the active process group.",
|
|
23374
|
+
"dialog.retryTask": "Retry task #{id}",
|
|
23375
|
+
"dialog.retryTaskBody": "Reset retry counter and re-enqueue.",
|
|
23376
|
+
"dialog.deleteTask": "Delete task #{id}",
|
|
23377
|
+
"dialog.deleteTaskBody": "Permanently delete this task and its runs.",
|
|
23378
|
+
"dialog.batchRetry": "Retry {count} tasks",
|
|
23379
|
+
"dialog.batchRetryBody": "Re-enqueue failed and stopped tasks in selection.",
|
|
23380
|
+
"dialog.batchCancel": "Cancel {count} tasks",
|
|
23381
|
+
"dialog.batchCancelBody": "Cancel queued, running, and retrying tasks in selection.",
|
|
23382
|
+
"dialog.batchDelete": "Delete {count} tasks",
|
|
23383
|
+
"dialog.batchDeleteBody": "Permanently delete non-running tasks in selection.",
|
|
23384
|
+
"dialog.disableTemplate": "Disable schedule",
|
|
23385
|
+
"dialog.disableTemplateBody": "Stop creating new tasks automatically.",
|
|
23386
|
+
"dialog.deleteTemplate": "Delete schedule",
|
|
23387
|
+
"dialog.deleteTemplateBody": "Delete template without removing past tasks.",
|
|
23388
|
+
"dialog.triggerTemplate": "Run schedule now",
|
|
23389
|
+
"dialog.triggerTemplateBody": "Create and enqueue a task immediately.",
|
|
23390
|
+
"dialog.clearTitle": "Clear database",
|
|
23391
|
+
"dialog.clearBody": "This removes all tasks, runs, and schedules.",
|
|
23392
|
+
"dialog.clearInstruction": "Type CLEAR to confirm:",
|
|
23393
|
+
"dialog.restartGateway": "Restart Gateway",
|
|
23394
|
+
"dialog.restartGatewayBody": "Save config and restart PM2 Gateway.",
|
|
23395
|
+
"dialog.restartGatewayRunningBody": "{count} task(s) are running and will be interrupted. Continue?",
|
|
23396
|
+
"dialog.copyManualTitle": "Copy manually",
|
|
23397
|
+
"dialog.copyManualBody": "Clipboard access was blocked. Press \u2318C or Ctrl+C.",
|
|
23398
|
+
"feedback.retryFailed": "Retry failed",
|
|
23399
|
+
"feedback.cancelFailed": "Cancel failed",
|
|
23400
|
+
"feedback.deleteFailed": "Delete failed",
|
|
23401
|
+
"feedback.requestFailed": "Request failed",
|
|
23402
|
+
"feedback.triggered": "Enqueued task #{id}",
|
|
23403
|
+
"feedback.taskCreated": "Enqueued task #{id}",
|
|
23404
|
+
"feedback.taskUpdated": "Updated task #{id}",
|
|
23405
|
+
"feedback.taskCloned": "Cloned task #{id}",
|
|
23406
|
+
"feedback.taskRetried": "Task #{id} re-enqueued",
|
|
23407
|
+
"feedback.taskCancelled": "Task #{id} cancelled",
|
|
23408
|
+
"feedback.taskDeleted": "Task #{id} deleted",
|
|
23409
|
+
"feedback.batchDone": "Batch complete ({count})",
|
|
23410
|
+
"feedback.templateCreated": "Schedule created",
|
|
23411
|
+
"feedback.templateUpdated": "Schedule updated",
|
|
23412
|
+
"feedback.configSaved": "Config saved",
|
|
23413
|
+
"feedback.sessionCommandCopied": "Session command copied",
|
|
23414
|
+
"feedback.commandCopied": "Command copied",
|
|
23415
|
+
"feedback.restarting": "Restarting Gateway\u2026",
|
|
23416
|
+
"feedback.restartTimeout": "Gateway has not recovered yet.",
|
|
23417
|
+
"feedback.databaseCleared": "Database cleared. Backup: {path}",
|
|
23418
|
+
"feedback.copyFailed": "Copy failed",
|
|
23419
|
+
"a11y.skip": "Skip to content",
|
|
23420
|
+
"a11y.refreshing": "Refreshing"
|
|
23421
|
+
};
|
|
23422
|
+
}
|
|
23423
|
+
});
|
|
23424
|
+
|
|
23425
|
+
// src/web/locales/es.ts
|
|
23426
|
+
var ES;
|
|
23427
|
+
var init_es = __esm({
|
|
23428
|
+
"src/web/locales/es.ts"() {
|
|
23429
|
+
"use strict";
|
|
23430
|
+
ES = {
|
|
23431
|
+
"app.name": "SuperTask",
|
|
23432
|
+
"app.local": "Local",
|
|
23433
|
+
"nav.tasks": "Tareas",
|
|
23434
|
+
"nav.templates": "Programadas",
|
|
23435
|
+
"nav.runs": "Ejecuciones",
|
|
23436
|
+
"nav.system": "Sistema",
|
|
23437
|
+
"page.tasks.title": "Cola de tareas",
|
|
23438
|
+
"page.templates.title": "Tareas programadas",
|
|
23439
|
+
"page.runs.title": "Historial de ejecuci\xF3n",
|
|
23440
|
+
"page.system.title": "Sistema",
|
|
23441
|
+
"theme.label": "Tema",
|
|
23442
|
+
"theme.system": "Sistema",
|
|
23443
|
+
"theme.light": "Claro",
|
|
23444
|
+
"theme.dark": "Oscuro",
|
|
23445
|
+
"language.label": "Idioma",
|
|
23446
|
+
"action.refresh": "Actualizar",
|
|
23447
|
+
"action.createTask": "Nueva tarea",
|
|
23448
|
+
"action.createTemplate": "Nueva programaci\xF3n",
|
|
23449
|
+
"action.saveTask": "Encolar",
|
|
23450
|
+
"action.updateTask": "Guardar",
|
|
23451
|
+
"action.saveTemplate": "Guardar",
|
|
23452
|
+
"action.edit": "Editar",
|
|
23453
|
+
"action.clone": "Clonar",
|
|
23454
|
+
"action.details": "Detalles",
|
|
23455
|
+
"action.retry": "Reintentar",
|
|
23456
|
+
"action.cancel": "Cancelar",
|
|
23457
|
+
"action.delete": "Eliminar",
|
|
23458
|
+
"action.trigger": "Ejecutar ahora",
|
|
23459
|
+
"action.enable": "Activar",
|
|
23460
|
+
"action.disable": "Desactivar",
|
|
23461
|
+
"action.logs": "Registro",
|
|
23462
|
+
"action.hideLogs": "Ocultar",
|
|
23463
|
+
"action.save": "Guardar ajustes",
|
|
23464
|
+
"action.saveAndRestart": "Guardar y reiniciar",
|
|
23465
|
+
"action.clearDatabase": "Vaciar datos",
|
|
23466
|
+
"action.copy": "Copiar",
|
|
23467
|
+
"action.copyCommand": "Copiar comando",
|
|
23468
|
+
"action.continueSession": "Continuar",
|
|
23469
|
+
"action.chooseFolder": "Explorar",
|
|
23470
|
+
"action.home": "Inicio",
|
|
23471
|
+
"action.up": "Subir",
|
|
23472
|
+
"action.showHidden": "Mostrar ocultas",
|
|
23473
|
+
"action.hideHidden": "Ocultar ocultas",
|
|
23474
|
+
"action.chooseThisFolder": "Elegir carpeta",
|
|
23475
|
+
"action.close": "Cerrar",
|
|
23476
|
+
"action.confirm": "Confirmar",
|
|
23477
|
+
"action.clearSelection": "Limpiar",
|
|
23478
|
+
"action.viewTasks": "Ver tareas",
|
|
23479
|
+
"action.more": "M\xE1s",
|
|
23480
|
+
"action.selectAll": "Seleccionar todo",
|
|
23481
|
+
"action.openMenu": "Men\xFA",
|
|
23482
|
+
"filter.all": "Todas",
|
|
23483
|
+
"filter.searchTasks": "Buscar tareas, lote o #ID\u2026",
|
|
23484
|
+
"filter.allAgents": "Todos los agentes",
|
|
23485
|
+
"filter.allBatches": "Todos los lotes",
|
|
23486
|
+
"filter.noResults": "Sin tareas coincidentes",
|
|
23487
|
+
"filter.templateScope": "Plantilla #{id}",
|
|
23488
|
+
"filter.clearFilter": "Limpiar",
|
|
23489
|
+
"projects.title": "Proyectos",
|
|
23490
|
+
"projects.all": "Todos los proyectos",
|
|
23491
|
+
"projects.legacy": "Sin agrupar",
|
|
23492
|
+
"projects.counts": "{running} en ejecuci\xF3n \xB7 {pending} en cola \xB7 {failed} con problemas",
|
|
23493
|
+
"projects.successRate": "{rate}%",
|
|
23494
|
+
"projects.rate7d": "Tasa de \xE9xito (7d)",
|
|
23495
|
+
"stats.pending": "En cola",
|
|
23496
|
+
"stats.running": "En ejecuci\xF3n",
|
|
23497
|
+
"stats.done": "Completadas",
|
|
23498
|
+
"stats.failedDead": "Problemas",
|
|
23499
|
+
"stats.templates": "Total",
|
|
23500
|
+
"stats.enabled": "Activadas",
|
|
23501
|
+
"stats.disabled": "Desactivadas",
|
|
23502
|
+
"stats.records": "Total",
|
|
23503
|
+
"stats.pageDone": "Correctas",
|
|
23504
|
+
"stats.pageFailed": "Fallidas",
|
|
23505
|
+
"stats.pageRunning": "En ejecuci\xF3n",
|
|
23506
|
+
"table.id": "ID",
|
|
23507
|
+
"table.task": "Tarea",
|
|
23508
|
+
"table.name": "Nombre",
|
|
23509
|
+
"table.agent": "Agente",
|
|
23510
|
+
"table.model": "Modelo",
|
|
23511
|
+
"table.status": "Estado",
|
|
23512
|
+
"table.duration": "Duraci\xF3n",
|
|
23513
|
+
"table.retries": "Reintentos",
|
|
23514
|
+
"table.actions": "Acciones",
|
|
23515
|
+
"table.type": "Tipo",
|
|
23516
|
+
"table.rule": "Regla",
|
|
23517
|
+
"table.lastRun": "\xDAltima ejecuci\xF3n",
|
|
23518
|
+
"table.nextRun": "Pr\xF3xima ejecuci\xF3n",
|
|
23519
|
+
"table.run": "Ejecuci\xF3n",
|
|
23520
|
+
"table.session": "Sesi\xF3n",
|
|
23537
23521
|
"table.heartbeat": "Heartbeat",
|
|
23538
|
-
"table.startedAt": "
|
|
23522
|
+
"table.startedAt": "Inicio",
|
|
23539
23523
|
"table.pid": "PID",
|
|
23540
|
-
"
|
|
23541
|
-
"status.
|
|
23542
|
-
"status.
|
|
23543
|
-
"status.
|
|
23544
|
-
"status.
|
|
23545
|
-
"status.
|
|
23546
|
-
"status.
|
|
23547
|
-
"status.
|
|
23548
|
-
"status.
|
|
23549
|
-
"status.
|
|
23550
|
-
"status.
|
|
23551
|
-
"
|
|
23552
|
-
"runStatus.
|
|
23553
|
-
"runStatus.
|
|
23524
|
+
"table.pidTooltip": "Worker \u203A Guardian",
|
|
23525
|
+
"status.pending": "En cola",
|
|
23526
|
+
"status.running": "En ejecuci\xF3n",
|
|
23527
|
+
"status.done": "Completada",
|
|
23528
|
+
"status.failed": "Reintentando",
|
|
23529
|
+
"status.dead_letter": "Detenida",
|
|
23530
|
+
"status.cancelled": "Cancelada",
|
|
23531
|
+
"status.unknown": "Desconocido",
|
|
23532
|
+
"status.executionStillActive": "Deteniendo",
|
|
23533
|
+
"status.waitingDep": "Espera #{id}",
|
|
23534
|
+
"status.batchBusy": "Lote ocupado",
|
|
23535
|
+
"status.retryIn": "Reintento en {duration}",
|
|
23536
|
+
"runStatus.running": "En ejecuci\xF3n",
|
|
23537
|
+
"runStatus.done": "Correcta",
|
|
23538
|
+
"runStatus.failed": "Fallida",
|
|
23554
23539
|
"schedule.cron": "Cron",
|
|
23555
|
-
"schedule.recurring": "
|
|
23556
|
-
"schedule.delayed": "
|
|
23557
|
-
"schedule.unknown": "
|
|
23558
|
-
"schedule.enabled": "
|
|
23559
|
-
"schedule.disabled": "
|
|
23560
|
-
"schedule.overdue": "
|
|
23561
|
-
"schedule.seconds": "{count}s",
|
|
23562
|
-
"schedule.minutes": "{count}
|
|
23563
|
-
"schedule.hours": "{count}h",
|
|
23564
|
-
"schedule.days": "{count}d",
|
|
23565
|
-
"schedule.cronPreset.hourly": "
|
|
23566
|
-
"schedule.cronPreset.daily9": "
|
|
23567
|
-
"schedule.cronPreset.weekday9": "
|
|
23568
|
-
"schedule.cronPreset.weeklyMon": "
|
|
23540
|
+
"schedule.recurring": "Intervalo",
|
|
23541
|
+
"schedule.delayed": "Una vez",
|
|
23542
|
+
"schedule.unknown": "Desconocido",
|
|
23543
|
+
"schedule.enabled": "Activada",
|
|
23544
|
+
"schedule.disabled": "Desactivada",
|
|
23545
|
+
"schedule.overdue": "Vencida",
|
|
23546
|
+
"schedule.seconds": "{count} s",
|
|
23547
|
+
"schedule.minutes": "{count} min",
|
|
23548
|
+
"schedule.hours": "{count} h",
|
|
23549
|
+
"schedule.days": "{count} d",
|
|
23550
|
+
"schedule.cronPreset.hourly": "Cada hora",
|
|
23551
|
+
"schedule.cronPreset.daily9": "Diario 09:00",
|
|
23552
|
+
"schedule.cronPreset.weekday9": "Laborables 09:00",
|
|
23553
|
+
"schedule.cronPreset.weeklyMon": "Lunes 09:00",
|
|
23569
23554
|
"duration.seconds": "s",
|
|
23570
23555
|
"duration.minutes": "min",
|
|
23571
23556
|
"duration.hours": "h",
|
|
23572
23557
|
"duration.days": "d",
|
|
23573
|
-
"duration.every": "
|
|
23574
|
-
"duration.immediate": "
|
|
23575
|
-
"duration.systemDefault": "
|
|
23576
|
-
"duration.custom": "
|
|
23577
|
-
"duration.unit": "
|
|
23578
|
-
"pagination.previous": "
|
|
23579
|
-
"pagination.next": "
|
|
23580
|
-
"pagination.summary": "{page} / {pages} \xB7 {total} total",
|
|
23581
|
-
"empty.tasks": "
|
|
23582
|
-
"empty.templates": "
|
|
23583
|
-
"empty.runs": "
|
|
23584
|
-
"empty.running": "
|
|
23585
|
-
"task.createTitle": "
|
|
23586
|
-
"task.editTitle": "
|
|
23587
|
-
"task.projectExisting": "{running}
|
|
23588
|
-
"task.projectNew": "
|
|
23589
|
-
"template.createTitle": "
|
|
23590
|
-
"template.editTitle": "
|
|
23591
|
-
"template.name": "
|
|
23592
|
-
"template.cwd": "
|
|
23593
|
-
"template.agent": "
|
|
23594
|
-
"template.model": "
|
|
23595
|
-
"template.variant": "
|
|
23558
|
+
"duration.every": "Cada {duration}",
|
|
23559
|
+
"duration.immediate": "Inmediato",
|
|
23560
|
+
"duration.systemDefault": "Predeterminado",
|
|
23561
|
+
"duration.custom": "Personalizado",
|
|
23562
|
+
"duration.unit": "Unidad",
|
|
23563
|
+
"pagination.previous": "Anterior",
|
|
23564
|
+
"pagination.next": "Siguiente",
|
|
23565
|
+
"pagination.summary": "{page} / {pages} \xB7 {total} en total",
|
|
23566
|
+
"empty.tasks": "Sin tareas",
|
|
23567
|
+
"empty.templates": "Sin tareas programadas",
|
|
23568
|
+
"empty.runs": "Sin ejecuciones",
|
|
23569
|
+
"empty.running": "Sin ejecuciones activas",
|
|
23570
|
+
"task.createTitle": "Nueva tarea",
|
|
23571
|
+
"task.editTitle": "Editar tarea",
|
|
23572
|
+
"task.projectExisting": "{running} en ejecuci\xF3n \xB7 {pending} en cola \xB7 {failed} con problemas",
|
|
23573
|
+
"task.projectNew": "Nuevo directorio de proyecto",
|
|
23574
|
+
"template.createTitle": "Nueva programaci\xF3n",
|
|
23575
|
+
"template.editTitle": "Editar programaci\xF3n",
|
|
23576
|
+
"template.name": "Nombre",
|
|
23577
|
+
"template.cwd": "Directorio del proyecto",
|
|
23578
|
+
"template.agent": "Agente",
|
|
23579
|
+
"template.model": "Modelo",
|
|
23580
|
+
"template.variant": "Variante",
|
|
23596
23581
|
"template.prompt": "Prompt",
|
|
23597
|
-
"template.dependsOn": "
|
|
23598
|
-
"template.dependsOnNone": "
|
|
23599
|
-
"template.scheduleType": "
|
|
23600
|
-
"template.cronExpr": "
|
|
23601
|
-
"template.interval": "
|
|
23602
|
-
"template.runAt": "
|
|
23603
|
-
"template.advanced": "
|
|
23604
|
-
"template.category": "
|
|
23605
|
-
"template.batchId": "
|
|
23606
|
-
"template.importance": "
|
|
23607
|
-
"template.urgency": "
|
|
23608
|
-
"template.maxInstances": "
|
|
23609
|
-
"template.maxRetries": "
|
|
23610
|
-
"template.retryBackoff": "
|
|
23582
|
+
"template.dependsOn": "Depende de",
|
|
23583
|
+
"template.dependsOnNone": "Ninguna",
|
|
23584
|
+
"template.scheduleType": "Tipo",
|
|
23585
|
+
"template.cronExpr": "Expresi\xF3n cron",
|
|
23586
|
+
"template.interval": "Intervalo",
|
|
23587
|
+
"template.runAt": "Ejecutar a las",
|
|
23588
|
+
"template.advanced": "Avanzado",
|
|
23589
|
+
"template.category": "Categor\xEDa",
|
|
23590
|
+
"template.batchId": "Lote",
|
|
23591
|
+
"template.importance": "Importancia",
|
|
23592
|
+
"template.urgency": "Urgencia",
|
|
23593
|
+
"template.maxInstances": "Instancias m\xE1x.",
|
|
23594
|
+
"template.maxRetries": "Reintentos m\xE1x.",
|
|
23595
|
+
"template.retryBackoff": "Espera entre reintentos",
|
|
23611
23596
|
"template.timeout": "Timeout",
|
|
23612
|
-
"catalog.chooseProject": "
|
|
23613
|
-
"catalog.defaultProvider": "
|
|
23614
|
-
"catalog.defaultModel": "
|
|
23615
|
-
"catalog.defaultVariant": "
|
|
23616
|
-
"catalog.loading": "
|
|
23617
|
-
"catalog.loaded": "{agents}
|
|
23618
|
-
"catalog.failed": "
|
|
23619
|
-
"catalog.primary": "
|
|
23620
|
-
"catalog.subagent": "
|
|
23621
|
-
"catalog.all": "
|
|
23622
|
-
"directory.title": "
|
|
23623
|
-
"directory.empty": "
|
|
23597
|
+
"catalog.chooseProject": "Elige un directorio primero",
|
|
23598
|
+
"catalog.defaultProvider": "Predeterminado",
|
|
23599
|
+
"catalog.defaultModel": "Modelo predeterminado",
|
|
23600
|
+
"catalog.defaultVariant": "Predeterminada",
|
|
23601
|
+
"catalog.loading": "Cargando cat\xE1logo\u2026",
|
|
23602
|
+
"catalog.loaded": "{agents} agentes \xB7 {models} modelos",
|
|
23603
|
+
"catalog.failed": "Error: {error}",
|
|
23604
|
+
"catalog.primary": "principal",
|
|
23605
|
+
"catalog.subagent": "subagente",
|
|
23606
|
+
"catalog.all": "general",
|
|
23607
|
+
"directory.title": "Elegir directorio del proyecto",
|
|
23608
|
+
"directory.empty": "Sin subcarpetas",
|
|
23609
|
+
"system.worker": "Worker",
|
|
23610
|
+
"system.scheduler": "Scheduler",
|
|
23611
|
+
"system.watchdog": "Watchdog",
|
|
23612
|
+
"system.watchdogCleanup": "Limpieza",
|
|
23613
|
+
"system.health": "Estado del Gateway",
|
|
23614
|
+
"system.healthy": "Saludable",
|
|
23615
|
+
"system.degraded": "Degradado",
|
|
23616
|
+
"system.reconnecting": "Reconectando",
|
|
23617
|
+
"system.disabled": "Desactivado",
|
|
23618
|
+
"system.uptime": "Tiempo activo",
|
|
23619
|
+
"system.failures": "Fallos",
|
|
23620
|
+
"system.lastActivity": "\xDAltima actividad",
|
|
23621
|
+
"system.lock": "Bloqueo",
|
|
23622
|
+
"system.concurrency": "Concurrencia",
|
|
23623
|
+
"system.maxConcurrency": "Concurrencia m\xE1x.",
|
|
23624
|
+
"system.pollInterval": "Intervalo de sondeo",
|
|
23625
|
+
"system.heartbeatInterval": "Intervalo de heartbeat",
|
|
23626
|
+
"system.taskTimeout": "Timeout predeterminado",
|
|
23627
|
+
"system.schedulerEnabled": "Activar programador",
|
|
23628
|
+
"system.checkInterval": "Intervalo de comprobaci\xF3n",
|
|
23629
|
+
"system.activeTemplates": "Plantillas activas",
|
|
23630
|
+
"system.heartbeatTimeout": "Timeout de heartbeat",
|
|
23631
|
+
"system.cleanupInterval": "Intervalo de limpieza",
|
|
23632
|
+
"system.retentionDays": "Retenci\xF3n",
|
|
23633
|
+
"system.milliseconds": "ms",
|
|
23634
|
+
"system.seconds": "s",
|
|
23635
|
+
"system.minutes": "min",
|
|
23636
|
+
"system.hours": "h",
|
|
23637
|
+
"system.days": "d",
|
|
23638
|
+
"system.configForeground": "Primer plano \xB7 requiere reinicio",
|
|
23639
|
+
"system.configApplied": "El entorno coincide con la configuraci\xF3n guardada",
|
|
23640
|
+
"system.configPending": "Cambios pendientes \xB7 reinicia el Gateway para aplicar",
|
|
23641
|
+
"system.configRestartManually": "Cambios pendientes \xB7 reinicia el Gateway manualmente",
|
|
23642
|
+
"system.savedValue": "Guardado",
|
|
23643
|
+
"system.runtimeValue": "En curso",
|
|
23644
|
+
"system.runningTasks": "Ejecuciones activas \xB7 {running} / {limit}",
|
|
23645
|
+
"system.configFile": "Archivo de configuraci\xF3n",
|
|
23646
|
+
"system.path": "Ruta",
|
|
23647
|
+
"system.fileExists": "Estado",
|
|
23648
|
+
"system.yes": "Existe",
|
|
23649
|
+
"system.noDefault": "Predeterminado",
|
|
23650
|
+
"system.danger": "Zona de peligro",
|
|
23651
|
+
"system.dangerDescription": "Vac\xEDa todas las tareas, ejecuciones y programaciones tras crear una copia de seguridad verificada.",
|
|
23652
|
+
"logs.command": "Comando",
|
|
23653
|
+
"logs.output": "Salida",
|
|
23654
|
+
"logs.error": "Error",
|
|
23655
|
+
"logs.tools": "Herramientas",
|
|
23656
|
+
"logs.raw": "JSONL en bruto",
|
|
23657
|
+
"logs.noText": "Sin salida de texto",
|
|
23658
|
+
"logs.loading": "Cargando registro\u2026",
|
|
23659
|
+
"logs.live": "En vivo",
|
|
23660
|
+
"logs.steps": "Pasos",
|
|
23661
|
+
"logs.tokens": "Tokens",
|
|
23662
|
+
"logs.tokInput": "Ent.",
|
|
23663
|
+
"logs.tokOutput": "Sal.",
|
|
23664
|
+
"logs.tokReasoning": "Razon.",
|
|
23665
|
+
"logs.tokCache": "Cach\xE9",
|
|
23666
|
+
"logs.tokCacheRead": "L",
|
|
23667
|
+
"logs.tokCacheWrite": "E",
|
|
23668
|
+
"logs.cost": "Coste",
|
|
23669
|
+
"logs.autoScroll": "Autodesplazar",
|
|
23670
|
+
"logs.rootCause": "Causa ra\xEDz",
|
|
23671
|
+
"inspector.tab.overview": "Resumen",
|
|
23672
|
+
"inspector.tab.output": "Salida en vivo",
|
|
23673
|
+
"inspector.tab.history": "Historial",
|
|
23674
|
+
"inspector.dependencies": "Dependencias",
|
|
23675
|
+
"inspector.upstream": "Predecesor",
|
|
23676
|
+
"inspector.downstream": "Dependientes",
|
|
23677
|
+
"inspector.failureSummary": "Fallo",
|
|
23678
|
+
"details.title": "Inspector",
|
|
23679
|
+
"details.taskTitle": "Tarea #{id}",
|
|
23680
|
+
"details.runTitle": "Ejecuci\xF3n #{id}",
|
|
23681
|
+
"details.templateTitle": "Programaci\xF3n #{id}",
|
|
23682
|
+
"details.raw": "JSON en bruto",
|
|
23683
|
+
"details.copySuccess": "Copiado",
|
|
23684
|
+
"details.id": "ID",
|
|
23685
|
+
"details.project": "Proyecto",
|
|
23686
|
+
"details.variant": "Variante",
|
|
23687
|
+
"details.prompt": "Prompt",
|
|
23688
|
+
"details.result": "Resultado",
|
|
23689
|
+
"details.category": "Categor\xEDa",
|
|
23690
|
+
"details.batch": "Lote",
|
|
23691
|
+
"details.dependency": "Dependencia",
|
|
23692
|
+
"details.importance": "Importancia",
|
|
23693
|
+
"details.urgency": "Urgencia",
|
|
23694
|
+
"details.retryCount": "Reintentos",
|
|
23695
|
+
"details.retryBackoff": "Espera",
|
|
23696
|
+
"details.timeout": "Timeout",
|
|
23697
|
+
"details.createdAt": "Creada",
|
|
23698
|
+
"details.updatedAt": "Actualizada",
|
|
23699
|
+
"details.startedAt": "Iniciada",
|
|
23700
|
+
"details.finishedAt": "Finalizada",
|
|
23701
|
+
"details.scheduledAt": "Programada",
|
|
23702
|
+
"details.enabled": "Estado",
|
|
23703
|
+
"details.scheduleRule": "Regla",
|
|
23704
|
+
"details.maxInstances": "Instancias m\xE1x.",
|
|
23705
|
+
"details.maxRetries": "Reintentos m\xE1x.",
|
|
23706
|
+
"details.lastRun": "\xDAltima ejecuci\xF3n",
|
|
23707
|
+
"details.nextRun": "Pr\xF3xima ejecuci\xF3n",
|
|
23708
|
+
"details.taskId": "Tarea",
|
|
23709
|
+
"details.session": "Sesi\xF3n",
|
|
23710
|
+
"details.heartbeat": "Heartbeat",
|
|
23711
|
+
"details.process": "Procesos",
|
|
23712
|
+
"details.history": "Historial de ejecuciones",
|
|
23713
|
+
"details.noHistory": "Sin ejecuciones a\xFAn",
|
|
23714
|
+
"details.none": "\u2014",
|
|
23715
|
+
"details.default": "Predeterminado",
|
|
23716
|
+
"details.enabledYes": "Activada",
|
|
23717
|
+
"details.enabledNo": "Desactivada",
|
|
23718
|
+
"batch.selected": "{count} seleccionadas",
|
|
23719
|
+
"batch.retry": "Reintentar",
|
|
23720
|
+
"batch.cancel": "Cancelar",
|
|
23721
|
+
"batch.delete": "Eliminar",
|
|
23722
|
+
"dialog.cancelTask": "Cancelar tarea #{id}",
|
|
23723
|
+
"dialog.cancelTaskBody": "Detiene la espera en cola o finaliza el grupo de procesos activo.",
|
|
23724
|
+
"dialog.retryTask": "Reintentar tarea #{id}",
|
|
23725
|
+
"dialog.retryTaskBody": "Restablece los reintentos y vuelve a encolar la tarea.",
|
|
23726
|
+
"dialog.deleteTask": "Eliminar tarea #{id}",
|
|
23727
|
+
"dialog.deleteTaskBody": "Elimina permanentemente la tarea y su historial de ejecuci\xF3n.",
|
|
23728
|
+
"dialog.batchRetry": "Reintentar {count} tareas",
|
|
23729
|
+
"dialog.batchRetryBody": "Vuelve a encolar las tareas fallidas y detenidas de la selecci\xF3n.",
|
|
23730
|
+
"dialog.batchCancel": "Cancelar {count} tareas",
|
|
23731
|
+
"dialog.batchCancelBody": "Cancela las tareas en cola, en ejecuci\xF3n y en reintento de la selecci\xF3n.",
|
|
23732
|
+
"dialog.batchDelete": "Eliminar {count} tareas",
|
|
23733
|
+
"dialog.batchDeleteBody": "Elimina permanentemente las tareas inactivas de la selecci\xF3n.",
|
|
23734
|
+
"dialog.disableTemplate": "Desactivar programaci\xF3n",
|
|
23735
|
+
"dialog.disableTemplateBody": "Dejar\xE1 de crear tareas nuevas autom\xE1ticamente.",
|
|
23736
|
+
"dialog.deleteTemplate": "Eliminar programaci\xF3n",
|
|
23737
|
+
"dialog.deleteTemplateBody": "Elimina la plantilla sin borrar las tareas pasadas.",
|
|
23738
|
+
"dialog.triggerTemplate": "Ejecutar ahora",
|
|
23739
|
+
"dialog.triggerTemplateBody": "Crea y encola una tarea de inmediato.",
|
|
23740
|
+
"dialog.clearTitle": "Vaciar base de datos",
|
|
23741
|
+
"dialog.clearBody": "Se eliminar\xE1n todas las tareas, ejecuciones y programaciones.",
|
|
23742
|
+
"dialog.clearInstruction": "Escribe CLEAR para confirmar:",
|
|
23743
|
+
"dialog.restartGateway": "Reiniciar Gateway",
|
|
23744
|
+
"dialog.restartGatewayBody": "Guarda la configuraci\xF3n y reinicia el Gateway con PM2.",
|
|
23745
|
+
"dialog.restartGatewayRunningBody": "Hay {count} tarea(s) en ejecuci\xF3n que se interrumpir\xE1n. \xBFContinuar?",
|
|
23746
|
+
"dialog.copyManualTitle": "Copiar manualmente",
|
|
23747
|
+
"dialog.copyManualBody": "El navegador bloque\xF3 el portapapeles. Pulsa \u2318C o Ctrl+C.",
|
|
23748
|
+
"feedback.retryFailed": "El reintento fall\xF3",
|
|
23749
|
+
"feedback.cancelFailed": "La cancelaci\xF3n fall\xF3",
|
|
23750
|
+
"feedback.deleteFailed": "La eliminaci\xF3n fall\xF3",
|
|
23751
|
+
"feedback.requestFailed": "La solicitud fall\xF3",
|
|
23752
|
+
"feedback.triggered": "Tarea #{id} encolada",
|
|
23753
|
+
"feedback.taskCreated": "Tarea #{id} encolada",
|
|
23754
|
+
"feedback.taskUpdated": "Tarea #{id} actualizada",
|
|
23755
|
+
"feedback.taskCloned": "Tarea #{id} clonada",
|
|
23756
|
+
"feedback.taskRetried": "Tarea #{id} reencolada",
|
|
23757
|
+
"feedback.taskCancelled": "Tarea #{id} cancelada",
|
|
23758
|
+
"feedback.taskDeleted": "Tarea #{id} eliminada",
|
|
23759
|
+
"feedback.batchDone": "Lote completado ({count})",
|
|
23760
|
+
"feedback.templateCreated": "Programaci\xF3n creada",
|
|
23761
|
+
"feedback.templateUpdated": "Programaci\xF3n actualizada",
|
|
23762
|
+
"feedback.configSaved": "Ajustes guardados",
|
|
23763
|
+
"feedback.sessionCommandCopied": "Comando de sesi\xF3n copiado",
|
|
23764
|
+
"feedback.commandCopied": "Comando copiado",
|
|
23765
|
+
"feedback.restarting": "Reiniciando Gateway\u2026",
|
|
23766
|
+
"feedback.restartTimeout": "El Gateway a\xFAn no se ha recuperado.",
|
|
23767
|
+
"feedback.databaseCleared": "Base de datos vaciada. Copia de seguridad: {path}",
|
|
23768
|
+
"feedback.copyFailed": "La copia fall\xF3",
|
|
23769
|
+
"a11y.skip": "Saltar al contenido",
|
|
23770
|
+
"a11y.refreshing": "Actualizando"
|
|
23771
|
+
};
|
|
23772
|
+
}
|
|
23773
|
+
});
|
|
23774
|
+
|
|
23775
|
+
// src/web/locales/zh-CN.ts
|
|
23776
|
+
var ZH_CN;
|
|
23777
|
+
var init_zh_CN = __esm({
|
|
23778
|
+
"src/web/locales/zh-CN.ts"() {
|
|
23779
|
+
"use strict";
|
|
23780
|
+
ZH_CN = {
|
|
23781
|
+
"app.name": "SuperTask",
|
|
23782
|
+
"app.local": "\u672C\u5730",
|
|
23783
|
+
"nav.tasks": "\u4EFB\u52A1",
|
|
23784
|
+
"nav.templates": "\u5B9A\u65F6",
|
|
23785
|
+
"nav.runs": "\u6267\u884C",
|
|
23786
|
+
"nav.system": "\u7CFB\u7EDF",
|
|
23787
|
+
"page.tasks.title": "\u4EFB\u52A1\u961F\u5217",
|
|
23788
|
+
"page.templates.title": "\u5B9A\u65F6\u4EFB\u52A1",
|
|
23789
|
+
"page.runs.title": "\u6267\u884C\u8BB0\u5F55",
|
|
23790
|
+
"page.system.title": "\u7CFB\u7EDF\u8BBE\u7F6E",
|
|
23791
|
+
"theme.label": "\u4E3B\u9898",
|
|
23792
|
+
"theme.system": "\u8DDF\u968F\u7CFB\u7EDF",
|
|
23793
|
+
"theme.light": "\u6D45\u8272",
|
|
23794
|
+
"theme.dark": "\u6DF1\u8272",
|
|
23795
|
+
"language.label": "\u8BED\u8A00",
|
|
23796
|
+
"action.refresh": "\u5237\u65B0",
|
|
23797
|
+
"action.createTask": "\u65B0\u5EFA\u4EFB\u52A1",
|
|
23798
|
+
"action.createTemplate": "\u65B0\u5EFA\u5B9A\u65F6",
|
|
23799
|
+
"action.saveTask": "\u52A0\u5165\u961F\u5217",
|
|
23800
|
+
"action.updateTask": "\u4FDD\u5B58",
|
|
23801
|
+
"action.saveTemplate": "\u4FDD\u5B58",
|
|
23802
|
+
"action.edit": "\u7F16\u8F91",
|
|
23803
|
+
"action.clone": "\u514B\u9686\u518D\u8DD1",
|
|
23804
|
+
"action.details": "\u8BE6\u60C5",
|
|
23805
|
+
"action.retry": "\u91CD\u8BD5",
|
|
23806
|
+
"action.cancel": "\u53D6\u6D88",
|
|
23807
|
+
"action.delete": "\u5220\u9664",
|
|
23808
|
+
"action.trigger": "\u7ACB\u5373\u8FD0\u884C",
|
|
23809
|
+
"action.enable": "\u542F\u7528",
|
|
23810
|
+
"action.disable": "\u7981\u7528",
|
|
23811
|
+
"action.logs": "\u65E5\u5FD7",
|
|
23812
|
+
"action.hideLogs": "\u6536\u8D77",
|
|
23813
|
+
"action.save": "\u4FDD\u5B58\u914D\u7F6E",
|
|
23814
|
+
"action.saveAndRestart": "\u4FDD\u5B58\u5E76\u91CD\u542F",
|
|
23815
|
+
"action.clearDatabase": "\u6E05\u7A7A\u6570\u636E",
|
|
23816
|
+
"action.copy": "\u590D\u5236",
|
|
23817
|
+
"action.copyCommand": "\u590D\u5236\u547D\u4EE4",
|
|
23818
|
+
"action.continueSession": "\u7EE7\u7EED\u4F1A\u8BDD",
|
|
23819
|
+
"action.chooseFolder": "\u6D4F\u89C8",
|
|
23820
|
+
"action.home": "\u4E3B\u76EE\u5F55",
|
|
23821
|
+
"action.up": "\u4E0A\u7EA7",
|
|
23822
|
+
"action.showHidden": "\u663E\u793A\u9690\u85CF",
|
|
23823
|
+
"action.hideHidden": "\u9690\u85CF\u70B9\u76EE\u5F55",
|
|
23824
|
+
"action.chooseThisFolder": "\u9009\u62E9\u6B64\u76EE\u5F55",
|
|
23825
|
+
"action.close": "\u5173\u95ED",
|
|
23826
|
+
"action.confirm": "\u786E\u8BA4",
|
|
23827
|
+
"action.clearSelection": "\u53D6\u6D88\u9009\u62E9",
|
|
23828
|
+
"action.viewTasks": "\u67E5\u770B\u4EFB\u52A1",
|
|
23829
|
+
"action.more": "\u66F4\u591A",
|
|
23830
|
+
"action.selectAll": "\u5168\u9009",
|
|
23831
|
+
"action.openMenu": "\u6253\u5F00\u5BFC\u822A",
|
|
23832
|
+
"filter.all": "\u5168\u90E8",
|
|
23833
|
+
"filter.searchTasks": "\u641C\u7D22\u4EFB\u52A1\u3001\u6279\u6B21\u6216 #ID\u2026",
|
|
23834
|
+
"filter.allAgents": "\u5168\u90E8 Agent",
|
|
23835
|
+
"filter.allBatches": "\u5168\u90E8\u6279\u6B21",
|
|
23836
|
+
"filter.noResults": "\u65E0\u5339\u914D\u4EFB\u52A1",
|
|
23837
|
+
"filter.templateScope": "\u6A21\u677F #{id}",
|
|
23838
|
+
"filter.clearFilter": "\u6E05\u9664\u7B5B\u9009",
|
|
23839
|
+
"projects.title": "\u9879\u76EE",
|
|
23840
|
+
"projects.all": "\u5168\u90E8\u9879\u76EE",
|
|
23841
|
+
"projects.legacy": "\u672A\u5206\u7EC4",
|
|
23842
|
+
"projects.counts": "\u8FD0\u884C {running} \xB7 \u6392\u961F {pending} \xB7 \u5F02\u5E38 {failed}",
|
|
23843
|
+
"projects.successRate": "{rate}%",
|
|
23844
|
+
"projects.rate7d": "\u8FD1 7 \u5929\u6210\u529F\u7387",
|
|
23845
|
+
"stats.pending": "\u6392\u961F\u4E2D",
|
|
23846
|
+
"stats.running": "\u8FD0\u884C\u4E2D",
|
|
23847
|
+
"stats.done": "\u5DF2\u5B8C\u6210",
|
|
23848
|
+
"stats.failedDead": "\u5F02\u5E38",
|
|
23849
|
+
"stats.templates": "\u5168\u90E8",
|
|
23850
|
+
"stats.enabled": "\u5DF2\u542F\u7528",
|
|
23851
|
+
"stats.disabled": "\u5DF2\u7981\u7528",
|
|
23852
|
+
"stats.records": "\u603B\u8BB0\u5F55",
|
|
23853
|
+
"stats.pageDone": "\u6210\u529F",
|
|
23854
|
+
"stats.pageFailed": "\u5931\u8D25",
|
|
23855
|
+
"stats.pageRunning": "\u8FD0\u884C\u4E2D",
|
|
23856
|
+
"table.id": "ID",
|
|
23857
|
+
"table.task": "\u4EFB\u52A1",
|
|
23858
|
+
"table.name": "\u540D\u79F0",
|
|
23859
|
+
"table.agent": "Agent",
|
|
23860
|
+
"table.model": "\u6A21\u578B",
|
|
23861
|
+
"table.status": "\u72B6\u6001",
|
|
23862
|
+
"table.duration": "\u8017\u65F6",
|
|
23863
|
+
"table.retries": "\u91CD\u8BD5",
|
|
23864
|
+
"table.actions": "\u64CD\u4F5C",
|
|
23865
|
+
"table.type": "\u7C7B\u578B",
|
|
23866
|
+
"table.rule": "\u89C4\u5219",
|
|
23867
|
+
"table.lastRun": "\u4E0A\u6B21\u6267\u884C",
|
|
23868
|
+
"table.nextRun": "\u4E0B\u6B21\u6267\u884C",
|
|
23869
|
+
"table.run": "\u6267\u884C",
|
|
23870
|
+
"table.session": "\u4F1A\u8BDD",
|
|
23871
|
+
"table.heartbeat": "\u5FC3\u8DF3",
|
|
23872
|
+
"table.startedAt": "\u5F00\u59CB\u65F6\u95F4",
|
|
23873
|
+
"table.pid": "\u8FDB\u7A0B",
|
|
23874
|
+
"table.pidTooltip": "Worker \u203A Guardian",
|
|
23875
|
+
"status.pending": "\u6392\u961F\u4E2D",
|
|
23876
|
+
"status.running": "\u8FD0\u884C\u4E2D",
|
|
23877
|
+
"status.done": "\u5DF2\u5B8C\u6210",
|
|
23878
|
+
"status.failed": "\u7B49\u5F85\u91CD\u8BD5",
|
|
23879
|
+
"status.dead_letter": "\u5DF2\u505C\u6B62",
|
|
23880
|
+
"status.cancelled": "\u5DF2\u53D6\u6D88",
|
|
23881
|
+
"status.unknown": "\u672A\u77E5",
|
|
23882
|
+
"status.executionStillActive": "\u8FDB\u7A0B\u9000\u51FA\u4E2D",
|
|
23883
|
+
"status.waitingDep": "\u7B49 #{id}",
|
|
23884
|
+
"status.batchBusy": "\u6279\u6B21\u5360\u7528",
|
|
23885
|
+
"status.retryIn": "{duration}\u540E\u91CD\u8BD5",
|
|
23886
|
+
"runStatus.running": "\u8FD0\u884C\u4E2D",
|
|
23887
|
+
"runStatus.done": "\u6210\u529F",
|
|
23888
|
+
"runStatus.failed": "\u5931\u8D25",
|
|
23889
|
+
"schedule.cron": "Cron",
|
|
23890
|
+
"schedule.recurring": "\u5FAA\u73AF",
|
|
23891
|
+
"schedule.delayed": "\u4E00\u6B21\u6027",
|
|
23892
|
+
"schedule.unknown": "\u672A\u77E5",
|
|
23893
|
+
"schedule.enabled": "\u542F\u7528",
|
|
23894
|
+
"schedule.disabled": "\u7981\u7528",
|
|
23895
|
+
"schedule.overdue": "\u5373\u5C06\u6267\u884C",
|
|
23896
|
+
"schedule.seconds": "{count} \u79D2",
|
|
23897
|
+
"schedule.minutes": "{count} \u5206\u949F",
|
|
23898
|
+
"schedule.hours": "{count} \u5C0F\u65F6",
|
|
23899
|
+
"schedule.days": "{count} \u5929",
|
|
23900
|
+
"schedule.cronPreset.hourly": "\u6BCF\u5C0F\u65F6",
|
|
23901
|
+
"schedule.cronPreset.daily9": "\u6BCF\u5929 09:00",
|
|
23902
|
+
"schedule.cronPreset.weekday9": "\u5DE5\u4F5C\u65E5 09:00",
|
|
23903
|
+
"schedule.cronPreset.weeklyMon": "\u6BCF\u5468\u4E00 09:00",
|
|
23904
|
+
"duration.seconds": "\u79D2",
|
|
23905
|
+
"duration.minutes": "\u5206\u949F",
|
|
23906
|
+
"duration.hours": "\u5C0F\u65F6",
|
|
23907
|
+
"duration.days": "\u5929",
|
|
23908
|
+
"duration.every": "\u6BCF {duration}",
|
|
23909
|
+
"duration.immediate": "\u7ACB\u5373",
|
|
23910
|
+
"duration.systemDefault": "\u9ED8\u8BA4\u8D85\u65F6",
|
|
23911
|
+
"duration.custom": "\u81EA\u5B9A\u4E49",
|
|
23912
|
+
"duration.unit": "\u5355\u4F4D",
|
|
23913
|
+
"pagination.previous": "\u4E0A\u4E00\u9875",
|
|
23914
|
+
"pagination.next": "\u4E0B\u4E00\u9875",
|
|
23915
|
+
"pagination.summary": "{page} / {pages} \xB7 \u5171 {total} \u6761",
|
|
23916
|
+
"empty.tasks": "\u6682\u65E0\u4EFB\u52A1",
|
|
23917
|
+
"empty.templates": "\u6682\u65E0\u5B9A\u65F6\u4EFB\u52A1",
|
|
23918
|
+
"empty.runs": "\u6682\u65E0\u6267\u884C\u8BB0\u5F55",
|
|
23919
|
+
"empty.running": "\u5F53\u524D\u65E0\u8FD0\u884C\u4E2D\u4EFB\u52A1",
|
|
23920
|
+
"task.createTitle": "\u65B0\u5EFA\u4EFB\u52A1",
|
|
23921
|
+
"task.editTitle": "\u7F16\u8F91\u4EFB\u52A1",
|
|
23922
|
+
"task.projectExisting": "\u8FD0\u884C {running} \xB7 \u6392\u961F {pending} \xB7 \u5F02\u5E38 {failed}",
|
|
23923
|
+
"task.projectNew": "\u65B0\u9879\u76EE\u76EE\u5F55",
|
|
23924
|
+
"template.createTitle": "\u65B0\u5EFA\u5B9A\u65F6\u4EFB\u52A1",
|
|
23925
|
+
"template.editTitle": "\u7F16\u8F91\u5B9A\u65F6\u4EFB\u52A1",
|
|
23926
|
+
"template.name": "\u540D\u79F0",
|
|
23927
|
+
"template.cwd": "\u9879\u76EE\u76EE\u5F55",
|
|
23928
|
+
"template.agent": "Agent",
|
|
23929
|
+
"template.model": "\u6A21\u578B",
|
|
23930
|
+
"template.variant": "Variant",
|
|
23931
|
+
"template.prompt": "\u63D0\u793A\u8BCD",
|
|
23932
|
+
"template.dependsOn": "\u524D\u7F6E\u4F9D\u8D56",
|
|
23933
|
+
"template.dependsOnNone": "\u65E0\u4F9D\u8D56",
|
|
23934
|
+
"template.scheduleType": "\u8C03\u5EA6\u7C7B\u578B",
|
|
23935
|
+
"template.cronExpr": "Cron \u8868\u8FBE\u5F0F",
|
|
23936
|
+
"template.interval": "\u6267\u884C\u95F4\u9694",
|
|
23937
|
+
"template.runAt": "\u6267\u884C\u65F6\u95F4",
|
|
23938
|
+
"template.advanced": "\u9AD8\u7EA7\u9009\u9879",
|
|
23939
|
+
"template.category": "\u5206\u7C7B",
|
|
23940
|
+
"template.batchId": "\u6279\u6B21",
|
|
23941
|
+
"template.importance": "\u91CD\u8981\u5EA6",
|
|
23942
|
+
"template.urgency": "\u7D27\u6025\u5EA6",
|
|
23943
|
+
"template.maxInstances": "\u5E76\u53D1\u4E0A\u9650",
|
|
23944
|
+
"template.maxRetries": "\u91CD\u8BD5\u6B21\u6570",
|
|
23945
|
+
"template.retryBackoff": "\u9000\u907F\u57FA\u51C6",
|
|
23946
|
+
"template.timeout": "\u8D85\u65F6",
|
|
23947
|
+
"catalog.chooseProject": "\u8BF7\u5148\u9009\u76EE\u5F55",
|
|
23948
|
+
"catalog.defaultProvider": "\u9ED8\u8BA4",
|
|
23949
|
+
"catalog.defaultModel": "\u9ED8\u8BA4\u6A21\u578B",
|
|
23950
|
+
"catalog.defaultVariant": "\u9ED8\u8BA4",
|
|
23951
|
+
"catalog.loading": "\u52A0\u8F7D\u76EE\u5F55\u80FD\u529B\u2026",
|
|
23952
|
+
"catalog.loaded": "{agents} \u4E2A Agent \xB7 {models} \u4E2A\u6A21\u578B",
|
|
23953
|
+
"catalog.failed": "\u8BFB\u53D6\u5931\u8D25\uFF1A{error}",
|
|
23954
|
+
"catalog.primary": "\u4E3B",
|
|
23955
|
+
"catalog.subagent": "\u5B50",
|
|
23956
|
+
"catalog.all": "\u901A\u7528",
|
|
23957
|
+
"directory.title": "\u9009\u62E9\u9879\u76EE\u76EE\u5F55",
|
|
23958
|
+
"directory.empty": "\u65E0\u5B50\u76EE\u5F55",
|
|
23624
23959
|
"system.worker": "Worker",
|
|
23625
23960
|
"system.scheduler": "Scheduler",
|
|
23626
23961
|
"system.watchdog": "Watchdog",
|
|
23627
|
-
"system.watchdogCleanup": "
|
|
23628
|
-
"system.health": "
|
|
23629
|
-
"system.healthy": "
|
|
23630
|
-
"system.degraded": "
|
|
23631
|
-
"system.reconnecting": "
|
|
23632
|
-
"system.disabled": "
|
|
23633
|
-
"system.uptime": "
|
|
23634
|
-
"system.failures": "
|
|
23635
|
-
"system.lastActivity": "
|
|
23636
|
-
"system.lock": "
|
|
23637
|
-
"system.concurrency": "
|
|
23638
|
-
"system.maxConcurrency": "
|
|
23639
|
-
"system.pollInterval": "
|
|
23640
|
-
"system.heartbeatInterval": "
|
|
23641
|
-
"system.taskTimeout": "
|
|
23642
|
-
"system.schedulerEnabled": "
|
|
23643
|
-
"system.checkInterval": "
|
|
23644
|
-
"system.activeTemplates": "
|
|
23645
|
-
"system.heartbeatTimeout": "
|
|
23646
|
-
"system.cleanupInterval": "
|
|
23647
|
-
"system.retentionDays": "
|
|
23962
|
+
"system.watchdogCleanup": "\u5386\u53F2\u6E05\u7406",
|
|
23963
|
+
"system.health": "\u8FD0\u884C\u5065\u5EB7",
|
|
23964
|
+
"system.healthy": "\u6B63\u5E38",
|
|
23965
|
+
"system.degraded": "\u964D\u7EA7",
|
|
23966
|
+
"system.reconnecting": "\u91CD\u8FDE\u4E2D",
|
|
23967
|
+
"system.disabled": "\u505C\u7528",
|
|
23968
|
+
"system.uptime": "\u8FD0\u884C\u65F6\u957F",
|
|
23969
|
+
"system.failures": "\u8FDE\u7EED\u5931\u8D25",
|
|
23970
|
+
"system.lastActivity": "\u6700\u8FD1\u6D3B\u8DC3",
|
|
23971
|
+
"system.lock": "\u5B9E\u4F8B\u9501",
|
|
23972
|
+
"system.concurrency": "\u5E76\u53D1",
|
|
23973
|
+
"system.maxConcurrency": "\u6700\u5927\u5E76\u53D1",
|
|
23974
|
+
"system.pollInterval": "\u8F6E\u8BE2\u95F4\u9694",
|
|
23975
|
+
"system.heartbeatInterval": "\u5FC3\u8DF3\u95F4\u9694",
|
|
23976
|
+
"system.taskTimeout": "\u9ED8\u8BA4\u8D85\u65F6",
|
|
23977
|
+
"system.schedulerEnabled": "\u542F\u7528\u8C03\u5EA6\u5668",
|
|
23978
|
+
"system.checkInterval": "\u68C0\u67E5\u95F4\u9694",
|
|
23979
|
+
"system.activeTemplates": "\u542F\u7528\u6A21\u677F",
|
|
23980
|
+
"system.heartbeatTimeout": "\u5FC3\u8DF3\u8D85\u65F6",
|
|
23981
|
+
"system.cleanupInterval": "\u6E05\u7406\u95F4\u9694",
|
|
23982
|
+
"system.retentionDays": "\u4FDD\u7559\u5929\u6570",
|
|
23648
23983
|
"system.milliseconds": "ms",
|
|
23649
23984
|
"system.seconds": "s",
|
|
23650
23985
|
"system.minutes": "min",
|
|
23651
23986
|
"system.hours": "h",
|
|
23652
23987
|
"system.days": "d",
|
|
23653
|
-
"system.configForeground": "
|
|
23654
|
-
"system.configApplied": "
|
|
23655
|
-
"system.configPending": "
|
|
23656
|
-
"system.configRestartManually": "
|
|
23657
|
-
"system.savedValue": "
|
|
23658
|
-
"system.runtimeValue": "
|
|
23659
|
-
"system.runningTasks": "
|
|
23660
|
-
"system.configFile": "
|
|
23661
|
-
"system.path": "
|
|
23662
|
-
"system.fileExists": "
|
|
23663
|
-
"system.yes": "
|
|
23664
|
-
"system.noDefault": "
|
|
23665
|
-
"system.danger": "
|
|
23666
|
-
"system.dangerDescription": "
|
|
23667
|
-
"logs.command": "
|
|
23668
|
-
"logs.output": "
|
|
23669
|
-
"logs.error": "
|
|
23670
|
-
"logs.tools": "
|
|
23671
|
-
"logs.raw": "
|
|
23672
|
-
"logs.noText": "
|
|
23673
|
-
"logs.loading": "
|
|
23674
|
-
"logs.live": "
|
|
23675
|
-
"logs.steps": "
|
|
23988
|
+
"system.configForeground": "\u524D\u53F0\u8FD0\u884C \xB7 \u91CD\u542F\u540E\u751F\u6548",
|
|
23989
|
+
"system.configApplied": "\u8FD0\u884C\u503C\u4E0E\u5DF2\u4FDD\u5B58\u914D\u7F6E\u4E00\u81F4",
|
|
23990
|
+
"system.configPending": "\u5B58\u5728\u5F85\u751F\u6548\u6539\u52A8 \xB7 \u91CD\u542F Gateway \u540E\u5E94\u7528",
|
|
23991
|
+
"system.configRestartManually": "\u5B58\u5728\u5F85\u751F\u6548\u6539\u52A8 \xB7 \u8BF7\u624B\u52A8\u91CD\u542F Gateway",
|
|
23992
|
+
"system.savedValue": "\u5DF2\u4FDD\u5B58",
|
|
23993
|
+
"system.runtimeValue": "\u8FD0\u884C\u4E2D",
|
|
23994
|
+
"system.runningTasks": "\u8FD0\u884C\u4E2D\u6267\u884C \xB7 {running} / {limit}",
|
|
23995
|
+
"system.configFile": "\u914D\u7F6E\u6587\u4EF6",
|
|
23996
|
+
"system.path": "\u8DEF\u5F84",
|
|
23997
|
+
"system.fileExists": "\u6587\u4EF6\u72B6\u6001",
|
|
23998
|
+
"system.yes": "\u5DF2\u5B58\u5728",
|
|
23999
|
+
"system.noDefault": "\u9ED8\u8BA4\u914D\u7F6E",
|
|
24000
|
+
"system.danger": "\u5371\u9669\u64CD\u4F5C",
|
|
24001
|
+
"system.dangerDescription": "\u6E05\u7A7A\u5168\u90E8\u4EFB\u52A1\u3001\u6267\u884C\u8BB0\u5F55\u4E0E\u5B9A\u65F6\u6A21\u677F\uFF1B\u64CD\u4F5C\u524D\u81EA\u52A8\u5907\u4EFD\u6570\u636E\u5E93\u3002",
|
|
24002
|
+
"logs.command": "\u6267\u884C\u547D\u4EE4",
|
|
24003
|
+
"logs.output": "\u8F93\u51FA",
|
|
24004
|
+
"logs.error": "\u9519\u8BEF",
|
|
24005
|
+
"logs.tools": "\u5DE5\u5177\u8C03\u7528",
|
|
24006
|
+
"logs.raw": "\u539F\u59CB JSONL",
|
|
24007
|
+
"logs.noText": "\u6682\u65E0\u6587\u672C\u8F93\u51FA",
|
|
24008
|
+
"logs.loading": "\u52A0\u8F7D\u65E5\u5FD7\u2026",
|
|
24009
|
+
"logs.live": "\u5B9E\u65F6\u6D41",
|
|
24010
|
+
"logs.steps": "\u6B65\u9AA4",
|
|
23676
24011
|
"logs.tokens": "Tokens",
|
|
23677
|
-
"logs.tokInput": "
|
|
23678
|
-
"logs.tokOutput": "
|
|
23679
|
-
"logs.tokReasoning": "
|
|
23680
|
-
"logs.tokCache": "
|
|
23681
|
-
"logs.tokCacheRead": "
|
|
23682
|
-
"logs.tokCacheWrite": "
|
|
23683
|
-
"logs.cost": "
|
|
23684
|
-
"logs.autoScroll": "
|
|
23685
|
-
"logs.rootCause": "
|
|
23686
|
-
"
|
|
23687
|
-
"
|
|
23688
|
-
"inspector.tab.
|
|
23689
|
-
"inspector.
|
|
23690
|
-
"inspector.
|
|
23691
|
-
"inspector.
|
|
23692
|
-
"inspector.
|
|
23693
|
-
"
|
|
23694
|
-
"
|
|
23695
|
-
"details.
|
|
23696
|
-
"details.
|
|
23697
|
-
"details.
|
|
23698
|
-
"details.
|
|
23699
|
-
"details.raw": "Raw JSON",
|
|
23700
|
-
"details.copySuccess": "Copied",
|
|
24012
|
+
"logs.tokInput": "\u8F93\u5165",
|
|
24013
|
+
"logs.tokOutput": "\u8F93\u51FA",
|
|
24014
|
+
"logs.tokReasoning": "\u63A8\u7406",
|
|
24015
|
+
"logs.tokCache": "\u7F13\u5B58",
|
|
24016
|
+
"logs.tokCacheRead": "\u8BFB",
|
|
24017
|
+
"logs.tokCacheWrite": "\u5199",
|
|
24018
|
+
"logs.cost": "\u8D39\u7528",
|
|
24019
|
+
"logs.autoScroll": "\u81EA\u52A8\u6EDA\u5E95",
|
|
24020
|
+
"logs.rootCause": "\u6839\u56E0",
|
|
24021
|
+
"inspector.tab.overview": "\u6982\u89C8",
|
|
24022
|
+
"inspector.tab.output": "\u5B9E\u65F6\u8F93\u51FA",
|
|
24023
|
+
"inspector.tab.history": "\u6267\u884C\u5386\u53F2",
|
|
24024
|
+
"inspector.dependencies": "\u4F9D\u8D56\u5173\u7CFB",
|
|
24025
|
+
"inspector.upstream": "\u524D\u7F6E",
|
|
24026
|
+
"inspector.downstream": "\u4E0B\u6E38",
|
|
24027
|
+
"inspector.failureSummary": "\u5931\u8D25\u539F\u56E0",
|
|
24028
|
+
"details.title": "\u8BE6\u60C5",
|
|
24029
|
+
"details.taskTitle": "\u4EFB\u52A1 #{id}",
|
|
24030
|
+
"details.runTitle": "\u6267\u884C #{id}",
|
|
24031
|
+
"details.templateTitle": "\u6A21\u677F #{id}",
|
|
24032
|
+
"details.raw": "\u539F\u59CB JSON",
|
|
24033
|
+
"details.copySuccess": "\u5DF2\u590D\u5236",
|
|
23701
24034
|
"details.id": "ID",
|
|
23702
|
-
"details.project": "
|
|
23703
|
-
"details.variant": "Variant",
|
|
23704
|
-
"details.prompt": "
|
|
23705
|
-
"details.result": "
|
|
23706
|
-
"details.category": "
|
|
23707
|
-
"details.batch": "
|
|
23708
|
-
"details.dependency": "
|
|
23709
|
-
"details.importance": "
|
|
23710
|
-
"details.urgency": "
|
|
23711
|
-
"details.retryCount": "
|
|
23712
|
-
"details.retryBackoff": "
|
|
23713
|
-
"details.timeout": "
|
|
23714
|
-
"details.createdAt": "
|
|
23715
|
-
"details.updatedAt": "
|
|
23716
|
-
"details.startedAt": "
|
|
23717
|
-
"details.finishedAt": "
|
|
23718
|
-
"details.scheduledAt": "
|
|
23719
|
-
"details.enabled": "
|
|
23720
|
-
"details.scheduleRule": "
|
|
23721
|
-
"details.maxInstances": "
|
|
23722
|
-
"details.maxRetries": "
|
|
23723
|
-
"details.lastRun": "
|
|
23724
|
-
"details.nextRun": "
|
|
23725
|
-
"details.taskId": "
|
|
23726
|
-
"details.session": "
|
|
23727
|
-
"details.heartbeat": "
|
|
23728
|
-
"details.process": "
|
|
23729
|
-
"details.history": "
|
|
23730
|
-
"details.noHistory": "
|
|
23731
|
-
"details.none": "\u2014",
|
|
23732
|
-
"details.default": "
|
|
23733
|
-
"details.enabledYes": "
|
|
23734
|
-
"details.enabledNo": "
|
|
23735
|
-
"batch.selected": "{count}
|
|
23736
|
-
"batch.retry": "
|
|
23737
|
-
"batch.cancel": "
|
|
23738
|
-
"batch.delete": "
|
|
23739
|
-
"dialog.cancelTask": "
|
|
23740
|
-
"dialog.cancelTaskBody": "
|
|
23741
|
-
"dialog.retryTask": "
|
|
23742
|
-
"dialog.retryTaskBody": "
|
|
23743
|
-
"dialog.deleteTask": "
|
|
23744
|
-
"dialog.deleteTaskBody": "
|
|
23745
|
-
"dialog.batchRetry": "
|
|
23746
|
-
"dialog.batchRetryBody": "
|
|
23747
|
-
"dialog.batchCancel": "
|
|
23748
|
-
"dialog.batchCancelBody": "
|
|
23749
|
-
"dialog.batchDelete": "
|
|
23750
|
-
"dialog.batchDeleteBody": "
|
|
23751
|
-
"dialog.disableTemplate": "
|
|
23752
|
-
"dialog.disableTemplateBody": "
|
|
23753
|
-
"dialog.deleteTemplate": "
|
|
23754
|
-
"dialog.deleteTemplateBody": "
|
|
23755
|
-
"dialog.triggerTemplate": "
|
|
23756
|
-
"dialog.triggerTemplateBody": "
|
|
23757
|
-
"dialog.clearTitle": "
|
|
23758
|
-
"dialog.clearBody": "
|
|
23759
|
-
"dialog.clearInstruction": "
|
|
23760
|
-
"dialog.restartGateway": "
|
|
23761
|
-
"dialog.restartGatewayBody": "
|
|
23762
|
-
"dialog.restartGatewayRunningBody": "{count}
|
|
23763
|
-
"dialog.copyManualTitle": "
|
|
23764
|
-
"dialog.copyManualBody": "
|
|
23765
|
-
"feedback.retryFailed": "
|
|
23766
|
-
"feedback.cancelFailed": "
|
|
23767
|
-
"feedback.deleteFailed": "
|
|
23768
|
-
"feedback.requestFailed": "
|
|
23769
|
-
"feedback.triggered": "
|
|
23770
|
-
"feedback.taskCreated": "
|
|
23771
|
-
"feedback.taskUpdated": "
|
|
23772
|
-
"feedback.taskCloned": "
|
|
23773
|
-
"feedback.taskRetried": "
|
|
23774
|
-
"feedback.taskCancelled": "
|
|
23775
|
-
"feedback.taskDeleted": "
|
|
23776
|
-
"feedback.batchDone": "
|
|
23777
|
-
"feedback.templateCreated": "
|
|
23778
|
-
"feedback.templateUpdated": "
|
|
23779
|
-
"feedback.configSaved": "
|
|
23780
|
-
"feedback.sessionCommandCopied": "
|
|
23781
|
-
"feedback.commandCopied": "
|
|
23782
|
-
"feedback.restarting": "
|
|
23783
|
-
"feedback.restartTimeout": "Gateway
|
|
23784
|
-
"feedback.databaseCleared": "
|
|
23785
|
-
"feedback.copyFailed": "
|
|
23786
|
-
"a11y.skip": "
|
|
23787
|
-
"a11y.refreshing": "
|
|
24035
|
+
"details.project": "\u9879\u76EE\u76EE\u5F55",
|
|
24036
|
+
"details.variant": "Variant",
|
|
24037
|
+
"details.prompt": "\u63D0\u793A\u8BCD",
|
|
24038
|
+
"details.result": "\u8F93\u51FA",
|
|
24039
|
+
"details.category": "\u5206\u7C7B",
|
|
24040
|
+
"details.batch": "\u6279\u6B21",
|
|
24041
|
+
"details.dependency": "\u4F9D\u8D56",
|
|
24042
|
+
"details.importance": "\u91CD\u8981\u5EA6",
|
|
24043
|
+
"details.urgency": "\u7D27\u6025\u5EA6",
|
|
24044
|
+
"details.retryCount": "\u91CD\u8BD5",
|
|
24045
|
+
"details.retryBackoff": "\u9000\u907F\u57FA\u51C6",
|
|
24046
|
+
"details.timeout": "\u8D85\u65F6",
|
|
24047
|
+
"details.createdAt": "\u521B\u5EFA\u65F6\u95F4",
|
|
24048
|
+
"details.updatedAt": "\u66F4\u65B0\u65F6\u95F4",
|
|
24049
|
+
"details.startedAt": "\u5F00\u59CB\u65F6\u95F4",
|
|
24050
|
+
"details.finishedAt": "\u5B8C\u6210\u65F6\u95F4",
|
|
24051
|
+
"details.scheduledAt": "\u8BA1\u5212\u65F6\u95F4",
|
|
24052
|
+
"details.enabled": "\u542F\u7528",
|
|
24053
|
+
"details.scheduleRule": "\u8C03\u5EA6\u89C4\u5219",
|
|
24054
|
+
"details.maxInstances": "\u5E76\u53D1\u4E0A\u9650",
|
|
24055
|
+
"details.maxRetries": "\u91CD\u8BD5\u4E0A\u9650",
|
|
24056
|
+
"details.lastRun": "\u4E0A\u6B21\u6267\u884C",
|
|
24057
|
+
"details.nextRun": "\u4E0B\u6B21\u6267\u884C",
|
|
24058
|
+
"details.taskId": "\u4EFB\u52A1",
|
|
24059
|
+
"details.session": "\u4F1A\u8BDD",
|
|
24060
|
+
"details.heartbeat": "\u5FC3\u8DF3",
|
|
24061
|
+
"details.process": "\u8FDB\u7A0B",
|
|
24062
|
+
"details.history": "\u6267\u884C\u5386\u53F2",
|
|
24063
|
+
"details.noHistory": "\u6682\u65E0\u6267\u884C\u8BB0\u5F55",
|
|
24064
|
+
"details.none": "\u2014",
|
|
24065
|
+
"details.default": "\u9ED8\u8BA4",
|
|
24066
|
+
"details.enabledYes": "\u5DF2\u542F\u7528",
|
|
24067
|
+
"details.enabledNo": "\u5DF2\u7981\u7528",
|
|
24068
|
+
"batch.selected": "\u5DF2\u9009 {count} \u9879",
|
|
24069
|
+
"batch.retry": "\u6279\u91CF\u91CD\u8BD5",
|
|
24070
|
+
"batch.cancel": "\u6279\u91CF\u53D6\u6D88",
|
|
24071
|
+
"batch.delete": "\u6279\u91CF\u5220\u9664",
|
|
24072
|
+
"dialog.cancelTask": "\u53D6\u6D88\u4EFB\u52A1 #{id}",
|
|
24073
|
+
"dialog.cancelTaskBody": "\u4EFB\u52A1\u5C06\u505C\u6B62\u6392\u961F\u6216\u7EC8\u6B62\u5F53\u524D\u6267\u884C\u3002",
|
|
24074
|
+
"dialog.retryTask": "\u91CD\u8BD5\u4EFB\u52A1 #{id}",
|
|
24075
|
+
"dialog.retryTaskBody": "\u91CD\u7F6E\u91CD\u8BD5\u8BA1\u6570\u5E76\u91CD\u65B0\u52A0\u5165\u961F\u5217\u3002",
|
|
24076
|
+
"dialog.deleteTask": "\u5220\u9664\u4EFB\u52A1 #{id}",
|
|
24077
|
+
"dialog.deleteTaskBody": "\u5220\u9664\u8BE5\u4EFB\u52A1\u53CA\u5176\u5168\u90E8\u6267\u884C\u8BB0\u5F55\uFF0C\u4E0D\u53EF\u6062\u590D\u3002",
|
|
24078
|
+
"dialog.batchRetry": "\u6279\u91CF\u91CD\u8BD5 {count} \u4E2A\u4EFB\u52A1",
|
|
24079
|
+
"dialog.batchRetryBody": "\u4EC5\u5931\u8D25\u6216\u5DF2\u505C\u6B62\u7684\u4EFB\u52A1\u4F1A\u88AB\u91CD\u65B0\u5165\u961F\u3002",
|
|
24080
|
+
"dialog.batchCancel": "\u6279\u91CF\u53D6\u6D88 {count} \u4E2A\u4EFB\u52A1",
|
|
24081
|
+
"dialog.batchCancelBody": "\u6392\u961F\u4E2D\u3001\u8FD0\u884C\u4E2D\u6216\u7B49\u5F85\u91CD\u8BD5\u7684\u4EFB\u52A1\u5C06\u88AB\u53D6\u6D88\u3002",
|
|
24082
|
+
"dialog.batchDelete": "\u6279\u91CF\u5220\u9664 {count} \u4E2A\u4EFB\u52A1",
|
|
24083
|
+
"dialog.batchDeleteBody": "\u5220\u9664\u6240\u9009\u975E\u8FD0\u884C\u4E2D\u4EFB\u52A1\u53CA\u5176\u6267\u884C\u8BB0\u5F55\uFF0C\u4E0D\u53EF\u6062\u590D\u3002",
|
|
24084
|
+
"dialog.disableTemplate": "\u7981\u7528\u5B9A\u65F6\u4EFB\u52A1",
|
|
24085
|
+
"dialog.disableTemplateBody": "\u7981\u7528\u540E\u4E0D\u518D\u81EA\u52A8\u521B\u5EFA\u65B0\u4EFB\u52A1\u3002",
|
|
24086
|
+
"dialog.deleteTemplate": "\u5220\u9664\u5B9A\u65F6\u4EFB\u52A1",
|
|
24087
|
+
"dialog.deleteTemplateBody": "\u5220\u9664\u6A21\u677F\u914D\u7F6E\uFF0C\u4E0D\u5F71\u54CD\u5DF2\u751F\u6210\u7684\u5386\u53F2\u4EFB\u52A1\u3002",
|
|
24088
|
+
"dialog.triggerTemplate": "\u7ACB\u5373\u8FD0\u884C\u5B9A\u65F6\u4EFB\u52A1",
|
|
24089
|
+
"dialog.triggerTemplateBody": "\u7ACB\u5373\u751F\u6210\u4E00\u6761\u4EFB\u52A1\u5E76\u52A0\u5165\u961F\u5217\u3002",
|
|
24090
|
+
"dialog.clearTitle": "\u6E05\u7A7A\u6570\u636E\u5E93",
|
|
24091
|
+
"dialog.clearBody": "\u6B64\u64CD\u4F5C\u4F1A\u6E05\u7A7A\u6240\u6709\u4EFB\u52A1\u3001\u6267\u884C\u8BB0\u5F55\u548C\u5B9A\u65F6\u6A21\u677F\u3002",
|
|
24092
|
+
"dialog.clearInstruction": "\u8BF7\u8F93\u5165 CLEAR \u4EE5\u786E\u8BA4\uFF1A",
|
|
24093
|
+
"dialog.restartGateway": "\u91CD\u542F Gateway",
|
|
24094
|
+
"dialog.restartGatewayBody": "\u4FDD\u5B58\u914D\u7F6E\u5E76\u7531 PM2 \u91CD\u542F Gateway \u4F7F\u65B0\u914D\u7F6E\u751F\u6548\u3002",
|
|
24095
|
+
"dialog.restartGatewayRunningBody": "\u5F53\u524D\u6709 {count} \u4E2A\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u91CD\u542F\u4F1A\u4E2D\u65AD\u5E76\u91CD\u65B0\u6392\u961F\u3002\u786E\u8BA4\u7EE7\u7EED\uFF1F",
|
|
24096
|
+
"dialog.copyManualTitle": "\u624B\u52A8\u590D\u5236",
|
|
24097
|
+
"dialog.copyManualBody": "\u6D4F\u89C8\u5668\u62E6\u622A\u4E86\u526A\u8D34\u677F\u8BBF\u95EE\uFF0C\u8BF7\u6309 \u2318C / Ctrl+C \u590D\u5236\u3002",
|
|
24098
|
+
"feedback.retryFailed": "\u91CD\u8BD5\u5931\u8D25",
|
|
24099
|
+
"feedback.cancelFailed": "\u53D6\u6D88\u5931\u8D25",
|
|
24100
|
+
"feedback.deleteFailed": "\u5220\u9664\u5931\u8D25",
|
|
24101
|
+
"feedback.requestFailed": "\u8BF7\u6C42\u5931\u8D25",
|
|
24102
|
+
"feedback.triggered": "\u5DF2\u5165\u961F\u4EFB\u52A1 #{id}",
|
|
24103
|
+
"feedback.taskCreated": "\u5DF2\u5165\u961F\u4EFB\u52A1 #{id}",
|
|
24104
|
+
"feedback.taskUpdated": "\u5DF2\u66F4\u65B0\u4EFB\u52A1 #{id}",
|
|
24105
|
+
"feedback.taskCloned": "\u5DF2\u514B\u9686\u4EFB\u52A1 #{id}",
|
|
24106
|
+
"feedback.taskRetried": "\u4EFB\u52A1 #{id} \u5DF2\u91CD\u65B0\u5165\u961F",
|
|
24107
|
+
"feedback.taskCancelled": "\u4EFB\u52A1 #{id} \u5DF2\u53D6\u6D88",
|
|
24108
|
+
"feedback.taskDeleted": "\u4EFB\u52A1 #{id} \u5DF2\u5220\u9664",
|
|
24109
|
+
"feedback.batchDone": "\u6279\u91CF\u64CD\u4F5C\u5B8C\u6210\uFF08\u6210\u529F {count}\uFF09",
|
|
24110
|
+
"feedback.templateCreated": "\u5B9A\u65F6\u4EFB\u52A1\u5DF2\u521B\u5EFA",
|
|
24111
|
+
"feedback.templateUpdated": "\u5B9A\u65F6\u4EFB\u52A1\u5DF2\u66F4\u65B0",
|
|
24112
|
+
"feedback.configSaved": "\u914D\u7F6E\u5DF2\u4FDD\u5B58",
|
|
24113
|
+
"feedback.sessionCommandCopied": "\u4F1A\u8BDD\u547D\u4EE4\u5DF2\u590D\u5236",
|
|
24114
|
+
"feedback.commandCopied": "\u6267\u884C\u547D\u4EE4\u5DF2\u590D\u5236",
|
|
24115
|
+
"feedback.restarting": "Gateway \u91CD\u542F\u4E2D\u2026",
|
|
24116
|
+
"feedback.restartTimeout": "Gateway \u5C1A\u672A\u6062\u590D\uFF0C\u8BF7\u7A0D\u540E\u5237\u65B0\u68C0\u67E5\u3002",
|
|
24117
|
+
"feedback.databaseCleared": "\u6570\u636E\u5E93\u5DF2\u6E05\u7A7A\uFF0C\u5907\u4EFD\uFF1A{path}",
|
|
24118
|
+
"feedback.copyFailed": "\u590D\u5236\u5931\u8D25",
|
|
24119
|
+
"a11y.skip": "\u8DF3\u81F3\u4E3B\u5185\u5BB9",
|
|
24120
|
+
"a11y.refreshing": "\u5237\u65B0\u4E2D"
|
|
23788
24121
|
};
|
|
23789
24122
|
}
|
|
23790
24123
|
});
|
|
23791
24124
|
|
|
24125
|
+
// src/web/locales/index.ts
|
|
24126
|
+
function getLocaleDefinition(locale) {
|
|
24127
|
+
return DEFINITIONS_BY_CODE.get(locale) ?? DEFINITIONS_BY_CODE.get(DEFAULT_LOCALE);
|
|
24128
|
+
}
|
|
24129
|
+
function parseLocale(raw2) {
|
|
24130
|
+
if (!raw2) return null;
|
|
24131
|
+
const normalized = raw2.trim().replace(/_/g, "-").toLowerCase();
|
|
24132
|
+
if (!normalized) return null;
|
|
24133
|
+
const exact = EXACT_ALIAS_MAP.get(normalized);
|
|
24134
|
+
if (exact) return exact;
|
|
24135
|
+
const primary = normalized.split("-")[0];
|
|
24136
|
+
return primary ? PRIMARY_SUBTAG_MAP.get(primary) ?? null : null;
|
|
24137
|
+
}
|
|
24138
|
+
function negotiateLocale(acceptLanguage, fallback = DEFAULT_LOCALE) {
|
|
24139
|
+
if (!acceptLanguage) return fallback;
|
|
24140
|
+
const candidates = acceptLanguage.split(",").map((part, index2) => {
|
|
24141
|
+
const [tagPart, ...params] = part.trim().split(";");
|
|
24142
|
+
let weight = 1;
|
|
24143
|
+
for (const param of params) {
|
|
24144
|
+
const match2 = /^q=([0-9.]+)$/i.exec(param.trim());
|
|
24145
|
+
if (match2) {
|
|
24146
|
+
const parsed = Number(match2[1]);
|
|
24147
|
+
if (Number.isFinite(parsed)) weight = parsed;
|
|
24148
|
+
}
|
|
24149
|
+
}
|
|
24150
|
+
return { tag: tagPart?.trim() ?? "", weight, index: index2 };
|
|
24151
|
+
}).filter((item) => item.tag.length > 0 && item.weight > 0).sort((left, right) => right.weight - left.weight || left.index - right.index);
|
|
24152
|
+
for (const candidate of candidates) {
|
|
24153
|
+
const matched = parseLocale(candidate.tag);
|
|
24154
|
+
if (matched) return matched;
|
|
24155
|
+
}
|
|
24156
|
+
return fallback;
|
|
24157
|
+
}
|
|
24158
|
+
function resolveMessage(locale, key) {
|
|
24159
|
+
const def = getLocaleDefinition(locale);
|
|
24160
|
+
return def.messages[key] ?? EN[key];
|
|
24161
|
+
}
|
|
24162
|
+
function isKnownMessageKey(key) {
|
|
24163
|
+
return key in EN;
|
|
24164
|
+
}
|
|
24165
|
+
var LOCALE_REGISTRY, DEFAULT_LOCALE, SUPPORTED_LOCALES, DEFINITIONS_BY_CODE, EXACT_ALIAS_MAP, PRIMARY_SUBTAG_MAP, ALL_MESSAGE_KEYS;
|
|
24166
|
+
var init_locales = __esm({
|
|
24167
|
+
"src/web/locales/index.ts"() {
|
|
24168
|
+
"use strict";
|
|
24169
|
+
init_en();
|
|
24170
|
+
init_es();
|
|
24171
|
+
init_zh_CN();
|
|
24172
|
+
LOCALE_REGISTRY = [
|
|
24173
|
+
{
|
|
24174
|
+
code: "zh-CN",
|
|
24175
|
+
htmlLang: "zh-CN",
|
|
24176
|
+
intlLocale: "zh-CN",
|
|
24177
|
+
shortLabel: "\u4E2D",
|
|
24178
|
+
nativeLabel: "\u4E2D\u6587",
|
|
24179
|
+
aliases: ["zh", "zh-cn", "zh-hans", "zh-sg"],
|
|
24180
|
+
messages: ZH_CN
|
|
24181
|
+
},
|
|
24182
|
+
{
|
|
24183
|
+
code: "en",
|
|
24184
|
+
htmlLang: "en",
|
|
24185
|
+
intlLocale: "en-US",
|
|
24186
|
+
shortLabel: "EN",
|
|
24187
|
+
nativeLabel: "English",
|
|
24188
|
+
aliases: ["en", "en-us", "en-gb", "en-au", "en-ca"],
|
|
24189
|
+
messages: EN
|
|
24190
|
+
},
|
|
24191
|
+
{
|
|
24192
|
+
code: "es",
|
|
24193
|
+
htmlLang: "es",
|
|
24194
|
+
intlLocale: "es-ES",
|
|
24195
|
+
shortLabel: "ES",
|
|
24196
|
+
nativeLabel: "Espa\xF1ol",
|
|
24197
|
+
aliases: ["es", "es-es", "es-mx", "es-419", "es-ar", "es-co", "es-cl"],
|
|
24198
|
+
messages: ES
|
|
24199
|
+
}
|
|
24200
|
+
];
|
|
24201
|
+
DEFAULT_LOCALE = "zh-CN";
|
|
24202
|
+
SUPPORTED_LOCALES = LOCALE_REGISTRY.map((entry) => entry.code);
|
|
24203
|
+
DEFINITIONS_BY_CODE = new Map(
|
|
24204
|
+
LOCALE_REGISTRY.map((entry) => [entry.code, entry])
|
|
24205
|
+
);
|
|
24206
|
+
EXACT_ALIAS_MAP = /* @__PURE__ */ new Map();
|
|
24207
|
+
PRIMARY_SUBTAG_MAP = /* @__PURE__ */ new Map();
|
|
24208
|
+
for (const entry of LOCALE_REGISTRY) {
|
|
24209
|
+
const codeKey = entry.code.toLowerCase();
|
|
24210
|
+
EXACT_ALIAS_MAP.set(codeKey, entry.code);
|
|
24211
|
+
for (const alias of entry.aliases) {
|
|
24212
|
+
EXACT_ALIAS_MAP.set(alias.toLowerCase(), entry.code);
|
|
24213
|
+
}
|
|
24214
|
+
const primary = codeKey.split("-")[0];
|
|
24215
|
+
if (primary && !PRIMARY_SUBTAG_MAP.has(primary)) {
|
|
24216
|
+
PRIMARY_SUBTAG_MAP.set(primary, entry.code);
|
|
24217
|
+
}
|
|
24218
|
+
}
|
|
24219
|
+
ALL_MESSAGE_KEYS = Object.keys(EN);
|
|
24220
|
+
}
|
|
24221
|
+
});
|
|
24222
|
+
|
|
24223
|
+
// src/web/i18n.ts
|
|
24224
|
+
function t(locale, key, values = {}) {
|
|
24225
|
+
const template = resolveMessage(locale, key);
|
|
24226
|
+
return template.replace(/\{([a-zA-Z]+)\}/g, (_, name) => String(values[name] ?? `{${name}}`));
|
|
24227
|
+
}
|
|
24228
|
+
function statusText(locale, status) {
|
|
24229
|
+
const key = `status.${status}`;
|
|
24230
|
+
return isKnownMessageKey(key) ? t(locale, key) : t(locale, "status.unknown");
|
|
24231
|
+
}
|
|
24232
|
+
function runStatusText(locale, status) {
|
|
24233
|
+
const key = `runStatus.${status}`;
|
|
24234
|
+
return isKnownMessageKey(key) ? t(locale, key) : t(locale, "status.unknown");
|
|
24235
|
+
}
|
|
24236
|
+
function resolveEditedRunAt(originalEpoch, originalLocal, currentLocal) {
|
|
24237
|
+
if (originalEpoch !== null && originalLocal === currentLocal) return originalEpoch;
|
|
24238
|
+
return new Date(currentLocal).getTime();
|
|
24239
|
+
}
|
|
24240
|
+
function formatRelative(timestamp2, locale) {
|
|
24241
|
+
if (!timestamp2) return "\u2014";
|
|
24242
|
+
const deltaMs = timestamp2 - Date.now();
|
|
24243
|
+
const abs = Math.abs(deltaMs);
|
|
24244
|
+
const { intlLocale } = getLocaleDefinition(locale);
|
|
24245
|
+
const formatter = new Intl.RelativeTimeFormat(intlLocale, { numeric: "auto" });
|
|
24246
|
+
if (abs < 6e4) return formatter.format(Math.round(deltaMs / 1e3), "second");
|
|
24247
|
+
if (abs < 36e5) return formatter.format(Math.round(deltaMs / 6e4), "minute");
|
|
24248
|
+
if (abs < 864e5) return formatter.format(Math.round(deltaMs / 36e5), "hour");
|
|
24249
|
+
return formatter.format(Math.round(deltaMs / 864e5), "day");
|
|
24250
|
+
}
|
|
24251
|
+
function formatFuture(timestamp2, locale) {
|
|
24252
|
+
if (!timestamp2) return "\u2014";
|
|
24253
|
+
if (timestamp2 < Date.now()) return t(locale, "schedule.overdue");
|
|
24254
|
+
return formatRelative(timestamp2, locale);
|
|
24255
|
+
}
|
|
24256
|
+
function formatDateTime(value, locale) {
|
|
24257
|
+
if (!value) return "\u2014";
|
|
24258
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
24259
|
+
const { intlLocale } = getLocaleDefinition(locale);
|
|
24260
|
+
return new Intl.DateTimeFormat(intlLocale, {
|
|
24261
|
+
month: "short",
|
|
24262
|
+
day: "2-digit",
|
|
24263
|
+
hour: "2-digit",
|
|
24264
|
+
minute: "2-digit"
|
|
24265
|
+
}).format(date);
|
|
24266
|
+
}
|
|
24267
|
+
function formatInterval(milliseconds, locale) {
|
|
24268
|
+
const { intlLocale } = getLocaleDefinition(locale);
|
|
24269
|
+
const formatter = new Intl.NumberFormat(intlLocale, {
|
|
24270
|
+
maximumFractionDigits: 1
|
|
24271
|
+
});
|
|
24272
|
+
if (milliseconds < 6e4) {
|
|
24273
|
+
return t(locale, "schedule.seconds", { count: formatter.format(milliseconds / 1e3) });
|
|
24274
|
+
}
|
|
24275
|
+
if (milliseconds < 36e5) {
|
|
24276
|
+
return t(locale, "schedule.minutes", { count: formatter.format(milliseconds / 6e4) });
|
|
24277
|
+
}
|
|
24278
|
+
if (milliseconds < 864e5) {
|
|
24279
|
+
return t(locale, "schedule.hours", { count: formatter.format(milliseconds / 36e5) });
|
|
24280
|
+
}
|
|
24281
|
+
return t(locale, "schedule.days", { count: formatter.format(milliseconds / 864e5) });
|
|
24282
|
+
}
|
|
24283
|
+
function formatDuration(startAt, endAt) {
|
|
24284
|
+
if (!startAt) return "\u2014";
|
|
24285
|
+
const start = new Date(startAt).getTime();
|
|
24286
|
+
const end = endAt ? new Date(endAt).getTime() : Date.now();
|
|
24287
|
+
const diffMs = end - start;
|
|
24288
|
+
if (diffMs < 1e3) return "<1s";
|
|
24289
|
+
const seconds = Math.floor(diffMs / 1e3);
|
|
24290
|
+
if (seconds < 60) return `${seconds}s`;
|
|
24291
|
+
if (seconds < 3600) return `${Math.floor(seconds / 60)}m ${seconds % 60}s`;
|
|
24292
|
+
return `${Math.floor(seconds / 3600)}h ${Math.floor(seconds % 3600 / 60)}m`;
|
|
24293
|
+
}
|
|
24294
|
+
function formatCountdown(targetMs, locale) {
|
|
24295
|
+
if (!targetMs) return null;
|
|
24296
|
+
const remaining = targetMs - Date.now();
|
|
24297
|
+
if (remaining <= 0) return null;
|
|
24298
|
+
return formatInterval(remaining, locale);
|
|
24299
|
+
}
|
|
24300
|
+
function clientMessages(locale) {
|
|
24301
|
+
return Object.fromEntries(
|
|
24302
|
+
ALL_MESSAGE_KEYS.map((key) => [key, t(locale, key)])
|
|
24303
|
+
);
|
|
24304
|
+
}
|
|
24305
|
+
function esc(value) {
|
|
24306
|
+
if (!value) return "";
|
|
24307
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
24308
|
+
}
|
|
24309
|
+
var init_i18n = __esm({
|
|
24310
|
+
"src/web/i18n.ts"() {
|
|
24311
|
+
"use strict";
|
|
24312
|
+
init_locales();
|
|
24313
|
+
}
|
|
24314
|
+
});
|
|
24315
|
+
|
|
23792
24316
|
// src/web/assets/client.ts
|
|
23793
24317
|
var APP_JS;
|
|
23794
24318
|
var init_client = __esm({
|
|
@@ -26442,10 +26966,9 @@ var init_assets = __esm({
|
|
|
26442
26966
|
refresh: icon("refresh"),
|
|
26443
26967
|
close: icon("close")
|
|
26444
26968
|
};
|
|
26445
|
-
I18N_BUNDLES =
|
|
26446
|
-
|
|
26447
|
-
|
|
26448
|
-
};
|
|
26969
|
+
I18N_BUNDLES = Object.fromEntries(
|
|
26970
|
+
SUPPORTED_LOCALES.map((locale) => [locale, buildI18nBundle(locale)])
|
|
26971
|
+
);
|
|
26449
26972
|
CSS_HASH = hashContent(APP_CSS);
|
|
26450
26973
|
JS_HASH = hashContent(APP_JS);
|
|
26451
26974
|
CSS_URL = `/assets/app.css?v=${CSS_HASH}`;
|
|
@@ -26582,7 +27105,7 @@ function renderSidebarProjects(locale, activeTab, sidebar) {
|
|
|
26582
27105
|
function renderLayout(options) {
|
|
26583
27106
|
const { locale, activeTab, topbar, body, sidebar } = options;
|
|
26584
27107
|
const pageTitle = options.title || t(locale, PAGE_TITLE_KEYS[activeTab]);
|
|
26585
|
-
const language = locale
|
|
27108
|
+
const language = getLocaleDefinition(locale).htmlLang;
|
|
26586
27109
|
const runningCount = sidebar.overview.global.activeExecution;
|
|
26587
27110
|
const issueCount = sidebar.overview.global.failed + sidebar.overview.global.dead_letter;
|
|
26588
27111
|
const healthOk = sidebar.health.status === "ok";
|
|
@@ -26621,7 +27144,7 @@ function renderLayout(options) {
|
|
|
26621
27144
|
activeTab,
|
|
26622
27145
|
activeProject: sidebar.activeProject
|
|
26623
27146
|
}).replace(/</g, "\\u003c");
|
|
26624
|
-
return `<!DOCTYPE html><html lang="${language}"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><meta name="color-scheme" content="light dark"><meta name="theme-color" content="#f6f7f9"><link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2' y='2' width='20' height='20' rx='6' fill='%234f46e5'/%3E%3Cpath d='m7 12 3 3 7-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"><title>${esc(pageTitle)} \xB7 SuperTask</title><script>(function(){try{var p=localStorage.getItem('supertask-theme')||'system';var d=p==='system'?(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'):p;document.documentElement.dataset.theme=d;document.documentElement.dataset.themePreference=p}catch(e){}})();</script><link rel="stylesheet" href="${CSS_URL}"></head><body>${iconSprite()}<a class="skip-link" href="#main">${t(locale, "a11y.skip")}</a><div id="sidebar-backdrop" class="sidebar-backdrop" onclick="toggleSidebar(false)"></div><div class="workspace"><aside id="sidebar" class="sidebar" aria-label="Sidebar"><div class="sidebar-head"><a class="brand" href="/"><span class="brand-mark">${icon("brand")}</span><span>${t(locale, "app.name")}</span></a><button type="button" class="icon-btn sidebar-close" onclick="toggleSidebar(false)" aria-label="${t(locale, "action.close")}">${icon("close")}</button></div><nav id="sidebar-nav" class="sidebar-nav" aria-label="Primary">` + navItems.map((item) => `<a href="${item.href}" class="nav-item${activeTab === item.id ? " active" : ""}"${activeTab === item.id ? ' aria-current="page"' : ""}>${icon(item.icon)}<span class="nav-label">${t(locale, `nav.${item.id}`)}</span><span class="nav-badges">${item.badges}</span></a>`).join("") + `</nav><div class="sidebar-section-head"><span>${t(locale, "projects.title")}</span><span class="num">${sidebar.overview.projects.length}</span></div><div id="sidebar-projects" class="project-list">${renderSidebarProjects(locale, activeTab, sidebar)}</div><div class="sidebar-foot"><a id="gateway-pulse" class="pulse-box" href="/system"><div class="pulse-row"><span class="pulse-status"><span class="pulse-dot${healthOk ? "" : " degraded"}"></span>${t(locale, healthOk ? "system.healthy" : "system.degraded")}</span><span class="pulse-meta" title="${esc(t(locale, "system.concurrency"))}">${runningCount} / ${sidebar.maxConcurrency}</span></div><div class="pulse-bar"><div class="pulse-bar-fill" style="width:${concurrencyPct}%"></div></div></a><div class="sidebar-controls"><
|
|
27147
|
+
return `<!DOCTYPE html><html lang="${language}"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><meta name="color-scheme" content="light dark"><meta name="theme-color" content="#f6f7f9"><link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2' y='2' width='20' height='20' rx='6' fill='%234f46e5'/%3E%3Cpath d='m7 12 3 3 7-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"><title>${esc(pageTitle)} \xB7 SuperTask</title><script>(function(){try{var p=localStorage.getItem('supertask-theme')||'system';var d=p==='system'?(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'):p;document.documentElement.dataset.theme=d;document.documentElement.dataset.themePreference=p}catch(e){}})();</script><link rel="stylesheet" href="${CSS_URL}"></head><body>${iconSprite()}<a class="skip-link" href="#main">${t(locale, "a11y.skip")}</a><div id="sidebar-backdrop" class="sidebar-backdrop" onclick="toggleSidebar(false)"></div><div class="workspace"><aside id="sidebar" class="sidebar" aria-label="Sidebar"><div class="sidebar-head"><a class="brand" href="/"><span class="brand-mark">${icon("brand")}</span><span>${t(locale, "app.name")}</span></a><button type="button" class="icon-btn sidebar-close" onclick="toggleSidebar(false)" aria-label="${t(locale, "action.close")}">${icon("close")}</button></div><nav id="sidebar-nav" class="sidebar-nav" aria-label="Primary">` + navItems.map((item) => `<a href="${item.href}" class="nav-item${activeTab === item.id ? " active" : ""}"${activeTab === item.id ? ' aria-current="page"' : ""}>${icon(item.icon)}<span class="nav-label">${t(locale, `nav.${item.id}`)}</span><span class="nav-badges">${item.badges}</span></a>`).join("") + `</nav><div class="sidebar-section-head"><span>${t(locale, "projects.title")}</span><span class="num">${sidebar.overview.projects.length}</span></div><div id="sidebar-projects" class="project-list">${renderSidebarProjects(locale, activeTab, sidebar)}</div><div class="sidebar-foot"><a id="gateway-pulse" class="pulse-box" href="/system"><div class="pulse-row"><span class="pulse-status"><span class="pulse-dot${healthOk ? "" : " degraded"}"></span>${t(locale, healthOk ? "system.healthy" : "system.degraded")}</span><span class="pulse-meta" title="${esc(t(locale, "system.concurrency"))}">${runningCount} / ${sidebar.maxConcurrency}</span></div><div class="pulse-bar"><div class="pulse-bar-fill" style="width:${concurrencyPct}%"></div></div></a><div class="sidebar-controls"><label class="sidebar-select-wrap lang-select-wrap" aria-label="${t(locale, "language.label")}">${icon("globe")}<select id="lang-select" onchange="setLocale(this.value)" title="${t(locale, "language.label")}">` + LOCALE_REGISTRY.map((entry) => `<option value="${esc(entry.code)}"${entry.code === locale ? " selected" : ""}>${esc(entry.nativeLabel)}</option>`).join("") + `</select></label><label class="sidebar-select-wrap theme-select-wrap" aria-label="${t(locale, "theme.label")}">${icon("sun")}<select id="theme-select" onchange="setTheme(this.value)" title="${t(locale, "theme.label")}"><option value="system">${t(locale, "theme.system")}</option><option value="light">${t(locale, "theme.light")}</option><option value="dark">${t(locale, "theme.dark")}</option></select></label></div></div></aside><div class="main-area"><header id="main-topbar" class="topbar"><div class="topbar-left"><button type="button" class="icon-btn menu-btn" onclick="toggleSidebar(true)" aria-label="${t(locale, "action.openMenu")}">${icon("menu")}</button>${topbar}</div></header><main id="main" tabindex="-1"><div id="page-content" class="content-body">${body}</div></main></div></div><div id="inspector-backdrop" class="inspector-backdrop" onclick="closeInspector()"></div><aside id="inspector-drawer" class="inspector" aria-label="${t(locale, "details.title")}"><div class="inspector-head"><div class="inspector-title-row"><div class="inspector-title-group"><h2 id="inspector-title">${t(locale, "details.title")}</h2><span id="inspector-badge" class="badge" hidden></span></div><button type="button" class="icon-btn" onclick="closeInspector()" aria-label="${t(locale, "action.close")}">${icon("close")}</button></div><div id="inspector-actions" class="inspector-actions"></div></div><div id="inspector-tabs" class="inspector-tabs" hidden></div><div id="inspector-body" class="inspector-body"></div></aside><div id="global-row-menu" class="menu-dropdown menu-floating" role="menu" hidden></div><div id="toast-region" class="toast-region" popover="manual" role="status" aria-live="polite"></div>` + (activeTab === "tasks" || activeTab === "templates" ? `<dialog id="directory-dialog" class="directory-dialog"><div class="dialog-head"><h2>${t(locale, "directory.title")}</h2><button type="button" class="icon-btn" onclick="document.getElementById('directory-dialog').close()" aria-label="${t(locale, "action.close")}">${icon("close")}</button></div><div class="dialog-body"><div class="directory-toolbar"><button id="directory-home" type="button" class="btn btn-xs">${t(locale, "action.home")}</button><button id="directory-up" type="button" class="btn btn-xs">${t(locale, "action.up")}</button><button id="directory-hidden" type="button" class="btn btn-xs">${t(locale, "action.showHidden")}</button><div id="directory-path" class="directory-path mono"></div></div><div id="directory-list" class="directory-list"></div></div><div class="dialog-actions"><button type="button" class="btn" onclick="document.getElementById('directory-dialog').close()">${t(locale, "action.cancel")}</button><button id="directory-choose" type="button" class="btn btn-primary">${icon("folder")}${t(locale, "action.chooseThisFolder")}</button></div></dialog>` : "") + `<dialog id="copy-dialog"><div class="dialog-head"><div><h2>${t(locale, "dialog.copyManualTitle")}</h2><p>${t(locale, "dialog.copyManualBody")}</p></div><button type="button" class="icon-btn" onclick="document.getElementById('copy-dialog').close()" aria-label="${t(locale, "action.close")}">${icon("close")}</button></div><div class="dialog-body"><textarea id="copy-manual" class="json-view copy-manual mono" readonly rows="4" spellcheck="false"></textarea></div><div class="dialog-actions"><button type="button" class="btn btn-primary" onclick="document.getElementById('copy-dialog').close()">${t(locale, "action.close")}</button></div></dialog><dialog id="confirm-dialog"><div class="dialog-head"><h2 id="confirm-title"></h2><button type="button" class="icon-btn" onclick="document.getElementById('confirm-dialog').close('cancel')" aria-label="${t(locale, "action.close")}">${icon("close")}</button></div><div class="dialog-body"><p id="confirm-body" class="confirm-copy"></p></div><div class="dialog-actions"><button type="button" class="btn" onclick="document.getElementById('confirm-dialog').close('cancel')">${t(locale, "action.cancel")}</button><button id="confirm-ok" type="button" class="btn btn-primary" onclick="document.getElementById('confirm-dialog').close('confirm')">${t(locale, "action.confirm")}</button></div></dialog>` + (activeTab === "system" ? `<dialog id="danger-dialog"><div class="dialog-head"><h2>${t(locale, "dialog.clearTitle")}</h2><button type="button" class="icon-btn" onclick="document.getElementById('danger-dialog').close('cancel')" aria-label="${t(locale, "action.close")}">${icon("close")}</button></div><div class="dialog-body"><p class="confirm-copy"><strong>${t(locale, "dialog.clearBody")}</strong>${t(locale, "dialog.clearInstruction")}</p><input id="danger-confirmation" class="danger-input mono" autocomplete="off" spellcheck="false" placeholder="CLEAR" oninput="document.getElementById('danger-ok').disabled=this.value!=='CLEAR'"></div><div class="dialog-actions"><button type="button" class="btn" onclick="document.getElementById('danger-dialog').close('cancel')">${t(locale, "action.cancel")}</button><button id="danger-ok" type="button" class="btn btn-danger" disabled onclick="document.getElementById('danger-dialog').close('confirm')">${t(locale, "action.clearDatabase")}</button></div></dialog>` : "") + `<script type="application/json" id="supertask-boot">${bootPayload}</script><script defer src="${i18nAssetUrl(locale)}"></script><script defer src="${JS_URL}"></script></body></html>`;
|
|
26625
27148
|
}
|
|
26626
27149
|
function emptyState(title) {
|
|
26627
27150
|
return `<div class="empty-state"><div><div class="empty-icon">${icon("inbox")}</div><h3>${esc(title)}</h3></div></div>`;
|
|
@@ -27042,7 +27565,8 @@ function parseTaskPayload(value) {
|
|
|
27042
27565
|
urgency: integer2("urgency", 3),
|
|
27043
27566
|
maxRetries: integer2("maxRetries", 3),
|
|
27044
27567
|
retryBackoffMs: duration("retryBackoff", "30s", true),
|
|
27045
|
-
timeoutMs: duration("timeout", null)
|
|
27568
|
+
timeoutMs: duration("timeout", null),
|
|
27569
|
+
...Object.hasOwn(input, "metadata") ? { metadata: normalizeTaskMetadata(input.metadata) } : {}
|
|
27046
27570
|
};
|
|
27047
27571
|
}
|
|
27048
27572
|
function editableTaskPayload(input) {
|
|
@@ -27058,7 +27582,8 @@ function editableTaskPayload(input) {
|
|
|
27058
27582
|
urgency: input.urgency ?? 3,
|
|
27059
27583
|
maxRetries: input.maxRetries ?? 3,
|
|
27060
27584
|
retryBackoffMs: input.retryBackoffMs ?? 3e4,
|
|
27061
|
-
timeoutMs: input.timeoutMs ?? null
|
|
27585
|
+
timeoutMs: input.timeoutMs ?? null,
|
|
27586
|
+
...input.metadata === void 0 ? {} : { metadata: input.metadata }
|
|
27062
27587
|
};
|
|
27063
27588
|
}
|
|
27064
27589
|
function parseCloneOverrides(value) {
|
|
@@ -27121,6 +27646,9 @@ function parseCloneOverrides(value) {
|
|
|
27121
27646
|
if (Object.hasOwn(input, "timeout")) {
|
|
27122
27647
|
overrides.timeoutMs = duration("timeout", null);
|
|
27123
27648
|
}
|
|
27649
|
+
if (Object.hasOwn(input, "metadata")) {
|
|
27650
|
+
overrides.metadata = normalizeTaskMetadata(input.metadata);
|
|
27651
|
+
}
|
|
27124
27652
|
return overrides;
|
|
27125
27653
|
}
|
|
27126
27654
|
function parseTemplatePayload(value) {
|
|
@@ -27147,7 +27675,8 @@ function parseTemplatePayload(value) {
|
|
|
27147
27675
|
maxInstances: integer2("maxInstances", 1),
|
|
27148
27676
|
maxRetries: integer2("maxRetries", 3),
|
|
27149
27677
|
retryBackoffMs: duration("retryBackoff", "30s", true),
|
|
27150
|
-
timeoutMs: duration("timeout", null)
|
|
27678
|
+
timeoutMs: duration("timeout", null),
|
|
27679
|
+
...Object.hasOwn(input, "metadata") ? { metadata: normalizeTaskMetadata(input.metadata) } : {}
|
|
27151
27680
|
};
|
|
27152
27681
|
}
|
|
27153
27682
|
function parseIdArray(value) {
|
|
@@ -27167,6 +27696,7 @@ var init_payload = __esm({
|
|
|
27167
27696
|
"src/web/payload.ts"() {
|
|
27168
27697
|
"use strict";
|
|
27169
27698
|
init_duration();
|
|
27699
|
+
init_metadata();
|
|
27170
27700
|
}
|
|
27171
27701
|
});
|
|
27172
27702
|
|
|
@@ -27678,6 +28208,7 @@ __export(web_exports, {
|
|
|
27678
28208
|
sessionCommand: () => sessionCommand,
|
|
27679
28209
|
setDashboardRuntimeConfig: () => setDashboardRuntimeConfig
|
|
27680
28210
|
});
|
|
28211
|
+
import { timingSafeEqual } from "crypto";
|
|
27681
28212
|
import {
|
|
27682
28213
|
existsSync as existsSync7,
|
|
27683
28214
|
mkdirSync as mkdirSync3,
|
|
@@ -27764,19 +28295,18 @@ function parseRunStatus(value) {
|
|
|
27764
28295
|
return RUN_STATUSES.has(value) ? value : null;
|
|
27765
28296
|
}
|
|
27766
28297
|
function resolveLocale(c) {
|
|
27767
|
-
const requested = c.req.query("lang");
|
|
27768
|
-
if (requested
|
|
28298
|
+
const requested = parseLocale(c.req.query("lang"));
|
|
28299
|
+
if (requested) return requested;
|
|
27769
28300
|
const cookie = c.req.header("Cookie") ?? "";
|
|
27770
28301
|
const match2 = /(?:^|;\s*)supertask_locale=([^;]+)/.exec(cookie);
|
|
27771
28302
|
if (match2) {
|
|
27772
28303
|
try {
|
|
27773
|
-
const saved = decodeURIComponent(match2[1]);
|
|
27774
|
-
if (saved
|
|
28304
|
+
const saved = parseLocale(decodeURIComponent(match2[1]));
|
|
28305
|
+
if (saved) return saved;
|
|
27775
28306
|
} catch {
|
|
27776
28307
|
}
|
|
27777
28308
|
}
|
|
27778
|
-
|
|
27779
|
-
return accepted.startsWith("en") ? "en" : "zh-CN";
|
|
28309
|
+
return negotiateLocale(c.req.header("Accept-Language"));
|
|
27780
28310
|
}
|
|
27781
28311
|
function listChildDirectories(path) {
|
|
27782
28312
|
return readdirSync(path, { withFileTypes: true }).flatMap((entry) => {
|
|
@@ -27884,6 +28414,15 @@ data: ${JSON.stringify(data)}
|
|
|
27884
28414
|
|
|
27885
28415
|
`);
|
|
27886
28416
|
}
|
|
28417
|
+
function isValidApiBearerToken(headerValue, expected) {
|
|
28418
|
+
if (!headerValue) return false;
|
|
28419
|
+
const match2 = /^Bearer\s+(.+)$/i.exec(headerValue.trim());
|
|
28420
|
+
if (!match2) return false;
|
|
28421
|
+
const provided = Buffer.from(match2[1], "utf8");
|
|
28422
|
+
const target = Buffer.from(expected, "utf8");
|
|
28423
|
+
if (provided.length !== target.length) return false;
|
|
28424
|
+
return timingSafeEqual(provided, target);
|
|
28425
|
+
}
|
|
27887
28426
|
function canonicalizeDbPath(filePath) {
|
|
27888
28427
|
if (filePath === ":memory:") return filePath;
|
|
27889
28428
|
try {
|
|
@@ -27904,6 +28443,7 @@ var init_web = __esm({
|
|
|
27904
28443
|
init_dist();
|
|
27905
28444
|
init_drizzle_orm();
|
|
27906
28445
|
init_db2();
|
|
28446
|
+
init_metadata();
|
|
27907
28447
|
init_opencode_catalog();
|
|
27908
28448
|
init_opencode_cli();
|
|
27909
28449
|
init_task_batch();
|
|
@@ -27978,10 +28518,19 @@ var init_web = __esm({
|
|
|
27978
28518
|
}
|
|
27979
28519
|
return next();
|
|
27980
28520
|
});
|
|
28521
|
+
app.use("/api/*", async (c, next) => {
|
|
28522
|
+
const configured = process.env.SUPERTASK_API_TOKEN?.trim();
|
|
28523
|
+
if (!configured) return next();
|
|
28524
|
+
if (!isValidApiBearerToken(c.req.header("Authorization"), configured)) {
|
|
28525
|
+
return c.json({ error: "Unauthorized" }, 401);
|
|
28526
|
+
}
|
|
28527
|
+
return next();
|
|
28528
|
+
});
|
|
27981
28529
|
app.get("/assets/app.css", (c) => serveAppCss(c));
|
|
27982
28530
|
app.get("/assets/app.js", (c) => serveAppJs(c));
|
|
27983
|
-
|
|
27984
|
-
|
|
28531
|
+
for (const locale of SUPPORTED_LOCALES) {
|
|
28532
|
+
app.get(`/assets/i18n-${locale}.js`, (c) => serveI18nJs(c, locale));
|
|
28533
|
+
}
|
|
27985
28534
|
app.get("/health", (c) => {
|
|
27986
28535
|
const health = getGatewayHealth();
|
|
27987
28536
|
return c.json(health, health.status === "ok" ? 200 : 503);
|
|
@@ -27993,6 +28542,7 @@ var init_web = __esm({
|
|
|
27993
28542
|
return c.body(null, 204);
|
|
27994
28543
|
});
|
|
27995
28544
|
app.get("/api/events", (c) => {
|
|
28545
|
+
const scopeCwd = c.req.query("cwd")?.trim() || "";
|
|
27996
28546
|
const encoder = new TextEncoder();
|
|
27997
28547
|
let cleanup = null;
|
|
27998
28548
|
const stream = new ReadableStream({
|
|
@@ -28007,6 +28557,10 @@ var init_web = __esm({
|
|
|
28007
28557
|
}
|
|
28008
28558
|
};
|
|
28009
28559
|
const unsubscribe = gatewayEvents.subscribe((event) => {
|
|
28560
|
+
if (scopeCwd) {
|
|
28561
|
+
const eventCwd = "cwd" in event ? event.cwd : void 0;
|
|
28562
|
+
if (eventCwd !== void 0 && eventCwd !== scopeCwd) return;
|
|
28563
|
+
}
|
|
28010
28564
|
safeEnqueue(formatSseFrame(event.type, event));
|
|
28011
28565
|
}, { excludeRunLogs: true });
|
|
28012
28566
|
const keepalive = setInterval(() => {
|
|
@@ -28354,12 +28908,28 @@ data: ${JSON.stringify({ ts: Date.now() })}
|
|
|
28354
28908
|
TaskService.listCompact(listOptions),
|
|
28355
28909
|
countFilteredTasks(listOptions)
|
|
28356
28910
|
]);
|
|
28357
|
-
const
|
|
28911
|
+
const taskIds = tasks4.map((task) => task.id);
|
|
28912
|
+
const latestRuns = await TaskRunService.getLatestMetaByTaskIds(taskIds);
|
|
28913
|
+
const runCountMap = /* @__PURE__ */ new Map();
|
|
28914
|
+
if (taskIds.length > 0) {
|
|
28915
|
+
const placeholders = taskIds.map(() => "?").join(",");
|
|
28916
|
+
const countRows = sqlite.prepare(
|
|
28917
|
+
`SELECT task_id AS taskId, COUNT(*) AS cnt FROM task_runs WHERE task_id IN (${placeholders}) GROUP BY task_id`
|
|
28918
|
+
).all(...taskIds);
|
|
28919
|
+
for (const row of countRows) {
|
|
28920
|
+
runCountMap.set(Number(row.taskId), Number(row.cnt));
|
|
28921
|
+
}
|
|
28922
|
+
}
|
|
28358
28923
|
return c.json({
|
|
28359
28924
|
tasks: tasks4.map((task) => {
|
|
28360
28925
|
const run = latestRuns.get(task.id);
|
|
28926
|
+
const runCount = runCountMap.get(task.id) ?? 0;
|
|
28927
|
+
const actualRetries = Math.max(0, runCount - 1);
|
|
28928
|
+
const displayStatus = task.status === "cancelled" && run?.status === "running" ? "cancelling" : task.status ?? "pending";
|
|
28361
28929
|
return {
|
|
28362
28930
|
...task,
|
|
28931
|
+
actualRetries,
|
|
28932
|
+
displayStatus,
|
|
28363
28933
|
latestRun: run ? {
|
|
28364
28934
|
id: run.id,
|
|
28365
28935
|
status: run.status,
|
|
@@ -28378,6 +28948,98 @@ data: ${JSON.stringify({ ts: Date.now() })}
|
|
|
28378
28948
|
totalPages: Math.max(1, Math.ceil(total / parsedLimit))
|
|
28379
28949
|
});
|
|
28380
28950
|
});
|
|
28951
|
+
app.get("/api/stats", (c) => {
|
|
28952
|
+
const cwd = c.req.query("cwd")?.trim() || "";
|
|
28953
|
+
const params = cwd ? [cwd] : [];
|
|
28954
|
+
const whereClause = cwd ? "WHERE cwd = ?" : "";
|
|
28955
|
+
const andClause = cwd ? "AND cwd = ?" : "";
|
|
28956
|
+
const joinAndClause = cwd ? "AND t.cwd = ?" : "";
|
|
28957
|
+
const byStatus = {};
|
|
28958
|
+
let total = 0;
|
|
28959
|
+
const statusRows = sqlite.prepare(
|
|
28960
|
+
`SELECT status, COUNT(*) AS c FROM tasks ${whereClause} GROUP BY status`
|
|
28961
|
+
).all(...params);
|
|
28962
|
+
for (const row of statusRows) {
|
|
28963
|
+
const count = Number(row.c ?? 0);
|
|
28964
|
+
byStatus[String(row.status ?? "pending")] = count;
|
|
28965
|
+
total += count;
|
|
28966
|
+
}
|
|
28967
|
+
const avgRow = sqlite.prepare(
|
|
28968
|
+
`SELECT AVG((finished_at - started_at) * 1000) AS ms FROM tasks WHERE started_at > 0 AND finished_at > started_at ${andClause}`
|
|
28969
|
+
).get(...params);
|
|
28970
|
+
const runRows = sqlite.prepare(
|
|
28971
|
+
`SELECT r.started_at AS startedAt, r.finished_at AS finishedAt, r.status AS status
|
|
28972
|
+
FROM task_runs r JOIN tasks t ON t.id = r.task_id
|
|
28973
|
+
WHERE r.started_at > 0 ${joinAndClause}
|
|
28974
|
+
ORDER BY r.started_at ASC, r.id ASC`
|
|
28975
|
+
).all(...params);
|
|
28976
|
+
const points = [];
|
|
28977
|
+
const nowMs = Date.now();
|
|
28978
|
+
for (const row of runRows) {
|
|
28979
|
+
const s = Number(row.startedAt) * 1e3;
|
|
28980
|
+
const finished = row.finishedAt ? Number(row.finishedAt) * 1e3 : 0;
|
|
28981
|
+
const end = finished || (row.status === "running" ? nowMs : s);
|
|
28982
|
+
points.push({ t: s, delta: 1 });
|
|
28983
|
+
points.push({ t: Math.max(s + 1, end), delta: -1 });
|
|
28984
|
+
}
|
|
28985
|
+
points.sort((a, b) => a.t - b.t || a.delta - b.delta);
|
|
28986
|
+
let cur = 0;
|
|
28987
|
+
let peakConcurrency = 0;
|
|
28988
|
+
for (const point of points) {
|
|
28989
|
+
cur += point.delta;
|
|
28990
|
+
if (cur > peakConcurrency) peakConcurrency = cur;
|
|
28991
|
+
}
|
|
28992
|
+
const runningRow = sqlite.prepare(
|
|
28993
|
+
`SELECT COUNT(*) AS c FROM task_runs r JOIN tasks t ON t.id = r.task_id WHERE r.status = 'running' ${joinAndClause}`
|
|
28994
|
+
).get(...params);
|
|
28995
|
+
return c.json({
|
|
28996
|
+
byStatus,
|
|
28997
|
+
total,
|
|
28998
|
+
running: Number(runningRow?.c ?? 0),
|
|
28999
|
+
peakConcurrency,
|
|
29000
|
+
avgDurationMs: Math.round(Number(avgRow?.ms ?? 0))
|
|
29001
|
+
});
|
|
29002
|
+
});
|
|
29003
|
+
app.get("/api/runs/by-session/:sessionId", (c) => {
|
|
29004
|
+
const sessionId = c.req.param("sessionId")?.trim() || "";
|
|
29005
|
+
if (!isValidSessionId(sessionId)) {
|
|
29006
|
+
return c.json({ error: "invalid sessionId" }, 400);
|
|
29007
|
+
}
|
|
29008
|
+
const row = sqlite.prepare(
|
|
29009
|
+
`SELECT r.id AS runId, r.task_id AS taskId, r.status AS runStatus,
|
|
29010
|
+
t.template_id AS templateId, t.cwd AS cwd, t.metadata AS metadata, t.status AS taskStatus
|
|
29011
|
+
FROM task_runs r
|
|
29012
|
+
JOIN tasks t ON t.id = r.task_id
|
|
29013
|
+
WHERE r.session_id = ?
|
|
29014
|
+
ORDER BY r.id DESC
|
|
29015
|
+
LIMIT 1`
|
|
29016
|
+
).get(sessionId);
|
|
29017
|
+
if (!row) return c.json({ error: "not found" }, 404);
|
|
29018
|
+
const templateId = row.templateId != null && Number(row.templateId) > 0 ? Number(row.templateId) : null;
|
|
29019
|
+
return c.json({
|
|
29020
|
+
runId: Number(row.runId),
|
|
29021
|
+
taskId: Number(row.taskId),
|
|
29022
|
+
templateId,
|
|
29023
|
+
cwd: row.cwd ?? null,
|
|
29024
|
+
metadata: parseTaskMetadata(row.metadata),
|
|
29025
|
+
status: row.taskStatus ?? row.runStatus ?? "running"
|
|
29026
|
+
});
|
|
29027
|
+
});
|
|
29028
|
+
app.get("/api/templates", async (c) => {
|
|
29029
|
+
const cwd = c.req.query("cwd")?.trim() || void 0;
|
|
29030
|
+
const enabledParam = c.req.query("enabled");
|
|
29031
|
+
let enabled;
|
|
29032
|
+
if (enabledParam === "true" || enabledParam === "1") enabled = true;
|
|
29033
|
+
else if (enabledParam === "false" || enabledParam === "0") enabled = false;
|
|
29034
|
+
else if (enabledParam !== void 0 && enabledParam !== "") {
|
|
29035
|
+
return c.json({ error: "invalid enabled filter" }, 400);
|
|
29036
|
+
}
|
|
29037
|
+
const limitParam = c.req.query("limit") || "200";
|
|
29038
|
+
const limit = parsePositiveInteger(limitParam);
|
|
29039
|
+
if (limit === null || limit > 500) return c.json({ error: "invalid limit" }, 400);
|
|
29040
|
+
const templates = await TaskTemplateService.listFiltered({ cwd, enabled, limit });
|
|
29041
|
+
return c.json({ templates });
|
|
29042
|
+
});
|
|
28381
29043
|
app.post("/api/tasks", async (c) => {
|
|
28382
29044
|
try {
|
|
28383
29045
|
const task = await TaskService.add(parseTaskPayload(await c.req.json()));
|
|
@@ -29078,11 +29740,141 @@ init_task_service();
|
|
|
29078
29740
|
init_task_run_service();
|
|
29079
29741
|
init_health();
|
|
29080
29742
|
init_events();
|
|
29743
|
+
import { spawn as spawn2 } from "child_process";
|
|
29744
|
+
|
|
29745
|
+
// src/gateway/webhook.ts
|
|
29746
|
+
init_metadata();
|
|
29747
|
+
import { createHmac } from "crypto";
|
|
29748
|
+
var DEFAULT_TIMEOUT_MS = 5e3;
|
|
29749
|
+
var DEFAULT_MAX_ATTEMPTS = 2;
|
|
29750
|
+
var MAX_SUMMARY_CHARS = 2e3;
|
|
29751
|
+
function signWebhookPayload(secret, timestamp2, body) {
|
|
29752
|
+
const digest = createHmac("sha256", secret).update(`${timestamp2}.${body}`).digest("hex");
|
|
29753
|
+
return `sha256=${digest}`;
|
|
29754
|
+
}
|
|
29755
|
+
function extractOutputSummary(rawLog, maxChars = MAX_SUMMARY_CHARS) {
|
|
29756
|
+
if (!rawLog) return "";
|
|
29757
|
+
const texts = [];
|
|
29758
|
+
let framed = false;
|
|
29759
|
+
for (const line of rawLog.split("\n")) {
|
|
29760
|
+
const trimmed = line.trim();
|
|
29761
|
+
if (!trimmed) continue;
|
|
29762
|
+
try {
|
|
29763
|
+
const event = JSON.parse(trimmed);
|
|
29764
|
+
if (event.type) framed = true;
|
|
29765
|
+
if (event.type === "text" && typeof event.part?.text === "string" && event.part.text.trim()) {
|
|
29766
|
+
texts.push(event.part.text.trim());
|
|
29767
|
+
} else if (event.type === "error") {
|
|
29768
|
+
const msg = event.error?.data?.message || event.error?.message;
|
|
29769
|
+
if (typeof msg === "string" && msg.trim()) texts.push(msg.trim());
|
|
29770
|
+
}
|
|
29771
|
+
} catch {
|
|
29772
|
+
if (!framed) texts.push(trimmed);
|
|
29773
|
+
}
|
|
29774
|
+
}
|
|
29775
|
+
const combined = texts.join("\n").trim();
|
|
29776
|
+
if (combined.length <= maxChars) return combined;
|
|
29777
|
+
return `${combined.slice(0, Math.max(0, maxChars - 1))}\u2026`;
|
|
29778
|
+
}
|
|
29779
|
+
function toMs(value) {
|
|
29780
|
+
if (value == null) return null;
|
|
29781
|
+
if (value instanceof Date) return value.getTime();
|
|
29782
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
29783
|
+
return null;
|
|
29784
|
+
}
|
|
29785
|
+
function buildTaskWebhookPayload(event, task, run, outputOverride) {
|
|
29786
|
+
const startedAt = toMs(task.startedAt);
|
|
29787
|
+
const finishedAt = toMs(task.finishedAt) ?? Date.now();
|
|
29788
|
+
const durationMs = startedAt != null && finishedAt > startedAt ? finishedAt - startedAt : 0;
|
|
29789
|
+
return {
|
|
29790
|
+
event,
|
|
29791
|
+
timestamp: Date.now(),
|
|
29792
|
+
task: {
|
|
29793
|
+
id: task.id,
|
|
29794
|
+
name: task.name,
|
|
29795
|
+
agent: task.agent,
|
|
29796
|
+
model: task.model ?? null,
|
|
29797
|
+
variant: task.variant ?? null,
|
|
29798
|
+
cwd: task.cwd ?? null,
|
|
29799
|
+
templateId: task.templateId ?? null,
|
|
29800
|
+
status: task.status ?? event.slice("task.".length),
|
|
29801
|
+
metadata: parseTaskMetadata(task.metadata),
|
|
29802
|
+
startedAt,
|
|
29803
|
+
finishedAt,
|
|
29804
|
+
durationMs
|
|
29805
|
+
},
|
|
29806
|
+
run,
|
|
29807
|
+
outputSummary: extractOutputSummary(outputOverride ?? task.resultLog)
|
|
29808
|
+
};
|
|
29809
|
+
}
|
|
29810
|
+
async function dispatchTaskWebhook(payload, options = {}) {
|
|
29811
|
+
const url = (options.url ?? process.env.SUPERTASK_WEBHOOK_URL ?? "").trim();
|
|
29812
|
+
if (!url) return false;
|
|
29813
|
+
try {
|
|
29814
|
+
const parsed = new URL(url);
|
|
29815
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") return false;
|
|
29816
|
+
} catch {
|
|
29817
|
+
return false;
|
|
29818
|
+
}
|
|
29819
|
+
const secret = (options.secret ?? process.env.SUPERTASK_WEBHOOK_SECRET ?? "").trim();
|
|
29820
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
29821
|
+
const maxAttempts = Math.max(1, options.maxAttempts ?? DEFAULT_MAX_ATTEMPTS);
|
|
29822
|
+
const fetchFn = options.fetchImpl ?? fetch;
|
|
29823
|
+
const body = JSON.stringify(payload);
|
|
29824
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
|
29825
|
+
const ts = Date.now();
|
|
29826
|
+
const headers = {
|
|
29827
|
+
"content-type": "application/json",
|
|
29828
|
+
"x-supertask-event": payload.event,
|
|
29829
|
+
"x-supertask-timestamp": String(ts)
|
|
29830
|
+
};
|
|
29831
|
+
if (secret) {
|
|
29832
|
+
headers["x-supertask-signature"] = signWebhookPayload(secret, ts, body);
|
|
29833
|
+
}
|
|
29834
|
+
try {
|
|
29835
|
+
const resp = await fetchFn(url, {
|
|
29836
|
+
method: "POST",
|
|
29837
|
+
headers,
|
|
29838
|
+
body,
|
|
29839
|
+
signal: AbortSignal.timeout(timeoutMs)
|
|
29840
|
+
});
|
|
29841
|
+
if (resp.ok) return true;
|
|
29842
|
+
if (resp.status >= 400 && resp.status < 500 && resp.status !== 429) {
|
|
29843
|
+
console.warn(JSON.stringify({
|
|
29844
|
+
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
29845
|
+
level: "warn",
|
|
29846
|
+
msg: "task webhook rejected",
|
|
29847
|
+
event: payload.event,
|
|
29848
|
+
taskId: payload.task.id,
|
|
29849
|
+
status: resp.status
|
|
29850
|
+
}));
|
|
29851
|
+
return false;
|
|
29852
|
+
}
|
|
29853
|
+
} catch (err) {
|
|
29854
|
+
if (attempt >= maxAttempts) {
|
|
29855
|
+
console.warn(JSON.stringify({
|
|
29856
|
+
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
29857
|
+
level: "warn",
|
|
29858
|
+
msg: "task webhook delivery failed",
|
|
29859
|
+
event: payload.event,
|
|
29860
|
+
taskId: payload.task.id,
|
|
29861
|
+
error: err instanceof Error ? err.message : String(err)
|
|
29862
|
+
}));
|
|
29863
|
+
return false;
|
|
29864
|
+
}
|
|
29865
|
+
}
|
|
29866
|
+
if (attempt < maxAttempts) {
|
|
29867
|
+
await new Promise((resolve4) => setTimeout(resolve4, 300 * attempt));
|
|
29868
|
+
}
|
|
29869
|
+
}
|
|
29870
|
+
return false;
|
|
29871
|
+
}
|
|
29872
|
+
|
|
29873
|
+
// src/worker/index.ts
|
|
29081
29874
|
init_process_control();
|
|
29082
29875
|
init_launch_protocol();
|
|
29083
29876
|
init_task_working_directory();
|
|
29084
29877
|
init_task_batch();
|
|
29085
|
-
import { spawn as spawn2 } from "child_process";
|
|
29086
29878
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
29087
29879
|
import { existsSync as existsSync3 } from "fs";
|
|
29088
29880
|
import { dirname as dirname3, join as join3 } from "path";
|
|
@@ -29413,6 +30205,12 @@ var WorkerEngine = class {
|
|
|
29413
30205
|
} catch (error) {
|
|
29414
30206
|
const message = error instanceof Error ? error.message : String(error);
|
|
29415
30207
|
await TaskService.failRun(task.id, run.id, message, { setDeadLetter: true });
|
|
30208
|
+
void dispatchTaskWebhook(buildTaskWebhookPayload(
|
|
30209
|
+
"task.dead_letter",
|
|
30210
|
+
{ ...task, status: "dead_letter", finishedAt: /* @__PURE__ */ new Date(), resultLog: message },
|
|
30211
|
+
{ id: run.id, sessionId: null, status: "failed" },
|
|
30212
|
+
message
|
|
30213
|
+
));
|
|
29416
30214
|
this.releaseBatch(task);
|
|
29417
30215
|
continue;
|
|
29418
30216
|
}
|
|
@@ -29427,7 +30225,14 @@ var WorkerEngine = class {
|
|
|
29427
30225
|
});
|
|
29428
30226
|
} catch (error) {
|
|
29429
30227
|
if (!(error instanceof OpenCodeInvocationError)) throw error;
|
|
29430
|
-
|
|
30228
|
+
const message = `${error.message}\uFF08OpenCode ${openCode.version}\uFF09`;
|
|
30229
|
+
await TaskService.failRun(task.id, run.id, message, { setDeadLetter: true });
|
|
30230
|
+
void dispatchTaskWebhook(buildTaskWebhookPayload(
|
|
30231
|
+
"task.dead_letter",
|
|
30232
|
+
{ ...task, status: "dead_letter", finishedAt: /* @__PURE__ */ new Date(), resultLog: message },
|
|
30233
|
+
{ id: run.id, sessionId: null, status: "failed" },
|
|
30234
|
+
message
|
|
30235
|
+
));
|
|
29431
30236
|
this.releaseBatch(task);
|
|
29432
30237
|
continue;
|
|
29433
30238
|
}
|
|
@@ -29469,6 +30274,14 @@ var WorkerEngine = class {
|
|
|
29469
30274
|
}
|
|
29470
30275
|
async spawnTask(task, runId, launchIdentity, args) {
|
|
29471
30276
|
const cwd = task.cwd || process.cwd();
|
|
30277
|
+
const childEnv = {
|
|
30278
|
+
...process.env,
|
|
30279
|
+
PWD: cwd,
|
|
30280
|
+
[MANAGED_RUN_ENV]: MANAGED_RUN_ENV_VALUE
|
|
30281
|
+
};
|
|
30282
|
+
delete childEnv.SUPERTASK_API_TOKEN;
|
|
30283
|
+
delete childEnv.SUPERTASK_WEBHOOK_SECRET;
|
|
30284
|
+
delete childEnv.SUPERTASK_WEBHOOK_URL;
|
|
29472
30285
|
const child = spawn2(process.execPath, [
|
|
29473
30286
|
this.launcherEntry(),
|
|
29474
30287
|
LAUNCH_IDENTITY_ARGUMENT,
|
|
@@ -29477,23 +30290,21 @@ var WorkerEngine = class {
|
|
|
29477
30290
|
...args
|
|
29478
30291
|
], {
|
|
29479
30292
|
cwd,
|
|
29480
|
-
env:
|
|
29481
|
-
...process.env,
|
|
29482
|
-
PWD: cwd,
|
|
29483
|
-
[MANAGED_RUN_ENV]: MANAGED_RUN_ENV_VALUE
|
|
29484
|
-
},
|
|
30293
|
+
env: childEnv,
|
|
29485
30294
|
stdio: ["pipe", "pipe", "pipe", "ipc"],
|
|
29486
30295
|
detached: process.platform !== "win32"
|
|
29487
30296
|
});
|
|
29488
30297
|
const entry = {
|
|
29489
30298
|
task,
|
|
29490
30299
|
runId,
|
|
30300
|
+
sessionId: null,
|
|
29491
30301
|
launchIdentity,
|
|
29492
30302
|
child,
|
|
29493
30303
|
commandContext: runCommandContext(this.opencodeBin, args, cwd),
|
|
29494
30304
|
output: new RunOutput(
|
|
29495
30305
|
this.maxOutputChars,
|
|
29496
30306
|
(sessionId) => {
|
|
30307
|
+
entry.sessionId = sessionId;
|
|
29497
30308
|
TaskRunService.updateSessionId(runId, sessionId).catch((err) => {
|
|
29498
30309
|
this.logError("sessionId update failed", err, task.id);
|
|
29499
30310
|
});
|
|
@@ -29745,6 +30556,12 @@ ${output2}` : ""}`;
|
|
|
29745
30556
|
status: "cancelled",
|
|
29746
30557
|
reason: "run-cancelled"
|
|
29747
30558
|
});
|
|
30559
|
+
void dispatchTaskWebhook(buildTaskWebhookPayload(
|
|
30560
|
+
"task.cancelled",
|
|
30561
|
+
{ ...entry.task, status: "cancelled", finishedAt: /* @__PURE__ */ new Date(), resultLog: log2 },
|
|
30562
|
+
{ id: entry.runId, sessionId: entry.sessionId, status: "failed" },
|
|
30563
|
+
log2
|
|
30564
|
+
));
|
|
29748
30565
|
console.log(JSON.stringify({
|
|
29749
30566
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
29750
30567
|
level: "info",
|
|
@@ -29774,6 +30591,12 @@ ${output}` : ""}` : output;
|
|
|
29774
30591
|
status: "done",
|
|
29775
30592
|
reason: "run-done"
|
|
29776
30593
|
});
|
|
30594
|
+
void dispatchTaskWebhook(buildTaskWebhookPayload(
|
|
30595
|
+
"task.done",
|
|
30596
|
+
{ ...entry.task, status: "done", finishedAt: /* @__PURE__ */ new Date(), resultLog: log },
|
|
30597
|
+
{ id: entry.runId, sessionId: entry.sessionId, status: "done" },
|
|
30598
|
+
log
|
|
30599
|
+
));
|
|
29777
30600
|
console.log(JSON.stringify({
|
|
29778
30601
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
29779
30602
|
level: "info",
|
|
@@ -29819,6 +30642,13 @@ ${output}` : ""}` : output;
|
|
|
29819
30642
|
status: failed.status,
|
|
29820
30643
|
reason: "run-failed"
|
|
29821
30644
|
});
|
|
30645
|
+
const webhookEvent = failed.status === "dead_letter" ? "task.dead_letter" : "task.failed";
|
|
30646
|
+
void dispatchTaskWebhook(buildTaskWebhookPayload(
|
|
30647
|
+
webhookEvent,
|
|
30648
|
+
{ ...entry.task, status: failed.status, finishedAt: /* @__PURE__ */ new Date(), resultLog: log },
|
|
30649
|
+
{ id: entry.runId, sessionId: entry.sessionId, status: "failed" },
|
|
30650
|
+
log
|
|
30651
|
+
));
|
|
29822
30652
|
console.error(JSON.stringify({
|
|
29823
30653
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
29824
30654
|
level: "error",
|
|
@@ -30717,6 +31547,7 @@ async function runGatewayMain(deps = {}) {
|
|
|
30717
31547
|
await resolveDeps();
|
|
30718
31548
|
if (shuttingDown) return;
|
|
30719
31549
|
initializeGatewayHealth({
|
|
31550
|
+
workerMaxConcurrency: cfg.worker.maxConcurrency,
|
|
30720
31551
|
workerPollIntervalMs: cfg.worker.pollIntervalMs,
|
|
30721
31552
|
schedulerEnabled: cfg.scheduler.enabled,
|
|
30722
31553
|
schedulerCheckIntervalMs: cfg.scheduler.checkIntervalMs,
|