@agent-native/core 0.78.5 → 0.78.8

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.
Files changed (35) hide show
  1. package/corpus/core/CHANGELOG.md +18 -0
  2. package/corpus/core/docs/content/agent-teams.md +1 -1
  3. package/corpus/core/docs/content/locales/ar-SA/agent-teams.md +1 -1
  4. package/corpus/core/docs/content/locales/de-DE/agent-teams.md +1 -1
  5. package/corpus/core/docs/content/locales/es-ES/agent-teams.md +1 -1
  6. package/corpus/core/docs/content/locales/fr-FR/agent-teams.md +1 -1
  7. package/corpus/core/docs/content/locales/hi-IN/agent-teams.md +1 -1
  8. package/corpus/core/docs/content/locales/ja-JP/agent-teams.md +1 -1
  9. package/corpus/core/docs/content/locales/ko-KR/agent-teams.md +1 -1
  10. package/corpus/core/docs/content/locales/pt-BR/agent-teams.md +1 -1
  11. package/corpus/core/docs/content/locales/zh-CN/agent-teams.md +1 -1
  12. package/corpus/core/package.json +1 -1
  13. package/corpus/core/src/agent/production-agent.ts +97 -13
  14. package/corpus/templates/assets/actions/_helpers.ts +15 -2
  15. package/corpus/templates/assets/actions/get-library.ts +2 -2
  16. package/corpus/templates/assets/actions/view-screen.ts +98 -36
  17. package/dist/agent/production-agent.d.ts.map +1 -1
  18. package/dist/agent/production-agent.js +71 -8
  19. package/dist/agent/production-agent.js.map +1 -1
  20. package/dist/collab/routes.d.ts +1 -1
  21. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  22. package/dist/notifications/routes.d.ts +2 -2
  23. package/dist/observability/routes.d.ts +7 -7
  24. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  25. package/docs/content/agent-teams.md +1 -1
  26. package/docs/content/locales/ar-SA/agent-teams.md +1 -1
  27. package/docs/content/locales/de-DE/agent-teams.md +1 -1
  28. package/docs/content/locales/es-ES/agent-teams.md +1 -1
  29. package/docs/content/locales/fr-FR/agent-teams.md +1 -1
  30. package/docs/content/locales/hi-IN/agent-teams.md +1 -1
  31. package/docs/content/locales/ja-JP/agent-teams.md +1 -1
  32. package/docs/content/locales/ko-KR/agent-teams.md +1 -1
  33. package/docs/content/locales/pt-BR/agent-teams.md +1 -1
  34. package/docs/content/locales/zh-CN/agent-teams.md +1 -1
  35. package/package.json +1 -1
@@ -1,5 +1,23 @@
1
1
  # @agent-native/core
2
2
 
3
+ ## 0.78.8
4
+
5
+ ### Patch Changes
6
+
7
+ - fb735f3: diag(agent): add awaited phase markers (`aw_env`, `aw_presend`, `aw_actions`, `aw_owner`) across the durable background worker's post-`model_done` setup. The awaited `post_model` probe lands (writes work after model resolution), so the worker's stall is a main-flow stall, not a DB hang — these markers advance `worker_stage` to the last phase the main flow actually reached, pinpointing the stall.
8
+
9
+ ## 0.78.7
10
+
11
+ ### Patch Changes
12
+
13
+ - 61b078a: Preserve resolved user and org context when agent tool calls run actions.
14
+
15
+ ## 0.78.6
16
+
17
+ ### Patch Changes
18
+
19
+ - 81a7f90: diag(agent): add awaited `post_model_awaited` and `pre_claim` probes in the durable background worker. `worker_stage` stalls at `model_done` even though the code right after is trivial sync; these awaited (withDbTimeout-bounded) writes distinguish a hung bg-fn DB connection right after model resolution (probe never lands) from a later main-flow stall (probe lands, then the stall is downstream).
20
+
3
21
  ## 0.78.5
4
22
 
5
23
  ### Patch Changes
@@ -71,7 +71,7 @@ import { spawnTask } from "@agent-native/core/server";
71
71
 
