Foundation - JSON-based IPC #119

Closed
opened 2026-04-03 11:13:58 +02:00 by shoko · 0 comments
Owner

Summary

Replace fragile Python stdout parsing with structured JSON file exchange.

Depends On

  • #116 (Foundation - Modularize Shell Script)

Details

Current code uses fragile patterns like:

python3 -c "import json; print(json.load(open('$f'))['id'])" | grep something

Replace with JSON file read/write:

python3 -c "import json; json.dump({'id': '123'}, open('/tmp/session.json', 'w'))"
session_id=$(jq -r '.id' /tmp/session.json)
  • kugetsu-index.sh handles all index.json operations
  • Session files accessed via helper functions

Backport Compatible

Internal improvement only, same behavior externally.

Acceptance Criteria

  • No fragile stdout parsing remains
  • All IPC uses structured JSON files
  • Existing functionality unchanged
## Summary Replace fragile Python stdout parsing with structured JSON file exchange. ## Depends On - #116 (Foundation - Modularize Shell Script) ## Details Current code uses fragile patterns like: ```bash python3 -c "import json; print(json.load(open('$f'))['id'])" | grep something ``` Replace with JSON file read/write: ```bash python3 -c "import json; json.dump({'id': '123'}, open('/tmp/session.json', 'w'))" session_id=$(jq -r '.id' /tmp/session.json) ``` - `kugetsu-index.sh` handles all index.json operations - Session files accessed via helper functions ## Backport Compatible Internal improvement only, same behavior externally. ## Acceptance Criteria - [ ] No fragile stdout parsing remains - [ ] All IPC uses structured JSON files - [ ] Existing functionality unchanged
shoko added the backportfoundation labels 2026-04-03 11:18:17 +02:00
shoko added this to the v0.2.x milestone 2026-04-03 11:18:17 +02:00
shoko added the ready label 2026-04-07 08:55:28 +02:00
shoko closed this issue 2026-04-08 05:35:11 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#119