Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
be53b59
CHANGELOG.md
Hendler Aug 11, 2025
c4c4c05
dns
Hendler Aug 11, 2025
41299fd
fix
Hendler Aug 11, 2025
782c644
fixing bootstrap
Hendler Aug 12, 2025
52fb20c
fix race condition
Hendler Aug 12, 2025
e11aa30
dilithium fix
Hendler Aug 12, 2025
7546993
agent fixure
Hendler Aug 12, 2025
99fc182
dnssec not working
Hendler Aug 12, 2025
9b6efde
dns
Hendler Aug 12, 2025
35ffbc2
dns agent verification from cli
Hendler Aug 12, 2025
125e9f0
clean up observability
Hendler Aug 12, 2025
b24af78
change log
Hendler Aug 12, 2025
beb18a6
keystore mod
Hendler Aug 12, 2025
b549684
cleaned up key loading
Hendler Aug 12, 2025
ef1885c
fixes
Hendler Aug 12, 2025
52e0436
fix tests
Hendler Aug 12, 2025
887295e
warning cleanup
Hendler Aug 12, 2025
ce0be30
changelog
Hendler Aug 17, 2025
cc92e6f
starting embeded mcp and http
Hendler Aug 17, 2025
7b8d71b
jacs mcp
Hendler Aug 17, 2025
3423a83
CHANGELOG.md
Hendler Sep 18, 2025
2f1bad2
doc
Hendler Sep 18, 2025
6a3ad28
tests
Hendler Sep 18, 2025
b0df301
jacsgp
Hendler Sep 20, 2025
98a97cd
fixes in jacgo to run tests
Hendler Sep 20, 2025
8736ee5
fix lint main issue
Hendler Sep 20, 2025
7bbc8de
readme
Hendler Sep 20, 2025
c22903f
a2a
Hendler Sep 22, 2025
dea6246
a2a
Hendler Sep 22, 2025
a942b44
bugfix
Hendler Sep 22, 2025
8a54825
misc fixes w/ libs and a2a
Hendler Sep 26, 2025
aa0e25e
changelog
Hendler Sep 26, 2025
c49a971
refactor filestysem read write
Hendler Sep 26, 2025
bcd4c04
cargo upgrade
Hendler Sep 26, 2025
a0cc7c4
add a new post quantum algorithm for signing
Hendler Oct 2, 2025
cdf8a6e
passing pq tests
Hendler Oct 3, 2025
aa0c044
permission
Hendler Oct 4, 2025
36bb21d
add jacsBranch
Hendler Oct 22, 2025
5902e4d
a2a updates
Hendler Jan 28, 2026
60a0964
a2a updates
Hendler Jan 28, 2026
2f00306
updating a2a, rust, cleanup errors
Hendler Jan 28, 2026
aa3b3e4
a2a updates
Hendler Jan 28, 2026
0d45ea3
cleanup code
Hendler Jan 28, 2026
85b7c68
ignore
Hendler Jan 28, 2026
17e83d5
Security fixes: PBKDF2 KDF, panic handling, verification status, file…
Hendler Jan 30, 2026
fb51615
- **[MEDIUM] Fixed jacspy global singleton**: Refactored from global …
Hendler Jan 30, 2026
7b86f36
openclaw?
Hendler Jan 30, 2026
6d0d6c5
openclaw
Hendler Jan 30, 2026
53cbfc3
jacsnpm security updates
Hendler Jan 30, 2026
5d5fb63
fix test, doc
Hendler Jan 31, 2026
489d17a
cli for fetch
Hendler Jan 31, 2026
1f08023
moar openclaw
Hendler Jan 31, 2026
e81fcc2
update gooooo
Hendler Jan 31, 2026
0e7b6aa
better test coverage
Hendler Jan 31, 2026
db167f1
start updating book
Hendler Jan 31, 2026
9ef687a
update book
Hendler Jan 31, 2026
c9178e9
books update
Hendler Jan 31, 2026
3042cca
update rust build versions
Hendler Jan 31, 2026
0130ef9
fix test
Hendler Jan 31, 2026
5695573
fix test
Hendler Jan 31, 2026
23a9f13
fix defaults
Hendler Jan 31, 2026
d9fd9f5
add test config for CI
Hendler Jan 31, 2026
dff7fb4
test fix
Hendler Jan 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4 # Use v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: '1.93'

