minutes-sdk 0.16.1 → 0.16.2

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/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { type ActionItem, type Decision, type Intent, type Frontmatter, type MeetingFile, type SpeakerAttribution, type SpeakerConfirmation, defaultDir, splitFrontmatter, parseFrontmatter, listMeetings, searchMeetings, getMeeting, getMeetingWithOverlays, applySpeakerOverlays, humanizeTranscript, findOpenActions, findDecisions, getPersonProfile, listVoiceMemos, } from "./reader.js";
1
+ export { type ActionItem, type Decision, type Intent, type Frontmatter, type MeetingFile, type SpeakerAttribution, type SpeakerConfirmation, type AttributionSource, type CaptureSource, type CaptureWarning, type DiagnosticConfidence, type DiarizationPath, type FailureKind, type RecordingHealth, defaultDir, splitFrontmatter, parseFrontmatter, parseAttributionSource, listMeetings, searchMeetings, getMeeting, getMeetingWithOverlays, applySpeakerOverlays, humanizeTranscript, findOpenActions, findDecisions, getPersonProfile, listVoiceMemos, } from "./reader.js";
package/dist/index.js CHANGED
@@ -12,6 +12,6 @@ export {
12
12
  // Config
13
13
  defaultDir,
14
14
  // Parsing
15
- splitFrontmatter, parseFrontmatter,
15
+ splitFrontmatter, parseFrontmatter, parseAttributionSource,
16
16
  // Query API
17
17
  listMeetings, searchMeetings, getMeeting, getMeetingWithOverlays, applySpeakerOverlays, humanizeTranscript, findOpenActions, findDecisions, getPersonProfile, listVoiceMemos, } from "./reader.js";
package/dist/reader.d.ts CHANGED
@@ -19,7 +19,29 @@ export interface SpeakerAttribution {
19
19
  speaker_label: string;
20
20
  name: string;
21
21
  confidence: "high" | "medium" | "low";
22
- source: "deterministic" | "llm" | "enrollment" | "manual";
22
+ source: AttributionSource;
23
+ }
24
+ export type AttributionSource = "deterministic" | "llm" | "enrollment" | "manual" | "ml-bleed-degraded" | "stem-recovery";
25
+ export type DiagnosticConfidence = "high" | "inferred";
26
+ export type CaptureSource = "voice" | "system" | "both" | "backend";
27
+ export type DiarizationPath = "stem-energy" | "ml" | "ml-bleed-degraded" | "none";
28
+ export type FailureKind = "silent" | "sparse" | "missing" | "backend-unavailable" | "stream-error" | "source-starved" | "unsupported-format" | "misconfigured-route" | "permission-denied" | "route-unavailable" | {
29
+ other: {
30
+ code: string;
31
+ };
32
+ };
33
+ export interface CaptureWarning {
34
+ kind: FailureKind;
35
+ source: CaptureSource;
36
+ message: string;
37
+ diagnostic_confidence: DiagnosticConfidence;
38
+ }
39
+ export interface RecordingHealth {
40
+ voice_stem_active_ratio?: number;
41
+ system_stem_active_ratio?: number;
42
+ system_dominant_ratio?: number;
43
+ capture_warnings: CaptureWarning[];
44
+ diarization_path?: DiarizationPath;
23
45
  }
