@agent-native/core 0.207.0 → 0.207.1-nightly-20261011212936
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/thread-data-builder.d.ts +1 -0
- package/dist/agent/thread-data-builder.js +220 -45
- package/dist/automation/index.d.ts +1 -1
- package/dist/chat-threads/store.d.ts +1 -0
- package/dist/chat-threads/store.js +1 -0
- package/dist/cli/connect.d.ts +1 -0
- package/dist/cli/connect.js +8 -3
- package/dist/client/chat/agentkit-agent-native.js +133 -54
- package/dist/client/chat/runtime.js +61 -2
- package/dist/client/onboarding/first-run-status.js +0 -4
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/mcp/agent-connected.d.ts +13 -0
- package/dist/mcp/agent-connected.js +63 -0
- package/dist/mcp/connect-app-label.d.ts +11 -0
- package/dist/mcp/connect-app-label.js +33 -0
- package/dist/mcp/connect-route.js +41 -33
- package/dist/mcp/connect-store.d.ts +6 -1
- package/dist/mcp/connect-store.js +10 -2
- package/dist/mcp/oauth-route.js +17 -5
- package/dist/mcp/oauth-store.d.ts +2 -0
- package/dist/mcp/oauth-store.js +5 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/org/index.d.ts +2 -2
- 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 +11 -11
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/server/agent-chat-plugin.js +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agent-engine-default-model-route.d.ts +2 -2
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/mcp-connect-content.d.ts +1 -0
- package/dist/shared/mcp-connect-content.js +3 -0
- package/dist/sharing/actions/list-resource-shares.d.ts +1 -1
- package/dist/tracking/registry.d.ts +1 -0
- package/dist/tracking/registry.js +1 -1
- package/package.json +4 -4
|
@@ -68,6 +68,8 @@ export async function ensureTable() {
|
|
|
68
68
|
await ensureColumnExists("mcp_connect_tokens", "created_by", `ALTER TABLE mcp_connect_tokens ADD COLUMN IF NOT EXISTS created_by TEXT`);
|
|
69
69
|
await ensureTableExists("mcp_device_codes", createDeviceCodesSql);
|
|
70
70
|
await ensureColumnExists("mcp_device_codes", "catalog_scope", `ALTER TABLE mcp_device_codes ADD COLUMN IF NOT EXISTS catalog_scope TEXT`);
|
|
71
|
+
await ensureColumnExists("mcp_device_codes", "client", `ALTER TABLE mcp_device_codes ADD COLUMN IF NOT EXISTS client TEXT`);
|
|
72
|
+
await ensureColumnExists("mcp_device_codes", "purpose", `ALTER TABLE mcp_device_codes ADD COLUMN IF NOT EXISTS purpose TEXT`);
|
|
71
73
|
})().catch((err) => {
|
|
72
74
|
_initPromise = undefined;
|
|
73
75
|
throw err;
|
|
@@ -284,7 +286,7 @@ function generateUserCode() {
|
|
|
284
286
|
function generateDeviceCode() {
|
|
285
287
|
return randomBytes(32).toString("base64url");
|
|
286
288
|
}
|
|
287
|
-
export async function createDeviceCode(catalogScope = null) {
|
|
289
|
+
export async function createDeviceCode(catalogScope = null, connection = {}) {
|
|
288
290
|
await ensureTable();
|
|
289
291
|
const client = getDbExec();
|
|
290
292
|
const now = Date.now();
|
|
@@ -308,7 +310,7 @@ export async function createDeviceCode(catalogScope = null) {
|
|
|
308
310
|
const userCode = generateUserCode();
|
|
309
311
|
const expiresAt = now + DEVICE_CODE_TTL_MS;
|
|
310
312
|
await client.execute({
|
|
311
|
-
sql: `INSERT INTO mcp_device_codes (device_code, user_code, owner_email, org_id, status, token_jti, catalog_scope, created_at, expires_at, consumed_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
313
|
+
sql: `INSERT INTO mcp_device_codes (device_code, user_code, owner_email, org_id, status, token_jti, catalog_scope, created_at, expires_at, consumed_at, client, purpose) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
312
314
|
args: [
|
|
313
315
|
deviceCode,
|
|
314
316
|
userCode,
|
|
@@ -320,6 +322,8 @@ export async function createDeviceCode(catalogScope = null) {
|
|
|
320
322
|
now,
|
|
321
323
|
expiresAt,
|
|
322
324
|
null,
|
|
325
|
+
connection.client ?? null,
|
|
326
|
+
connection.purpose ?? null,
|
|
323
327
|
],
|
|
324
328
|
});
|
|
325
329
|
return {
|
|
@@ -330,6 +334,8 @@ export async function createDeviceCode(catalogScope = null) {
|
|
|
330
334
|
status: "pending",
|
|
331
335
|
tokenJti: null,
|
|
332
336
|
catalogScope,
|
|
337
|
+
client: connection.client ?? null,
|
|
338
|
+
purpose: connection.purpose ?? null,
|
|
333
339
|
createdAt: now,
|
|
334
340
|
expiresAt,
|
|
335
341
|
consumedAt: null,
|
|
@@ -344,6 +350,8 @@ function mapDeviceRow(r) {
|
|
|
344
350
|
status: (r.status ?? "pending"),
|
|
345
351
|
tokenJti: (r.token_jti ?? r.tokenJti ?? null),
|
|
346
352
|
catalogScope: (r.catalog_scope ?? r.catalogScope) === "full" ? "full" : null,
|
|
353
|
+
client: r.client ?? null,
|
|
354
|
+
purpose: r.purpose ?? null,
|
|
347
355
|
createdAt: numOrNull(r.created_at ?? r.createdAt),
|
|
348
356
|
expiresAt: numOrNull(r.expires_at ?? r.expiresAt),
|
|
349
357
|
consumedAt: numOrNull(r.consumed_at ?? r.consumedAt),
|
package/dist/mcp/oauth-route.js
CHANGED
|
@@ -8,6 +8,7 @@ import { getAuthSecret } from "../server/better-auth-instance.js";
|
|
|
8
8
|
import { CREDENTIAL_MEMBERSHIP_UNAVAILABLE_MESSAGE } from "../server/credential-membership-unavailable.js";
|
|
9
9
|
import { getOrigin } from "../server/google-oauth.js";
|
|
10
10
|
import { readBody } from "../server/h3-helpers.js";
|
|
11
|
+
import { trackAgentConnected } from "./agent-connected.js";
|
|
11
12
|
import { McpCredentialIssuanceError, withMcpCredentialIssuance, } from "./credential-issuance.js";
|
|
12
13
|
import { applicationTypeForRedirectUris, isAllowedOAuthRedirectUri, isUrlBasedOAuthClientId, matchesRegisteredRedirectUri, resolveOAuthClientMetadataDocument, } from "./oauth-client-metadata.js";
|
|
13
14
|
import { createOAuthCode, createOAuthRefreshToken, consumeOAuthCode, ensureOAuthTables, generateOpaqueToken, getOAuthClient, getOAuthCode, getOAuthRefreshToken, registerOAuthClient, revokeOAuthRefreshToken, touchOAuthRefreshToken, } from "./oauth-store.js";
|
|
@@ -725,6 +726,7 @@ async function handleAuthorize(event, options) {
|
|
|
725
726
|
requestOrigin: getOrigin(event),
|
|
726
727
|
}, (tx) => createOAuthCode({
|
|
727
728
|
clientId,
|
|
729
|
+
clientName: client.clientName,
|
|
728
730
|
redirectUri,
|
|
729
731
|
codeChallenge: params.code_challenge,
|
|
730
732
|
codeChallengeMethod: "S256",
|
|
@@ -805,7 +807,7 @@ function grantUnavailableError(description) {
|
|
|
805
807
|
response.headers.set("Retry-After", "5");
|
|
806
808
|
return response;
|
|
807
809
|
}
|
|
808
|
-
async function handleAuthorizationCodeGrant(event, body) {
|
|
810
|
+
async function handleAuthorizationCodeGrant(event, body, options) {
|
|
809
811
|
const code = body.code;
|
|
810
812
|
const clientId = body.client_id;
|
|
811
813
|
const redirectUri = body.redirect_uri;
|
|
@@ -834,7 +836,7 @@ async function handleAuthorizationCodeGrant(event, body) {
|
|
|
834
836
|
if (!issuer)
|
|
835
837
|
return oauthError("server_error", "Unable to derive issuer", 500);
|
|
836
838
|
try {
|
|
837
|
-
|
|
839
|
+
const response = await withMcpCredentialIssuance({
|
|
838
840
|
email: row.ownerEmail,
|
|
839
841
|
orgId: row.orgId,
|
|
840
842
|
requestOrigin: getOrigin(event),
|
|
@@ -853,6 +855,16 @@ async function handleAuthorizationCodeGrant(event, body) {
|
|
|
853
855
|
grantCreatedAtMs: consumed.createdAt,
|
|
854
856
|
}, tx));
|
|
855
857
|
});
|
|
858
|
+
if (response.status === 200) {
|
|
859
|
+
await trackAgentConnected({
|
|
860
|
+
email: row.ownerEmail,
|
|
861
|
+
origin: issuer,
|
|
862
|
+
appId: options.appId,
|
|
863
|
+
client: row.clientName ?? null,
|
|
864
|
+
method: "oauth",
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
return response;
|
|
856
868
|
}
|
|
857
869
|
catch (error) {
|
|
858
870
|
if (error instanceof McpCredentialIssuanceError &&
|
|
@@ -935,14 +947,14 @@ async function handleRefreshTokenGrant(event, body) {
|
|
|
935
947
|
return grantUnavailableError(CREDENTIAL_MEMBERSHIP_UNAVAILABLE_MESSAGE);
|
|
936
948
|
}
|
|
937
949
|
}
|
|
938
|
-
async function handleToken(event) {
|
|
950
|
+
async function handleToken(event, options) {
|
|
939
951
|
if (getMethod(event) !== "POST") {
|
|
940
952
|
return oauthError("invalid_request", "Method not allowed", 405);
|
|
941
953
|
}
|
|
942
954
|
const body = await readOAuthParams(event);
|
|
943
955
|
switch (body.grant_type) {
|
|
944
956
|
case "authorization_code":
|
|
945
|
-
return handleAuthorizationCodeGrant(event, body);
|
|
957
|
+
return handleAuthorizationCodeGrant(event, body, options);
|
|
946
958
|
case "refresh_token":
|
|
947
959
|
return handleRefreshTokenGrant(event, body);
|
|
948
960
|
default:
|
|
@@ -955,7 +967,7 @@ export async function handleMcpOAuth(event, subpath, options = {}) {
|
|
|
955
967
|
if (path === "authorize")
|
|
956
968
|
return await handleAuthorize(event, options);
|
|
957
969
|
if (path === "token")
|
|
958
|
-
return await handleToken(event);
|
|
970
|
+
return await handleToken(event, options);
|
|
959
971
|
if (path === "register")
|
|
960
972
|
return await handleRegister(event);
|
|
961
973
|
setResponseStatus(event, 404);
|
|
@@ -24,6 +24,7 @@ export interface OAuthClientRow {
|
|
|
24
24
|
createdAt: number | null;
|
|
25
25
|
}
|
|
26
26
|
export interface OAuthCodeRow {
|
|
27
|
+
clientName: string | null;
|
|
27
28
|
code: string;
|
|
28
29
|
clientId: string;
|
|
29
30
|
redirectUri: string;
|
|
@@ -68,6 +69,7 @@ export declare function registerOAuthClient(params: {
|
|
|
68
69
|
export declare function getOAuthClient(clientId: string): Promise<OAuthClientRow | null>;
|
|
69
70
|
export declare function createOAuthCode(params: {
|
|
70
71
|
clientId: string;
|
|
72
|
+
clientName?: string | null;
|
|
71
73
|
redirectUri: string;
|
|
72
74
|
codeChallenge: string;
|
|
73
75
|
codeChallengeMethod: string;
|
package/dist/mcp/oauth-store.js
CHANGED
|
@@ -106,6 +106,7 @@ export async function ensureTable() {
|
|
|
106
106
|
await ensureTableExists("mcp_oauth_clients", createClientsSql);
|
|
107
107
|
await ensureColumnExists("mcp_oauth_clients", "application_type", `ALTER TABLE mcp_oauth_clients ADD COLUMN IF NOT EXISTS application_type TEXT`);
|
|
108
108
|
await ensureTableExists("mcp_oauth_codes", createCodesSql);
|
|
109
|
+
await ensureColumnExists("mcp_oauth_codes", "client_name", `ALTER TABLE mcp_oauth_codes ADD COLUMN IF NOT EXISTS client_name TEXT`);
|
|
109
110
|
// Legacy owners may already have been transferred; leave their bindings unset.
|
|
110
111
|
await ensureColumnExists("mcp_oauth_codes", "issued_for_email", `ALTER TABLE mcp_oauth_codes ADD COLUMN IF NOT EXISTS issued_for_email TEXT`);
|
|
111
112
|
await ensureTableExists("mcp_oauth_refresh_tokens", createRefreshTokensSql);
|
|
@@ -180,6 +181,7 @@ function mapClientRow(row) {
|
|
|
180
181
|
}
|
|
181
182
|
function mapCodeRow(row) {
|
|
182
183
|
return {
|
|
184
|
+
clientName: row.client_name ?? row.clientName ?? null,
|
|
183
185
|
code: row.code,
|
|
184
186
|
clientId: row.client_id ?? row.clientId,
|
|
185
187
|
redirectUri: row.redirect_uri ?? row.redirectUri,
|
|
@@ -296,7 +298,7 @@ export async function createOAuthCode(params, db) {
|
|
|
296
298
|
const now = Date.now();
|
|
297
299
|
const expiresAt = now + MCP_OAUTH_CODE_TTL_MS;
|
|
298
300
|
const result = await client.execute({
|
|
299
|
-
sql: `INSERT INTO mcp_oauth_codes (code, client_id, redirect_uri, code_challenge, code_challenge_method, owner_email, issued_for_email, org_id, org_domain, scope, resource, created_at, expires_at, consumed_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
301
|
+
sql: `INSERT INTO mcp_oauth_codes (code, client_id, redirect_uri, code_challenge, code_challenge_method, owner_email, issued_for_email, org_id, org_domain, scope, resource, created_at, expires_at, consumed_at, client_name) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
300
302
|
args: [
|
|
301
303
|
code,
|
|
302
304
|
params.clientId,
|
|
@@ -312,6 +314,7 @@ export async function createOAuthCode(params, db) {
|
|
|
312
314
|
now,
|
|
313
315
|
expiresAt,
|
|
314
316
|
null,
|
|
317
|
+
params.clientName ?? null,
|
|
315
318
|
],
|
|
316
319
|
});
|
|
317
320
|
if (result.rowsAffected !== 1) {
|
|
@@ -319,6 +322,7 @@ export async function createOAuthCode(params, db) {
|
|
|
319
322
|
}
|
|
320
323
|
return {
|
|
321
324
|
code,
|
|
325
|
+
clientName: params.clientName ?? null,
|
|
322
326
|
clientId: params.clientId,
|
|
323
327
|
redirectUri: params.redirectUri,
|
|
324
328
|
codeChallenge: params.codeChallenge,
|
package/dist/org/index.d.ts
CHANGED
|
@@ -177,15 +177,15 @@ export declare const getMyOrgHandler: import("h3").EventHandlerWithFetch<import(
|
|
|
177
177
|
soloDeploymentAdmin: boolean | undefined;
|
|
178
178
|
}>>;
|
|
179
179
|
export declare const createOrgHandler: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
180
|
-
success: boolean;
|
|
181
180
|
name?: undefined;
|
|
181
|
+
success: boolean;
|
|
182
182
|
id?: undefined;
|
|
183
183
|
role?: undefined;
|
|
184
184
|
} | {
|
|
185
|
+
success?: undefined;
|
|
185
186
|
id: string;
|
|
186
187
|
name: string;
|
|
187
188
|
role: import("./types.js").OrgRole;
|
|
188
|
-
success?: undefined;
|
|
189
189
|
}>>;
|
|
190
190
|
export declare const updateOrgHandler: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
191
191
|
orgId: string;
|
|
@@ -75,10 +75,10 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
75
75
|
user: "user";
|
|
76
76
|
}>>;
|
|
77
77
|
}, z.core.$strip>>, {
|
|
78
|
-
message?: undefined;
|
|
79
|
-
id?: undefined;
|
|
80
78
|
provider?: undefined;
|
|
79
|
+
id?: undefined;
|
|
81
80
|
deleted?: undefined;
|
|
81
|
+
message?: undefined;
|
|
82
82
|
providers: {
|
|
83
83
|
id: string;
|
|
84
84
|
label: string;
|
|
@@ -93,30 +93,30 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
93
93
|
registered?: undefined;
|
|
94
94
|
label?: undefined;
|
|
95
95
|
} | {
|
|
96
|
-
message?: undefined;
|
|
97
96
|
id?: undefined;
|
|
97
|
+
count?: undefined;
|
|
98
98
|
deleted?: undefined;
|
|
99
|
+
message?: undefined;
|
|
99
100
|
providers?: undefined;
|
|
100
|
-
count?: undefined;
|
|
101
101
|
found: boolean;
|
|
102
102
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
103
103
|
registered?: undefined;
|
|
104
104
|
label?: undefined;
|
|
105
105
|
} | {
|
|
106
|
-
message?: undefined;
|
|
107
106
|
provider?: undefined;
|
|
107
|
+
count?: undefined;
|
|
108
108
|
deleted?: undefined;
|
|
109
|
+
message?: undefined;
|
|
109
110
|
providers?: undefined;
|
|
110
|
-
count?: undefined;
|
|
111
111
|
found: boolean;
|
|
112
112
|
id: string;
|
|
113
113
|
registered?: undefined;
|
|
114
114
|
label?: undefined;
|
|
115
115
|
} | {
|
|
116
|
-
message?: undefined;
|
|
117
116
|
provider?: undefined;
|
|
118
|
-
providers?: undefined;
|
|
119
117
|
count?: undefined;
|
|
118
|
+
message?: undefined;
|
|
119
|
+
providers?: undefined;
|
|
120
120
|
found?: undefined;
|
|
121
121
|
deleted: boolean;
|
|
122
122
|
id: string;
|
|
@@ -124,9 +124,9 @@ export declare function createCustomProviderRegistrationAction<TSchema extends Z
|
|
|
124
124
|
label?: undefined;
|
|
125
125
|
} | {
|
|
126
126
|
provider?: undefined;
|
|
127
|
+
count?: undefined;
|
|
127
128
|
deleted?: undefined;
|
|
128
129
|
providers?: undefined;
|
|
129
|
-
count?: undefined;
|
|
130
130
|
found?: undefined;
|
|
131
131
|
registered: boolean;
|
|
132
132
|
id: string;
|
|
@@ -311,9 +311,9 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
311
311
|
notes?: string | undefined;
|
|
312
312
|
scope?: "org" | "user" | undefined;
|
|
313
313
|
}, {
|
|
314
|
-
provider?: undefined;
|
|
315
314
|
message?: undefined;
|
|
316
315
|
id?: undefined;
|
|
316
|
+
deleted?: undefined;
|
|
317
317
|
providers: {
|
|
318
318
|
id: string;
|
|
319
319
|
label: string;
|
|
@@ -324,46 +324,46 @@ export declare function createProviderApiActions(runtime: Pick<ProviderApiRuntim
|
|
|
324
324
|
updatedAt: number;
|
|
325
325
|
}[];
|
|
326
326
|
count: number;
|
|
327
|
+
provider?: undefined;
|
|
327
328
|
found?: undefined;
|
|
328
|
-
deleted?: undefined;
|
|
329
329
|
registered?: undefined;
|
|
330
330
|
label?: undefined;
|
|
331
331
|
} | {
|
|
332
|
-
count?: undefined;
|
|
333
332
|
message?: undefined;
|
|
334
333
|
id?: undefined;
|
|
334
|
+
deleted?: undefined;
|
|
335
|
+
count?: undefined;
|
|
335
336
|
providers?: undefined;
|
|
336
337
|
found: boolean;
|
|
337
338
|
provider: import("../custom-registry.js").CustomProviderConfig;
|
|
338
|
-
deleted?: undefined;
|
|
339
339
|
registered?: undefined;
|
|
340
340
|
label?: undefined;
|
|
341
341
|
} | {
|
|
342
|
-
provider?: undefined;
|
|
343
|
-
count?: undefined;
|
|
344
342
|
message?: undefined;
|
|
343
|
+
deleted?: undefined;
|
|
344
|
+
count?: undefined;
|
|
345
345
|
providers?: undefined;
|
|
346
|
+
provider?: undefined;
|
|
346
347
|
found: boolean;
|
|
347
348
|
id: string;
|
|
348
|
-
deleted?: undefined;
|
|
349
349
|
registered?: undefined;
|
|
350
350
|
label?: undefined;
|
|
351
351
|
} | {
|
|
352
|
-
provider?: undefined;
|
|
353
|
-
count?: undefined;
|
|
354
352
|
message?: undefined;
|
|
353
|
+
count?: undefined;
|
|
355
354
|
providers?: undefined;
|
|
355
|
+
provider?: undefined;
|
|
356
356
|
found?: undefined;
|
|
357
357
|
deleted: boolean;
|
|
358
358
|
id: string;
|
|
359
359
|
registered?: undefined;
|
|
360
360
|
label?: undefined;
|
|
361
361
|
} | {
|
|
362
|
-
|
|
362
|
+
deleted?: undefined;
|
|
363
363
|
count?: undefined;
|
|
364
364
|
providers?: undefined;
|
|
365
|
+
provider?: undefined;
|
|
365
366
|
found?: undefined;
|
|
366
|
-
deleted?: undefined;
|
|
367
367
|
registered: boolean;
|
|
368
368
|
id: string;
|
|
369
369
|
label: string;
|
|
@@ -73,6 +73,7 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
|
|
|
73
73
|
offset?: unknown;
|
|
74
74
|
limit?: unknown;
|
|
75
75
|
}, {
|
|
76
|
+
deleted?: undefined;
|
|
76
77
|
jobs: {
|
|
77
78
|
id: string;
|
|
78
79
|
name: string;
|
|
@@ -83,7 +84,6 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
|
|
|
83
84
|
updatedAt: string;
|
|
84
85
|
}[];
|
|
85
86
|
total: number;
|
|
86
|
-
deleted?: undefined;
|
|
87
87
|
jobId?: undefined;
|
|
88
88
|
} | {
|
|
89
89
|
jobs?: undefined;
|
|
@@ -91,9 +91,9 @@ export declare function createProviderCorpusJobAction(options: CreateProviderCor
|
|
|
91
91
|
deleted: boolean;
|
|
92
92
|
jobId: string;
|
|
93
93
|
} | {
|
|
94
|
+
deleted?: undefined;
|
|
94
95
|
jobs?: undefined;
|
|
95
96
|
total?: undefined;
|
|
96
|
-
deleted?: undefined;
|
|
97
97
|
jobId?: undefined;
|
|
98
98
|
hits: Record<string, unknown>[];
|
|
99
99
|
offset: number;
|
|
@@ -2766,7 +2766,7 @@ export function createAgentChatPlugin(options) {
|
|
|
2766
2766
|
};
|
|
2767
2767
|
repo = appendThreadDebugHistory(repo, debug);
|
|
2768
2768
|
const meta = extractThreadMeta(repo);
|
|
2769
|
-
await updateThreadData(threadId, JSON.stringify(repo), thread.title, meta.preview || thread.preview, repo.messages.length);
|
|
2769
|
+
await updateThreadData(threadId, JSON.stringify(repo), thread.title, meta.preview || thread.preview, repo.messages.length, { trustedRunSequenceResetIds: new Set([run.runId]) });
|
|
2770
2770
|
});
|
|
2771
2771
|
// Checkpoint creation is part of durable turn completion. The helper
|
|
2772
2772
|
// catches and reports its own failures, so a broken app checkpoint does
|
|
@@ -66,7 +66,6 @@ export declare function createAgentEngineApiKeyHandler(): import("h3").EventHand
|
|
|
66
66
|
error: any;
|
|
67
67
|
code: any;
|
|
68
68
|
} | {
|
|
69
|
-
error?: undefined;
|
|
70
69
|
errorCode?: undefined;
|
|
71
70
|
code?: undefined;
|
|
72
71
|
ok: boolean;
|
|
@@ -74,5 +73,6 @@ export declare function createAgentEngineApiKeyHandler(): import("h3").EventHand
|
|
|
74
73
|
baseUrlKey?: string;
|
|
75
74
|
scope: AgentEngineApiKeyScope;
|
|
76
75
|
defaultModel?: import("./agent-engine-default-model-route.js").SavedKeyDefaultModelOutcome;
|
|
76
|
+
error?: undefined;
|
|
77
77
|
}>>;
|
|
78
78
|
export {};
|
|
@@ -8,17 +8,17 @@ export declare const AGENT_ENGINE_API_KEY_ACTION_NAME = "agent-engine-api-key";
|
|
|
8
8
|
* resolveEngine's credential detection.
|
|
9
9
|
*/
|
|
10
10
|
export declare function createAgentEngineDisconnectHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
11
|
+
ok?: undefined;
|
|
11
12
|
error: string;
|
|
12
13
|
scope?: undefined;
|
|
13
|
-
ok?: undefined;
|
|
14
14
|
} | {
|
|
15
15
|
ok: boolean;
|
|
16
16
|
error: any;
|
|
17
17
|
scope?: undefined;
|
|
18
18
|
} | {
|
|
19
|
+
error?: undefined;
|
|
19
20
|
ok: boolean;
|
|
20
21
|
scope: "org" | "user";
|
|
21
|
-
error?: undefined;
|
|
22
22
|
}>>;
|
|
23
23
|
export interface DefaultModelSelectionRequest {
|
|
24
24
|
engine: string;
|
|
@@ -54,8 +54,8 @@ export declare function createRealtimeTokenHandler(): import("h3").EventHandlerW
|
|
|
54
54
|
expiresAt?: undefined;
|
|
55
55
|
ttlSeconds?: undefined;
|
|
56
56
|
} | {
|
|
57
|
-
error?: undefined;
|
|
58
57
|
token: string;
|
|
59
58
|
expiresAt: string;
|
|
60
59
|
ttlSeconds: number;
|
|
60
|
+
error?: undefined;
|
|
61
61
|
}>>;
|
|
@@ -56,6 +56,7 @@ export declare const MCP_CONNECT_GUIDES: readonly McpConnectGuide[];
|
|
|
56
56
|
export declare const MCP_CONNECT_HOSTS: readonly McpConnectHost[];
|
|
57
57
|
export declare const MCP_CONNECT_HOST_SEARCH_TEXT: string;
|
|
58
58
|
export declare function resolveMcpConnectGuideId(query: string | null | undefined): McpConnectGuideId;
|
|
59
|
+
export declare function resolveMcpConnectHostId(query: string): string | undefined;
|
|
59
60
|
export declare function matchesMcpConnectHost(query: string): boolean;
|
|
60
61
|
export declare function getMcpConnectGuides(locale: LocaleCode): readonly McpConnectGuide[];
|
|
61
62
|
export declare const MCP_STATIC_TOKEN_FALLBACK: {
|
|
@@ -206,6 +206,9 @@ export function resolveMcpConnectGuideId(query) {
|
|
|
206
206
|
return "claude";
|
|
207
207
|
return matchingMcpConnectHosts(normalized)[0]?.guideId ?? "other";
|
|
208
208
|
}
|
|
209
|
+
export function resolveMcpConnectHostId(query) {
|
|
210
|
+
return matchingMcpConnectHosts(normalizeMcpConnectQuery(query))[0]?.id;
|
|
211
|
+
}
|
|
209
212
|
export function matchesMcpConnectHost(query) {
|
|
210
213
|
const normalized = normalizeMcpConnectQuery(query);
|
|
211
214
|
if (!normalized)
|
|
@@ -2,7 +2,6 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
2
2
|
resourceType: string;
|
|
3
3
|
resourceId: string;
|
|
4
4
|
}, {
|
|
5
|
-
role?: undefined;
|
|
6
5
|
ownerEmail: any;
|
|
7
6
|
visibility: any;
|
|
8
7
|
shares: any[];
|
|
@@ -12,6 +11,7 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
12
11
|
supportsGroupShares?: boolean;
|
|
13
12
|
};
|
|
14
13
|
orgId?: undefined;
|
|
14
|
+
role?: undefined;
|
|
15
15
|
agentReadable?: undefined;
|
|
16
16
|
} | {
|
|
17
17
|
ownerEmail: string;
|
|
@@ -2,6 +2,7 @@ import type { ActionRunContext } from "../action.js";
|
|
|
2
2
|
import { type TrackingEventOrigin } from "../observability/tracing.js";
|
|
3
3
|
import type { TrackingProvider } from "./types.js";
|
|
4
4
|
export { isQaTestEmail } from "../shared/qa-test-email.js";
|
|
5
|
+
export declare function isTrackingSuppressed(userId: string | undefined, properties?: Record<string, unknown>): boolean;
|
|
5
6
|
export declare function registerTrackingProvider(provider: TrackingProvider): void;
|
|
6
7
|
export declare function unregisterTrackingProvider(name: string): boolean;
|
|
7
8
|
export declare function listTrackingProviders(): string[];
|
|
@@ -17,7 +17,7 @@ function testIdentityOf(userId, properties) {
|
|
|
17
17
|
properties?.user_email,
|
|
18
18
|
].find((value) => isTestIdentity(value));
|
|
19
19
|
}
|
|
20
|
-
function isTrackingSuppressed(userId, properties) {
|
|
20
|
+
export function isTrackingSuppressed(userId, properties) {
|
|
21
21
|
return (getRequestContext()?.isSyntheticTraffic === true ||
|
|
22
22
|
testIdentityOf(userId, properties) !== undefined);
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.207.
|
|
3
|
+
"version": "0.207.1-nightly-20261011212936",
|
|
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": {
|
|
@@ -694,8 +694,8 @@
|
|
|
694
694
|
"yaml": "^2.9.0",
|
|
695
695
|
"yjs": "^13.6.33",
|
|
696
696
|
"zod": "^4.3.6",
|
|
697
|
-
"@agent-native/
|
|
698
|
-
"@agent-native/
|
|
697
|
+
"@agent-native/agentkit": "^0.207.1-nightly-20261011212936",
|
|
698
|
+
"@agent-native/recap-cli": "^0.5.69"
|
|
699
699
|
},
|
|
700
700
|
"devDependencies": {
|
|
701
701
|
"@ai-sdk/anthropic": "^3.0.71",
|
|
@@ -765,7 +765,7 @@
|
|
|
765
765
|
"xlsx": "^0.18.5"
|
|
766
766
|
},
|
|
767
767
|
"peerDependencies": {
|
|
768
|
-
"@agent-native/core-corpus": "
|
|
768
|
+
"@agent-native/core-corpus": "0.207.1-nightly-20261011212936",
|
|
769
769
|
"@ai-sdk/anthropic": ">=3",
|
|
770
770
|
"@ai-sdk/cohere": ">=3",
|
|
771
771
|
"@ai-sdk/google": ">=3",
|