livepilot 1.9.4 → 1.9.5

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.
@@ -10,7 +10,7 @@
10
10
  {
11
11
  "name": "livepilot",
12
12
  "description": "Agentic production system for Ableton Live 12 — 178 tools, 17 domains, device atlas, spectral perception, technique memory, neo-Riemannian harmony, Euclidean rhythm, species counterpoint, MIDI I/O",
13
- "version": "1.9.4",
13
+ "version": "1.9.5",
14
14
  "author": {
15
15
  "name": "Pilot Studio"
16
16
  },
package/AGENTS.md CHANGED
@@ -1,4 +1,4 @@
1
- # LivePilot v1.9.4 — Ableton Live 12
1
+ # LivePilot v1.9.5 — Ableton Live 12
2
2
 
3
3
  ## Project
4
4
  - **Repo:** This directory (LivePilot)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.5 — TCP Retry Fix + Arrangement Automation Fix (March 2026)
4
+
5
+ - Fix(P1): disconnect() now clears _recv_buf — prevents partial JSON corruption on TCP retry
6
+ - Fix(P1): set_arrangement_automation fallback copies notes + deletes original clip to avoid silent duplication
7
+ - Fix(P2): get_arrangement_clips reports effective length based on loop_end, not raw timeline length
8
+ - 2 new connection tests for recv_buf corruption
9
+ - 257 tests passing
10
+
3
11
  ## 1.9.4 — Doc Sync + M4L Analyzer Fix + Full Validation (March 2026)
4
12
 
5
13
  **178 tools, all validated live in Ableton. M4L analyzer fully working.**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "livepilot",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "Agentic production system for Ableton Live 12 — 178 tools, 17 domains, device atlas, spectral perception, technique memory, neo-Riemannian harmony, Euclidean rhythm, species counterpoint, MIDI I/O",
5
5
  "author": {
6
6
  "name": "Pilot Studio"
@@ -1,4 +1,4 @@
1
- # LivePilot v1.9.4 — Architecture & Tool Reference
1
+ # LivePilot v1.9.5 — Architecture & Tool Reference
2
2
 
3
3
  Agentic production system for Ableton Live 12. 178 tools across 17 domains. Device atlas (280+ devices), spectral perception (M4L analyzer), technique memory, automation intelligence (16 curve types, 15 recipes), music theory (Krumhansl-Schmuckler, species counterpoint), generative algorithms (Euclidean rhythm, tintinnabuli, phase shift, additive process), neo-Riemannian harmony (PRL transforms, Tonnetz), MIDI file I/O.
4
4
 
@@ -83,7 +83,7 @@ function anything() {
83
83
  function dispatch(cmd, args) {
84
84
  switch(cmd) {
85
85
  case "ping":
86
- send_response({"ok": true, "version": "1.9.4"});
86
+ send_response({"ok": true, "version": "1.9.5"});
87
87
  break;
88
88
  case "get_params":
89
89
  cmd_get_params(args);
@@ -1,2 +1,2 @@
1
1
  """LivePilot MCP Server — bridges MCP protocol to Ableton Live."""
2
- __version__ = "1.9.4"
2
+ __version__ = "1.9.5"
@@ -84,13 +84,14 @@ class AbletonConnection:
84
84
  ) from exc
85
85
 
86
86
  def disconnect(self) -> None:
87
- """Close the TCP connection."""
87
+ """Close the TCP connection and discard any partial receive buffer."""
88
88
  if self._socket is not None:
89
89
  try:
90
90
  self._socket.close()
91
91
  except OSError:
92
92
  pass
93
93
  self._socket = None
94
+ self._recv_buf = b""
94
95
 
95
96
  def is_connected(self) -> bool:
96
97
  """Return True if a socket is currently held."""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "livepilot",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "mcpName": "io.github.dreamrec/livepilot",
5
5
  "description": "Agentic production system for Ableton Live 12 — 178 tools, 17 domains, device atlas, spectral perception, technique memory, neo-Riemannian harmony, Euclidean rhythm, species counterpoint, MIDI I/O",
6
6
  "author": "Pilot Studio",
@@ -5,7 +5,7 @@ Entry point for the ControlSurface. Ableton calls create_instance(c_instance)
5
5
  when this script is selected in Preferences > Link, Tempo & MIDI.
6
6
  """
7
7
 
8
- __version__ = "1.9.4"
8
+ __version__ = "1.9.5"
9
9
 
10
10
  from _Framework.ControlSurface import ControlSurface
11
11
  from .server import LivePilotServer
@@ -13,12 +13,22 @@ def get_arrangement_clips(song, params):
13
13
  track = get_track(song, track_index)
14
14
  clips = []
15
15
  for i, clip in enumerate(track.arrangement_clips):
16
+ timeline_length = clip.length
17
+ # Report effective length based on loop_end if looping is active
18
+ # (arrangement clips may have been trimmed by create_arrangement_clip)
19
+ effective_length = timeline_length
20
+ try:
21
+ if clip.looping and clip.loop_end < timeline_length:
22
+ effective_length = clip.loop_end
23
+ except (AttributeError, RuntimeError):
24
+ pass
16
25
  clips.append({
17
26
  "index": i,
18
27
  "name": clip.name,
19
28
  "start_time": clip.start_time,
20
- "end_time": clip.start_time + clip.length,
21
- "length": clip.length,
29
+ "end_time": clip.start_time + effective_length,
30
+ "length": effective_length,
31
+ "timeline_length": timeline_length,
22
32
  "color_index": clip.color_index,
23
33
  "is_audio_clip": clip.is_audio_clip,
24
34
  })
@@ -557,7 +567,36 @@ def set_arrangement_automation(song, params):
557
567
  temp_envelope.insert_step(time, duration, value)
558
568
  points_written += 1
559
569
 
560
- # Duplicate session clip to arrangement at the same position
570
+ # Copy notes from original arrangement clip to the temp session clip
571
+ # so the replacement clip has the same musical content.
572
+ try:
573
+ orig_notes = clip.get_notes_extended(0, 128, 0.0, arr_length + 1.0)
574
+ import Live
575
+ note_specs = []
576
+ for note in orig_notes:
577
+ spec = Live.Clip.MidiNoteSpecification(
578
+ pitch=note.pitch,
579
+ start_time=note.start_time,
580
+ duration=note.duration,
581
+ velocity=note.velocity,
582
+ mute=note.mute,
583
+ )
584
+ note_specs.append(spec)
585
+ if note_specs:
586
+ temp_clip.add_new_notes(tuple(note_specs))
587
+ except Exception:
588
+ pass # Non-MIDI clips or errors — automation-only is still valid
589
+
590
+ # Delete the original arrangement clip BEFORE placing the replacement
591
+ # to avoid creating a second overlapping clip at the same position.
592
+ try:
593
+ clip.delete_clip()
594
+ except (AttributeError, RuntimeError):
595
+ # delete_clip may not exist on arrangement clips in all versions;
596
+ # in that case we accept the overlap as a known limitation.
597
+ pass
598
+
599
+ # Place the session clip (with automation + notes) into arrangement
561
600
  track.duplicate_clip_to_arrangement(temp_clip, arr_start)
562
601
 
563
602
  # Clean up the temporary session clip