@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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.4
4
+ ### Unreleased
5
+
6
+ ### Added
7
+
8
+ - `./content-transfer`: `preparedContentOfferedValues(snapshot, draft)` and the
9
+ Alchemy preparation launch now sends the `alchemy.prepared_content` offered
10
+ values by name (`coverage_status`, `included_count`, `total_count`,
11
+ `coverage_unit`, `coverage_reason`, `payload_kind`, `row_count`,
12
+ `column_labels`, `omission_reasons`, `omission_count`, `section_labels`,
13
+ `has_unsaved_changes`, `captured_at`, `manually_edited`) beside the four
14
+ existing variables. Absent facts are omitted. These are mapped-only on the
15
+ server, so no current Holder's payload changes.
16
+
17
+ ### Consumer action
18
+
19
+ - None.
20
+
3
21
  ## 0.17.3
4
22
 
5
23
  Automatic changed-only republish (docs/metadata drift since the last tag — see
@@ -22,7 +22,8 @@ var content_transfer_exports = {};
22
22
  __export(content_transfer_exports, {
23
23
  createMatrxContentTransferAdapter: () => createMatrxContentTransferAdapter,
24
24
  createMatrxTransferActions: () => createMatrxTransferActions,
25
- createMatrxTransferPorts: () => createMatrxTransferPorts
25
+ createMatrxTransferPorts: () => createMatrxTransferPorts,
26
+ preparedContentOfferedValues: () => preparedContentOfferedValues
26
27
  });
27
28
  module.exports = __toCommonJS(content_transfer_exports);
28
29
 
@@ -1389,6 +1390,31 @@ function descriptionForOmissions(draft) {
1389
1390
  (o) => `${o.path || "document"}: ${o.reason}${o.count === void 0 ? "" : ` (${o.count})`}`
1390
1391
  ).join("; ");
1391
1392
  }
1393
+ function preparedContentOfferedValues(snapshot, draft) {
1394
+ const { coverage } = snapshot;
1395
+ const values = {
1396
+ coverage_status: coverage.status,
1397
+ included_count: coverage.included,
1398
+ payload_kind: draft.payload.kind,
1399
+ omission_count: draft.omissions.length,
1400
+ has_unsaved_changes: snapshot.unsavedChanges,
1401
+ manually_edited: draft.manuallyEdited
1402
+ };
1403
+ if (coverage.total !== null) values.total_count = coverage.total;
1404
+ if (coverage.unit) values.coverage_unit = coverage.unit;
1405
+ if (coverage.reason) values.coverage_reason = coverage.reason;
1406
+ if (draft.payload.kind === "rows") {
1407
+ values.row_count = draft.payload.rows.length;
1408
+ const labels = draft.payload.columns.filter((column) => column.visible).map((column) => column.label);
1409
+ if (labels.length > 0) values.column_labels = labels;
1410
+ }
1411
+ if (draft.omissions.length > 0)
1412
+ values.omission_reasons = draft.omissions.map((o) => o.reason);
1413
+ const sections = snapshot.sections.map((section) => section.label);
1414
+ if (sections.length > 0) values.section_labels = sections;
1415
+ if (snapshot.capturedAt) values.captured_at = snapshot.capturedAt;
1416
+ return values;
1417
+ }
1392
1418
  function visibleAssistantText(content) {
1393
1419
  if (typeof content === "string") return content.trim() || null;
1394
1420
  if (!Array.isArray(content)) return null;
@@ -1644,7 +1670,8 @@ function createMatrxContentTransferAdapter(options) {
1644
1670
  input.snapshot,
1645
1671
  input.draft
1646
1672
  ),
1647
- omission_description: descriptionForOmissions(input.draft)
1673
+ omission_description: descriptionForOmissions(input.draft),
1674
+ ...preparedContentOfferedValues(input.snapshot, input.draft)
1648
1675
  }
1649
1676
  },
1650
1677
  { signal }