Skip to content

Commit 1f17185

Browse files
JSON (#11)
* first fully working implementation of stump primitives * remove sync-equivalent primitive * update version number and documentation for main-branch merge * partial work * add "print" primitive * feat: add JSON interface route and update HTML templates * feat: update evaluate_json to use JSON request and response with Rocket Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * fix: remove stray 'f' character in main.rs Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * refactor: modify JSON endpoint to accept and return arbitrary JSON structures Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * feat: add evaluate_json method to Evaluator * prep for implementation of json/scheme conversions * feat: implement bidirectional JSON and Scheme conversion functions Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * feat: add comprehensive JSON evaluation tests for journal_sdk Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * refactor: Update JSON tests to use direct evaluator module conversion functions Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * refactor: Reorder imports and clean up whitespace in JSON conversion tests * feat: fix JSON conversion for Scheme with improved type handling Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * fix: update json tests to use quoted lists for correct parsing Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * feat: convert JSON strings to Scheme symbols by default Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * fix: update test expectation for JSON string to symbol conversion Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * refactor: simplify list conversion between JSON and Scheme * test: fix JSON conversion for Scheme lists and symbols Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * refactor: Add robust error handling for JSON/Scheme conversion functions Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * refactor: Update scheme2json to handle unknown types as errors Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * test: update tests to handle Result types from json2scheme and scheme2json Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * fix: correct error type in Scheme output parsing error message * test: ensure JSON error conversion matches Scheme error expressions Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * fix: handle JSON evaluation errors with structured error responses Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * refactor: remove unnecessary print statements in evaluator * refactor: modify JSON-Scheme conversion to use list format for association lists Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * test: update JSON conversion to handle pairs as special type Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * test: add comprehensive tests for pair type conversion Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * refactor: remove quote special type handling in scheme-json conversion Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * refactor: remove debug print statements in JSON conversion function * refactor: modify scheme2json to parse without evaluation and handle quotes Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * feat: add support for quote forms in JSON conversion Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * fix: improve quote handling and error reporting in JSON conversion Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * fix: pass scheme context to s7_is_macro function call Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * fix: handle quote conversion in JSON serialization Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * prepare for testing * test: fix JSON conversion tests for Scheme types Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat> * update to edition2024 * update bindgen * fix unsafe warnings * try updating alpine * try again * try updating rocksdb * allow build again --------- Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>
1 parent 490fa4e commit 1f17185

File tree

11 files changed

+1677
-809
lines changed

11 files changed

+1677
-809
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
target
22
Cargo.lock
3-
db/
3+
db/
4+
.aider*

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
The purpose of this changelog is to document new features and breaking changes that are most likely to affect developers
33
------------------------------------------------------------------------------------------------------------------------
44

5+
--- v1.0.5 (2025.02.26) ---
6+
7+
- Add JSON <-> Scheme interface
8+
- Separate crypto primitives into separate namespace
9+
- Add unix time primitive
10+
511
--- v1.0.4 (2025.09.14) ---
612

713
- Modify core merkle tree structure to support "stumps" and branch digest propogation

Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "journal-sdk"
3-
version = "1.0.4"
4-
edition = "2021"
3+
version = "1.0.5"
4+
edition = "2024"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

@@ -13,7 +13,7 @@ version = "0.5.0"
1313
features = ["json"]
1414

1515
[build-dependencies]
16-
bindgen = "0.69.2"
16+
bindgen = "0.72.1"
1717
cc = "1.0.83"
1818

1919
[dependencies]
@@ -23,11 +23,12 @@ mockito = "1.4.0"
2323
once_cell = "1.19.0"
2424
rand = "0.8.5"
2525
reqwest = { version= "0.11.24", features = ["blocking"] }
26-
rocksdb = "0.21.0"
26+
rocksdb = "0.24.0"
2727
sha2 = "0.10.8"
2828
libc = "0.2"
2929
log = "0.4.21"
3030
env_logger = "0.10"
3131
crystals-dilithium = "1.0.0"
3232
pqcrypto = "0.17.0"
33-
tokio = { version = "1.0", features = ["time", "rt", "rt-multi-thread", "macros"] }
33+
tokio = { version = "1.0", features = ["time", "rt", "rt-multi-thread", "macros"] }
34+
serde_json = "1.0.149"

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# --- Build ---
22

3-
FROM alpine:3.21.3 AS builder
3+
FROM alpine:3.23.3 AS builder
44

55
ARG RUST_LOG=info
66

@@ -24,7 +24,7 @@ RUN cargo build --release
2424

2525
# --- Deploy ---
2626

27-
FROM alpine:3.21.3
27+
FROM alpine:3.23.3
2828

2929
WORKDIR /srv
3030
COPY --from=builder /usr/lib/libgcc_s.so.1 /usr/lib/

0 commit comments

Comments
 (0)