Skip to main content

forge_memory_bridge/
lib.rs

1//! # forge-memory-bridge
2//!
3//! Transforms Forge export envelopes into projection
4//! import batches for consumption by
5//! `semantic-memory`'s projection importer.
6//!
7//! ## Authority boundary
8//!
9//! This crate owns the **transformation** from Forge's export vocabulary to
10//! memory's import vocabulary. It does NOT:
11//! - evaluate comparability or decide promotion,
12//! - guess missing semantics from live memory,
13//! - become a query service,
14//! - persist any state of its own.
15//!
16//! ## Phase status: current / implemented now
17
18mod batch;
19mod error;
20#[allow(deprecated)]
21mod legacy;
22mod transform;
23
24pub use batch::*;
25pub use error::{
26    BridgeError, BridgeImportFailureArtifact, BRIDGE_IMPORT_FAILURE_ARTIFACT_V1_SCHEMA,
27};
28pub use transform::*;
29
30/// Compatibility-only legacy bridge helpers.
31///
32/// The canonical path is `ExportEnvelopeV3` -> `transform_envelope_v3()` ->
33/// `ProjectionImportBatchV3`.
34/// V1/V2 helpers remain only for migration compatibility and should not be
35/// used for new integrations.
36///
37/// Phase status: migration-only
38/// Removal condition: remove when all consumers have migrated to `transform_envelope_v3()` + `ProjectionImportBatchV3`
39#[doc(hidden)]
40#[deprecated(
41    since = "0.2.0",
42    note = "Legacy bridge helpers are compatibility-only. Use `transform_envelope_v3()` + `ProjectionImportBatchV3`."
43)]
44#[allow(deprecated)]
45pub mod compat {
46    pub use crate::legacy::{
47        transform_legacy_envelope, upgrade_legacy_envelope, LegacyEpisodeMeta,
48        LegacyImportEnvelopeV1, LegacyImportRecord,
49    };
50}
51
52/// Phase status: migration-only
53/// Removal condition: remove when all consumers have migrated to `transform_envelope_v3()` + `ProjectionImportBatchV3`
54#[deprecated(
55    since = "0.1.0",
56    note = "Legacy bridge helpers are compatibility-only. Use `transform_envelope_v3()` + `ProjectionImportBatchV3`."
57)]
58#[doc(hidden)]
59#[allow(deprecated)]
60pub use compat::transform_legacy_envelope;
61/// Phase status: migration-only
62/// Removal condition: remove when all consumers have migrated to `transform_envelope_v3()` + `ProjectionImportBatchV3`
63#[deprecated(
64    since = "0.1.0",
65    note = "Legacy bridge helpers are compatibility-only. Use `transform_envelope_v3()` + `ProjectionImportBatchV3`."
66)]
67#[doc(hidden)]
68#[allow(deprecated)]
69pub use compat::upgrade_legacy_envelope;
70/// Phase status: migration-only
71/// Removal condition: remove when all consumers have migrated to `transform_envelope_v3()` + `ProjectionImportBatchV3`
72#[deprecated(
73    since = "0.1.0",
74    note = "Legacy bridge helpers are compatibility-only. Use `transform_envelope_v3()` + `ProjectionImportBatchV3`."
75)]
76#[doc(hidden)]
77#[allow(deprecated)]
78pub use compat::LegacyEpisodeMeta;
79/// Phase status: migration-only
80/// Removal condition: remove when all consumers have migrated to `transform_envelope_v3()` + `ProjectionImportBatchV3`
81#[deprecated(
82    since = "0.1.0",
83    note = "Legacy bridge helpers are compatibility-only. Use `transform_envelope_v3()` + `ProjectionImportBatchV3`."
84)]
85#[doc(hidden)]
86#[allow(deprecated)]
87pub use compat::LegacyImportEnvelopeV1;
88/// Phase status: migration-only
89/// Removal condition: remove when all consumers have migrated to `transform_envelope_v3()` + `ProjectionImportBatchV3`
90#[deprecated(
91    since = "0.1.0",
92    note = "Legacy bridge helpers are compatibility-only. Use `transform_envelope_v3()` + `ProjectionImportBatchV3`."
93)]
94#[doc(hidden)]
95#[allow(deprecated)]
96pub use compat::LegacyImportRecord;