fix(project): name the project a memory belongs to, and refuse to guess it - #558
Open
kevintseng wants to merge 4 commits into
Open
kevintseng wants to merge 4 commits into
kevintseng wants to merge 4 commits into
Conversation
…ss it - `learn` takes an optional `project` over MCP and `memesh learn --project` (omitted, it uses the current directory's project, as `task_state` and `briefing` do). `POST /v1/learn` requires `project`: the HTTP server's own directory is never the caller's project, so a missing one is a 400 and nothing is written. - An MCP server running in MeMesh's own directory (Codex starts plugin servers in the plugin's directory) cannot tell which project the caller is in: `learn`, `task_state` and `briefing` without `project` are refused there with one line saying to pass the project the SessionStart briefing gave. A server started in a workspace (Claude Code) is unchanged. - `learn`, `task_state`, `briefing` and the CLI's `task`, `briefing`, `import --notes` and `learn` refuse an empty or path-shaped project, absolute or relative. A project name is otherwise used exactly as given everywhere, so a stored task state or lesson is found again under the same spelling. - `GET /v1/task-state` and `GET /v1/briefing-index` still read an existing path-shaped project key exactly as stored; writes to one are refused. - The PreCompact hook skips a payload whose `session_id` or `cwd` is missing, blank or not a string, and records why. Refs #527
# Conflicts: # CHANGELOG.md # dist/mcp/THIRD_PARTY_NOTICES.txt # dist/mcp/server.js.map # dist/transports/mcp/handlers.d.ts.map # dist/transports/mcp/handlers.js.map
…t errors - A project name longer than 200 characters is refused by `learn`, `task_state`, `briefing` and the CLI's `task`, `learn` and `briefing`, the same limit the read routes already applied; before, the CLI stored a key that the dashboard and MCP could not read back. - When a project cannot be determined from the working directory, the error says how to find it: run `memesh briefing --json` in the workspace and pass its `project` field. - The exported OpenAI tool schema for `learn` says that HTTP requires `project`. - The changelog and API reference state the rules precisely: they apply to `learn`, `task_state` and `briefing` (messaging and `kg rename-project` are unchanged), and a server run from the checkout it is started in counts as MeMesh's own directory. Refs #527
… as a project Refs #527
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #527
What changes for you
learncan now be told which project a lesson belongs to:projectover MCP,memesh learn --projecton the CLI.POST /v1/learnrequires it; without it the request is refused and nothing is written.learn,task_stateandbriefingwithoutprojectare refused there with one line saying what to pass. A server started in your workspace (Claude Code) behaves as before.GET /v1/task-stateandGET /v1/briefing-index.Checks
npm run verifygreen for this tree.