Skip to content

Preserve whitespace#11

Open
russellpierce wants to merge 23 commits intomutable-state-inc:mainfrom
russellpierce:preserve-whitespace
Open

Preserve whitespace#11
russellpierce wants to merge 23 commits intomutable-state-inc:mainfrom
russellpierce:preserve-whitespace

Conversation

@russellpierce
Copy link
Contributor

This PR stacks on #8 and #10 and is an important fix for #8 in so far as whitespace is important in memory retrieval. The problem: the initial CLI used rich formatting of results as a default. This introduced newlines in JSON payloads that can interfere with a memory key being piped and directly used as a python program. This PR makes --rich formatting opt-in rather than the default so that whitespace is easily preserved / we don't introduce unexpected newlines.

E.g. I have instructions to

# Generic pattern:
CLI="path/to/ensue-cli.py"

$CLI get_memory --key-names '["code/some/script-key"]' | \
  python3 -c "import sys, json; print(json.loads(sys.stdin.read())['results'][0]['value'])" > /tmp/script.ext && \
  <runtime> /tmp/script.ext [ARGS]

russellpierce and others added 23 commits January 8, 2026 08:42
Remove the copied ensue-api.sh from skills/ensue-memory/scripts/
after zipping, keeping the working directory clean while still
including the script in the distributed archive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove the copied ensue-api.sh from skills/ensue-memory/scripts/
after zipping, keeping the working directory clean while still
including the script in the distributed archive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant