@bcmyguest/openmem 0.0.0-stage → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/openmem/SKILL.md +34 -0
- package/LICENSE +190 -0
- package/README.md +140 -2
- package/bin/hindsight-project-index +530 -0
- package/cli/coding-agent/access-policy.mjs +38 -0
- package/cli/coding-agent/agents.mjs +34 -0
- package/cli/coding-agent/bank-from-cwd.mjs +140 -0
- package/cli/coding-agent/capabilities.mjs +34 -0
- package/cli/coding-agent/context-store.mjs +81 -0
- package/cli/coding-agent/context-trim.mjs +897 -0
- package/cli/coding-agent/file-io.mjs +72 -0
- package/cli/coding-agent/hook-harnesses.mjs +88 -0
- package/cli/coding-agent/hook-runner.mjs +284 -0
- package/cli/coding-agent/install-access.mjs +119 -0
- package/cli/coding-agent/install-context-proxy.mjs +333 -0
- package/cli/coding-agent/install-rtk.mjs +60 -0
- package/cli/coding-agent/install-shim.mjs +201 -0
- package/cli/coding-agent/opencode-config.mjs +107 -0
- package/cli/coding-agent/opencode-plugin.mjs +132 -0
- package/cli/coding-agent/opencode2-plugin/index.js +299 -0
- package/cli/coding-agent/recall-frame.mjs +29 -0
- package/cli/coding-agent/remove-upstream-access.mjs +122 -0
- package/cli/coding-agent/runtime.mjs +40 -0
- package/cli/coding-agent/session-db.mjs +626 -0
- package/cli/coding-agent/session-facade.mjs +86 -0
- package/cli/coding-agent/toml-edit.mjs +161 -0
- package/cli/cognee-mcp.mjs +260 -0
- package/cli/context-management.mjs +254 -0
- package/cli/feed-sync.mjs +27 -0
- package/cli/install-coding-agent.mjs +298 -0
- package/cli/install-memory-mcp.mjs +426 -0
- package/cli/is-main.mjs +18 -0
- package/cli/mcp/context-sql-runner.mjs +58 -0
- package/cli/mcp/context-store.mjs +670 -0
- package/cli/mcp/context.mjs +61 -0
- package/cli/mcp/export/cognee-dataset-name.mjs +12 -0
- package/cli/mcp/export/cognee.mjs +119 -0
- package/cli/mcp/export/hindsight.mjs +48 -0
- package/cli/mcp/export/index.mjs +26 -0
- package/cli/mcp/export/mem0.mjs +31 -0
- package/cli/mcp/knowledge.mjs +333 -0
- package/cli/mcp/llm-synthesize.mjs +50 -0
- package/cli/mcp/mem0-scope-id.mjs +22 -0
- package/cli/mcp/memory-facade.mjs +521 -0
- package/cli/mcp/memory-reflect-consolidate.mjs +120 -0
- package/cli/mcp/notebooklm-banks.mjs +21 -0
- package/cli/mcp/notebooklm-hindsight-rest.mjs +45 -0
- package/cli/mcp/notebooklm-provider.mjs +225 -0
- package/cli/mcp/pmm-records.mjs +23 -0
- package/cli/mcp/portability.mjs +158 -0
- package/cli/mcp/stdio.mjs +65 -0
- package/cli/mcp/unified-mcp-install.mjs +65 -0
- package/cli/mem0-mcp.mjs +108 -0
- package/cli/notebooklm-mcp.mjs +236 -0
- package/cli/openmem-mcp.mjs +38 -0
- package/cli/openmem.mjs +222 -0
- package/cli/roots.mjs +85 -0
- package/cli/schedule.mjs +176 -0
- package/cli/stack.mjs +438 -0
- package/cli/switch-memory-provider.mjs +358 -0
- package/cli/wiring-report.mjs +125 -0
- package/compose.bench.yaml +12 -0
- package/compose.yaml +227 -0
- package/config/coding-agent.json +13 -0
- package/config/hindsight.env.example +26 -0
- package/config/index.yml +54 -0
- package/config/litellm.lemond.yaml +40 -0
- package/config/litellm.ollama.yaml +33 -0
- package/config/notebooklm.yml +33 -0
- package/config/openmem.toml.example +124 -0
- package/docs/OPENMEM.md +23 -0
- package/docs/architecture.md +245 -0
- package/docs/assets/README.md +10 -0
- package/docs/assets/setup-demo.gif +0 -0
- package/docs/coding-agent-hooks.md +75 -0
- package/docs/coding-agent-scopes.md +22 -0
- package/docs/coding-agents.md +71 -0
- package/docs/cognee.md +37 -0
- package/docs/compatibility.md +80 -0
- package/docs/concepts.md +135 -0
- package/docs/context-management.md +255 -0
- package/docs/context-proxy.md +115 -0
- package/docs/context-research.md +215 -0
- package/docs/context-store.md +277 -0
- package/docs/hindsight.md +77 -0
- package/docs/index-sources-roadmap.md +38 -0
- package/docs/index-sources.md +39 -0
- package/docs/indexer-sinks.md +122 -0
- package/docs/indexing.md +57 -0
- package/docs/manual-stack-setup.md +74 -0
- package/docs/mcp-install-guide.md +4 -0
- package/docs/mcp-setup.md +104 -0
- package/docs/mem0.md +141 -0
- package/docs/memory-portability.md +73 -0
- package/docs/memory-providers.md +246 -0
- package/docs/meridian-litellm.md +198 -0
- package/docs/model-configuration.md +106 -0
- package/docs/notebooklm.md +83 -0
- package/docs/npx-install.md +172 -0
- package/docs/openmem-config.md +194 -0
- package/docs/provider-wizard-hooks.md +222 -0
- package/docs/quickstart.md +107 -0
- package/docs/setup-wizard.md +117 -0
- package/docs/sources-feeds.md +39 -0
- package/docs/sources-readwise.md +23 -0
- package/docs/sources-zotero.md +22 -0
- package/glama.json +4 -0
- package/indexer/Dockerfile +38 -0
- package/indexer/code_outline.py +146 -0
- package/indexer/feed_sync.py +107 -0
- package/indexer/index_config.py +290 -0
- package/indexer/pytest.ini +5 -0
- package/indexer/sinks/__init__.py +148 -0
- package/indexer/sinks/_http.py +44 -0
- package/indexer/sinks/cognee.py +329 -0
- package/indexer/sinks/hindsight.py +107 -0
- package/indexer/sinks/mem0.py +247 -0
- package/indexer/watch.py +240 -0
- package/package.json +96 -4
- package/providers/_template/compose.yaml +52 -0
- package/providers/cognee/OPERATOR.md +82 -0
- package/providers/cognee/compose.yaml +89 -0
- package/providers/cognee/lib/clack.mjs +157 -0
- package/providers/cognee/lib/coding-agent.mjs +26 -0
- package/providers/cognee/lib/cognee-mcp-install.mjs +153 -0
- package/providers/cognee/lib/config.mjs +98 -0
- package/providers/cognee/lib/env-file.mjs +194 -0
- package/providers/cognee/lib/env-setup.mjs +83 -0
- package/providers/cognee/lib/llm-env.mjs +382 -0
- package/providers/cognee/lib/ports.mjs +25 -0
- package/providers/cognee/lib/smoke.mjs +246 -0
- package/providers/cognee/lib/stack-env.mjs +134 -0
- package/providers/cognee/lib/state.mjs +101 -0
- package/providers/cognee/lib/summary.mjs +56 -0
- package/providers/cognee/lib/validate.mjs +97 -0
- package/providers/cognee/manifest.json +56 -0
- package/providers/cognee/wizard.mjs +134 -0
- package/providers/graphiti/manifest.json +15 -0
- package/providers/hindsight/lib/clack.mjs +347 -0
- package/providers/hindsight/lib/coding-agent.mjs +204 -0
- package/providers/hindsight/lib/config.mjs +79 -0
- package/providers/hindsight/lib/env-setup.mjs +72 -0
- package/providers/hindsight/lib/litellm-routes.mjs +196 -0
- package/providers/hindsight/lib/meridian.mjs +307 -0
- package/providers/hindsight/lib/model-backend.mjs +243 -0
- package/providers/hindsight/lib/notebooklm-mcp-install.mjs +127 -0
- package/providers/hindsight/lib/ollama-compose.mjs +51 -0
- package/providers/hindsight/lib/ports.mjs +30 -0
- package/providers/hindsight/lib/probe.mjs +54 -0
- package/providers/hindsight/lib/stack-env.mjs +125 -0
- package/providers/hindsight/lib/state.mjs +80 -0
- package/providers/hindsight/lib/summary.mjs +57 -0
- package/providers/hindsight/lib/validate.mjs +81 -0
- package/providers/hindsight/manifest.json +58 -0
- package/providers/hindsight/wizard.mjs +150 -0
- package/providers/letta/manifest.json +29 -0
- package/providers/mem0/OPERATOR.md +143 -0
- package/providers/mem0/compose.yaml +79 -0
- package/providers/mem0/lib/coding-agent.mjs +58 -0
- package/providers/mem0/lib/config.mjs +45 -0
- package/providers/mem0/lib/configure.mjs +201 -0
- package/providers/mem0/lib/dotenv.mjs +71 -0
- package/providers/mem0/lib/env-file.mjs +110 -0
- package/providers/mem0/lib/http.mjs +69 -0
- package/providers/mem0/lib/litellm.mjs +457 -0
- package/providers/mem0/lib/mcp-install.mjs +165 -0
- package/providers/mem0/lib/secret.mjs +30 -0
- package/providers/mem0/lib/smoke.mjs +179 -0
- package/providers/mem0/lib/stack-env.mjs +255 -0
- package/providers/mem0/lib/state.mjs +67 -0
- package/providers/mem0/lib/summary.mjs +88 -0
- package/providers/mem0/lib/url.mjs +106 -0
- package/providers/mem0/lib/validate.mjs +158 -0
- package/providers/mem0/manifest.json +47 -0
- package/providers/mem0/wizard.mjs +146 -0
- package/providers/zep/manifest.json +29 -0
- package/proxy/config.yaml +33 -0
- package/proxy/openmem_context/__init__.py +6 -0
- package/proxy/openmem_context/adapters.py +504 -0
- package/proxy/openmem_context/compress.py +53 -0
- package/proxy/openmem_context/core.py +606 -0
- package/proxy/openmem_context/embed.py +212 -0
- package/proxy/openmem_context/recall.py +49 -0
- package/proxy/openmem_context/session.py +70 -0
- package/proxy/openmem_context/sessiondb.py +276 -0
- package/proxy/openmem_context/settings.py +134 -0
- package/proxy/openmem_context/store.py +129 -0
- package/proxy/openmem_context/tokens.py +123 -0
- package/proxy/openmem_context/ttl.py +78 -0
- package/proxy/openmem_context_hook.py +34 -0
- package/scripts/check-pack.mjs +219 -0
- package/scripts/gen-masks.mjs +83 -0
- package/scripts/gen-masks.sh +4 -0
- package/scripts/promotion-provider-smoke.mjs +34 -0
- package/scripts/run-setup.sh +30 -0
- package/scripts/setup.mjs +107 -0
- package/scripts/setup.sh +5 -0
- package/scripts/spin-up.sh +45 -0
- package/scripts/wizard.sh +5 -0
- package/server.json +34 -0
- package/sync/Dockerfile +27 -0
- package/sync/memory_backend.py +87 -0
- package/sync/notebooklm_sync.py +664 -0
- package/wizard/bin/pm.mjs +97 -0
- package/wizard/bin/setup.mjs +33 -0
- package/wizard/lib/compose-version.mjs +32 -0
- package/wizard/lib/compose.mjs +70 -0
- package/wizard/lib/context-step.mjs +140 -0
- package/wizard/lib/curl.mjs +103 -0
- package/wizard/lib/docker-build.mjs +148 -0
- package/wizard/lib/exec.mjs +41 -0
- package/wizard/lib/indexer.mjs +6 -0
- package/wizard/lib/litellm-env.mjs +55 -0
- package/wizard/lib/load-machine-env.mjs +4 -0
- package/wizard/lib/log.mjs +32 -0
- package/wizard/lib/notebooklm-agent-access.mjs +92 -0
- package/wizard/lib/notebooklm.mjs +214 -0
- package/wizard/lib/parse-args.mjs +87 -0
- package/wizard/lib/paths.mjs +39 -0
- package/wizard/lib/pm-config.mjs +371 -0
- package/wizard/lib/ports.mjs +94 -0
- package/wizard/lib/prompts.mjs +85 -0
- package/wizard/lib/provider-wizard/helpers.mjs +98 -0
- package/wizard/lib/provider-wizard/run-steps.mjs +129 -0
- package/wizard/lib/providers/registry.mjs +262 -0
- package/wizard/lib/run-clack.mjs +108 -0
- package/wizard/lib/run-wizard.mjs +750 -0
- package/wizard/lib/validate-setup.mjs +62 -0
- package/wizard/lib/wizard-action.mjs +34 -0
- package/wizard/lib/wizard-conf.mjs +71 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import TOML from "@iarna/toml";
|
|
4
|
+
import { SILENT, readJson, writeFileAtomic, writeJson } from "./file-io.mjs";
|
|
5
|
+
import { removeTomlPath } from "./toml-edit.mjs";
|
|
6
|
+
|
|
7
|
+
/** Name the upstream @vectorize-io/hindsight-coding-agents installer gives its MCP server. */
|
|
8
|
+
const UPSTREAM_MCP_NAME = "hindsight";
|
|
9
|
+
/** Directory name of the skill copy the upstream installer writes into each agent's skill root. */
|
|
10
|
+
const UPSTREAM_SKILL_NAME = "hindsight-coding-agent";
|
|
11
|
+
/** The upstream MCP runs `node <pkg>/dist/mcp-server.js`; pkg is the npx copy or `~/.hindsight/coding-agents`. */
|
|
12
|
+
const UPSTREAM_MCP_SCRIPT = /hindsight[-/]coding-agents\/dist\/mcp-server\.js$/;
|
|
13
|
+
/** Skill roots the upstream installer uses (its SKILL_DIRS); OpenCode gets no upstream skill or MCP. */
|
|
14
|
+
const UPSTREAM_SKILL_ROOTS = {
|
|
15
|
+
"claude-code": [".claude", "skills"],
|
|
16
|
+
codex: [".agents", "skills"],
|
|
17
|
+
"cursor-cli": [".cursor", "skills"],
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** True when an MCP server entry launches the upstream package's mcp-server.js. */
|
|
21
|
+
export function isUpstreamMcpEntry(entry) {
|
|
22
|
+
if (!entry || typeof entry !== "object" || entry.command !== "node" || !Array.isArray(entry.args)) return false;
|
|
23
|
+
return typeof entry.args[0] === "string" && UPSTREAM_MCP_SCRIPT.test(entry.args[0].replaceAll("\\", "/"));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function readJsonFile(file, h) {
|
|
27
|
+
if (!fs.existsSync(file)) return null;
|
|
28
|
+
try {
|
|
29
|
+
return readJson(file);
|
|
30
|
+
} catch (err) {
|
|
31
|
+
h.warn(`skipped ${file}: ${err.message}`);
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** JSON `mcpServers.hindsight` (Claude Code ~/.claude.json, Cursor ~/.cursor/mcp.json). */
|
|
37
|
+
function removeJsonMcp({ agentId, file, dry, h }) {
|
|
38
|
+
const config = readJsonFile(file, h);
|
|
39
|
+
if (!isUpstreamMcpEntry(config?.mcpServers?.[UPSTREAM_MCP_NAME])) return false;
|
|
40
|
+
if (dry) {
|
|
41
|
+
h.info(`[dry-run] remove upstream Hindsight ${agentId} MCP server "${UPSTREAM_MCP_NAME}" from ${file}`);
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
delete config.mcpServers[UPSTREAM_MCP_NAME];
|
|
45
|
+
// Claude Code rewrites ~/.claude.json while it runs; replace it in one rename.
|
|
46
|
+
writeJson(file, config);
|
|
47
|
+
h.ok(`${agentId}: removed upstream Hindsight MCP server "${UPSTREAM_MCP_NAME}" from ${file}`);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Codex `[mcp_servers.hindsight]` (with subtables), an inline `hindsight = {…}` under
|
|
53
|
+
* `[mcp_servers]`, or dotted keys, in ~/.codex/config.toml. Only that entry's text is removed;
|
|
54
|
+
* the result must re-parse without the entry, else the file is left untouched.
|
|
55
|
+
*/
|
|
56
|
+
function removeCodexMcp({ file, dry, h }) {
|
|
57
|
+
if (!fs.existsSync(file)) return false;
|
|
58
|
+
const text = fs.readFileSync(file, "utf8");
|
|
59
|
+
let parsed;
|
|
60
|
+
try {
|
|
61
|
+
parsed = TOML.parse(text);
|
|
62
|
+
} catch (err) {
|
|
63
|
+
h.warn(`skipped ${file}: ${err.message}`);
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
if (!isUpstreamMcpEntry(parsed?.mcp_servers?.[UPSTREAM_MCP_NAME])) return false;
|
|
67
|
+
let next;
|
|
68
|
+
try {
|
|
69
|
+
next = removeTomlPath(text, ["mcp_servers", UPSTREAM_MCP_NAME]);
|
|
70
|
+
if (TOML.parse(next)?.mcp_servers?.[UPSTREAM_MCP_NAME] !== undefined) throw new Error("entry still present after the edit");
|
|
71
|
+
} catch (err) {
|
|
72
|
+
h.warn(`codex: left ${file} unchanged; remove [mcp_servers.${UPSTREAM_MCP_NAME}] by hand (${err.message})`);
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
if (dry) {
|
|
76
|
+
h.info(`[dry-run] remove upstream Hindsight codex MCP server [mcp_servers.${UPSTREAM_MCP_NAME}] from ${file}`);
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
writeFileAtomic(file, next);
|
|
80
|
+
h.ok(`codex: removed upstream Hindsight MCP server [mcp_servers.${UPSTREAM_MCP_NAME}] from ${file}`);
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** `<skill root>/hindsight-coding-agent/` when its SKILL.md declares that name. */
|
|
85
|
+
function removeSkill({ agentId, home, dry, h }) {
|
|
86
|
+
const dir = path.join(home, ...UPSTREAM_SKILL_ROOTS[agentId], UPSTREAM_SKILL_NAME);
|
|
87
|
+
const skill = path.join(dir, "SKILL.md");
|
|
88
|
+
if (!fs.existsSync(skill)) return false;
|
|
89
|
+
const front = fs.readFileSync(skill, "utf8").match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
90
|
+
if (!front || !new RegExp(`^name:\\s*["']?${UPSTREAM_SKILL_NAME}["']?\\s*$`, "m").test(front[1])) return false;
|
|
91
|
+
if (dry) {
|
|
92
|
+
h.info(`[dry-run] remove upstream Hindsight ${agentId} skill ${dir}`);
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
96
|
+
h.ok(`${agentId}: removed upstream Hindsight skill ${dir}`);
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Remove the MCP server and skill copies `@vectorize-io/hindsight-coding-agents install` writes.
|
|
102
|
+
* An MCP entry counts only when it is named `hindsight` and runs the upstream mcp-server.js.
|
|
103
|
+
* Returns `{ removed: [{ agent, kind, path }] }`; with `dry` it only reports.
|
|
104
|
+
*/
|
|
105
|
+
export function removeUpstreamAccess({ home, agents, dry = false, h = SILENT }) {
|
|
106
|
+
const removed = [];
|
|
107
|
+
const note = (agent, kind, file, hit) => hit && removed.push({ agent, kind, path: file });
|
|
108
|
+
for (const agentId of agents) {
|
|
109
|
+
if (agentId === "claude-code" || agentId === "cursor-cli") {
|
|
110
|
+
const file = agentId === "claude-code" ? path.join(home, ".claude.json") : path.join(home, ".cursor", "mcp.json");
|
|
111
|
+
note(agentId, "mcp", file, removeJsonMcp({ agentId, file, dry, h }));
|
|
112
|
+
} else if (agentId === "codex") {
|
|
113
|
+
const file = path.join(home, ".codex", "config.toml");
|
|
114
|
+
note(agentId, "mcp", file, removeCodexMcp({ file, dry, h }));
|
|
115
|
+
}
|
|
116
|
+
if (UPSTREAM_SKILL_ROOTS[agentId]) {
|
|
117
|
+
const dir = path.join(home, ...UPSTREAM_SKILL_ROOTS[agentId], UPSTREAM_SKILL_NAME);
|
|
118
|
+
note(agentId, "skill", dir, removeSkill({ agentId, home, dry, h }));
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return { removed };
|
|
122
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
|
|
5
|
+
const RUNTIME_ITEMS = ["cli", "providers", "wizard", "config", ".agents/skills/openmem", "package.json"];
|
|
6
|
+
const RUNTIME_DEPS = ["@iarna/toml", "@clack/prompts", "yaml"];
|
|
7
|
+
|
|
8
|
+
function packageRoot(requireFromSource, name) {
|
|
9
|
+
let dir = path.dirname(requireFromSource.resolve(name));
|
|
10
|
+
while (dir !== path.dirname(dir)) {
|
|
11
|
+
const manifest = path.join(dir, "package.json");
|
|
12
|
+
if (fs.existsSync(manifest) && JSON.parse(fs.readFileSync(manifest, "utf8")).name === name) return dir;
|
|
13
|
+
dir = path.dirname(dir);
|
|
14
|
+
}
|
|
15
|
+
throw new Error(`cannot locate ${name} for openmem runtime`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Copy the agent runtime out of an ephemeral npx cache into a stable user path. */
|
|
19
|
+
export function prepareAgentRuntime({ home, repoRoot, stackRoot, dry = false, h }) {
|
|
20
|
+
const dest = path.join(home, ".local", "share", "personal-memory", "agent-runtime");
|
|
21
|
+
if (dry) {
|
|
22
|
+
h?.info(`[dry-run] stage openmem agent runtime in ${dest}`);
|
|
23
|
+
return dest;
|
|
24
|
+
}
|
|
25
|
+
const requireFromSource = createRequire(path.join(repoRoot, "package.json"));
|
|
26
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
27
|
+
for (const item of RUNTIME_ITEMS) {
|
|
28
|
+
fs.mkdirSync(path.dirname(path.join(dest, item)), { recursive: true });
|
|
29
|
+
fs.cpSync(path.join(repoRoot, item), path.join(dest, item), { recursive: true, force: true });
|
|
30
|
+
}
|
|
31
|
+
fs.rmSync(path.join(dest, "cli", "coding-agent", "opencode-plugin"), { recursive: true, force: true });
|
|
32
|
+
for (const name of RUNTIME_DEPS) {
|
|
33
|
+
const target = path.join(dest, "node_modules", name);
|
|
34
|
+
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
35
|
+
fs.cpSync(packageRoot(requireFromSource, name), target, { recursive: true, force: true });
|
|
36
|
+
}
|
|
37
|
+
fs.writeFileSync(path.join(dest, "agent-runtime.json"), `${JSON.stringify({ stackRoot }, null, 2)}\n`);
|
|
38
|
+
h?.ok(`openmem agent runtime → ${dest}`);
|
|
39
|
+
return dest;
|
|
40
|
+
}
|