Skip to content

feat: update index#6

Merged
shibadityadeb merged 1 commit into
mainfrom
memory-engine
Jul 16, 2026
Merged

feat: update index#6
shibadityadeb merged 1 commit into
mainfrom
memory-engine

Conversation

@shibadityadeb

@shibadityadeb shibadityadeb commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added a Memory Explorer for browsing, filtering, sorting, and rebuilding company memory.
    • Added detailed memory views with provenance, confidence scores, conflicts, and version history.
    • Added entity timelines showing current state, activity history, and related memories.
    • Added Change History with configurable time ranges.
    • Added Conflict Viewer with options to keep the latest or previous value.
    • Added memory scoring, freshness tracking, source attribution, and automated reconciliation.
  • Documentation

    • Added configuration guidance and technical documentation for the memory features.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request introduces the Phase 3 Company Memory Engine, including reconciled memory storage, Temporal processing workflows, configurable scoring and conflict handling, organization-scoped APIs, and web pages for browsing memories, timelines, changes, and conflicts.

Changes

Company Memory Engine

Layer / File(s) Summary
Domain logic and contracts
packages/memory-engine/*
Defines memory types, provenance, reconciliation, conflict resolution, scoring, timeline derivation, tuning defaults, and unit tests.
Persistence schema
apps/api/prisma/schema.prisma, apps/api/prisma/migrations/...
Adds memory, version, event, timeline, conflict, entity-state, and score models with enums, indexes, constraints, and relations.
Persistence activities
packages/activities/src/memory-engine.activities.ts, packages/activities/src/memory.context.ts
Implements collection, reconciliation, merging, timeline rebuilding, conflict processing, scoring, cleanup, and Redis run finalization.
Temporal orchestration and configuration
packages/workflows/..., services/temporal-worker/..., .env.example
Adds memory workflows, progress queries, worker registration, environment-based tuning, and workflow identifiers.
API surface
apps/api/src/modules/memory/*, apps/api/src/app.ts
Adds validated authenticated endpoints for memory queries, timelines, changes, conflicts, statistics, rebuilds, and conflict resolution.
Web interfaces
apps/web/src/app/(app)/memory/*, apps/web/src/lib/api.ts, apps/web/src/components/memory/*
Adds typed API methods, navigation, formatting helpers, and memory explorer, detail, entity timeline, change history, and conflict viewer pages.
Specification
docs/memory-engine.md
Documents the architecture, data model, workflows, APIs, configuration, frontend routes, and extension points.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MemoryExplorer
  participant MemoryAPI
  participant MemoryService
  participant Temporal
  participant MemoryActivities
  participant Prisma
  MemoryExplorer->>MemoryAPI: request memory list, stats, or rebuild
  MemoryAPI->>MemoryService: validate and execute organization-scoped operation
  MemoryService->>Prisma: query memory data and aggregates
  MemoryService->>Temporal: start memoryUpdateWorkflow
  Temporal->>MemoryActivities: collect, apply, merge, timeline, conflict, score
  MemoryActivities->>Prisma: persist reconciled memory state
  MemoryActivities-->>Temporal: return stage statistics
  Temporal-->>MemoryService: return workflow identifiers or progress
  MemoryService-->>MemoryAPI: return response payload
  MemoryAPI-->>MemoryExplorer: render memory data or rebuild status
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.03% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is too generic and does not convey the main change, which adds a Company Memory Engine across API, web, workflows, and packages. Rename it to summarize the primary feature, e.g. "feat: add Company Memory Engine across API, web, and workflows".
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch memory-engine

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@shibadityadeb
shibadityadeb merged commit 05a32b1 into main Jul 16, 2026
1 of 2 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.

🟠 Major comments (22)
apps/api/src/modules/memory/memory.schemas.ts-58-62 (1)

58-62: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Require value for choice: 'custom'. resolveConflict() coerces a missing value to null, so { choice: 'custom' } can persist an unintended null resolution. Model the custom branch separately and keep value required there so explicit null still works.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/api/src/modules/memory/memory.schemas.ts` around lines 58 - 62, Update
resolveConflictBodySchema to use a discriminated union for choice: keep latest
and previous branches with optional or absent value as appropriate, and define
the custom branch with value required as z.unknown() so explicit null remains
valid. Ensure resolveConflict() can no longer receive a custom choice without a
value.
apps/api/src/modules/memory/memory.schemas.ts-11-16 (1)

11-16: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Validate the memory filters against the real Prisma enums.
enumString accepts any all-caps token, but these values are passed straight into Prisma with as never, so unsupported inputs fail at query time instead of as a 422. Use z.nativeEnum(...) or explicit z.enum(...) per field. Same applies to the timeline, changes, and conflicts query schemas.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/api/src/modules/memory/memory.schemas.ts` around lines 11 - 16, The
filter schemas currently accept arbitrary uppercase strings instead of
validating against Prisma enum values. Replace enumString usage in
listMemoryQuerySchema and the corresponding timeline, changes, and conflicts
query schemas with z.nativeEnum or explicit z.enum definitions tied to each
field’s actual Prisma enum, so unsupported filters are rejected during request
validation.
apps/api/src/modules/memory/memory.service.ts-339-395 (1)

339-395: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Guard conflict resolution with an OPEN check and version snapshot.

  • resolveConflict() updates by id only, so the same conflict can be resolved twice.
  • applyAttribute() reads memory.attributes before the transaction, which can clobber concurrent updates.
  • Manual resolutions don’t write a MemoryVersion, so /changes will miss them.

Move the memory read/update and the version write into one interactive transaction.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/api/src/modules/memory/memory.service.ts` around lines 339 - 395, Update
resolveConflict() to use one interactive Prisma transaction that re-fetches the
conflict with status OPEN and validates its version snapshot before resolving
it. Move applyAttribute()’s memory read and update into that transaction to
avoid overwriting concurrent changes, and create the corresponding MemoryVersion
within the same transaction so manual resolutions appear in /changes. Ensure the
conflict update is guarded against repeated resolution and return the
transaction’s updated conflict.
apps/web/src/app/(app)/memory/conflicts/page.tsx-53-62 (1)

53-62: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Keep the conflict busy until refresh completes.

load() is not returned or awaited, so busy clears while the resolved conflict still appears OPEN, permitting duplicate submissions.

Proposed fix
 const load = useCallback(() => {
-  memoryApi
+  return memoryApi
     .listConflicts({ status, limit: 100 })
     .then(setData)
     .catch((err) => setError(err instanceof Error ? err.message : 'Failed to load conflicts'));
 }, [status]);

 await memoryApi.resolveConflict(id, { choice });
-load();
+await load();
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/app/`(app)/memory/conflicts/page.tsx around lines 53 - 62,
Update resolve so it awaits the load() refresh after memoryApi.resolveConflict
succeeds, keeping the conflict busy until refreshed data has completed loading.
Preserve the existing error handling and setBusy(null) cleanup in the finally
block.
packages/memory-engine/src/scoring.ts-82-83 (1)

82-83: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Handle non-positive frequency saturation before dividing.

With zero events and frequencySaturation = 0, Line 83 evaluates 0 / 0, making both frequency and composite NaN. Validate saturation or explicitly return zero for zero events before division.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/memory-engine/src/scoring.ts` around lines 82 - 83, Update the
frequency calculation near the scoring function’s saturation logic to handle
non-positive frequency saturation before division. Return a frequency of zero
when the effective event count is zero, and validate or otherwise safely handle
non-positive saturation for positive counts so neither frequency nor composite
becomes NaN.
apps/api/prisma/schema.prisma-1336-1395 (1)

1336-1395: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Make the memory dedupe index partial @@unique([organizationId, memoryType, dedupeKey]) is still a plain unique constraint, and the migration creates the same plain unique index, so MERGED/ARCHIVED/EXPIRED/soft-deleted rows keep blocking a replacement ACTIVE memory. Move this to a partial unique index for ACTIVE rows.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/api/prisma/schema.prisma` around lines 1336 - 1395, Replace the plain
@@unique constraint on Memory with a partial unique index that enforces
uniqueness only for rows with status ACTIVE and deletedAt IS NULL. Update the
corresponding migration/index definition as well, while preserving uniqueness
across organizationId, memoryType, and dedupeKey for eligible memories.
packages/memory-engine/src/reconciliation.ts-210-218 (1)

210-218: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Do not combine provenance fields from different observations.

A lower-confidence or older incoming reinforcement still replaces source, while confidence and timestamp may remain from current. This creates a fabricated observation such as Slack provenance carrying Document confidence, affecting source trust and downstream scoring.

Keep one complete Provenanced record, or model reinforcement metadata separately rather than mixing its fields.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/memory-engine/src/reconciliation.ts` around lines 210 - 218, The
same-value branch in the reconciliation logic must not mix provenance fields
from separate observations. Update the merge handling around valuesEqual to
retain one complete Provenanced record—prefer the observation whose confidence
and timestamp are selected—or model reinforcement metadata separately, ensuring
source, confidence, timestamp, and other provenance fields remain internally
consistent.
apps/api/prisma/migrations/20260716110000_company_memory_engine/migration.sql-273-289 (1)

273-289: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Enforce organization ownership in relational foreign keys.

These ID-only foreign keys permit, for example, an organization A conflict or version to reference an organization B memory. Organization-scoped reads would then expose inconsistent tenant data, and the self-referencing merge constraint has the same gap.

Add unique parent keys such as (id, organizationId) and composite foreign keys carrying organizationId for every tenant-owned relationship.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/api/prisma/migrations/20260716110000_company_memory_engine/migration.sql`
around lines 273 - 289, Update the migration’s tenant-owned relationship
constraints, including memories_mergedIntoId_fkey,
memory_versions_memoryId_fkey, memory_events_memoryId_fkey,
memory_timeline_events_timelineId_fkey, conflict_records_memoryId_fkey, and
memory_scores_memoryId_fkey, to use composite keys carrying organizationId. Add
the corresponding unique parent keys such as (id, organizationId) on referenced
tenant tables, and ensure each child foreign key references both the related ID
and organizationId while preserving the existing delete/update actions.
packages/memory-engine/src/timeline.ts-111-119 (1)

111-119: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Base timeline idempotency on eventId and canonicalize the fallback.

Two distinct events with the same entity, source, timestamp, document, and changes currently collide, so the database unique index drops one. Conversely, equivalent change objects with different key insertion orders produce different fallback hashes.

Use eventId as the source-event identity when available, and sort change keys for drafts without one.

Proposed fix
-  const dedupeHash = stableHash(
-    input.entityId,
-    type,
-    input.source,
-    input.occurredAt,
-    input.documentId,
-    changesSummary,
-  );
+  const dedupeHash = input.eventId
+    ? stableHash(input.entityId, input.eventId)
+    : stableHash(
+        input.entityId,
+        type,
+        input.source,
+        input.occurredAt,
+        input.documentId,
+        changesSummary,
+      );

Also iterate over sorted entries in describeChanges.

Also applies to: 165-172

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/memory-engine/src/timeline.ts` around lines 111 - 119, Update the
dedupeHash construction in the timeline event flow to use eventId as the
source-event identity when present, preventing distinct events from colliding.
For drafts without an eventId, retain the fallback fields but canonicalize
changesSummary by sorting change keys. Update describeChanges to iterate over
sorted entries so equivalent change objects produce identical hashes.
packages/memory-engine/src/reconciliation.ts-179-185 (1)

179-185: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Compare structured values independently of object key order.

JSON.stringify treats {a: 1, b: 2} and {b: 2, a: 1} as different, causing false conflicts and unnecessary memory versions when equivalent JSON arrives with different property ordering.

Proposed direction
 function valuesEqual(a: unknown, b: unknown): boolean {
   if (a === b) return true;
   if (typeof a === 'string' && typeof b === 'string') {
     return a.trim().toLowerCase() === b.trim().toLowerCase();
   }
-  return JSON.stringify(a) === JSON.stringify(b);
+  return canonicalJson(a) === canonicalJson(b);
 }

Use a recursive canonicalizer that sorts object keys while preserving array order.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/memory-engine/src/reconciliation.ts` around lines 179 - 185, Update
valuesEqual to compare structured values using a recursive canonicalizer that
sorts object keys while preserving array order, then compare the canonical
results. Keep the existing identity and case-insensitive trimmed string
handling, and ensure objects with identical properties in different insertion
orders are treated as equal.
packages/activities/src/memory-engine.activities.ts-837-842 (1)

837-842: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Persist conflicts discovered while merging duplicate memories.

reconcileAttributes can return conflicts here, but they are ignored and the loser is deleted. This silently resolves cross-source disagreements without creating reviewable ConflictRecord rows.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 837 - 842,
Update the duplicate-memory merge flow around reconcileAttributes so any
returned conflicts are persisted as reviewable ConflictRecord rows before the
loser memory is deleted. Reuse the existing conflict persistence mechanism and
ensure conflicts from the existing and incoming attributes are not discarded
while preserving the current reconciliation behavior.
packages/activities/src/memory-engine.activities.ts-549-556 (1)

549-556: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Do not report a successful workflow after event failures.

This catch converts errors into failed statistics, but the workflow only loops on processed and never checks failed; it therefore continues and finalizes the run as successful. Propagate a batch failure or make the workflow fail when failed > 0.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 549 - 556,
Update the workflow’s event-processing flow around the catch block that
increments stats.failed so failures are propagated or explicitly cause the
workflow to fail when failed > 0. Ensure the finalization path cannot report a
successful run after any memory event application fails, while preserving the
existing failed-event status update.
packages/activities/src/memory-engine.activities.ts-945-965 (1)

945-965: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Honor MANUAL and SOURCE_PRIORITY during post-resolution.

MANUAL conflicts can currently be auto-resolved, while SOURCE_PRIORITY falls through to timestamp comparison. Skip automatic resolution for MANUAL and reuse the domain conflict resolver for every other strategy.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 945 - 965,
Update the post-resolution logic around clearWinner and the conflictRecord
update to skip conflicts using the MANUAL strategy. For all other strategies,
determine the winning value through the existing domain conflict resolver so
SOURCE_PRIORITY and other strategies are handled consistently instead of falling
back to timestamp comparison; preserve the existing AUTO_RESOLVED persistence
behavior.
packages/activities/src/memory-engine.activities.ts-321-343 (1)

321-343: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Make all bounded stages resumable.

The tuning limits currently truncate stable queries without cursors, so each run can revisit the same rows while permanently starving the remainder.

  • packages/activities/src/memory-engine.activities.ts#L321-L343: paginate objects and mentions, preserving continuation across collection rounds.
  • packages/activities/src/memory-engine.activities.ts#L895-L900: paginate timeline rebuilding so every timeline is eventually refreshed.
  • packages/activities/src/memory-engine.activities.ts#L938-L941: rotate or cursor past unresolved conflicts so later records are examined.
  • packages/activities/src/memory-engine.activities.ts#L978-L982: paginate scoring so decaying scores are eventually recomputed for every active memory.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 321 - 343,
Make every bounded memory-engine stage resumable instead of repeatedly selecting
the same first page: in packages/activities/src/memory-engine.activities.ts
lines 321-343, add stable cursor pagination for objects and their mentions
across collection rounds; in lines 895-900, paginate timeline rebuilding so each
timeline is eventually refreshed; in lines 938-941, rotate or cursor past
unresolved conflicts; and in lines 978-982, paginate scoring so every active
memory is eventually recomputed. Preserve the existing tuning limits and
processing behavior while carrying continuation state between rounds.
packages/activities/src/memory-engine.activities.ts-299-306 (1)

299-306: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Merge entity state instead of replacing it with one memory’s attributes.

Every event overwrites currentState; an episodic mention with empty attributes therefore clears status, priority, and assignee previously derived from semantic memory. Merge into the existing entity state and avoid regressing lastEventAt.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 299 - 306,
Update the entity-state persistence logic around the currentState update to
merge attrs into the existing currentState rather than replacing it, preserving
previously derived status, priority, and assignee when attrs are empty or
partial. Ensure lastEventAt only advances and cannot regress when processing an
older event, while retaining the version increment and other update behavior.
packages/activities/src/memory-engine.activities.ts-847-888 (1)

847-888: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Snapshot the merged values rather than the stale survivor values.

The memory row receives recalculated confidence and importance, but the new version snapshot stores the pre-merge values from survivor. Compute both once and use them in the update and snapshot.

Proposed fix
       const sources = distinctSources(reconciled.merged);
       const version = survivor.version + 1;
+      const confidence = aggregateConfidence(reconciled.merged, sources);
+      const importance = Math.max(survivor.importance, loser.importance);

       await tx.memory.update({
...
-          confidence: aggregateConfidence(reconciled.merged, sources),
-          importance: Math.max(survivor.importance, loser.importance),
+          confidence,
+          importance,
...
-          confidence: survivor.confidence,
-          importance: survivor.importance,
+          confidence,
+          importance,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 847 - 888,
In the merge flow, compute the reconciled confidence and importance once before
the survivor update, then reuse those values in both the tx.memory.update call
and the snapshot invocation. Replace the snapshot’s stale survivor.confidence
and survivor.importance references while preserving the recalculated merged
attributes and existing update behavior.
packages/activities/src/memory-engine.activities.ts-363-401 (1)

363-401: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Preserve the object’s creation event when its current version exceeds one.

On first collection of an already-updated object, Line 365 emits an UPDATED event at createdAt, followed by another update event. The timeline never receives its creation event.

Proposed fix
-          type: obj.version > 1 ? 'KNOWLEDGE_OBJECT_UPDATED' : 'KNOWLEDGE_OBJECT_CREATED',
+          type: 'KNOWLEDGE_OBJECT_CREATED',
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 363 - 401,
Update the initial event construction in the object collection flow so it always
emits the object’s creation event at createdAt, including when obj.version
exceeds one; reserve KNOWLEDGE_OBJECT_UPDATED for the later updatedAt event
guarded by the existing version check. Preserve the existing payload and
ordering while changing the initial event type selection.
packages/activities/src/memory-engine.activities.ts-658-676 (1)

658-676: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Version summary-only changes.

changed only considers reconciled attributes and conflicts, so an updated knowledge-object summary is discarded when its attributes remain unchanged. Compare the incoming summary independently, update it, and increment/snapshot the version when it changes.

Proposed direction
-        changed = reconciled.changed.length > 0 || reconciled.conflicts.length > 0;
+        const summary = payload.summary ?? existing.summary;
+        const summaryChanged = summary !== existing.summary;
+        changed =
+          summaryChanged ||
+          reconciled.changed.length > 0 ||
+          reconciled.conflicts.length > 0;
...
-        const summary = payload.summary && changed ? payload.summary : existing.summary;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 658 - 676,
The update flow around changed, summary, and version must detect summary-only
changes. Compare payload.summary with existing.summary independently, use that
result to update changed and increment the version, and preserve the existing
summary when no incoming summary change is present.
services/temporal-worker/src/config.ts-116-123 (1)

116-123: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Validate MEMORY_SCORE_WEIGHTS at runtime. JSON.parse here still accepts arrays, null, extra keys, and nonnumeric or negative values, and those can flow into scoring as NaN or unintended weights. Use a strict Zod object with the five finite, nonnegative numeric fields.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/temporal-worker/src/config.ts` around lines 116 - 123, The
parseScoreWeights function currently accepts invalid JSON shapes and score
values. Replace the unchecked JSON.parse result with strict Zod validation
requiring exactly the five score-weight fields, each a finite nonnegative
number; preserve the existing invalid-input error behavior and return the
validated MemoryTuning['scoreWeights'] value.
packages/activities/src/memory-engine.activities.ts-518-542 (1)

518-542: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Atomically claim pending events before applying them. Concurrent runs can read the same PENDING rows before either one marks them PROCESSED, so both may reconcile the same event and duplicate references, versions, or conflicts. Claim each row first with a conditional status transition, or enforce one active organization run.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 518 - 542,
Update applyMemoryEvents to atomically claim each event before calling applyOne:
conditionally transition the row from PENDING to an in-progress status and
continue only when that update succeeds. Use the event identifier and
organization scope in the conditional update, preserving processing for uniquely
claimed rows and preventing concurrent runs from applying the same event.
packages/activities/src/memory-engine.activities.ts-594-677 (1)

594-677: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Handle terminal memories before the normal update path
findUnique can return MERGED, EXPIRED, or ARCHIVED rows, and this code updates them in place without restoring visibility. Merged-loser dedupe keys also stay attached to the hidden row instead of the survivor, so define redirect/reactivation behavior explicitly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 594 - 677,
Handle terminal statuses immediately after the findUnique lookup, before the
normal create/update branches. For MERGED memories, resolve the dedupe key to
the surviving memory and apply the observation there rather than updating the
hidden loser; for EXPIRED or ARCHIVED memories, explicitly reactivate them or
create a replacement according to the intended visibility rules. Ensure dedupe
keys no longer remain attached only to merged losers, and preserve the existing
reconciliation flow for active memories.
packages/workflows/src/workflows/memory-engine.workflow.ts-115-123 (1)

115-123: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Do not report success unless the event queue is confirmed drained.

After 25 non-empty batches, execution proceeds to later stages and returns COMPLETED even though pending events may remain. Extend the activity result with hasMore/remaining, then fail or continue processing when the cap is reached without confirmed drainage.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/workflows/src/workflows/memory-engine.workflow.ts` around lines 115
- 123, Update the memory-event processing loop in the workflow to track whether
the queue is fully drained, using the ingest result’s hasMore or remaining
indicator alongside processed counts. When MAX_APPLY_ROUNDS is reached with
pending events, do not proceed to later stages or return COMPLETED; instead
continue processing or return the established failure/incomplete outcome, while
preserving normal completion when drainage is confirmed.
🟡 Minor comments (8)
apps/api/src/modules/memory/memory.service.ts-463-487 (1)

463-487: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Do not let malformed observability data fail the stats endpoint.

An invalid Redis value makes JSON.parse throw and turns the entire statistics request into a 500. Parse defensively and return null or a structured unavailable state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/api/src/modules/memory/memory.service.ts` around lines 463 - 487, Update
the statistics response’s processingStatus handling around lastRunRaw so
malformed Redis data cannot throw from JSON.parse. Catch parsing failures and
return null (or the existing structured unavailable representation), while
preserving valid JSON parsing and the rest of the stats response.
apps/api/src/modules/memory/memory.service.ts-100-112 (1)

100-112: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Exclude soft-deleted memories from detail lookups.

Unlike listing and entity queries, this lookup omits deletedAt: null, so a removed memory remains accessible by its ID.

-      where: { id, organizationId },
+      where: { id, organizationId, deletedAt: null },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/api/src/modules/memory/memory.service.ts` around lines 100 - 112, Update
the Prisma query in getMemory to require deletedAt to be null alongside id and
organizationId, ensuring soft-deleted memories are not returned while preserving
the existing includes and not-found behavior.
apps/web/src/components/memory/util.ts-3-25 (1)

3-25: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use accessible badge color pairs.

Several backgrounds, including ORGANIZATIONAL, WORKING, KNOWLEDGE, and GIT, lack sufficient contrast with the fixed text-white used by consumers. Darken these colors or expose a matching foreground color.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/components/memory/util.ts` around lines 3 - 25, Update the color
definitions in MEMORY_TYPE_COLOR and SOURCE_COLOR so ORGANIZATIONAL, WORKING,
KNOWLEDGE, and GIT provide sufficient contrast with consumers’ fixed text-white
foreground; prefer darkening those background values while preserving the
existing color-map API and all other mappings.
apps/web/src/app/(app)/memory/page.tsx-149-177 (1)

149-177: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the call-to-action match its destination.

“View entity timeline” is inside the card link to /memory/${m.id}, so clicking it opens memory details. Rename it to “View memory details” or render a separate link to /memory/entity/${m.entityId}.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/app/`(app)/memory/page.tsx around lines 149 - 177, Update the
entityId call-to-action inside the memory card rendered by the memories map so
its label matches the existing `/memory/${m.id}` destination; rename “View
entity timeline” to “View memory details” and preserve the current conditional
rendering and styling.
apps/web/src/app/(app)/memory/page.tsx-39-47 (1)

39-47: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clear stale request errors before retrying.

Each loader only sets error on rejection. After a filter, range, status, or route change succeeds, the previous error remains rendered.

  • apps/web/src/app/(app)/memory/page.tsx#L39-L47: clear the list error when starting or successfully completing load().
  • apps/web/src/app/(app)/memory/[id]/page.tsx#L37-L41: clear the previous detail error when id changes.
  • apps/web/src/app/(app)/memory/changes/page.tsx#L20-L25: clear the error when loading another date range.
  • apps/web/src/app/(app)/memory/conflicts/page.tsx#L44-L48: clear the error when changing status or refreshing after resolution.
  • apps/web/src/app/(app)/memory/entity/[id]/page.tsx#L20-L26: clear the previous entity error when id changes.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/app/`(app)/memory/page.tsx around lines 39 - 47, Clear stale
errors before each relevant memory request: in
apps/web/src/app/(app)/memory/page.tsx lines 39-47, reset the list error at the
start or successful completion of load(); in
apps/web/src/app/(app)/memory/[id]/page.tsx lines 37-41 and
apps/web/src/app/(app)/memory/entity/[id]/page.tsx lines 20-26, reset the
detail/entity error when id changes; in
apps/web/src/app/(app)/memory/changes/page.tsx lines 20-25, reset the error when
loading a new date range; and in
apps/web/src/app/(app)/memory/conflicts/page.tsx lines 44-48, reset it when
status changes or refresh follows resolution.
apps/web/src/app/(app)/memory/conflicts/page.tsx-105-107 (1)

105-107: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Highlight previous-value resolutions.

The previous side is always passed active={false}, so PREVIOUS_WINS resolutions are displayed incorrectly.

-<Side label="Previous" side={c.previous} active={false} />
+<Side label="Previous" side={c.previous} active={c.resolution === 'PREVIOUS_WINS'} />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/app/`(app)/memory/conflicts/page.tsx around lines 105 - 107,
Update the Previous Side invocation in the conflicts page to set active based on
whether c.resolution is 'PREVIOUS_WINS', while preserving the existing
Latest-side behavior for 'LATEST_WINS'.
packages/activities/src/memory-engine.activities.ts-987-991 (1)

987-991: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Find the latest reference timestamp instead of trusting array order.

A late-arriving historical event is appended last and incorrectly becomes lastEventAt, reducing the memory’s recency score. Select the maximum reference timestamp.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/activities/src/memory-engine.activities.ts` around lines 987 - 991,
Update the lastEventAt calculation near readReferences and frequencyCount to
derive the latest timestamp by comparing all reference at values, rather than
using refs[refs.length - 1]. Preserve memory.updatedAt.toISOString() as the
fallback when refs is empty or timestamps are unavailable.
packages/workflows/src/definitions.ts-45-45 (1)

45-45: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Model and assign terminal progress states accurately.

The progress contract lacks FAILED, while the workflow assigns COMPLETE before finalization and retains it if finalization fails.

  • packages/workflows/src/definitions.ts#L45-L45: add FAILED to the stage union.
  • packages/workflows/src/workflows/memory-engine.workflow.ts#L156-L197: assign COMPLETE after successful finalization and assign FAILED in the catch path.
Proposed fix
- stage: 'COLLECT' | 'APPLY' | 'MERGE' | 'TIMELINE' | 'CONFLICT' | 'SCORE' | 'COMPLETE';
+ stage: 'COLLECT' | 'APPLY' | 'MERGE' | 'TIMELINE' | 'CONFLICT' | 'SCORE' | 'COMPLETE' | 'FAILED';
-    progress.stage = 'COMPLETE';
     await finalize.finalizeMemoryRun({
       // ...
     });
+    progress.stage = 'COMPLETE';
 
   } catch (error) {
     const message = error instanceof Error ? error.message : String(error);
+    progress.stage = 'FAILED';
     progress.error = message;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/workflows/src/definitions.ts` at line 45, Extend the stage union in
packages/workflows/src/definitions.ts at lines 45-45 with FAILED. In
packages/workflows/src/workflows/memory-engine.workflow.ts at lines 156-197,
move the COMPLETE assignment to after successful finalization and set the
progress stage to FAILED in the catch path.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Major comments:
In
`@apps/api/prisma/migrations/20260716110000_company_memory_engine/migration.sql`:
- Around line 273-289: Update the migration’s tenant-owned relationship
constraints, including memories_mergedIntoId_fkey,
memory_versions_memoryId_fkey, memory_events_memoryId_fkey,
memory_timeline_events_timelineId_fkey, conflict_records_memoryId_fkey, and
memory_scores_memoryId_fkey, to use composite keys carrying organizationId. Add
the corresponding unique parent keys such as (id, organizationId) on referenced
tenant tables, and ensure each child foreign key references both the related ID
and organizationId while preserving the existing delete/update actions.

In `@apps/api/prisma/schema.prisma`:
- Around line 1336-1395: Replace the plain @@unique constraint on Memory with a
partial unique index that enforces uniqueness only for rows with status ACTIVE
and deletedAt IS NULL. Update the corresponding migration/index definition as
well, while preserving uniqueness across organizationId, memoryType, and
dedupeKey for eligible memories.

In `@apps/api/src/modules/memory/memory.schemas.ts`:
- Around line 58-62: Update resolveConflictBodySchema to use a discriminated
union for choice: keep latest and previous branches with optional or absent
value as appropriate, and define the custom branch with value required as
z.unknown() so explicit null remains valid. Ensure resolveConflict() can no
longer receive a custom choice without a value.
- Around line 11-16: The filter schemas currently accept arbitrary uppercase
strings instead of validating against Prisma enum values. Replace enumString
usage in listMemoryQuerySchema and the corresponding timeline, changes, and
conflicts query schemas with z.nativeEnum or explicit z.enum definitions tied to
each field’s actual Prisma enum, so unsupported filters are rejected during
request validation.

In `@apps/api/src/modules/memory/memory.service.ts`:
- Around line 339-395: Update resolveConflict() to use one interactive Prisma
transaction that re-fetches the conflict with status OPEN and validates its
version snapshot before resolving it. Move applyAttribute()’s memory read and
update into that transaction to avoid overwriting concurrent changes, and create
the corresponding MemoryVersion within the same transaction so manual
resolutions appear in /changes. Ensure the conflict update is guarded against
repeated resolution and return the transaction’s updated conflict.

In `@apps/web/src/app/`(app)/memory/conflicts/page.tsx:
- Around line 53-62: Update resolve so it awaits the load() refresh after
memoryApi.resolveConflict succeeds, keeping the conflict busy until refreshed
data has completed loading. Preserve the existing error handling and
setBusy(null) cleanup in the finally block.

In `@packages/activities/src/memory-engine.activities.ts`:
- Around line 837-842: Update the duplicate-memory merge flow around
reconcileAttributes so any returned conflicts are persisted as reviewable
ConflictRecord rows before the loser memory is deleted. Reuse the existing
conflict persistence mechanism and ensure conflicts from the existing and
incoming attributes are not discarded while preserving the current
reconciliation behavior.
- Around line 549-556: Update the workflow’s event-processing flow around the
catch block that increments stats.failed so failures are propagated or
explicitly cause the workflow to fail when failed > 0. Ensure the finalization
path cannot report a successful run after any memory event application fails,
while preserving the existing failed-event status update.
- Around line 945-965: Update the post-resolution logic around clearWinner and
the conflictRecord update to skip conflicts using the MANUAL strategy. For all
other strategies, determine the winning value through the existing domain
conflict resolver so SOURCE_PRIORITY and other strategies are handled
consistently instead of falling back to timestamp comparison; preserve the
existing AUTO_RESOLVED persistence behavior.
- Around line 321-343: Make every bounded memory-engine stage resumable instead
of repeatedly selecting the same first page: in
packages/activities/src/memory-engine.activities.ts lines 321-343, add stable
cursor pagination for objects and their mentions across collection rounds; in
lines 895-900, paginate timeline rebuilding so each timeline is eventually
refreshed; in lines 938-941, rotate or cursor past unresolved conflicts; and in
lines 978-982, paginate scoring so every active memory is eventually recomputed.
Preserve the existing tuning limits and processing behavior while carrying
continuation state between rounds.
- Around line 299-306: Update the entity-state persistence logic around the
currentState update to merge attrs into the existing currentState rather than
replacing it, preserving previously derived status, priority, and assignee when
attrs are empty or partial. Ensure lastEventAt only advances and cannot regress
when processing an older event, while retaining the version increment and other
update behavior.
- Around line 847-888: In the merge flow, compute the reconciled confidence and
importance once before the survivor update, then reuse those values in both the
tx.memory.update call and the snapshot invocation. Replace the snapshot’s stale
survivor.confidence and survivor.importance references while preserving the
recalculated merged attributes and existing update behavior.
- Around line 363-401: Update the initial event construction in the object
collection flow so it always emits the object’s creation event at createdAt,
including when obj.version exceeds one; reserve KNOWLEDGE_OBJECT_UPDATED for the
later updatedAt event guarded by the existing version check. Preserve the
existing payload and ordering while changing the initial event type selection.
- Around line 658-676: The update flow around changed, summary, and version must
detect summary-only changes. Compare payload.summary with existing.summary
independently, use that result to update changed and increment the version, and
preserve the existing summary when no incoming summary change is present.
- Around line 518-542: Update applyMemoryEvents to atomically claim each event
before calling applyOne: conditionally transition the row from PENDING to an
in-progress status and continue only when that update succeeds. Use the event
identifier and organization scope in the conditional update, preserving
processing for uniquely claimed rows and preventing concurrent runs from
applying the same event.
- Around line 594-677: Handle terminal statuses immediately after the findUnique
lookup, before the normal create/update branches. For MERGED memories, resolve
the dedupe key to the surviving memory and apply the observation there rather
than updating the hidden loser; for EXPIRED or ARCHIVED memories, explicitly
reactivate them or create a replacement according to the intended visibility
rules. Ensure dedupe keys no longer remain attached only to merged losers, and
preserve the existing reconciliation flow for active memories.

In `@packages/memory-engine/src/reconciliation.ts`:
- Around line 210-218: The same-value branch in the reconciliation logic must
not mix provenance fields from separate observations. Update the merge handling
around valuesEqual to retain one complete Provenanced record—prefer the
observation whose confidence and timestamp are selected—or model reinforcement
metadata separately, ensuring source, confidence, timestamp, and other
provenance fields remain internally consistent.
- Around line 179-185: Update valuesEqual to compare structured values using a
recursive canonicalizer that sorts object keys while preserving array order,
then compare the canonical results. Keep the existing identity and
case-insensitive trimmed string handling, and ensure objects with identical
properties in different insertion orders are treated as equal.

In `@packages/memory-engine/src/scoring.ts`:
- Around line 82-83: Update the frequency calculation near the scoring
function’s saturation logic to handle non-positive frequency saturation before
division. Return a frequency of zero when the effective event count is zero, and
validate or otherwise safely handle non-positive saturation for positive counts
so neither frequency nor composite becomes NaN.

In `@packages/memory-engine/src/timeline.ts`:
- Around line 111-119: Update the dedupeHash construction in the timeline event
flow to use eventId as the source-event identity when present, preventing
distinct events from colliding. For drafts without an eventId, retain the
fallback fields but canonicalize changesSummary by sorting change keys. Update
describeChanges to iterate over sorted entries so equivalent change objects
produce identical hashes.

In `@packages/workflows/src/workflows/memory-engine.workflow.ts`:
- Around line 115-123: Update the memory-event processing loop in the workflow
to track whether the queue is fully drained, using the ingest result’s hasMore
or remaining indicator alongside processed counts. When MAX_APPLY_ROUNDS is
reached with pending events, do not proceed to later stages or return COMPLETED;
instead continue processing or return the established failure/incomplete
outcome, while preserving normal completion when drainage is confirmed.

In `@services/temporal-worker/src/config.ts`:
- Around line 116-123: The parseScoreWeights function currently accepts invalid
JSON shapes and score values. Replace the unchecked JSON.parse result with
strict Zod validation requiring exactly the five score-weight fields, each a
finite nonnegative number; preserve the existing invalid-input error behavior
and return the validated MemoryTuning['scoreWeights'] value.

---

Minor comments:
In `@apps/api/src/modules/memory/memory.service.ts`:
- Around line 463-487: Update the statistics response’s processingStatus
handling around lastRunRaw so malformed Redis data cannot throw from JSON.parse.
Catch parsing failures and return null (or the existing structured unavailable
representation), while preserving valid JSON parsing and the rest of the stats
response.
- Around line 100-112: Update the Prisma query in getMemory to require deletedAt
to be null alongside id and organizationId, ensuring soft-deleted memories are
not returned while preserving the existing includes and not-found behavior.

In `@apps/web/src/app/`(app)/memory/conflicts/page.tsx:
- Around line 105-107: Update the Previous Side invocation in the conflicts page
to set active based on whether c.resolution is 'PREVIOUS_WINS', while preserving
the existing Latest-side behavior for 'LATEST_WINS'.

In `@apps/web/src/app/`(app)/memory/page.tsx:
- Around line 149-177: Update the entityId call-to-action inside the memory card
rendered by the memories map so its label matches the existing `/memory/${m.id}`
destination; rename “View entity timeline” to “View memory details” and preserve
the current conditional rendering and styling.
- Around line 39-47: Clear stale errors before each relevant memory request: in
apps/web/src/app/(app)/memory/page.tsx lines 39-47, reset the list error at the
start or successful completion of load(); in
apps/web/src/app/(app)/memory/[id]/page.tsx lines 37-41 and
apps/web/src/app/(app)/memory/entity/[id]/page.tsx lines 20-26, reset the
detail/entity error when id changes; in
apps/web/src/app/(app)/memory/changes/page.tsx lines 20-25, reset the error when
loading a new date range; and in
apps/web/src/app/(app)/memory/conflicts/page.tsx lines 44-48, reset it when
status changes or refresh follows resolution.

In `@apps/web/src/components/memory/util.ts`:
- Around line 3-25: Update the color definitions in MEMORY_TYPE_COLOR and
SOURCE_COLOR so ORGANIZATIONAL, WORKING, KNOWLEDGE, and GIT provide sufficient
contrast with consumers’ fixed text-white foreground; prefer darkening those
background values while preserving the existing color-map API and all other
mappings.

In `@packages/activities/src/memory-engine.activities.ts`:
- Around line 987-991: Update the lastEventAt calculation near readReferences
and frequencyCount to derive the latest timestamp by comparing all reference at
values, rather than using refs[refs.length - 1]. Preserve
memory.updatedAt.toISOString() as the fallback when refs is empty or timestamps
are unavailable.

In `@packages/workflows/src/definitions.ts`:
- Line 45: Extend the stage union in packages/workflows/src/definitions.ts at
lines 45-45 with FAILED. In
packages/workflows/src/workflows/memory-engine.workflow.ts at lines 156-197,
move the COMPLETE assignment to after successful finalization and set the
progress stage to FAILED in the catch path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 682f1964-1c51-4c0f-af02-b71ebb5810e4

📥 Commits

Reviewing files that changed from the base of the PR and between da51021 and d053d20.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (40)
  • .env.example
  • apps/api/prisma/migrations/20260716110000_company_memory_engine/migration.sql
  • apps/api/prisma/schema.prisma
  • apps/api/src/app.ts
  • apps/api/src/modules/memory/memory.routes.ts
  • apps/api/src/modules/memory/memory.schemas.ts
  • apps/api/src/modules/memory/memory.service.ts
  • apps/web/src/app/(app)/layout.tsx
  • apps/web/src/app/(app)/memory/[id]/page.tsx
  • apps/web/src/app/(app)/memory/changes/page.tsx
  • apps/web/src/app/(app)/memory/conflicts/page.tsx
  • apps/web/src/app/(app)/memory/entity/[id]/page.tsx
  • apps/web/src/app/(app)/memory/page.tsx
  • apps/web/src/components/memory/util.ts
  • apps/web/src/lib/api.ts
  • docs/memory-engine.md
  • packages/activities/package.json
  • packages/activities/src/index.ts
  • packages/activities/src/memory-engine.activities.ts
  • packages/activities/src/memory.context.ts
  • packages/memory-engine/eslint.config.mjs
  • packages/memory-engine/package.json
  • packages/memory-engine/src/config.ts
  • packages/memory-engine/src/conflict.ts
  • packages/memory-engine/src/index.ts
  • packages/memory-engine/src/reconciliation.test.ts
  • packages/memory-engine/src/reconciliation.ts
  • packages/memory-engine/src/scoring.test.ts
  • packages/memory-engine/src/scoring.ts
  • packages/memory-engine/src/timeline.test.ts
  • packages/memory-engine/src/timeline.ts
  • packages/memory-engine/src/types.ts
  • packages/memory-engine/tsconfig.json
  • packages/workflows/src/constants.ts
  • packages/workflows/src/definitions.ts
  • packages/workflows/src/index.ts
  • packages/workflows/src/workflows/memory-engine.workflow.ts
  • services/temporal-worker/package.json
  • services/temporal-worker/src/config.ts
  • services/temporal-worker/src/index.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant