@agent-native/core 0.178.0-nightly-20260909183543 → 0.178.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/CHANGELOG.md +16 -0
- package/corpus/templates/calendar/CHANGELOG.md +19 -0
- package/corpus/templates/clips/CHANGELOG.md +6 -0
- package/corpus/templates/content/CHANGELOG.md +5 -0
- package/corpus/templates/content/app/i18n-data.ts +3 -3
- package/corpus/templates/content/app/lib/local-folder-picker-safety.ts +9 -0
- package/corpus/templates/content/app/routes/_app.local-files.tsx +5 -0
- package/corpus/templates/design/CHANGELOG.md +6 -0
- package/corpus/templates/factory/CHANGELOG.md +18 -0
- package/corpus/templates/mail/CHANGELOG.md +20 -0
- package/corpus/templates/plan/CHANGELOG.md +6 -0
- package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +36 -152
- package/corpus/templates/slides/CHANGELOG.md +11 -0
- package/corpus/templates/slides/actions/add-slide.ts +1 -0
- package/corpus/templates/slides/actions/create-deck.ts +1 -1
- package/corpus/templates/slides/actions/export-html.ts +342 -12
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +69 -20
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +3 -2
- package/corpus/templates/slides/app/components/editor/SlideInlineEditor.tsx +49 -15
- package/corpus/templates/slides/app/global.css +27 -22
- package/corpus/templates/slides/app/hooks/use-deck-design-system.ts +19 -15
- package/corpus/templates/slides/app/lib/create-deck-generation.ts +2 -2
- package/corpus/templates/slides/app/lib/normalize-slide-padding.ts +2 -2
- package/corpus/templates/slides/app/pages/Index.tsx +2 -2
- package/corpus/templates/slides/changelog/2026-09-09-slides-default-generation-style.md +6 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/slides/shared/slide-background.ts +18 -2
- package/dist/cli/index.js +17 -0
- package/dist/client/org/OrgSwitcher.js +16 -21
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +3 -3
- package/dist/observability/routes.d.ts +2 -2
- package/dist/org/federation.d.ts +1 -1
- package/dist/org/federation.js +6 -4
- package/dist/org/index.d.ts +2 -1
- package/dist/org/index.js +2 -1
- package/dist/org/membership.js +1 -1
- package/dist/org/workspace-app-access.d.ts +1 -0
- package/dist/org/workspace-app-access.js +21 -7
- package/package.json +3 -3
package/dist/org/federation.js
CHANGED
|
@@ -17,9 +17,8 @@ const MAX_FEDERATION_ROSTER_MEMBERS = 10_000;
|
|
|
17
17
|
const LOCALHOST_HOSTS = new Set(["localhost", "127.0.0.1", "[::1]", "::1"]);
|
|
18
18
|
function requestEventFromContext() {
|
|
19
19
|
const requestOrigin = getRequestContext()?.requestOrigin;
|
|
20
|
-
if (!requestOrigin)
|
|
21
|
-
|
|
22
|
-
}
|
|
20
|
+
if (!requestOrigin)
|
|
21
|
+
return undefined;
|
|
23
22
|
let url;
|
|
24
23
|
try {
|
|
25
24
|
url = new URL(requestOrigin);
|
|
@@ -295,7 +294,7 @@ export async function validateFederatedOrganizationMembership(event, input) {
|
|
|
295
294
|
if (!identityAuthority || !ORG_ID_PATTERN.test(identityId)) {
|
|
296
295
|
throw new Error("Organization has an invalid identity mapping.");
|
|
297
296
|
}
|
|
298
|
-
const currentOrigin = normalizeAuthority(getOrigin(event));
|
|
297
|
+
const currentOrigin = event ? normalizeAuthority(getOrigin(event)) : null;
|
|
299
298
|
if (currentOrigin === identityAuthority) {
|
|
300
299
|
return { active: true, role: localRole };
|
|
301
300
|
}
|
|
@@ -306,6 +305,9 @@ export async function validateFederatedOrganizationMembership(event, input) {
|
|
|
306
305
|
if (rollout === "unavailable") {
|
|
307
306
|
throw new Error("Cross-app organization federation rollout is unavailable.");
|
|
308
307
|
}
|
|
308
|
+
if (!event) {
|
|
309
|
+
throw new Error("Federated membership validation requires a request origin.");
|
|
310
|
+
}
|
|
309
311
|
const hub = resolveIdentityHubUrl(event);
|
|
310
312
|
const authority = normalizeAuthority(hub ?? "");
|
|
311
313
|
if (!authority || authority !== identityAuthority) {
|
package/dist/org/index.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ export { autoJoinDomainMatchingOrgs } from "./auto-join-domain.js";
|
|
|
8
8
|
export type { AutoJoinDomainResult } from "./auto-join-domain.js";
|
|
9
9
|
export { setActiveOrgId } from "./active-org.js";
|
|
10
10
|
export { invalidateMemberOrgCaches } from "./request-org-cache.js";
|
|
11
|
-
export {
|
|
11
|
+
export { isMissingOrganizationTableError } from "./membership.js";
|
|
12
|
+
export { isStandaloneDispatchRuntime, isWorkspaceAppAccessAllowed, } from "./workspace-app-access.js";
|
|
12
13
|
export { defineAppRoles, getRegisteredAppRoles, listRegisteredAppRoles, listAppMemberRoles, resolveAppRole, setAppMemberRole, } from "./app-roles.js";
|
|
13
14
|
export type { AppRoles, AppRolesDescriptor, AppRoleCaller, AppRoleLookup, AppMemberRoleRow, } from "./app-roles.js";
|
|
14
15
|
export { ORG_MIGRATIONS } from "./migrations.js";
|
package/dist/org/index.js
CHANGED
|
@@ -6,7 +6,8 @@ export { acceptPendingInvitationsForEmail } from "./accept-pending.js";
|
|
|
6
6
|
export { autoJoinDomainMatchingOrgs } from "./auto-join-domain.js";
|
|
7
7
|
export { setActiveOrgId } from "./active-org.js";
|
|
8
8
|
export { invalidateMemberOrgCaches } from "./request-org-cache.js";
|
|
9
|
-
export {
|
|
9
|
+
export { isMissingOrganizationTableError } from "./membership.js";
|
|
10
|
+
export { isStandaloneDispatchRuntime, isWorkspaceAppAccessAllowed, } from "./workspace-app-access.js";
|
|
10
11
|
export { defineAppRoles, getRegisteredAppRoles, listRegisteredAppRoles, listAppMemberRoles, resolveAppRole, setAppMemberRole, } from "./app-roles.js";
|
|
11
12
|
export { ORG_MIGRATIONS } from "./migrations.js";
|
|
12
13
|
export { CROSS_APP_ORG_FEDERATION_FLAG, CROSS_APP_ORG_FEDERATION_SCOPE, } from "./feature-flags.js";
|
package/dist/org/membership.js
CHANGED
|
@@ -10,7 +10,7 @@ export function isMissingOrganizationTableError(error) {
|
|
|
10
10
|
seen.add(current);
|
|
11
11
|
const candidate = current;
|
|
12
12
|
const message = String(candidate.message ?? "");
|
|
13
|
-
if (/no such table:\s*["'`]?organizations["'`]?|relation\s+["'`]?organizations["'`]?\s+does not exist/i.test(message)) {
|
|
13
|
+
if (/no such table:\s*["'`]?(?:organizations|org_members)["'`]?|relation\s+["'`]?(?:organizations|org_members)["'`]?\s+does not exist/i.test(message)) {
|
|
14
14
|
return true;
|
|
15
15
|
}
|
|
16
16
|
current = candidate.cause;
|
|
@@ -2,6 +2,7 @@ export interface WorkspaceAppAccessContext {
|
|
|
2
2
|
email: string;
|
|
3
3
|
orgId?: string | null;
|
|
4
4
|
}
|
|
5
|
+
export declare function isStandaloneDispatchRuntime(): boolean;
|
|
5
6
|
/**
|
|
6
7
|
* Enforce the workspace-app ACL before a hosted app's authenticated API
|
|
7
8
|
* surface is reached. The app shell remains cacheable and anonymous; this
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { signA2AToken } from "../a2a/client.js";
|
|
2
2
|
import { getAppConfig } from "../app-config/index.js";
|
|
3
3
|
import { getDbExec } from "../db/client.js";
|
|
4
|
-
import { resolveVercelDeploymentProtectionHeaders } from "../server/credential-provider.js";
|
|
4
|
+
import { isHostedWorkspaceRuntime, resolveVercelDeploymentProtectionHeaders, } from "../server/credential-provider.js";
|
|
5
5
|
import { workspaceUserGroupsIncludeUser } from "../workspace-connections/groups.js";
|
|
6
6
|
import { getOrgA2ASecret, getOrgDomain } from "./context.js";
|
|
7
7
|
import { isMissingOrganizationTableError } from "./membership.js";
|
|
@@ -10,6 +10,17 @@ const WORKSPACE_APP_ACCESS_TIMEOUT_MS = 2_500;
|
|
|
10
10
|
function normalizedEmail(email) {
|
|
11
11
|
return email.trim().toLowerCase();
|
|
12
12
|
}
|
|
13
|
+
export function isStandaloneDispatchRuntime() {
|
|
14
|
+
const app = getAppConfig().app;
|
|
15
|
+
const isDispatch = [
|
|
16
|
+
app.id,
|
|
17
|
+
app.legacyId,
|
|
18
|
+
app.template,
|
|
19
|
+
app.slug,
|
|
20
|
+
app.packageName,
|
|
21
|
+
].some((value) => value?.trim().toLowerCase() === "dispatch");
|
|
22
|
+
return isDispatch && !isHostedWorkspaceRuntime();
|
|
23
|
+
}
|
|
13
24
|
function configuredWorkspaceDirectory() {
|
|
14
25
|
const workspace = getAppConfig().workspace;
|
|
15
26
|
return (workspace.orgDirectoryUrl?.trim() || workspace.gatewayUrl?.trim() || null);
|
|
@@ -120,6 +131,8 @@ async function loadWorkspaceOrgMember(db, orgId, email) {
|
|
|
120
131
|
catch (error) {
|
|
121
132
|
if (!isMissingOrganizationTableError(error))
|
|
122
133
|
throw error;
|
|
134
|
+
if (!isStandaloneDispatchRuntime())
|
|
135
|
+
throw error;
|
|
123
136
|
memberResult = await db.execute({
|
|
124
137
|
sql: `SELECT role FROM org_members
|
|
125
138
|
WHERE org_id = ? AND LOWER(email) = ?
|
|
@@ -149,18 +162,19 @@ async function isActiveWorkspaceOrgMember(member, orgId, email) {
|
|
|
149
162
|
}
|
|
150
163
|
async function isDispatchWorkspaceAppAccessAllowed(context, email) {
|
|
151
164
|
const orgId = context.orgId?.trim() || null;
|
|
152
|
-
// Dispatch remains available in personal/no-org mode. Organization-scoped
|
|
153
|
-
// Dispatch is a private control plane for owners and admins.
|
|
154
165
|
if (!orgId)
|
|
155
166
|
return true;
|
|
156
167
|
try {
|
|
157
168
|
const member = await loadWorkspaceOrgMember(getDbExec(), orgId, email);
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
return member.role === "owner" || member.role === "admin";
|
|
169
|
+
// Standalone Dispatch hosts can carry an org id before enabling the org
|
|
170
|
+
// schema. Preserve their authenticated-only access until that schema exists.
|
|
171
|
+
return Boolean(member && (await isActiveWorkspaceOrgMember(member, orgId, email)));
|
|
162
172
|
}
|
|
163
173
|
catch (error) {
|
|
174
|
+
if (isMissingOrganizationTableError(error) &&
|
|
175
|
+
isStandaloneDispatchRuntime()) {
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
164
178
|
console.error("[workspace-app-access] Dispatch access check failed", error);
|
|
165
179
|
return false;
|
|
166
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.178.0
|
|
3
|
+
"version": "0.178.0",
|
|
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": {
|
|
@@ -445,8 +445,8 @@
|
|
|
445
445
|
"y-protocols": "^1.0.7",
|
|
446
446
|
"yjs": "^13.6.32",
|
|
447
447
|
"zod": "^4.3.6",
|
|
448
|
-
"@agent-native/recap-cli": "0.5.
|
|
449
|
-
"@agent-native/toolkit": "^0.19.6
|
|
448
|
+
"@agent-native/recap-cli": "0.5.28",
|
|
449
|
+
"@agent-native/toolkit": "^0.19.6"
|
|
450
450
|
},
|
|
451
451
|
"devDependencies": {
|
|
452
452
|
"@ai-sdk/anthropic": "^3.0.71",
|