@agent-native/core 0.177.0-nightly-20260906034133 → 0.177.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.
Files changed (44) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/CHANGELOG.md +13 -0
  3. package/corpus/templates/calendar/CHANGELOG.md +20 -0
  4. package/corpus/templates/clips/CHANGELOG.md +7 -0
  5. package/corpus/templates/clips/server/plugins/db.ts +10 -2
  6. package/corpus/templates/content/CHANGELOG.md +6 -0
  7. package/corpus/templates/design/CHANGELOG.md +16 -0
  8. package/corpus/templates/design/app/components/design/EditPanel.tsx +8 -1
  9. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +12 -20
  10. package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +23 -22
  11. package/corpus/templates/design/app/pages/DesignEditor.tsx +43 -6
  12. package/corpus/templates/design/app/pages/Index.tsx +10 -3
  13. package/corpus/templates/design/app/pages/Templates.tsx +1 -18
  14. package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +25 -11
  15. package/corpus/templates/design/app/pages/design-editor/canvas-primitives.ts +8 -18
  16. package/corpus/templates/design/app/pages/design-editor/commands/create-primitive.ts +4 -0
  17. package/corpus/templates/design/changelog/2026-09-04-board-text-is-readable-on-a-light-canvas.md +6 -0
  18. package/corpus/templates/design/changelog/2026-09-04-designs-grid-fills-its-last-row.md +6 -0
  19. package/corpus/templates/design/changelog/2026-09-04-no-design-system-now-sticks-when-you-choose-it.md +6 -0
  20. package/corpus/templates/design/changelog/2026-09-04-the-canvas-keeps-its-colour-when-you-draw-on-it.md +6 -0
  21. package/corpus/templates/design/changelog/2026-09-04-the-design-system-picker-stays-after-a-template-fil.md +6 -0
  22. package/corpus/templates/dispatch/CHANGELOG.md +6 -0
  23. package/corpus/templates/factory/CHANGELOG.md +18 -0
  24. package/corpus/templates/mail/CHANGELOG.md +11 -0
  25. package/dist/automation/index.d.ts +1 -1
  26. package/dist/chat-threads/schema.d.ts +4 -4
  27. package/dist/chat-threads/schema.js +5 -5
  28. package/dist/collab/routes.d.ts +1 -1
  29. package/dist/collab/struct-routes.d.ts +1 -1
  30. package/dist/email-catalog/log.js +2 -0
  31. package/dist/email-catalog/schema.d.ts +1 -1
  32. package/dist/email-catalog/schema.js +2 -2
  33. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  34. package/dist/observability/routes.d.ts +4 -4
  35. package/dist/org/migrations.js +36 -8
  36. package/dist/org/schema.d.ts +8 -8
  37. package/dist/org/schema.js +13 -9
  38. package/dist/progress/routes.d.ts +1 -1
  39. package/dist/secrets/routes.d.ts +6 -6
  40. package/dist/secrets/schema.d.ts +2 -2
  41. package/dist/secrets/schema.js +3 -3
  42. package/dist/server/identity-sso-migrations.js +24 -4
  43. package/package.json +3 -3
  44. package/corpus/templates/clips/data/clips-transactional-emails/config.json +0 -3
@@ -195,31 +195,21 @@ function samePenPoint(a: PenPoint, b: PenPoint): boolean {
195
195
  }
196
196
 
197
197
  // Reads the app's actual resolved theme (next-themes' `dark` class on
198
- // <html>) rather than raw OS `prefers-color-scheme`. NOTE: this is about the
199
- // EDITOR CHROME theme only — it must NOT gate board-content defaults. The
200
- // board surface itself is ALWAYS dark (BOARD_SURFACE_BACKGROUND is a fixed
201
- // hsl(0 0% 10%) regardless of editor theme), so board-drawn text keys its
202
- // default color off `isBoardTarget` alone — see defaultCanvasTextColor.
203
- // Gating it on this flag made T-tool board text render black-on-dark
204
- // (invisible) whenever the editor UI was in light mode.
198
+ // <html>) rather than raw OS `prefers-color-scheme`.
205
199
  export function isDesignEditorDarkTheme(): boolean {
206
200
  if (typeof document === "undefined") return false;
207
201
  return document.documentElement.classList.contains("dark");
208
202
  }
