Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ jobs:
name: Analyze JavaScript and TypeScript
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 20
# Reuse main's CodeQL database for pull requests and analyze the diff with
# the existing code as context. CodeQL falls back to a full scan when the
# base database, diff ranges, or runner requirements are unavailable.
env:
CODEQL_ACTION_OVERLAY_ANALYSIS: "true"
CODEQL_ACTION_OVERLAY_ANALYSIS_CODE_SCANNING_JAVASCRIPT: "true"
CODEQL_ACTION_DIFF_INFORMED_QUERIES: "true"
steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 0.1.44-beta.16 - 2026-09-23

### Added

- Add opt-in Memory & Evolution setup controls with bounded evidence, policy
gating, candidate review, and reversible project-scoped promotion.
- Add adaptive reasoning policy/runtime support with explicit user controls and
focused validation coverage.

### Changed

- Accept provider-native and local model identifiers without a rigid catalog
allowlist while preserving provider and path safety validation.
- Aggregate prompt-cache usage across the active user turn for more accurate TUI
status reporting.

### Fixed

- Harden queued peer delivery, compaction recovery, and session state checks so
accepted messages are not persisted into a target session while its runner is
still busy.

### Tests

- Add focused regressions for Memory & Evolution, adaptive reasoning, provider
compatibility, model validation, prompt cache reporting, and peer delivery.

## 0.1.44-beta.15 - 2026-09-14

### Fixed
Expand Down
46 changes: 46 additions & 0 deletions docs/memory-center.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,52 @@ Generated changes can come from normal extraction, Memory Center side chat, or
Dream. They all land in the same review model: a proposal must be inspected,
edited, applied, or rejected by the user before it changes saved memory.

## Memory & Evolution (local implementation)

Setup exposes project-scoped Evolution separately from **using saved memory**.
Without explicit Evolution consent, existing legacy memory learning remains unchanged.
Adopting Evolution replaces automatic legacy extraction/Dream for that project;
it does not disable manually requested memory tools or delete saved entries.

- **Off:** blocks new capture, inference and promotion; cancels Evolution work and
rejects late results. Previously approved artifacts remain active.
- **Observe:** retains bounded metadata only, without free text or provider calls.
- **Suggest:** authorized evidence produces review-only memory, skill and workflow
proposals. Skills/workflows require explicit approval; saving a workflow never runs it.
- **Auto-safe (limited):** permits only an exact user correction in the form
`Project language: TypeScript.` (also JavaScript, Python, Rust or Go), with low
sensitivity and the project-stack category. Project memory must be empty, and
contradictory current corrections block automatic application. Everything else,
including permission/security/model rules, remains pending for review.

Corrections can be entered from Setup or through a chat message beginning with
`Correction:` or `Corrección:`. Optional tool/test evidence records host completion
metadata, not stdout or assistant claims. A zero process exit status is not proof
that an entire task passed a semantic audit.

Provider processing requires separate consent. Local storage **does not mean local
inference**: the selected provider may receive authorized evidence and consume quota.
Evolution uses the configured extractor/distiller role without silently switching
models. Evidence is limited to 500 records, 4 KiB per record and a 30-day eligible
window; each run uses at most five current evidence records, lasts at most 60 seconds,
and produces at most five candidates. Expired records are excluded from processing;
physical pruning occurs when the evidence ledger is next rewritten.

Daily execution uses the existing Dream service and registered workspaces. Setting a
schedule does not install or start a service. There is a five-minute admission window,
at most one claimed attempt per project/local date, and no automatic retry or late
catch-up after failure or restart. The scheduler admits at most one Evolution run per
tick. Use **Run once** for missed windows.

**Revert Evolution memories** archives an unchanged newly-created memory and retires
its graph projection without deleting graph content. An entry modified after promotion
requires manual review instead. Reversion remains available while Evolution is Off.
Capability rollback similarly checks the promoted file hash or workflow revision and
refuses to overwrite later edits.

This is contextual learning, not weight training or automatic source-code editing.
Schema validation alone does not establish the usefulness of a generated capability.

## Memory Side Agent

The side chat is intentionally constrained, but it is still powerful inside the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ async function main() {
"Press Enter to submit it, press Esc once to arm interruption, then press Esc again within five seconds to cancel it.",
`The local model holds that request for ${Math.round(HOLD_MS / 1_000)} seconds so the queued state is visible.`,
"Only one smoke can run at a time. Exit with /exit or Ctrl+C; child processes and the lock are cleaned automatically.",
"Expected result: the second Esc issues one cancellation; the compaction summary terminates once, Snake disappears, the panel collapses, and queued messages remain paired with their queued/send state.",
"Expected result: the second Esc issues one cancellation; the compaction summary terminates once, Snake's final board stays visible and stops advancing, the transcript collapses, and queued messages remain paired with their queued/send state.",
"",
].join("\n"),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ import {
readPromptStatusScript,
resolvePromptCachePercent,
resolvePromptStatus,
resolvePromptTurnCachePercent,
type MendPromptStatusBuiltin,
type MendPromptStatusScriptOutput,
type MendPromptStatusScriptResult,
Expand Down Expand Up @@ -1749,6 +1750,11 @@ export function Prompt(props: PromptProps) {
const sessionID = props.sessionID
if (!sessionID) return
const messages = sync.data.message[sessionID] ?? []
const turnPercent = resolvePromptTurnCachePercent({
messages,
activeAssistantID: findActiveWorkingAssistant()?.id,
})
if (turnPercent !== undefined) return turnPercent
const active = findActiveWorkingAssistant()
if (active?.liveUsage) return resolvePromptCachePercent(active.liveUsage)
const last = messages.findLast((item): item is AssistantMessage => item.role === "assistant")
Expand Down
Loading
Loading