@agent-native/core 0.209.2-nightly-20261016153022 → 0.209.2
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.
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/org/index.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
- package/dist/provider-api/actions/provider-api.d.ts +5 -5
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-engine-default-model-route.d.ts +2 -2
- package/dist/server/app-release-migrations.d.ts +21 -0
- package/dist/server/app-release-migrations.js +33 -0
- package/dist/server/core-routes-plugin.d.ts +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/templates/builder-code-starter/.agents/skills/storing-data/SKILL.md.patch +8 -6
- package/dist/templates/builder-code-starter/scripts/migrate-production.ts.patch +4 -4
- package/dist/templates/chat/.agents/skills/storing-data/SKILL.md +5 -3
- package/dist/templates/chat/scripts/migrate-production.ts +5 -1
- package/dist/templates/default/.agents/skills/storing-data/SKILL.md +5 -3
- package/dist/templates/default/scripts/migrate-production.ts +5 -1
- package/dist/templates/headless/.agents/skills/storing-data/SKILL.md +5 -3
- package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +5 -3
- package/dist/triggers/actions/manage-automation.d.ts +3 -3
- package/package.json +4 -4
- package/src/templates/builder-code-starter/.agents/skills/storing-data/SKILL.md.patch +8 -6
- package/src/templates/builder-code-starter/scripts/migrate-production.ts.patch +4 -4
- package/src/templates/chat/.agents/skills/storing-data/SKILL.md +5 -3
- package/src/templates/chat/scripts/migrate-production.ts +5 -1
- package/src/templates/default/.agents/skills/storing-data/SKILL.md +5 -3
- package/src/templates/default/scripts/migrate-production.ts +5 -1
- package/src/templates/headless/.agents/skills/storing-data/SKILL.md +5 -3
- package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +5 -3
|
@@ -140,13 +140,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
140
140
|
clientHint?: undefined;
|
|
141
141
|
timestamp?: undefined;
|
|
142
142
|
chapterId?: undefined;
|
|
143
|
-
count?: undefined;
|
|
144
143
|
startAt?: undefined;
|
|
145
144
|
endAt?: undefined;
|
|
146
145
|
reason?: undefined;
|
|
147
146
|
includeMicrophone?: undefined;
|
|
148
147
|
includeSystemAudio?: undefined;
|
|
149
148
|
requestId?: undefined;
|
|
149
|
+
count?: undefined;
|
|
150
150
|
};
|
|
151
151
|
required?: undefined;
|
|
152
152
|
};
|
|
@@ -171,13 +171,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
171
171
|
clientHint?: undefined;
|
|
172
172
|
timestamp?: undefined;
|
|
173
173
|
chapterId?: undefined;
|
|
174
|
-
count?: undefined;
|
|
175
174
|
startAt?: undefined;
|
|
176
175
|
endAt?: undefined;
|
|
177
176
|
reason?: undefined;
|
|
178
177
|
includeMicrophone?: undefined;
|
|
179
178
|
includeSystemAudio?: undefined;
|
|
180
179
|
requestId?: undefined;
|
|
180
|
+
count?: undefined;
|
|
181
181
|
};
|
|
182
182
|
required?: undefined;
|
|
183
183
|
};
|
|
@@ -196,13 +196,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
196
196
|
clientHint?: undefined;
|
|
197
197
|
timestamp?: undefined;
|
|
198
198
|
chapterId?: undefined;
|
|
199
|
-
count?: undefined;
|
|
200
199
|
startAt?: undefined;
|
|
201
200
|
endAt?: undefined;
|
|
202
201
|
reason?: undefined;
|
|
203
202
|
includeMicrophone?: undefined;
|
|
204
203
|
includeSystemAudio?: undefined;
|
|
205
204
|
requestId?: undefined;
|
|
205
|
+
count?: undefined;
|
|
206
206
|
};
|
|
207
207
|
required?: undefined;
|
|
208
208
|
};
|
|
@@ -231,13 +231,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
231
231
|
};
|
|
232
232
|
timestamp?: undefined;
|
|
233
233
|
chapterId?: undefined;
|
|
234
|
-
count?: undefined;
|
|
235
234
|
startAt?: undefined;
|
|
236
235
|
endAt?: undefined;
|
|
237
236
|
reason?: undefined;
|
|
238
237
|
includeMicrophone?: undefined;
|
|
239
238
|
includeSystemAudio?: undefined;
|
|
240
239
|
requestId?: undefined;
|
|
240
|
+
count?: undefined;
|
|
241
241
|
};
|
|
242
242
|
};
|
|
243
243
|
} | {
|
|
@@ -260,12 +260,12 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
260
260
|
description: string;
|
|
261
261
|
};
|
|
262
262
|
chapterId?: undefined;
|
|
263
|
-
count?: undefined;
|
|
264
263
|
startAt?: undefined;
|
|
265
264
|
endAt?: undefined;
|
|
266
265
|
includeMicrophone?: undefined;
|
|
267
266
|
includeSystemAudio?: undefined;
|
|
268
267
|
requestId?: undefined;
|
|
268
|
+
count?: undefined;
|
|
269
269
|
};
|
|
270
270
|
};
|
|
271
271
|
} | {
|
|
@@ -317,7 +317,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
317
317
|
clientHint?: undefined;
|
|
318
318
|
timestamp?: undefined;
|
|
319
319
|
chapterId?: undefined;
|
|
320
|
-
count?: undefined;
|
|
321
320
|
startAt: {
|
|
322
321
|
type: string;
|
|
323
322
|
description: string;
|
|
@@ -337,6 +336,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
337
336
|
type: string;
|
|
338
337
|
};
|
|
339
338
|
requestId?: undefined;
|
|
339
|
+
count?: undefined;
|
|
340
340
|
};
|
|
341
341
|
};
|
|
342
342
|
} | {
|
|
@@ -352,7 +352,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
352
352
|
clientHint?: undefined;
|
|
353
353
|
timestamp?: undefined;
|
|
354
354
|
chapterId?: undefined;
|
|
355
|
-
count?: undefined;
|
|
356
355
|
startAt?: undefined;
|
|
357
356
|
endAt?: undefined;
|
|
358
357
|
reason?: undefined;
|
|
@@ -361,6 +360,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
361
360
|
requestId: {
|
|
362
361
|
type: string;
|
|
363
362
|
};
|
|
363
|
+
count?: undefined;
|
|
364
364
|
};
|
|
365
365
|
};
|
|
366
366
|
})[];
|
package/dist/org/index.d.ts
CHANGED
|
@@ -161,9 +161,9 @@ export declare const getMyOrgHandler: import("h3").EventHandlerWithFetch<import(
|
|
|
161
161
|
soloDeploymentAdmin: boolean;
|
|
162
162
|
}>>;
|
|
163
163
|
export declare const createOrgHandler: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
164
|
-
name?: undefined;
|
|
165
164
|
success: boolean;
|
|
166
165
|
id?: undefined;
|
|
166
|
+
name?: undefined;
|
|
167
167
|
role?: undefined;
|
|
168
168
|
} | {
|
|
169
169
|
success?: undefined;
|
|
@@ -75,7 +75,6 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
75
75
|
user: "user";
|
|
76
76
|
}>>;
|
|
77
77
|
}, z.core.$strip>>, {
|
|
78
|
-
provider?: undefined;
|
|
79
78
|
id?: undefined;
|
|
80
79
|
deleted?: undefined;
|
|
81
80
|
message?: undefined;
|
|
@@ -89,6 +88,7 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
89
88
|
updatedAt: number;
|
|
90
89
|
}[];
|
|
91
90
|
count: number;
|
|
91
|
+
provider?: undefined;
|
|
92
92
|
found?: undefined;
|
|
93
93
|
registered?: undefined;
|
|
94
94
|
label?: undefined;
|
|
@@ -103,30 +103,30 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
103
103
|
registered?: undefined;
|
|
104
104
|
label?: undefined;
|
|
105
105
|
} | {
|
|
106
|
-
provider?: undefined;
|
|
107
106
|
deleted?: undefined;
|
|
108
107
|
count?: undefined;
|
|
109
108
|
message?: undefined;
|
|
110
109
|
providers?: undefined;
|
|
110
|
+
provider?: undefined;
|
|
111
111
|
found: boolean;
|
|
112
112
|
id: string;
|
|
113
113
|
registered?: undefined;
|
|
114
114
|
label?: undefined;
|
|
115
115
|
} | {
|
|
116
|
-
provider?: undefined;
|
|
117
116
|
count?: undefined;
|
|
118
117
|
message?: undefined;
|
|
119
118
|
providers?: undefined;
|
|
119
|
+
provider?: undefined;
|
|
120
120
|
found?: undefined;
|
|
121
121
|
deleted: boolean;
|
|
122
122
|
id: string;
|
|
123
123
|
registered?: undefined;
|
|
124
124
|
label?: undefined;
|
|
125
125
|
} | {
|
|
126
|
-
provider?: undefined;
|
|
127
126
|
deleted?: undefined;
|
|
128
127
|
count?: undefined;
|
|
129
128
|
providers?: undefined;
|
|
129
|
+
provider?: undefined;
|
|
130
130
|
found?: undefined;
|
|
131
131
|
registered: boolean;
|
|
132
132
|
id: string;
|
|
@@ -316,7 +316,6 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
316
316
|
notes?: string | undefined;
|
|
317
317
|
scope?: "org" | "user" | undefined;
|
|
318
318
|
}, {
|
|
319
|
-
id?: undefined;
|
|
320
319
|
message?: undefined;
|
|
321
320
|
providers: {
|
|
322
321
|
id: string;
|
|
@@ -332,20 +331,21 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
332
331
|
found?: undefined;
|
|
333
332
|
deleted?: undefined;
|
|
334
333
|
registered?: undefined;
|
|
334
|
+
id?: undefined;
|
|
335
335
|
label?: undefined;
|
|
336
336
|
} | {
|
|
337
|
-
id?: undefined;
|
|
338
|
-
count?: undefined;
|
|
339
337
|
message?: undefined;
|
|
338
|
+
count?: undefined;
|
|
340
339
|
providers?: undefined;
|
|
341
340
|
found: boolean;
|
|
342
341
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
343
342
|
deleted?: undefined;
|
|
344
343
|
registered?: undefined;
|
|
344
|
+
id?: undefined;
|
|
345
345
|
label?: undefined;
|
|
346
346
|
} | {
|
|
347
|
-
count?: undefined;
|
|
348
347
|
message?: undefined;
|
|
348
|
+
count?: undefined;
|
|
349
349
|
providers?: undefined;
|
|
350
350
|
provider?: undefined;
|
|
351
351
|
found: boolean;
|
|
@@ -354,8 +354,8 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
354
354
|
registered?: undefined;
|
|
355
355
|
label?: undefined;
|
|
356
356
|
} | {
|
|
357
|
-
count?: undefined;
|
|
358
357
|
message?: undefined;
|
|
358
|
+
count?: undefined;
|
|
359
359
|
providers?: undefined;
|
|
360
360
|
provider?: undefined;
|
|
361
361
|
found?: undefined;
|
|
@@ -67,12 +67,12 @@ export declare function createAgentEngineApiKeyHandler(): import("h3").EventHand
|
|
|
67
67
|
code: any;
|
|
68
68
|
} | {
|
|
69
69
|
errorCode?: undefined;
|
|
70
|
+
error?: undefined;
|
|
70
71
|
code?: undefined;
|
|
71
72
|
ok: boolean;
|
|
72
73
|
key: string;
|
|
73
74
|
baseUrlKey?: string;
|
|
74
75
|
scope: AgentEngineApiKeyScope;
|
|
75
76
|
defaultModel?: import("./agent-engine-default-model-route.js").SavedKeyDefaultModelOutcome;
|
|
76
|
-
error?: undefined;
|
|
77
77
|
}>>;
|
|
78
78
|
export {};
|
|
@@ -8,17 +8,17 @@ export declare const AGENT_ENGINE_API_KEY_ACTION_NAME = "agent-engine-api-key";
|
|
|
8
8
|
* resolveEngine's credential detection.
|
|
9
9
|
*/
|
|
10
10
|
export declare function createAgentEngineDisconnectHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
11
|
+
ok?: undefined;
|
|
11
12
|
error: string;
|
|
12
13
|
scope?: undefined;
|
|
13
|
-
ok?: undefined;
|
|
14
14
|
} | {
|
|
15
15
|
ok: boolean;
|
|
16
16
|
error: any;
|
|
17
17
|
scope?: undefined;
|
|
18
18
|
} | {
|
|
19
|
+
error?: undefined;
|
|
19
20
|
ok: boolean;
|
|
20
21
|
scope: "org" | "user";
|
|
21
|
-
error?: undefined;
|
|
22
22
|
}>>;
|
|
23
23
|
export interface DefaultModelSelectionRequest {
|
|
24
24
|
engine: string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Where the starters' storing-data skill tells an app to declare its tables. */
|
|
2
|
+
export declare const APP_DB_PLUGIN = "server/plugins/db.ts";
|
|
3
|
+
export type AppReleaseMigrationResult = {
|
|
4
|
+
status: "applied";
|
|
5
|
+
plugin: string;
|
|
6
|
+
} | {
|
|
7
|
+
status: "no-app-tables";
|
|
8
|
+
} | {
|
|
9
|
+
status: "managed-drizzle";
|
|
10
|
+
config: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Applies the app's own `runMigrations` list at release. A release-owned
|
|
14
|
+
* hosted function skips that list at boot (that is what release-owned means),
|
|
15
|
+
* so without this step a starter app's tables are never created in
|
|
16
|
+
* production. A managed Drizzle project is the exception: `db:migrate` owns
|
|
17
|
+
* its tables, and running the plugin too would give them two owners.
|
|
18
|
+
*
|
|
19
|
+
* Call inside `withMigrationRuntime`, after `runFrameworkReleaseMigrations`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function runAppReleaseMigrations(cwd?: string): Promise<AppReleaseMigrationResult>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
/** Where the starters' storing-data skill tells an app to declare its tables. */
|
|
5
|
+
export const APP_DB_PLUGIN = "server/plugins/db.ts";
|
|
6
|
+
const MANAGED_DRIZZLE_CONFIGS = [
|
|
7
|
+
"drizzle.config.ts",
|
|
8
|
+
"drizzle.config.js",
|
|
9
|
+
"drizzle.config.json",
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* Applies the app's own `runMigrations` list at release. A release-owned
|
|
13
|
+
* hosted function skips that list at boot (that is what release-owned means),
|
|
14
|
+
* so without this step a starter app's tables are never created in
|
|
15
|
+
* production. A managed Drizzle project is the exception: `db:migrate` owns
|
|
16
|
+
* its tables, and running the plugin too would give them two owners.
|
|
17
|
+
*
|
|
18
|
+
* Call inside `withMigrationRuntime`, after `runFrameworkReleaseMigrations`.
|
|
19
|
+
*/
|
|
20
|
+
export async function runAppReleaseMigrations(cwd = process.cwd()) {
|
|
21
|
+
const managed = MANAGED_DRIZZLE_CONFIGS.find((file) => existsSync(path.join(cwd, file)));
|
|
22
|
+
if (managed)
|
|
23
|
+
return { status: "managed-drizzle", config: managed };
|
|
24
|
+
const pluginPath = path.join(cwd, APP_DB_PLUGIN);
|
|
25
|
+
if (!existsSync(pluginPath))
|
|
26
|
+
return { status: "no-app-tables" };
|
|
27
|
+
const plugin = (await import(pathToFileURL(pluginPath).href)).default;
|
|
28
|
+
if (typeof plugin !== "function") {
|
|
29
|
+
throw new Error(`${APP_DB_PLUGIN} must default-export its migration plugin (export default runMigrations([...], { table })).`);
|
|
30
|
+
}
|
|
31
|
+
await plugin(null);
|
|
32
|
+
return { status: "applied", plugin: APP_DB_PLUGIN };
|
|
33
|
+
}
|
|
@@ -585,8 +585,8 @@ export declare function createPublicRemoteAgentsHandler(discover?: PublicAgentDi
|
|
|
585
585
|
error: string;
|
|
586
586
|
agents?: undefined;
|
|
587
587
|
} | {
|
|
588
|
-
agents: Omit<import("./agent-discovery.js").DiscoveredAgent, "auth" | "kind">[];
|
|
589
588
|
error?: undefined;
|
|
589
|
+
agents: Omit<import("./agent-discovery.js").DiscoveredAgent, "auth" | "kind">[];
|
|
590
590
|
}>>;
|
|
591
591
|
export declare function getBuilderConnectErrorDisposition(error: unknown, connectAttemptId: string | null): "correlated" | "legacy" | null;
|
|
592
592
|
export declare function getBuilderConnectErrorKey(ownerEmail: string, connectAttemptId?: string | null): string;
|
package/dist/server/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export { createPollEventsHandler } from "./poll-events.js";
|
|
|
38
38
|
export { createAuthPlugin, defaultAuthPlugin } from "./auth-plugin.js";
|
|
39
39
|
export { BETTER_AUTH_MIGRATIONS, runBetterAuthMigrations, } from "./better-auth-migrations.js";
|
|
40
40
|
export { runFrameworkReleaseMigrations } from "./release-migrations.js";
|
|
41
|
+
export { runAppReleaseMigrations, type AppReleaseMigrationResult, } from "./app-release-migrations.js";
|
|
41
42
|
export { initServerSentry, isServerSentryEnabled, setSentryUserForRequest, captureRouteError, type RouteErrorContext, } from "./sentry.js";
|
|
42
43
|
export { captureError, captureServerError, registerErrorCaptureProvider, type CaptureErrorContext, type CaptureErrorProvider, } from "./capture-error.js";
|
|
43
44
|
export { createSentryPlugin, defaultSentryPlugin } from "./sentry-plugin.js";
|
package/dist/server/index.js
CHANGED
|
@@ -37,6 +37,7 @@ export { createPollEventsHandler } from "./poll-events.js";
|
|
|
37
37
|
export { createAuthPlugin, defaultAuthPlugin } from "./auth-plugin.js";
|
|
38
38
|
export { BETTER_AUTH_MIGRATIONS, runBetterAuthMigrations, } from "./better-auth-migrations.js";
|
|
39
39
|
export { runFrameworkReleaseMigrations } from "./release-migrations.js";
|
|
40
|
+
export { runAppReleaseMigrations, } from "./app-release-migrations.js";
|
|
40
41
|
export { initServerSentry, isServerSentryEnabled, setSentryUserForRequest, captureRouteError, } from "./sentry.js";
|
|
41
42
|
export { captureError, captureServerError, registerErrorCaptureProvider, } from "./capture-error.js";
|
|
42
43
|
export { createSentryPlugin, defaultSentryPlugin } from "./sentry-plugin.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
===================================================================
|
|
2
2
|
--- a/.agents/skills/storing-data/SKILL.md
|
|
3
3
|
+++ b/.agents/skills/storing-data/SKILL.md
|
|
4
|
-
@@ -36,
|
|
4
|
+
@@ -36,23 +36,12 @@
|
|
5
5
|
such as `ownableColumns()` and `createSharesTable()`, from
|
|
6
6
|
`@agent-native/core/db/schema`. Do not import table builders through the core
|
|
7
7
|
helper module.
|
|
@@ -13,12 +13,14 @@
|
|
|
13
13
|
-Drizzle Kit setup; follow their local instructions and the Database docs for
|
|
14
14
|
-the migration path. In Chat, add `server/db/schema.ts`, `server/db/index.ts`
|
|
15
15
|
-with `createGetDb(schema)`, and `server/plugins/db.ts` with
|
|
16
|
-
-`runMigrations([...], { table })`. `scripts/migrate-production.ts`
|
|
17
|
-
-
|
|
18
|
-
-
|
|
16
|
+
-`runMigrations([...], { table })`. `scripts/migrate-production.ts` applies the
|
|
17
|
+
-framework tables and then that plugin (`runAppReleaseMigrations`), because a
|
|
18
|
+
-release-owned deploy skips it at boot; a project with a Drizzle config is left to
|
|
19
|
+
-`db:migrate`, and do not create a parallel `runMigrations([...])` list beside a
|
|
20
|
+
-generated Drizzle migration owner. Give each handwritten migration a unique, stable `name`
|
|
19
21
|
-alongside its `version`; append changes instead of renumbering, reusing, or
|
|
20
22
|
-editing an applied entry.
|
|
21
|
-
+When the project contains `drizzle.config.ts` and `drizzle/START_HERE.md`, that managed Drizzle scaffold is the only app migration path. Define app tables in `drizzle/schema.ts`, run `pnpm db:generate`, and apply them with `pnpm db:migrate`. `scripts/migrate-production.ts`
|
|
23
|
+
+When the project contains `drizzle.config.ts` and `drizzle/START_HERE.md`, that managed Drizzle scaffold is the only app migration path. Define app tables in `drizzle/schema.ts`, run `pnpm db:generate`, and apply them with `pnpm db:migrate`. `scripts/migrate-production.ts` applies the framework tables and leaves app tables to `db:migrate` (it skips `server/plugins/db.ts` when `drizzle.config.ts` exists): do not create a parallel `runMigrations([...])` list in `server/plugins/db.ts` or import an app migration runner into the release script.
|
|
22
24
|
|
|
23
25
|
+In projects without that managed scaffold, every entry added to a framework `runMigrations([...])` list (`@agent-native/core/db`) needs a unique, stable `name` alongside its `version`; append changes instead of renumbering, reusing, or editing an applied entry.
|
|
24
26
|
+
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
|
|
27
29
|
Existing unnamed migrations don't need to be renamed retroactively (the two gating strategies coexist), but any new entry should always carry a name.
|
|
28
30
|
|
|
29
|
-
@@ -
|
|
31
|
+
@@ -72,12 +61,12 @@
|
|
30
32
|
| `sessions` | Auth sessions | `@agent-native/core/server` |
|
|
31
33
|
|
|
32
34
|
### Domain Data (per-template)
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
+
|
|
8
8
|
import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
|
|
9
9
|
import { loadEnv } from "@agent-native/core/scripts";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
@@ -
|
|
13
|
-
await
|
|
10
|
+
import {
|
|
11
|
+
runAppReleaseMigrations,
|
|
12
|
+
@@ -13,8 +16,37 @@
|
|
13
|
+
await runAppReleaseMigrations();
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -44,9 +44,11 @@ second migration owner beside it. The Chat and default starters do not ship that
|
|
|
44
44
|
Drizzle Kit setup; follow their local instructions and the Database docs for
|
|
45
45
|
the migration path. In Chat, add `server/db/schema.ts`, `server/db/index.ts`
|
|
46
46
|
with `createGetDb(schema)`, and `server/plugins/db.ts` with
|
|
47
|
-
`runMigrations([...], { table })`. `scripts/migrate-production.ts`
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
`runMigrations([...], { table })`. `scripts/migrate-production.ts` applies the
|
|
48
|
+
framework tables and then that plugin (`runAppReleaseMigrations`), because a
|
|
49
|
+
release-owned deploy skips it at boot; a project with a Drizzle config is left to
|
|
50
|
+
`db:migrate`, and do not create a parallel `runMigrations([...])` list beside a
|
|
51
|
+
generated Drizzle migration owner. Give each handwritten migration a unique, stable `name`
|
|
50
52
|
alongside its `version`; append changes instead of renumbering, reusing, or
|
|
51
53
|
editing an applied entry.
|
|
52
54
|
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
|
|
2
2
|
import { loadEnv } from "@agent-native/core/scripts";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
runAppReleaseMigrations,
|
|
5
|
+
runFrameworkReleaseMigrations,
|
|
6
|
+
} from "@agent-native/core/server";
|
|
4
7
|
|
|
5
8
|
loadEnv();
|
|
6
9
|
|
|
7
10
|
async function main(): Promise<void> {
|
|
8
11
|
await withMigrationRuntime(async () => {
|
|
9
12
|
await runFrameworkReleaseMigrations(null);
|
|
13
|
+
await runAppReleaseMigrations();
|
|
10
14
|
});
|
|
11
15
|
}
|
|
12
16
|
|
|
@@ -44,9 +44,11 @@ second migration owner beside it. The Chat and default starters do not ship that
|
|
|
44
44
|
Drizzle Kit setup; follow their local instructions and the Database docs for
|
|
45
45
|
the migration path. In Chat, add `server/db/schema.ts`, `server/db/index.ts`
|
|
46
46
|
with `createGetDb(schema)`, and `server/plugins/db.ts` with
|
|
47
|
-
`runMigrations([...], { table })`. `scripts/migrate-production.ts`
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
`runMigrations([...], { table })`. `scripts/migrate-production.ts` applies the
|
|
48
|
+
framework tables and then that plugin (`runAppReleaseMigrations`), because a
|
|
49
|
+
release-owned deploy skips it at boot; a project with a Drizzle config is left to
|
|
50
|
+
`db:migrate`, and do not create a parallel `runMigrations([...])` list beside a
|
|
51
|
+
generated Drizzle migration owner. Give each handwritten migration a unique, stable `name`
|
|
50
52
|
alongside its `version`; append changes instead of renumbering, reusing, or
|
|
51
53
|
editing an applied entry.
|
|
52
54
|
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
|
|
2
2
|
import { loadEnv } from "@agent-native/core/scripts";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
runAppReleaseMigrations,
|
|
5
|
+
runFrameworkReleaseMigrations,
|
|
6
|
+
} from "@agent-native/core/server";
|
|
4
7
|
|
|
5
8
|
loadEnv();
|
|
6
9
|
|
|
7
10
|
async function main(): Promise<void> {
|
|
8
11
|
await withMigrationRuntime(async () => {
|
|
9
12
|
await runFrameworkReleaseMigrations(null);
|
|
13
|
+
await runAppReleaseMigrations();
|
|
10
14
|
});
|
|
11
15
|
}
|
|
12
16
|
|
|
@@ -44,9 +44,11 @@ second migration owner beside it. The Chat and default starters do not ship that
|
|
|
44
44
|
Drizzle Kit setup; follow their local instructions and the Database docs for
|
|
45
45
|
the migration path. In Chat, add `server/db/schema.ts`, `server/db/index.ts`
|
|
46
46
|
with `createGetDb(schema)`, and `server/plugins/db.ts` with
|
|
47
|
-
`runMigrations([...], { table })`. `scripts/migrate-production.ts`
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
`runMigrations([...], { table })`. `scripts/migrate-production.ts` applies the
|
|
48
|
+
framework tables and then that plugin (`runAppReleaseMigrations`), because a
|
|
49
|
+
release-owned deploy skips it at boot; a project with a Drizzle config is left to
|
|
50
|
+
`db:migrate`, and do not create a parallel `runMigrations([...])` list beside a
|
|
51
|
+
generated Drizzle migration owner. Give each handwritten migration a unique, stable `name`
|
|
50
52
|
alongside its `version`; append changes instead of renumbering, reusing, or
|
|
51
53
|
editing an applied entry.
|
|
52
54
|
|
|
@@ -44,9 +44,11 @@ second migration owner beside it. The Chat and default starters do not ship that
|
|
|
44
44
|
Drizzle Kit setup; follow their local instructions and the Database docs for
|
|
45
45
|
the migration path. In Chat, add `server/db/schema.ts`, `server/db/index.ts`
|
|
46
46
|
with `createGetDb(schema)`, and `server/plugins/db.ts` with
|
|
47
|
-
`runMigrations([...], { table })`. `scripts/migrate-production.ts`
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
`runMigrations([...], { table })`. `scripts/migrate-production.ts` applies the
|
|
48
|
+
framework tables and then that plugin (`runAppReleaseMigrations`), because a
|
|
49
|
+
release-owned deploy skips it at boot; a project with a Drizzle config is left to
|
|
50
|
+
`db:migrate`, and do not create a parallel `runMigrations([...])` list beside a
|
|
51
|
+
generated Drizzle migration owner. Give each handwritten migration a unique, stable `name`
|
|
50
52
|
alongside its `version`; append changes instead of renumbering, reusing, or
|
|
51
53
|
editing an applied entry.
|
|
52
54
|
|
|
@@ -14,7 +14,6 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
14
14
|
executionCwd?: string;
|
|
15
15
|
}, {
|
|
16
16
|
deleted?: undefined;
|
|
17
|
-
enabled?: undefined;
|
|
18
17
|
created: boolean;
|
|
19
18
|
name: string;
|
|
20
19
|
scope: "organization" | "personal";
|
|
@@ -25,24 +24,25 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
25
24
|
reasoningEffort: "auto" | "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh";
|
|
26
25
|
webhookPath: string;
|
|
27
26
|
nextRun: string;
|
|
27
|
+
enabled?: undefined;
|
|
28
28
|
executionHostId?: undefined;
|
|
29
29
|
executionEngine?: undefined;
|
|
30
30
|
executionCwd?: undefined;
|
|
31
31
|
} | {
|
|
32
|
-
enabled?: undefined;
|
|
33
|
-
nextRun?: undefined;
|
|
34
32
|
created?: undefined;
|
|
35
33
|
scope?: undefined;
|
|
36
34
|
triggerType?: undefined;
|
|
37
35
|
event?: undefined;
|
|
38
36
|
deleted: boolean;
|
|
39
37
|
name: string;
|
|
38
|
+
enabled?: undefined;
|
|
40
39
|
schedule?: undefined;
|
|
41
40
|
timezone?: undefined;
|
|
42
41
|
reasoningEffort?: undefined;
|
|
43
42
|
executionHostId?: undefined;
|
|
44
43
|
executionEngine?: undefined;
|
|
45
44
|
executionCwd?: undefined;
|
|
45
|
+
nextRun?: undefined;
|
|
46
46
|
webhookPath?: undefined;
|
|
47
47
|
} | {
|
|
48
48
|
deleted?: undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.209.2
|
|
3
|
+
"version": "0.209.2",
|
|
4
4
|
"description": "The agentic application framework for building autonomous agents with intuitive UIs",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -707,8 +707,8 @@
|
|
|
707
707
|
"yaml": "^2.9.0",
|
|
708
708
|
"yjs": "^13.6.33",
|
|
709
709
|
"zod": "^4.3.6",
|
|
710
|
-
"@agent-native/agentkit": "^0.209.2
|
|
711
|
-
"@agent-native/recap-cli": "^0.5.
|
|
710
|
+
"@agent-native/agentkit": "^0.209.2",
|
|
711
|
+
"@agent-native/recap-cli": "^0.5.74"
|
|
712
712
|
},
|
|
713
713
|
"devDependencies": {
|
|
714
714
|
"@ai-sdk/anthropic": "^3.0.71",
|
|
@@ -778,7 +778,7 @@
|
|
|
778
778
|
"xlsx": "^0.18.5"
|
|
779
779
|
},
|
|
780
780
|
"peerDependencies": {
|
|
781
|
-
"@agent-native/core-corpus": "0.
|
|
781
|
+
"@agent-native/core-corpus": ">=0.196.0",
|
|
782
782
|
"@ai-sdk/anthropic": ">=3",
|
|
783
783
|
"@ai-sdk/cohere": ">=3",
|
|
784
784
|
"@ai-sdk/google": ">=3",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
===================================================================
|
|
2
2
|
--- a/.agents/skills/storing-data/SKILL.md
|
|
3
3
|
+++ b/.agents/skills/storing-data/SKILL.md
|
|
4
|
-
@@ -36,
|
|
4
|
+
@@ -36,23 +36,12 @@
|
|
5
5
|
such as `ownableColumns()` and `createSharesTable()`, from
|
|
6
6
|
`@agent-native/core/db/schema`. Do not import table builders through the core
|
|
7
7
|
helper module.
|
|
@@ -13,12 +13,14 @@
|
|
|
13
13
|
-Drizzle Kit setup; follow their local instructions and the Database docs for
|
|
14
14
|
-the migration path. In Chat, add `server/db/schema.ts`, `server/db/index.ts`
|
|
15
15
|
-with `createGetDb(schema)`, and `server/plugins/db.ts` with
|
|
16
|
-
-`runMigrations([...], { table })`. `scripts/migrate-production.ts`
|
|
17
|
-
-
|
|
18
|
-
-
|
|
16
|
+
-`runMigrations([...], { table })`. `scripts/migrate-production.ts` applies the
|
|
17
|
+
-framework tables and then that plugin (`runAppReleaseMigrations`), because a
|
|
18
|
+
-release-owned deploy skips it at boot; a project with a Drizzle config is left to
|
|
19
|
+
-`db:migrate`, and do not create a parallel `runMigrations([...])` list beside a
|
|
20
|
+
-generated Drizzle migration owner. Give each handwritten migration a unique, stable `name`
|
|
19
21
|
-alongside its `version`; append changes instead of renumbering, reusing, or
|
|
20
22
|
-editing an applied entry.
|
|
21
|
-
+When the project contains `drizzle.config.ts` and `drizzle/START_HERE.md`, that managed Drizzle scaffold is the only app migration path. Define app tables in `drizzle/schema.ts`, run `pnpm db:generate`, and apply them with `pnpm db:migrate`. `scripts/migrate-production.ts`
|
|
23
|
+
+When the project contains `drizzle.config.ts` and `drizzle/START_HERE.md`, that managed Drizzle scaffold is the only app migration path. Define app tables in `drizzle/schema.ts`, run `pnpm db:generate`, and apply them with `pnpm db:migrate`. `scripts/migrate-production.ts` applies the framework tables and leaves app tables to `db:migrate` (it skips `server/plugins/db.ts` when `drizzle.config.ts` exists): do not create a parallel `runMigrations([...])` list in `server/plugins/db.ts` or import an app migration runner into the release script.
|
|
22
24
|
|
|
23
25
|
+In projects without that managed scaffold, every entry added to a framework `runMigrations([...])` list (`@agent-native/core/db`) needs a unique, stable `name` alongside its `version`; append changes instead of renumbering, reusing, or editing an applied entry.
|
|
24
26
|
+
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
|
|
27
29
|
Existing unnamed migrations don't need to be renamed retroactively (the two gating strategies coexist), but any new entry should always carry a name.
|
|
28
30
|
|
|
29
|
-
@@ -
|
|
31
|
+
@@ -72,12 +61,12 @@
|
|
30
32
|
| `sessions` | Auth sessions | `@agent-native/core/server` |
|
|
31
33
|
|
|
32
34
|
### Domain Data (per-template)
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
+
|
|
8
8
|
import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
|
|
9
9
|
import { loadEnv } from "@agent-native/core/scripts";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
@@ -
|
|
13
|
-
await
|
|
10
|
+
import {
|
|
11
|
+
runAppReleaseMigrations,
|
|
12
|
+
@@ -13,8 +16,37 @@
|
|
13
|
+
await runAppReleaseMigrations();
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -44,9 +44,11 @@ second migration owner beside it. The Chat and default starters do not ship that
|
|
|
44
44
|
Drizzle Kit setup; follow their local instructions and the Database docs for
|
|
45
45
|
the migration path. In Chat, add `server/db/schema.ts`, `server/db/index.ts`
|
|
46
46
|
with `createGetDb(schema)`, and `server/plugins/db.ts` with
|
|
47
|
-
`runMigrations([...], { table })`. `scripts/migrate-production.ts`
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
`runMigrations([...], { table })`. `scripts/migrate-production.ts` applies the
|
|
48
|
+
framework tables and then that plugin (`runAppReleaseMigrations`), because a
|
|
49
|
+
release-owned deploy skips it at boot; a project with a Drizzle config is left to
|
|
50
|
+
`db:migrate`, and do not create a parallel `runMigrations([...])` list beside a
|
|
51
|
+
generated Drizzle migration owner. Give each handwritten migration a unique, stable `name`
|
|
50
52
|
alongside its `version`; append changes instead of renumbering, reusing, or
|
|
51
53
|
editing an applied entry.
|
|
52
54
|
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
|
|
2
2
|
import { loadEnv } from "@agent-native/core/scripts";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
runAppReleaseMigrations,
|
|
5
|
+
runFrameworkReleaseMigrations,
|
|
6
|
+
} from "@agent-native/core/server";
|
|
4
7
|
|
|
5
8
|
loadEnv();
|
|
6
9
|
|
|
7
10
|
async function main(): Promise<void> {
|
|
8
11
|
await withMigrationRuntime(async () => {
|
|
9
12
|
await runFrameworkReleaseMigrations(null);
|
|
13
|
+
await runAppReleaseMigrations();
|
|
10
14
|
});
|
|
11
15
|
}
|
|
12
16
|
|
|
@@ -44,9 +44,11 @@ second migration owner beside it. The Chat and default starters do not ship that
|
|
|
44
44
|
Drizzle Kit setup; follow their local instructions and the Database docs for
|
|
45
45
|
the migration path. In Chat, add `server/db/schema.ts`, `server/db/index.ts`
|
|
46
46
|
with `createGetDb(schema)`, and `server/plugins/db.ts` with
|
|
47
|
-
`runMigrations([...], { table })`. `scripts/migrate-production.ts`
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
`runMigrations([...], { table })`. `scripts/migrate-production.ts` applies the
|
|
48
|
+
framework tables and then that plugin (`runAppReleaseMigrations`), because a
|
|
49
|
+
release-owned deploy skips it at boot; a project with a Drizzle config is left to
|
|
50
|
+
`db:migrate`, and do not create a parallel `runMigrations([...])` list beside a
|
|
51
|
+
generated Drizzle migration owner. Give each handwritten migration a unique, stable `name`
|
|
50
52
|
alongside its `version`; append changes instead of renumbering, reusing, or
|
|
51
53
|
editing an applied entry.
|
|
52
54
|
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
|
|
2
2
|
import { loadEnv } from "@agent-native/core/scripts";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
runAppReleaseMigrations,
|
|
5
|
+
runFrameworkReleaseMigrations,
|
|
6
|
+
} from "@agent-native/core/server";
|
|
4
7
|
|
|
5
8
|
loadEnv();
|
|
6
9
|
|
|
7
10
|
async function main(): Promise<void> {
|
|
8
11
|
await withMigrationRuntime(async () => {
|
|
9
12
|
await runFrameworkReleaseMigrations(null);
|
|
13
|
+
await runAppReleaseMigrations();
|
|
10
14
|
});
|
|
11
15
|
}
|
|
12
16
|
|
|
@@ -44,9 +44,11 @@ second migration owner beside it. The Chat and default starters do not ship that
|
|
|
44
44
|
Drizzle Kit setup; follow their local instructions and the Database docs for
|
|
45
45
|
the migration path. In Chat, add `server/db/schema.ts`, `server/db/index.ts`
|
|
46
46
|
with `createGetDb(schema)`, and `server/plugins/db.ts` with
|
|
47
|
-
`runMigrations([...], { table })`. `scripts/migrate-production.ts`
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
`runMigrations([...], { table })`. `scripts/migrate-production.ts` applies the
|
|
48
|
+
framework tables and then that plugin (`runAppReleaseMigrations`), because a
|
|
49
|
+
release-owned deploy skips it at boot; a project with a Drizzle config is left to
|
|
50
|
+
`db:migrate`, and do not create a parallel `runMigrations([...])` list beside a
|
|
51
|
+
generated Drizzle migration owner. Give each handwritten migration a unique, stable `name`
|
|
50
52
|
alongside its `version`; append changes instead of renumbering, reusing, or
|
|
51
53
|
editing an applied entry.
|
|
52
54
|
|
|
@@ -44,9 +44,11 @@ second migration owner beside it. The Chat and default starters do not ship that
|
|
|
44
44
|
Drizzle Kit setup; follow their local instructions and the Database docs for
|
|
45
45
|
the migration path. In Chat, add `server/db/schema.ts`, `server/db/index.ts`
|
|
46
46
|
with `createGetDb(schema)`, and `server/plugins/db.ts` with
|
|
47
|
-
`runMigrations([...], { table })`. `scripts/migrate-production.ts`
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
`runMigrations([...], { table })`. `scripts/migrate-production.ts` applies the
|
|
48
|
+
framework tables and then that plugin (`runAppReleaseMigrations`), because a
|
|
49
|
+
release-owned deploy skips it at boot; a project with a Drizzle config is left to
|
|
50
|
+
`db:migrate`, and do not create a parallel `runMigrations([...])` list beside a
|
|
51
|
+
generated Drizzle migration owner. Give each handwritten migration a unique, stable `name`
|
|
50
52
|
alongside its `version`; append changes instead of renumbering, reusing, or
|
|
51
53
|
editing an applied entry.
|
|
52
54
|
|