@ai-matrx/agents 0.17.3 → 0.17.5

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.
@@ -1240,6 +1240,31 @@ function descriptionForOmissions(draft) {
1240
1240
  (o) => `${o.path || "document"}: ${o.reason}${o.count === void 0 ? "" : ` (${o.count})`}`
1241
1241
  ).join("; ");
1242
1242
  }
1243
+ function preparedContentOfferedValues(snapshot, draft) {
1244
+ const { coverage } = snapshot;
1245
+ const values = {
1246
+ coverage_status: coverage.status,
1247
+ included_count: coverage.included,
1248
+ payload_kind: draft.payload.kind,
1249
+ omission_count: draft.omissions.length,
1250
+ has_unsaved_changes: snapshot.unsavedChanges,
1251
+ manually_edited: draft.manuallyEdited
1252
+ };
1253
+ if (coverage.total !== null) values.total_count = coverage.total;
1254
+ if (coverage.unit) values.coverage_unit = coverage.unit;
1255
+ if (coverage.reason) values.coverage_reason = coverage.reason;
1256
+ if (draft.payload.kind === "rows") {
1257
+ values.row_count = draft.payload.rows.length;
1258
+ const labels = draft.payload.columns.filter((column) => column.visible).map((column) => column.label);
1259
+ if (labels.length > 0) values.column_labels = labels;
1260
+ }
1261
+ if (draft.omissions.length > 0)
1262
+ values.omission_reasons = draft.omissions.map((o) => o.reason);
1263
+ const sections = snapshot.sections.map((section) => section.label);
1264
+ if (sections.length > 0) values.section_labels = sections;
1265
+ if (snapshot.capturedAt) values.captured_at = snapshot.capturedAt;
1266
+ return values;
1267
+ }
1243
1268
  function visibleAssistantText(content) {
1244
1269
  if (typeof content === "string") return content.trim() || null;
1245
1270
  if (!Array.isArray(content)) return null;
@@ -1495,7 +1520,8 @@ function createMatrxContentTransferAdapter(options) {
1495
1520
  input.snapshot,
1496
1521
  input.draft
1497
1522
  ),
1498
- omission_description: descriptionForOmissions(input.draft)
1523
+ omission_description: descriptionForOmissions(input.draft),
1524
+ ...preparedContentOfferedValues(input.snapshot, input.draft)
1499
1525
  }
1500
1526
  },
1501
1527
  { signal }