@ai-matrx/agents 0.17.3 → 0.17.4

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.
@@ -1212,6 +1212,31 @@ function descriptionForOmissions(draft) {
1212
1212
  (o) => `${o.path || "document"}: ${o.reason}${o.count === void 0 ? "" : ` (${o.count})`}`
1213
1213
  ).join("; ");
1214
1214
  }
1215
+ function preparedContentOfferedValues(snapshot, draft) {
1216
+ const { coverage } = snapshot;
1217
+ const values = {
1218
+ coverage_status: coverage.status,
1219
+ included_count: coverage.included,
1220
+ payload_kind: draft.payload.kind,
1221
+ omission_count: draft.omissions.length,
1222
+ has_unsaved_changes: snapshot.unsavedChanges,
1223
+ manually_edited: draft.manuallyEdited
1224
+ };
1225
+ if (coverage.total !== null) values.total_count = coverage.total;
1226
+ if (coverage.unit) values.coverage_unit = coverage.unit;
1227
+ if (coverage.reason) values.coverage_reason = coverage.reason;
1228
+ if (draft.payload.kind === "rows") {
1229
+ values.row_count = draft.payload.rows.length;
1230
+ const labels = draft.payload.columns.filter((column) => column.visible).map((column) => column.label);
1231
+ if (labels.length > 0) values.column_labels = labels;
1232
+ }
1233
+ if (draft.omissions.length > 0)
1234
+ values.omission_reasons = draft.omissions.map((o) => o.reason);
1235
+ const sections = snapshot.sections.map((section) => section.label);
1236
+ if (sections.length > 0) values.section_labels = sections;
1237
+ if (snapshot.capturedAt) values.captured_at = snapshot.capturedAt;
1238
+ return values;
1239
+ }
1215
1240
  function visibleAssistantText(content) {
1216
1241
  if (typeof content === "string") return content.trim() || null;
1217
1242
  if (!Array.isArray(content)) return null;
@@ -1467,7 +1492,8 @@ function createMatrxContentTransferAdapter(options) {
1467
1492
  input.snapshot,
1468
1493
  input.draft
1469
1494
  ),
1470
- omission_description: descriptionForOmissions(input.draft)
1495
+ omission_description: descriptionForOmissions(input.draft),
1496
+ ...preparedContentOfferedValues(input.snapshot, input.draft)
1471
1497
  }
1472
1498
  },
1473
1499
  { signal }