Q99: connector actions keep an execution record so a lost reply is not resent

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 16:23:23 -04:00
1 parent 552dfcb6ce
commit 6f8731cbac
7 files changed
+135 -5

No files matched your search

@@ -0,0 +1,18 @@
export const connectorExecutionsSchema = `
create table if not exists connector_executions (
id text primary key,
org_id text not null references organizations(id) on delete cascade,
agent_id text not null,
run_id text,
action text not null,
arguments_hash text not null,
state text not null check (state in ('pending', 'succeeded', 'failed', 'unknown', 'resolved')),
detail text,
created_at text not null,
updated_at text not null
);
create index if not exists connector_executions_call on connector_executions(org_id, action, arguments_hash, state);
insert into schema_migrations(version, name, applied_at)
values (81, 'connector_executions', datetime('now'));
`;
+2
View File
@@ -79,6 +79,7 @@ import { modelChecksSchema } from "./migrations/077-model-checks";
import { requestErrorCodesSchema } from "./migrations/078-request-error-codes";
import { eraseRetiredCredentialsSchema } from "./migrations/079-erase-retired-credentials";
import { runCapabilityWarningsSchema } from "./migrations/080-run-capability-warnings";
import { connectorExecutionsSchema } from "./migrations/081-connector-executions";
interface Migration {
version: number;
@@ -167,6 +168,7 @@ const MIGRATIONS: Migration[] = [
{ version: 78, name: "request_error_codes", sql: requestErrorCodesSchema },
{ version: 79, name: "erase_retired_credentials", sql: eraseRetiredCredentialsSchema },
{ version: 80, name: "run_capability_warnings", sql: runCapabilityWarningsSchema },
{ version: 81, name: "connector_executions", sql: connectorExecutionsSchema },
];
const SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1].version;