209
203
 
210
204
  /**
211
- * Default text color for a freshly drawn text primitive.
212
- *
213
- * - BOARD target: always white. The board surface is permanently dark
214
- * (BOARD_SURFACE_BACKGROUND), independent of the editor chrome theme, so
215
- * the "white Inter on dark board" default must not depend on
216
- * isDesignEditorDarkTheme() — that gate left board text at `currentColor`
217
- * (black in an unstyled document) for light-theme editor sessions.
218
- * - SCREEN target: `currentColor`, so text dropped into an existing (often
219
- * light) screen inherits its surrounding styles/theme exactly as before.
205
+ * Default text color for a freshly drawn text primitive, chosen from the
206
+ * surface it lands on — the caller measures that, because the board's own
207
+ * document is transparent and its colour lives on the host. `currentColor`
208
+ * inherits the unstyled document's black, which is invisible on a dark one.
220
209
  */
221
- export function defaultCanvasTextColor(isBoardTarget: boolean): string {
222
- return isBoardTarget ? "#ffffff" : "currentColor";
210
+ export function defaultCanvasTextColor(needsLightFill: boolean): string {
211
+ // guard:allow-raw-color — written into the user's design HTML, where the editor's theme tokens do not exist
212
+ return needsLightFill ? "#ffffff" : "currentColor";
223
213
  }
224
214
 
225
215
  /**
@@ -42,6 +42,8 @@ export interface CreatePrimitiveArgs {
42
42
  },
43
43
  ) => void;
44
44
  boardFileId: string | undefined;
45
+ /** Effective canvas colour, stored or themed — the board's visible surface. */
46
+ canvasBackground: string | null | undefined;
45
47
  canEditDesign: boolean;
46
48
  collabContentFileIdRef: RefObject<string | null>;
47
49
  collabContentRef: RefObject<string | null>;
@@ -86,6 +88,7 @@ export function runCreatePrimitive(
86
88
  activeFile,
87
89
  applyLocalContentUpdate,
88
90
  boardFileId,
91
+ canvasBackground,
89
92
  canEditDesign,
90
93
  collabContentFileIdRef,
91
94
  collabContentRef,
@@ -187,6 +190,7 @@ export function runCreatePrimitive(
187
190
  const insertedContent = appendCanvasPrimitiveToHtml(baseContent, primitive, {
188
191
  preserveNegativePosition: targetFile.id === boardFileId,
189
192
  isBoardTarget: targetFile.id === boardFileId,
193
+ boardBackground: canvasBackground,
190
194
  });
191
195
  if (!insertedContent) {
192
196
  toast.error(t("designEditor.toasts.primitiveInsertFailed"));
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-09-04
4
+ ---
5
+
6
+ Text drawn straight onto the canvas now takes a colour you can read against it, instead of always being white.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-09-04
4
+ ---
5
+
6
+ The designs list now fills every row instead of leaving a single card stranded on the last one, and the card actions menu is readable in light mode.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-09-04
4
+ ---
5
+
6
+ Choosing "No design system" now clears the design's system instead of snapping back to your default.
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: fixed
3
+ date: 2026-09-04
4
+ ---
5
+
6
+ Drawing the first shape on the board no longer flips the canvas to a different colour, and the Canvas swatch shows the colour it is painted with instead of "NONE".
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: improved
3
+ date: 2026-09-04
4
+ ---
5
+
6
+ The design system picker stays in the editor chat after a template fills the design, so later prompts can still target a specific system.
@@ -3,6 +3,12 @@
3
3
  All notable user-facing changes to Agent-Native Dispatch are documented here. Open it any
4
4
  time from the command menu (Cmd+K → "What's new").
5
5
 
6
+ ## 2026-09-04
7
+
8
+ ### Improved
9
+
10
+ - Dispatch metrics now handle unavailable active-user values, rank apps by tracked usage, show nine cards before expanding, and remove the Recent prompts panel.
11
+
6
12
  ## 2026-08-31
7
13
 
8
14
  ### Improved
@@ -3,6 +3,22 @@
3
3
  All notable user-facing changes to Chat are documented here. Open it any
4
4
  time from the command menu (Cmd+K → "What's new").
5
5
 
6
+ ## 2026-09-04
7
+
8
+ ### Fixed
9
+
10
+ - The Automations tab still lists Factory jobs after their domain tag is missing.
11
+ - The built-in Factory map can be saved the first time without a stale-version error.
12
+ - Agent view-screen follows the Factory tab you are looking at when more than one is open.
13
+
14
+ ## 2026-09-03
15
+
16
+ ### Fixed
17
+
18
+ - An AI map save no longer renames the built-in Factory before it has been saved.
19
+ - Disabled Factory automations can clear a saved Slack channel, repository, or Sentry destination again.
20
+ - Slack channel IDs on a Factory automation no longer disappear after Run now.
21
+
6
22
  ## 2026-09-02
7
23
 
8
24
  ### Improved
@@ -11,6 +27,8 @@ time from the command menu (Cmd+K → "What's new").
11
27
 
12
28
  ### Fixed
13
29
 
30
+ - The Automations tab now has one create control, and it stays on screen when chat is open.
31
+ - Creating a factory or automation from chat now opens Inbox or Automations instead of rewriting the map.
14
32
  - Factory automations stay listed, savable, runnable, and on schedule after a scheduler run updates their status.
15
33
  - PR babysitting now asks Builder when a reviewer leaves body-only feedback, not only inline comments.
16
34
  - PR babysitting no longer reopens a parked pull request when the author replies on an existing review thread.
@@ -3,12 +3,23 @@
3
3
  All notable user-facing changes to Agent-Native Mail are documented here. Open it any
4
4
  time from the command menu (Cmd+K → "What's new") or from Settings.
5
5
 
6
+ ## 2026-09-04
7
+
8
+ ### Fixed
9
+
10
+ - Mail sidebar remains toggleable while agent chat is open.
11
+
6
12
  ## 2026-09-03
7
13
 
8
14
  ### Improved
9
15
 
16
+ - Faster Mail screen previews
10
17
  - Mail keeps Gmail labels and agent-created drafts in sync with the inbox.
11
18
 
19
+ ### Fixed
20
+
21
+ - Mail filters exclude archived messages, Tab navigation no longer reloads the page, and inbox tabs open faster.
22
+
12
23
  ## 2026-09-02
13
24
 
14
25
  ### Improved
@@ -186,8 +186,8 @@ export declare function createAutomationCallbackHandler(runtime: AutomationRunti
186
186
  duplicate?: undefined;
187
187
  eventId?: undefined;
188
188
  } | {
189
- error?: undefined;
190
189
  accepted: boolean;
191
190
  duplicate: boolean;
192
191
  eventId: string;
192
+ error?: undefined;
193
193
  }>;
@@ -142,7 +142,7 @@ export declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColum
142
142
  name: "created_at";
143
143
  tableName: "chat_threads";
144
144
  dataType: "number";
145
- columnType: "PgInteger";
145
+ columnType: "PgBigInt53";
146
146
  data: number;
147
147
  driverParam: string | number;
148
148
  notNull: true;
@@ -159,7 +159,7 @@ export declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColum
159
159
  name: "updated_at";
160
160
  tableName: "chat_threads";
161
161
  dataType: "number";
162
- columnType: "PgInteger";
162
+ columnType: "PgBigInt53";
163
163
  data: number;
164
164
  driverParam: string | number;
165
165
  notNull: true;
@@ -227,7 +227,7 @@ export declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColum
227
227
  name: "pinned_at";
228
228
  tableName: "chat_threads";
229
229
  dataType: "number";
230
- columnType: "PgInteger";
230
+ columnType: "PgBigInt53";
231
231
  data: number;
232
232
  driverParam: string | number;
233
233
  notNull: false;
@@ -244,7 +244,7 @@ export declare const chatThreads: import("drizzle-orm/pg-core").PgTableWithColum
244
244
  name: "archived_at";
245
245
  tableName: "chat_threads";
246
246
  dataType: "number";
247
- columnType: "PgInteger";
247
+ columnType: "PgBigInt53";
248
248
  data: number;
249
249
  driverParam: string | number;
250
250
  notNull: false;
@@ -1,4 +1,4 @@
1
- import { table, text, integer } from "../db/schema.js";
1
+ import { table, text, integer, bigint } from "../db/schema.js";
2
2
  import { createSharesTable, ownableColumns } from "../sharing/schema.js";
3
3
  export const chatThreads = table("chat_threads", {
4
4
  id: text("id").primaryKey(),
@@ -6,13 +6,13 @@ export const chatThreads = table("chat_threads", {
6
6
  preview: text("preview").notNull().default(""),
7
7
  threadData: text("thread_data").notNull().default("{}"),
8
8
  messageCount: integer("message_count").notNull().default(0),
9
- createdAt: integer("created_at").notNull(),
10
- updatedAt: integer("updated_at").notNull(),
9
+ createdAt: bigint("created_at", { mode: "number" }).notNull(),
10
+ updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
11
11
  scopeType: text("scope_type"),
12
12
  scopeId: text("scope_id"),
13
13
  scopeLabel: text("scope_label"),
14
- pinnedAt: integer("pinned_at"),
15
- archivedAt: integer("archived_at"),
14
+ pinnedAt: bigint("pinned_at", { mode: "number" }),
15
+ archivedAt: bigint("archived_at", { mode: "number" }),
16
16
  shareTokenHash: text("share_token_hash"),
17
17
  sourcePlatform: text("source_platform"),
18
18
  sourceAppId: text("source_app_id"),
@@ -26,8 +26,8 @@ export declare const getCollabState: import("h3").EventHandlerWithFetch<import("
26
26
  * Body: { update: string (base64), requestSource?: string }
27
27
  */
28
28
  export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
29
- error: string;
30
29
  ok?: undefined;
30
+ error: string;
31
31
  } | {
32
32
  error?: undefined;
33
33
  ok: boolean;
@@ -13,8 +13,8 @@
13
13
  * Body: { json: any, fieldName?: string, type?: "map"|"array", requestSource?: string }
14
14
  */
15
15
  export declare const postCollabJson: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
16
- ok?: undefined;
17
16
  error: string;
17
+ ok?: undefined;
18
18
  } | {
19
19
  error?: undefined;
20
20
  ok: boolean;
@@ -8,6 +8,7 @@
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { getDbExec } from "../db/client.js";
10
10
  import { ensureColumnExists, ensureIndexExists, ensureTableExists, } from "../db/ddl-guard.js";
11
+ import { widenIntColumnsToBigInt } from "../db/widen-columns.js";
11
12
  import { getRequestOrgId } from "../server/request-context.js";
12
13
  let _initPromise;
13
14
  export async function ensureTable() {
@@ -20,6 +21,7 @@ export async function ensureTable() {
20
21
  const createSql = EMAIL_LOG_CREATE_SQL.replace(/\bINTEGER\b/g, "BIGINT");
21
22
  {
22
23
  await ensureTableExists("email_log", createSql);
24
+ await widenIntColumnsToBigInt("email_log", ["created_at"]);
23
25
  await ensureColumnExists("email_log", "org_id", "ALTER TABLE email_log ADD COLUMN IF NOT EXISTS org_id TEXT");
24
26
  await ensureIndexExists("email_log_template_created_idx", EMAIL_LOG_TEMPLATE_INDEX_SQL);
25
27
  await ensureIndexExists("email_log_org_app_created_idx", EMAIL_LOG_ORG_APP_INDEX_SQL);
@@ -190,7 +190,7 @@ export declare const emailLog: import("drizzle-orm/pg-core").PgTableWithColumns<
190
190
  name: "created_at";
191
191
  tableName: "email_log";
192
192
  dataType: "number";
193
- columnType: "PgInteger";
193
+ columnType: "PgBigInt53";
194
194
  data: number;
195
195
  driverParam: string | number;
196
196
  notNull: true;
@@ -12,7 +12,7 @@
12
12
  * opens an old message. Dispatch reads engagement live from the provider and
13
13
  * joins on `template_id`.
14
14
  */
15
- import { table, text, integer } from "../db/schema.js";
15
+ import { table, text, bigint } from "../db/schema.js";
16
16
  export const emailLog = table("email_log", {
17
17
  id: text("id").primaryKey(),
18
18
  /** Organization that owns the send. Legacy rows without this are unreadable. */
@@ -32,7 +32,7 @@ export const emailLog = table("email_log", {
32
32
  error: text("error"),
33
33
  /** "resend" | "sendgrid" | "dev". */
34
34
  provider: text("provider").notNull(),
35
- createdAt: integer("created_at").notNull(),
35
+ createdAt: bigint("created_at", { mode: "number" }).notNull(),
36
36
  });
37
37
  export const EMAIL_LOG_CREATE_SQL = `CREATE TABLE IF NOT EXISTS email_log (
38
38
  id TEXT PRIMARY KEY,
@@ -3,18 +3,18 @@ declare const _default: import("../../action.js").ActionDefinition<{
3
3
  url?: string;
4
4
  filename?: string;
5
5
  }, {
6
+ id?: undefined;
6
7
  error: string;
7
8
  configured?: undefined;
8
9
  connectPath?: undefined;
9
10
  url?: undefined;
10
- id?: undefined;
11
11
  provider?: undefined;
12
12
  } | {
13
+ id?: undefined;
13
14
  error: string;
14
15
  configured: boolean;
15
16
  connectPath: string;
16
17
  url?: undefined;
17
- id?: undefined;
18
18
  provider?: undefined;
19
19
  } | {
20
20
  error?: undefined;
@@ -43,8 +43,8 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
43
43
  } | {
44
44
  summary: import("./types.js").TraceSummary;
45
45
  spans: import("./types.js").TraceSpan[];
46
- error?: undefined;
47
46
  id?: undefined;
47
+ error?: undefined;
48
48
  ok?: undefined;
49
49
  } | {
50
50
  summary?: undefined;
@@ -55,13 +55,13 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
55
55
  } | {
56
56
  summary?: undefined;
57
57
  spans?: undefined;
58
- error: any;
59
58
  id?: undefined;
59
+ error: any;
60
60
  ok?: undefined;
61
61
  } | {
62
62
  summary?: undefined;
63
63
  spans?: undefined;
64
- ok: boolean;
65
- error?: undefined;
66
64
  id?: undefined;
65
+ error?: undefined;
66
+ ok: boolean;
67
67
  }>>;
@@ -10,7 +10,7 @@ export const ORG_MIGRATIONS = [
10
10
  id TEXT PRIMARY KEY,
11
11
  name TEXT NOT NULL,
12
12
  created_by TEXT NOT NULL,
13
- created_at INTEGER NOT NULL
13
+ created_at BIGINT NOT NULL
14
14
  )`,
15
15
  },
16
16
  {
@@ -20,7 +20,7 @@ export const ORG_MIGRATIONS = [
20
20
  org_id TEXT NOT NULL,
21
21
  email TEXT NOT NULL,
22
22
  role TEXT NOT NULL,
23
- joined_at INTEGER NOT NULL,
23
+ joined_at BIGINT NOT NULL,
24
24
  UNIQUE(org_id, email)
25
25
  )`,
26
26
  },
@@ -31,7 +31,7 @@ export const ORG_MIGRATIONS = [
31
31
  org_id TEXT NOT NULL,
32
32
  email TEXT NOT NULL,
33
33
  invited_by TEXT NOT NULL,
34
- created_at INTEGER NOT NULL,
34
+ created_at BIGINT NOT NULL,
35
35
  status TEXT NOT NULL
36
36
  )`,
37
37
  },
@@ -111,7 +111,7 @@ export const ORG_MIGRATIONS = [
111
111
  email TEXT NOT NULL,
112
112
  role TEXT NOT NULL,
113
113
  updated_by TEXT NOT NULL,
114
- updated_at INTEGER NOT NULL
114
+ updated_at BIGINT NOT NULL
115
115
  )`,
116
116
  },
117
117
  {
@@ -142,8 +142,8 @@ export const ORG_MIGRATIONS = [
142
142
  name TEXT NOT NULL,
143
143
  description TEXT,
144
144
  path TEXT NOT NULL,
145
- created_at INTEGER NOT NULL,
146
- updated_at INTEGER NOT NULL
145
+ created_at BIGINT NOT NULL,
146
+ updated_at BIGINT NOT NULL
147
147
  )`,
148
148
  },
149
149
  {
@@ -195,12 +195,40 @@ export const ORG_MIGRATIONS = [
195
195
  version: 1020,
196
196
  name: "organization-federation-removal-pending",
197
197
  sql: `ALTER TABLE org_members
198
- ADD COLUMN IF NOT EXISTS federation_removal_pending_at INTEGER`,
198
+ ADD COLUMN IF NOT EXISTS federation_removal_pending_at BIGINT`,
199
199
  },
200
200
  {
201
201
  version: 1021,
202
202
  name: "organization-federation-roster-initialized",
203
203
  sql: `ALTER TABLE organizations
204
- ADD COLUMN IF NOT EXISTS federation_roster_initialized_at INTEGER`,
204
+ ADD COLUMN IF NOT EXISTS federation_roster_initialized_at BIGINT`,
205
+ },
206
+ {
207
+ // Widening only. Every column below stores a JS `Date.now()`
208
+ // millisecond epoch (13 digits) but was declared `INTEGER` — Postgres
209
+ // int4, max 2,147,483,647 — so the very first org-creation INSERT
210
+ // (`organizations.created_at`, `org_members.joined_at`) fails with
211
+ // `value "<ms epoch>" is out of range for type integer`. BIGINT matches
212
+ // every other millisecond-timestamp column in the framework.
213
+ version: 1022,
214
+ name: "org-tables-timestamps-bigint",
215
+ sql: `
216
+ -- guard:allow-destructive-ddl — widen legacy int4 timestamp storage to preserve Date.now() values
217
+ ALTER TABLE organizations ALTER COLUMN created_at TYPE BIGINT;
218
+ -- guard:allow-destructive-ddl — widen legacy int4 timestamp storage to preserve Date.now() values
219
+ ALTER TABLE organizations ALTER COLUMN federation_roster_initialized_at TYPE BIGINT;
220
+ -- guard:allow-destructive-ddl — widen legacy int4 timestamp storage to preserve Date.now() values
221
+ ALTER TABLE org_members ALTER COLUMN joined_at TYPE BIGINT;
222
+ -- guard:allow-destructive-ddl — widen legacy int4 timestamp storage to preserve Date.now() values
223
+ ALTER TABLE org_members ALTER COLUMN federation_removal_pending_at TYPE BIGINT;
224
+ -- guard:allow-destructive-ddl — widen legacy int4 timestamp storage to preserve Date.now() values
225
+ ALTER TABLE org_invitations ALTER COLUMN created_at TYPE BIGINT;
226
+ -- guard:allow-destructive-ddl — widen legacy int4 timestamp storage to preserve Date.now() values
227
+ ALTER TABLE app_member_roles ALTER COLUMN updated_at TYPE BIGINT;
228
+ -- guard:allow-destructive-ddl — widen legacy int4 timestamp storage to preserve Date.now() values
229
+ ALTER TABLE workspace_apps ALTER COLUMN created_at TYPE BIGINT;
230
+ -- guard:allow-destructive-ddl — widen legacy int4 timestamp storage to preserve Date.now() values
231
+ ALTER TABLE workspace_apps ALTER COLUMN updated_at TYPE BIGINT;
232
+ `,
205
233
  },
206
234
  ];
@@ -57,7 +57,7 @@ export declare const organizations: import("drizzle-orm/pg-core").PgTableWithCol
57
57
  name: "created_at";
58
58
  tableName: "organizations";
59
59
  dataType: "number";
60
- columnType: "PgInteger";
60
+ columnType: "PgBigInt53";
61
61
  data: number;
62
62
  driverParam: string | number;
63
63
  notNull: true;
@@ -176,7 +176,7 @@ export declare const organizations: import("drizzle-orm/pg-core").PgTableWithCol
176
176
  name: "federation_roster_initialized_at";
177
177
  tableName: "organizations";
178
178
  dataType: "number";
179
- columnType: "PgInteger";
179
+ columnType: "PgBigInt53";
180
180
  data: number;
181
181
  driverParam: string | number;
182
182
  notNull: false;
@@ -268,7 +268,7 @@ export declare const orgMembers: import("drizzle-orm/pg-core").PgTableWithColumn
268
268
  name: "joined_at";
269
269
  tableName: "org_members";
270
270
  dataType: "number";
271
- columnType: "PgInteger";
271
+ columnType: "PgBigInt53";
272
272
  data: number;
273
273
  driverParam: string | number;
274
274
  notNull: true;
@@ -285,7 +285,7 @@ export declare const orgMembers: import("drizzle-orm/pg-core").PgTableWithColumn
285
285
  name: "federation_removal_pending_at";
286
286
  tableName: "org_members";
287
287
  dataType: "number";
288
- columnType: "PgInteger";
288
+ columnType: "PgBigInt53";
289
289
  data: number;
290
290
  driverParam: string | number;
291
291
  notNull: false;
@@ -416,7 +416,7 @@ export declare const appMemberRoles: import("drizzle-orm/pg-core").PgTableWithCo
416
416
  name: "updated_at";
417
417
  tableName: "app_member_roles";
418
418
  dataType: "number";
419
- columnType: "PgInteger";
419
+ columnType: "PgBigInt53";
420
420
  data: number;
421
421
  driverParam: string | number;
422
422
  notNull: true;
@@ -508,7 +508,7 @@ export declare const orgInvitations: import("drizzle-orm/pg-core").PgTableWithCo
508
508
  name: "created_at";
509
509
  tableName: "org_invitations";
510
510
  dataType: "number";
511
- columnType: "PgInteger";
511
+ columnType: "PgBigInt53";
512
512
  data: number;
513
513
  driverParam: string | number;
514
514
  notNull: true;
@@ -686,7 +686,7 @@ export declare const workspaceApps: import("drizzle-orm/pg-core").PgTableWithCol
686
686
  name: "created_at";
687
687
  tableName: "workspace_apps";
688
688
  dataType: "number";
689
- columnType: "PgInteger";
689
+ columnType: "PgBigInt53";
690
690
  data: number;
691
691
  driverParam: string | number;
692
692
  notNull: true;
@@ -703,7 +703,7 @@ export declare const workspaceApps: import("drizzle-orm/pg-core").PgTableWithCol
703
703
  name: "updated_at";
704
704
  tableName: "workspace_apps";
705
705
  dataType: "number";
706
- columnType: "PgInteger";
706
+ columnType: "PgBigInt53";
707
707
  data: number;
708
708
  driverParam: string | number;
709
709
  notNull: true;
@@ -1,9 +1,9 @@
1
- import { table, text, integer, ownableColumns, createSharesTable, } from "../db/schema.js";
1
+ import { table, text, bigint, ownableColumns, createSharesTable, } from "../db/schema.js";
2
2
  export const organizations = table("organizations", {
3
3
  id: text("id").primaryKey(),
4
4
  name: text("name").notNull(),
5
5
  createdBy: text("created_by").notNull(),
6
- createdAt: integer("created_at").notNull(),
6
+ createdAt: bigint("created_at", { mode: "number" }).notNull(),
7
7
  allowedDomain: text("allowed_domain"),
8
8
  a2aSecret: text("a2a_secret"),
9
9
  workspaceUrl: text("workspace_url"),
@@ -12,16 +12,20 @@ export const organizations = table("organizations", {
12
12
  identityAuthority: text("identity_authority"),
13
13
  identityId: text("identity_id"),
14
14
  /** Set after the identity authority has accepted the initial member roster. */
15
- federationRosterInitializedAt: integer("federation_roster_initialized_at"),
15
+ federationRosterInitializedAt: bigint("federation_roster_initialized_at", {
16
+ mode: "number",
17
+ }),
16
18
  });
17
19
  export const orgMembers = table("org_members", {
18
20
  id: text("id").primaryKey(),
19
21
  orgId: text("org_id").notNull(),
20
22
  email: text("email").notNull(),
21
23
  role: text("role").notNull(),
22
- joinedAt: integer("joined_at").notNull(),
24
+ joinedAt: bigint("joined_at", { mode: "number" }).notNull(),
23
25
  /** Restrictive marker retained if authority revocation beats local deletion. */
24
- federationRemovalPendingAt: integer("federation_removal_pending_at"),
26
+ federationRemovalPendingAt: bigint("federation_removal_pending_at", {
27
+ mode: "number",
28
+ }),
25
29
  });
26
30
  /**
27
31
  * Per-app role assignments, keyed to an existing `org_members` row. An app role
@@ -35,14 +39,14 @@ export const appMemberRoles = table("app_member_roles", {
35
39
  email: text("email").notNull(),
36
40
  role: text("role").notNull(),
37
41
  updatedBy: text("updated_by").notNull(),
38
- updatedAt: integer("updated_at").notNull(),
42
+ updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
39
43
  });
40
44
  export const orgInvitations = table("org_invitations", {
41
45
  id: text("id").primaryKey(),
42
46
  orgId: text("org_id").notNull(),
43
47
  email: text("email").notNull(),
44
48
  invitedBy: text("invited_by").notNull(),
45
- createdAt: integer("created_at").notNull(),
49
+ createdAt: bigint("created_at", { mode: "number" }).notNull(),
46
50
  status: text("status").notNull(),
47
51
  role: text("role"),
48
52
  });
@@ -61,7 +65,7 @@ export const workspaceApps = table("workspace_apps", {
61
65
  name: text("name").notNull(),
62
66
  description: text("description"),
63
67
  path: text("path").notNull(),
64
- createdAt: integer("created_at").notNull(),
65
- updatedAt: integer("updated_at").notNull(),
68
+ createdAt: bigint("created_at", { mode: "number" }).notNull(),
69
+ updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
66
70
  });
67
71
  export const workspaceAppShares = createSharesTable("workspace_app_shares");
@@ -15,6 +15,6 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
15
15
  error: string;
16
16
  ok?: undefined;
17
17
  } | {
18
- error?: undefined;
19
18
  ok: boolean;
19
+ error?: undefined;
20
20
  }>>;
@@ -37,17 +37,17 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
37
37
  ok?: undefined;
38
38
  status?: undefined;
39
39
  } | {
40
- error?: undefined;
41
40
  ok: boolean;
42
41
  status: string;
42
+ error?: undefined;
43
43
  } | {
44
44
  ok?: undefined;
45
45
  error: string;
46
46
  removed?: undefined;
47
47
  } | {
48
- error?: undefined;
49
48
  ok: boolean;
50
49
  removed: boolean;
50
+ error?: undefined;
51
51
  }>>;
52
52
  /**
53
53
  * POST /_agent-native/secrets/:key/test — validate an optional candidate value
@@ -58,13 +58,13 @@ export declare function createTestSecretHandler(): import("h3").EventHandlerWith
58
58
  error: string;
59
59
  note?: undefined;
60
60
  } | {
61
- error?: undefined;
62
61
  ok: boolean;
63
62
  note?: undefined;
64
- } | {
65
63
  error?: undefined;
64
+ } | {
66
65
  ok: boolean;
67
66
  note: string;
67
+ error?: undefined;
68
68
  } | {
69
69
  note?: undefined;
70
70
  ok: boolean;
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
95
95
  export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
96
96
  error: string;
97
97
  } | {
98
- error?: undefined;
99
98
  ok: boolean;
100
99
  key: string;
101
- } | {
102
100
  error?: undefined;
101
+ } | {
103
102
  ok: boolean;
104
103
  removed: boolean;
104
+ error?: undefined;
105
105
  }>>;