Skip to content

Commit eb6383c

Browse files
committed
build: update bundled dist files
1 parent 4ee1fa4 commit eb6383c

24 files changed

Lines changed: 330 additions & 143 deletions

dist/index.js

Lines changed: 193 additions & 76 deletions
Large diffs are not rendered by default.

dist/sdk/a2a-frontend-GUEGI5SX.mjs.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,15 @@ var init_task_store = __esm({
192192
conditions.push("workflow_id = ?");
193193
params.push(filter.workflowId);
194194
}
195+
if (filter.search) {
196+
const escaped = filter.search.replace(/[%_\\]/g, "\\$&");
197+
conditions.push("request_message LIKE ? ESCAPE '\\'");
198+
params.push(`%${escaped}%`);
199+
}
200+
if (filter.claimedBy) {
201+
conditions.push("claimed_by = ?");
202+
params.push(filter.claimedBy);
203+
}
195204
const where = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
196205
return { where, params };
197206
}
@@ -345,6 +354,32 @@ var init_task_store = __esm({
345354
// -------------------------------------------------------------------------
346355
// Cleanup
347356
// -------------------------------------------------------------------------
357+
failStaleTasks(reason) {
358+
const db = this.getDb();
359+
const now = nowISO();
360+
const msg = reason || "Process terminated while task was running";
361+
const statusMessage = JSON.stringify({
362+
message_id: crypto.randomUUID(),
363+
role: "agent",
364+
parts: [{ text: msg }]
365+
});
366+
const result = db.prepare(
367+
`UPDATE agent_tasks
368+
SET state = 'failed', updated_at = ?, status_message = ?
369+
WHERE state = 'working'`
370+
).run(now, statusMessage);
371+
return result.changes;
372+
}
373+
purgeOldTasks(olderThanMs) {
374+
const db = this.getDb();
375+
const cutoff = new Date(Date.now() - olderThanMs).toISOString();
376+
const result = db.prepare(
377+
`DELETE FROM agent_tasks
378+
WHERE state IN ('completed', 'failed', 'canceled', 'rejected')
379+
AND updated_at <= ?`
380+
).run(cutoff);
381+
return result.changes;
382+
}
348383
deleteExpiredTasks() {
349384
const db = this.getDb();
350385
const now = nowISO();
@@ -1619,4 +1654,4 @@ export {
16191654
messageToWorkflowInput,
16201655
resultToArtifacts
16211656
};
1622-
//# sourceMappingURL=a2a-frontend-GUEGI5SX.mjs.map
1657+
//# sourceMappingURL=a2a-frontend-N4VU3PHW.mjs.map

dist/sdk/a2a-frontend-N4VU3PHW.mjs.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sdk/check-provider-registry-ZUU7KSKR.mjs renamed to dist/sdk/check-provider-registry-4KW2YPZW.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import {
22
CheckProviderRegistry,
33
init_check_provider_registry
4-
} from "./chunk-CXA3WUOB.mjs";
5-
import "./chunk-AVMMKGLQ.mjs";
4+
} from "./chunk-CNZ7XHLN.mjs";
5+
import "./chunk-PDQTEBOJ.mjs";
66
import "./chunk-YSOIR46P.mjs";
77
import "./chunk-LG4AUKHB.mjs";
88
import "./chunk-B7BVQM5K.mjs";
@@ -27,4 +27,4 @@ init_check_provider_registry();
2727
export {
2828
CheckProviderRegistry
2929
};
30-
//# sourceMappingURL=check-provider-registry-ZUU7KSKR.mjs.map
30+
//# sourceMappingURL=check-provider-registry-4KW2YPZW.mjs.map
File renamed without changes.

dist/sdk/chunk-AVMMKGLQ.mjs.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
extractFileSections,
33
init_markdown,
44
replaceFileSections
5-
} from "./chunk-AVMMKGLQ.mjs";
5+
} from "./chunk-PDQTEBOJ.mjs";
66
import {
77
A2AAuthRequiredError,
88
A2AInputRequiredError,
@@ -3979,7 +3979,7 @@ async function executeWorkflowAsTool(workflowId, args, context2, argsOverrides)
39793979
...args,
39803980
...argsOverrides
39813981
};
3982-
const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-KQNLEQEY.mjs");
3982+
const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-O2SIH3PC.mjs");
39833983
const provider = new WorkflowCheckProvider2();
39843984
const checkConfig = {
39853985
type: "workflow",
@@ -13315,7 +13315,7 @@ var init_state_machine_execution_engine = __esm({
1331513315
try {
1331613316
const map = options?.webhookContext?.webhookData;
1331713317
if (map) {
13318-
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-ZUU7KSKR.mjs");
13318+
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-4KW2YPZW.mjs");
1331913319
const reg = CheckProviderRegistry2.getInstance();
1332013320
const p = reg.getProvider("http_input");
1332113321
if (p && typeof p.setWebhookContext === "function") p.setWebhookContext(map);
@@ -13438,7 +13438,7 @@ var init_state_machine_execution_engine = __esm({
1343813438
tag_filter: tagFilter
1343913439
} : config;
1344013440
try {
13441-
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-ZUU7KSKR.mjs");
13441+
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-4KW2YPZW.mjs");
1344213442
const registry = CheckProviderRegistry2.getInstance();
1344313443
registry.setCustomTools(configWithTagFilter.tools || {});
1344413444
} catch (error) {
@@ -13502,7 +13502,7 @@ var init_state_machine_execution_engine = __esm({
1350213502
try {
1350313503
const webhookData = this.executionContext?.webhookContext?.webhookData;
1350413504
if (webhookData instanceof Map) {
13505-
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-XLCSBU3E.mjs");
13505+
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-DCMMLWLB.mjs");
1350613506
const slackCtx = extractSlackContext2(webhookData);
1350713507
if (slackCtx) {
1350813508
const payload = Array.from(webhookData.values())[0];
@@ -13531,7 +13531,7 @@ var init_state_machine_execution_engine = __esm({
1353113531
if (Array.isArray(configWithTagFilter.frontends) && configWithTagFilter.frontends.length > 0) {
1353213532
try {
1353313533
const { EventBus } = await import("./event-bus-5K3Y2FCS.mjs");
13534-
const { FrontendsHost } = await import("./host-A7UNRBQU.mjs");
13534+
const { FrontendsHost } = await import("./host-DOJQVREK.mjs");
1353513535
const bus = new EventBus();
1353613536
context2.eventBus = bus;
1353713537
frontendsHost = new FrontendsHost(bus, logger);
@@ -41251,8 +41251,8 @@ function buildBuiltinGlobals(opts) {
4125141251
const asyncFunctionNames = /* @__PURE__ */ new Set();
4125241252
const scheduleFn = async (args = {}) => {
4125341253
try {
41254-
const { handleScheduleAction: handleScheduleAction2, buildScheduleToolContext: buildScheduleToolContext2 } = await import("./schedule-tool-DGVJDHJM.mjs");
41255-
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-XLCSBU3E.mjs");
41254+
const { handleScheduleAction: handleScheduleAction2, buildScheduleToolContext: buildScheduleToolContext2 } = await import("./schedule-tool-HCJUIF4H.mjs");
41255+
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-DCMMLWLB.mjs");
4125641256
const parentCtx = opts.sessionInfo?._parentContext;
4125741257
const webhookData = parentCtx?.prInfo?.eventContext?.webhookData;
4125841258
const visorCfg = parentCtx?.config;
@@ -44807,4 +44807,4 @@ undici/lib/fetch/body.js:
4480744807
undici/lib/websocket/frame.js:
4480844808
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
4480944809
*/
44810-
//# sourceMappingURL=chunk-CXA3WUOB.mjs.map
44810+
//# sourceMappingURL=chunk-CNZ7XHLN.mjs.map
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,27 @@ function replaceMermaidBlocks(text, diagrams, replacement = "_(See diagram above
109109
}
110110
function markdownToSlack(text) {
111111
if (!text || typeof text !== "string") return "";
112-
let out = text;
113-
out = out.replace(
114-
/!\[([^\]]*)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g,
115-
(_m, alt, url) => `<${url}|${alt || "image"}>`
116-
);
117-
out = out.replace(
118-
/\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g,
119-
(_m, label, url) => `<${url}|${label}>`
120-
);
121-
out = out.replace(/\*\*([^*]+)\*\*/g, (_m, inner) => `*${inner}*`);
122-
out = out.replace(/__([^_]+)__/g, (_m, inner) => `*${inner}*`);
123-
const lines = out.split(/\r?\n/);
112+
const lines = text.split(/\r?\n/);
124113
let inCodeBlock = false;
125114
for (let i = 0; i < lines.length; i++) {
126-
const line = lines[i];
127-
const trimmed = line.trimStart();
115+
const trimmed = lines[i].trimStart();
128116
if (/^```/.test(trimmed)) {
129117
inCodeBlock = !inCodeBlock;
130118
continue;
131119
}
132120
if (inCodeBlock) continue;
133-
const headerMatch = /^(#{1,6})\s+(.+)$/.exec(trimmed);
121+
let line = lines[i];
122+
line = line.replace(
123+
/!\[([^\]]*)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g,
124+
(_m, alt, url) => `<${url}|${alt || "image"}>`
125+
);
126+
line = line.replace(
127+
/\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g,
128+
(_m, label, url) => `<${url}|${label}>`
129+
);
130+
line = line.replace(/\*\*([^*]+)\*\*/g, (_m, inner) => `*${inner}*`);
131+
line = line.replace(/__([^_]+)__/g, (_m, inner) => `*${inner}*`);
132+
const headerMatch = /^(#{1,6})\s+(.+)$/.exec(line.trimStart());
134133
if (headerMatch) {
135134
const [, hashes, headerText] = headerMatch;
136135
const prevLine = i > 0 ? lines[i - 1].trim() : "";
@@ -147,10 +146,11 @@ function markdownToSlack(text) {
147146
if (bulletMatch) {
148147
const [, indent, , rest] = bulletMatch;
149148
lines[i] = `${indent}\u2022 ${rest}`;
149+
continue;
150150
}
151+
lines[i] = line;
151152
}
152-
out = lines.join("\n");
153-
return out;
153+
return lines.join("\n");
154154
}
155155
function extractFileSections(text) {
156156
const sections = [];
@@ -210,4 +210,4 @@ export {
210210
formatSlackText,
211211
init_markdown
212212
};
213-
//# sourceMappingURL=chunk-AVMMKGLQ.mjs.map
213+
//# sourceMappingURL=chunk-PDQTEBOJ.mjs.map

0 commit comments

Comments
 (0)