@agent-native/core 0.157.24 → 0.157.28
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/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +3 -3
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/identity-sso-store.d.ts +3 -2
- package/dist/server/identity-sso-store.js +6 -3
- package/dist/server/identity-sso.js +40 -37
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +1 -1
|
@@ -137,13 +137,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
137
137
|
inputSchema: {
|
|
138
138
|
type: string;
|
|
139
139
|
properties: {
|
|
140
|
+
count?: undefined;
|
|
140
141
|
query?: undefined;
|
|
141
142
|
minutes?: undefined;
|
|
142
143
|
limit?: undefined;
|
|
143
144
|
clientHint?: undefined;
|
|
144
145
|
timestamp?: undefined;
|
|
145
146
|
chapterId?: undefined;
|
|
146
|
-
count?: undefined;
|
|
147
147
|
startAt?: undefined;
|
|
148
148
|
endAt?: undefined;
|
|
149
149
|
reason?: undefined;
|
|
@@ -159,6 +159,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
159
159
|
inputSchema: {
|
|
160
160
|
type: string;
|
|
161
161
|
properties: {
|
|
162
|
+
count?: undefined;
|
|
162
163
|
query: {
|
|
163
164
|
type: string;
|
|
164
165
|
description: string;
|
|
@@ -174,7 +175,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
174
175
|
clientHint?: undefined;
|
|
175
176
|
timestamp?: undefined;
|
|
176
177
|
chapterId?: undefined;
|
|
177
|
-
count?: undefined;
|
|
178
178
|
startAt?: undefined;
|
|
179
179
|
endAt?: undefined;
|
|
180
180
|
reason?: undefined;
|
|
@@ -190,6 +190,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
190
190
|
inputSchema: {
|
|
191
191
|
type: string;
|
|
192
192
|
properties: {
|
|
193
|
+
count?: undefined;
|
|
193
194
|
minutes: {
|
|
194
195
|
type: string;
|
|
195
196
|
description: string;
|
|
@@ -199,7 +200,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
199
200
|
clientHint?: undefined;
|
|
200
201
|
timestamp?: undefined;
|
|
201
202
|
chapterId?: undefined;
|
|
202
|
-
count?: undefined;
|
|
203
203
|
startAt?: undefined;
|
|
204
204
|
endAt?: undefined;
|
|
205
205
|
reason?: undefined;
|
|
@@ -216,6 +216,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
216
216
|
type: string;
|
|
217
217
|
required: string[];
|
|
218
218
|
properties: {
|
|
219
|
+
count?: undefined;
|
|
219
220
|
query: {
|
|
220
221
|
type: string;
|
|
221
222
|
description: string;
|
|
@@ -234,7 +235,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
234
235
|
};
|
|
235
236
|
timestamp?: undefined;
|
|
236
237
|
chapterId?: undefined;
|
|
237
|
-
count?: undefined;
|
|
238
238
|
startAt?: undefined;
|
|
239
239
|
endAt?: undefined;
|
|
240
240
|
reason?: undefined;
|
|
@@ -250,6 +250,7 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
250
250
|
type: string;
|
|
251
251
|
required: string[];
|
|
252
252
|
properties: {
|
|
253
|
+
count?: undefined;
|
|
253
254
|
query?: undefined;
|
|
254
255
|
minutes?: undefined;
|
|
255
256
|
limit?: undefined;
|
|
@@ -263,7 +264,6 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
263
264
|
description: string;
|
|
264
265
|
};
|
|
265
266
|
chapterId?: undefined;
|
|
266
|
-
count?: undefined;
|
|
267
267
|
startAt?: undefined;
|
|
268
268
|
endAt?: undefined;
|
|
269
269
|
includeMicrophone?: undefined;
|
|
@@ -314,13 +314,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
314
314
|
type: string;
|
|
315
315
|
required: string[];
|
|
316
316
|
properties: {
|
|
317
|
+
count?: undefined;
|
|
317
318
|
query?: undefined;
|
|
318
319
|
minutes?: undefined;
|
|
319
320
|
limit?: undefined;
|
|
320
321
|
clientHint?: undefined;
|
|
321
322
|
timestamp?: undefined;
|
|
322
323
|
chapterId?: undefined;
|
|
323
|
-
count?: undefined;
|
|
324
324
|
startAt: {
|
|
325
325
|
type: string;
|
|
326
326
|
description: string;
|
|
@@ -349,13 +349,13 @@ export declare function screenMemoryMcpToolDefinitions(): ({
|
|
|
349
349
|
type: string;
|
|
350
350
|
required: string[];
|
|
351
351
|
properties: {
|
|
352
|
+
count?: undefined;
|
|
352
353
|
query?: undefined;
|
|
353
354
|
minutes?: undefined;
|
|
354
355
|
limit?: undefined;
|
|
355
356
|
clientHint?: undefined;
|
|
356
357
|
timestamp?: undefined;
|
|
357
358
|
chapterId?: undefined;
|
|
358
|
-
count?: undefined;
|
|
359
359
|
startAt?: undefined;
|
|
360
360
|
endAt?: undefined;
|
|
361
361
|
reason?: undefined;
|
|
@@ -16,18 +16,18 @@ export declare function createNotificationsHandler(): import("h3").EventHandlerW
|
|
|
16
16
|
error?: undefined;
|
|
17
17
|
ok?: undefined;
|
|
18
18
|
} | {
|
|
19
|
+
count?: undefined;
|
|
19
20
|
updated: number;
|
|
20
21
|
error?: undefined;
|
|
21
22
|
ok?: undefined;
|
|
22
|
-
count?: undefined;
|
|
23
23
|
} | {
|
|
24
|
+
count?: undefined;
|
|
24
25
|
updated?: undefined;
|
|
25
26
|
error: string;
|
|
26
27
|
ok?: undefined;
|
|
27
|
-
count?: undefined;
|
|
28
28
|
} | {
|
|
29
|
+
count?: undefined;
|
|
29
30
|
updated?: undefined;
|
|
30
31
|
error?: undefined;
|
|
31
32
|
ok: boolean;
|
|
32
|
-
count?: undefined;
|
|
33
33
|
}>>;
|
|
@@ -41,16 +41,16 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
41
41
|
thumbsUpRate: number;
|
|
42
42
|
avgEvalScore: number;
|
|
43
43
|
} | {
|
|
44
|
+
error?: undefined;
|
|
44
45
|
summary: import("./types.js").TraceSummary;
|
|
45
46
|
spans: import("./types.js").TraceSpan[];
|
|
46
47
|
id?: undefined;
|
|
47
|
-
error?: undefined;
|
|
48
48
|
ok?: undefined;
|
|
49
49
|
} | {
|
|
50
|
+
error?: undefined;
|
|
50
51
|
summary?: undefined;
|
|
51
52
|
spans?: undefined;
|
|
52
53
|
id: string;
|
|
53
|
-
error?: undefined;
|
|
54
54
|
ok?: undefined;
|
|
55
55
|
} | {
|
|
56
56
|
summary?: undefined;
|
|
@@ -59,9 +59,9 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
59
59
|
error: any;
|
|
60
60
|
ok?: undefined;
|
|
61
61
|
} | {
|
|
62
|
+
error?: undefined;
|
|
62
63
|
summary?: undefined;
|
|
63
64
|
spans?: undefined;
|
|
64
65
|
id?: undefined;
|
|
65
|
-
error?: undefined;
|
|
66
66
|
ok: boolean;
|
|
67
67
|
}>>;
|
|
@@ -27,10 +27,10 @@ export declare function resolveAgentEngineApiKeyWriteTarget(event: H3Event, scop
|
|
|
27
27
|
export declare function createAgentEngineApiKeyHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
28
28
|
error: any;
|
|
29
29
|
} | {
|
|
30
|
+
error?: undefined;
|
|
30
31
|
ok: boolean;
|
|
31
32
|
key: string;
|
|
32
33
|
baseUrlKey?: string;
|
|
33
34
|
scope: AgentEngineApiKeyScope;
|
|
34
|
-
error?: undefined;
|
|
35
35
|
}>>;
|
|
36
36
|
export {};
|
|
@@ -30,8 +30,9 @@ export declare function isCanonicalAgentNativeAppRequest(host: string | undefine
|
|
|
30
30
|
export declare function isCanonicalIdentitySsoClientRequest(host: string | undefined, forwardedProtocol: string | undefined): boolean;
|
|
31
31
|
/**
|
|
32
32
|
* The conditional login entry is the only browser UI this feature adds. It
|
|
33
|
-
* stays byte-for-byte absent on
|
|
34
|
-
*
|
|
33
|
+
* stays byte-for-byte absent on canonical hosted apps, even though those
|
|
34
|
+
* origins may use the backend flow for packaged Desktop. Explicitly
|
|
35
|
+
* configured noncanonical deployments may opt in to the browser entry.
|
|
35
36
|
*/
|
|
36
37
|
export declare function identitySsoLoginButtonHtml(): string;
|
|
37
38
|
export interface CreateSsoStateInput {
|
|
@@ -147,12 +147,15 @@ export function isCanonicalIdentitySsoClientRequest(host, forwardedProtocol) {
|
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* The conditional login entry is the only browser UI this feature adds. It
|
|
150
|
-
* stays byte-for-byte absent on
|
|
151
|
-
*
|
|
150
|
+
* stays byte-for-byte absent on canonical hosted apps, even though those
|
|
151
|
+
* origins may use the backend flow for packaged Desktop. Explicitly
|
|
152
|
+
* configured noncanonical deployments may opt in to the browser entry.
|
|
152
153
|
*/
|
|
153
154
|
export function identitySsoLoginButtonHtml() {
|
|
154
|
-
if (
|
|
155
|
+
if (isCanonicalIdentitySsoClientOrigin(configuredAppOrigin()) ||
|
|
156
|
+
!isIdentitySsoExplicitlyEnabled()) {
|
|
155
157
|
return "";
|
|
158
|
+
}
|
|
156
159
|
return (`\n <a class="btn-identity-sso" id="identity-sso-btn" ` +
|
|
157
160
|
`href="/_agent-native/identity/login" ` +
|
|
158
161
|
`style="display:flex;align-items:center;justify-content:center;gap:0.5rem;` +
|
|
@@ -329,12 +329,49 @@ function safeRequestReturnPath(event) {
|
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
export async function handleIdentitySso(event, subpath) {
|
|
332
|
-
const hub = resolveIdentityHubUrl(event);
|
|
333
|
-
if (!hub)
|
|
334
|
-
return new Response("Not found", { status: 404 });
|
|
335
332
|
const method = getMethod(event);
|
|
336
333
|
const sub = ("/" + subpath.replace(/^\/+/, "").replace(/\/+$/, "")).replace(/^\/$/, "");
|
|
337
334
|
const loginPath = SIGN_IN_ENTRY_PATH;
|
|
335
|
+
// Dispatch is the identity authority, so it has no SSO hub for the
|
|
336
|
+
// browser to federate to. Its authenticated desktop completion page still
|
|
337
|
+
// lives on this route and must be reachable after ordinary sign-in.
|
|
338
|
+
if (sub === "/desktop-complete") {
|
|
339
|
+
if (method !== "GET" && method !== "HEAD") {
|
|
340
|
+
return new Response("Method not allowed", { status: 405 });
|
|
341
|
+
}
|
|
342
|
+
let nonce = "";
|
|
343
|
+
try {
|
|
344
|
+
nonce =
|
|
345
|
+
new URL(requestUrl(event), "http://an.invalid").searchParams.get("nonce") || "";
|
|
346
|
+
}
|
|
347
|
+
catch {
|
|
348
|
+
return new Response("Invalid completion request", { status: 400 });
|
|
349
|
+
}
|
|
350
|
+
if (!DESKTOP_COMPLETION_NONCE.test(nonce)) {
|
|
351
|
+
return new Response("Invalid completion request", { status: 400 });
|
|
352
|
+
}
|
|
353
|
+
const current = await getSession(event).catch((error) => {
|
|
354
|
+
void error;
|
|
355
|
+
return null;
|
|
356
|
+
});
|
|
357
|
+
if (!current?.email) {
|
|
358
|
+
return new Response("Authentication required", { status: 401 });
|
|
359
|
+
}
|
|
360
|
+
return new Response('<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8">' +
|
|
361
|
+
'<meta name="viewport" content="width=device-width,initial-scale=1">' +
|
|
362
|
+
"<title>Signed in</title></head><body>Signed in. You can close this window.</body></html>", {
|
|
363
|
+
status: 200,
|
|
364
|
+
headers: {
|
|
365
|
+
"Cache-Control": "no-store",
|
|
366
|
+
"Content-Security-Policy": "default-src 'none'; style-src 'none'",
|
|
367
|
+
"Content-Type": "text/html; charset=utf-8",
|
|
368
|
+
"Referrer-Policy": "no-referrer",
|
|
369
|
+
},
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
const hub = resolveIdentityHubUrl(event);
|
|
373
|
+
if (!hub)
|
|
374
|
+
return new Response("Not found", { status: 404 });
|
|
338
375
|
if (sub === "/login") {
|
|
339
376
|
if (method !== "GET" && method !== "HEAD") {
|
|
340
377
|
return new Response("Method not allowed", { status: 405 });
|
|
@@ -437,40 +474,6 @@ export async function handleIdentitySso(event, subpath) {
|
|
|
437
474
|
}
|
|
438
475
|
return redirect(event, safeReturnPath(stateResult.returnPath));
|
|
439
476
|
}
|
|
440
|
-
if (sub === "/desktop-complete") {
|
|
441
|
-
if (method !== "GET" && method !== "HEAD") {
|
|
442
|
-
return new Response("Method not allowed", { status: 405 });
|
|
443
|
-
}
|
|
444
|
-
let nonce = "";
|
|
445
|
-
try {
|
|
446
|
-
nonce =
|
|
447
|
-
new URL(requestUrl(event), "http://an.invalid").searchParams.get("nonce") || "";
|
|
448
|
-
}
|
|
449
|
-
catch {
|
|
450
|
-
return new Response("Invalid completion request", { status: 400 });
|
|
451
|
-
}
|
|
452
|
-
if (!DESKTOP_COMPLETION_NONCE.test(nonce)) {
|
|
453
|
-
return new Response("Invalid completion request", { status: 400 });
|
|
454
|
-
}
|
|
455
|
-
const current = await getSession(event).catch((error) => {
|
|
456
|
-
void error;
|
|
457
|
-
return null;
|
|
458
|
-
});
|
|
459
|
-
if (!current?.email) {
|
|
460
|
-
return new Response("Authentication required", { status: 401 });
|
|
461
|
-
}
|
|
462
|
-
return new Response('<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8">' +
|
|
463
|
-
'<meta name="viewport" content="width=device-width,initial-scale=1">' +
|
|
464
|
-
"<title>Signed in</title></head><body>Signed in. You can close this window.</body></html>", {
|
|
465
|
-
status: 200,
|
|
466
|
-
headers: {
|
|
467
|
-
"Cache-Control": "no-store",
|
|
468
|
-
"Content-Security-Policy": "default-src 'none'; style-src 'none'",
|
|
469
|
-
"Content-Type": "text/html; charset=utf-8",
|
|
470
|
-
"Referrer-Policy": "no-referrer",
|
|
471
|
-
},
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
477
|
return new Response("Not found", { status: 404 });
|
|
475
478
|
}
|
|
476
479
|
export function isIdentitySsoBypassPath(p) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/core",
|
|
3
|
-
"version": "0.157.
|
|
3
|
+
"version": "0.157.28",
|
|
4
4
|
"description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|