Skip to content

Commit cd4a129

Browse files
rcursoragent
andcommitted
v0.48.0: vocabulary unification, part 3 (final)
Remove the v0.46-deprecated `morph run` namespace and the nested `morph eval add-case` / `morph eval suite-show` / `morph eval suite-from-specs` aliases. The JSON-ingest path that used to be `morph run record <file>` lives on as `morph session import` — the only piece of the old `run` namespace that did something `morph session record` couldn't already cover. Sixth and final release of the multi-phase "make morph intuitive" effort. Added - `morph session import <run.json> [--trace <file>] [--artifact <file>...]`: ingests pre-built Run JSON. Used by CI pipelines, MCP bridges, and the claude-code/cursor hook scripts. - New spec `removed_session_eval_aliases.yaml` (7 cases) pins that every removed spelling exits with code 2 / "unrecognized subcommand" and that `morph session import --help` is reachable. Removed - `morph run` namespace (`list`, `show`, `record-session`, `record`). Use `morph session list` / `show` / `record` / `import`. - `morph eval add-case` / `suite-show` / `suite-from-specs`. Use the flat `morph eval add` / `show` / `rebuild` (introduced in v0.46). - `inspect::deprecation_notice` helper — nothing dispatches to it anymore. - `RunCmd` enum and `Command::Run` dispatch arm; deprecated `EvalCmd::AddCase` / `SuiteShow` / `SuiteFromSpecs` variants. Changed - Hook scripts (claude-code, cursor, .cursor, asset templates) call `morph session import` instead of the removed `morph run record`. - `morph setup aoe` writes `morph session record` into AOE `on_launch` and `on_destroy` hooks; legacy spelling stays in the cleanup-prefix list so re-running scrubs stale lines. - Cucumber step definitions invoke `morph session record` instead of `morph run record-session` (Gherkin step names unchanged). - Doc + site sweep across README, docs/, .cursor/rules, and site/changelog.html for the v0.48 spelling. Architectural prose ("run = recorded execution") left alone per the dual-vocabulary rule. Tests - 1212 workspace tests passing (426 spec tests + unit tests). - Cucumber 34/37 (3 skipped, 0 failed). - `cargo build --workspace`, `cargo clippy --workspace --all-targets --all-features -- -D warnings`, `cargo fmt --all -- --check` clean. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 905ac73 commit cd4a129

56 files changed

Lines changed: 503 additions & 564 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.cursor/morph-record-response.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# Cursor hook: afterAgentResponse. Payload includes "text" (full agent response).
3-
# If .morph/hooks/pending-<conversation_id>.jsonl exists, build Trace+Run with real response text and run `morph run record`.
3+
# If .morph/hooks/pending-<conversation_id>.jsonl exists, build Trace+Run with real response text and run `morph session import`.
44
# Logs: .morph/hooks/logs/cursor-invoke.log, .morph/hooks/logs/morph-record.log, .morph/hooks/debug/last-afterAgentResponse.json (payload, text truncated).
55
set -e
66
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -126,13 +126,13 @@ for root in roots:
126126
json.dump(run_obj, f, indent=2)
127127
128128
result = subprocess.run(
129-
["morph", "run", "record", str(run_path), "--trace", str(trace_path)],
129+
["morph", "session", "import", str(run_path), "--trace", str(trace_path)],
130130
cwd=repo,
131131
capture_output=True,
132132
text=True,
133133
)
134134
if result.returncode != 0:
135-
sys.stderr.write(f"morph run record failed: {result.stderr}\n")
135+
sys.stderr.write(f"morph session import failed: {result.stderr}\n")
136136
continue
137137
run_hash = result.stdout.strip()
138138
log_morph_record(morph_dir, conversation_id, run_hash)

