@agent-native/core 0.207.1 → 0.207.2-nightly-20261013011333
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/production-agent.js +2 -0
- package/dist/cli/design-connect.d.ts +6 -0
- package/dist/cli/design-connect.js +880 -9
- package/dist/client/action-query-cache.d.ts +3 -1
- package/dist/client/action-query-cache.js +628 -161
- package/dist/client/action-query-cache.session-test-fixture.d.ts +49 -0
- package/dist/client/action-query-cache.session-test-fixture.js +151 -0
- package/dist/client/action-query-cache.test-fixtures.d.ts +2 -0
- package/dist/client/action-query-cache.test-fixtures.js +56 -0
- package/dist/client/motion-text.css +3 -0
- package/dist/client/motion-text.d.ts +38 -0
- package/dist/client/motion-text.js +551 -0
- package/dist/client/org/hooks.d.ts +3 -1
- package/dist/client/org/hooks.js +8 -2
- package/dist/client/route-chunk-recovery.d.ts +2 -0
- package/dist/client/route-chunk-recovery.js +11 -0
- package/dist/client/use-action.d.ts +10 -2
- package/dist/client/use-action.js +81 -12
- package/dist/client/use-settings-shortcut.js +8 -3
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/extensions/fetch-tool.js +8 -2
- package/dist/extensions/routes.js +7 -3
- package/dist/extensions/web-content.js +17 -2
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/jobs/actions/manage-recurring-job.d.ts +1 -1
- package/dist/mcp/build-server.js +5 -0
- package/dist/observability/routes.d.ts +4 -4
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +5 -5
- 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/agent-engine-ollama-models-route.d.ts +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/server/visual-edit-bridge-capability.d.ts +26 -0
- package/dist/server/visual-edit-bridge-capability.js +233 -0
- package/dist/shared/motion-easing.d.ts +6 -0
- package/dist/shared/motion-easing.js +109 -0
- package/dist/shared/motion-source-node-id.d.ts +3 -0
- package/dist/shared/motion-source-node-id.js +12 -0
- package/dist/sharing/actions/list-resource-shares.d.ts +1 -1
- package/dist/templates/factory/.agents/skills/review-latest-feedback/SKILL.md +35 -36
- package/dist/triggers/actions/manage-automation.d.ts +5 -5
- package/dist/vite/client.js +2 -0
- package/dist/vite/motion-source-provenance-plugin.d.ts +3 -0
- package/dist/vite/motion-source-provenance-plugin.js +339 -0
- package/package.json +14 -5
- package/src/templates/factory/.agents/skills/review-latest-feedback/SKILL.md +35 -36
|
@@ -776,18 +776,60 @@ function trackActionCircuitTrip(actionName, error, trip) {
|
|
|
776
776
|
}
|
|
777
777
|
// Identical keys in another client or auth scope must earn their own permission.
|
|
778
778
|
const browserPersistableActionQueries = new WeakSet();
|
|
779
|
+
const browserPersistableActionQueryBindings = new WeakMap();
|
|
780
|
+
const actionQueryCacheRevokers = new WeakMap();
|
|
781
|
+
const actionQueryCacheBindingRevokers = new WeakMap();
|
|
782
|
+
let actionQueryCacheBindingToken;
|
|
783
|
+
export function registerActionQueryCacheRevoker(client, revoke, bindingToken) {
|
|
784
|
+
actionQueryCacheRevokers.set(client, revoke);
|
|
785
|
+
if (bindingToken)
|
|
786
|
+
actionQueryCacheBindingRevokers.set(bindingToken, revoke);
|
|
787
|
+
}
|
|
788
|
+
function revokeActionQueryCacheForClient(client, bindingToken) {
|
|
789
|
+
const bindingRevoker = bindingToken
|
|
790
|
+
? actionQueryCacheBindingRevokers.get(bindingToken)
|
|
791
|
+
: undefined;
|
|
792
|
+
(bindingRevoker ?? actionQueryCacheRevokers.get(client))?.();
|
|
793
|
+
}
|
|
794
|
+
/** @internal set only by the scoped action-query cache binder. */
|
|
795
|
+
export function setActionQueryCacheBindingToken(token) {
|
|
796
|
+
actionQueryCacheBindingToken = token;
|
|
797
|
+
}
|
|
798
|
+
const accessDeniedActionQueryBindings = new WeakMap();
|
|
799
|
+
export function setAccessDeniedActionQueryBinding(query, token) {
|
|
800
|
+
if (token)
|
|
801
|
+
accessDeniedActionQueryBindings.set(query, token);
|
|
802
|
+
else
|
|
803
|
+
accessDeniedActionQueryBindings.delete(query);
|
|
804
|
+
}
|
|
805
|
+
export function getAccessDeniedActionQueryBinding(query) {
|
|
806
|
+
return accessDeniedActionQueryBindings.get(query);
|
|
807
|
+
}
|
|
808
|
+
export function clearAccessDeniedActionQueryBinding(query) {
|
|
809
|
+
accessDeniedActionQueryBindings.delete(query);
|
|
810
|
+
}
|
|
779
811
|
/** @internal read by the persisted query cache. */
|
|
780
812
|
export function isBrowserPersistableActionQuery(query) {
|
|
781
813
|
return (query.queryKey[0] === "action" &&
|
|
782
814
|
query.state.status === "success" &&
|
|
783
815
|
browserPersistableActionQueries.has(query));
|
|
784
816
|
}
|
|
817
|
+
/** @internal a response is persistable only in the binding active at fetch start. */
|
|
818
|
+
export function isBrowserPersistableActionQueryForBinding(query, token) {
|
|
819
|
+
return (isBrowserPersistableActionQuery(query) &&
|
|
820
|
+
browserPersistableActionQueryBindings.get(query) === token);
|
|
821
|
+
}
|
|
785
822
|
/** @internal used only after a persisted action result is accepted and hydrated. */
|
|
786
|
-
export function markRestoredBrowserPersistableActionQuery(query) {
|
|
823
|
+
export function markRestoredBrowserPersistableActionQuery(query, token) {
|
|
787
824
|
browserPersistableActionQueries.add(query);
|
|
825
|
+
if (token)
|
|
826
|
+
browserPersistableActionQueryBindings.set(query, token);
|
|
827
|
+
else
|
|
828
|
+
browserPersistableActionQueryBindings.delete(query);
|
|
788
829
|
}
|
|
789
830
|
export function revokeBrowserPersistableActionQuery(query) {
|
|
790
831
|
browserPersistableActionQueries.delete(query);
|
|
832
|
+
browserPersistableActionQueryBindings.delete(query);
|
|
791
833
|
}
|
|
792
834
|
export function useActionQuery(actionName, params, options) {
|
|
793
835
|
const apiDisabled = Boolean(agentNativeApiDisabledReason());
|
|
@@ -799,22 +841,49 @@ export function useActionQuery(actionName, params, options) {
|
|
|
799
841
|
queryFn: async ({ signal, client }) => {
|
|
800
842
|
const key = circuitKey();
|
|
801
843
|
const query = client.getQueryCache().find({ queryKey, exact: true });
|
|
844
|
+
const bindingTokenAtFetch = actionQueryCacheBindingToken;
|
|
802
845
|
assertActionCircuitClosed(key);
|
|
803
846
|
let browserPersist = false;
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
847
|
+
let result;
|
|
848
|
+
try {
|
|
849
|
+
result = await actionFetch(actionName, "GET", params, {
|
|
850
|
+
signal,
|
|
851
|
+
onResponse: (response) => {
|
|
852
|
+
browserPersist =
|
|
853
|
+
response.headers.get(ACTION_BROWSER_PERSIST_HEADER) ===
|
|
854
|
+
ACTION_BROWSER_PERSIST_ALLOW;
|
|
855
|
+
},
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
catch (error) {
|
|
859
|
+
const status = actionErrorStatus(error);
|
|
860
|
+
if (!signal.aborted &&
|
|
861
|
+
(status === 401 || status === 403 || status === 404)) {
|
|
862
|
+
if (query) {
|
|
863
|
+
setAccessDeniedActionQueryBinding(query, bindingTokenAtFetch);
|
|
864
|
+
revokeBrowserPersistableActionQuery(query);
|
|
865
|
+
query.setState({ data: undefined, dataUpdatedAt: 0 });
|
|
866
|
+
}
|
|
867
|
+
revokeActionQueryCacheForClient(client, bindingTokenAtFetch);
|
|
868
|
+
}
|
|
869
|
+
throw error;
|
|
870
|
+
}
|
|
812
871
|
resetActionFailureCircuit(key);
|
|
813
872
|
if (query && !signal.aborted) {
|
|
814
|
-
|
|
873
|
+
clearAccessDeniedActionQueryBinding(query);
|
|
874
|
+
if (browserPersist) {
|
|
815
875
|
browserPersistableActionQueries.add(query);
|
|
816
|
-
|
|
817
|
-
|
|
876
|
+
if (bindingTokenAtFetch !== undefined &&
|
|
877
|
+
actionQueryCacheBindingToken === bindingTokenAtFetch) {
|
|
878
|
+
browserPersistableActionQueryBindings.set(query, bindingTokenAtFetch);
|
|
879
|
+
}
|
|
880
|
+
else {
|
|
881
|
+
browserPersistableActionQueryBindings.delete(query);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
revokeBrowserPersistableActionQuery(query);
|
|
886
|
+
}
|
|
818
887
|
}
|
|
819
888
|
return result;
|
|
820
889
|
},
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
|
-
import { useLocation, useNavigate } from "react-router";
|
|
2
|
+
import { useHref, useLocation, useNavigate } from "react-router";
|
|
3
3
|
import { buildSettingsRoute, STANDARD_APP_ROUTES, } from "../navigation/index.js";
|
|
4
4
|
import { appPath } from "./api-path.js";
|
|
5
|
+
import { rememberRouteChunkRecoveryNavigation } from "./route-chunk-recovery.js";
|
|
5
6
|
/** Dispatched on `window` to open Settings; `detail.page` names a page id. */
|
|
6
7
|
export const OPEN_SETTINGS_PAGE_EVENT = "agent-native:open-settings-page";
|
|
7
8
|
/** The page ⌘, opens. Legacy ids resolve through the settings redirect table. */
|
|
@@ -46,13 +47,17 @@ export function openSettingsPage(page) {
|
|
|
46
47
|
export function useSettingsShortcut({ enabled = true, } = {}) {
|
|
47
48
|
const navigate = useNavigate();
|
|
48
49
|
const { pathname } = useLocation();
|
|
50
|
+
const routerRootHref = useHref("/");
|
|
49
51
|
useEffect(() => {
|
|
50
52
|
if (!enabled)
|
|
51
53
|
return;
|
|
52
54
|
const open = (page) => {
|
|
53
55
|
if (!page && isSettingsRoutePath(pathname))
|
|
54
56
|
return;
|
|
55
|
-
|
|
57
|
+
const target = settingsPagePath(page);
|
|
58
|
+
const basePath = new URL(routerRootHref, window.location.href).pathname.replace(/\/+$/, "");
|
|
59
|
+
rememberRouteChunkRecoveryNavigation(`${basePath}${target}`);
|
|
60
|
+
void navigate(target);
|
|
56
61
|
};
|
|
57
62
|
const handleKeyDown = (event) => {
|
|
58
63
|
// A second mounted instance has already claimed this press.
|
|
@@ -78,7 +83,7 @@ export function useSettingsShortcut({ enabled = true, } = {}) {
|
|
|
78
83
|
window.removeEventListener("keydown", handleKeyDown, true);
|
|
79
84
|
window.removeEventListener(OPEN_SETTINGS_PAGE_EVENT, handleOpenRequest);
|
|
80
85
|
};
|
|
81
|
-
}, [enabled, navigate, pathname]);
|
|
86
|
+
}, [enabled, navigate, pathname, routerRootHref]);
|
|
82
87
|
}
|
|
83
88
|
/** Mount point for `useSettingsShortcut`; must render inside a router. */
|
|
84
89
|
export function SettingsShortcut() {
|
|
@@ -38,19 +38,19 @@ export declare const postAwareness: import("h3").EventHandlerWithFetch<import("h
|
|
|
38
38
|
error: string;
|
|
39
39
|
states?: undefined;
|
|
40
40
|
} | {
|
|
41
|
-
error?: undefined;
|
|
42
41
|
states: {
|
|
43
42
|
clientId: number;
|
|
44
43
|
state: string;
|
|
45
44
|
}[];
|
|
45
|
+
error?: undefined;
|
|
46
46
|
}>>;
|
|
47
47
|
export declare const getActiveUsers: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
48
48
|
error: string;
|
|
49
49
|
users?: undefined;
|
|
50
50
|
} | {
|
|
51
|
-
error?: undefined;
|
|
52
51
|
users: {
|
|
53
52
|
clientId: number;
|
|
54
53
|
lastSeen: number;
|
|
55
54
|
}[];
|
|
55
|
+
error?: undefined;
|
|
56
56
|
}>>;
|
package/dist/collab/routes.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export declare const getCollabState: import("h3").EventHandlerWithFetch<import("
|
|
|
13
13
|
};
|
|
14
14
|
}>>;
|
|
15
15
|
export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
16
|
-
ok?: undefined;
|
|
17
16
|
error: string;
|
|
17
|
+
ok?: undefined;
|
|
18
18
|
} | {
|
|
19
19
|
error?: undefined;
|
|
20
20
|
ok: boolean;
|
|
@@ -334,18 +334,24 @@ export function createFetchToolEntry(opts = {}) {
|
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
336
|
let body;
|
|
337
|
+
let bodyResult;
|
|
337
338
|
try {
|
|
338
339
|
const readLimit = saveToFilePath
|
|
339
340
|
? 20 * 1024 * 1024
|
|
340
341
|
: MAX_EXTENSION_PROXY_RESPONSE_SIZE;
|
|
341
|
-
|
|
342
|
-
body = result.text;
|
|
342
|
+
bodyResult = await readResponseTextWithLimit(response, readLimit);
|
|
343
343
|
}
|
|
344
344
|
catch {
|
|
345
345
|
fail("(could not read response body)", {
|
|
346
346
|
errorCode: httpErrorCode ?? "web_request_body_unreadable",
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
|
+
if (bodyResult.truncated) {
|
|
350
|
+
fail(`HTTP ${response.status} ${response.statusText}\n\n${bodyResult.text}`, {
|
|
351
|
+
errorCode: httpErrorCode ?? "web_request_response_too_large",
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
body = bodyResult.text;
|
|
349
355
|
body = redactString(body, secretValues);
|
|
350
356
|
if (response.ok) {
|
|
351
357
|
const { providerApiResponseOutcomeForUrl } = await import("../provider-api/index.js");
|
|
@@ -655,13 +655,17 @@ async function handleProxy(event, userEmail) {
|
|
|
655
655
|
},
|
|
656
656
|
};
|
|
657
657
|
}
|
|
658
|
-
const
|
|
658
|
+
const responseText = await readResponseTextWithLimit(response);
|
|
659
|
+
if (responseText.truncated) {
|
|
660
|
+
setResponseStatus(event, 502);
|
|
661
|
+
return { error: responseText.text };
|
|
662
|
+
}
|
|
659
663
|
let responseBody;
|
|
660
664
|
try {
|
|
661
|
-
responseBody = JSON.parse(text);
|
|
665
|
+
responseBody = JSON.parse(responseText.text);
|
|
662
666
|
}
|
|
663
667
|
catch {
|
|
664
|
-
responseBody = text;
|
|
668
|
+
responseBody = responseText.text;
|
|
665
669
|
}
|
|
666
670
|
return {
|
|
667
671
|
status: response.status,
|
|
@@ -67,8 +67,9 @@ export async function processWebContent(options) {
|
|
|
67
67
|
const search = options.search ?? null;
|
|
68
68
|
const html = isHtmlResponse(contentType, options.body);
|
|
69
69
|
const mode = resolveMode(requestedMode, html, search);
|
|
70
|
+
const emptyHtmlBody = html && !options.body.trim();
|
|
70
71
|
const maxChars = normalizeBoundedNumber(options.maxChars, DEFAULT_MAX_CONTENT_CHARS, 1, 200_000);
|
|
71
|
-
const extracted = html && (mode !== "raw" || hasWebContentSearch(search))
|
|
72
|
+
const extracted = html && !emptyHtmlBody && (mode !== "raw" || hasWebContentSearch(search))
|
|
72
73
|
? await extractHtml(options.body, options.url, extract, mode === "markdown" || mode === "matches")
|
|
73
74
|
: null;
|
|
74
75
|
const baseContent = contentForMode(mode, options.body, extracted);
|
|
@@ -78,6 +79,17 @@ export async function processWebContent(options) {
|
|
|
78
79
|
contentType,
|
|
79
80
|
...metadataFromExtraction(extracted),
|
|
80
81
|
};
|
|
82
|
+
if (emptyHtmlBody &&
|
|
83
|
+
mode !== "raw" &&
|
|
84
|
+
mode !== "links" &&
|
|
85
|
+
mode !== "metadata" &&
|
|
86
|
+
mode !== "matches") {
|
|
87
|
+
result.content = "(empty response body)";
|
|
88
|
+
result.truncated = false;
|
|
89
|
+
if (options.includeLinks)
|
|
90
|
+
result.links = [];
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
81
93
|
if (mode === "links") {
|
|
82
94
|
result.links = extracted?.links ?? [];
|
|
83
95
|
return result;
|
|
@@ -317,7 +329,10 @@ function removeNonContentNodes(document) {
|
|
|
317
329
|
}
|
|
318
330
|
}
|
|
319
331
|
function parseFullDocument(html, parseDocument) {
|
|
320
|
-
|
|
332
|
+
const document = parseDocument(html);
|
|
333
|
+
return document.documentElement
|
|
334
|
+
? document
|
|
335
|
+
: parseHtmlFragment(html, parseDocument);
|
|
321
336
|
}
|
|
322
337
|
function parseHtmlFragment(html, parseDocument) {
|
|
323
338
|
return parseDocument(`<!doctype html><html><head></head><body>${html}</body></html>`);
|
|
@@ -11,9 +11,9 @@ declare const _default: import("../../action.js").ActionDefinition<{
|
|
|
11
11
|
enabled?: undefined;
|
|
12
12
|
nextRun?: undefined;
|
|
13
13
|
} | {
|
|
14
|
-
deleted?: undefined;
|
|
15
14
|
name: string;
|
|
16
15
|
enabled: boolean;
|
|
17
16
|
nextRun: string;
|
|
17
|
+
deleted?: undefined;
|
|
18
18
|
}>;
|
|
19
19
|
export default _default;
|
package/dist/mcp/build-server.js
CHANGED
|
@@ -1171,6 +1171,11 @@ function mcpDirectoryWidgetSessionTool(config) {
|
|
|
1171
1171
|
},
|
|
1172
1172
|
required: ["sourceTicket"],
|
|
1173
1173
|
},
|
|
1174
|
+
annotations: {
|
|
1175
|
+
readOnlyHint: false,
|
|
1176
|
+
destructiveHint: false,
|
|
1177
|
+
openWorldHint: false,
|
|
1178
|
+
},
|
|
1174
1179
|
_meta: { ui: { visibility: ["app"] } },
|
|
1175
1180
|
};
|
|
1176
1181
|
}
|
|
@@ -33,26 +33,26 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
33
33
|
spans?: undefined;
|
|
34
34
|
ok?: undefined;
|
|
35
35
|
} | {
|
|
36
|
+
error?: undefined;
|
|
36
37
|
message?: undefined;
|
|
37
38
|
summary: import("./types.js").TraceSummary;
|
|
38
39
|
spans: import("./types.js").TraceSpan[];
|
|
39
|
-
error?: undefined;
|
|
40
40
|
ok?: undefined;
|
|
41
41
|
} | {
|
|
42
|
+
error?: undefined;
|
|
42
43
|
message?: undefined;
|
|
43
44
|
summary?: undefined;
|
|
44
45
|
spans?: undefined;
|
|
45
46
|
traceMissing: true;
|
|
46
47
|
id: string;
|
|
47
|
-
error?: undefined;
|
|
48
48
|
ok?: undefined;
|
|
49
49
|
} | {
|
|
50
|
+
error?: undefined;
|
|
50
51
|
message?: undefined;
|
|
51
52
|
summary?: undefined;
|
|
52
53
|
spans?: undefined;
|
|
53
54
|
traceMissing?: undefined;
|
|
54
55
|
id: string;
|
|
55
|
-
error?: undefined;
|
|
56
56
|
ok?: undefined;
|
|
57
57
|
} | {
|
|
58
58
|
message?: undefined;
|
|
@@ -61,9 +61,9 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
|
|
|
61
61
|
error: any;
|
|
62
62
|
ok?: undefined;
|
|
63
63
|
} | {
|
|
64
|
+
error?: undefined;
|
|
64
65
|
message?: undefined;
|
|
65
66
|
summary?: undefined;
|
|
66
67
|
spans?: undefined;
|
|
67
|
-
error?: undefined;
|
|
68
68
|
ok: boolean;
|
|
69
69
|
}>>;
|
|
@@ -39,8 +39,8 @@ export declare function handleUpdateResource(event: any): Promise<import("./stor
|
|
|
39
39
|
error: string;
|
|
40
40
|
}>;
|
|
41
41
|
export declare function handleDeleteResource(event: any): Promise<{
|
|
42
|
-
error: string;
|
|
43
42
|
ok?: undefined;
|
|
43
|
+
error: string;
|
|
44
44
|
} | {
|
|
45
45
|
error?: undefined;
|
|
46
46
|
ok: boolean;
|
package/dist/secrets/routes.d.ts
CHANGED
|
@@ -58,20 +58,20 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
|
|
|
58
58
|
error: string;
|
|
59
59
|
errorCode?: undefined;
|
|
60
60
|
retryable?: undefined;
|
|
61
|
-
status?: undefined;
|
|
62
61
|
ok?: undefined;
|
|
62
|
+
status?: undefined;
|
|
63
63
|
} | {
|
|
64
64
|
error: string;
|
|
65
65
|
errorCode: string;
|
|
66
66
|
retryable?: undefined;
|
|
67
|
-
status?: undefined;
|
|
68
67
|
ok?: undefined;
|
|
68
|
+
status?: undefined;
|
|
69
69
|
} | {
|
|
70
70
|
error: string;
|
|
71
71
|
errorCode: string;
|
|
72
72
|
retryable: boolean;
|
|
73
|
-
status?: undefined;
|
|
74
73
|
ok?: undefined;
|
|
74
|
+
status?: undefined;
|
|
75
75
|
} | {
|
|
76
76
|
error?: undefined;
|
|
77
77
|
errorCode?: undefined;
|
|
@@ -79,18 +79,18 @@ export declare function createWriteSecretHandler(): import("h3").EventHandlerWit
|
|
|
79
79
|
ok: boolean;
|
|
80
80
|
status: string;
|
|
81
81
|
} | {
|
|
82
|
+
ok?: undefined;
|
|
82
83
|
error: string;
|
|
83
84
|
removed?: undefined;
|
|
84
|
-
ok?: undefined;
|
|
85
85
|
} | {
|
|
86
86
|
error?: undefined;
|
|
87
87
|
ok: boolean;
|
|
88
88
|
removed: boolean;
|
|
89
89
|
}>>;
|
|
90
90
|
export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
91
|
+
ok?: undefined;
|
|
91
92
|
error: string;
|
|
92
93
|
note?: undefined;
|
|
93
|
-
ok?: undefined;
|
|
94
94
|
} | {
|
|
95
95
|
error?: undefined;
|
|
96
96
|
ok: boolean;
|
|
@@ -66,6 +66,7 @@ export declare function createAgentEngineApiKeyHandler(): import("h3").EventHand
|
|
|
66
66
|
error: any;
|
|
67
67
|
code: any;
|
|
68
68
|
} | {
|
|
69
|
+
error?: undefined;
|
|
69
70
|
errorCode?: undefined;
|
|
70
71
|
code?: undefined;
|
|
71
72
|
ok: boolean;
|
|
@@ -73,6 +74,5 @@ export declare function createAgentEngineApiKeyHandler(): import("h3").EventHand
|
|
|
73
74
|
baseUrlKey?: string;
|
|
74
75
|
scope: AgentEngineApiKeyScope;
|
|
75
76
|
defaultModel?: import("./agent-engine-default-model-route.js").SavedKeyDefaultModelOutcome;
|
|
76
|
-
error?: undefined;
|
|
77
77
|
}>>;
|
|
78
78
|
export {};
|
|
@@ -9,16 +9,16 @@ export declare const AGENT_ENGINE_API_KEY_ACTION_NAME = "agent-engine-api-key";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare function createAgentEngineDisconnectHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
11
11
|
error: string;
|
|
12
|
-
ok?: undefined;
|
|
13
12
|
scope?: undefined;
|
|
13
|
+
ok?: undefined;
|
|
14
14
|
} | {
|
|
15
15
|
ok: boolean;
|
|
16
16
|
error: any;
|
|
17
17
|
scope?: undefined;
|
|
18
18
|
} | {
|
|
19
|
-
error?: undefined;
|
|
20
19
|
ok: boolean;
|
|
21
20
|
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;
|
|
57
58
|
token: string;
|
|
58
59
|
expiresAt: string;
|
|
59
60
|
ttlSeconds: number;
|
|
60
|
-
error?: undefined;
|
|
61
61
|
}>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const LOCALHOST_BRIDGE_OPERATION_CAPABILITY_FIELD = "bridgeOperationCapability";
|
|
2
|
+
export interface IssueLocalhostBridgeOperationCapabilityOptions {
|
|
3
|
+
bridgeToken: string;
|
|
4
|
+
audience: string;
|
|
5
|
+
operation: string;
|
|
6
|
+
body: Record<string, unknown>;
|
|
7
|
+
issuedAt?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface VerifyLocalhostBridgeOperationCapabilityOptions {
|
|
10
|
+
bridgeToken: string;
|
|
11
|
+
audience: string;
|
|
12
|
+
operation: string;
|
|
13
|
+
body: Record<string, unknown>;
|
|
14
|
+
capability: string;
|
|
15
|
+
now?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function createLocalhostBridgeAudience(rootPath: string): string;
|
|
18
|
+
export declare function issueLocalhostBridgeOperationCapability({ bridgeToken, audience, operation, body, issuedAt, }: IssueLocalhostBridgeOperationCapabilityOptions): {
|
|
19
|
+
capability: string;
|
|
20
|
+
nonce: string;
|
|
21
|
+
expiresAt: number;
|
|
22
|
+
};
|
|
23
|
+
export declare function verifyLocalhostBridgeOperationCapability({ bridgeToken, audience, operation, body, capability, now, }: VerifyLocalhostBridgeOperationCapabilityOptions): {
|
|
24
|
+
nonce: string;
|
|
25
|
+
expiresAt: number;
|
|
26
|
+
} | null;
|