mirror of
https://github.com/openai/codex.git
synced 2026-04-28 02:11:08 +03:00
memories: add extraction and prompt module foundation (#11200)
## Summary - add the new `core/src/memories` module (phase-one parsing, rollout filtering, storage, selection, prompts) - add Askama-backed memory templates for stage-one input/system and consolidation prompts - add module tests for parsing, filtering, path bucketing, and summary maintenance ## Testing - just fmt - cargo test -p codex-core --lib memories::
This commit is contained in:
@@ -29,13 +29,13 @@ The public interface of this crate is intentionally small and uniform:
|
||||
- Output: `Vec<ResponseItem>`.
|
||||
- `CompactClient::compact_input(&CompactionInput, extra_headers)` wraps the JSON encoding and retry/telemetry wiring.
|
||||
|
||||
- **Memory trace summarize endpoint**
|
||||
- Input: `MemoryTraceSummarizeInput` (re-exported as `codex_api::MemoryTraceSummarizeInput`):
|
||||
- **Memory summarize endpoint**
|
||||
- Input: `MemorySummarizeInput` (re-exported as `codex_api::MemorySummarizeInput`):
|
||||
- `model: String`.
|
||||
- `traces: Vec<MemoryTrace>`.
|
||||
- `MemoryTrace` includes `id`, `metadata.source_path`, and normalized `items`.
|
||||
- `raw_memories: Vec<RawMemory>` (serialized as `traces` for wire compatibility).
|
||||
- `RawMemory` includes `id`, `metadata.source_path`, and normalized `items`.
|
||||
- `reasoning: Option<Reasoning>`.
|
||||
- Output: `Vec<MemoryTraceSummaryOutput>`.
|
||||
- `MemoriesClient::trace_summarize_input(&MemoryTraceSummarizeInput, extra_headers)` wraps JSON encoding and retry/telemetry wiring.
|
||||
- Output: `Vec<MemorySummarizeOutput>`.
|
||||
- `MemoriesClient::summarize_input(&MemorySummarizeInput, extra_headers)` wraps JSON encoding and retry/telemetry wiring.
|
||||
|
||||
All HTTP details (URLs, headers, retry/backoff policies, SSE framing) are encapsulated in `codex-api` and `codex-client`. Callers construct prompts/inputs using protocol types and work with typed streams of `ResponseEvent` or compacted `ResponseItem` values.
|
||||
|
||||
Reference in New Issue
Block a user