24
46
  /**
25
47
  * A user-confirmed speaker correction stored in the sidecar overlay store
@@ -54,12 +76,14 @@ export interface Frontmatter {
54
76
  decisions: Decision[];
55
77
  intents: Intent[];
56
78
  speaker_map?: SpeakerAttribution[];
79
+ recording_health?: RecordingHealth;
57
80
  }
58
81
  export interface MeetingFile {
59
82
  frontmatter: Frontmatter;
60
83
  body: string;
61
84
  path: string;
62
85
  }
86
+ export declare function parseAttributionSource(raw: string): AttributionSource;
63
87
  /**
64
88
  * Split markdown content into YAML frontmatter and body.
65
89
  * Returns null frontmatter string if no valid frontmatter found.
package/dist/reader.js CHANGED
@@ -34,6 +34,79 @@ function parseRawAttendees(raw) {
34
34
  }
35
35
  return attendees;
36
36
  }
37
+ export function parseAttributionSource(raw) {
38
+ if (raw === "deterministic" ||
39
+ raw === "llm" ||
40
+ raw === "enrollment" ||
41
+ raw === "manual" ||
42
+ raw === "ml-bleed-degraded" ||
43
+ raw === "stem-recovery") {
44
+ return raw;
45
+ }
46
+ return "llm";
47
+ }
48
+ function parseDiagnosticConfidence(raw) {
49
+ if (raw === "high" || raw === "inferred")
50
+ return raw;
51
+ throw new Error(`unknown diagnostic confidence: ${String(raw)}`);
52
+ }
53
+ function parseCaptureSource(raw) {
54
+ if (raw === "voice" || raw === "system" || raw === "both" || raw === "backend") {
55
+ return raw;
56
+ }
57
+ throw new Error(`unknown capture source: ${String(raw)}`);
58
+ }
59
+ function parseDiarizationPath(raw) {
60
+ if (raw === "stem-energy" || raw === "ml" || raw === "ml-bleed-degraded" || raw === "none") {
61
+ return raw;
62
+ }
63
+ throw new Error(`unknown diarization path: ${String(raw)}`);
64
+ }
65
+ function parseFailureKind(raw) {
66
+ if (raw === "silent" ||
67
+ raw === "sparse" ||
68
+ raw === "missing" ||
69
+ raw === "backend-unavailable" ||
70
+ raw === "stream-error" ||
71
+ raw === "source-starved" ||
72
+ raw === "unsupported-format" ||
73
+ raw === "misconfigured-route" ||
74
+ raw === "permission-denied" ||
75
+ raw === "route-unavailable") {
76
+ return raw;
77
+ }
78
+ if (raw &&
79
+ typeof raw === "object" &&
80
+ "other" in raw &&
81
+ raw.other &&
82
+ typeof raw.other === "object") {
83
+ return { other: { code: String(raw.other.code || "") } };
84
+ }
85
+ throw new Error(`unknown capture failure kind: ${String(raw)}`);
86
+ }
87
+ function optionalNumber(raw) {
88
+ return typeof raw === "number" && Number.isFinite(raw) ? raw : undefined;
89
+ }
90
+ function parseRecordingHealth(raw) {
91
+ if (!raw || typeof raw !== "object")
92
+ return undefined;
93
+ return {
94
+ voice_stem_active_ratio: optionalNumber(raw.voice_stem_active_ratio),
95
+ system_stem_active_ratio: optionalNumber(raw.system_stem_active_ratio),
96
+ system_dominant_ratio: optionalNumber(raw.system_dominant_ratio),
97
+ capture_warnings: Array.isArray(raw.capture_warnings)
98
+ ? raw.capture_warnings.map((warning) => ({
99
+ kind: parseFailureKind(warning?.kind),
100
+ source: parseCaptureSource(warning?.source),
101
+ message: String(warning?.message || ""),
102
+ diagnostic_confidence: parseDiagnosticConfidence(warning?.diagnostic_confidence),
103
+ }))
104
+ : [],
105
+ diarization_path: raw.diarization_path
106
+ ? parseDiarizationPath(raw.diarization_path)
107
+ : undefined,
108
+ };
109
+ }
37
110
  // ── Parsing ──────────────────────────────────────────────────
38
111
  /**
39
112
  * Split markdown content into YAML frontmatter and body.
@@ -113,14 +186,10 @@ export function parseFrontmatter(content, filePath) {
113
186
  s.confidence === "low"
114
187
  ? s.confidence
115
188
  : "medium"),
116
- source: (s.source === "deterministic" ||
117
- s.source === "llm" ||
118
- s.source === "enrollment" ||
119
- s.source === "manual"
120
- ? s.source
121
- : "llm"),
189
+ source: parseAttributionSource(String(s.source || "")),
122
190
  }))
123
191
  : undefined,
192
+ recording_health: parseRecordingHealth(parsed.recording_health),
124
193
  };
125
194
  return { frontmatter: fm, body, path: filePath };
126
195
  }
@@ -376,12 +445,7 @@ export async function getMeetingWithOverlays(filePath, options = {}) {
376
445
  attr.confidence === "low"
377
446
  ? attr.confidence
378
447
  : "medium"),
379
- source: (attr.source === "deterministic" ||
380
- attr.source === "llm" ||
381
- attr.source === "enrollment" ||
382
- attr.source === "manual"
383
- ? attr.source
384
- : "llm"),
448
+ source: parseAttributionSource(String(attr.source || "")),
385
449
  })),
386
450
  },
387
451
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minutes-sdk",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "Conversation memory SDK — query meeting transcripts, decisions, and action items from any AI agent or application",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",