@agent-native/core 0.217.0 → 0.219.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.
@@ -50,7 +50,7 @@ export declare function verifyA2AToken(token: string, event?: any, audienceOptio
50
50
  allowAnthropicManagedContinuation?: boolean;
51
51
  requireAudience?: boolean;
52
52
  }): Promise<A2ATokenPayload>;
53
- export type A2ATokenFailureCause = "malformed" | "secret-missing" | "audience-unresolvable" | "audience" | "issuer" | "expired" | "signature" | "invalid-claims" | "mcp-credential" | "missing-subject" | "org-binding" | "org-lookup-failed" | "undetermined";
53
+ export type A2ATokenFailureCause = "malformed" | "secret-missing" | "audience-unresolvable" | "audience" | "issuer" | "expired" | "signature" | "algorithm" | "invalid-claims" | "mcp-credential" | "missing-subject" | "org-binding" | "org-lookup-failed" | "undetermined";
54
54
  /**
55
55
  * Names why a token that `verifyA2AToken` resolved no identity for was
56
56
  * refused. `verifyA2AToken` collapses a wrong audience, a wrong secret and an
@@ -21,6 +21,7 @@ import { hasConfiguredA2ASecret, isA2AProductionRuntime, } from "./auth-policy.j
21
21
  import { handleJsonRpcH3, processA2ATaskFromQueue } from "./handlers.js";
22
22
  import { A2A_ORG_MEMBER_DELEGATION_TYPE, organizationPrincipalClaims, verifyA2AOrganizationIdentity, } from "./organization-identity.js";
23
23
  import { claimA2AApproval, a2aTaskLeaseThreadId, getA2AApprovalForOwner, settleA2AApproval, } from "./task-store.js";
24
+ const A2A_TOKEN_ALGORITHMS = ["HS256"];
24
25
  let _warnedUnauthA2A = false;
25
26
  function warnA2AUnauthOnce() {
26
27
  if (_warnedUnauthA2A)
@@ -196,6 +197,8 @@ async function checkAgainstSecret(token, secret, options) {
196
197
  }
197
198
  catch (error) {
198
199
  const { code, claim } = error;
200
+ if (code === "ERR_JOSE_ALG_NOT_ALLOWED")
201
+ return { cause: "algorithm" };
199
202
  if (code === "ERR_JWT_EXPIRED")
200
203
  return { cause: "expired" };
201
204
  if (code === "ERR_JWS_SIGNATURE_VERIFICATION_FAILED") {
@@ -243,7 +246,7 @@ export async function diagnoseA2ATokenFailure(token, event) {
243
246
  return "malformed";
244
247
  }
245
248
  const secret = readDeployCredentialEnv("A2A_SECRET")?.trim();
246
- const options = {};
249
+ const options = { algorithms: A2A_TOKEN_ALGORITHMS };
247
250
  if (typeof claims.aud !== "undefined") {
248
251
  const audience = expectedJwtAudience(event);
249
252
  if (!audience)
@@ -331,7 +334,9 @@ async function verifyA2ATokenInternal(token, event, audienceOptions) {
331
334
  if (audienceOptions?.requireAudience && !hasAudience) {
332
335
  return { payload: { email: null, orgDomain: null } };
333
336
  }
334
- const verifyOptions = {};
337
+ const verifyOptions = {
338
+ algorithms: A2A_TOKEN_ALGORITHMS,
339
+ };
335
340
  if (hasAudience) {
336
341
  // Fail closed: the token was minted for a specific audience, but this
337
342
  // receiver can't derive its own expected audience (no APP_URL/URL and no
@@ -424,10 +429,7 @@ async function verifyA2ATokenInternal(token, event, audienceOptions) {
424
429
  }
425
430
  if (!organization)
426
431
  return { payload: { email: null, orgDomain: null } };
427
- const orgVerifyOptions = unverifiedPayload?.typ === A2A_ORG_MEMBER_DELEGATION_TYPE
428
- ? { ...verifyOptions, algorithms: ["HS256"] }
429
- : verifyOptions;
430
- const payload = await verifyJwtWithSecret(token, organization.secret, orgVerifyOptions);
432
+ const payload = await verifyJwtWithSecret(token, organization.secret, verifyOptions);
431
433
  if (!payload)
432
434
  return { payload: { email: null, orgDomain: null } };
433
435
  const claims = organizationPrincipalClaims(payload, organization);
@@ -1205,6 +1205,9 @@ export function startRun(runId, threadId, runFn, onComplete, options) {
1205
1205
  };
1206
1206
  let lastAbortCheck = Date.now() - 3000;
1207
1207
  let consecutiveAbortCheckFailures = 0;
1208
+ let completionInProgress = false;
1209
+ let ownTerminalStatusEstablished = false;
1210
+ let terminalStatusWrite = null;
1208
1211
  const checkSqlAbort = () => {
1209
1212
  const now = Date.now();
1210
1213
  if (now - lastAbortCheck < 3000)
@@ -1216,9 +1219,16 @@ export function startRun(runId, threadId, runFn, onComplete, options) {
1216
1219
  abortInMemoryRun(run, state.reason ?? "user");
1217
1220
  return;
1218
1221
  }
1219
- if (!abort.signal.aborted) {
1222
+ if (!abort.signal.aborted && !ownTerminalStatusEstablished) {
1220
1223
  const status = await getRunStatus(runId);
1221
1224
  if (status !== null && status !== "running") {
1225
+ const pendingStatusWrite = terminalStatusWrite;
1226
+ if (pendingStatusWrite)
1227
+ await pendingStatusWrite;
1228
+ }
1229
+ if (status !== null &&
1230
+ status !== "running" &&
1231
+ !ownTerminalStatusEstablished) {
1222
1232
  abortInMemoryRun(run, "displaced");
1223
1233
  }
1224
1234
  }
@@ -1249,7 +1259,6 @@ export function startRun(runId, threadId, runFn, onComplete, options) {
1249
1259
  };
1250
1260
  let consecutiveHeartbeatFailures = 0;
1251
1261
  let heartbeatInFlight = false;
1252
- let completionInProgress = false;
1253
1262
  const heartbeatTimer = setInterval(() => {
1254
1263
  if (!heartbeatInFlight) {
1255
1264
  heartbeatInFlight = true;
@@ -1748,11 +1757,26 @@ export function startRun(runId, threadId, runFn, onComplete, options) {
1748
1757
  const persistTerminalStatus = () => Object.keys(terminalStatusOptions).length === 0
1749
1758
  ? updateRunStatusIfRunning(runId, persistedStatus)
1750
1759
  : updateRunStatusIfRunning(runId, persistedStatus, terminalStatusOptions);
1751
- const reconcileTerminalRun = () => threadProjectionPending
1760
+ const persistOwnTerminalState = async (persist) => {
1761
+ const write = withWorkerFence(persist);
1762
+ terminalStatusWrite = write;
1763
+ try {
1764
+ const established = await write;
1765
+ if (established)
1766
+ ownTerminalStatusEstablished = true;
1767
+ return established;
1768
+ }
1769
+ finally {
1770
+ if (terminalStatusWrite === write)
1771
+ terminalStatusWrite = null;
1772
+ }
1773
+ };
1774
+ const persistOwnTerminalStatus = () => persistOwnTerminalState(persistTerminalStatus);
1775
+ const reconcileTerminalRun = () => persistOwnTerminalState(() => threadProjectionPending
1752
1776
  ? reconcileTerminalRunFromEvents(runId, {
1753
1777
  threadProjectionPending: true,
1754
1778
  })
1755
- : reconcileTerminalRunFromEvents(runId);
1779
+ : reconcileTerminalRunFromEvents(runId));
1756
1780
  const reportTerminalStatusPersistenceError = (error) => {
1757
1781
  captureError(error, {
1758
1782
  route: "/_agent-native/agent-chat",
@@ -1795,9 +1819,10 @@ export function startRun(runId, threadId, runFn, onComplete, options) {
1795
1819
  else {
1796
1820
  try {
1797
1821
  await insertRunPromise;
1798
- continuationStatusPersistedBeforeEvent = await withWorkerFence(persistTerminalStatus);
1822
+ continuationStatusPersistedBeforeEvent =
1823
+ await persistOwnTerminalStatus();
1799
1824
  if (!continuationStatusPersistedBeforeEvent) {
1800
- await withWorkerFence(reconcileTerminalRun);
1825
+ await reconcileTerminalRun();
1801
1826
  const persistedRun = await getRunById(runId);
1802
1827
  continuationStatusPersistedBeforeEvent =
1803
1828
  persistedRun?.status === "truncated" &&
@@ -1875,7 +1900,7 @@ export function startRun(runId, threadId, runFn, onComplete, options) {
1875
1900
  : await withWorkerFence(persistAtomicAbort);
1876
1901
  terminalPersistenceEstablished = aborted
1877
1902
  ? true
1878
- : await withWorkerFence(reconcileTerminalRun);
1903
+ : await reconcileTerminalRun();
1879
1904
  }
1880
1905
  catch (error) {
1881
1906
  terminalPersistenceEstablished = false;
@@ -1893,7 +1918,7 @@ export function startRun(runId, threadId, runFn, onComplete, options) {
1893
1918
  (!terminalPersistenceError || eventPersistenceError)) {
1894
1919
  let statusUpdated = false;
1895
1920
  try {
1896
- statusUpdated = await withWorkerFence(persistTerminalStatus);
1921
+ statusUpdated = await persistOwnTerminalStatus();
1897
1922
  }
1898
1923
  catch (error) {
1899
1924
  reportTerminalStatusPersistenceError(error);
@@ -1905,8 +1930,7 @@ export function startRun(runId, threadId, runFn, onComplete, options) {
1905
1930
  terminalPersistenceEstablished = !terminalPersistenceError;
1906
1931
  }
1907
1932
  else {
1908
- terminalPersistenceEstablished =
1909
- await withWorkerFence(reconcileTerminalRun);
1933
+ terminalPersistenceEstablished = await reconcileTerminalRun();
1910
1934
  }
1911
1935
  }
1912
1936
  }
@@ -1957,7 +1981,7 @@ export function startRun(runId, threadId, runFn, onComplete, options) {
1957
1981
  if (terminalPersistenceError) {
1958
1982
  const reconciled = eventPersistenceError
1959
1983
  ? false
1960
- : await withWorkerFence(reconcileTerminalRun);
1984
+ : await reconcileTerminalRun();
1961
1985
  if (!reconciled)
1962
1986
  throw terminalPersistenceError;
1963
1987
  terminalPersistenceEstablished = true;
@@ -19,7 +19,7 @@ export { AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, initiali
19
19
  export { buildDynamicAgentSuggestions, dedupeSuggestions, mergeAgentSuggestions, normalizeAgentDynamicSuggestionsConfig, useAgentDynamicSuggestions, useAgentDynamicSuggestionsResult, type AgentDynamicSuggestionContext, type AgentDynamicSuggestionsConfig, type AgentDynamicSuggestionsOption, } from "../dynamic-suggestions.js";
20
20
  export { clearChatStorage } from "../chat/storage.js";
21
21
  export { isAssistantChatHistoryVersion, coerceAssistantChatHistoryDate, type AssistantChatHistoryDate, type AssistantChatHistoryVersion, } from "../chat/assistant-chat-history-version.js";
22
- export { ChatThreadListConfigError, useChatThreadList, type UseChatThreadListOptions, type UseChatThreadListResult, } from "../use-chat-thread-list.js";
22
+ export { ChatThreadListConfigError, useChatThreadList, type UseChatThreadListOptions, type UseChatThreadListResult, type ChatThreadListRefreshOutcome, } from "../use-chat-thread-list.js";
23
23
  export { ChatThreadListError, fetchChatThreadListPage, notifyChatThreadsUpdated, useChatThreads, type ChatThreadAccessBasis, type ChatThreadListPage, type ChatThreadListRow, type ChatThreadListPageRequest, type ChatThreadOwnership, type ChatThreadVisibility, type ChatThreadScope, type ChatThreadSnapshot, type ChatThreadSummary, type ChatThreadData, type ChatThreadShareLink, type ChatThreadShareState, type UseChatThreadsOptions, } from "../use-chat-threads.js";
24
24
  export { type AgentCallProgress, type ContentPart, } from "../sse-event-processor.js";
25
25
  export { useRunStuckDetection, useAbortRun, type RunStuckState, type UseRunStuckDetectionOptions, } from "../use-run-stuck-detection.js";
@@ -4,8 +4,28 @@ import { ROUTE_WARMUP_PRELOAD_ATTRIBUTE } from "../shared/route-chunk-recovery-b
4
4
  import { mergeAgentNativeRouteWarmupConfig, } from "../shared/route-warmup-config.js";
5
5
  import { isServerRoutePath } from "./api-path.js";
6
6
  const PREFETCH_ATTR = "data-an-prefetch";
7
+ // WebKit checks once, 3 seconds after the window's load event, for link
8
+ // preloads nothing has used yet, and logs "was preloaded using link preload but
9
+ // not used within a few seconds" for each one. Warmed route modules are for
10
+ // later navigations, so their modulepreload links wait until that check has
11
+ // run. Until then the module files are fetched into the HTTP cache instead:
12
+ // built assets are immutable, so an early click still skips the network, and
13
+ // WebKit only reports link preloads. Data warmup is a plain fetch and starts
14
+ // right away.
15
+ // A third-party script that never finishes can hold the load event back
16
+ // indefinitely. The hold lasts as long, since preloads added before a late load
17
+ // event would still be reported; the HTTP cache and intent preloads cover clicks
18
+ // meanwhile.
19
+ const MODULE_WARMUP_DELAY_AFTER_LOAD_MS = 4_000;
7
20
  const warmedDataRoutes = new Set();
8
21
  const warmedRouteAssets = new Set();
22
+ const fetchedRouteAssets = new Set();
23
+ // A later scan retries a failed fetch, at most twice and no sooner than 5
24
+ // seconds after the last failure, so page updates during an outage don't set
25
+ // the request rate.
26
+ const ROUTE_ASSET_FETCH_ATTEMPTS = 3;
27
+ const ROUTE_ASSET_RETRY_DELAY_MS = 5_000;
28
+ const failedRouteAssetFetches = new Map();
9
29
  let cachedManifest;
10
30
  let cachedManifestRoutesSignature = "";
11
31
  let cachedManifestRouteTree = [];
@@ -305,6 +325,62 @@ function warmRouteAssetsForHref(href) {
305
325
  document.head.appendChild(link);
306
326
  }
307
327
  }
328
+ function fetchRouteAssetsForHref(href) {
329
+ for (const assetUrl of routeAssetUrlsForHref(href)) {
330
+ if (warmedRouteAssets.has(assetUrl) || fetchedRouteAssets.has(assetUrl)) {
331
+ continue;
332
+ }
333
+ const failed = failedRouteAssetFetches.get(assetUrl);
334
+ if (failed &&
335
+ (failed.attempts >= ROUTE_ASSET_FETCH_ATTEMPTS ||
336
+ Date.now() < failed.retryAt)) {
337
+ continue;
338
+ }
339
+ fetchedRouteAssets.add(assetUrl);
340
+ const onFailure = () => {
341
+ fetchedRouteAssets.delete(assetUrl);
342
+ failedRouteAssetFetches.set(assetUrl, {
343
+ attempts: (failed?.attempts ?? 0) + 1,
344
+ retryAt: Date.now() + ROUTE_ASSET_RETRY_DELAY_MS,
345
+ });
346
+ };
347
+ window
348
+ .fetch(assetUrl, { credentials: "same-origin", priority: "low" })
349
+ .then((response) => {
350
+ if (response.ok) {
351
+ failedRouteAssetFetches.delete(assetUrl);
352
+ return response.arrayBuffer();
353
+ }
354
+ onFailure();
355
+ })
356
+ .catch(onFailure);
357
+ }
358
+ }
359
+ function msSinceLoadEventEnd() {
360
+ const [entry] = performance.getEntriesByType?.("navigation") ?? [];
361
+ const loadEventEnd = entry
362
+ ?.loadEventEnd;
363
+ return loadEventEnd ? Math.max(0, performance.now() - loadEventEnd) : 0;
364
+ }
365
+ function afterUnusedPreloadCheck(callback) {
366
+ let timer;
367
+ const startTimer = () => {
368
+ if (timer !== undefined)
369
+ window.clearTimeout(timer);
370
+ timer = window.setTimeout(callback, Math.max(0, MODULE_WARMUP_DELAY_AFTER_LOAD_MS - msSinceLoadEventEnd()));
371
+ };
372
+ if (document.readyState === "complete") {
373
+ startTimer();
374
+ }
375
+ else {
376
+ window.addEventListener("load", startTimer, { once: true });
377
+ }
378
+ return () => {
379
+ window.removeEventListener("load", startTimer);
380
+ if (timer !== undefined)
381
+ window.clearTimeout(timer);
382
+ };
383
+ }
308
384
  function linkWarmupMode(link, strategy) {
309
385
  const explicit = link.getAttribute(PREFETCH_ATTR)?.trim().toLowerCase();
310
386
  if (explicit === "none" || explicit === "off" || explicit === "false") {
@@ -353,6 +429,8 @@ function resetRouteWarmupCachesForTests() {
353
429
  cachedManifestRouteTree = [];
354
430
  warmedDataRoutes.clear();
355
431
  warmedRouteAssets.clear();
432
+ fetchedRouteAssets.clear();
433
+ failedRouteAssetFetches.clear();
356
434
  }
357
435
  export function AgentNativeRouteWarmup({ config, }) {
358
436
  useEffect(() => {
@@ -376,6 +454,8 @@ export function AgentNativeRouteWarmup({ config, }) {
376
454
  const dataRetryAttempts = new Map();
377
455
  const retryTimers = new Set();
378
456
  const observedLinks = new WeakSet();
457
+ const heldModuleHrefs = new Set();
458
+ let modulesHeld = warmModules;
379
459
  let active = 0;
380
460
  let stopped = false;
381
461
  let scheduleTimer;
@@ -435,9 +515,14 @@ export function AgentNativeRouteWarmup({ config, }) {
435
515
  });
436
516
  }
437
517
  };
438
- function warmHref(href) {
439
- if (warmModules)
518
+ function warmHref(href, fromIntent = false) {
519
+ if (modulesHeld && !fromIntent) {
520
+ heldModuleHrefs.add(href);
521
+ fetchRouteAssetsForHref(href);
522
+ }
523
+ else if (warmModules) {
440
524
  warmRouteAssetsForHref(href);
525
+ }
441
526
  if (!warmData)
442
527
  return;
443
528
  for (const dataUrl of dataRouteUrlsForHref(href)) {
@@ -512,8 +597,20 @@ export function AgentNativeRouteWarmup({ config, }) {
512
597
  const mode = linkWarmupMode(link, resolved.strategy);
513
598
  if (mode === "none")
514
599
  return;
515
- warmHref(link.href);
600
+ // Hover, touch and focus usually come just before a click, so they
601
+ // preload right away even during the hold: the click uses the preload
602
+ // before WebKit's check, and an early click doesn't wait for the module
603
+ // to compile.
604
+ warmHref(link.href, true);
516
605
  };
606
+ const cancelModuleHold = warmModules
607
+ ? afterUnusedPreloadCheck(() => {
608
+ modulesHeld = false;
609
+ for (const href of heldModuleHrefs)
610
+ warmRouteAssetsForHref(href);
611
+ heldModuleHrefs.clear();
612
+ })
613
+ : undefined;
517
614
  schedule();
518
615
  const observer = new MutationObserver(schedule);
519
616
  observer.observe(document.documentElement, {
@@ -533,6 +630,7 @@ export function AgentNativeRouteWarmup({ config, }) {
533
630
  document.addEventListener("focusin", warmFromIntent, true);
534
631
  return () => {
535
632
  stopped = true;
633
+ cancelModuleHold?.();
536
634
  if (scheduleTimer !== undefined)
537
635
  window.clearTimeout(scheduleTimer);
538
636
  for (const timer of retryTimers)
@@ -16,6 +16,7 @@ export interface UseChatThreadListOptions {
16
16
  refreshOnThreadUpdates?: boolean;
17
17
  apiUrl?: string;
18
18
  }
19
+ export type ChatThreadListRefreshOutcome = "success" | "error" | "superseded" | "disabled";
19
20
  export interface UseChatThreadListResult {
20
21
  threads: ChatThreadListRow[];
21
22
  /** True until the first page of the current list settles. */
