Repository navigation
tracekit audit: malformed shell commands, one agent name, clearer errors; README version test; release checklist - #754
Merged
Merged
Conversation
…ames Claude Code's reader - agent_hooks.tool joins a Codex argv only when each item is a string, and maps Kilo's generate_image with an image and no path; audit --agent codex and --agent kilo crashed on such lines (TypeError, KeyError). - audit counts a mapped Bash call whose command is neither text nor absent as malformed. - audit --agent takes claude, as init and uninstall do; claude-code still works. - --calls on a directory, pipe, symlink or other non-regular file says which; --agent with no reader asks for --calls FILE only. - tests/test_version.py ties the README's version line and CI example to __version__. - docs/RELEASING.md: the README's version lines and the Hermes plugin's tracekit-ai upper bound.
…t the whole list (Cline joined it on main) Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
…udit holds it from every source - v1 hook (agent_hooks.run): a mapped Bash call whose command isn't text (an argv with an item that isn't a string) is denied before the pipeline, naming the value; the v1 policy matched its repr, so a force push came back allow. The v2 signer already holds it (TK-SHELL-PARSE); both paths are tested through the hook. - audit: no malformed skip for such a line under --agent; every source decides it as the signer does (held, TK-SHELL-PARSE), and docs/audit.md says so. - audit(): takes claude-code as claude itself, not only on the command line. - audit: a symlink to a directory is named a symlink, not a directory. - Hermes plugin: tracekit-ai bound raised to <1.8; tests/test_version.py checks it admits __version__. - docs/limits.md: audit's memory per call matches the code's lean note (about 1 KB, 2 KB with --json). Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
9 of 10 tasks
…k blocks it (TK-HOOK-BLOCKED), not the end of the replay Signed-off-by: LoopGlitch26 <53336715+LoopGlitch26@users.noreply.github.com>
9 of 10 tasks
samueladebisi-dev
added a commit
to samueladebisi-dev/Tracekit
that referenced
this pull request
Nov 12, 2026
Takes Cygnux-Labs#754's agent name (claude, with claude-code still accepted) and its no-reader message; the Gemini CLI reader is keyed gemini, as init names it. Signed-off-by: samueladebisi-dev <218522909+samueladebisi-dev@users.noreply.github.com>
10 tasks done
samueladebisi-dev
added a commit
to samueladebisi-dev/Tracekit
that referenced
this pull request
Nov 12, 2026
A project folder named chats is read as a project, not as a subagent's session. Tests: a $set line holding the whole history, a project named chats, GEMINI_CLI_HOME cleared for every test (SHELL_ENV), and Cygnux-Labs#754's no-reader test on opencode. Docs: the --agent bullet, the macOS Seatbelt sandbox's folder and the 30-day retention (with a limits row), and Gemini CLI in the field-report and support pages. Signed-off-by: samueladebisi-dev <218522909+samueladebisi-dev@users.noreply.github.com>
This was referenced Nov 12, 2026
LoopGlitch26
pushed a commit
that referenced
this pull request
Nov 13, 2026
* tracekit audit: read Gemini CLI's chat files (#715) A reader for Gemini CLI's sessions under $GEMINI_CLI_HOME/.gemini/tmp (else ~/.gemini/tmp): each project's chats/session-*.jsonl, the one-object session-*.json written before 0.39, and a subagent's chats/<parent session id>/<id>.jsonl, counted under its parent's session. A message written again on each update counts its calls once, by id, as the last copy has them; a call stays counted after a $rewindTo. The calls of a reader whose agent has a Tracekit hook are decided as that hook decides them, so run_shell_command is decided as Bash. Signed-off-by: samueladebisi-dev <218522909+samueladebisi-dev@users.noreply.github.com> * tracekit audit: Gemini CLI review fixes (#764) A project folder named chats is read as a project, not as a subagent's session. Tests: a $set line holding the whole history, a project named chats, GEMINI_CLI_HOME cleared for every test (SHELL_ENV), and #754's no-reader test on opencode. Docs: the --agent bullet, the macOS Seatbelt sandbox's folder and the 30-day retention (with a limits row), and Gemini CLI in the field-report and support pages. Signed-off-by: samueladebisi-dev <218522909+samueladebisi-dev@users.noreply.github.com> * audit: Gemini CLI reader review fixes: duplicate Cline code, subagent .json, depth-based session files, malformed shapes, tests, docs Signed-off-by: samueladebisi-dev <218522909+samueladebisi-dev@users.noreply.github.com> * audit: Gemini CLI reader takes its tmp, a project's or its chats folder as ROOT, and refuses any other Signed-off-by: samueladebisi-dev <218522909+samueladebisi-dev@users.noreply.github.com> --------- Signed-off-by: samueladebisi-dev <218522909+samueladebisi-dev@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The should-fix items from the 1.7.0 pre-release review of
tracekit audit, the README version lines and the release checklist. No version moves here; the release PR does that.What changed and why
tracekit audit --calls F --agent codexcrashed (traceback, exit 1) on a line such as{"tool":"shell","args":{"command":["ls",1]}}:agent_hooks.tooljoined Codex's argv without checking each item is a string.agent_hooks.toolnow joins an argv only when every item is a string, and leaves anything else as sent.auditcounts a mappedBashcall whose command is neither text nor absent as malformed (no agent's shell tool sends one; Codex sends an argv of strings). Noexceptwas widened.generate_imagewith animageand nopathraisedKeyError([ti["path"]] * Falsestill readsti["path"]). It is now decided as the Read of the image._blocked, 69,281 distinct mapped calls through the decision and the--showtext, and 179 odd reader fields (time, session, tool, args) throughaudit()and its three printers, for each agent.audit --agenttookclaude-codewhereinit,uninstalland the plugin skill takeclaude. The reader is nowclaude(in--help, theread:line,--jsonand docs/audit.md);--agent claude-codestill works and reads the same.--calls .,--calls /dev/nulland the like no longer say to send a pipe to--calls -. Audit says what the path is: a directory, a pipe (only then the--calls -hint), a symlink (audit follows none), or not a regular file.--agent codexwith no ROOT asked for "a ROOT or --calls FILE", but a ROOT then failed. An agent with no reader now gets one message, with or without ROOT:no reader for codex's sessions yet; turn them into a calls file and use --calls FILE --agent codex.--agent claudestill asks for a ROOT or--calls FILE.tests/test_version.pychecks that the README's licence line ("Version X.Y.Z") and its CI example (uses: Cygnux-Labs/Tracekit@vX.Y.Z) both nametracekit.__version__. It passes today, and it fails when the version moves without the README.uses: …@v<version>line, and the upper bound oftracekit-aiinintegrations/hermes/plugin.yaml.Tests
tests/test_audit.py: a Codex argv with an int, a null, a nested list or a huge int is malformed, and a good argv beside them is decided. A number or an object as the command is malformed for Gemini CLI, OpenCode and goose. Kilo'sgenerate_imagewithout a path is decided as a Read.--agent claudeand--agent claude-coderead the same, and--helplistsclaudeonly. The calls-path messages cover a directory,/dev/null, a FIFO and a dangling symlink. Both no-reader cases, with and without ROOT, are covered.tests/test_agent_hooks.py: the Codex join and Kilo'sgenerate_imagemapping, directly.tests/test_version.py: the README version lines.Gates in the worktree (
PATH=<repo>/.venv/bin:$PATH PYTHONPATH=$PWD make test-ts lint build test PY=<repo>/.venv/bin/python):ℹ tests 162,ℹ pass 152,ℹ fail 0,ℹ skipped 10twine checkPASSED for the wheel and the sdist1 failed, 4963 passed, 394 skipped, 10 xfailed, 18 warnings, 64157 subtests passed in 1736.12s (0:28:56). The one failure istests/test_policy2.py::Speed::test_every_pack_pattern_searches_64_kib_within_budget(TK-A054's pattern took 174 ms). It is a timing budget on the policy packs, which this PR doesn't touch, and it passed when run alone. The full run took 29 minutes against the usual 15, so the machine was loaded.tests/test_docs.py,tests/test_audit.py,tests/test_version.pyandtests/test_readme.py: 55 passed.