‎.cursor/morph-record-stop.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Cursor hook: stop. If .morph/hooks/pending-<conversation_id>.jsonl exists, build Trace+Run and run `morph run record`.
2+
# Cursor hook: stop. If .morph/hooks/pending-<conversation_id>.jsonl exists, build Trace+Run and run `morph session import`.
33
# Logs: .morph/hooks/logs/cursor-invoke.log (Cursor called us), .morph/hooks/logs/morph-record.log (Morph accepted the run), .morph/hooks/debug/last-stop.json (payload).
44
set -e
55
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -121,13 +121,13 @@ for root in roots:
121121
json.dump(run_obj, f, indent=2)
122122
123123
result = subprocess.run(
124-
["morph", "run", "record", str(run_path), "--trace", str(trace_path)],
124+
["morph", "session", "import", str(run_path), "--trace", str(trace_path)],
125125
cwd=repo,
126126
capture_output=True,
127127
text=True,
128128
)
129129
if result.returncode != 0:
130-
sys.stderr.write(f"morph run record failed: {result.stderr}\n")
130+
sys.stderr.write(f"morph session import failed: {result.stderr}\n")
131131
continue
132132
run_hash = result.stdout.strip()
133133
log_morph_record(morph_dir, conversation_id, run_hash)

‎.cursor/rules/eval-driven-development.mdc‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ Sanity-check the suite:
5050
morph eval show
5151
```
5252

53-
> The older spellings `morph eval add-case` and `morph eval suite-show` keep
54-
> working through v0.47 with a stderr deprecation notice.
53+
> The older spellings `morph eval add-case` and `morph eval suite-show` were
54+
> removed in v0.48; only the flat `morph eval add` / `morph eval show` /
55+
> `morph eval rebuild` work now.
5556

5657
### 3. Watch the case fail
5758

‎CHANGELOG.md‎

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,85 @@ metrics — see `.cursor/rules/behavioral-commits.mdc`.
1616

1717
## [Unreleased]
1818

19+
## [0.48.0] — 2026-05-02
20+
21+
Vocabulary unification, part 3 (final): remove the v0.46-deprecated
22+
`morph run` namespace and the nested `morph eval add-case` /
23+
`morph eval suite-show` / `morph eval suite-from-specs` aliases. Adds
24+
`morph session import` as the v0.48 spelling for the JSON-ingest path
25+
that used to be `morph run record <file>`. Sixth and final release of
26+
the multi-phase "make morph intuitive" effort. The on-disk object
27+
format is unchanged; existing `.morph/` directories keep deserializing
28+
without migration.
29+
30+
### Added
31+
32+
- **`morph session import <run.json> [--trace <file>] [--artifact <file>...]`** —
33+
ingest a pre-built Run JSON (and optional Trace JSON / artifact list)
34+
into the store. Used by automation that builds Run objects out of
35+
band — CI pipelines, MCP bridges, the `morph_run_record` MCP tool,
36+
and the `claude-code` / `cursor` hook scripts. Replaces the
37+
v0.46-removed `morph run record <file>`. The `morph_run_record` MCP
38+
tool itself is unchanged.
39+
- **`removed_session_eval_aliases.yaml`** spec proves every removed
40+
spelling now exits with `unrecognized subcommand` and that
41+
`morph session import --help` is reachable.
42+
43+
### Removed
44+
45+
- **`morph run` namespace, in full.** `morph run list`, `morph run show`,
46+
`morph run record-session`, and `morph run record` are gone. Use
47+
`morph session list`, `morph session show`, `morph session record`,
48+
and `morph session import` respectively. The v0.46 deprecation notice
49+
warned every invocation through v0.47.
50+
- **`morph eval add-case`**, **`morph eval suite-show`**, and
51+
**`morph eval suite-from-specs`** subcommands. Use the flat
52+
`morph eval add` / `morph eval show` / `morph eval rebuild`
53+
spellings introduced in v0.46.
54+
- **`inspect::deprecation_notice` helper** in `morph-cli/src/inspect.rs`.
55+
Nothing dispatches to it anymore now that the v0.46 aliases are gone.
56+
- **`RunCmd` enum** in `morph-cli/src/cli.rs` and its `Command::Run`
57+
dispatch arm in `morph-cli/src/main.rs`. Removed alongside the
58+
deprecated `EvalCmd::AddCase` / `SuiteShow` / `SuiteFromSpecs`
59+
variants.
60+
61+
### Changed
62+
63+
- **Cucumber step definitions** that internally invoked
64+
`morph run record-session` now invoke `morph session record`
65+
(`morph-e2e/tests/cucumber.rs`). The user-facing Gherkin step name
66+
("When I run record-session with prompt …") is unchanged.
67+
- **`morph setup aoe`** writes `morph session record` into the
68+
`on_launch` and `on_destroy` hooks of `.agent-of-empires/config.toml`
69+
instead of `morph run record-session`. The legacy spelling stays in
70+
the cleanup-prefix list so re-running `morph setup aoe` against an
71+
older config scrubs the old lines before emitting the new block.
72+
- **Hook scripts** (`claude-code/hooks/morph-record-stop.sh`,
73+
`cursor/morph-record-stop.sh`,
74+
`cursor/morph-record-response.sh`,
75+
`.cursor/morph-record-stop.sh`,
76+
`.cursor/morph-record-response.sh`,
77+
and the deployable copies under `morph-cli/assets/`) call
78+
`morph session import` instead of `morph run record`.
79+
- **Doc + site sweep**: every `morph run record` /
80+
`morph run record-session` / `morph eval add-case` /
81+
`morph eval suite-show` / `morph eval suite-from-specs` mention in
82+
`README.md`, `docs/v0-spec.md`, `docs/EVAL-DRIVEN.md`,
83+
`docs/CURSOR-SETUP.md`, `docs/OPENCODE-SETUP.md`,
84+
`docs/CLAUDE-CODE-SETUP.md`, `docs/MULTI-MACHINE.md`,
85+
`docs/README.md`, and the `.cursor/rules/eval-driven-development.mdc`
86+
/ `morph-cli/assets/cursor/rules/eval-driven-development.mdc` rule
87+
files now refers to the v0.46/v0.48 replacement, with a
88+
parenthetical noting the prior spelling and the version that
89+
removed it.
90+
91+
### Tests
92+
93+
- All 426 spec tests pass; cucumber 34/37 (3 skipped).
94+
- `cargo build --workspace`, `cargo clippy --workspace --all-targets
95+
--all-features -- -D warnings`, and `cargo fmt --all -- --check`
96+
are clean.
97+
1998
## [0.47.0] — 2026-05-02
2099

21100
Vocabulary unification, part 2: remove the v0.45-deprecated
@@ -1415,7 +1494,8 @@ Three coordinated changes to repo setup, adoption, and migration.
14151494
- 15 new YAML acceptance spec cases in the default eval suite:
14161495
`init_at_latest:*` ×4, `init_in_git_dir:*` ×6, `upgrade:*` ×5.
14171496

1418-
[Unreleased]: https://github.com/r/morph/compare/v0.47.0...HEAD
1497+
[Unreleased]: https://github.com/r/morph/compare/v0.48.0...HEAD
1498+
[0.48.0]: https://github.com/r/morph/compare/v0.47.0...v0.48.0
14191499
[0.47.0]: https://github.com/r/morph/compare/v0.46.0...v0.47.0
14201500
[0.46.0]: https://github.com/r/morph/compare/v0.45.0...v0.46.0
14211501
[0.45.0]: https://github.com/r/morph/compare/v0.44.0...v0.45.0

‎Cargo.lock‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ resolver = "2"
33
members = ["morph-core", "morph-cli", "morph-mcp", "morph-serve", "morph-e2e"]
44

55
[workspace.package]
6-
version = "0.47.0"
6+
version = "0.48.0"

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,10 @@ The IDE hooks parse the agent's full transcript (tool calls, file reads/edits, s
191191
- `morph inspect summary` — repo-level overview of recorded runs.
192192
- `morph inspect show <run-hash>` — grouped steps for one run (or pass a trace hash for raw events).
193193
- `morph inspect recent` / `morph inspect task <ref>` / `morph inspect artifact <ref>` — structured task views for replay or eval generation.
194-
- `morph session record --prompt "..." --response "..."` — record a session manually (v0.46+; was `morph run record-session`).
194+
- `morph session record --prompt "..." --response "..."` — record a session manually (v0.46+; replaces the now-removed `morph run record-session`).
195+
- `morph session import <run.json> --trace <trace.json>` — ingest a pre-built Run JSON (v0.48+; replaces the now-removed `morph run record <file>`).
195196

196-
The older `morph trace` / `morph tap` / `morph traces` spellings were removed in v0.47 — only `morph inspect` works now. The v0.46-deprecated `morph run` / `morph eval add-case` / `morph eval suite-show` / `morph eval suite-from-specs` still work through v0.47 with a deprecation notice and are removed in v0.48; new code should use `morph session` and the flat `morph eval add` / `show` / `rebuild`.
197+
The older `morph trace` / `morph tap` / `morph traces` spellings were removed in v0.47 — only `morph inspect` works now. The v0.46-deprecated `morph run` namespace and the nested `morph eval add-case` / `morph eval suite-show` / `morph eval suite-from-specs` were removed in v0.48 — use `morph session` (with `import` for the JSON-ingest path) and the flat `morph eval add` / `show` / `rebuild` instead.
197198

198199
See [docs/SESSION-TRACKING.md](docs/SESSION-TRACKING.md).
199200

‎claude-code/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Hook scripts for recording Morph sessions from Claude Code lifecycle events.
99
| File | Event | Purpose |
1010
|------|--------|---------|
1111
| `hooks/morph-record-prompt.sh` | `UserPromptSubmit` | Appends prompt to `.morph/hooks/pending-<session_id>.jsonl` |
12-
| `hooks/morph-record-stop.sh` | `Stop` | Parses structured data from the payload (transcript_path or conversation array), builds Run + Trace, runs `morph run record` |
12+
| `hooks/morph-record-stop.sh` | `Stop` | Parses structured data from the payload (transcript_path or conversation array), builds Run + Trace, runs `morph session import` |
1313

1414
## What the hooks record
1515

‎claude-code/hooks/morph-record-stop.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# Claude Code hook: Stop. If .morph/hooks/pending-<session_id>.jsonl exists, build Trace+Run with
3-
# last_assistant_message and run `morph run record`.
3+
# last_assistant_message and run `morph session import`.
44
# Checks for `transcript_path` or `conversation` in payload for structured events.
55
# Logs: .morph/hooks/logs/claude-invoke.log, .morph/hooks/logs/morph-record.log, .morph/hooks/debug/last-Stop.json
66
set -e
@@ -296,13 +296,13 @@ with open(run_path, "w") as f:
296296
json.dump(run_obj, f, indent=2)
297297
298298
result = subprocess.run(
299-
["morph", "run", "record", str(run_path), "--trace", str(trace_path)],
299+
["morph", "session", "import", str(run_path), "--trace", str(trace_path)],
300300
cwd=repo,
301301
capture_output=True,
302302
text=True,
303303
)
304304
if result.returncode != 0:
305-
sys.stderr.write(f"morph run record failed: {result.stderr}\n")
305+
sys.stderr.write(f"morph session import failed: {result.stderr}\n")
306306
sys.exit(1)
307307
run_hash = result.stdout.strip()
308308
log_morph_record(morph_dir, session_id, run_hash)

‎cursor/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Hook scripts for recording Morph sessions from Cursor lifecycle events. **Canoni
99
| File | Referenced by | Purpose |
1010
|------|--------------|---------|
1111
| `morph-record-prompt.sh` | `.cursor/hooks.json` (`beforeSubmitPrompt`) | Saves prompt + composer mode to `.morph/hooks/pending-<conversation_id>.jsonl` |
12-
| `morph-record-response.sh` | `.cursor/hooks.json` (`afterAgentResponse`) | Parses the agent transcript for structured events (tool calls, file reads/edits, shell commands), builds Run + Trace, calls `morph run record` |
12+
| `morph-record-response.sh` | `.cursor/hooks.json` (`afterAgentResponse`) | Parses the agent transcript for structured events (tool calls, file reads/edits, shell commands), builds Run + Trace, calls `morph session import` |
1313
| `morph-record-stop.sh` | `.cursor/hooks.json` (`stop`) | Fallback: same structured parsing as response hook; fires if `afterAgentResponse` didn't |
1414

1515
The copies in this `cursor/` directory mirror `morph-cli/assets/cursor/hooks/` and are kept for reference when developing Morph.

0 commit comments

Comments
 (0)