@agent-native/core 0.209.2-nightly-20261016124700 → 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/agent/model-version.js +28 -16
- package/dist/automation/index.d.ts +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +7 -7
- 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/secrets/routes.d.ts +10 -10
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-engine-default-model-route.d.ts +1 -1
- package/dist/server/app-release-migrations.d.ts +21 -0
- package/dist/server/app-release-migrations.js +33 -0
- 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/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
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BUILDER_MODEL_ALIASES, BUILDER_MODEL_CONFIG, getClaudeModelOptionLabel, } from "./model-config.js";
|
|
2
2
|
const UPGRADEABLE_GPT_TIERS = new Set(["-sol", "-terra", "-luna"]);
|
|
3
3
|
const OPENROUTER_MODEL_ALIASES = {
|
|
4
4
|
"x-ai/grok-code-fast-1": "x-ai/grok-build-0.1",
|
|
5
5
|
};
|
|
6
|
+
// Endpoint-backed OpenAI engines preserve custom ids and skip the GPT tier
|
|
7
|
+
// upgrade, so their outdated dotted ids need explicit aliases.
|
|
8
|
+
const OPENAI_MODEL_ALIASES = {
|
|
9
|
+
"gpt-5.6-luna": "gpt-6-luna",
|
|
10
|
+
"gpt-5.6-sol": "gpt-6.1-sol",
|
|
11
|
+
"gpt-6-sol": "gpt-6.1-sol",
|
|
12
|
+
};
|
|
13
|
+
const MODEL_ALIAS_TABLES = [
|
|
14
|
+
BUILDER_MODEL_ALIASES,
|
|
15
|
+
OPENAI_MODEL_ALIASES,
|
|
16
|
+
OPENROUTER_MODEL_ALIASES,
|
|
17
|
+
];
|
|
6
18
|
const MODEL_DISPLAY_NAMES = {
|
|
7
19
|
"anthropic/claude-haiku-5.5": "Claude Haiku 5.5",
|
|
8
20
|
"anthropic/claude-opus-4.8": "Claude Opus 4.8",
|
|
@@ -76,17 +88,20 @@ export function upgradeBuilderModelAlias(candidate, supportedModels) {
|
|
|
76
88
|
const latest = BUILDER_MODEL_ALIASES[candidate];
|
|
77
89
|
return latest && supportedModels.includes(latest) ? latest : undefined;
|
|
78
90
|
}
|
|
79
|
-
function upgradeOpenRouterModelAlias(candidate, supportedModels, provider) {
|
|
80
|
-
if (provider !== "ai-sdk:openrouter")
|
|
81
|
-
return undefined;
|
|
82
|
-
const latest = OPENROUTER_MODEL_ALIASES[candidate];
|
|
83
|
-
return latest && supportedModels.includes(latest) ? latest : undefined;
|
|
84
|
-
}
|
|
85
91
|
function upgradeProviderModelAlias(candidate, supportedModels, provider) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
92
|
+
// Builder retires catalog entries it still routes; a BYOK provider still
|
|
93
|
+
// serving an id (e.g. claude-opus-4-8) must keep receiving it.
|
|
94
|
+
if (provider !== "builder" && supportedModels.includes(candidate)) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
for (const aliases of MODEL_ALIAS_TABLES) {
|
|
98
|
+
const latest = Object.hasOwn(aliases, candidate)
|
|
99
|
+
? aliases[candidate]
|
|
100
|
+
: undefined;
|
|
101
|
+
if (latest && supportedModels.includes(latest))
|
|
102
|
+
return latest;
|
|
103
|
+
}
|
|
104
|
+
return undefined;
|
|
90
105
|
}
|
|
91
106
|
export function isNewerVersionedModel(candidate, newerModel) {
|
|
92
107
|
const current = parseVersionedModelId(candidate);
|
|
@@ -124,7 +139,7 @@ export function normalizeModelForEngine(engine, model, options = {}) {
|
|
|
124
139
|
if (engine.preserveCustomModels || options.preserveCustomModels) {
|
|
125
140
|
return candidate;
|
|
126
141
|
}
|
|
127
|
-
const upgradedModel =
|
|
142
|
+
const upgradedModel = upgradeModelToLatestSupportedVersion(candidate, engine.supportedModels);
|
|
128
143
|
if (upgradedModel)
|
|
129
144
|
return upgradedModel;
|
|
130
145
|
if (candidate === "auto" ||
|
|
@@ -133,10 +148,7 @@ export function normalizeModelForEngine(engine, model, options = {}) {
|
|
|
133
148
|
return candidate;
|
|
134
149
|
}
|
|
135
150
|
if (engine.acceptsCustomModels || options.acceptsCustomModels) {
|
|
136
|
-
return candidate
|
|
137
|
-
engine.supportedModels.includes(CLAUDE_SONNET_MODEL_ID)
|
|
138
|
-
? CLAUDE_SONNET_MODEL_ID
|
|
139
|
-
: candidate;
|
|
151
|
+
return candidate;
|
|
140
152
|
}
|
|
141
153
|
const versionMatch = findLatestSupportedVersionMatch(candidate, engine.supportedModels);
|
|
142
154
|
if (versionMatch && isNewerVersionedModel(candidate, versionMatch)) {
|
|
@@ -139,8 +139,8 @@ export declare function createAutomationCallbackHandler(runtime: AutomationRunti
|
|
|
139
139
|
duplicate?: undefined;
|
|
140
140
|
eventId?: undefined;
|
|
141
141
|
} | {
|
|
142
|
-
error?: undefined;
|
|
143
142
|
accepted: boolean;
|
|
144
143
|
duplicate: boolean;
|
|
145
144
|
eventId: string;
|
|
145
|
+
error?: undefined;
|
|
146
146
|
}>;
|
|
@@ -27,43 +27,43 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
27
27
|
thumbsUpRate: number;
|
|
28
28
|
avgEvalScore: number;
|
|
29
29
|
} | {
|
|
30
|
-
ok?: undefined;
|
|
31
30
|
error: string;
|
|
32
31
|
message: string;
|
|
33
32
|
summary?: undefined;
|
|
34
33
|
spans?: undefined;
|
|
35
|
-
} | {
|
|
36
|
-
error?: undefined;
|
|
37
34
|
ok?: undefined;
|
|
35
|
+
} | {
|
|
38
36
|
message?: undefined;
|
|
39
37
|
summary: import("./types.js").TraceSummary;
|
|
40
38
|
spans: import("./types.js").TraceSpan[];
|
|
41
|
-
} | {
|
|
42
39
|
error?: undefined;
|
|
43
40
|
ok?: undefined;
|
|
41
|
+
} | {
|
|
44
42
|
message?: undefined;
|
|
45
43
|
summary?: undefined;
|
|
46
44
|
spans?: undefined;
|
|
47
45
|
traceMissing: true;
|
|
48
46
|
id: string;
|
|
49
|
-
} | {
|
|
50
47
|
error?: undefined;
|
|
51
48
|
ok?: undefined;
|
|
49
|
+
} | {
|
|
52
50
|
message?: undefined;
|
|
53
51
|
summary?: undefined;
|
|
54
52
|
spans?: undefined;
|
|
55
53
|
traceMissing?: undefined;
|
|
56
54
|
id: string;
|
|
57
|
-
|
|
55
|
+
error?: undefined;
|
|
58
56
|
ok?: undefined;
|
|
57
|
+
} | {
|
|
59
58
|
message?: undefined;
|
|
60
59
|
summary?: undefined;
|
|
61
60
|
spans?: undefined;
|
|
62
61
|
error: any;
|
|
62
|
+
ok?: undefined;
|
|
63
63
|
} | {
|
|
64
|
-
error?: undefined;
|
|
65
64
|
message?: undefined;
|
|
66
65
|
summary?: undefined;
|
|
67
66
|
spans?: undefined;
|
|
67
|
+
error?: undefined;
|
|
68
68
|
ok: boolean;
|
|
69
69
|
}>>;
|
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;
|
package/dist/secrets/routes.d.ts
CHANGED
|
@@ -57,39 +57,39 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
|
|
|
57
57
|
} | {
|
|
58
58
|
error: string;
|
|
59
59
|
errorCode?: undefined;
|
|
60
|
-
ok?: undefined;
|
|
61
60
|
status?: undefined;
|
|
61
|
+
ok?: undefined;
|
|
62
62
|
} | {
|
|
63
63
|
error: string;
|
|
64
64
|
errorCode: string;
|
|
65
|
-
ok?: undefined;
|
|
66
65
|
status?: undefined;
|
|
66
|
+
ok?: undefined;
|
|
67
67
|
} | {
|
|
68
|
-
error?: undefined;
|
|
69
68
|
errorCode?: undefined;
|
|
70
69
|
ok: boolean;
|
|
71
70
|
status: string;
|
|
71
|
+
error?: undefined;
|
|
72
72
|
} | {
|
|
73
|
-
ok?: undefined;
|
|
74
73
|
error: string;
|
|
75
74
|
removed?: undefined;
|
|
75
|
+
ok?: undefined;
|
|
76
76
|
} | {
|
|
77
|
-
error?: undefined;
|
|
78
77
|
ok: boolean;
|
|
79
78
|
removed: boolean;
|
|
79
|
+
error?: undefined;
|
|
80
80
|
}>>;
|
|
81
81
|
export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
82
|
-
ok?: undefined;
|
|
83
82
|
error: string;
|
|
84
83
|
note?: undefined;
|
|
84
|
+
ok?: undefined;
|
|
85
85
|
} | {
|
|
86
|
-
error?: undefined;
|
|
87
86
|
ok: boolean;
|
|
88
87
|
note?: undefined;
|
|
89
|
-
} | {
|
|
90
88
|
error?: undefined;
|
|
89
|
+
} | {
|
|
91
90
|
ok: boolean;
|
|
92
91
|
note: string;
|
|
92
|
+
error?: undefined;
|
|
93
93
|
} | {
|
|
94
94
|
note?: undefined;
|
|
95
95
|
ok: boolean;
|
|
@@ -117,11 +117,11 @@ export declare function createAdHocSecretHandler(): import("h3").EventHandlerWit
|
|
|
117
117
|
} | {
|
|
118
118
|
error: string;
|
|
119
119
|
} | {
|
|
120
|
-
error?: undefined;
|
|
121
120
|
ok: boolean;
|
|
122
121
|
key: string;
|
|
123
|
-
} | {
|
|
124
122
|
error?: undefined;
|
|
123
|
+
} | {
|
|
125
124
|
ok: boolean;
|
|
126
125
|
removed: boolean;
|
|
126
|
+
error?: undefined;
|
|
127
127
|
}>>;
|
|
@@ -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,8 +8,8 @@ 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
|
-
error: string;
|
|
12
11
|
ok?: undefined;
|
|
12
|
+
error: string;
|
|
13
13
|
scope?: undefined;
|
|
14
14
|
} | {
|
|
15
15
|
ok: boolean;
|
|
@@ -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
|
+
}
|
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
|
|
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
|
|