@agent-native/core 0.145.7 → 0.145.8
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/corpus/README.md +1 -1
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +3 -2
- package/corpus/templates/analytics/changelog/2026-08-07-settings-skeleton-placeholders.md +6 -0
- package/corpus/templates/analytics/netlify.toml +1 -1
- package/corpus/templates/analytics/package.json +1 -0
- package/corpus/templates/analytics/scripts/migrate-production.ts +24 -0
- package/corpus/templates/analytics/server/jobs/analytics-rollup-backfill.ts +9 -0
- package/corpus/templates/analytics/server/plugins/db.ts +14 -3
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/chat/AGENTS.md +3 -0
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/crm/app/components/crm/IntelligenceSettings.tsx +21 -3
- package/corpus/templates/crm/app/components/crm/settings/ConnectionSettings.tsx +23 -5
- package/corpus/templates/crm/app/components/crm/settings/FieldsSettings.tsx +24 -5
- package/corpus/templates/crm/app/components/crm/settings/ListsSettings.tsx +23 -3
- package/corpus/templates/crm/changelog/2026-08-07-settings-loading-skeletons.md +6 -0
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +5 -1
- package/dist/client/components/ApiKeySettings.js +2 -5
- package/dist/client/org/TeamPage.js +4 -2
- package/dist/client/settings/AccountSettingsCard.js +2 -1
- package/dist/client/settings/AgentsSection.js +2 -1
- package/dist/client/settings/SecretsSection.js +3 -2
- package/dist/client/settings/SettingsPanel.js +6 -12
- package/dist/client/settings/SettingsSkeleton.d.ts +12 -0
- package/dist/client/settings/SettingsSkeleton.js +12 -0
- package/dist/client/settings/VoiceTranscriptionSection.js +5 -4
- package/dist/client/settings/index.d.ts +1 -0
- package/dist/client/settings/index.js +1 -0
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/db/client.d.ts +13 -7
- package/dist/db/client.js +124 -7
- package/dist/db/ddl-guard.js +3 -1
- package/dist/db/ensure-additive-columns.d.ts +2 -0
- package/dist/db/ensure-additive-columns.js +5 -2
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.js +2 -2
- package/dist/db/migrations.d.ts +11 -54
- package/dist/db/migrations.js +70 -0
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/jobs/index.d.ts +1 -0
- package/dist/jobs/index.js +1 -0
- package/dist/jobs/run-history.d.ts +4 -0
- package/dist/jobs/run-history.js +44 -0
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +9 -9
- package/dist/provider-api/actions/provider-api.d.ts +12 -12
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +6 -6
- package/dist/server/agent-chat-plugin.js +6 -4
- package/dist/server/auth-plugin.js +5 -0
- package/dist/server/better-auth-instance.js +0 -61
- package/dist/server/better-auth-migrations.d.ts +8 -0
- package/dist/server/better-auth-migrations.js +179 -0
- package/dist/server/edge.d.ts +2 -0
- package/dist/server/edge.js +2 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +2 -0
- package/dist/server/release-migrations.d.ts +8 -0
- package/dist/server/release-migrations.js +24 -0
- package/dist/server/sweep-runtime.d.ts +1 -1
- package/dist/server/sweep-runtime.js +15 -0
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +5 -1
- package/dist/templates/chat/AGENTS.md +3 -0
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +5 -1
- package/dist/templates/default/AGENTS.md +3 -0
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +5 -1
- package/dist/templates/workspace-core/AGENTS.md +3 -0
- package/dist/templates/workspace-root/AGENTS.md +3 -0
- package/package.json +1 -1
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +5 -1
- package/src/templates/chat/AGENTS.md +3 -0
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +5 -1
- package/src/templates/default/AGENTS.md +3 -0
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +5 -1
- package/src/templates/workspace-core/AGENTS.md +3 -0
- package/src/templates/workspace-root/AGENTS.md +3 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { runMigrations } from "../db/migrations.js";
|
|
2
|
+
/**
|
|
3
|
+
* Better Auth's framework-owned schema. This is deliberately a release
|
|
4
|
+
* migration, not a fallback inside `getBetterAuth()`: request functions must
|
|
5
|
+
* be able to construct the auth adapter without probing or creating tables.
|
|
6
|
+
*/
|
|
7
|
+
export const BETTER_AUTH_MIGRATIONS = [
|
|
8
|
+
{
|
|
9
|
+
version: 1,
|
|
10
|
+
name: "better-auth-core-tables",
|
|
11
|
+
sql: {
|
|
12
|
+
postgres: `
|
|
13
|
+
CREATE TABLE IF NOT EXISTS "user" (
|
|
14
|
+
id TEXT PRIMARY KEY,
|
|
15
|
+
name TEXT NOT NULL,
|
|
16
|
+
email TEXT NOT NULL UNIQUE,
|
|
17
|
+
email_verified BOOLEAN NOT NULL DEFAULT FALSE,
|
|
18
|
+
image TEXT,
|
|
19
|
+
created_at TIMESTAMPTZ NOT NULL,
|
|
20
|
+
updated_at TIMESTAMPTZ NOT NULL
|
|
21
|
+
);
|
|
22
|
+
CREATE TABLE IF NOT EXISTS "session" (
|
|
23
|
+
id TEXT PRIMARY KEY,
|
|
24
|
+
expires_at TIMESTAMPTZ NOT NULL,
|
|
25
|
+
token TEXT NOT NULL UNIQUE,
|
|
26
|
+
created_at TIMESTAMPTZ NOT NULL,
|
|
27
|
+
updated_at TIMESTAMPTZ NOT NULL,
|
|
28
|
+
ip_address TEXT,
|
|
29
|
+
user_agent TEXT,
|
|
30
|
+
user_id TEXT NOT NULL,
|
|
31
|
+
active_organization_id TEXT
|
|
32
|
+
);
|
|
33
|
+
CREATE TABLE IF NOT EXISTS "account" (
|
|
34
|
+
id TEXT PRIMARY KEY,
|
|
35
|
+
account_id TEXT NOT NULL,
|
|
36
|
+
provider_id TEXT NOT NULL,
|
|
37
|
+
user_id TEXT NOT NULL,
|
|
38
|
+
access_token TEXT,
|
|
39
|
+
refresh_token TEXT,
|
|
40
|
+
id_token TEXT,
|
|
41
|
+
access_token_expires_at TIMESTAMPTZ,
|
|
42
|
+
refresh_token_expires_at TIMESTAMPTZ,
|
|
43
|
+
scope TEXT,
|
|
44
|
+
password TEXT,
|
|
45
|
+
created_at TIMESTAMPTZ NOT NULL,
|
|
46
|
+
updated_at TIMESTAMPTZ NOT NULL
|
|
47
|
+
);
|
|
48
|
+
CREATE TABLE IF NOT EXISTS "verification" (
|
|
49
|
+
id TEXT PRIMARY KEY,
|
|
50
|
+
identifier TEXT NOT NULL,
|
|
51
|
+
value TEXT NOT NULL,
|
|
52
|
+
expires_at TIMESTAMPTZ NOT NULL,
|
|
53
|
+
created_at TIMESTAMPTZ NOT NULL,
|
|
54
|
+
updated_at TIMESTAMPTZ NOT NULL
|
|
55
|
+
);
|
|
56
|
+
CREATE TABLE IF NOT EXISTS "organization" (
|
|
57
|
+
id TEXT PRIMARY KEY,
|
|
58
|
+
name TEXT NOT NULL,
|
|
59
|
+
slug TEXT NOT NULL UNIQUE,
|
|
60
|
+
logo TEXT,
|
|
61
|
+
metadata TEXT,
|
|
62
|
+
created_at TIMESTAMPTZ NOT NULL,
|
|
63
|
+
updated_at TIMESTAMPTZ NOT NULL
|
|
64
|
+
);
|
|
65
|
+
CREATE TABLE IF NOT EXISTS "member" (
|
|
66
|
+
id TEXT PRIMARY KEY,
|
|
67
|
+
organization_id TEXT NOT NULL,
|
|
68
|
+
user_id TEXT NOT NULL,
|
|
69
|
+
role TEXT NOT NULL DEFAULT 'member',
|
|
70
|
+
created_at TIMESTAMPTZ NOT NULL,
|
|
71
|
+
updated_at TIMESTAMPTZ NOT NULL
|
|
72
|
+
);
|
|
73
|
+
CREATE TABLE IF NOT EXISTS "invitation" (
|
|
74
|
+
id TEXT PRIMARY KEY,
|
|
75
|
+
organization_id TEXT NOT NULL,
|
|
76
|
+
email TEXT NOT NULL,
|
|
77
|
+
role TEXT,
|
|
78
|
+
status TEXT NOT NULL DEFAULT 'pending',
|
|
79
|
+
expires_at TIMESTAMPTZ NOT NULL,
|
|
80
|
+
inviter_id TEXT NOT NULL,
|
|
81
|
+
created_at TIMESTAMPTZ NOT NULL,
|
|
82
|
+
updated_at TIMESTAMPTZ NOT NULL
|
|
83
|
+
);
|
|
84
|
+
CREATE TABLE IF NOT EXISTS "jwks" (
|
|
85
|
+
id TEXT PRIMARY KEY,
|
|
86
|
+
public_key TEXT NOT NULL,
|
|
87
|
+
private_key TEXT NOT NULL,
|
|
88
|
+
created_at TIMESTAMPTZ NOT NULL,
|
|
89
|
+
expires_at TIMESTAMPTZ
|
|
90
|
+
)
|
|
91
|
+
`,
|
|
92
|
+
sqlite: `
|
|
93
|
+
CREATE TABLE IF NOT EXISTS user (
|
|
94
|
+
id TEXT PRIMARY KEY,
|
|
95
|
+
name TEXT NOT NULL,
|
|
96
|
+
email TEXT NOT NULL UNIQUE,
|
|
97
|
+
email_verified INTEGER NOT NULL DEFAULT 0,
|
|
98
|
+
image TEXT,
|
|
99
|
+
created_at INTEGER NOT NULL,
|
|
100
|
+
updated_at INTEGER NOT NULL
|
|
101
|
+
);
|
|
102
|
+
CREATE TABLE IF NOT EXISTS session (
|
|
103
|
+
id TEXT PRIMARY KEY,
|
|
104
|
+
expires_at INTEGER NOT NULL,
|
|
105
|
+
token TEXT NOT NULL UNIQUE,
|
|
106
|
+
created_at INTEGER NOT NULL,
|
|
107
|
+
updated_at INTEGER NOT NULL,
|
|
108
|
+
ip_address TEXT,
|
|
109
|
+
user_agent TEXT,
|
|
110
|
+
user_id TEXT NOT NULL,
|
|
111
|
+
active_organization_id TEXT
|
|
112
|
+
);
|
|
113
|
+
CREATE TABLE IF NOT EXISTS account (
|
|
114
|
+
id TEXT PRIMARY KEY,
|
|
115
|
+
account_id TEXT NOT NULL,
|
|
116
|
+
provider_id TEXT NOT NULL,
|
|
117
|
+
user_id TEXT NOT NULL,
|
|
118
|
+
access_token TEXT,
|
|
119
|
+
refresh_token TEXT,
|
|
120
|
+
id_token TEXT,
|
|
121
|
+
access_token_expires_at INTEGER,
|
|
122
|
+
refresh_token_expires_at INTEGER,
|
|
123
|
+
scope TEXT,
|
|
124
|
+
password TEXT,
|
|
125
|
+
created_at INTEGER NOT NULL,
|
|
126
|
+
updated_at INTEGER NOT NULL
|
|
127
|
+
);
|
|
128
|
+
CREATE TABLE IF NOT EXISTS verification (
|
|
129
|
+
id TEXT PRIMARY KEY,
|
|
130
|
+
identifier TEXT NOT NULL,
|
|
131
|
+
value TEXT NOT NULL,
|
|
132
|
+
expires_at INTEGER NOT NULL,
|
|
133
|
+
created_at INTEGER NOT NULL,
|
|
134
|
+
updated_at INTEGER NOT NULL
|
|
135
|
+
);
|
|
136
|
+
CREATE TABLE IF NOT EXISTS organization (
|
|
137
|
+
id TEXT PRIMARY KEY,
|
|
138
|
+
name TEXT NOT NULL,
|
|
139
|
+
slug TEXT NOT NULL UNIQUE,
|
|
140
|
+
logo TEXT,
|
|
141
|
+
metadata TEXT,
|
|
142
|
+
created_at INTEGER NOT NULL,
|
|
143
|
+
updated_at INTEGER NOT NULL
|
|
144
|
+
);
|
|
145
|
+
CREATE TABLE IF NOT EXISTS member (
|
|
146
|
+
id TEXT PRIMARY KEY,
|
|
147
|
+
organization_id TEXT NOT NULL,
|
|
148
|
+
user_id TEXT NOT NULL,
|
|
149
|
+
role TEXT NOT NULL DEFAULT 'member',
|
|
150
|
+
created_at INTEGER NOT NULL,
|
|
151
|
+
updated_at INTEGER NOT NULL
|
|
152
|
+
);
|
|
153
|
+
CREATE TABLE IF NOT EXISTS invitation (
|
|
154
|
+
id TEXT PRIMARY KEY,
|
|
155
|
+
organization_id TEXT NOT NULL,
|
|
156
|
+
email TEXT NOT NULL,
|
|
157
|
+
role TEXT,
|
|
158
|
+
status TEXT NOT NULL DEFAULT 'pending',
|
|
159
|
+
expires_at INTEGER NOT NULL,
|
|
160
|
+
inviter_id TEXT NOT NULL,
|
|
161
|
+
created_at INTEGER NOT NULL,
|
|
162
|
+
updated_at INTEGER NOT NULL
|
|
163
|
+
);
|
|
164
|
+
CREATE TABLE IF NOT EXISTS jwks (
|
|
165
|
+
id TEXT PRIMARY KEY,
|
|
166
|
+
public_key TEXT NOT NULL,
|
|
167
|
+
private_key TEXT NOT NULL,
|
|
168
|
+
created_at INTEGER NOT NULL,
|
|
169
|
+
expires_at INTEGER
|
|
170
|
+
)
|
|
171
|
+
`,
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
];
|
|
175
|
+
export async function runBetterAuthMigrations(nitroApp) {
|
|
176
|
+
await runMigrations(BETTER_AUTH_MIGRATIONS, {
|
|
177
|
+
table: "_better_auth_migrations",
|
|
178
|
+
})(nitroApp);
|
|
179
|
+
}
|
package/dist/server/edge.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { createAuthPlugin, defaultAuthPlugin } from "./auth-plugin.js";
|
|
2
|
+
export { BETTER_AUTH_MIGRATIONS, runBetterAuthMigrations, } from "./better-auth-migrations.js";
|
|
3
|
+
export { runFrameworkReleaseMigrations } from "./release-migrations.js";
|
|
2
4
|
export { createAgentChatPlugin, defaultAgentChatPlugin, refreshGlobalMcpManager, type AgentChatPluginOptions, } from "./agent-chat-plugin.js";
|
|
3
5
|
export { createContextXrayPlugin, defaultContextXrayPlugin, } from "../agent/context-xray/plugin.js";
|
|
4
6
|
export { createCoreRoutesPlugin, defaultCoreRoutesPlugin, FRAMEWORK_ROUTE_PREFIX, type CoreRoutesPluginOptions, } from "./core-routes-plugin.js";
|
package/dist/server/edge.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { createAuthPlugin, defaultAuthPlugin } from "./auth-plugin.js";
|
|
2
|
+
export { BETTER_AUTH_MIGRATIONS, runBetterAuthMigrations, } from "./better-auth-migrations.js";
|
|
3
|
+
export { runFrameworkReleaseMigrations } from "./release-migrations.js";
|
|
2
4
|
export { createAgentChatPlugin, defaultAgentChatPlugin, refreshGlobalMcpManager, } from "./agent-chat-plugin.js";
|
|
3
5
|
export { createContextXrayPlugin, defaultContextXrayPlugin, } from "../agent/context-xray/plugin.js";
|
|
4
6
|
export { createCoreRoutesPlugin, defaultCoreRoutesPlugin, FRAMEWORK_ROUTE_PREFIX, } from "./core-routes-plugin.js";
|
package/dist/server/index.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export { createDevScriptRegistry } from "../scripts/dev/index.js";
|
|
|
22
22
|
export { createPollHandler, recordChange, getVersion, getChangesSince, getPollEmitter, canSeeChangeForUser, POLL_CHANGE_EVENT, } from "./poll.js";
|
|
23
23
|
export { createPollEventsHandler } from "./poll-events.js";
|
|
24
24
|
export { createAuthPlugin, defaultAuthPlugin } from "./auth-plugin.js";
|
|
25
|
+
export { BETTER_AUTH_MIGRATIONS, runBetterAuthMigrations, } from "./better-auth-migrations.js";
|
|
26
|
+
export { runFrameworkReleaseMigrations } from "./release-migrations.js";
|
|
25
27
|
export { initServerSentry, isServerSentryEnabled, setSentryUserForRequest, captureRouteError, type RouteErrorContext, } from "./sentry.js";
|
|
26
28
|
export { captureError, captureServerError, registerErrorCaptureProvider, type CaptureErrorContext, type CaptureErrorProvider, } from "./capture-error.js";
|
|
27
29
|
export { createSentryPlugin, defaultSentryPlugin } from "./sentry-plugin.js";
|
package/dist/server/index.js
CHANGED
|
@@ -22,6 +22,8 @@ export { createDevScriptRegistry } from "../scripts/dev/index.js";
|
|
|
22
22
|
export { createPollHandler, recordChange, getVersion, getChangesSince, getPollEmitter, canSeeChangeForUser, POLL_CHANGE_EVENT, } from "./poll.js";
|
|
23
23
|
export { createPollEventsHandler } from "./poll-events.js";
|
|
24
24
|
export { createAuthPlugin, defaultAuthPlugin } from "./auth-plugin.js";
|
|
25
|
+
export { BETTER_AUTH_MIGRATIONS, runBetterAuthMigrations, } from "./better-auth-migrations.js";
|
|
26
|
+
export { runFrameworkReleaseMigrations } from "./release-migrations.js";
|
|
25
27
|
export { initServerSentry, isServerSentryEnabled, setSentryUserForRequest, captureRouteError, } from "./sentry.js";
|
|
26
28
|
export { captureError, captureServerError, registerErrorCaptureProvider, } from "./capture-error.js";
|
|
27
29
|
export { createSentryPlugin, defaultSentryPlugin } from "./sentry-plugin.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Apply framework-owned schema in one explicit release step.
|
|
3
|
+
*
|
|
4
|
+
* Template migrations are intentionally supplied by the template's own
|
|
5
|
+
* release script. Keeping that boundary explicit prevents a template's
|
|
6
|
+
* private schema from being silently coupled to every framework deployment.
|
|
7
|
+
*/
|
|
8
|
+
export declare function runFrameworkReleaseMigrations(nitroApp: unknown): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CONTEXT_XRAY_MIGRATIONS } from "../agent/context-xray/migrations.js";
|
|
2
|
+
import { OBSERVATIONAL_MEMORY_MIGRATIONS } from "../agent/observational-memory/migrations.js";
|
|
3
|
+
import { runMigrations } from "../db/migrations.js";
|
|
4
|
+
import { runAutomationRunMigrations } from "../jobs/run-history.js";
|
|
5
|
+
import { ORG_MIGRATIONS } from "../org/migrations.js";
|
|
6
|
+
import { runBetterAuthMigrations } from "./better-auth-migrations.js";
|
|
7
|
+
/**
|
|
8
|
+
* Apply framework-owned schema in one explicit release step.
|
|
9
|
+
*
|
|
10
|
+
* Template migrations are intentionally supplied by the template's own
|
|
11
|
+
* release script. Keeping that boundary explicit prevents a template's
|
|
12
|
+
* private schema from being silently coupled to every framework deployment.
|
|
13
|
+
*/
|
|
14
|
+
export async function runFrameworkReleaseMigrations(nitroApp) {
|
|
15
|
+
await runBetterAuthMigrations(nitroApp);
|
|
16
|
+
await runMigrations(ORG_MIGRATIONS, { table: "_org_migrations" })(nitroApp);
|
|
17
|
+
await runMigrations(CONTEXT_XRAY_MIGRATIONS, {
|
|
18
|
+
table: "_context_xray_migrations",
|
|
19
|
+
})(nitroApp);
|
|
20
|
+
await runMigrations(OBSERVATIONAL_MEMORY_MIGRATIONS, {
|
|
21
|
+
table: "_observational_memory_migrations",
|
|
22
|
+
})(nitroApp);
|
|
23
|
+
await runAutomationRunMigrations(nitroApp);
|
|
24
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type SweepRuntimeEnvKey = "AGENT_NATIVE_DISABLE_INPROCESS_SWEEPS";
|
|
1
|
+
type SweepRuntimeEnvKey = "AGENT_NATIVE_DISABLE_INPROCESS_SWEEPS" | "AWS_LAMBDA_FUNCTION_NAME" | "AWS_LAMBDA_FUNCTION_VERSION" | "AWS_EXECUTION_ENV" | "LAMBDA_TASK_ROOT" | "NETLIFY" | "NETLIFY_FUNCTION_NAME" | "NETLIFY_LOCAL" | "NODE_ENV" | "VERCEL_FUNCTION_ID" | "VERCEL_REGION";
|
|
2
2
|
type SweepRuntimeEnv = Partial<Record<SweepRuntimeEnvKey, string | undefined>>;
|
|
3
3
|
/**
|
|
4
4
|
* Kill switch for the `setInterval` backstop sweeps.
|
|
@@ -5,6 +5,19 @@
|
|
|
5
5
|
function isTruthyEnv(value) {
|
|
6
6
|
return /^(1|true|yes|on)$/i.test(value?.trim() ?? "");
|
|
7
7
|
}
|
|
8
|
+
function isProductionServerlessFunction(env) {
|
|
9
|
+
if (env.NODE_ENV !== "production" || env.NETLIFY_LOCAL === "true") {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
return Boolean(env.NETLIFY === "true" ||
|
|
13
|
+
env.NETLIFY_FUNCTION_NAME ||
|
|
14
|
+
env.AWS_LAMBDA_FUNCTION_NAME ||
|
|
15
|
+
env.AWS_LAMBDA_FUNCTION_VERSION ||
|
|
16
|
+
env.LAMBDA_TASK_ROOT ||
|
|
17
|
+
env.AWS_EXECUTION_ENV?.startsWith("AWS_Lambda") === true ||
|
|
18
|
+
env.VERCEL_FUNCTION_ID ||
|
|
19
|
+
env.VERCEL_REGION);
|
|
20
|
+
}
|
|
8
21
|
/**
|
|
9
22
|
* Kill switch for the `setInterval` backstop sweeps.
|
|
10
23
|
*
|
|
@@ -24,5 +37,7 @@ function isTruthyEnv(value) {
|
|
|
24
37
|
* eventually adopt instead of needing this switch at all.
|
|
25
38
|
*/
|
|
26
39
|
export function shouldDisableInProcessSweeps(env = process.env) {
|
|
40
|
+
if (isProductionServerlessFunction(env))
|
|
41
|
+
return true;
|
|
27
42
|
return isTruthyEnv(env.AGENT_NATIVE_DISABLE_INPROCESS_SWEEPS);
|
|
28
43
|
}
|
|
@@ -199,7 +199,11 @@ as an operator would use it repeatedly:
|
|
|
199
199
|
- Use full `Card` composition when the content has a title, description, content, or actions. Do not dump complex cards into a single `CardContent`.
|
|
200
200
|
- Use `ToggleGroup` for small option sets, `Switch` for binary settings, `Checkbox` for multi-select, `RadioGroup` for one-of-many, and `Slider`/inputs for numeric values.
|
|
201
201
|
- For forms, prefer the app's existing shadcn form pattern. If newer `Field`, `FieldGroup`, or `InputGroup` primitives are installed or appropriate to add, use them instead of raw layout divs.
|
|
202
|
-
-
|
|
202
|
+
- Page and section data loading uses layout-matching `Skeleton` geometry. Do
|
|
203
|
+
not show generic "Loading..." text for content loads; reserve `Spinner` for
|
|
204
|
+
brief mutations, uploads, and progress actions. Use the app's existing
|
|
205
|
+
loading primitive when it is a genuine design-system adapter. Empty states
|
|
206
|
+
should have one clear next action.
|
|
203
207
|
|
|
204
208
|
## Anti-Patterns
|
|
205
209
|
|
|
@@ -23,6 +23,9 @@ workflow needs durable UI around the conversation.
|
|
|
23
23
|
- Keep the first viewport sparse and task-focused. Use progressive disclosure
|
|
24
24
|
and domain-specific navigation, and never use sparkle, wand, magic, or robot
|
|
25
25
|
icons as AI affordances.
|
|
26
|
+
- Page and section data loads use layout-matching `Skeleton` geometry, never a
|
|
27
|
+
generic "Loading..." label. Reserve `Spinner` for brief mutations, uploads,
|
|
28
|
+
and progress actions.
|
|
26
29
|
- Use a sans-first SaaS hierarchy with one restrained visual cue; reserve serif
|
|
27
30
|
type for content previews. Give the AgentSidebar a subtle surface/divider
|
|
28
31
|
boundary, and stack original/generated review vertically by default.
|
|
@@ -199,7 +199,11 @@ as an operator would use it repeatedly:
|
|
|
199
199
|
- Use full `Card` composition when the content has a title, description, content, or actions. Do not dump complex cards into a single `CardContent`.
|
|
200
200
|
- Use `ToggleGroup` for small option sets, `Switch` for binary settings, `Checkbox` for multi-select, `RadioGroup` for one-of-many, and `Slider`/inputs for numeric values.
|
|
201
201
|
- For forms, prefer the app's existing shadcn form pattern. If newer `Field`, `FieldGroup`, or `InputGroup` primitives are installed or appropriate to add, use them instead of raw layout divs.
|
|
202
|
-
-
|
|
202
|
+
- Page and section data loading uses layout-matching `Skeleton` geometry. Do
|
|
203
|
+
not show generic "Loading..." text for content loads; reserve `Spinner` for
|
|
204
|
+
brief mutations, uploads, and progress actions. Use the app's existing
|
|
205
|
+
loading primitive when it is a genuine design-system adapter. Empty states
|
|
206
|
+
should have one clear next action.
|
|
203
207
|
|
|
204
208
|
## Anti-Patterns
|
|
205
209
|
|
|
@@ -36,6 +36,9 @@ cross-cutting work and `self-modifying-code` when changing app source.
|
|
|
36
36
|
- Keep the first viewport focused: one primary action, progressive disclosure,
|
|
37
37
|
concise copy, and no generic Chat label for a domain page. Never use sparkle,
|
|
38
38
|
wand, magic, or robot icons as AI affordances.
|
|
39
|
+
- Page and section data loads use layout-matching `Skeleton` geometry, never a
|
|
40
|
+
generic "Loading..." label. Reserve `Spinner` for brief mutations, uploads,
|
|
41
|
+
and progress actions.
|
|
39
42
|
- Use a sans-first SaaS hierarchy with one restrained visual cue; reserve serif
|
|
40
43
|
type for content previews. Give the AgentSidebar a subtle surface/divider
|
|
41
44
|
boundary, and stack original/generated review vertically by default.
|
|
@@ -199,7 +199,11 @@ as an operator would use it repeatedly:
|
|
|
199
199
|
- Use full `Card` composition when the content has a title, description, content, or actions. Do not dump complex cards into a single `CardContent`.
|
|
200
200
|
- Use `ToggleGroup` for small option sets, `Switch` for binary settings, `Checkbox` for multi-select, `RadioGroup` for one-of-many, and `Slider`/inputs for numeric values.
|
|
201
201
|
- For forms, prefer the app's existing shadcn form pattern. If newer `Field`, `FieldGroup`, or `InputGroup` primitives are installed or appropriate to add, use them instead of raw layout divs.
|
|
202
|
-
-
|
|
202
|
+
- Page and section data loading uses layout-matching `Skeleton` geometry. Do
|
|
203
|
+
not show generic "Loading..." text for content loads; reserve `Spinner` for
|
|
204
|
+
brief mutations, uploads, and progress actions. Use the app's existing
|
|
205
|
+
loading primitive when it is a genuine design-system adapter. Empty states
|
|
206
|
+
should have one clear next action.
|
|
203
207
|
|
|
204
208
|
## Anti-Patterns
|
|
205
209
|
|
|
@@ -44,6 +44,9 @@ agent should know.
|
|
|
44
44
|
- Keep the first viewport focused: one primary action, progressive disclosure,
|
|
45
45
|
concise copy, and domain-specific navigation. Never use sparkle, wand,
|
|
46
46
|
magic, or robot icons as AI affordances.
|
|
47
|
+
- Data loads use layout-matching `Skeleton` geometry, never a
|
|
48
|
+
generic "Loading..." label. Reserve `Spinner` for brief mutations, uploads,
|
|
49
|
+
and progress actions.
|
|
47
50
|
- Use a sans-first SaaS hierarchy with one restrained visual cue; reserve serif
|
|
48
51
|
type for content previews. Give the AgentSidebar a subtle surface/divider
|
|
49
52
|
boundary, and stack original/generated review vertically by default.
|
|
@@ -69,6 +69,9 @@ refreshes framework-provided shared skills and repairs `CLAUDE.md` /
|
|
|
69
69
|
- Keep the first viewport focused: one primary action, progressive disclosure,
|
|
70
70
|
concise copy, and domain-specific navigation. Never use sparkle, wand,
|
|
71
71
|
magic, or robot icons as AI affordances.
|
|
72
|
+
- Page and section data loads use layout-matching `Skeleton` geometry, never a
|
|
73
|
+
generic "Loading..." label. Reserve `Spinner` for brief mutations, uploads,
|
|
74
|
+
and progress actions.
|
|
72
75
|
- Use a sans-first SaaS hierarchy with one restrained visual cue; reserve serif
|
|
73
76
|
type for content previews. Give the AgentSidebar a subtle surface/divider
|
|
74
77
|
boundary, and stack original/generated review vertically by default.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.145.
|
|
3
|
+
"version": "0.145.8",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -199,7 +199,11 @@ as an operator would use it repeatedly:
|
|
|
199
199
|
- Use full `Card` composition when the content has a title, description, content, or actions. Do not dump complex cards into a single `CardContent`.
|
|
200
200
|
- Use `ToggleGroup` for small option sets, `Switch` for binary settings, `Checkbox` for multi-select, `RadioGroup` for one-of-many, and `Slider`/inputs for numeric values.
|
|
201
201
|
- For forms, prefer the app's existing shadcn form pattern. If newer `Field`, `FieldGroup`, or `InputGroup` primitives are installed or appropriate to add, use them instead of raw layout divs.
|
|
202
|
-
-
|
|
202
|
+
- Page and section data loading uses layout-matching `Skeleton` geometry. Do
|
|
203
|
+
not show generic "Loading..." text for content loads; reserve `Spinner` for
|
|
204
|
+
brief mutations, uploads, and progress actions. Use the app's existing
|
|
205
|
+
loading primitive when it is a genuine design-system adapter. Empty states
|
|
206
|
+
should have one clear next action.
|
|
203
207
|
|
|
204
208
|
## Anti-Patterns
|
|
205
209
|
|
|
@@ -23,6 +23,9 @@ workflow needs durable UI around the conversation.
|
|
|
23
23
|
- Keep the first viewport sparse and task-focused. Use progressive disclosure
|
|
24
24
|
and domain-specific navigation, and never use sparkle, wand, magic, or robot
|
|
25
25
|
icons as AI affordances.
|
|
26
|
+
- Page and section data loads use layout-matching `Skeleton` geometry, never a
|
|
27
|
+
generic "Loading..." label. Reserve `Spinner` for brief mutations, uploads,
|
|
28
|
+
and progress actions.
|
|
26
29
|
- Use a sans-first SaaS hierarchy with one restrained visual cue; reserve serif
|
|
27
30
|
type for content previews. Give the AgentSidebar a subtle surface/divider
|
|
28
31
|
boundary, and stack original/generated review vertically by default.
|
|
@@ -199,7 +199,11 @@ as an operator would use it repeatedly:
|
|
|
199
199
|
- Use full `Card` composition when the content has a title, description, content, or actions. Do not dump complex cards into a single `CardContent`.
|
|
200
200
|
- Use `ToggleGroup` for small option sets, `Switch` for binary settings, `Checkbox` for multi-select, `RadioGroup` for one-of-many, and `Slider`/inputs for numeric values.
|
|
201
201
|
- For forms, prefer the app's existing shadcn form pattern. If newer `Field`, `FieldGroup`, or `InputGroup` primitives are installed or appropriate to add, use them instead of raw layout divs.
|
|
202
|
-
-
|
|
202
|
+
- Page and section data loading uses layout-matching `Skeleton` geometry. Do
|
|
203
|
+
not show generic "Loading..." text for content loads; reserve `Spinner` for
|
|
204
|
+
brief mutations, uploads, and progress actions. Use the app's existing
|
|
205
|
+
loading primitive when it is a genuine design-system adapter. Empty states
|
|
206
|
+
should have one clear next action.
|
|
203
207
|
|
|
204
208
|
## Anti-Patterns
|
|
205
209
|
|
|
@@ -36,6 +36,9 @@ cross-cutting work and `self-modifying-code` when changing app source.
|
|
|
36
36
|
- Keep the first viewport focused: one primary action, progressive disclosure,
|
|
37
37
|
concise copy, and no generic Chat label for a domain page. Never use sparkle,
|
|
38
38
|
wand, magic, or robot icons as AI affordances.
|
|
39
|
+
- Page and section data loads use layout-matching `Skeleton` geometry, never a
|
|
40
|
+
generic "Loading..." label. Reserve `Spinner` for brief mutations, uploads,
|
|
41
|
+
and progress actions.
|
|
39
42
|
- Use a sans-first SaaS hierarchy with one restrained visual cue; reserve serif
|
|
40
43
|
type for content previews. Give the AgentSidebar a subtle surface/divider
|
|
41
44
|
boundary, and stack original/generated review vertically by default.
|
|
@@ -199,7 +199,11 @@ as an operator would use it repeatedly:
|
|
|
199
199
|
- Use full `Card` composition when the content has a title, description, content, or actions. Do not dump complex cards into a single `CardContent`.
|
|
200
200
|
- Use `ToggleGroup` for small option sets, `Switch` for binary settings, `Checkbox` for multi-select, `RadioGroup` for one-of-many, and `Slider`/inputs for numeric values.
|
|
201
201
|
- For forms, prefer the app's existing shadcn form pattern. If newer `Field`, `FieldGroup`, or `InputGroup` primitives are installed or appropriate to add, use them instead of raw layout divs.
|
|
202
|
-
-
|
|
202
|
+
- Page and section data loading uses layout-matching `Skeleton` geometry. Do
|
|
203
|
+
not show generic "Loading..." text for content loads; reserve `Spinner` for
|
|
204
|
+
brief mutations, uploads, and progress actions. Use the app's existing
|
|
205
|
+
loading primitive when it is a genuine design-system adapter. Empty states
|
|
206
|
+
should have one clear next action.
|
|
203
207
|
|
|
204
208
|
## Anti-Patterns
|
|
205
209
|
|
|
@@ -44,6 +44,9 @@ agent should know.
|
|
|
44
44
|
- Keep the first viewport focused: one primary action, progressive disclosure,
|
|
45
45
|
concise copy, and domain-specific navigation. Never use sparkle, wand,
|
|
46
46
|
magic, or robot icons as AI affordances.
|
|
47
|
+
- Data loads use layout-matching `Skeleton` geometry, never a
|
|
48
|
+
generic "Loading..." label. Reserve `Spinner` for brief mutations, uploads,
|
|
49
|
+
and progress actions.
|
|
47
50
|
- Use a sans-first SaaS hierarchy with one restrained visual cue; reserve serif
|
|
48
51
|
type for content previews. Give the AgentSidebar a subtle surface/divider
|
|
49
52
|
boundary, and stack original/generated review vertically by default.
|
|
@@ -69,6 +69,9 @@ refreshes framework-provided shared skills and repairs `CLAUDE.md` /
|
|
|
69
69
|
- Keep the first viewport focused: one primary action, progressive disclosure,
|
|
70
70
|
concise copy, and domain-specific navigation. Never use sparkle, wand,
|
|
71
71
|
magic, or robot icons as AI affordances.
|
|
72
|
+
- Page and section data loads use layout-matching `Skeleton` geometry, never a
|
|
73
|
+
generic "Loading..." label. Reserve `Spinner` for brief mutations, uploads,
|
|
74
|
+
and progress actions.
|
|
72
75
|
- Use a sans-first SaaS hierarchy with one restrained visual cue; reserve serif
|
|
73
76
|
type for content previews. Give the AgentSidebar a subtle surface/divider
|
|
74
77
|
boundary, and stack original/generated review vertically by default.
|