Repository navigation
feat: import seekmoon conversation history - #22
chaijie2018 wants to merge 1 commit into
Conversation
SeekMoon keeps one JSONL transcript per conversation inside the workspace it belongs to (<workspace>/.openseek/sessions/<id>/openseek_session-<id>.jsonl), so unlike every other platform here there is no single home directory to scan: the roots come from the desktop's own ~/.openseek/workspaces.json. Read maps what the user saw: `user`, `assistant` (prose and its tool calls kept on one message) and `tool_result` (paired by tool_call_id). `runtime_notice`, `terminal` and the assistant's `reasoning_content` are app bookkeeping and are skipped; an unknown kind or a malformed line becomes a warning, never a failed session. Uploading needs the platform's agent token, which the seekmoon installer writes into host-mcp.json. Until the backend accepts the platform, the resolver says so and names both ways to supply one, instead of failing with a bare path error. The "Use one of: ..." hint in the import commands now comes from the registry rather than a repeated literal at two call sites. Co-Authored-By: SeekMoon <seekmoon@moonbitlang.com>
|
Same first-contribution situation as #20: the CI run here is sitting in On the dependency with #20 — this shares that PR's backend gap rather than adding a new one:
The two are therefore independent to review and land, but only together do they produce the end-to-end flow: install → import → steady-state memory. If it is easier for you to review them as one change, I am happy to fold this into #20 instead — just say which you prefer. The platform-id question from #20 ( |
Summary
Adds a SeekMoon reader to
evercli import conversations, so conversations a user already had in SeekMoon can seed EverMe memory instead of starting empty. It is the importer counterpart of #20 (the same platform's installer).Unlike every other host here, SeekMoon keeps one transcript per conversation inside the workspace it belongs to, not in a home directory:
so the scan roots come from SeekMoon's own workspace registry (
~/.openseek/workspaces.json) rather than a fixed path.scanworks today;runneeds the platform's agent tokenevercli import conversations scan --platform seekmoonis local-only and works now.runuploads with the target platform'sevt, resolved from the tokenplugin install seekmoonwrites intohost-mcp.json. That install is refused by the backend today (platform: seekmoon does not validate as known_platform), so uploading needs the same backend change as feat: add seekmoon as a plugin install target #20.Rather than surface a bare file error, the resolver names both ways to get a credential:
Changes
cli/internal/importer/conversation/seekmoon.go— the scanner.Scanwalks each workspace's.openseek/sessionsforopenseek_session-*.jsonl(skipping thejobs/andscratch/subdirectories),Readstreams the transcript.cli/internal/importer/conversation/types.go,platforms.go,registry.go— registerseekmoon: platform id, known-platform set, default registry, andDefaultRoots(workspace registry, withEVERCLI_SEEKMOON_WORKSPACES/EVERCLI_SEEKMOON_HOMEoverrides for tests).cli/internal/importer/conversation/evt.go—resolveSeekMoonEvtplusseekMoonRuntimeDir, mirroringcli/internal/plugin/seekmoon.go.cli/cmd/imports/conversations.go— the two "Use one of: …" hints now come fromconversation.PlatformList(); the list had been duplicated at both call sites and would have gone stale with a new platform.cli/internal/importer/conversation/seekmoon_test.go,testdata/seekmoon_sample.jsonl— six test functions, nine cases.CHANGELOG.md.What gets imported
The transcript is JSONL: a header line (
version,id,system_prompt) followed by{"sequence":N,"ts":ms,"item":{"kind":"…","payload":{…}}}records.useruser;content, truncated to 8000 runes and redactedassistantassistant; prose and itstool_callson one message, so a call stays next to what asked for it. A turn with onlyreasoning_contentis skippedtool_resulttool, paired bytool_call_id; a missing id is a warningruntime_notice,terminalsystem_promptidbecomes the origin ofconversationId, so re-imports address the same sessionAn unknown kind or a malformed line becomes a warning on the conversation, never a failed session.
Test Plan
go1.27.3, darwin/arm64, commit
9917601:cli/changed — the commands above, race detector onplugins/changed — not applicable, this PR does not touchplugins/Manual checks against this machine's own data:
messages: 1012, toolCalls: 498, status: ready, grouped under("all sessions").skippedActive(the shared "file is still being written" rule every platform uses).runfails at credential resolution with the actionable message quoted above.Security
emk_*,evt_*, cookies, private URLs, or production logs are included — the fixture uses synthetic timestamps and ids, and the tests build their configs in temp directories.Related Issues
evercli plugin install seekmoon.