chore(memory): delete internal/memory (unification slice 5) (#889)
Deletes internal/memory (Manager, builtin.Provider, memory_edit tool) now
that slices 2-4 built the CRUD engine family and its per-turn read/write
seams. Also deletes internal/infrastructure/memory/builtin/provider.go (the
memory_edit adapter over the old package -- its markdown store already
relocated in slice 2), internal/tools/provider/memory (the old tool
registration, redundant with slice 4's memory_create/update/delete/list),
config.Memory.{Provider,ProviderConfig} and the validateMemory rejection
that existed only to complain about Provider, and webui.MemoryStatus/
MemoryProviderHandle plus its dashboard page -- never wired in production
(s.Memory was always nil), confirmed by /api/capabilities always reporting
"memory": false.
Rewrites ARCHITECTURE.md's "Memory engine family" section to describe the
current engine (internal/domain/memory contract, internal/infrastructure/
memory builtin engine + its builtin/ markdown store, the per-turn read seam
in gateway/turn_memory.go, the per-turn write tools in
gateway/turn_memory_tool.go) instead of the deleted Manager. Fixes two
docs/architecture/configuration.md rows that described the deleted
manager's literals and SaveConfig mechanism.
This commit is contained in:
43 files changed
+92
-5619
No files matched your search
@@ -132,7 +132,6 @@ export const api = {
|
||||
bindingUpdate: (id, binding) => request(`/api/bindings/${id}`, { method: "PATCH", body: binding }),
|
||||
bindingDelete: (id) => request(`/api/bindings/${id}`, { method: "DELETE", parse: false }),
|
||||
bindingApprove: (id) => request(`/api/bindings/${id}/approve`, { method: "POST" }),
|
||||
memory: () => request("/api/memory"),
|
||||
chatSessions: () => request("/api/chat/sessions"),
|
||||
chatMessages: (id) => request(`/api/chat/sessions/${encodeURIComponent(id)}/messages`),
|
||||
chatTurns: (id) => request(`/api/chat/sessions/${encodeURIComponent(id)}/turns`),
|
||||
|
||||
@@ -16,7 +16,6 @@ import { logsPage } from "./logs/logs.jsx";
|
||||
import { capturesPage } from "./captures/captures.jsx";
|
||||
import { mappingsPage } from "./mappings/mappings.jsx";
|
||||
import { bindingsPage } from "./bindings/bindings.jsx";
|
||||
import { memoryPage } from "./memory/memory.jsx";
|
||||
import { ChatPage } from "./chat/chat.jsx";
|
||||
import { matchRoute, navPath } from "./routing.jsx";
|
||||
|
||||
@@ -53,7 +52,6 @@ const routes = [
|
||||
{ path: "/bindings", label: "Playbook bindings", icon: "bindings", view: bindingsPage, section: "bindings" },
|
||||
{ path: "/skills", label: "Skills", icon: "skills", view: skillsPage, section: "skills" },
|
||||
{ path: "/workflows", label: "Workflows", icon: "workflows", view: workflowsPage, section: "workflows" },
|
||||
{ path: "/memory", label: "Memory", icon: "memory", view: memoryPage, section: "memory" },
|
||||
{ path: "/curators", label: "Curators", icon: "curators", view: curatorsPage, section: "curators" },
|
||||
{ path: "/channels", label: "Channels", icon: "channels", view: channelsPage, section: "channels" },
|
||||
{ path: "/settings", label: "Configuration", icon: "settings", view: settingsPage, section: "settings" },
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/* Memory view: provider cards listing the tools each gives the agent. */
|
||||
|
||||
.mem-loading {
|
||||
padding: var(--sp-5);
|
||||
text-align: center;
|
||||
color: var(--fg-muted);
|
||||
}
|
||||
|
||||
.mem-warning {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--warn);
|
||||
background: var(--warn-soft);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: var(--sp-2) var(--sp-3);
|
||||
margin: 0 0 var(--sp-3);
|
||||
}
|
||||
|
||||
.mem-tools {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--sp-2);
|
||||
}
|
||||
|
||||
.mem-tool {
|
||||
padding: var(--sp-3);
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--bg-raised);
|
||||
border: 1px solid var(--hairline);
|
||||
}
|
||||
|
||||
.mem-tool-name {
|
||||
font-size: var(--text-sm);
|
||||
color: var(--fg);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.mem-tool-desc {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--fg-muted);
|
||||
margin-top: 2px;
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
import { h } from "preact";
|
||||
import { useState, useEffect } from "preact/hooks";
|
||||
import "./memory.css";
|
||||
import { api } from "../base/api.jsx";
|
||||
import { Pill } from "../base/pill.jsx";
|
||||
|
||||
function Empty({ title, detail }) {
|
||||
return (
|
||||
<div className="empty">
|
||||
<div className="empty-title">{title}</div>
|
||||
{detail && <div>{detail}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function roleLabel(role) {
|
||||
return role === "external"
|
||||
? "Added by you — an external store Archie was given"
|
||||
: "Built in — always available to Archie";
|
||||
}
|
||||
|
||||
function ProviderCard({ provider: p }) {
|
||||
const tools = p.tools || [];
|
||||
return (
|
||||
<div className="card">
|
||||
<div className="card-head">
|
||||
<div>
|
||||
<h2 className="card-title">{p.name || "provider"}</h2>
|
||||
<p className="card-sub">{roleLabel(p.role)}</p>
|
||||
</div>
|
||||
{p.available ? <Pill text="ready" kind="ok" /> : <Pill text="unavailable" kind="danger" />}
|
||||
</div>
|
||||
{!p.available && (
|
||||
<p className="mem-warning">
|
||||
Configured but not usable right now — a required binary or connection may be missing.
|
||||
</p>
|
||||
)}
|
||||
{tools.length ? (
|
||||
<ul className="mem-tools">
|
||||
{tools.map((t, idx) => (
|
||||
<li className="mem-tool" key={idx}>
|
||||
<div className="mem-tool-name mono">{t.name}</div>
|
||||
{t.description && <div className="mem-tool-desc">{t.description}</div>}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : (
|
||||
<p className="mem-warning">This provider exposes no tools, so the agent cannot use it.</p>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function MemoryApp() {
|
||||
const [providers, setProviders] = useState(null);
|
||||
const [enabled, setEnabled] = useState(true);
|
||||
const [error, setError] = useState(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const load = async () => {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
try {
|
||||
const res = await api.memory();
|
||||
setEnabled(!!res.enabled);
|
||||
setProviders(res.providers || []);
|
||||
} catch (err) {
|
||||
setError(String(err.message || err));
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
load();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="page-head">
|
||||
<div>
|
||||
<h1 className="page-title">Memory</h1>
|
||||
<p className="page-sub">What Archie can recall between conversations, and the tools it uses to do it.</p>
|
||||
</div>
|
||||
<div className="page-actions">
|
||||
<button className="btn" onClick={load}>Refresh</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
{loading ? (
|
||||
<div className="card"><div className="mem-loading">Loading…</div></div>
|
||||
) : error ? (
|
||||
<div className="card"><Empty title="Cannot read memory providers" detail={error} /></div>
|
||||
) : !enabled || !providers.length ? (
|
||||
<div className="card">
|
||||
<Empty
|
||||
title="Memory is not configured"
|
||||
detail="Without a provider, Archie starts every conversation with no recollection of earlier ones."
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid grid-2">
|
||||
{providers.map((p, idx) => (
|
||||
<ProviderCard key={idx} provider={p} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function memoryPage(query) {
|
||||
return <MemoryApp query={query} />;
|
||||
}
|
||||
Reference in new issue
Block a user