Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -1,7 +1,6 @@
import type { JobsOptions, TypedQueue } from "./types.js";
import { queueNames, type QueueName } from "./names.js";
import type {
AiJob,
BrowserAutomationJob,
CleanupJob,
ExportJob,
@@ -20,16 +19,12 @@ import type {
} from "./payloads.js";
import { JOB_PRIORITY_CRITICAL, priorityFromOverride, priorityLabel, resolveJobPriorityForTenant, type PriorityOverride } from "./priority.js";
type AiJobForKind<Kind extends AiJob["kind"]> = AiJob & { kind: Kind };
type BrowserAutomationJobForKind<Kind extends BrowserAutomationJob["kind"]> = BrowserAutomationJob & { kind: Kind };
export type TransactionalMailJobInput = Omit<TransactionalMailJob, "kind">;
export type WebhookDeliveryJobInput = Omit<WebhookDeliveryJob, "kind">;
export type NotificationJobInput = Omit<NotificationJob, "kind">;
export type CleanupJobInput = Omit<CleanupJob, "kind">;
export type AiChatCompletionJobInput = Omit<AiJobForKind<"ai.chat-completion">, "kind">;
export type AiEmbeddingJobInput = Omit<AiJobForKind<"ai.embedding">, "kind">;
export type AiBrowserTaskJobInput = Omit<AiJobForKind<"ai.browser-task">, "kind">;
export type BrowserSessionRunJobInput = Omit<BrowserAutomationJobForKind<"browser.session-run">, "kind">;
export type BrowserSessionCleanupJobInput = Omit<BrowserAutomationJobForKind<"browser.session-cleanup">, "kind">;
export type BrowserUsageFlushJobInput = Omit<BrowserAutomationJobForKind<"usage.flush">, "kind">;
@@ -96,21 +91,6 @@ export type CleanupJobDescriptor = QueueJobDescriptor<typeof queueNames.maintena
payload: CleanupJob;
};
export type AiChatCompletionJobDescriptor = QueueJobDescriptor<typeof queueNames.aiChatbot> & {
jobName: "chat-completion";
payload: AiJobForKind<"ai.chat-completion">;
};
export type AiEmbeddingJobDescriptor = QueueJobDescriptor<typeof queueNames.aiChatbot> & {
jobName: "create-embedding";
payload: AiJobForKind<"ai.embedding">;
};
export type AiBrowserTaskJobDescriptor = QueueJobDescriptor<typeof queueNames.aiChatbot> & {
jobName: "browser-task";
payload: AiJobForKind<"ai.browser-task">;
};
export type BrowserSessionRunJobDescriptor = QueueJobDescriptor<typeof queueNames.browserAutomation> & {
jobName: "browser-session-run";
payload: BrowserAutomationJobForKind<"browser.session-run">;
@@ -152,14 +132,12 @@ export type PluginInvokeJobDescriptor = QueueJobDescriptor<typeof queueNames.plu
};
export type EmailProducerJobDescriptor = TransactionalMailJobDescriptor | WebhookDeliveryJobDescriptor;
export type AiProducerJobDescriptor = AiChatCompletionJobDescriptor | AiEmbeddingJobDescriptor | AiBrowserTaskJobDescriptor;
export type BrowserAutomationProducerJobDescriptor = BrowserSessionRunJobDescriptor | BrowserSessionCleanupJobDescriptor | BrowserUsageFlushJobDescriptor;
export type ProducerJobDescriptor =
| EmailProducerJobDescriptor
| NotificationJobDescriptor
| CleanupJobDescriptor
| AiProducerJobDescriptor
| BrowserAutomationProducerJobDescriptor
| FileScanJobDescriptor
| FilePreviewJobDescriptor
@@ -185,11 +163,6 @@ const retryJobOptionsByQueueAndJobName: {
// next 24h tick recover the run.
"dsgvo-grace-period-scan": { attempts: 2, backoff: { type: "fixed", delay: 30_000 } },
},
[queueNames.aiChatbot]: {
"chat-completion": { attempts: 3, backoff: { type: "exponential", delay: 2_000 } },
"create-embedding": { attempts: 3, backoff: { type: "exponential", delay: 2_000 } },
"browser-task": { attempts: 2, backoff: { type: "exponential", delay: 5_000 } },
},
[queueNames.browserAutomation]: {
"browser-session-run": { attempts: 2, backoff: { type: "exponential", delay: 5_000 } },
"browser-session-cleanup": { attempts: 3, backoff: { type: "fixed", delay: 10_000 } },
@@ -279,39 +252,6 @@ export function buildCleanupJob(input: CleanupJobInput): CleanupJobDescriptor {
};
}
export function buildAiChatCompletionJob(input: AiChatCompletionJobInput): AiChatCompletionJobDescriptor {
return {
queueName: queueNames.aiChatbot,
jobName: "chat-completion",
payload: {
kind: "ai.chat-completion",
...input,
},
};
}
export function buildAiEmbeddingJob(input: AiEmbeddingJobInput): AiEmbeddingJobDescriptor {
return {
queueName: queueNames.aiChatbot,
jobName: "create-embedding",
payload: {
kind: "ai.embedding",
...input,
},
};
}
export function buildAiBrowserTaskJob(input: AiBrowserTaskJobInput): AiBrowserTaskJobDescriptor {
return {
queueName: queueNames.aiChatbot,
jobName: "browser-task",
payload: {
kind: "ai.browser-task",
...input,
},
};
}
export function buildBrowserSessionRunJob(input: BrowserSessionRunJobInput): BrowserSessionRunJobDescriptor {
return {
queueName: queueNames.browserAutomation,