Skip to content

Sync upstream CLI portable installs - #22

Merged
martindzejky merged 3 commits into
masterfrom
cursor/sync-upstream-81f6
Aug 24, 2026
Merged

Sync upstream CLI portable installs#22
martindzejky merged 3 commits into
masterfrom
cursor/sync-upstream-81f6

Conversation

@martindzejky

@martindzejky martindzejky commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Merge rohitg00/agentmemory@main into this fork (was 1 commit behind)
  • Bring in #892: portable CLI installs that write absolute engine paths under ~/.agentmemory so global/npx installs keep data and respawn the worker
  • Keep the fork README and reapply markEngineSupervised() on the new startWorkerForEngineState() path so Railway still exits when iii-engine dies
  • Refresh the config skill env list (47 → 52) for Docker UID/GID, metrics, and runtime-dir variables
  • Bump the AGENTS.md test count to 1,843+

What upstream changed

  • Engine launch now rewrites the bundled iii-config.yaml to ~/.agentmemory/iii-config.runtime.yaml with absolute data paths and an absolute worker exec line
  • Global/npx installs spawn the engine with cwd ~/.agentmemory; repo checkouts keep the old cwd-relative behavior
  • Docker compose ports, UID/GID, and data dir become overridable; iii-exec is removed from the Docker config so the CLI starts the worker
  • Viewer port is a real config field (III_VIEWER_PORT) instead of restPort + 2
  • Local embeddings are opt-in (EMBEDDING_PROVIDER=local), not the keyless default

Conflicts

  • README.md: kept the Cursor fork README
  • src/cli.ts: took upstream's worker start helper and kept our engine-crash supervision
  • plugin/skills/agentmemory-config/REFERENCE.md: kept fork env vars and regenerated the count

Test plan

  • git rev-list --count HEAD..upstream/main is 0
  • npm run build
  • npm run skills:check
  • npm test — 1843 passed, 1 skipped
  • Confirm fork patches still exist vs upstream/main (idle sweep, raw events, eventId, watermarks, /session/end noop, bulk observe)
Open in Web Open in Cursor 

rohitg00 and others added 3 commits August 23, 2026 15:54
* fix(cli): anchor engine cwd and rewrite bundled config with absolute paths

The bundled iii-config.yaml uses cwd-relative paths and the engine was
spawned without a cwd, so on global and npx installs ./data/state_store.db
and ./data/stream_store landed in whatever directory the user ran the CLI
from, and the iii-exec supervision block (src/**/*.ts watch, node
dist/index.mjs exec) never resolved, meaning the engine never supervised a
worker and nothing respawned it after the in-process worker died. That
surfaced as all data gone reports against a live REST port.

startIiiBin now prepares the launch: when the resolved config is the
bundled one it writes ~/.agentmemory/iii-config.runtime.yaml (regenerated
each boot) with absolute data paths under ~/.agentmemory/data and an
absolute node exec line for the installed worker entry, copies any legacy
./data stores from the invocation directory on first run, and spawns the
engine with cwd anchored at ~/.agentmemory. Repo checkouts keep the cwd
config and repo-root cwd, so dev behavior is unchanged. User overrides
via env or ~/.agentmemory/iii-config.yaml are passed through verbatim.

agentmemory remove gains a plan item for the generated runtime config.

Covered by test/engine-launch.test.ts including a drift guard that
rewrites the repo's real iii-config.yaml and asserts no relative paths
remain.

* fix: make fresh installs portable and persistent

* docs: refresh generated config reference
Bring in rohitg00#892: portable CLI installs with
absolute engine paths under ~/.agentmemory. Reapplied
markEngineSupervised on the new worker start path and kept
the fork README.

Co-authored-by: Martin Jakubík <martindzejky@gmail.com>
Co-authored-by: Martin Jakubík <martindzejky@gmail.com>
@martindzejky
martindzejky merged commit 5eecea9 into master Aug 24, 2026
10 checks passed
@martindzejky
martindzejky deleted the cursor/sync-upstream-81f6 branch August 24, 2026 10:50

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f9326ec. Configure here.

const demoTimeoutEnd = source.indexOf("await import(\"./index.js\")", demoTimeoutStart);
expect(source.slice(demoTimeoutStart, demoTimeoutEnd)).toContain(
"printCapturedStartupStderr()",
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Broken demo stderr test sentinel

Low Severity

The demo timeout assertion still ends at await import("./index.js"), but the demo path now calls startWorkerForEngineState() instead. indexOf returns -1, so the slice runs to near end-of-file and the check only passes by accident rather than locking the demo failure path.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f9326ec. Configure here.

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.

3 participants