npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@everme/qwencode

v0.7.10

Published

Native EverMe memory hooks for Qwen Code.

Readme

@everme/qwencode

Native EverMe memory hooks for Qwen Code.

What it does

Qwen Code runs hooks that follow the Claude Code hook contract: stdin carries the hook input as JSON, stdout is parsed as hook output, and exit code 2 blocks the operation. evercli plugin install qwencode registers three events:

| Event | Mode | What it does | |---|---|---| | SessionStart | sync | Injects the durable Profile block once per session. | | UserPromptSubmit | sync | Injects recall for a submitted prompt as additionalContext. | | Stop | sync, detaches | Starts a detached worker that uploads the finished turn, then exits. |

The install also does these steps:

  • It stages this bundle at <qwen-home>/everme/.
  • It writes credentials to <qwen-home>/everme.env with mode 0600.
  • It adds the three hooks and the read-only everme-memory MCP server to <qwen-home>/settings.json. Other keys, the user's own hooks and other MCP servers stay unchanged. The file then holds a live token, so its mode becomes 0600.

<qwen-home> is $QWEN_HOME, or ~/.qwen. Each hook command passes it as an argument after the event name, because a hook process does not inherit a variable that names it.

Start a new Qwen Code session after install so that it loads the hooks.

Why recall needs submitted_prompt

UserPromptSubmit also fires on tool-result and hook continuations. On those calls prompt is not what the user typed. Qwen Code sets submitted_prompt only on a real submission, and its documentation says to treat a missing submitted_prompt as "no user text". So recall runs only when submitted_prompt is present.

Why Stop detaches

  • SessionEnd fires only when the CLI exits, so Stop is the capture boundary.
  • Qwen Code supports "async": true on a hook, but it kills async hooks when the CLI exits. In -p mode the CLI exits right after the turn, so an async upload can die before it finishes.
  • So Stop is registered as a synchronous hook that only starts a detached worker (bin/worker.js) and exits. The turn waits for one node start, and the worker outlives the CLI. Two workers of one session cannot post the same delta twice, because the SDK checkpoint serializes read, upload and commit per session.

How a turn is read

Every hook payload carries transcript_path, which points to <qwen-home>/projects/<sanitized-cwd>/chats/<session-id>.jsonl. Qwen Code forked Gemini CLI, so the records are Gemini-shaped:

| Record | Uploaded as | |---|---| | user with provenance: "real_user" (no subtype, mid_turn_user_message or realtime_message) | user, text parts only | | assistant text parts | assistant content | | assistant functionCall {id, name, args} | toolCalls with a JSON-string arguments | | tool_result functionResponse {id, response} | tool, linked by id; content is output or error |

These are not uploaded:

  • Reasoning parts (thought: true).
  • The <qwen:user-prompt-submit-context> part that holds injected hook context, and a leading <everme_recall> / <everme_profile> block.
  • Cron, notification and Goal runtime user records, which the host wrote.
  • system records and internal code_mode_tool_result results.

The file is a tree. The reader takes the last conversation record as the leaf and walks parentUuid back to the root, the same way Qwen Code rebuilds a session. A rewound turn is therefore never uploaded. Fragments that share a uuid are merged in file order. Subagent runs are written to separate files, so the parent transcript never holds them.

The file has no end-of-turn marker. The last assistant text of each user turn that makes no further tool call is marked turnComplete.

The upload is a delta against a per-session checkpoint keyed by native record ids, with deduplication: "client-native-id". The first Stop after install uploads only the latest turn.

Configuration

The hook reads its credentials from <qwen-home>/everme.env, which evercli writes. You can override the location in these ways:

  • EVERME_ENV_FILE_PATH sets the path of the credential file.
  • EVERCLI_QWENCODE_CONFIG_DIR sets the Qwen home when no argument names it.

Without credentials the hooks are silent: no output, no error, exit code 0. Memory must never block a turn, so every failure path exits with code 0 and writes one line to stderr.

Uninstall

evercli plugin uninstall qwencode

To uninstall manually, do these steps:

  1. In <qwen-home>/settings.json, remove the everme-named handlers from hooks and the mcpServers["everme-memory"] entry. Keep every other hook and server. Remove an event key only if it becomes empty.
  2. Run rm -rf <qwen-home>/everme <qwen-home>/everme.env.

Tests

npm test --workspace @everme/qwencode

The transcript fixture is reconstructed from the Qwen Code 0.26.1 recorder source, not captured from a live session.

License

Apache-2.0