@@ -27,6 +28,8 @@ export interface UseChatThreadListResult {
27
28
  hasMore: boolean;
28
29
  loadMore: () => Promise<void>;
29
30
  refresh: () => Promise<void>;
31
+ /** Reports whether this invocation applied the complete refreshed window. */
32
+ refreshWithResult: () => Promise<ChatThreadListRefreshOutcome>;
30
33
  }
31
34
  /** `pageSize` is not an integer between 1 and the server's page cap. */
32
35
  export declare class ChatThreadListConfigError extends Error {
@@ -116,7 +116,7 @@ export function useChatThreadList(options) {
116
116
  // rows and offset already on screen untouched.
117
117
  const replace = useCallback(async (window) => {
118
118
  if (!session.active)
119
- return;
119
+ return "superseded";
120
120
  const requestId = ++session.requestId;
121
121
  const isCurrent = () => session.active && requestId === session.requestId;
122
122
  session.inFlight = "replace";
@@ -131,7 +131,7 @@ export function useChatThreadList(options) {
131
131
  limit: Math.min(CHAT_THREADS_MAX_PAGE_SIZE, window - consumed),
132
132
  });
133
133
  if (!isCurrent())
134
- return;
134
+ return "superseded";
135
135
  for (const thread of page.threads) {
136
136
  if (!rows.has(thread.id))
137
137
  rows.set(thread.id, thread);
@@ -142,11 +142,13 @@ export function useChatThreadList(options) {
142
142
  session.nextOffset = consumed;
143
143
  session.hasMore = more;
144
144
  update({ threads: [...rows.values()], hasMore: more, error: null });
145
+ return "success";
145
146
  }
146
147
  catch (failure) {
147
148
  if (!isCurrent())
148
- return;
149
+ return "superseded";
149
150
  update({ error: asError(failure) });
151
+ return "error";
150
152
  }
151
153
  finally {
152
154
  if (isCurrent()) {
@@ -155,13 +157,18 @@ export function useChatThreadList(options) {
155
157
  }
156
158
  }
157
159
  }, [request, session, update]);
158
- const refresh = useCallback(async () => {
160
+ const refreshWithResult = useCallback(async () => {
161
+ if (!session.active)
162
+ return "superseded";
159
163
  if (!enabled)
160
- return;
164
+ return "disabled";
161
165
  // Reload every row already on screen so a mutation does not collapse a
162
166
  // list the person has paged through.
163
- await replace(Math.max(pageSize, session.nextOffset));
167
+ return replace(Math.max(pageSize, session.nextOffset));
164
168
  }, [enabled, pageSize, replace, session]);
169
+ const refresh = useCallback(async () => {
170
+ await refreshWithResult();
171
+ }, [refreshWithResult]);
165
172
  const loadMore = useCallback(async () => {
166
173
  if (!session.active || session.inFlight || !session.hasMore)
167
174
  return;
@@ -216,5 +223,14 @@ export function useChatThreadList(options) {
216
223
  return () => window.removeEventListener(CHAT_THREADS_UPDATED_EVENT, onUpdated);
217
224
  }, [enabled, refresh, refreshOnThreadUpdates]);
218
225
  const { threads, loading, loadingMore, error, hasMore } = state;
219
- return { threads, loading, loadingMore, error, hasMore, loadMore, refresh };
226
+ return {
227
+ threads,
228
+ loading,
229
+ loadingMore,
230
+ error,
231
+ hasMore,
232
+ loadMore,
233
+ refresh,
234
+ refreshWithResult,
235
+ };
220
236
  }
@@ -1,6 +1,6 @@
1
1
  export declare const postCollabJson: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
2
- error: string;
3
2
  ok?: undefined;
3
+ error: string;
4
4
  } | {
5
5
  error?: undefined;
6
6
  ok: boolean;
@@ -42,8 +42,8 @@ declare const _default: import("../../action.js").ActionDefinition<{
42
42
  url: string;
43
43
  id: string;
44
44
  provider: string;
45
- configured?: undefined;
46
45
  error?: undefined;
46
+ configured?: undefined;
47
47
  } | {
48
48
  url?: undefined;
49
49
  id?: undefined;
@@ -1,13 +1,13 @@
1
1
  export declare function createNotificationsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<"" | import("./types.js").Notification[] | {
2
2
  count: number;
3
3
  updated?: undefined;
4
- ok?: undefined;
5
4
  error?: undefined;
5
+ ok?: undefined;
6
6
  } | {
7
7
  count?: undefined;
8
8
  updated: number;
9
- ok?: undefined;
10
9
  error?: undefined;
10
+ ok?: undefined;
11
11
  } | {
12
12
  count?: undefined;
13
13
  updated?: undefined;
@@ -16,6 +16,6 @@ export declare function createNotificationsHandler(): import("h3").EventHandlerW
16
16
  } | {
17
17
  count?: undefined;
18
18
  updated?: undefined;
19
- ok: boolean;
20
19
  error?: undefined;
20
+ ok: boolean;
21
21
  }>>;
@@ -33,27 +33,27 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
33
33
  summary?: undefined;
34
34
  spans?: undefined;
35
35
  } | {
36
+ error?: undefined;
36
37
  ok?: undefined;
37
38
  message?: undefined;
38
39
  summary: import("./types.js").TraceSummary;
39
40
  spans: import("./types.js").TraceSpan[];
40
- error?: undefined;
41
41
  } | {
42
+ error?: undefined;
42
43
  ok?: undefined;
43
44
  message?: undefined;
44
45
  summary?: undefined;
45
46
  spans?: undefined;
46
47
  traceMissing: true;
47
48
  id: string;
48
- error?: undefined;
49
49
  } | {
50
+ error?: undefined;
50
51
  ok?: undefined;
51
52
  message?: undefined;
52
53
  summary?: undefined;
53
54
  spans?: undefined;
54
55
  traceMissing?: undefined;
55
56
  id: string;
56
- error?: undefined;
57
57
  } | {
58
58
  ok?: undefined;
59
59
  message?: undefined;
@@ -61,9 +61,9 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
61
61
  spans?: undefined;
62
62
  error: any;
63
63
  } | {
64
+ error?: undefined;
64
65
  message?: undefined;
65
66
  summary?: undefined;
66
67
  spans?: undefined;
67
68
  ok: boolean;
68
- error?: undefined;
69
69
  }>>;
@@ -2,6 +2,6 @@ export declare function createProgressHandler(): import("h3").EventHandlerWithFe
2
2
  error: string;
3
3
  ok?: undefined;
4
4
  } | {
5
- ok: boolean;
6
5
  error?: undefined;
6
+ ok: boolean;
7
7
  }>>;
@@ -8,8 +8,8 @@ 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
- error: string;
12
11
  ok?: undefined;
12
+ error: string;
13
13
  scope?: undefined;
14
14
  } | {
15
15
  ok: boolean;
@@ -1,9 +1,9 @@
1
1
  export declare function createAgentEngineOllamaModelsHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
2
2
  error: string;
3
- models?: undefined;
4
3
  ok?: undefined;
4
+ models?: undefined;
5
5
  } | {
6
+ error?: undefined;
6
7
  ok: boolean;
7
8
  models: string[];
8
- error?: undefined;
9
9
  }>>;
@@ -588,8 +588,8 @@ export declare function createPublicRemoteAgentsHandler(discover?: PublicAgentDi
588
588
  error: string;
589
589
  agents?: undefined;
590
590
  } | {
591
- agents: Omit<import("./agent-discovery.js").DiscoveredAgent, "auth" | "kind">[];
592
591
  error?: undefined;
592
+ agents: Omit<import("./agent-discovery.js").DiscoveredAgent, "auth" | "kind">[];
593
593
  }>>;
594
594
  export declare function getBuilderConnectErrorDisposition(error: unknown, connectAttemptId: string | null): "correlated" | "legacy" | null;
595
595
  export declare function getBuilderConnectErrorKey(ownerEmail: string, connectAttemptId?: string | null): string;
@@ -9,6 +9,7 @@
9
9
  "app/components/layout/AgentInspector.test.tsx",
10
10
  "app/components/layout/AgentInspector.tsx",
11
11
  "app/components/layout/Header.tsx",
12
+ "app/components/layout/Sidebar.spec.tsx",
12
13
  "app/components/layout/Sidebar.tsx",
13
14
  "app/i18n",
14
15
  "app/i18n-data.ts",