@agent-native/core 0.228.1 → 0.228.2-nightly-20261113032548
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"@agent-native/agentkit": "0.228.
|
|
2
|
+
"@agent-native/agentkit": "0.228.2-nightly-20261113032548",
|
|
3
3
|
"@agent-native/code-agents-ui": "0.1.75",
|
|
4
|
-
"@agent-native/core": "0.228.
|
|
5
|
-
"@agent-native/core-corpus": "0.228.
|
|
4
|
+
"@agent-native/core": "0.228.2-nightly-20261113032548",
|
|
5
|
+
"@agent-native/core-corpus": "0.228.2-nightly-20261113032548",
|
|
6
6
|
"@agent-native/creative-context": "0.8.71",
|
|
7
|
-
"@agent-native/dispatch": "0.42.
|
|
7
|
+
"@agent-native/dispatch": "0.42.7-nightly-20261113032548",
|
|
8
8
|
"@agent-native/embedding": "0.2.0",
|
|
9
9
|
"@agent-native/migrate": "0.0.7",
|
|
10
10
|
"@agent-native/otel": "0.1.38",
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
"@agent-native/recap-cli": "0.5.102",
|
|
13
13
|
"@agent-native/scheduling": "0.2.58",
|
|
14
14
|
"@agent-native/shared-app-config": "0.1.2",
|
|
15
|
-
"@agent-native/skills": "0.4.
|
|
16
|
-
"@agent-native/toolkit": "0.228.
|
|
15
|
+
"@agent-native/skills": "0.4.7-nightly-20261113032548",
|
|
16
|
+
"@agent-native/toolkit": "0.228.2-nightly-20261113032548"
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BetterAuthOptions } from "better-auth";
|
|
1
|
+
import { type BetterAuthOptions, type BetterAuthPlugin } from "better-auth";
|
|
2
2
|
import type { H3Event } from "h3";
|
|
3
3
|
import { type SignupOrigin } from "./attribution.js";
|
|
4
4
|
import { type EmailReadiness } from "./email.js";
|
|
@@ -330,5 +330,16 @@ export interface GoogleAuthIdentity {
|
|
|
330
330
|
}
|
|
331
331
|
export declare function ensureGoogleAuthIdentity(identity: GoogleAuthIdentity): Promise<boolean>;
|
|
332
332
|
export declare function ensureGoogleAuthIdentityWithAdapter(adapter: BetterAuthInternalAdapter, identity: GoogleAuthIdentity): Promise<boolean>;
|
|
333
|
+
type BetterAuthInitContext = Parameters<NonNullable<BetterAuthPlugin["init"]>>[0];
|
|
334
|
+
/**
|
|
335
|
+
* Better Auth runs mail callbacks through `runInBackgroundOrAwait`, which logs
|
|
336
|
+
* and swallows their errors. Track the delivery promises so the runner can hand
|
|
337
|
+
* them back and a failed send fails the request.
|
|
338
|
+
*/
|
|
339
|
+
export declare function trackAuthEmailDeliveries(ctx: BetterAuthInitContext): {
|
|
340
|
+
context: {
|
|
341
|
+
runInBackgroundOrAwait(task: Parameters<BetterAuthInitContext["runInBackgroundOrAwait"]>[0]): unknown;
|
|
342
|
+
};
|
|
343
|
+
} | undefined;
|
|
333
344
|
export declare function resetBetterAuth(): Promise<void>;
|
|
334
345
|
export declare function buildDatabaseConfig(): Promise<BetterAuthOptions["database"]>;
|
|
@@ -1403,6 +1403,58 @@ export async function ensureGoogleAuthIdentityWithAdapter(adapter, identity) {
|
|
|
1403
1403
|
await syncGoogleProfile(adapter, existing, email, identity);
|
|
1404
1404
|
return false;
|
|
1405
1405
|
}
|
|
1406
|
+
/**
|
|
1407
|
+
* Better Auth runs mail callbacks through `runInBackgroundOrAwait`, which logs
|
|
1408
|
+
* and swallows their errors. Track the delivery promises so the runner can hand
|
|
1409
|
+
* them back and a failed send fails the request.
|
|
1410
|
+
*/
|
|
1411
|
+
export function trackAuthEmailDeliveries(ctx) {
|
|
1412
|
+
const deliveries = new WeakSet();
|
|
1413
|
+
const emailVerification = ctx.options.emailVerification;
|
|
1414
|
+
const sendVerificationEmail = emailVerification?.sendVerificationEmail;
|
|
1415
|
+
if (emailVerification && sendVerificationEmail) {
|
|
1416
|
+
emailVerification.sendVerificationEmail = (...args) => {
|
|
1417
|
+
const delivery = sendVerificationEmail(...args);
|
|
1418
|
+
if (delivery instanceof Promise)
|
|
1419
|
+
deliveries.add(delivery);
|
|
1420
|
+
return delivery;
|
|
1421
|
+
};
|
|
1422
|
+
}
|
|
1423
|
+
const changeEmail = ctx.options.user?.changeEmail;
|
|
1424
|
+
const sendChangeEmailConfirmation = changeEmail?.sendChangeEmailConfirmation;
|
|
1425
|
+
if (changeEmail && sendChangeEmailConfirmation) {
|
|
1426
|
+
changeEmail.sendChangeEmailConfirmation = (...args) => {
|
|
1427
|
+
const delivery = sendChangeEmailConfirmation(...args);
|
|
1428
|
+
if (delivery instanceof Promise)
|
|
1429
|
+
deliveries.add(delivery);
|
|
1430
|
+
return delivery;
|
|
1431
|
+
};
|
|
1432
|
+
}
|
|
1433
|
+
if (!sendVerificationEmail && !sendChangeEmailConfirmation)
|
|
1434
|
+
return;
|
|
1435
|
+
const passwordOptions = ctx.options.emailAndPassword;
|
|
1436
|
+
const onExistingUserSignUp = passwordOptions?.onExistingUserSignUp;
|
|
1437
|
+
if (passwordOptions && onExistingUserSignUp) {
|
|
1438
|
+
passwordOptions.onExistingUserSignUp = (...args) => {
|
|
1439
|
+
const delivery = onExistingUserSignUp(...args);
|
|
1440
|
+
deliveries.add(delivery);
|
|
1441
|
+
return delivery;
|
|
1442
|
+
};
|
|
1443
|
+
}
|
|
1444
|
+
const runInBackgroundOrAwait = ctx.runInBackgroundOrAwait.bind(ctx);
|
|
1445
|
+
return {
|
|
1446
|
+
context: {
|
|
1447
|
+
runInBackgroundOrAwait(task) {
|
|
1448
|
+
// Better Auth swallows even awaited task errors; verification and
|
|
1449
|
+
// email-change mail must fail the request before the UI can claim
|
|
1450
|
+
// mail was sent.
|
|
1451
|
+
if (task instanceof Promise && deliveries.has(task))
|
|
1452
|
+
return task;
|
|
1453
|
+
return runInBackgroundOrAwait(task);
|
|
1454
|
+
},
|
|
1455
|
+
},
|
|
1456
|
+
};
|
|
1457
|
+
}
|
|
1406
1458
|
export async function resetBetterAuth() {
|
|
1407
1459
|
_authInitGeneration++;
|
|
1408
1460
|
_auth = undefined;
|
|
@@ -2021,40 +2073,7 @@ async function createBetterAuthInstance(config) {
|
|
|
2021
2073
|
},
|
|
2022
2074
|
],
|
|
2023
2075
|
},
|
|
2024
|
-
init
|
|
2025
|
-
const emailVerification = ctx.options.emailVerification;
|
|
2026
|
-
if (!emailVerification?.sendVerificationEmail)
|
|
2027
|
-
return;
|
|
2028
|
-
const sendVerificationEmail = emailVerification.sendVerificationEmail;
|
|
2029
|
-
const deliveries = new WeakSet();
|
|
2030
|
-
emailVerification.sendVerificationEmail = (...args) => {
|
|
2031
|
-
const delivery = sendVerificationEmail(...args);
|
|
2032
|
-
if (delivery instanceof Promise)
|
|
2033
|
-
deliveries.add(delivery);
|
|
2034
|
-
return delivery;
|
|
2035
|
-
};
|
|
2036
|
-
const passwordOptions = ctx.options.emailAndPassword;
|
|
2037
|
-
const onExistingUserSignUp = passwordOptions?.onExistingUserSignUp;
|
|
2038
|
-
if (passwordOptions && onExistingUserSignUp) {
|
|
2039
|
-
passwordOptions.onExistingUserSignUp = (...args) => {
|
|
2040
|
-
const delivery = onExistingUserSignUp(...args);
|
|
2041
|
-
deliveries.add(delivery);
|
|
2042
|
-
return delivery;
|
|
2043
|
-
};
|
|
2044
|
-
}
|
|
2045
|
-
const runInBackgroundOrAwait = ctx.runInBackgroundOrAwait.bind(ctx);
|
|
2046
|
-
return {
|
|
2047
|
-
context: {
|
|
2048
|
-
runInBackgroundOrAwait(task) {
|
|
2049
|
-
// Better Auth swallows even awaited task errors; verification
|
|
2050
|
-
// must fail the request before the UI can claim mail was sent.
|
|
2051
|
-
if (task instanceof Promise && deliveries.has(task))
|
|
2052
|
-
return task;
|
|
2053
|
-
return runInBackgroundOrAwait(task);
|
|
2054
|
-
},
|
|
2055
|
-
},
|
|
2056
|
-
};
|
|
2057
|
-
},
|
|
2076
|
+
init: trackAuthEmailDeliveries,
|
|
2058
2077
|
},
|
|
2059
2078
|
],
|
|
2060
2079
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.228.
|
|
3
|
+
"version": "0.228.2-nightly-20261113032548",
|
|
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": {
|
|
@@ -771,7 +771,7 @@
|
|
|
771
771
|
"yaml": "^2.9.0",
|
|
772
772
|
"yjs": "^13.6.33",
|
|
773
773
|
"zod": "^4.3.6",
|
|
774
|
-
"@agent-native/agentkit": "^0.228.
|
|
774
|
+
"@agent-native/agentkit": "^0.228.2-nightly-20261113032548",
|
|
775
775
|
"@agent-native/recap-cli": "^0.5.102"
|
|
776
776
|
},
|
|
777
777
|
"devDependencies": {
|
|
@@ -845,7 +845,7 @@
|
|
|
845
845
|
"xlsx": "^0.18.5"
|
|
846
846
|
},
|
|
847
847
|
"peerDependencies": {
|
|
848
|
-
"@agent-native/core-corpus": "
|
|
848
|
+
"@agent-native/core-corpus": "0.228.2-nightly-20261113032548",
|
|
849
849
|
"@ai-sdk/anthropic": ">=3",
|
|
850
850
|
"@ai-sdk/cohere": ">=3",
|
|
851
851
|
"@ai-sdk/google": ">=3",
|