Files
PMOCrazycoder/Notes/jj_to_json.md
Eric Coissac bc66c794a5 Enhance sandbox functionality and MCP tools
This commit enhances the sandbox functionality by:
- Adding a new jj_log tool to retrieve commit history
- Refactoring sandbox tools into dedicated modules
- Improving project management with session-based active projects
- Updating Docker configuration to properly mount the sandbox volume
- Adding proper error handling and documentation for all tools
- Updating dependencies and configuration files
2026-01-27 13:52:00 +01:00

1.2 KiB

jj log | orla agent -m  ollama:qwen3:0.6b   \
  "
Transform the following `jj log` output into JSON according to the given schema.

**Return only valid JSON, without any Markdown formatting :**
    - no backticks, 
    - no code blocks, 
    - no extra text

Schema:
{
  \"type\": \"array\",
  \"items\": {
    \"type\": \"object\",
    \"properties\": {
      \"hash\": {\"type\": \"string\"},
      \"author\": {\"type\": \"string\"},
      \"date\": {\"type\": \"string\"},
      \"message\": {\"type\": \"string\"}
    },
    \"required\": [\"hash\", \"author\", \"date\", \"message\"]
  }
}
" | grep -v '```' | jq .
[
  {
    "hash": "252b5de3",
    "author": "nrrwwpms",
    "date": "2026-01-25 17:36:18",
    "message": "(no description set)"
  },
  {
    "hash": "9f9d9bc3",
    "author": "stxkzlul",
    "date": "2026-01-25 12:08:12",
    "message": "Ajout de Dockerfile et configuration MCP"
  },
  {
    "hash": "7412b51a",
    "author": "xnrxukn",
    "date": "2026-01-25 07:53:42",
    "message": "Initial commit"
  }
]

Ok, on va essayer de développer un outil un peu plus avancé. Dans le fichier @src/sandbox/init.py Nous allons créer une fonction jj_log. Cette fonction prendra en paramètres:

  • un projet