@agent-native/core 0.172.1 → 0.172.3

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/corpus/README.md CHANGED
@@ -31,4 +31,4 @@ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core/corpus
31
31
 
32
32
  ## Generated Counts
33
33
 
34
- - template files: 8586
34
+ - template files: 8587
@@ -2,4 +2,5 @@
2
2
  type: improved
3
3
  date: 2026-08-24
4
4
  ---
5
+
5
6
  Overlapping calendar events now use more of the available width while keeping same-time meetings readable.
@@ -0,0 +1,37 @@
1
+ import { and, eq, inArray, isNotNull } from "drizzle-orm";
2
+
3
+ import { getDb, schema } from "../../server/db/index.js";
4
+ import finalizeMeeting from "../finalize-meeting.js";
5
+
6
+ /** Finalize meeting notes once a linked recording's transcript is ready. */
7
+ export async function finalizeEndedMeetingsForRecording(
8
+ db: ReturnType<typeof getDb>,
9
+ recordingId: string,
10
+ ): Promise<void> {
11
+ const meetings = await db
12
+ .select({ id: schema.meetings.id })
13
+ .from(schema.meetings)
14
+ .where(
15
+ and(
16
+ eq(schema.meetings.recordingId, recordingId),
17
+ isNotNull(schema.meetings.actualEnd),
18
+ inArray(schema.meetings.transcriptStatus, ["ready", "failed"]),
19
+ eq(schema.meetings.summaryMd, ""),
20
+ ),
21
+ );
22
+
23
+ await Promise.all(
24
+ meetings.map(async (meeting) => {
25
+ try {
26
+ await finalizeMeeting.run({ meetingId: meeting.id });
27
+ } catch (error) {
28
+ // Transcript delivery must remain successful even when the separate
29
+ // notes model is unavailable; a later transcript retry can try again.
30
+ console.warn(
31
+ `[clips] meeting notes finalization failed for ${meeting.id}:`,
32
+ (error as Error)?.message ?? String(error),
33
+ );
34
+ }
35
+ }),
36
+ );
37
+ }
@@ -80,6 +80,7 @@ import {
80
80
  clearBuilderCreditsExhausted,
81
81
  noteBuilderCreditsExhausted,
82
82
  } from "./lib/builder-credits-state.js";
83
+ import { finalizeEndedMeetingsForRecording } from "./lib/finalize-ended-meetings.js";
83
84
  import {
84
85
  fetchLoomTranscript,
85
86
  loomTranscriptUnavailableMessage,
@@ -739,6 +740,7 @@ export async function importLoomTranscriptForRecording({
739
740
  now,
740
741
  });
741
742
  await writeAppState("refresh-signal", { ts: Date.now() });
743
+ await finalizeEndedMeetingsForRecording(db, recordingId);
742
744
  await queueBrainExport(recordingId);
743
745
  return {
744
746
  recordingId,
@@ -1177,6 +1179,7 @@ async function completeReadyTranscript({
1177
1179
  // (`transcript-cleanup-${recordingId}`) before its next 2s tick lands —
1178
1180
  // otherwise the "Cleaning up…" badge can lag for one full poll interval.
1179
1181
  await writeAppState("refresh-signal", { ts: Date.now() });
1182
+ await finalizeEndedMeetingsForRecording(db, recordingId);
1180
1183
  await queueBrainExport(recordingId);
1181
1184
 
1182
1185
  return {
@@ -1580,6 +1583,7 @@ const requestTranscriptAction = defineAction({
1580
1583
  now,
1581
1584
  });
1582
1585
  await writeAppState("refresh-signal", { ts: Date.now() });
1586
+ await finalizeEndedMeetingsForRecording(db, args.recordingId);
1583
1587
  await queueBrainExport(args.recordingId);
1584
1588
  await clearBuilderCreditsExhausted();
1585
1589
 
@@ -24,6 +24,7 @@ import { dispatchPostFinalizeJob } from "../server/lib/post-finalize-dispatch.js
24
24
  import { getCurrentOwnerEmail } from "../server/lib/recordings.js";
25
25
  import { buildCaptionSegmentsFromText } from "../shared/transcript-segments.js";
26
26
  import { booleanParam } from "./lib/cli-params.js";
27
+ import { finalizeEndedMeetingsForRecording } from "./lib/finalize-ended-meetings.js";
27
28
  import { isAutoTitleReplaceable } from "./lib/title-source.js";
28
29
 
29
30
  // web-speech and macos-native are both mic-only engines — see
@@ -226,6 +227,9 @@ export default defineAction({
226
227
  );
227
228
 
228
229
  await writeAppState("refresh-signal", { ts: Date.now() });
230
+ if (savedStatus === "ready") {
231
+ await finalizeEndedMeetingsForRecording(db, args.recordingId);
232
+ }
229
233
 
230
234
  const [rec] = await db
231
235
  .select({