@memorax/memorax-code 0.1.2 → 0.1.3
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/README.md +16 -12
- package/bin/memorax-code-npm-preinstall.mjs +7 -2
- package/bin/memorax-code-opencode.mjs +4 -0
- package/bin/memorax-code-plugin-postinstall.mjs +342 -93
- package/docs/configuration.md +144 -35
- package/docs/troubleshooting.md +73 -13
- package/lib/dsh-plugin-install.mjs +22 -0
- package/lib/memorax-code-adapter-common/src/hooks/capture-cwd-hook.mjs +21 -14
- package/lib/memorax-code-adapter-common/src/hooks/ensure-backend-runner.mjs +26 -7
- package/lib/memorax-code-adapter-common/src/hooks/memory-skill-reminder-hook.mjs +86 -95
- package/lib/memorax-code-adapter-common/src/hooks/memory-skill-reminder-policy.mjs +58 -0
- package/lib/memorax-code-adapter-common/src/repo-memory/repo-memory-auto-build.mjs +2 -2
- package/lib/memorax-code-adapter-common/src/repo-memory/repo-memory-job-supervisor.mjs +1 -1
- package/lib/memorax-code-adapter-common/src/windows-cli-invocation.mjs +13 -1
- package/lib/memorax-code-backend/dist/app/backend-server.js +210 -0
- package/lib/memorax-code-backend/dist/{server-observability.js → app/memory-observability.js} +4 -4
- package/lib/memorax-code-backend/dist/{backend-state.js → app/state.js} +1 -1
- package/lib/memorax-code-backend/dist/{claude-adapter-lifecycle.js → clients/claude/lifecycle.js} +2 -2
- package/lib/memorax-code-backend/dist/{claude-memory-hook-runtime.js → clients/claude/memory-hook-runtime.js} +7 -7
- package/lib/memorax-code-backend/dist/clients/codex/lifecycle.js +131 -0
- package/lib/memorax-code-backend/dist/{codex-memory-hook-runtime.js → clients/codex/memory-hook-runtime.js} +9 -9
- package/lib/memorax-code-backend/dist/{codex-plugin-hooks.js → clients/codex/plugin-hooks.js} +1 -1
- package/lib/memorax-code-backend/dist/{codex-plugin-install.js → clients/codex/plugin-install.js} +6 -6
- package/lib/memorax-code-backend/dist/clients/dsh/lifecycle.js +75 -0
- package/lib/memorax-code-backend/dist/clients/dsh/memory-hook-runtime.js +258 -0
- package/lib/memorax-code-backend/dist/clients/dsh/session-turn.js +249 -0
- package/lib/memorax-code-backend/dist/clients/opencode/lifecycle.js +54 -0
- package/lib/memorax-code-backend/dist/clients/opencode/memory-hook-runtime.js +277 -0
- package/lib/memorax-code-backend/dist/clients/opencode/message-turn.js +78 -0
- package/lib/memorax-code-backend/dist/codex-adapter-lifecycle.js +1 -131
- package/lib/memorax-code-backend/dist/{memorax-code-config.js → config/memorax-code.js} +32 -4
- package/lib/memorax-code-backend/dist/{server-cli.js → entrypoints/backend-cli.js} +137 -37
- package/lib/memorax-code-backend/dist/jsonl-append.js +1 -75
- package/lib/memorax-code-backend/dist/{active-client-selection.js → lifecycle/active-clients.js} +12 -1
- package/lib/memorax-code-backend/dist/{backend-service-cleanup.js → lifecycle/backend/cleanup.js} +1 -1
- package/lib/memorax-code-backend/dist/{backend-service-record.js → lifecycle/backend/record.js} +1 -1
- package/lib/memorax-code-backend/dist/{backend-service-result.js → lifecycle/backend/result.js} +2 -2
- package/lib/memorax-code-backend/dist/{service.js → lifecycle/backend/service.js} +16 -16
- package/lib/memorax-code-backend/dist/{backend-token-record.js → lifecycle/backend/token-record.js} +1 -1
- package/lib/memorax-code-backend/dist/{backend-service-token.js → lifecycle/backend/token.js} +2 -2
- package/lib/memorax-code-backend/dist/lifecycle/client-plugin-removal.js +109 -0
- package/lib/memorax-code-backend/dist/{client-selection.js → lifecycle/client-selection.js} +11 -5
- package/lib/memorax-code-backend/dist/{backend-lifecycle-lock.js → lifecycle/lock.js} +1 -1
- package/lib/memorax-code-backend/dist/{memorax-code-lifecycle.js → lifecycle/orchestrator.js} +325 -39
- package/lib/memorax-code-backend/dist/memorax-cli.js +1 -1
- package/lib/memorax-code-backend/dist/memorax-code.js +1 -1
- package/lib/memorax-code-backend/dist/{automatic-memory-retrieval.js → memory/automatic-retrieval.js} +3 -3
- package/lib/memorax-code-backend/dist/{automatic-memory-writeback.js → memory/automatic-writeback.js} +75 -21
- package/lib/memorax-code-backend/dist/{memory-cli.js → memory/cli.js} +23 -10
- package/lib/memorax-code-backend/dist/{memory-hook-command.js → memory/hook-command.js} +156 -9
- package/lib/memorax-code-backend/dist/memory/observability.js +1 -0
- package/lib/memorax-code-backend/dist/memory/payload-redaction.js +212 -0
- package/lib/memorax-code-backend/dist/{memory-reminder-trace-recorder.js → memory/reminder-trace-recorder.js} +20 -7
- package/lib/memorax-code-backend/dist/{repository-memory-context.js → memory/repository-session.js} +2 -2
- package/lib/memorax-code-backend/dist/{memory-service.js → memory/service.js} +27 -5
- package/lib/memorax-code-backend/dist/{memory-turn-coordinator.js → memory/turn-coordinator.js} +2 -1
- package/lib/memorax-code-backend/dist/{memory-writeback-buffer.js → memory/writeback-buffer.js} +3 -3
- package/lib/memorax-code-backend/dist/{memory-writeback-chunk.js → memory/writeback-chunk.js} +1 -1
- package/lib/memorax-code-backend/dist/{memory-writeback-reconciler.js → memory/writeback-reconciler.js} +6 -6
- package/lib/memorax-code-backend/dist/{memory-writeback-task-projection.js → memory/writeback-task-projection.js} +4 -4
- package/lib/memorax-code-backend/dist/{memorax-adapter.js → provider/memorax/adapter.js} +5 -5
- package/lib/memorax-code-backend/dist/{memorax-config.js → provider/memorax/config.js} +4 -4
- package/lib/memorax-code-backend/dist/{memorax-http.js → provider/memorax/http.js} +1 -1
- package/lib/memorax-code-backend/dist/{repo-memory-readiness.js → repository/readiness.js} +3 -3
- package/lib/memorax-code-backend/dist/server.js +3 -212
- package/lib/memorax-code-backend/dist/service-entrypoint.js +1 -1
- package/lib/memorax-code-backend/dist/{debug-log.js → shared/debug-log.js} +1 -1
- package/lib/memorax-code-backend/dist/shared/jsonl-append.js +75 -0
- package/lib/memorax-code-backend/dist/shared/windows-cli-invocation.js +148 -0
- package/lib/memorax-code-backend/dist/{trace-config.js → trace/config.js} +43 -5
- package/lib/memorax-code-backend/dist/{trace-context.js → trace/context.js} +53 -2
- package/lib/memorax-code-backend/dist/{trace-store.js → trace/store.js} +3 -3
- package/lib/memorax-code-backend/dist/{server-health.js → transport/http/health.js} +1 -1
- package/lib/memorax-code-backend/dist/{server-memory-hook.js → transport/http/memory-hook.js} +3 -3
- package/lib/memorax-code-backend/dist/{server-http.js → transport/http/request.js} +1 -1
- package/lib/memorax-code-backend/dist/{claude-local-transcript.js → viewer/history/claude-transcript.js} +3 -3
- package/lib/memorax-code-backend/dist/{memory-viewer-session-title.js → viewer/history/session-title.js} +1 -1
- package/lib/memorax-code-backend/dist/{server-memory-viewer.js → viewer/http/public-routes.js} +15 -15
- package/lib/memorax-code-backend/dist/viewer/model.js +1 -0
- package/lib/memorax-code-backend/dist/{memory-viewer-activity.js → viewer/projection/activity.js} +2 -2
- package/lib/memorax-code-backend/dist/{memory-viewer-history-projection.js → viewer/projection/history.js} +1 -1
- package/lib/memorax-code-backend/dist/{memory-viewer-observability.js → viewer/projection/observability.js} +1 -1
- package/lib/memorax-code-backend/dist/{memory-viewer-user-projection.js → viewer/projection/user.js} +1 -1
- package/lib/memorax-code-backend/dist/{memory-viewer-writeback-status.js → viewer/projection/writeback-status.js} +1 -1
- package/lib/memorax-code-backend/dist/{memory-viewer-store.js → viewer/store.js} +59 -32
- package/lib/memorax-code-backend/dist/{memory-viewer-user-html.js → viewer/ui/user-html.js} +11 -10
- package/lib/memorax-code-backend/dist/windows-cli-invocation.js +1 -148
- package/lib/memorax-code-backend/package.json +3 -3
- package/lib/memorax-code-claude-adapter/.claude-plugin/plugin.json +1 -1
- package/lib/memorax-code-claude-adapter/hooks/runtime-shell.json +1 -1
- package/lib/memorax-code-claude-adapter/package.json +1 -1
- package/lib/memorax-code-claude-adapter/skills/memorax-code/SKILL.md +11 -2
- package/lib/memorax-code-claude-adapter/skills/memorax-code/defaults.json +8 -5
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/memorax-add.md +1 -1
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/memorax-search.md +37 -9
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/personal-read.md +1 -1
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/personal-write.md +33 -13
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/repo-build.md +62 -13
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/repo-read.md +11 -4
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/repo-templates.md +179 -59
- package/lib/memorax-code-claude-adapter/skills/memorax-code/references/repo-update.md +18 -7
- package/lib/memorax-code-claude-adapter/skills/memorax-code/scripts/collect_all.py +122 -39
- package/lib/memorax-code-claude-adapter/skills/memorax-code/scripts/detect_updates.py +73 -10
- package/lib/memorax-code-claude-adapter/skills/memorax-code/scripts/github_resource_facets.py +9 -1
- package/lib/memorax-code-claude-adapter/skills/memorax-code/scripts/gitlab_resource_facets.py +9 -1
- package/lib/memorax-code-claude-adapter/skills/memorax-code/scripts/validate_memory.py +23 -1
- package/lib/memorax-code-claude-adapter/src/plugin-install.mjs +1 -0
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/.claude-plugin/plugin.json +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/hooks/runtime-shell.json +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/hooks/capture-cwd-hook.mjs +21 -14
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/hooks/ensure-backend-runner.mjs +26 -7
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/hooks/memory-skill-reminder-hook.mjs +86 -95
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/hooks/memory-skill-reminder-policy.mjs +58 -0
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/repo-memory/repo-memory-auto-build.mjs +2 -2
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/repo-memory/repo-memory-job-supervisor.mjs +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/memorax-code-adapter-common/src/windows-cli-invocation.mjs +13 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/package.json +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/SKILL.md +11 -2
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/defaults.json +8 -5
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/memorax-add.md +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/memorax-search.md +37 -9
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/personal-read.md +1 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/personal-write.md +33 -13
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/repo-build.md +62 -13
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/repo-read.md +11 -4
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/repo-templates.md +179 -59
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/references/repo-update.md +18 -7
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/scripts/collect_all.py +122 -39
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/scripts/detect_updates.py +73 -10
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/scripts/github_resource_facets.py +9 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/scripts/gitlab_resource_facets.py +9 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/skills/memorax-code/scripts/validate_memory.py +23 -1
- package/lib/memorax-code-claude-marketplace/plugins/memorax-code-claude-adapter/src/plugin-install.mjs +1 -0
- package/lib/memorax-code-codex-adapter/.codex-plugin/plugin.json +1 -1
- package/lib/memorax-code-codex-adapter/hooks/runtime-shell.json +1 -1
- package/lib/memorax-code-codex-adapter/package.json +1 -1
- package/lib/memorax-code-codex-adapter/runtime-hooks/memory-skill-reminder.mjs +10 -2
- package/lib/memorax-code-codex-adapter/skills/memorax-code/SKILL.md +11 -2
- package/lib/memorax-code-codex-adapter/skills/memorax-code/defaults.json +8 -5
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/memorax-add.md +1 -1
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/memorax-search.md +37 -9
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/personal-read.md +1 -1
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/personal-write.md +33 -13
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/repo-build.md +62 -13
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/repo-read.md +11 -4
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/repo-templates.md +179 -59
- package/lib/memorax-code-codex-adapter/skills/memorax-code/references/repo-update.md +18 -7
- package/lib/memorax-code-codex-adapter/skills/memorax-code/scripts/collect_all.py +122 -39
- package/lib/memorax-code-codex-adapter/skills/memorax-code/scripts/detect_updates.py +73 -10
- package/lib/memorax-code-codex-adapter/skills/memorax-code/scripts/github_resource_facets.py +9 -1
- package/lib/memorax-code-codex-adapter/skills/memorax-code/scripts/gitlab_resource_facets.py +9 -1
- package/lib/memorax-code-codex-adapter/skills/memorax-code/scripts/validate_memory.py +23 -1
- package/lib/memorax-code-dsh-adapter/cordis.patch.yml +10 -0
- package/lib/memorax-code-dsh-adapter/hooks/repo-memory-job.mjs +68 -0
- package/lib/memorax-code-dsh-adapter/package.json +69 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/SKILL.md +91 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/agents/claude.yaml +10 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/agents/openai.yaml +7 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/defaults.json +12 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/memorax-add.md +86 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/memorax-search.md +91 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/personal-read.md +46 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/personal-write.md +120 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/repo-build.md +319 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/repo-read.md +103 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/repo-templates.md +390 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/references/repo-update.md +127 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/collect_all.py +579 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/detect_updates.py +919 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/git_commit_facets.py +222 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/github_resource_facets.py +512 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/gitlab_resource_facets.py +517 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/prepare_repo_memory.py +411 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/user_profile_memory.py +528 -0
- package/lib/memorax-code-dsh-adapter/skills/memorax-code/scripts/validate_memory.py +248 -0
- package/lib/memorax-code-dsh-adapter/src/backend-client.mjs +119 -0
- package/lib/memorax-code-dsh-adapter/src/dsh-message.mjs +32 -0
- package/lib/memorax-code-dsh-adapter/src/dsh-version.mjs +18 -0
- package/lib/memorax-code-dsh-adapter/src/http-client.mjs +55 -0
- package/lib/memorax-code-dsh-adapter/src/index.mjs +72 -0
- package/lib/memorax-code-dsh-adapter/src/personal-context-worker.mjs +48 -0
- package/lib/memorax-code-dsh-adapter/src/personal-context.mjs +114 -0
- package/lib/memorax-code-dsh-adapter/src/plugin.mjs +724 -0
- package/lib/memorax-code-dsh-adapter/src/profile-lifecycle.mjs +1289 -0
- package/lib/memorax-code-dsh-adapter/src/protocol.mjs +145 -0
- package/lib/memorax-code-dsh-adapter/src/runtime-state.mjs +132 -0
- package/lib/memorax-code-opencode-adapter/hooks/repo-memory-job.mjs +37 -0
- package/lib/memorax-code-opencode-adapter/package.json +10 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/SKILL.md +91 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/agents/claude.yaml +10 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/agents/openai.yaml +7 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/defaults.json +12 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/memorax-add.md +86 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/memorax-search.md +91 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/personal-read.md +46 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/personal-write.md +120 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/repo-build.md +319 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/repo-read.md +103 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/repo-templates.md +390 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/references/repo-update.md +127 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/collect_all.py +579 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/detect_updates.py +919 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/git_commit_facets.py +222 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/github_resource_facets.py +512 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/gitlab_resource_facets.py +517 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/prepare_repo_memory.py +411 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/user_profile_memory.py +528 -0
- package/lib/memorax-code-opencode-adapter/skills/memorax-code/scripts/validate_memory.py +248 -0
- package/lib/memorax-code-opencode-adapter/src/adapter-paths.mjs +37 -0
- package/lib/memorax-code-opencode-adapter/src/cli.mjs +260 -0
- package/lib/memorax-code-opencode-adapter/src/diagnostics.mjs +31 -0
- package/lib/memorax-code-opencode-adapter/src/plugin-install.mjs +673 -0
- package/lib/memorax-code-opencode-adapter/src/plugin.mjs +536 -0
- package/lib/memorax-code-opencode-adapter/src/repo-memory-server-runner.mjs +207 -0
- package/lib/run-entrypoint.mjs +6 -0
- package/package.json +7 -3
- package/lib/memorax-code-backend/dist/client-plugin-removal.js +0 -67
- /package/lib/memorax-code-backend/dist/{claude-transcript-turn.js → clients/claude/transcript-turn.js} +0 -0
- /package/lib/memorax-code-backend/dist/{codex-effective-prompt.js → clients/codex/effective-prompt.js} +0 -0
- /package/lib/memorax-code-backend/dist/{codex-rollout-turn.js → clients/codex/rollout-turn.js} +0 -0
- /package/lib/memorax-code-backend/dist/{codex-session-turn-index.js → clients/codex/session-turn-index.js} +0 -0
- /package/lib/memorax-code-backend/dist/{codex-workspace-links.js → clients/codex/workspace-links.js} +0 -0
- /package/lib/memorax-code-backend/dist/{backend-env.js → config/backend-env.js} +0 -0
- /package/lib/memorax-code-backend/dist/{proxy-env.js → config/proxy-env.js} +0 -0
- /package/lib/memorax-code-backend/dist/{entrypoint.js → entrypoints/main.js} +0 -0
- /package/lib/memorax-code-backend/dist/{backend-process.js → lifecycle/backend/process.js} +0 -0
- /package/lib/memorax-code-backend/dist/{backend-shutdown-request.js → lifecycle/backend/shutdown-request.js} +0 -0
- /package/lib/memorax-code-backend/dist/{backend-status.js → lifecycle/backend/status.js} +0 -0
- /package/lib/memorax-code-backend/dist/{adapter-lifecycle-participant.js → lifecycle/contracts.js} +0 -0
- /package/lib/memorax-code-backend/dist/{install-watchdog.js → lifecycle/install-watchdog.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-observability.js → lifecycle/participant.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-project.js → memory/project.js} +0 -0
- /package/lib/memorax-code-backend/dist/{repository-memory-scope.js → repository/scope.js} +0 -0
- /package/lib/memorax-code-backend/dist/{incremental-jsonl-projection.js → shared/incremental-jsonl-projection.js} +0 -0
- /package/lib/memorax-code-backend/dist/{utils.js → shared/record.js} +0 -0
- /package/lib/memorax-code-backend/dist/{server-json.js → transport/http/json.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-data-projection-cache.js → viewer/projection/cache.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-event-identity.js → viewer/projection/event-identity.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-redaction.js → viewer/projection/redaction.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-turn-reference.js → viewer/projection/turn-reference.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-icon.js → viewer/ui/icon.js} +0 -0
- /package/lib/memorax-code-backend/dist/{memory-viewer-logo.js → viewer/ui/logo.js} +0 -0
package/docs/configuration.md
CHANGED
|
@@ -38,12 +38,13 @@ are not a compatibility contract.
|
|
|
38
38
|
|
|
39
39
|
## New configuration
|
|
40
40
|
|
|
41
|
-
The generated template selects
|
|
42
|
-
enables automatic writeback, sets the preferred language to Chinese
|
|
43
|
-
uses a five-turn skill reminder and the adaptive repository-update
|
|
44
|
-
enables content-bearing local traces for
|
|
45
|
-
narrow `[clients]` to clients detected on the
|
|
46
|
-
fallbacks, including tuning fields omitted from
|
|
41
|
+
The generated template selects all four client integrations, disables automatic
|
|
42
|
+
retrieval, enables automatic writeback, sets the preferred language to Chinese
|
|
43
|
+
(`zh`), uses a five-turn skill reminder and the adaptive repository-update
|
|
44
|
+
policy, and enables content-bearing local traces for Codex, Claude Code, and
|
|
45
|
+
OpenCode. npm installation may narrow `[clients]` to clients detected on the
|
|
46
|
+
host. The tables below list all fallbacks, including tuning fields omitted from
|
|
47
|
+
the generated file.
|
|
47
48
|
|
|
48
49
|
On POSIX systems MemoraX Code creates `$MEMORAX_CODE_HOME` with mode `0700`
|
|
49
50
|
and a new `config.toml` with mode `0600`. Windows relies on the current user's
|
|
@@ -51,16 +52,25 @@ filesystem ACLs.
|
|
|
51
52
|
|
|
52
53
|
## Client selection
|
|
53
54
|
|
|
54
|
-
If `[clients]` is absent, lifecycle commands select
|
|
55
|
-
present, `codex` and `
|
|
56
|
-
|
|
55
|
+
If `[clients]` is absent, lifecycle commands select Codex, Claude Code, DSH,
|
|
56
|
+
and OpenCode. If it is present, `codex`, `claude`, `dsh`, and `opencode` are
|
|
57
|
+
boolean fields. Omitted `codex`, `claude`, or `opencode` values are disabled;
|
|
58
|
+
an omitted `dsh` value remains enabled so configurations written before DSH
|
|
59
|
+
support can discover an existing local Harness. Set `dsh = false` explicitly
|
|
60
|
+
to disable that integration. The command-line override accepts a
|
|
61
|
+
comma-separated subset:
|
|
57
62
|
|
|
58
63
|
```text
|
|
59
|
-
--clients codex|claude|
|
|
64
|
+
--clients codex|claude|dsh|opencode|<comma-separated subset>|all|none
|
|
60
65
|
```
|
|
61
66
|
|
|
62
|
-
A normal npm install or reinstall refreshes `[clients]` from the
|
|
63
|
-
clients detected at that time.
|
|
67
|
+
A normal npm install or reinstall refreshes `[clients]` from the available
|
|
68
|
+
clients detected at that time. OpenCode is available when its explicit, XDG,
|
|
69
|
+
or default configuration directory exists, or when `opencode` is on `PATH`.
|
|
70
|
+
DSH is available when at least one valid Profile exists under
|
|
71
|
+
`$DSH_HOME/profiles`; `DSH_HOME` defaults to `~/.dsh`. An explicit
|
|
72
|
+
`[clients].dsh = false` is preserved.
|
|
73
|
+
Update-mode postinstall runs preserve enabled
|
|
64
74
|
clients and also probe each disabled client. An interactive update offers each
|
|
65
75
|
runnable disabled integration for activation with a default of yes. Declining
|
|
66
76
|
the prompt, or running non-interactively, keeps that integration disabled. A
|
|
@@ -69,9 +79,60 @@ configuration instead of being permanently disabled. When an update newly
|
|
|
69
79
|
enables Codex, it requests initial Hook activation after the client-selection
|
|
70
80
|
prompt.
|
|
71
81
|
|
|
72
|
-
Client selection controls
|
|
73
|
-
Codex
|
|
74
|
-
without managing
|
|
82
|
+
Client selection controls managed client-integration lifecycle only. It does
|
|
83
|
+
not change Codex, Claude Code, DSH, or OpenCode provider settings.
|
|
84
|
+
`--clients none` runs the Backend without managing a client integration.
|
|
85
|
+
|
|
86
|
+
## DeepSeek Harness integration paths
|
|
87
|
+
|
|
88
|
+
DSH Profiles are discovered under:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
$DSH_HOME/profiles/<profile-name>/
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`DSH_HOME` defaults to `~/.dsh`. The managed ownership record lives at
|
|
95
|
+
`$MEMORAX_CODE_HOME/adapters/dsh/state.json`. Runtime packages are materialized
|
|
96
|
+
under `$MEMORAX_CODE_HOME/adapters/dsh/runtime/generations/` and installed into
|
|
97
|
+
Profiles through DSH's native plugin command. The globally installed npm
|
|
98
|
+
package remains immutable; do not copy or edit the generated state or runtime
|
|
99
|
+
directories by hand.
|
|
100
|
+
|
|
101
|
+
MemoraX Code is tested with DSH `0.1.0-rc.6`. Other valid semantic versions are
|
|
102
|
+
accepted but appear as untested in status output; compatibility is not
|
|
103
|
+
guaranteed. An unavailable or malformed `dsh --version` result fails Profile
|
|
104
|
+
reconciliation when a Profile exists. Run `memorax-code start --clients dsh`
|
|
105
|
+
after changing `DSH_HOME`, DSH, or its Profiles.
|
|
106
|
+
|
|
107
|
+
## OpenCode integration paths
|
|
108
|
+
|
|
109
|
+
The managed OpenCode plugin loader and shared skill use OpenCode's automatic
|
|
110
|
+
discovery directories:
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
~/.config/opencode/plugins/memorax-code.js
|
|
114
|
+
~/.config/opencode/skills/memorax-code/
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Set `OPENCODE_CONFIG_DIR` to override the complete OpenCode configuration root.
|
|
118
|
+
Otherwise, `XDG_CONFIG_HOME` replaces `~/.config` when set. The managed adapter
|
|
119
|
+
record lives at `$MEMORAX_CODE_HOME/adapters/opencode/state.json`. Content-free
|
|
120
|
+
plugin runtime evidence lives beside it in `workspaces.json` and records only
|
|
121
|
+
the observed event, workspace, optional session identifier, and timestamp.
|
|
122
|
+
|
|
123
|
+
MemoraX Code does not add entries to or otherwise modify `opencode.json` or
|
|
124
|
+
`opencode.jsonc`. Restart or refresh OpenCode after installation or after these
|
|
125
|
+
managed assets change.
|
|
126
|
+
|
|
127
|
+
The managed loader records the exact MemoraX Code home, OpenCode configuration
|
|
128
|
+
directory, installed Node runtime, and `memorax-code` entrypoint. When the
|
|
129
|
+
enabled plugin loads, it performs a best-effort Backend health check and uses
|
|
130
|
+
those installed package paths to restore an unavailable loopback Backend. A
|
|
131
|
+
prompt waits no more than the plugin instance's single five-second recovery
|
|
132
|
+
budget; if that budget expires, automatic memory handling for that turn is
|
|
133
|
+
skipped while recovery continues in the background. This preserves the
|
|
134
|
+
configured client selection. Remote Backend URLs, invalid connection
|
|
135
|
+
authority, and a removed package command are not recovered automatically.
|
|
75
136
|
|
|
76
137
|
## MemoraX connection
|
|
77
138
|
|
|
@@ -120,20 +181,20 @@ Automatic prompt retrieval is disabled by default.
|
|
|
120
181
|
| `memory_type_order` | `MEMORAX_CODE_MEMORAX_MEMORY_TYPE_ORDER` | `core,episodic,semantic,procedural,unclassified` |
|
|
121
182
|
|
|
122
183
|
The TOML form of `memory_type_order` is an array of strings; the environment
|
|
123
|
-
form is comma-separated. `enabled` controls automatic
|
|
124
|
-
|
|
184
|
+
form is comma-separated. `enabled` controls automatic prompt retrieval only.
|
|
185
|
+
Explicit `memorax-cli search` remains available when
|
|
125
186
|
credentials and a trusted workspace scope resolve.
|
|
126
187
|
|
|
127
188
|
## Writeback and explicit add
|
|
128
189
|
|
|
129
|
-
New configurations explicitly set automatic
|
|
190
|
+
New configurations explicitly set automatic completed-turn writeback to enabled.
|
|
130
191
|
An existing configuration without `enabled` remains disabled.
|
|
131
192
|
|
|
132
193
|
| Field | Environment override | Fallback |
|
|
133
194
|
| --- | --- | --- |
|
|
134
195
|
| `enabled` | `MEMORAX_CODE_MEMORY_WRITEBACK_ENABLED` | `false` when absent |
|
|
135
196
|
| `buffer_enabled` | `MEMORAX_CODE_MEMORY_WRITEBACK_BUFFER_ENABLED` | `true` |
|
|
136
|
-
| `buffer_max_turns` | `MEMORAX_CODE_MEMORY_WRITEBACK_BUFFER_MAX_TURNS` | `8`; `-1` disables automatic
|
|
197
|
+
| `buffer_max_turns` | `MEMORAX_CODE_MEMORY_WRITEBACK_BUFFER_MAX_TURNS` | `8`; `-1` disables automatic writeback |
|
|
137
198
|
| `buffer_max_age_ms` | `MEMORAX_CODE_MEMORY_WRITEBACK_BUFFER_MAX_AGE_MS` | `600000` |
|
|
138
199
|
| `buffer_max_chars` | `MEMORAX_CODE_MEMORY_WRITEBACK_BUFFER_MAX_CHARS` | `128000` |
|
|
139
200
|
| `max_message_chars` | `MEMORAX_CODE_MEMORY_WRITEBACK_MAX_MESSAGE_CHARS` | `64000` |
|
|
@@ -160,12 +221,42 @@ selecting another language. The setting affects newly generated content;
|
|
|
160
221
|
`raw` input and client-supplied `pre_summarized` text are not translated.
|
|
161
222
|
Command arguments override the other add defaults.
|
|
162
223
|
|
|
224
|
+
### Automatic writeback redaction
|
|
225
|
+
|
|
226
|
+
Automatic writeback first bounds each user or assistant message with
|
|
227
|
+
`max_message_chars`, discarding an incomplete token at the cutoff, and then
|
|
228
|
+
runs a local best-effort detector before hashing, buffering, chunking, or
|
|
229
|
+
sending the content. The detector replaces these categories with typed
|
|
230
|
+
placeholders:
|
|
231
|
+
|
|
232
|
+
| Category | Placeholder |
|
|
233
|
+
| --- | --- |
|
|
234
|
+
| Private keys | `[REDACTED:PRIVATE_KEY]` |
|
|
235
|
+
| Authorization tokens and JWTs | `[REDACTED:AUTH_TOKEN]` |
|
|
236
|
+
| Cookie values | `[REDACTED:COOKIE]` |
|
|
237
|
+
| Common API key formats | `[REDACTED:API_KEY]` |
|
|
238
|
+
| Credential assignments, CLI arguments, URL query values, and URL passwords | `[REDACTED:CREDENTIAL]` |
|
|
239
|
+
| Email addresses | `[REDACTED:EMAIL]` |
|
|
240
|
+
| Long numbers, including common spaces, hyphens, and parentheses | `[REDACTED:LONG_NUMBER]` |
|
|
241
|
+
| UUIDs, fixed-length hexadecimal strings, and high-entropy alphanumeric identifiers | `[REDACTED:OPAQUE_ID]` |
|
|
242
|
+
|
|
243
|
+
If either bounded message has no meaningful content after replacement, the
|
|
244
|
+
automatic writeback is skipped before network dispatch. The detector is
|
|
245
|
+
always active for automatic writeback, but it is not a complete
|
|
246
|
+
data-loss-prevention system and may miss unknown or weak-context sensitive
|
|
247
|
+
formats. Explicit `memorax-cli add` content and Search queries are sent as
|
|
248
|
+
entered and do not pass through this detector.
|
|
249
|
+
|
|
163
250
|
## Skill reminder and repository maintenance
|
|
164
251
|
|
|
165
252
|
`[memory.skill_reminder].interval_turns` defaults to `5`; its environment
|
|
166
253
|
override is `MEMORAX_CODE_MEMORY_SKILL_REMINDER_INTERVAL_TURNS`. A positive
|
|
167
|
-
value controls the reminder cadence for
|
|
168
|
-
eligible prompt.
|
|
254
|
+
value controls the native skill reminder cadence for supported client
|
|
255
|
+
sessions, beginning with the first eligible prompt or Turn. The same interval
|
|
256
|
+
controls trusted repo-scoped Procedure Memory. User Profile preferences are
|
|
257
|
+
applied on first observation and restored with a personal-memory reminder
|
|
258
|
+
after successful context compaction. These local contexts remain separate
|
|
259
|
+
from automatic writeback content.
|
|
169
260
|
|
|
170
261
|
| Field | Environment override | Fallback |
|
|
171
262
|
| --- | --- | --- |
|
|
@@ -177,29 +268,45 @@ Supported policies are `every-commit`, `commit-count`, `daily`,
|
|
|
177
268
|
`pull-request`, `pull-request-or-daily`, and `adaptive`. Invalid policy values
|
|
178
269
|
fall back to `adaptive`.
|
|
179
270
|
|
|
180
|
-
|
|
181
|
-
authorized a Git worktree and that
|
|
182
|
-
If the Backend or workspace
|
|
183
|
-
|
|
271
|
+
In Codex, Claude Code, DSH, and OpenCode, the first eligible prompt starts a
|
|
272
|
+
background build only when the Backend has authorized a Git worktree and that
|
|
273
|
+
worktree has no `.repo_memory/PROFILE.md`. If the Backend or workspace
|
|
274
|
+
authority is unavailable, the client integration skips that attempt instead
|
|
275
|
+
of falling back to its local workspace path. DSH schedules this work through
|
|
276
|
+
its native pre-step integration rather than a Hook.
|
|
277
|
+
|
|
278
|
+
A relevant repo-read runs supervised maintenance in all four clients. The
|
|
279
|
+
configured policy may select a build, update, or no-op. DSH maintenance
|
|
280
|
+
requires an enabled, managed Profile that includes `@deepseek-ai/dsh-headless`.
|
|
281
|
+
OpenCode executes the job through its active local server. Desktop-only
|
|
282
|
+
installations do not require a standalone `opencode` executable in `PATH`.
|
|
184
283
|
|
|
185
284
|
## Local traces
|
|
186
285
|
|
|
187
|
-
`[trace.codex]` and `[trace.
|
|
286
|
+
`[trace.codex]`, `[trace.claude]`, `[trace.dsh]`, and `[trace.opencode]`
|
|
287
|
+
support the same fields:
|
|
188
288
|
|
|
189
|
-
| Field | Codex environment | Claude environment | Fallback |
|
|
190
|
-
| --- | --- | --- | --- |
|
|
191
|
-
| `enabled` | `MEMORAX_CODE_CODEX_TRACE_ENABLED` | `MEMORAX_CODE_CLAUDE_TRACE_ENABLED` | `true` |
|
|
192
|
-
| `capture_content` | `MEMORAX_CODE_CODEX_TRACE_CAPTURE_CONTENT` | `MEMORAX_CODE_CLAUDE_TRACE_CAPTURE_CONTENT` | `true` |
|
|
193
|
-
| `retention_days` | `MEMORAX_CODE_CODEX_TRACE_RETENTION_DAYS` | `MEMORAX_CODE_CLAUDE_TRACE_RETENTION_DAYS` | `7` |
|
|
194
|
-
| `max_event_chars` | `MEMORAX_CODE_CODEX_TRACE_MAX_EVENT_CHARS` | `MEMORAX_CODE_CLAUDE_TRACE_MAX_EVENT_CHARS` | `20000` |
|
|
195
|
-
| `max_file_bytes` | `MEMORAX_CODE_CODEX_TRACE_MAX_FILE_BYTES` | `MEMORAX_CODE_CLAUDE_TRACE_MAX_FILE_BYTES` | `52428800` |
|
|
289
|
+
| Field | Codex environment | Claude environment | DSH environment | OpenCode environment | Fallback |
|
|
290
|
+
| --- | --- | --- | --- | --- | --- |
|
|
291
|
+
| `enabled` | `MEMORAX_CODE_CODEX_TRACE_ENABLED` | `MEMORAX_CODE_CLAUDE_TRACE_ENABLED` | `MEMORAX_CODE_DSH_TRACE_ENABLED` | `MEMORAX_CODE_OPENCODE_TRACE_ENABLED` | `true` |
|
|
292
|
+
| `capture_content` | `MEMORAX_CODE_CODEX_TRACE_CAPTURE_CONTENT` | `MEMORAX_CODE_CLAUDE_TRACE_CAPTURE_CONTENT` | `MEMORAX_CODE_DSH_TRACE_CAPTURE_CONTENT` | `MEMORAX_CODE_OPENCODE_TRACE_CAPTURE_CONTENT` | `true` |
|
|
293
|
+
| `retention_days` | `MEMORAX_CODE_CODEX_TRACE_RETENTION_DAYS` | `MEMORAX_CODE_CLAUDE_TRACE_RETENTION_DAYS` | `MEMORAX_CODE_DSH_TRACE_RETENTION_DAYS` | `MEMORAX_CODE_OPENCODE_TRACE_RETENTION_DAYS` | `7` |
|
|
294
|
+
| `max_event_chars` | `MEMORAX_CODE_CODEX_TRACE_MAX_EVENT_CHARS` | `MEMORAX_CODE_CLAUDE_TRACE_MAX_EVENT_CHARS` | `MEMORAX_CODE_DSH_TRACE_MAX_EVENT_CHARS` | `MEMORAX_CODE_OPENCODE_TRACE_MAX_EVENT_CHARS` | `20000` |
|
|
295
|
+
| `max_file_bytes` | `MEMORAX_CODE_CODEX_TRACE_MAX_FILE_BYTES` | `MEMORAX_CODE_CLAUDE_TRACE_MAX_FILE_BYTES` | `MEMORAX_CODE_DSH_TRACE_MAX_FILE_BYTES` | `MEMORAX_CODE_OPENCODE_TRACE_MAX_FILE_BYTES` | `52428800` |
|
|
196
296
|
|
|
197
|
-
|
|
198
|
-
content, reminder text, and
|
|
297
|
+
Depending on the enabled client capabilities, content capture can include
|
|
298
|
+
prompts, responses, recalled memory, writeback content, reminder text, and
|
|
299
|
+
local paths. Set `capture_content=false` for
|
|
199
300
|
metadata-only local traces, or `enabled=false` to disable a client's trace.
|
|
200
301
|
Trace files stay under `$MEMORAX_CODE_HOME`; MemoraX Code has no trace upload,
|
|
201
302
|
export, or public collector.
|
|
202
303
|
|
|
304
|
+
DSH trace contains only normalized lifecycle and memory-operation events. Its
|
|
305
|
+
native Session Event Log and raw events remain local to DSH; MemoraX Code does
|
|
306
|
+
not copy that log into trace. Memory Viewer includes DSH activity from
|
|
307
|
+
normalized operational events and retained trace, and never reads the native
|
|
308
|
+
Session Event Log.
|
|
309
|
+
|
|
203
310
|
## Backend runtime settings
|
|
204
311
|
|
|
205
312
|
Backend connection and process authority is not stored in `config.toml`.
|
|
@@ -242,6 +349,8 @@ memorax-cli status
|
|
|
242
349
|
memorax-cli status --json
|
|
243
350
|
memorax-code-codex doctor
|
|
244
351
|
memorax-code-claude doctor
|
|
352
|
+
memorax-code status --clients dsh
|
|
353
|
+
memorax-code-opencode doctor
|
|
245
354
|
```
|
|
246
355
|
|
|
247
356
|
The status commands do not print the MemoraX API key or Backend token.
|
package/docs/troubleshooting.md
CHANGED
|
@@ -7,12 +7,16 @@ memorax-code status
|
|
|
7
7
|
memorax-cli status
|
|
8
8
|
memorax-code-codex doctor
|
|
9
9
|
memorax-code-claude doctor
|
|
10
|
+
memorax-code status --clients dsh
|
|
11
|
+
memorax-code-opencode doctor
|
|
10
12
|
memorax-code logs
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
`status` checks the Backend and client integrations
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
`memorax-code status` checks the Backend and selected client integrations,
|
|
16
|
+
including DSH and OpenCode. `memorax-cli status` checks credentials, scope, and
|
|
17
|
+
memory switches without printing secrets. Codex, Claude Code, and OpenCode
|
|
18
|
+
also provide client-specific `doctor` commands; DSH uses the shared lifecycle
|
|
19
|
+
status.
|
|
16
20
|
|
|
17
21
|
## Installed, but memory is unavailable
|
|
18
22
|
|
|
@@ -103,6 +107,55 @@ This reconciles the Claude Code marketplace plugin and Hooks. If the plugin is
|
|
|
103
107
|
still missing or stale, restart or refresh Claude Code. Do not manually copy
|
|
104
108
|
Hooks into Claude settings.
|
|
105
109
|
|
|
110
|
+
## DeepSeek Harness Profile integration is inactive
|
|
111
|
+
|
|
112
|
+
```sh
|
|
113
|
+
dsh --version
|
|
114
|
+
pnpm --version
|
|
115
|
+
memorax-code start --clients dsh
|
|
116
|
+
memorax-code status --clients dsh
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
MemoraX Code discovers existing Profiles under `$DSH_HOME/profiles`;
|
|
120
|
+
`DSH_HOME` defaults to `~/.dsh`. A `no_existing_profiles` result means DSH has
|
|
121
|
+
not created a valid Profile in that home. A `dsh_version_unavailable` result
|
|
122
|
+
means the selected `dsh` command did not return a valid semantic version. The
|
|
123
|
+
tested baseline is `0.1.0-rc.6`; another valid version is allowed but marked
|
|
124
|
+
untested. A `pnpm_not_found` result means DSH's native Profile plugin manager
|
|
125
|
+
could not find `pnpm` on `PATH`; install `pnpm`, then rerun the start command.
|
|
126
|
+
|
|
127
|
+
After repairing the command, Profile manifest, or home selection, rerun the
|
|
128
|
+
start command and restart or refresh DSH. `profile_drift`,
|
|
129
|
+
`profile_manifest_unreadable`, and `runtime_authority_invalid` are managed-state
|
|
130
|
+
failures rather than reasons to edit the Profile or
|
|
131
|
+
`$MEMORAX_CODE_HOME/adapters/dsh/state.json` manually. The lifecycle command
|
|
132
|
+
uses DSH's plugin manager to reconcile the integration. Stop and uninstall
|
|
133
|
+
remove the managed MemoraX Code plugin, not the DSH Profile or its session
|
|
134
|
+
data.
|
|
135
|
+
|
|
136
|
+
## OpenCode plugin or skill is inactive
|
|
137
|
+
|
|
138
|
+
```sh
|
|
139
|
+
memorax-code start --clients opencode
|
|
140
|
+
memorax-code status --clients opencode
|
|
141
|
+
memorax-code-opencode doctor
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Rerun the start command to reconcile the managed plugin and skill, then restart
|
|
145
|
+
or refresh OpenCode. The configuration root follows `OPENCODE_CONFIG_DIR`, then
|
|
146
|
+
`XDG_CONFIG_HOME`, and otherwise defaults to `~/.config/opencode`. MemoraX Code
|
|
147
|
+
does not add plugin entries to `opencode.json` or `opencode.jsonc`.
|
|
148
|
+
|
|
149
|
+
An enabled managed plugin normally attempts to restore an unavailable local
|
|
150
|
+
loopback Backend when OpenCode loads it. A prompt stops waiting after the
|
|
151
|
+
plugin instance's single five-second recovery budget and skips automatic
|
|
152
|
+
memory handling for that turn, but the Backend start continues in the
|
|
153
|
+
background. If that recovery is skipped or fails, use `memorax-code status` and
|
|
154
|
+
`memorax-code logs`, then run the start command above. If doctor reports no
|
|
155
|
+
plugin runtime evidence, restart or refresh OpenCode and rerun it. Automatic
|
|
156
|
+
recovery intentionally skips remote URLs, invalid connection authority, and
|
|
157
|
+
stale loaders whose recorded package command no longer exists.
|
|
158
|
+
|
|
106
159
|
An already-open client may keep its loaded plugin shell while a later prompt
|
|
107
160
|
uses the updated Hook runtime. Restart or refresh the client to load a changed
|
|
108
161
|
plugin manifest, icon, or bundled skill.
|
|
@@ -116,6 +169,8 @@ environment may be intercepting `127.0.0.1` or `localhost`.
|
|
|
116
169
|
memorax-code start
|
|
117
170
|
memorax-code-codex doctor
|
|
118
171
|
memorax-code-claude doctor
|
|
172
|
+
memorax-code status --clients dsh
|
|
173
|
+
memorax-code-opencode doctor
|
|
119
174
|
/usr/sbin/scutil --proxy
|
|
120
175
|
/bin/launchctl getenv NO_PROXY
|
|
121
176
|
/bin/launchctl getenv no_proxy
|
|
@@ -132,6 +187,8 @@ memorax-cli status
|
|
|
132
187
|
memorax-cli search --query 'test'
|
|
133
188
|
memorax-code-codex doctor
|
|
134
189
|
memorax-code-claude doctor
|
|
190
|
+
memorax-code status --clients dsh
|
|
191
|
+
memorax-code-opencode doctor
|
|
135
192
|
```
|
|
136
193
|
|
|
137
194
|
Common causes are:
|
|
@@ -147,12 +204,13 @@ MemoraX Code reads filesystem Git metadata without executing Git. Linked
|
|
|
147
204
|
worktrees share the remote repository identity; non-Git workspaces use the
|
|
148
205
|
normalized folder name. Resolution never falls back to the bare base user ID.
|
|
149
206
|
|
|
150
|
-
A live Codex
|
|
151
|
-
workspace resolved at the start of the session. Starting
|
|
152
|
-
parent workspace and then entering a nested Git repository
|
|
153
|
-
session. The only in-session scope upgrade is from a direct
|
|
154
|
-
whose internal metadata was malformed or incomplete to a
|
|
155
|
-
repository at the same canonical workspace root and for the same
|
|
207
|
+
A live Codex, Claude Code, DSH, or OpenCode session remains pinned to the
|
|
208
|
+
repository or local workspace resolved at the start of the session. Starting
|
|
209
|
+
the client from a parent workspace and then entering a nested Git repository
|
|
210
|
+
does not rebind the session. The only in-session scope upgrade is from a direct
|
|
211
|
+
`.git` directory whose internal metadata was malformed or incomplete to a
|
|
212
|
+
verified Git repository at the same canonical workspace root and for the same
|
|
213
|
+
Base User ID.
|
|
156
214
|
|
|
157
215
|
During that degraded state, MemoraX Code reports
|
|
158
216
|
`workspaceScopeFallbackReason: git_metadata_invalid` for manual CLI operations
|
|
@@ -179,10 +237,10 @@ when repository isolation matters.
|
|
|
179
237
|
|
|
180
238
|
## Model-provider requests fail while MemoraX Code is healthy
|
|
181
239
|
|
|
182
|
-
MemoraX Code does not proxy Codex
|
|
183
|
-
`memorax-code status` and the
|
|
184
|
-
provider URL, credentials, model selection, and
|
|
185
|
-
client. Do not copy model-provider credentials into
|
|
240
|
+
MemoraX Code does not proxy Codex, Claude Code, DSH, or OpenCode model
|
|
241
|
+
requests. If `memorax-code status` and the available client-specific doctor
|
|
242
|
+
are healthy, inspect the provider URL, credentials, model selection, and
|
|
243
|
+
network settings owned by that client. Do not copy model-provider credentials into
|
|
186
244
|
`$MEMORAX_CODE_HOME`.
|
|
187
245
|
|
|
188
246
|
## Safe issue reports
|
|
@@ -194,6 +252,8 @@ memorax-code status --json
|
|
|
194
252
|
memorax-cli status --json
|
|
195
253
|
memorax-code-codex doctor --json
|
|
196
254
|
memorax-code-claude doctor --json
|
|
255
|
+
memorax-code status --clients dsh --json
|
|
256
|
+
memorax-code-opencode doctor --json
|
|
197
257
|
```
|
|
198
258
|
|
|
199
259
|
Include the MemoraX Code version, operating system, affected client,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { dirname, join, resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
+
|
|
5
|
+
const packageLib = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const stagedLifecycle = join(
|
|
7
|
+
packageLib,
|
|
8
|
+
"memorax-code-dsh-adapter",
|
|
9
|
+
"src",
|
|
10
|
+
"profile-lifecycle.mjs",
|
|
11
|
+
);
|
|
12
|
+
const sourceLifecycle = resolve(
|
|
13
|
+
packageLib,
|
|
14
|
+
"../../../ts/memorax-code-dsh-adapter/src/profile-lifecycle.mjs",
|
|
15
|
+
);
|
|
16
|
+
const lifecycle = await import(
|
|
17
|
+
pathToFileURL(existsSync(stagedLifecycle) ? stagedLifecycle : sourceLifecycle).href
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const collectDshAdapterStatus = lifecycle.collectDshAdapterStatus;
|
|
21
|
+
export const discoverDshProfiles = lifecycle.discoverDshProfiles;
|
|
22
|
+
export const withDshPluginLifecycleLock = lifecycle.withDshPluginLifecycleLock;
|
|
@@ -10,6 +10,18 @@ import {
|
|
|
10
10
|
|
|
11
11
|
export async function runCaptureCwdHook(options) {
|
|
12
12
|
const input = await readStdinJson();
|
|
13
|
+
const record = recordWorkspaceEvidence(options, input);
|
|
14
|
+
if (!record) return;
|
|
15
|
+
|
|
16
|
+
if (record.cwd) {
|
|
17
|
+
const pluginDataPath = pluginDataWorkspacePath();
|
|
18
|
+
if (pluginDataPath) writeWorkspaceState(pluginDataPath, record, options);
|
|
19
|
+
}
|
|
20
|
+
writeSessionRegistry(memoraxCodeSessionRegistryPath(options), record, options);
|
|
21
|
+
return input;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function recordWorkspaceEvidence(options, input) {
|
|
13
25
|
const transcriptPath = stringOption(input.transcript_path) ?? stringOption(input.transcriptPath);
|
|
14
26
|
if (options.requireTranscriptPathForTurnEvents && isTurnScopedEvent(input) && !transcriptPath) return;
|
|
15
27
|
const cwd = typeof input.cwd === "string" && input.cwd.trim()
|
|
@@ -24,19 +36,12 @@ export async function runCaptureCwdHook(options) {
|
|
|
24
36
|
capturedAt: new Date().toISOString(),
|
|
25
37
|
};
|
|
26
38
|
|
|
27
|
-
const registryPath = memoraxCodeSessionRegistryPath(options);
|
|
28
|
-
|
|
29
39
|
if (cwd) {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
pluginDataWorkspacePath(),
|
|
33
|
-
].filter(Boolean);
|
|
34
|
-
|
|
35
|
-
for (const target of targets) writeWorkspaceState(target, record, options);
|
|
40
|
+
const workspacePath = memoraxCodeWorkspacePath(options);
|
|
41
|
+
if (workspacePath) writeWorkspaceState(workspacePath, record, options);
|
|
36
42
|
}
|
|
37
43
|
|
|
38
|
-
|
|
39
|
-
return input;
|
|
44
|
+
return record;
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
function isTurnScopedEvent(input) {
|
|
@@ -45,17 +50,19 @@ function isTurnScopedEvent(input) {
|
|
|
45
50
|
}
|
|
46
51
|
|
|
47
52
|
function memoraxCodeWorkspacePath(options) {
|
|
48
|
-
const home = memoraxCodeHome();
|
|
53
|
+
const home = memoraxCodeHome(options);
|
|
49
54
|
return home ? join(home, "adapters", options.adapterDir, "workspaces.json") : undefined;
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
function memoraxCodeSessionRegistryPath(options) {
|
|
53
|
-
const home = memoraxCodeHome();
|
|
58
|
+
const home = memoraxCodeHome(options);
|
|
54
59
|
return home ? join(home, "adapters", options.adapterDir, "session-registry.json") : undefined;
|
|
55
60
|
}
|
|
56
61
|
|
|
57
|
-
function memoraxCodeHome() {
|
|
58
|
-
return
|
|
62
|
+
function memoraxCodeHome(options) {
|
|
63
|
+
return stringOption(options.memoraxCodeHome)
|
|
64
|
+
?? stringOption(process.env.MEMORAX_CODE_HOME)
|
|
65
|
+
?? (process.env.HOME ? join(process.env.HOME, ".memorax-code") : undefined);
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
function pluginDataWorkspacePath() {
|
|
@@ -5,19 +5,23 @@ import {
|
|
|
5
5
|
localBackendRecoveryArguments,
|
|
6
6
|
resolveBackendConnection,
|
|
7
7
|
} from "../backend-connection.mjs";
|
|
8
|
-
import { readStdinJson } from "../config-utils.mjs";
|
|
9
8
|
import { isRepoMemoryJobWorker } from "../repo-memory/repo-memory-job-context.mjs";
|
|
10
9
|
|
|
11
10
|
export const DEFAULT_ENSURE_BACKEND_START_TIMEOUT_MS = 90000;
|
|
11
|
+
const HOOK_INPUT_SYMBOL = Symbol.for("memorax-code.client-hook.input.v1");
|
|
12
12
|
|
|
13
13
|
export async function runEnsureBackendHook(options) {
|
|
14
|
-
if (isRepoMemoryJobWorker() || ensureDisabled(options.ensureBackendValue)) return;
|
|
15
|
-
|
|
16
14
|
const input = await readStdinJson();
|
|
15
|
+
await ensureBackendAvailable(options, input);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export async function ensureBackendAvailable(options, input = {}) {
|
|
19
|
+
if (isRepoMemoryJobWorker() || ensureDisabled(options.ensureBackendValue)) return;
|
|
17
20
|
const homes = options.resolveHomes(input);
|
|
18
21
|
let connection;
|
|
19
22
|
try {
|
|
20
|
-
connection =
|
|
23
|
+
connection = options.backendConnection
|
|
24
|
+
?? resolveBackendConnection({ memoraxCodeHome: homes.memoraxCodeHome });
|
|
21
25
|
} catch (error) {
|
|
22
26
|
options.debug?.(error instanceof Error ? error.message : String(error));
|
|
23
27
|
return;
|
|
@@ -36,6 +40,8 @@ export async function runEnsureBackendHook(options) {
|
|
|
36
40
|
command.value,
|
|
37
41
|
options.buildStartArgs(homes, recoveryArguments),
|
|
38
42
|
parsePositiveInt(options.startTimeoutValue, DEFAULT_ENSURE_BACKEND_START_TIMEOUT_MS),
|
|
43
|
+
options.nodePath,
|
|
44
|
+
options.recoveryEnv,
|
|
39
45
|
);
|
|
40
46
|
if (result.code !== 0) {
|
|
41
47
|
options.debug?.(
|
|
@@ -105,14 +111,14 @@ function memoraxCodeCommandAvailable(command) {
|
|
|
105
111
|
return path.split(delimiter).some((dir) => dir && existsSync(join(dir, command)));
|
|
106
112
|
}
|
|
107
113
|
|
|
108
|
-
function runMemoraxCode(command, args, timeoutMs) {
|
|
114
|
+
function runMemoraxCode(command, args, timeoutMs, nodePath, recoveryEnv) {
|
|
109
115
|
return new Promise((resolve) => {
|
|
110
116
|
const childArgs = nodeEntrypoint(command) ? [command, ...args] : args;
|
|
111
|
-
const childCommand = nodeEntrypoint(command) ? process.execPath : command;
|
|
117
|
+
const childCommand = nodeEntrypoint(command) ? (stringValue(nodePath) ?? process.execPath) : command;
|
|
112
118
|
let stderr = "";
|
|
113
119
|
let settled = false;
|
|
114
120
|
const child = spawn(childCommand, childArgs, {
|
|
115
|
-
env: process.env,
|
|
121
|
+
env: recoveryEnv === undefined ? process.env : { ...process.env, ...recoveryEnv },
|
|
116
122
|
stdio: ["ignore", "ignore", "pipe"],
|
|
117
123
|
});
|
|
118
124
|
const finish = (result) => {
|
|
@@ -140,3 +146,16 @@ function parsePositiveInt(value, fallback) {
|
|
|
140
146
|
const parsed = Number(value);
|
|
141
147
|
return Number.isInteger(parsed) && parsed > 0 ? parsed : fallback;
|
|
142
148
|
}
|
|
149
|
+
|
|
150
|
+
async function readStdinJson() {
|
|
151
|
+
const injected = globalThis[HOOK_INPUT_SYMBOL];
|
|
152
|
+
if (injected && typeof injected === "object" && !Array.isArray(injected)) return injected;
|
|
153
|
+
let text = "";
|
|
154
|
+
for await (const chunk of process.stdin) text += chunk;
|
|
155
|
+
if (!text.trim()) return {};
|
|
156
|
+
try {
|
|
157
|
+
return JSON.parse(text);
|
|
158
|
+
} catch {
|
|
159
|
+
return {};
|
|
160
|
+
}
|
|
161
|
+
}
|