Skip to content

Commit 4edca31

Browse files
authored
User/hendler/0.3.4 (#24)
* proper project setup * doc update * README * publish check * client server mcp * shutdown * jacspy integratino * jacs in client and server * changelog * init command * refactor cli * error out if jacs.config.json already exists * easy init * cleanup readme * readme, etc * start building jacs for python for dist * github actions * working on examples * work on middleware * adding client demo * mcp * server sse, server stdio, client sse * decorator only, with strict flag * todo * start to load configs without env vars into agents * refactoring config * moving config and security as part of agent * progress test filesystem interactions * config refactor * cleanup config * simplify config * simplify config * cleanup * simpler document r/w * trying to clean up * clean * fix file paths * fix test * cleanup env vars * other stuff * debug * passing tests * missing keys because of directory created in * del scratch * ed tests pass * cleanup * tests pass * changelog * changelog * upgrade fastmcp * black * fix jacspy * mcp * signing in jacspy * simple payload wrapper * fix python loading python tests pass * http server test * verified client server response * ci * get agent id and version for use in auth * add mcp * change * mcp * middleware works * notes
1 parent 437a7f2 commit 4edca31

File tree

193 files changed

+7374
-2752
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+7374
-2752
lines changed

.github/workflows/python.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: Python (jacspy crate)
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths: # Optional: Trigger only on changes within jacspy/ or relevant files
7+
- 'jacspy/**'
8+
- 'jacs/**' # jacspy depends on jacs
9+
- '.github/workflows/python.yml'
10+
pull_request:
11+
branches: [ "main" ]
12+
paths: # Optional: Trigger only on changes within jacspy/ or relevant files
13+
- 'jacspy/**'
14+
- 'jacs/**' # jacspy depends on jacs
15+
- '.github/workflows/python.yml'
16+
workflow_dispatch: # Allows manual triggering
17+
18+
env:
19+
CARGO_TERM_COLOR: always
20+
21+
jobs:
22+
# Job to run tests on every push/PR
23+
test-jacspy:
24+
name: Test jacspy crate (x86_64)
25+
runs-on: ubuntu-latest # Docker is available on ubuntu-latest runners (x86_64)
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
- name: Build Docker image for testing (x86_64)
35+
working-directory: jacspy # Directory containing DockerfileBuilder
36+
run: docker buildx build --tag "jacs-build-x86_64" -f DockerfileBuilder . --load # --load makes image available
37+
38+
- name: Run jacspy tests in Docker (x86_64)
39+
working-directory: jacspy # To match PWD context if needed by scripts
40+
env:
41+
RUST_BACKTRACE: "1"
42+
run: |
43+
docker run --rm \
44+
-v "$(pwd)/..:/workspace" \
45+
jacs-build-x86_64 \
46+
bash -c "\
47+
cd /workspace/jacspy && \
48+
/opt/python/cp311-cp311/bin/python3.11 -m venv .venv && \
49+
source .venv/bin/activate && \
50+
pip install pytest && \
51+
make test-python"
52+
53+
# Job to build wheels, runs ONLY on push to main
54+
build-jacspy-wheels:
55+
name: Build jacspy wheels on ${{ matrix.os }}
56+
# Condition: Only run on push events to the main branch
57+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
58+
needs: test-jacspy # Optional: Ensure tests pass before building wheels
59+
runs-on: ${{ matrix.os }}
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
os: [ubuntu-latest, macos-14, macos-latest]
64+
65+
steps:
66+
- name: Checkout code
67+
uses: actions/checkout@v4
68+
with:
69+
fetch-depth: 0 # Needed for cibuildwheel versioning
70+
71+
- name: Set up QEMU (Linux only)
72+
if: runner.os == 'Linux'
73+
uses: docker/setup-qemu-action@v3
74+
with:
75+
platforms: all
76+
77+
- name: Set up Python
78+
uses: actions/setup-python@v5
79+
with:
80+
python-version: '3.11'
81+
82+
- name: Install cibuildwheel
83+
run: python -m pip install cibuildwheel
84+
85+
- name: Build wheels
86+
# Run cibuildwheel from the root, but it should detect ./JACS/jacspy/pyproject.toml
87+
# Or use working-directory: JACS/jacspy
88+
run: cibuildwheel --output-dir wheelhouse jacspy
89+
env:
90+
# === cibuildwheel configuration ===
91+
# Build architectures
92+
CIBW_ARCHS_LINUX: "x86_64 aarch64"
93+
CIBW_ARCHS_MACOS: "x86_64 aarch64" # Build both Intel and ARM on macOS runners
94+
# Skip PyPy builds
95+
CIBW_SKIP: "pp*"
96+
# Python versions to build for (align with pyproject.toml requires-python)
97+
CIBW_BUILD: "cp311-* cp312-* cp313-*" # Example: Build for 3.11, 3.12, 3.13
98+
# Linux specific dependencies (if needed inside manylinux container)
99+
# CIBW_BUILD_DEPENDS_LINUX: "openssl-devel"
100+
101+
- name: Upload artifacts
102+
uses: actions/upload-artifact@v4
103+
with:
104+
name: wheels-jacspy-${{ matrix.os }}
105+
# Path is relative to GITHUB_WORKSPACE (repo root)
106+
path: ./wheelhouse/*.whl

.github/workflows/rust.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
1-
name: Rust
1+
name: Rust (jacs crate)
22

33
on:
44
push:
55
branches: [ "main" ]
6+
paths: # Optional: Trigger only on changes within jacs/ or relevant files
7+
- 'JACS/jacs/**'
8+
- '.github/workflows/rust.yml'
69
pull_request:
710
branches: [ "main" ]
11+
paths: # Optional: Trigger only on changes within jacs/ or relevant files
12+
- 'JACS/jacs/**'
13+
- '.github/workflows/rust.yml'
814

915
env:
1016
CARGO_TERM_COLOR: always
1117

1218
jobs:
13-
build:
14-
19+
test-jacs: # Renamed job for clarity
20+
name: Test jacs crate
1521
runs-on: ubuntu-latest
1622

1723
steps:
18-
- uses: actions/checkout@v3
19-
- name: Build
20-
run: cargo build --verbose
21-
- name: Run tests
24+
- name: Checkout code
25+
uses: actions/checkout@v4 # Use v4
26+
27+
- name: Run jacs tests
28+
# Specify the working directory for the test command
29+
working-directory: jacs
2230
run: cargo test --verbose

CHANGELOG.md

Lines changed: 112 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,132 @@
11
# PLANNED
2-
2+
- machine fingerprinting v2
33
- encrypt files at rest
44
- refine schema usage
55
- more getters and setters for documents recognized by schemas
66
- WASM builds
7-
7+
- https://github.com/verus-lang/verus?tab=readme-ov-file
8+
- use rcgen to sign certs, and register with ACME
9+
https://opentelemetry.io/docs/languages/rust/
10+
. ai.pydantic.dev
811

912
## 0.4.0
10-
- WASM
11-
- [] machine fingerprinting v2
12-
13-
## 0.3.4
14-
- [] upgrade pqcrypto https://github.com/rustpq/pqcrypto/issues/79
15-
- [] RBAC integration with header
13+
- Domain integration
14+
- [] sign config
1615
- [] RBAC enforcement from server. If shared, new version is pinned.
17-
- [] diff versions
18-
- [] bucket integration
19-
- [] task review
20-
- [] make sure config directory is in isolated location, like with key
21-
- [] don't store "jacs_private_key_password": in config, don't display
22-
- [] domain to header, and related verification
23-
- [] refactor API so easier to use from higher level libraries - create agent, load agent, save document, create document, update document, sign
24-
- more complete python implementation
16+
17+
- more complete python implementation
2518
- pass document string or document id - with optional version instead of string
2619
- load document whatever storage config is
2720
- function test output metadata about current config and current agent
28-
29-
## jacspy cleanup
30-
3121
## jacs-mcp 0.1.0
3222

33-
- [] integrate with server
23+
- [] use rmcp
24+
- [] auth or all features
3425
- [] integration test with client
3526
- [] https://github.com/modelcontextprotocol/specification/discussions
3627

28+
29+
30+
--------------------
31+
32+
## 0.3.5
33+
34+
### Register agent
35+
36+
- [] register agent
37+
- [] remove requirement to store public key type
38+
39+
- [] upgrade pqcrypto https://github.com/rustpq/pqcrypto/issues/79
40+
- [] RBAC integration with header
41+
- [] diff versions
42+
- [] bucket integration
43+
- [] don't store "jacs_private_key_password": in config, don't display
44+
- [] register public key
45+
- [] CA for cert
46+
- [] add timestamp to prevent timing attacks to request/response features
47+
- [] no_save = false should save document and still return json string instead of message on create document
48+
-
49+
50+
## jacspy
51+
- [] install jacs cli with the python wheel
52+
- [] python based instructions for how to create - cli create agent
53+
1. cli create agent
54+
2. config jacspy to load each agent
55+
56+
- [] auto generate agent doc from MCP server list, auto versions
57+
- [] traceable, verifiable request logs
58+
- [] fastmcp client and server stdio
59+
- [] fastmcp client and server websocket
60+
- [] publish jacspy to pypi
61+
- [] github actions builder for linux
62+
- [] mcp make decorator for @resource
63+
- [] mcp make sure "list" request is signed
64+
65+
## jacsnpm
66+
proof of concept
67+
68+
- [] typescript mcp client and server
69+
- [] npm install jacs (cli and available to plugin)
70+
71+
--------------------
72+
3773
# COMPLETED
3874

75+
## 0.3.4
76+
77+
## integrated demo
78+
79+
- [x] sign request/response (any python object -> payload)
80+
- [x] verify response/request (any payload json string -> python object)
81+
- [x] integrate with fastMCP, MCP, and Web for request response
82+
- [x] have identity available to business logic
83+
- [x] have logs available for review (no writing to file, ephemoral)
84+
85+
## jacspy
86+
87+
- [x] make decorator for easy use in @tools
88+
- [x] new local builder
89+
- [] fastmcp client and server sse
90+
- [x] jacspy test - sign(content) -> (signature, agentid, agentversion, documentid, documentversion)
91+
- [x] jacspy test - verify(content, signature, agentid, agentversion) -> bool, error
92+
93+
94+
### General
95+
96+
- init √
97+
- [x] load(config) -> Agent
98+
99+
### detailed
100+
- [x] make sure config directory is in isolated location, like with key
101+
- [x] make config and security part of Agent
102+
- [x] don't use env everywhere- dep jacspy
103+
- [x] load multistorage into agent object to re-use
104+
- [x] BUG keys directory isolation broken when re-using Multistorage. TODO wrap key saving in different function
105+
- [x] don't use set_env_vars() by default - may be more than one agent in system
106+
- [x] change config to have storagetype string, add to config schema
107+
- write tests for no env vars usage of config
108+
- load by id from default store
109+
- [x] don't store passwords in config
110+
- [x] all old tests and some new tests pass
111+
- [x] cli init function
112+
- [x] clean up fs defaults in init/config/
113+
- [x] bug with JACS_SCHEMA_AGENT_VERSION didn't have default on cli init
114+
- [x] separate JACS readme repo readme
115+
- [x] minimal github actions
116+
- [x] autodetect public key type
117+
- [x] refactor API so easier to use from higher level libraries - create agent, load agent, save document, create document, update document, sign
118+
init, load agent, verify agent, verify document,
119+
- [x] single init, also signs agent
120+
- [x] load from config
121+
- [x] have load agent from config also load keys IF SIGNED
122+
123+
124+
125+
126+
---------------
127+
128+
# 0.3.3
129+
39130
## jacs 0.3.3
40131
- [x] change project to workspace
41132
- [x] basic python integration
@@ -44,9 +135,6 @@
44135
- [x] cli review and tests
45136
- [x] TEST init agent without needing configs in filesystem by checking that needed ENV variables are set
46137

47-
48-
49-
50138
## 0.3.2
51139
- [x] add common clause to Apache 2.0
52140
- [x] use a single file to handle file i/o for all storage types
@@ -55,9 +143,8 @@
55143
- [x] create tests using custom schemas - verify this is working
56144

57145

58-
59146
## 0.3.1
60-
- upgraded many dependencies using
147+
- [x] upgraded many dependencies using
61148
cargo install cargo-edit
62149
cargo upgrade
63150

Makefile

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
1-
.PHONY: build-jacspy build-jacspy-mac build-jacspy-linux build-jacs test
2-
3-
build-jacspy: build-jacspy-mac build-jacspy-linux
4-
5-
build-jacspy-mac:
6-
$(info PYTHON_INCLUDE: $(PYTHON_INCLUDE))
7-
$(info PYTHON_LIB: $(PYTHON_LIB))
8-
echo $(PYTHON_INCLUDE)
9-
echo $(PYTHON_LIB)
10-
cd jacspy && env PYTHON_INCLUDE=$(PYTHON_INCLUDE) PYTHON_LIB=$(PYTHON_LIB) cargo build --release
11-
cp target/release/libjacspy.dylib jacspy/jacspy.so
12-
13-
build-jacspy-linux:
14-
docker pull python:3.11-bookworm
15-
docker buildx build --tag "jacs-build" -f ./jacspy/Dockerfile . ;\
16-
docker run --rm -v "$(PWD)/jacspy/linux:/output" jacs-build cp /usr/src/jacspy/target/release/libjacspy.so /output/jacspy.so;
1+
.PHONY: build-jacs test
172

3+
184
build-jacs:
195
cd jacs && cargo install --path . --force
20-
/Users/jonathan.hendler/.cargo/bin/jacs --help
21-
/Users/jonathan.hendler/.cargo/bin/jacs version
6+
~/.cargo/bin/jacs --help
7+
~/.cargo/bin/jacs version
228

239
test-jacs:
2410
cd jacs && RUST_BACKTRACE=1 cargo test -- --nocapture
2511

26-
test-jacspy:
27-
cd jacspy && cargo test -- --nocapture
12+
test-jacs-cli:
13+
cd jacs && RUST_BACKTRACE=1 cargo test --test cli_tests -- --nocapture
14+
15+
16+
17+
publish-jacs:
18+
cargo publish --dry-run -p jacs
19+
2820

2921
test: test-jacs test-jacspy
3022
# --test agent_tests --test document_tests --test key_tests --test task_tests --test agreement_test --test create_agent_test

0 commit comments

Comments
 (0)