- name: Run jacs tests
# Specify the working directory for the test command
working-directory: jacs
run: cargo test --verbose
working-directory: jacs
run: cargo test --verbose --features cli
8 changes: 7 additions & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@ jobs:
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install mdbook
run: |
curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.37/mdbook-v0.4.37-x86_64-unknown-linux-gnu.tar.gz | tar xz
sudo mv mdbook /usr/local/bin/
- name: Build book
run: mdbook build jacs/docs/jacsbook
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs/jacsbook/book/'
path: './jacs/docs/jacsbook/book/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
debug/
target/
.idea

jacs/documents/*
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
Expand All @@ -13,8 +13,9 @@ Cargo.lock

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

.cursor
grant.md
scratch.md
jacs.config.json
!jacs/jacs.config.json
.DS_Store
135 changes: 135 additions & 0 deletions A2A_QUICKSTART.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# JACS A2A Quick Start Guide

JACS extends Google's A2A (Agent-to-Agent) protocol with cryptographic document provenance.

## What JACS Adds to A2A

- **Document signatures** that persist with data (not just transport security)
- **Post-quantum cryptography** for future-proof security
- **Chain of custody** tracking for multi-agent workflows
- **Self-verifying artifacts** that work offline

## Installation

```bash
# Rust
cargo add jacs

# Python
pip install jacs

# Node.js
npm install jacsnpm
```

## Basic Usage

### 1. Export Agent to A2A Format

```python
from jacs.a2a import JACSA2AIntegration

a2a = JACSA2AIntegration("jacs.config.json")
agent_card = a2a.export_agent_card({
"jacsId": "my-agent",
"jacsName": "My Agent",
"jacsServices": [{
"name": "Process Data",
"tools": [{
"url": "/api/process",
"function": {
"name": "process",
"description": "Process data"
}
}]
}]
})
```

### 2. Wrap A2A Artifacts with Provenance

```javascript
const { JACSA2AIntegration } = require('jacsnpm');
const a2a = new JACSA2AIntegration();

// Wrap any A2A artifact
const wrapped = a2a.wrapArtifactWithProvenance({
taskId: 'task-123',
operation: 'analyze',
data: { /* ... */ }
}, 'task');
```

### 3. Verify Wrapped Artifacts

```rust
use jacs::a2a::provenance::verify_wrapped_artifact;

let result = verify_wrapped_artifact(&agent, &wrapped_artifact)?;
if result.valid {
println!("Verified by: {}", result.signer_id);
}
```

### 4. Create Chain of Custody

```python
# Track multi-step workflows
step1 = a2a.wrap_artifact_with_provenance(data1, "step")
step2 = a2a.wrap_artifact_with_provenance(data2, "step", [step1])
step3 = a2a.wrap_artifact_with_provenance(data3, "step", [step2])

