Remove api trigger kind and mark webhook as coming soon

Drop "api" from the trigger kind dropdown and disable the "webhook"
option with a "COMING SOON" label until it's ready.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta
2026-03-20 06:54:03 -05:00
49 changed files with 1793 additions and 418 deletions

View File

@@ -0,0 +1,5 @@
ALTER TABLE "heartbeat_runs" ADD COLUMN "process_pid" integer;--> statement-breakpoint
ALTER TABLE "heartbeat_runs" ADD COLUMN "process_started_at" timestamp with time zone;--> statement-breakpoint
ALTER TABLE "heartbeat_runs" ADD COLUMN "retry_of_run_id" uuid;--> statement-breakpoint
ALTER TABLE "heartbeat_runs" ADD COLUMN "process_loss_retry_count" integer DEFAULT 0 NOT NULL;--> statement-breakpoint
ALTER TABLE "heartbeat_runs" ADD CONSTRAINT "heartbeat_runs_retry_of_run_id_heartbeat_runs_id_fk" FOREIGN KEY ("retry_of_run_id") REFERENCES "public"."heartbeat_runs"("id") ON DELETE set null ON UPDATE no action;

View File

@@ -5341,6 +5341,31 @@
"primaryKey": false,
"notNull": false
},
"process_pid": {
"name": "process_pid",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"process_started_at": {
"name": "process_started_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"retry_of_run_id": {
"name": "retry_of_run_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"process_loss_retry_count": {
"name": "process_loss_retry_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"context_snapshot": {
"name": "context_snapshot",
"type": "jsonb",
@@ -5430,6 +5455,19 @@
],
"onDelete": "no action",
"onUpdate": "no action"
},
"heartbeat_runs_retry_of_run_id_heartbeat_runs_id_fk": {
"name": "heartbeat_runs_retry_of_run_id_heartbeat_runs_id_fk",
"tableFrom": "heartbeat_runs",
"tableTo": "heartbeat_runs",
"columnsFrom": [
"retry_of_run_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -11309,4 +11347,4 @@
"schemas": {},
"tables": {}
}
}
}

View File

@@ -5341,6 +5341,31 @@
"primaryKey": false,
"notNull": false
},
"process_pid": {
"name": "process_pid",
"type": "integer",
"primaryKey": false,
"notNull": false
},
"process_started_at": {
"name": "process_started_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"retry_of_run_id": {
"name": "retry_of_run_id",
"type": "uuid",
"primaryKey": false,
"notNull": false
},
"process_loss_retry_count": {
"name": "process_loss_retry_count",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"context_snapshot": {
"name": "context_snapshot",
"type": "jsonb",
@@ -5430,6 +5455,19 @@
],
"onDelete": "no action",
"onUpdate": "no action"
},
"heartbeat_runs_retry_of_run_id_heartbeat_runs_id_fk": {
"name": "heartbeat_runs_retry_of_run_id_heartbeat_runs_id_fk",
"tableFrom": "heartbeat_runs",
"tableTo": "heartbeat_runs",
"columnsFrom": [
"retry_of_run_id"
],
"columnsTo": [
"id"
],
"onDelete": "set null",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -11352,4 +11390,4 @@
"schemas": {},
"tables": {}
}
}
}

View File

@@ -271,8 +271,8 @@
{
"idx": 38,
"version": "7",
"when": 1773926116580,
"tag": "0038_fat_magneto",
"when": 1773931592563,
"tag": "0038_careless_iron_monger",
"breakpoints": true
},
{
@@ -281,6 +281,13 @@
"when": 1773927102783,
"tag": "0039_eager_shotgun",
"breakpoints": true
},
{
"idx": 40,
"version": "7",
"when": 1773926116580,
"tag": "0038_fat_magneto",
"breakpoints": true
}
]
}
}

View File

@@ -1,4 +1,4 @@
import { pgTable, uuid, text, timestamp, jsonb, index, integer, bigint, boolean } from "drizzle-orm/pg-core";
import { type AnyPgColumn, pgTable, uuid, text, timestamp, jsonb, index, integer, bigint, boolean } from "drizzle-orm/pg-core";
import { companies } from "./companies.js";
import { agents } from "./agents.js";
import { agentWakeupRequests } from "./agent_wakeup_requests.js";
@@ -31,6 +31,12 @@ export const heartbeatRuns = pgTable(
stderrExcerpt: text("stderr_excerpt"),
errorCode: text("error_code"),
externalRunId: text("external_run_id"),
processPid: integer("process_pid"),
processStartedAt: timestamp("process_started_at", { withTimezone: true }),
retryOfRunId: uuid("retry_of_run_id").references((): AnyPgColumn => heartbeatRuns.id, {
onDelete: "set null",
}),
processLossRetryCount: integer("process_loss_retry_count").notNull().default(0),
contextSnapshot: jsonb("context_snapshot").$type<Record<string, unknown>>(),
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),