@agent-native/core 0.145.7 → 0.146.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +1 -1
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/analytics/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/analytics/actions/get-sql-dashboard.ts +20 -4
- package/corpus/templates/analytics/actions/migrate-first-party-analytics-to-bigquery.ts +59 -24
- package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +3 -2
- package/corpus/templates/analytics/changelog/2026-08-07-analytics-migrations-now-use-bounded-pressure-aware-backgrou.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-07-settings-skeleton-placeholders.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-07-template-activity-charts-now-show-only-core-agent-native-app.md +6 -0
- package/corpus/templates/analytics/netlify.toml +1 -1
- package/corpus/templates/analytics/package.json +1 -0
- package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +110 -0
- package/corpus/templates/analytics/scripts/migrate-production.ts +24 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +13 -13
- package/corpus/templates/analytics/server/jobs/analytics-bigquery-backfill.ts +448 -0
- package/corpus/templates/analytics/server/jobs/analytics-rollup-backfill.ts +11 -2
- package/corpus/templates/analytics/server/lib/analytics-rollup-lock.ts +4 -5
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +35 -0
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +3 -5
- package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +10 -4
- package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +4 -11
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +74 -28
- package/corpus/templates/analytics/server/plugins/analytics-rollup-backfill-jobs.ts +2 -5
- package/corpus/templates/analytics/server/plugins/db.ts +56 -3
- package/corpus/templates/analytics/server/routes/api/analytics-bigquery/backfill.post.ts +55 -0
- package/corpus/templates/analytics/server/routes/api/dashboard-agent-context.json.get.ts +22 -4
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/assets/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/brain/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/brain/server/lib/connectors.ts +38 -14
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/calendar/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/chat/AGENTS.md +3 -0
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/clips/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/content/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/crm/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- 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/design/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/design/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/factory/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/forms/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/macros/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/mail/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/plan/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/slides/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +13 -0
- package/corpus/templates/slides/app/components/editor/GeneratingSlidePreview.tsx +5 -0
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +5 -0
- package/corpus/templates/slides/app/components/presentation/PresenterView.tsx +5 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +3 -0
- package/corpus/templates/slides/app/pages/Presentation.tsx +3 -0
- package/corpus/templates/slides/app/pages/SharedPresentation.tsx +5 -0
- package/corpus/templates/slides/app/routes/slide.tsx +10 -5
- package/corpus/templates/slides/changelog/2026-08-07-slide-previews-and-present-now-keep-deck-colors-consistent.md +6 -0
- package/corpus/templates/slides/server/db/schema.ts +1 -0
- package/corpus/templates/slides/server/handlers/share.ts +51 -3
- package/corpus/templates/slides/server/plugins/db.ts +5 -0
- package/corpus/templates/slides/shared/api.ts +2 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +5 -1
- package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/corpus/templates/tasks/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/dist/cli/code-agent-executor.js +8 -3
- package/dist/client/ConnectBuilderCard.d.ts +7 -7
- package/dist/client/ConnectBuilderCard.js +45 -20
- 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/config.d.ts +9 -2
- package/dist/config.js +38 -2
- package/dist/db/client.d.ts +26 -8
- package/dist/db/client.js +200 -9
- package/dist/db/create-get-db.js +2 -2
- 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/deploy/build.js +5 -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/provider-api/actions/provider-api.d.ts +4 -4
- package/dist/scripts/docs/search.js +3 -2
- package/dist/secrets/routes.d.ts +6 -6
- package/dist/server/agent-chat/prompt-resources.js +4 -3
- package/dist/server/agent-chat-plugin.js +6 -4
- package/dist/server/agents-bundle.d.ts +20 -3
- package/dist/server/agents-bundle.js +57 -30
- package/dist/server/auth-plugin.js +5 -0
- package/dist/server/better-auth-instance.js +2 -63
- 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/shared/runtime-config.js +1 -1
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +5 -1
- package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/dist/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- 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/skills/turn-into-app/SKILL.md +37 -11
- package/dist/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/dist/templates/default/AGENTS.md +3 -0
- package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/dist/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +5 -1
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/dist/templates/workspace-core/AGENTS.md +3 -0
- package/dist/templates/workspace-root/AGENTS.md +3 -0
- package/dist/vite/agent-native-config-loader.d.ts +10 -0
- package/dist/vite/agent-native-config-loader.js +56 -0
- package/dist/vite/agents-bundle-plugin.d.ts +5 -1
- package/dist/vite/agents-bundle-plugin.js +29 -6
- package/dist/vite/client.d.ts +4 -2
- package/dist/vite/client.js +4 -49
- package/dist/vite/index.d.ts +2 -2
- package/dist/vite/index.js +1 -1
- package/docs/content/agent-native-config.mdx +43 -17
- package/docs/content/environment-variables.mdx +1 -1
- package/package.json +3 -3
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +5 -1
- package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/src/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- 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/skills/turn-into-app/SKILL.md +37 -11
- package/src/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/src/templates/default/AGENTS.md +3 -0
- package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/src/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +5 -1
- package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +37 -11
- package/src/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +13 -2
- package/src/templates/workspace-core/AGENTS.md +3 -0
- package/src/templates/workspace-root/AGENTS.md +3 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type MigrationEntry } 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 declare const BETTER_AUTH_MIGRATIONS: MigrationEntry[];
|
|
8
|
+
export declare function runBetterAuthMigrations(nitroApp: unknown): Promise<void>;
|
|
@@ -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
|
}
|
|
@@ -98,7 +98,7 @@ export function buildRuntimeConfigPrompt(report, appName) {
|
|
|
98
98
|
"Detected issues:",
|
|
99
99
|
issueLines || "- No issues were reported.",
|
|
100
100
|
"",
|
|
101
|
-
"Inspect the app's agent-native.json or agent-native.ts, its deployment configuration, and the framework defaults. Make the smallest safe fix. Keep secrets out of source control. Do not print secret values in your response. Tell me exactly which deploy settings still need to be set, then verify the production build and runtime health check.",
|
|
101
|
+
"Inspect the app's agent-native.json or agent-native.config.ts (including compatibility aliases), its deployment configuration, and the framework defaults. Make the smallest safe fix. Keep secrets out of source control. Do not print secret values in your response. Tell me exactly which deploy settings still need to be set, then verify the production build and runtime health check.",
|
|
102
102
|
].join("\n");
|
|
103
103
|
}
|
|
104
104
|
export function getRuntimeConfigReport(env, requirements = {}, options = {}) {
|
|
@@ -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
|
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Turn visible project context, a proven thread, skill, or workflow into a
|
|
5
5
|
runnable Agent-Native app with simple buttons, visible agent steps, preview,
|
|
6
6
|
and deployment handoff. Use when a user invokes `/turn-into-app` or asks to
|
|
7
|
-
make a workflow into an app.
|
|
7
|
+
make a workflow into an app, including from Claude or ChatGPT on the web.
|
|
8
8
|
user-invocable: true
|
|
9
9
|
scope: both
|
|
10
10
|
metadata:
|
|
@@ -13,9 +13,32 @@ metadata:
|
|
|
13
13
|
|
|
14
14
|
# Turn Into App
|
|
15
15
|
|
|
16
|
+
## Host execution boundary
|
|
17
|
+
|
|
18
|
+
The build location depends on the host. Treat this as a hard routing rule:
|
|
19
|
+
|
|
20
|
+
- In Claude Web, ChatGPT Web, or a Claude/ChatGPT Project on the web, you are
|
|
21
|
+
the source analyst and handoff orchestrator. You must not build the app in
|
|
22
|
+
the host sandbox. Do not run `npm`, `pnpm`, `npx`, `agent-native create`, or
|
|
23
|
+
`add-app`; do not edit files, create artifacts, or start a local dev server.
|
|
24
|
+
After writing the bounded source brief, call the connected Dispatch action
|
|
25
|
+
`start-workspace-app-creation`. Pass the brief and repeatable workflow in
|
|
26
|
+
`prompt`, plus the inferred `appId`, `description`, `template`, and selected
|
|
27
|
+
`resourceIds` when available. This is the Builder handoff.
|
|
28
|
+
- Do not substitute the generic `create_workspace_app` MCP tool in an online
|
|
29
|
+
host. That tool is a local workspace scaffolder, not the Builder handoff.
|
|
30
|
+
- If `start-workspace-app-creation` is not available or Dispatch is not
|
|
31
|
+
authenticated, stop with the connector setup needed. Do not fall back to a
|
|
32
|
+
local build or claim that the app exists.
|
|
33
|
+
- In Claude Code, Codex Code, or another local code-agent runtime with a target
|
|
34
|
+
workspace, follow the local implementation steps below. The local agent may
|
|
35
|
+
scaffold, edit, run, and verify the app there.
|
|
36
|
+
|
|
16
37
|
## Default behavior
|
|
17
38
|
|
|
18
|
-
|
|
39
|
+
For a local code-agent runtime this is an end-to-end build skill, not a request
|
|
40
|
+
for an app proposal. For an online host, the end-to-end result is a verified
|
|
41
|
+
Builder handoff and the resulting workspace app, not code written in the host.
|
|
19
42
|
|
|
20
43
|
- With no argument, choose the source in this order: visible project context,
|
|
21
44
|
then the current thread. A fresh Claude or ChatGPT Project is a valid source
|
|
@@ -47,9 +70,12 @@ private web access, invent an importer, add fake OAuth, or scrape a logged-in
|
|
|
47
70
|
page. If the needed context is not visible, ask for an export, transcript, or
|
|
48
71
|
attachment and treat that artifact as imported source material.
|
|
49
72
|
|
|
50
|
-
|
|
51
|
-
buttons and agent handoffs, start its dev
|
|
52
|
-
continue through build/deployment handoff. Do
|
|
73
|
+
For local code-agent runtimes, deliver a fresh app in a new directory,
|
|
74
|
+
implement the repeatable workflow with buttons and agent handoffs, start its dev
|
|
75
|
+
server, verify the main path, and continue through build/deployment handoff. Do
|
|
76
|
+
not stop at a plan. For online hosts, call Dispatch first after the source brief,
|
|
77
|
+
then report the returned Builder branch/path and verify the workspace app through
|
|
78
|
+
Dispatch when it becomes available.
|
|
53
79
|
|
|
54
80
|
## Fresh project context mode
|
|
55
81
|
|
|
@@ -190,12 +216,12 @@ Do not use `create` for an existing workspace; it scaffolds a new standalone
|
|
|
190
216
|
workspace rather than adding an app to the current one.
|
|
191
217
|
|
|
192
218
|
When the source came from a fresh external Project and the target is a Builder
|
|
193
|
-
workspace,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
219
|
+
workspace, the online host path is mandatory: after writing the source brief,
|
|
220
|
+
call `start-workspace-app-creation` with a concise prompt, the inferred app id,
|
|
221
|
+
and the brief's repeatable workflow. Pass selected workspace resource IDs when
|
|
222
|
+
they are available, rather than pasting entire knowledge files. Continue from
|
|
223
|
+
the returned workspace path or Builder branch handoff and report the actual
|
|
224
|
+
verification result. Do not run the local scaffold commands in this host mode.
|
|
199
225
|
|
|
200
226
|
Use a first-party template only when it materially fits the workflow. Keep the
|
|
201
227
|
new app independent from the source thread's working tree unless the user
|
|
@@ -51,13 +51,24 @@ also place the skill instructions or this reference in the Project
|
|
|
51
51
|
instructions/knowledge files. Then add and authenticate the Dispatch MCP
|
|
52
52
|
connector from the packaged `adapters/chatgpt-mcp/connector.json`.
|
|
53
53
|
|
|
54
|
+
For Claude Web, ChatGPT Web, and their web Projects, the host is an
|
|
55
|
+
orchestrator, not the build environment. After forming the source brief, call
|
|
56
|
+
the Dispatch `start-workspace-app-creation` action so Builder creates the app
|
|
57
|
+
in the connected workspace. Do not use the host's code interpreter, shell,
|
|
58
|
+
artifact editor, `create_workspace_app`, or local `pnpm`/`npm` commands. If the
|
|
59
|
+
handoff action is unavailable, stop and ask the user to authenticate Dispatch;
|
|
60
|
+
do not fall back to a local sandbox build. Claude Code and Codex Code are the
|
|
61
|
+
local-agent exception and may follow the implementation steps in the main
|
|
62
|
+
skill.
|
|
63
|
+
|
|
54
64
|
In a new Project chat, say:
|
|
55
65
|
|
|
56
66
|
```text
|
|
57
67
|
Turn this project into an app. Use the visible Project instructions,
|
|
58
68
|
knowledge files, and any selected successful runs as the source. Create the
|
|
59
|
-
app in the connected Agent-Native workspace
|
|
60
|
-
and report the real path and
|
|
69
|
+
app in the connected Agent-Native workspace through Dispatch and Builder, keep
|
|
70
|
+
the source brief bounded, and report the real Builder branch/path and
|
|
71
|
+
verification result. Do not build it in this chat's sandbox.
|
|
61
72
|
```
|
|
62
73
|
|
|
63
74
|
If the host does not show the Project instructions or files to the model, stop
|
|
@@ -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
|
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Turn visible project context, a proven thread, skill, or workflow into a
|
|
5
5
|
runnable Agent-Native app with simple buttons, visible agent steps, preview,
|
|
6
6
|
and deployment handoff. Use when a user invokes `/turn-into-app` or asks to
|
|
7
|
-
make a workflow into an app.
|
|
7
|
+
make a workflow into an app, including from Claude or ChatGPT on the web.
|
|
8
8
|
user-invocable: true
|
|
9
9
|
scope: both
|
|
10
10
|
metadata:
|
|
@@ -13,9 +13,32 @@ metadata:
|
|
|
13
13
|
|
|
14
14
|
# Turn Into App
|
|
15
15
|
|
|
16
|
+
## Host execution boundary
|
|
17
|
+
|
|
18
|
+
The build location depends on the host. Treat this as a hard routing rule:
|
|
19
|
+
|
|
20
|
+
- In Claude Web, ChatGPT Web, or a Claude/ChatGPT Project on the web, you are
|
|
21
|
+
the source analyst and handoff orchestrator. You must not build the app in
|
|
22
|
+
the host sandbox. Do not run `npm`, `pnpm`, `npx`, `agent-native create`, or
|
|
23
|
+
`add-app`; do not edit files, create artifacts, or start a local dev server.
|
|
24
|
+
After writing the bounded source brief, call the connected Dispatch action
|
|
25
|
+
`start-workspace-app-creation`. Pass the brief and repeatable workflow in
|
|
26
|
+
`prompt`, plus the inferred `appId`, `description`, `template`, and selected
|
|
27
|
+
`resourceIds` when available. This is the Builder handoff.
|
|
28
|
+
- Do not substitute the generic `create_workspace_app` MCP tool in an online
|
|
29
|
+
host. That tool is a local workspace scaffolder, not the Builder handoff.
|
|
30
|
+
- If `start-workspace-app-creation` is not available or Dispatch is not
|
|
31
|
+
authenticated, stop with the connector setup needed. Do not fall back to a
|
|
32
|
+
local build or claim that the app exists.
|
|
33
|
+
- In Claude Code, Codex Code, or another local code-agent runtime with a target
|
|
34
|
+
workspace, follow the local implementation steps below. The local agent may
|
|
35
|
+
scaffold, edit, run, and verify the app there.
|
|
36
|
+
|
|
16
37
|
## Default behavior
|
|
17
38
|
|
|
18
|
-
|
|
39
|
+
For a local code-agent runtime this is an end-to-end build skill, not a request
|
|
40
|
+
for an app proposal. For an online host, the end-to-end result is a verified
|
|
41
|
+
Builder handoff and the resulting workspace app, not code written in the host.
|
|
19
42
|
|
|
20
43
|
- With no argument, choose the source in this order: visible project context,
|
|
21
44
|
then the current thread. A fresh Claude or ChatGPT Project is a valid source
|
|
@@ -47,9 +70,12 @@ private web access, invent an importer, add fake OAuth, or scrape a logged-in
|
|
|
47
70
|
page. If the needed context is not visible, ask for an export, transcript, or
|
|
48
71
|
attachment and treat that artifact as imported source material.
|
|
49
72
|
|
|
50
|
-
|
|
51
|
-
buttons and agent handoffs, start its dev
|
|
52
|
-
continue through build/deployment handoff. Do
|
|
73
|
+
For local code-agent runtimes, deliver a fresh app in a new directory,
|
|
74
|
+
implement the repeatable workflow with buttons and agent handoffs, start its dev
|
|
75
|
+
server, verify the main path, and continue through build/deployment handoff. Do
|
|
76
|
+
not stop at a plan. For online hosts, call Dispatch first after the source brief,
|
|
77
|
+
then report the returned Builder branch/path and verify the workspace app through
|
|
78
|
+
Dispatch when it becomes available.
|
|
53
79
|
|
|
54
80
|
## Fresh project context mode
|
|
55
81
|
|
|
@@ -190,12 +216,12 @@ Do not use `create` for an existing workspace; it scaffolds a new standalone
|
|
|
190
216
|
workspace rather than adding an app to the current one.
|
|
191
217
|
|
|
192
218
|
When the source came from a fresh external Project and the target is a Builder
|
|
193
|
-
workspace,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
219
|
+
workspace, the online host path is mandatory: after writing the source brief,
|
|
220
|
+
call `start-workspace-app-creation` with a concise prompt, the inferred app id,
|
|
221
|
+
and the brief's repeatable workflow. Pass selected workspace resource IDs when
|
|
222
|
+
they are available, rather than pasting entire knowledge files. Continue from
|
|
223
|
+
the returned workspace path or Builder branch handoff and report the actual
|
|
224
|
+
verification result. Do not run the local scaffold commands in this host mode.
|
|
199
225
|
|
|
200
226
|
Use a first-party template only when it materially fits the workflow. Keep the
|
|
201
227
|
new app independent from the source thread's working tree unless the user
|
|
@@ -51,13 +51,24 @@ also place the skill instructions or this reference in the Project
|
|
|
51
51
|
instructions/knowledge files. Then add and authenticate the Dispatch MCP
|
|
52
52
|
connector from the packaged `adapters/chatgpt-mcp/connector.json`.
|
|
53
53
|
|
|
54
|
+
For Claude Web, ChatGPT Web, and their web Projects, the host is an
|
|
55
|
+
orchestrator, not the build environment. After forming the source brief, call
|
|
56
|
+
the Dispatch `start-workspace-app-creation` action so Builder creates the app
|
|
57
|
+
in the connected workspace. Do not use the host's code interpreter, shell,
|
|
58
|
+
artifact editor, `create_workspace_app`, or local `pnpm`/`npm` commands. If the
|
|
59
|
+
handoff action is unavailable, stop and ask the user to authenticate Dispatch;
|
|
60
|
+
do not fall back to a local sandbox build. Claude Code and Codex Code are the
|
|
61
|
+
local-agent exception and may follow the implementation steps in the main
|
|
62
|
+
skill.
|
|
63
|
+
|
|
54
64
|
In a new Project chat, say:
|
|
55
65
|
|
|
56
66
|
```text
|
|
57
67
|
Turn this project into an app. Use the visible Project instructions,
|
|
58
68
|
knowledge files, and any selected successful runs as the source. Create the
|
|
59
|
-
app in the connected Agent-Native workspace
|
|
60
|
-
and report the real path and
|
|
69
|
+
app in the connected Agent-Native workspace through Dispatch and Builder, keep
|
|
70
|
+
the source brief bounded, and report the real Builder branch/path and
|
|
71
|
+
verification result. Do not build it in this chat's sandbox.
|
|
61
72
|
```
|
|
62
73
|
|
|
63
74
|
If the host does not show the Project instructions or files to the model, stop
|
|
@@ -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.
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
Turn visible project context, a proven thread, skill, or workflow into a
|
|
5
5
|
runnable Agent-Native app with simple buttons, visible agent steps, preview,
|
|
6
6
|
and deployment handoff. Use when a user invokes `/turn-into-app` or asks to
|
|
7
|
-
make a workflow into an app.
|
|
7
|
+
make a workflow into an app, including from Claude or ChatGPT on the web.
|
|
8
8
|
user-invocable: true
|
|
9
9
|
scope: both
|
|
10
10
|
metadata:
|
|
@@ -13,9 +13,32 @@ metadata:
|
|
|
13
13
|
|
|
14
14
|
# Turn Into App
|
|
15
15
|
|
|
16
|
+
## Host execution boundary
|
|
17
|
+
|
|
18
|
+
The build location depends on the host. Treat this as a hard routing rule:
|
|
19
|
+
|
|
20
|
+
- In Claude Web, ChatGPT Web, or a Claude/ChatGPT Project on the web, you are
|
|
21
|
+
the source analyst and handoff orchestrator. You must not build the app in
|
|
22
|
+
the host sandbox. Do not run `npm`, `pnpm`, `npx`, `agent-native create`, or
|
|
23
|
+
`add-app`; do not edit files, create artifacts, or start a local dev server.
|
|
24
|
+
After writing the bounded source brief, call the connected Dispatch action
|
|
25
|
+
`start-workspace-app-creation`. Pass the brief and repeatable workflow in
|
|
26
|
+
`prompt`, plus the inferred `appId`, `description`, `template`, and selected
|
|
27
|
+
`resourceIds` when available. This is the Builder handoff.
|
|
28
|
+
- Do not substitute the generic `create_workspace_app` MCP tool in an online
|
|
29
|
+
host. That tool is a local workspace scaffolder, not the Builder handoff.
|
|
30
|
+
- If `start-workspace-app-creation` is not available or Dispatch is not
|
|
31
|
+
authenticated, stop with the connector setup needed. Do not fall back to a
|
|
32
|
+
local build or claim that the app exists.
|
|
33
|
+
- In Claude Code, Codex Code, or another local code-agent runtime with a target
|
|
34
|
+
workspace, follow the local implementation steps below. The local agent may
|
|
35
|
+
scaffold, edit, run, and verify the app there.
|
|
36
|
+
|
|
16
37
|
## Default behavior
|
|
17
38
|
|
|
18
|
-
|
|
39
|
+
For a local code-agent runtime this is an end-to-end build skill, not a request
|
|
40
|
+
for an app proposal. For an online host, the end-to-end result is a verified
|
|
41
|
+
Builder handoff and the resulting workspace app, not code written in the host.
|
|
19
42
|
|
|
20
43
|
- With no argument, choose the source in this order: visible project context,
|
|
21
44
|
then the current thread. A fresh Claude or ChatGPT Project is a valid source
|
|
@@ -47,9 +70,12 @@ private web access, invent an importer, add fake OAuth, or scrape a logged-in
|
|
|
47
70
|
page. If the needed context is not visible, ask for an export, transcript, or
|
|
48
71
|
attachment and treat that artifact as imported source material.
|
|
49
72
|
|
|
50
|
-
|
|
51
|
-
buttons and agent handoffs, start its dev
|
|
52
|
-
continue through build/deployment handoff. Do
|
|
73
|
+
For local code-agent runtimes, deliver a fresh app in a new directory,
|
|
74
|
+
implement the repeatable workflow with buttons and agent handoffs, start its dev
|
|
75
|
+
server, verify the main path, and continue through build/deployment handoff. Do
|
|
76
|
+
not stop at a plan. For online hosts, call Dispatch first after the source brief,
|
|
77
|
+
then report the returned Builder branch/path and verify the workspace app through
|
|
78
|
+
Dispatch when it becomes available.
|
|
53
79
|
|
|
54
80
|
## Fresh project context mode
|
|
55
81
|
|
|
@@ -190,12 +216,12 @@ Do not use `create` for an existing workspace; it scaffolds a new standalone
|
|
|
190
216
|
workspace rather than adding an app to the current one.
|
|
191
217
|
|
|
192
218
|
When the source came from a fresh external Project and the target is a Builder
|
|
193
|
-
workspace,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
219
|
+
workspace, the online host path is mandatory: after writing the source brief,
|
|
220
|
+
call `start-workspace-app-creation` with a concise prompt, the inferred app id,
|
|
221
|
+
and the brief's repeatable workflow. Pass selected workspace resource IDs when
|
|
222
|
+
they are available, rather than pasting entire knowledge files. Continue from
|
|
223
|
+
the returned workspace path or Builder branch handoff and report the actual
|
|
224
|
+
verification result. Do not run the local scaffold commands in this host mode.
|
|
199
225
|
|
|
200
226
|
Use a first-party template only when it materially fits the workflow. Keep the
|
|
201
227
|
new app independent from the source thread's working tree unless the user
|