chain = a2a.create_chain_of_custody([step1, step2, step3])
```

## Well-Known Endpoints

Serve these endpoints for A2A discovery:

- `/.well-known/agent.json` - A2A Agent Card (JWS signed)
- `/.well-known/jacs-agent.json` - JACS agent descriptor
- `/.well-known/jacs-pubkey.json` - JACS public key

## JACS Extension in Agent Cards

```json
{
"capabilities": {
"extensions": [{
"uri": "urn:hai.ai:jacs-provenance-v1",
"description": "JACS cryptographic document signing",
"params": {
"supportedAlgorithms": ["dilithium", "rsa", "ecdsa"],
"verificationEndpoint": "/jacs/verify"
}
}]
}
}
```

## Examples

- **Rust**: [jacs/examples/a2a_complete_example.rs](./jacs/examples/a2a_complete_example.rs)
- **Python**: [jacspy/examples/fastmcp/a2a_agent_server.py](./jacspy/examples/fastmcp/a2a_agent_server.py)
- **Node.js**: [jacsnpm/examples/a2a-agent-example.js](./jacsnpm/examples/a2a-agent-example.js)

## Key Concepts

1. **Dual Keys**: JACS generates two key pairs:
- Post-quantum (Dilithium) for document signatures
- Traditional (RSA/ECDSA) for A2A compatibility

2. **Separation of Concerns**:
- A2A handles discovery and transport
- JACS handles document provenance

3. **Zero Trust**: Every artifact is self-verifying with complete audit trail

## Next Steps

1. Set up JACS configuration with keys
2. Export your agent as A2A Agent Card
3. Implement verification endpoints
4. Register with A2A discovery services

See full documentation: [jacs/src/a2a/README.md](./jacs/src/a2a/README.md)
111 changes: 79 additions & 32 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
. ai.pydantic.dev
- secure storage of private key for shared server envs https://crates.io/crates/tss-esapi, https://docs.rs/cryptoki/latest/cryptoki/
- qr code integration
- https://github.com/sourcemeta/one

## 0.4.0
- Domain integration
Expand All @@ -22,20 +23,49 @@
- load document whatever storage config is
- function test output metadata about current config and current agent

- [] add more feature flags for modular integrations
- [] a2a integration
- [] acp integration


## jacs-mcp 0.1.0

- [] use rmcp
- [] auth or all features
- [] integration test with client
- [] https://github.com/modelcontextprotocol/specification/discussions

### devrel
- [] github actions builder for auto build/deploy of platform specific versions
--------------------

- [] cli install for brew
- [] cli install via shell script
- [] open license
- [] api for easier integratios data processing

- [] clickhous demo
- [] test centralized logging output without file output

--------------------

## 0.3.7

### devrel
- [] github actions builder for auto build/deploy of platform specific versions
### internals

- [x] Updated A2A integration to protocol v0.4.0: rewrote AgentCard schema (protocolVersions array, supportedInterfaces, embedded JWS signatures, SecurityScheme enum, AgentSkill with id/tags), updated well-known path to agent-card.json, and aligned Rust, Python, and Node.js bindings with passing tests across all three.
- [] remove in memory map if users don't request it. Refactor and DRY storage to prep for DB storage
- [] test a2a across libraries
- [] store in database
- [] awareness of branch, merge, latest for documents.

### hai.ai

- integration with

1. register
2.


### jacsnpm

Expand All @@ -59,11 +89,12 @@
1. cli create agent
2. config jacspy to load each agent
- [] github actions builder for linux varieties
- [] switch to uv from pip/etc

### JACS core
- [] acp integration

- [] brew installer, review installation instrucitons, cli install instructions. a .sh command?
- [] a2a integration
- [] more a2a tests
- [] ensure if a user wants standard logging they can use that


Expand All @@ -78,33 +109,7 @@
### minor core
- [] don't store "jacs_private_key_password": in config, don't display
- [] minor feature - no_save = false should save document and still return json string instead of message on create document

--------------------

## 0.3.6


### devex

- [] add more feature flags for modular integrations
- [] a2a integration
- [] acp integration
- [] add updates to book
- [] cli install for brew
- [] cli install via shell script
- [] open license
- [] crew.ai
- [] langchain

### jacs

- [] redesign api for easier bootstrapping
- [] PKI choice (dkim, ke)
- [] private key bootstrapping with vault, kerberos - filesystem
- [] api for easier integratios data processing
- [x] add observability to configuration

- [] test centralized logging output without file output
- [] default to dnssec if domain is present - or WARN

### jacsmcp

Expand All @@ -115,14 +120,56 @@
- [] refactor api
- [] publish to pipy
- [] tracing and logging integration tests
- [] switch to uv from pip/etc


### jacsnpm

- [] publish to npm
- [] tracing and logging integration tests


====
## 0.3.6

### Security

- **[CRITICAL] Fixed key derivation**: Changed from single SHA-256 hash to proper PBKDF2-HMAC-SHA256 with 100,000 iterations for deriving encryption keys from passwords. The previous single-hash approach was vulnerable to brute-force attacks.

- **[CRITICAL] Fixed crypto panic handling**: Replaced `.expect()` with proper `.map_err()` error handling in AES-GCM encryption/decryption. Crypto failures now return proper errors instead of panicking, which could cause denial of service.

- **[HIGH] Fixed foreign signature verification**: The `verify_wrapped_artifact` function now properly returns `Unverified` status for foreign agent signatures when the public key is not available, rather than incorrectly indicating signatures were verified. Added `VerificationStatus` enum to explicitly distinguish between `Verified`, `SelfSigned`, `Unverified`, and `Invalid` states.

- **[HIGH] Fixed parent signature verification**: The `verify_parent_signatures` function now actually verifies parent signatures recursively. Previously it always returned true regardless of verification status.

- Added `serial_test` for test isolation to prevent environment variable conflicts between tests.

- Added `regenerate_test_keys.rs` utility example for re-encrypting test fixtures with the new KDF.

- **[MEDIUM] Fixed jacsnpm global singleton**: Refactored from global `lazy_static!` mutex to `JacsAgent` NAPI class pattern. Multiple agents can now be used concurrently in the same Node.js process. Legacy functions preserved for backwards compatibility but marked deprecated.

- **[MEDIUM] Fixed jacspy global singleton**: Refactored from global `lazy_static!` mutex to `JacsAgent` PyO3 class pattern. Multiple agents can now be used concurrently in the same Python process. The `Arc<Mutex<Agent>>` pattern ensures thread-safety and works with Python's GIL as well as future free-threading (Python 3.13+). Legacy functions preserved for backwards compatibility.

- **[MEDIUM] Added secure file permissions**: Private keys now get 0600 permissions (owner read/write only) and key directories get 0700 (owner rwx only) on Unix systems. This prevents other users on shared systems from reading private keys.

### devex
- [x] add updates to book
- [x] add observability demo

### jacs
- [x] a2a integration
- [x] clean up observability
- Observability: added feature-gated backends (`otlp-logs`, `otlp-metrics`, `otlp-tracing`) and optional `observability-convenience`. Default build is minimal (stderr/file logs only), no tokio/OpenTelemetry; clear runtime errors if a requested backend isn’t compiled. Docs now include a feature matrix and compile recipes. Tests updated and all pass with features.

- [x] dns verification of pubic key hash
- DNS: implemented fingerprint-in-DNS (TXT under `_v1.agent.jacs.<domain>.`), CLI emitters for BIND/Route53/Azure/Cloudflare, DNSSEC validation with non-strict fallback, and config flags (`jacs_agent_domain`, `jacs_dns_validate`, `jacs_dns_strict`, `jacs_dns_required`). Added CLI flags `--require-dns`, `--require-strict-dns`, `--ignore-dns`, and `--no-dns` (alias preserved). Improved error messages, updated docs, and added policy/encoding tests.


- [x] scaffold private key bootstrapping with vault, kerberos - filesystem





--------------------

## 0.3.5
Expand Down
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[workspace]
members = [
"jacs",
"jacsnpm",
# "mcp-server",
"jacspy"
"jacs",
"jacsnpm",
"jacspy",
"jacs-mcp",
"jacsgo/lib"
]
resolver = "3"
rust-version = "1.85"


[workspace.package]
rust-version = "1.93"
readme = "README.md"
authors = ["HAI.AI <engineering@hai.io>"]
license-file = "LICENSE"
homepage = "https://humanassisted.github.io/JACS"
repository = "https://github.com/HumanAssisted/JACS"
keywords = ["cryptography", "json", "ai", "data", "ml-ops"]
categories = ["cryptography", "text-processing", "data-structures" ]
build = "build.rs"
categories = ["cryptography", "text-processing", "data-structures"]
Loading