72
72
  const task = await spawnTask({
73
73
  description: "Draft an outreach email to this lead",
74
- instructions: "Match Steve's voice from memory/MEMORY.md.",
74
+ instructions: "Match the user's voice from memory/MEMORY.md.",
75
75
  ownerEmail: user.email,
76
76
  systemPrompt: mailAgentSystemPrompt,
77
77
  actions: mailActions,
@@ -71,7 +71,7 @@ import { spawnTask } from "@agent-native/core/server";
71
71
 
72
72
  const task = await spawnTask({
73
73
  description: "Draft an outreach email to this lead",
74
- instructions: "Match Steve's voice from memory/MEMORY.md.",
74
+ instructions: "Match the user's voice from memory/MEMORY.md.",
75
75
  ownerEmail: user.email,
76
76
  systemPrompt: mailAgentSystemPrompt,
77
77
  actions: mailActions,
@@ -71,7 +71,7 @@ import { spawnTask } from "@agent-native/core/server";
71
71
 
72
72
  const task = await spawnTask({
73
73
  description: "Draft an outreach email to this lead",
74
- instructions: "Match Steve's voice from memory/MEMORY.md.",
74
+ instructions: "Match the user's voice from memory/MEMORY.md.",
75
75
  ownerEmail: user.email,
76
76
  systemPrompt: mailAgentSystemPrompt,
77
77
  actions: mailActions,
@@ -71,7 +71,7 @@ import { spawnTask } from "@agent-native/core/server";
71
71
 
72
72
  const task = await spawnTask({
73
73
  description: "Draft an outreach email to this lead",
74
- instructions: "Match Steve's voice from memory/MEMORY.md.",
74
+ instructions: "Match the user's voice from memory/MEMORY.md.",
75
75
  ownerEmail: user.email,
76
76
  systemPrompt: mailAgentSystemPrompt,
77
77
  actions: mailActions,
@@ -71,7 +71,7 @@ import { spawnTask } from "@agent-native/core/server";
71
71
 
72
72
  const task = await spawnTask({
73
73
  description: "Draft an outreach email to this lead",
74
- instructions: "Match Steve's voice from memory/MEMORY.md.",
74
+ instructions: "Match the user's voice from memory/MEMORY.md.",
75
75
  ownerEmail: user.email,
76
76
  systemPrompt: mailAgentSystemPrompt,
77
77
  actions: mailActions,
@@ -71,7 +71,7 @@ import { spawnTask } from "@agent-native/core/server";
71
71
 
72
72
  const task = await spawnTask({
73
73
  description: "Draft an outreach email to this lead",
74
- instructions: "Match Steve's voice from memory/MEMORY.md.",
74
+ instructions: "Match the user's voice from memory/MEMORY.md.",
75
75
  ownerEmail: user.email,
76
76
  systemPrompt: mailAgentSystemPrompt,
77
77
  actions: mailActions,
@@ -71,7 +71,7 @@ import { spawnTask } from "@agent-native/core/server";
71
71
 
72
72
  const task = await spawnTask({
73
73
  description: "Draft an outreach email to this lead",
74
- instructions: "Match Steve's voice from memory/MEMORY.md.",
74
+ instructions: "Match the user's voice from memory/MEMORY.md.",
75
75
  ownerEmail: user.email,
76
76
  systemPrompt: mailAgentSystemPrompt,
77
77
  actions: mailActions,
@@ -71,7 +71,7 @@ import { spawnTask } from "@agent-native/core/server";
71
71
 
72
72
  const task = await spawnTask({
73
73
  description: "Draft an outreach email to this lead",
74
- instructions: "Match Steve's voice from memory/MEMORY.md.",
74
+ instructions: "Match the user's voice from memory/MEMORY.md.",
75
75
  ownerEmail: user.email,
76
76
  systemPrompt: mailAgentSystemPrompt,
77
77
  actions: mailActions,
@@ -71,7 +71,7 @@ import { spawnTask } from "@agent-native/core/server";
71
71
 
72
72
  const task = await spawnTask({
73
73
  description: "Draft an outreach email to this lead",
74
- instructions: "Match Steve's voice from memory/MEMORY.md.",
74
+ instructions: "Match the user's voice from memory/MEMORY.md.",
75
75
  ownerEmail: user.email,
76
76
  systemPrompt: mailAgentSystemPrompt,
77
77
  actions: mailActions,
@@ -71,7 +71,7 @@ import { spawnTask } from "@agent-native/core/server";
71
71
 
72
72
  const task = await spawnTask({
73
73
  description: "Draft an outreach email to this lead",
74
- instructions: "Match Steve's voice from memory/MEMORY.md.",
74
+ instructions: "Match the user's voice from memory/MEMORY.md.",
75
75
  ownerEmail: user.email,
76
76
  systemPrompt: mailAgentSystemPrompt,
77
77
  actions: mailActions,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.78.5",
3
+ "version": "0.78.8",
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": {
@@ -33,8 +33,10 @@ import { readBody } from "../server/h3-helpers.js";
33
33
  import {
34
34
  getRequestRunContext,
35
35
  ensureRequestRunContext,
36
+ getRequestContext,
36
37
  getRequestOrgId,
37
38
  getRequestUserEmail,
39
+ runWithRequestContext,
38
40
  } from "../server/request-context.js";
39
41
  import { fireInternalDispatch } from "../server/self-dispatch.js";
40
42
  import {
@@ -3431,23 +3433,40 @@ export async function runAgentLoop(opts: {
3431
3433
  | undefined;
3432
3434
  try {
3433
3435
  const timeoutSignal = AbortSignal.timeout(toolTimeoutMs);
3436
+ const actionUserEmail = opts.ownerEmail ?? getRequestUserEmail();
3437
+ const actionOrgId = opts.orgId ?? getRequestOrgId() ?? null;
3438
+ const actionContext = {
3439
+ send,
3440
+ userEmail: actionUserEmail ?? undefined,
3441
+ orgId: actionOrgId,
3442
+ caller: "tool" as const,
3443
+ attachments: opts.attachments,
3444
+ signal,
3445
+ // Audit attribution: the action name + the agent thread/turn that
3446
+ // triggered this call, so a mutation can be traced to its run.
3447
+ actionName: toolCall.name,
3448
+ ...(opts.threadId ? { threadId: opts.threadId } : {}),
3449
+ ...(opts.turnId ? { turnId: opts.turnId } : {}),
3450
+ };
3451
+ const requestContext = getRequestContext();
3452
+ const invokeAction = () =>
3453
+ actionEntry.run(
3454
+ toolCall.input as Record<string, string>,
3455
+ actionContext,
3456
+ );
3434
3457
  // Keep a reference to the action promise so we can attach a zombie-
3435
3458
  // detection continuation AFTER Promise.race abandons it on run abort.
3436
3459
  // The promise itself is not awaited here — Promise.race owns the await.
3437
3460
  const actionPromise = Promise.resolve(
3438
- actionEntry.run(toolCall.input as Record<string, string>, {
3439
- send,
3440
- userEmail: getRequestUserEmail(),
3441
- orgId: getRequestOrgId() ?? null,
3442
- caller: "tool",
3443
- attachments: opts.attachments,
3444
- signal,
3445
- // Audit attribution: the action name + the agent thread/turn that
3446
- // triggered this call, so a mutation can be traced to its run.
3447
- actionName: toolCall.name,
3448
- ...(opts.threadId ? { threadId: opts.threadId } : {}),
3449
- ...(opts.turnId ? { turnId: opts.turnId } : {}),
3450
- }),
3461
+ runWithRequestContext(
3462
+ {
3463
+ ...(requestContext ?? {}),
3464
+ ...(actionUserEmail ? { userEmail: actionUserEmail } : {}),
3465
+ ...(actionOrgId ? { orgId: actionOrgId } : {}),
3466
+ ...(requestContext?.run ? { run: requestContext.run } : {}),
3467
+ },
3468
+ invokeAction,
3469
+ ),
3451
3470
  );
3452
3471
 
3453
3472
  // When the run is aborted (soft-timeout / user cancel) while this tool
@@ -3953,6 +3972,25 @@ export function createProductionAgentHandler(
3953
3972
  `${s}=${Date.now() - setupT0}ms`,
3954
3973
  ).catch(() => {});
3955
3974
  };
3975
+ // DIAGNOSTIC-ONLY: AWAITED worker mark. Fire-and-forget workerStep marks
3976
+ // after `post_model_ok` stopped landing even though writes still work
3977
+ // there — so the worker's MAIN FLOW stalls between post_model and pre_claim
3978
+ // (not a write hang). Awaited marks block until they land (or withDbTimeout-
3979
+ // reject), so `worker_stage` reliably advances to the last phase the main
3980
+ // flow actually reached — pinpointing the stall. Bg worker only.
3981
+ const awaitedWorkerMark = async (s: string) => {
3982
+ if (!isBackgroundWorker || !bgRunId) return;
3983
+ try {
3984
+ await recordRunDiagnostic(
3985
+ bgRunId,
3986
+ RUN_DIAG_STAGE.workerSetupStep,
3987
+ `${s}=${Date.now() - setupT0}ms`,
3988
+ );
3989
+ } catch {
3990
+ // bounded by withDbTimeout; ignore — the absence of the next mark is
3991
+ // itself the signal.
3992
+ }
3993
+ };
3956
3994
  // Whether this worker is REALLY executing inside a 15-min Netlify
3957
3995
  // `-background` function (proven by the runtime function name), not merely a
3958
3996
  // `_process-run` re-entry that may have landed on the ~60s synchronous
@@ -4184,6 +4222,28 @@ export function createProductionAgentHandler(
4184
4222
  // hang right after model resolution (DB connection); if it's
4185
4223
  // `engine_resolved`/`systemprompt_enter`, the stall is in the named step.
4186
4224
  workerStep("engine_resolved");
4225
+ // DIAGNOSTIC-ONLY: AWAITED probe (bg worker only). worker_stage stalls at
4226
+ // `model_done` even though the code right after is trivial sync — this
4227
+ // distinguishes the two causes: if `post_model_awaited` lands, DB writes
4228
+ // still work after model_done and the stall is later in the main flow; if it
4229
+ // never lands (stays `model_done`), the bg-fn DB connection itself is hung
4230
+ // right after model resolution. `recordRunDiagnostic` is `withDbTimeout`-
4231
+ // bounded, so a hung write rejects (caught) rather than blocking forever.
4232
+ if (isBackgroundWorker && bgRunId) {
4233
+ const probeStart = Date.now();
4234
+ try {
4235
+ await recordRunDiagnostic(
4236
+ bgRunId,
4237
+ RUN_DIAG_STAGE.workerSetupStep,
4238
+ "post_model_awaited",
4239
+ );
4240
+ workerStep(`post_model_ok=${Date.now() - probeStart}ms`);
4241
+ } catch (e) {
4242
+ workerStep(
4243
+ `post_model_threw=${Date.now() - probeStart}ms:${String((e as Error)?.message ?? e).slice(0, 80)}`,
4244
+ );
4245
+ }
4246
+ }
4187
4247
 
4188
4248
  // One-line per-turn resolution log so it's obvious in dev which engine
4189
4249
  // is actually handling the request. `requestEngine` is what the client
@@ -4221,6 +4281,7 @@ export function createProductionAgentHandler(
4221
4281
  // reached db_request_ctx but not env_config hung in attachment upload or
4222
4282
  // engine/model resolution.
4223
4283
  workerStep("env_config");
4284
+ await awaitedWorkerMark("aw_env");
4224
4285
  // Run all independent pre-send steps in parallel. Each of these hits
4225
4286
  // the DB or invokes an action; running them sequentially was the
4226
4287
  // single biggest contributor to pre-LLM latency.
@@ -4545,6 +4606,7 @@ export function createProductionAgentHandler(
4545
4606
  // DIAGNOSTIC-ONLY: all parallel context gathering (system prompt, screen,
4546
4607
  // files, loop settings, enriched message) resolved.
4547
4608
  workerStep("context_all");
4609
+ await awaitedWorkerMark("aw_presend");
4548
4610
 
4549
4611
  if (systemPromptError) {
4550
4612
  setResponseHeader(event, "Content-Type", "text/event-stream");
@@ -4575,6 +4637,7 @@ export function createProductionAgentHandler(
4575
4637
  setupMark("actions");
4576
4638
  // DIAGNOSTIC-ONLY: action/tool resolution + engine-tool filtering finished.
4577
4639
  workerStep("action_tool_setup");
4640
+ await awaitedWorkerMark("aw_actions");
4578
4641
  const requestSystemPrompt =
4579
4642
  requestMode === "plan"
4580
4643
  ? `${systemPrompt}\n\n${PLAN_MODE_SYSTEM_PROMPT}`
@@ -4689,6 +4752,7 @@ export function createProductionAgentHandler(
4689
4752
  // DIAGNOSTIC-ONLY: owner/thread resolution + runId/effectiveThreadId +
4690
4753
  // chained-continuation thread fetch finished.
4691
4754
  workerStep("owner_thread");
4755
+ await awaitedWorkerMark("aw_owner");
4692
4756
 
4693
4757
  // Persist the user's turn exactly once. The foreground POST does this
4694
4758
  // before dispatching; the background worker must NOT repeat it (it re-enters
@@ -5106,6 +5170,26 @@ export function createProductionAgentHandler(
5106
5170
  // DIAGNOSTIC-ONLY: last stage before startRun fires. A worker that reaches
5107
5171
  // prestart but never workerStarted is hanging inside startRun itself.
5108
5172
  workerStep("prestart");
5173
+ // DIAGNOSTIC-ONLY: AWAITED probe right before startRun (bg worker only). If
5174
+ // worker_stage reaches `pre_claim_ok` but the run never flips to
5175
+ // `worker_started`, the stall is inside startRun's claim itself; if it never
5176
+ // reaches `pre_claim_*`, the stall is somewhere in the setup between
5177
+ // post_model and here.
5178
+ if (isBackgroundWorker && bgRunId) {
5179
+ const claimProbeStart = Date.now();
5180
+ try {
5181
+ await recordRunDiagnostic(
5182
+ bgRunId,
5183
+ RUN_DIAG_STAGE.workerSetupStep,
5184
+ "pre_claim",
5185
+ );
5186
+ workerStep(`pre_claim_ok=${Date.now() - claimProbeStart}ms`);
5187
+ } catch (e) {
5188
+ workerStep(
5189
+ `pre_claim_threw=${Date.now() - claimProbeStart}ms:${String((e as Error)?.message ?? e).slice(0, 80)}`,
5190
+ );
5191
+ }
5192
+ }
5109
5193
  // DIAGNOSTIC-ONLY: peak-ish RSS (MB) + assembled system-prompt size (KB) at
5110
5194
  // prestart. The analytics bg worker dies right after model_done; if the
5111
5195
  // FOREGROUND (identical build, writes land) is already near the ~1024MB
@@ -12,8 +12,21 @@ import type {
12
12
  StyleBrief,
13
13
  } from "../shared/api.js";
14
14
 
15
- export async function requireLibrary(id: string) {
16
- const access = await resolveAccess("asset-library", id);
15
+ type AccessCtx = {
16
+ userEmail?: string;
17
+ orgId?: string | null;
18
+ };
19
+
20
+ function accessContext(ctx?: AccessCtx) {
21
+ if (!ctx) return undefined;
22
+ return {
23
+ userEmail: ctx.userEmail,
24
+ orgId: ctx.orgId ?? undefined,
25
+ };
26
+ }
27
+
28
+ export async function requireLibrary(id: string, ctx?: AccessCtx) {
29
+ const access = await resolveAccess("asset-library", id, accessContext(ctx));
17
30
  if (!access) throw new Error("Asset library not found or not accessible.");
18
31
  return access.resource;
19
32
  }
@@ -18,8 +18,8 @@ export default defineAction({
18
18
  }),
19
19
  http: { method: "GET" },
20
20
  readOnly: true,
21
- run: async ({ id }) => {
22
- const library = await requireLibrary(id);
21
+ run: async ({ id }, ctx) => {
22
+ const library = await requireLibrary(id, ctx);
23
23
  const db = getDb();
24
24
  const [collections, folders, assets, runs] = await Promise.all([
25
25
  db
@@ -15,13 +15,17 @@ import listGenerationPresets from "./list-generation-presets.js";
15
15
  import listGenerationSessions from "./list-generation-sessions.js";
16
16
  import listLibraries from "./list-libraries.js";
17
17
 
18
+ function screenError(error: unknown): string {
19
+ return error instanceof Error ? error.message : String(error);
20
+ }
21
+
18
22
  export default defineAction({
19
23
  description:
20
24
  "See what the user is currently looking at in Assets, including current library/asset context and pending generation variants.",
21
25
  schema: z.object({}),
22
26
  http: false,
23
27
  readOnly: true,
24
- run: async () => {
28
+ run: async (_args, ctx) => {
25
29
  const [navigation, variants, legacyVariants] = await Promise.all([
26
30
  readAppStateForCurrentTab("navigation"),
27
31
  readAppState("asset-variants"),
@@ -32,56 +36,114 @@ export default defineAction({
32
36
  variants: variants ?? legacyVariants,
33
37
  };
34
38
  const nav = navigation as any;
39
+ const errors: Record<string, string> = {};
40
+ const readPart = async <T>(
41
+ key: string,
42
+ task: () => T | Promise<T>,
43
+ ): Promise<T | null> => {
44
+ try {
45
+ const value = await task();
46
+ screen[key] = value;
47
+ return value;
48
+ } catch (error) {
49
+ errors[key] = screenError(error);
50
+ return null;
51
+ }
52
+ };
53
+
35
54
  if (nav?.libraryId) {
36
- screen.library = await getLibrary.run({ id: nav.libraryId });
37
- screen.generationPresets = await listGenerationPresets.run({
38
- libraryId: nav.libraryId,
39
- });
40
- screen.generationSessions = await listGenerationSessions.run({
41
- libraryId: nav.libraryId,
42
- limit: 20,
43
- });
55
+ const library = await readPart("library", () =>
56
+ getLibrary.run({ id: nav.libraryId }, ctx),
57
+ );
58
+ if (library) {
59
+ await Promise.all([
60
+ readPart("generationPresets", () =>
61
+ listGenerationPresets.run(
62
+ {
63
+ libraryId: nav.libraryId,
64
+ },
65
+ ctx,
66
+ ),
67
+ ),
68
+ readPart("generationSessions", () =>
69
+ listGenerationSessions.run(
70
+ {
71
+ libraryId: nav.libraryId,
72
+ limit: 20,
73
+ },
74
+ ctx,
75
+ ),
76
+ ),
77
+ ]);
78
+ }
44
79
  }
45
80
  if (nav?.assetId) {
46
- screen.asset = await getAsset.run({ id: nav.assetId });
81
+ await readPart("asset", () => getAsset.run({ id: nav.assetId }, ctx));
47
82
  }
48
83
  if (nav?.sessionId) {
49
- screen.generationSession = await getGenerationSession.run({
50
- id: nav.sessionId,
51
- });
84
+ await readPart("generationSession", () =>
85
+ getGenerationSession.run(
86
+ {
87
+ id: nav.sessionId,
88
+ },
89
+ ctx,
90
+ ),
91
+ );
52
92
  }
53
93
  if (nav?.runId) {
54
- screen.generationRun = await getGenerationRun.run({
55
- runId: nav.runId,
56
- });
94
+ await readPart("generationRun", () =>
95
+ getGenerationRun.run(
96
+ {
97
+ runId: nav.runId,
98
+ },
99
+ ctx,
100
+ ),
101
+ );
57
102
  }
58
103
  if (nav?.view === "picker") {
59
- screen.libraries = await listLibraries.run({ compact: true });
104
+ await readPart("libraries", () =>
105
+ listLibraries.run({ compact: true }, ctx),
106
+ );
60
107
  if (nav.libraryId) {
61
- screen.assets = await listAssets.run({
62
- libraryId: nav.libraryId,
63
- mediaType:
64
- nav.mediaType === "image" || nav.mediaType === "video"
65
- ? nav.mediaType
66
- : undefined,
67
- query:
68
- typeof nav.query === "string" && nav.query.trim()
69
- ? nav.query
70
- : undefined,
71
- });
108
+ await readPart("assets", () =>
109
+ listAssets.run(
110
+ {
111
+ libraryId: nav.libraryId,
112
+ mediaType:
113
+ nav.mediaType === "image" || nav.mediaType === "video"
114
+ ? nav.mediaType
115
+ : undefined,
116
+ query:
117
+ typeof nav.query === "string" && nav.query.trim()
118
+ ? nav.query
119
+ : undefined,
120
+ },
121
+ ctx,
122
+ ),
123
+ );
72
124
  }
73
125
  }
74
126
  if (nav?.view === "library" && nav?.selection === "all") {
75
- screen.libraries = await listLibraries.run({ compact: false });
76
- screen.assets = await listAssets.run({
77
- query:
78
- typeof nav.search === "string" && nav.search.trim()
79
- ? nav.search
80
- : undefined,
81
- });
127
+ await Promise.all([
128
+ readPart("libraries", () => listLibraries.run({ compact: false }, ctx)),
129
+ readPart("assets", () =>
130
+ listAssets.run(
131
+ {
132
+ query:
133
+ typeof nav.search === "string" && nav.search.trim()
134
+ ? nav.search
135
+ : undefined,
136
+ },
137
+ ctx,
138
+ ),
139
+ ),
140
+ ]);
82
141
  }
83
142
  if (nav?.view === "audit") {
84
- screen.audit = await listAuditRuns.run({ limit: 20 });
143
+ await readPart("audit", () => listAuditRuns.run({ limit: 20 }, ctx));
144
+ }
145
+ if (Object.keys(errors).length) {
146
+ screen.errors = errors;
85
147
  }
86
148
  return screen;
87
149
  },
@@ -1 +1 @@
1
- {"version":3,"file":"production-agent.d.ts","sourceRoot":"","sources":["../../src/agent/production-agent.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,IAAI,CAAC;AAgCzD,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AA0BvC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAMhE,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,iBAAiB,EAGlB,MAAM,mBAAmB,CAAC;AAgB3B,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,MAAM,EACN,QAAQ,EAET,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAA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