feat: add C, C++, Rust, Java, and Kotlin probe templates#18
Closed
Toubat wants to merge 6 commits into
Closed
Conversation
Add the Rust (file ingest) probe template: an owned AgentValue enum with From impls and an adbg! json-style macro, hand-rolled key normalization matching the shared redaction contract (Rust std has no regex), a backslash-free JSON serializer, verbatim redaction policy, 65536-byte cap, depth-64 cap, epoch-ms timestamp, 0600 append via OpenOptions, and total failure suppression. Registered as "rust" (alias "rs"), file ingest only. Cycles are unrepresentable in an owned value tree, so the live cycle fixture exercises the depth cap instead. Docs matrices and contract/e2e suites extended; live e2e compiles single-file rustc with no cargo/serde. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add the C++ (file ingest) probe template: an owned AgentValue struct with implicit ctors from bool/long long/double/const char*/std::string plus an nlohmann-style initializer_list constructor for nested object/array literals, hand-rolled key normalization matching the shared redaction contract (no regex, ported 1:1 from the verified Rust normalizer), a backslash-free JSON serializer via ostringstream, verbatim redaction policy, 65536-byte cap, depth-64 cap, chrono epoch-ms timestamp, ofstream append with 0600 on POSIX, and total failure suppression (try/catch(...)). Registered as "cpp" (aliases "c++", "cxx"), file ingest only. Cycles are unrepresentable in an owned value tree, so the live cycle fixture exercises the depth cap instead. Docs matrices and contract/e2e suites extended; live e2e compiles single-file clang++ (g++ fallback), -std=c++17. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a Java (file-ingest) probe template cloning the csharp.ts approach: real java.util.regex key normalization, Map/List/array/scalar handling with a java.lang.reflect fallback over public getters and fields, IdentityHashMap-based cycle detection with a depth-64 cap, fully-qualified names (no imports) so the helper is injectable anywhere, and single-file `java <File>.java` execution. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add the Kotlin (file ingest) probe template, closing the five-language systems batch (C, C++, Rust, Java, Kotlin). Kotlin clones the Java JVM approach: java.lang.reflect over public getters then fields (not kotlin-reflect), IdentityHashMap cycle detection, depth cap 64, real java.util.regex secret-key normalization, Files.write(CREATE, APPEND) with 0600-at-create POSIX handling, and an object AgentDebugLog.emit static helper that never alters control flow (catch Throwable). Also updates the changeset (minor bump: nine helper/runtime pairs become fourteen) and every current-facing language matrix and count (README, DESIGN, SKILL, REFERENCE, spec advertised list + region-marker row). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DESIGN.md advertised-list contradiction; C NULL-key guard on malloc failure; Rust allow attributes so user builds stay warning-free; C++ int constructor to remove the LL-suffix footgun. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
Closing. |
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.
Extends the advertised template matrix from nine to fourteen language/ingest pairs: C, C++, Rust, Java, Kotlin (all file ingest).
Design
isSensitiveKeyover 1,503 edge-case and random keys with zero mismatches.java.lang.reflectfallback, IdentityHashMap cycle detection, genuine self-reference cycle fixtures, reflection-path value-type coverage.leaks --atExit; ASAN/UBSan clean).REQUIRE_TEMPLATE_RUNTIMES=1(all five toolchains preinstalled on GitHub runners).Ships as a minor release via the included changeset (nine→fourteen pairs).
🤖 Generated with Claude Code