Skip to content

V0.6.0#37

Merged
Hendler merged 36 commits intomainfrom
v0.6.0
Feb 8, 2026
Merged

V0.6.0#37
Hendler merged 36 commits intomainfrom
v0.6.0

Conversation

@Hendler
Copy link
Copy Markdown
Contributor

@Hendler Hendler commented Feb 7, 2026

No description provided.

Task 19 (READMEs and MCP)
README.md: Added “How to use JACS” bullets for verify_standalone() and HAI registration (registerWithHai / RegisterWithHai / register_with_hai). Core API table already had the new functions.
jacsnpm/README.md: API table now includes verifyStandalone, registerWithHai, getDnsRecord, getWellKnownJson.
jacsgo/README.md: API table now includes VerifyStandalone, RegisterWithHai, GetDnsRecord, GetWellKnownJson.
jacspy/README.md: API table now includes verify_standalone, get_dns_record, get_well_known_json.
jacs-mcp/README.md: In the jacs_verify_state row, added a note that one-off verification without loading an agent can be done with verify_standalone() in the language bindings.
Task 20 (Final cross-check)
Tests: cargo test -p jacs-binding-core (31 passed), go test ./... in jacsgo (passed), npm run test:simple in jacsnpm (12 passed, 22 pending).
jacspy: pytest tests/test_simple.py — 1 test skipped (likely needs native build).
jacs-mcp: One integration test failed (starts_server_with_agent_env); failure is from config path (directory vs file), not from the plan’s changes.
jacs_verify_auto: Only appears in USECASES.md and jacsbook usecases.md where OpenClaw/moltyjacs are explicitly referenced — no change needed.
USECASES.md anchors: README link USECASES.md#protecting-your-agents-identity-on-the-internet matches the “Protecting your agent's identity on the internet” section.
USECASES_REVIEW.md: Not in the repo; nothing to delete.
Task 19 (READMEs and MCP)
README.md: Added “How to use JACS” bullets for verify_standalone() and HAI registration (registerWithHai / RegisterWithHai / register_with_hai). Core API table already had the new functions.
jacsnpm/README.md: API table now includes verifyStandalone, registerWithHai, getDnsRecord, getWellKnownJson.
jacsgo/README.md: API table now includes VerifyStandalone, RegisterWithHai, GetDnsRecord, GetWellKnownJson.
jacspy/README.md: API table now includes verify_standalone, get_dns_record, get_well_known_json.
jacs-mcp/README.md: In the jacs_verify_state row, added a note that one-off verification without loading an agent can be done with verify_standalone() in the language bindings.
Task 20 (Final cross-check)
Tests: cargo test -p jacs-binding-core (31 passed), go test ./... in jacsgo (passed), npm run test:simple in jacsnpm (12 passed, 22 pending).
jacspy: pytest tests/test_simple.py — 1 test skipped (likely needs native build).
jacs-mcp: One integration test failed (starts_server_with_agent_env); failure is from config path (directory vs file), not from the plan’s changes.
jacs_verify_auto: Only appears in USECASES.md and jacsbook usecases.md where OpenClaw/moltyjacs are explicitly referenced — no change needed.
USECASES.md anchors: README link USECASES.md#protecting-your-agents-identity-on-the-internet matches the “Protecting your agent's identity on the internet” section.
USECASES_REVIEW.md: Not in the repo; nothing to delete.
…. I’m running targeted Rust tests now to verify each issue is reproduced/fixed without waiting on the entire suite.

Ran cargo test -p jacs --test path_validation_tests --test schema_security_tests --test network_security_tests for 6s

Ran cargo test -p jacs --test dns_policy_tests --test verification_claim_tests for 8s

Explored 1 file, 1 search
Ran git status --short /Users/jonathan.hendler/personal/JACS/jacs/src/validation.rs /Users/jonathan.hendler/personal/JACS/jacs/src/schema/utils.rs /Users/jonathan.hendler/personal/JACS/jacs/src/dns/bootstrap.rs /Users/jonathan.hendler/personal/JACS/jacs/tests/path_validation_tests.rs /Users/jonathan.hendler/personal/JACS/jacs/tests/schema_security_tests.rs /Users/jonathan.hendler/personal/JACS/jacs/tests/network_security_tests.rs

I finished patching and target tests are green. I’m doing one final pass to capture precise file/line references for each finding and fix so you can review quickly.

Explored 6 files
Ran git status --short

Worked for 7m 52s
Security review completed on core jacs/ surfaces (docs + code paths for schema resolution, network trust checks, filesystem path guards, and database query/config handling), plus a static pass over jacspy/jacsnpm wrappers.

Fixed findings

High: schema allowlist boundary bypass via string-prefix matching.
Issue: filesystem schema path checks used string starts_with, so allowed_evil/... could pass when allowed/... was configured.
Fix: switched to normalized/canonical path containment checks.
Code: utils.rs (line 493), utils.rs (line 542).
Regression tests: schema_security_tests.rs (line 19), schema_security_tests.rs (line 76).
Medium: path traversal guard accepted Windows drive-prefixed paths.
Issue: require_relative_path_safe() did not reject C:\... / D:/... / E:.
Fix: added explicit drive-prefix rejection while preserving UUID:UUID filename support.
Code: validation.rs (line 282).
Regression tests: path_validation_tests.rs (line 94), path_validation_tests.rs (line 101).
Medium: HAI registration verification accepted insecure API schemes.
Issue: HAI_API_URL was not scheme-restricted in verify_hai_registration_sync().
Fix: enforce https by default; allow http://localhost and http://127.0.0.1 for dev/test parity with existing key-fetch policy.
Code: bootstrap.rs (line 395).
Regression tests: network_security_tests.rs (line 10), network_security_tests.rs (line 34).
Validation run

cargo test -p jacs --test path_validation_tests --test schema_security_tests --test network_security_tests
cargo test -p jacs --test dns_policy_tests --test verification_claim_tests
Result: all passed.
Additional review notes

Database storage paths/queries looked safe from SQL injection (parameterized SQL in database.rs).
No new critical wrapper-specific injection surfaces found in jacspy/jacsnpm during static pass; wrappers mostly forward into core.
Potential next steps:

Apply the same HTTPS/localhost policy in high-level wrapper HAI client entry points (jacsnpm + jacspy) for policy consistency.
Add a dedicated security test target in CI running these new regression tests first (fast fail).

6 files changed
+262
-24
Undo
jacs/src/dns/bootstrap.rs
jacs/src/schema/utils.rs
jacs/src/validation.rs
jacs/tests/network_security_tests.rs
jacs/tests/path_validation_tests.rs
jacs/tests/schema_security_tests.rs
  ┌─────────────────────┬────────────────────────────────────────────────┐
  │        Suite        │                     Result                     │
  ├─────────────────────┼────────────────────────────────────────────────┤
  │ jacs --lib          │ 345 passed, 0 failed                           │
  ├─────────────────────┼────────────────────────────────────────────────┤
  │ jacs-binding-core   │ 31 passed (+ 4 ignored doctests)               │
  ├─────────────────────┼────────────────────────────────────────────────┤
  │ jacs-mcp            │ 20 passed (19 unit + 1 integration), 2 ignored │
  ├─────────────────────┼────────────────────────────────────────────────┤
  │ jacsgo              │ All passed (cached)                            │
  ├─────────────────────┼────────────────────────────────────────────────┤
  │ jacsnpm test:simple │ 14 passing, 22 pending                         │
  └─────────────────────┴────────────────────────────────────────────────┘
  Notable: The previously-failing MCP integration test starts_server_with_agent_env now passes.

⏺ All 9 tasks are complete. Here's the final summary:

  Completed work across the 45-step plan:

  1. MCP integration test fix — Fixed password mismatch ("testpassword" → "secretpassord") and exit code assertion (check stderr for "Agent loaded successfully"
  instead of exit code 0)
  2. Go GenerateVerifyLink() — Pure Go implementation with constants and 4 tests
  3. Go Audit() via FFI — Added jacs_audit C export in Rust, Go wrapper, 2 tests
  4. Python DRY — generate_verify_link now calls Rust binding via PyO3 with pure-Python fallback
  5. TypeScript DRY — generateVerifyLink now calls Rust binding via NAPI
  6. READMEs — Root, Go, Python, and Node.js READMEs updated with audit() and generate_verify_link() in API tables
  7. HAI repo — Verified complete (verify endpoint, frontend, rate limiting, tests)
  8. JAC repo — Verified complete (email templates, approval context fixes)
  9. Final verification — All test suites green (345 + 31 + 20 + Go + 14 = 410+ tests passing)
What changed

npm packaging fixes in package.json:
Removed install-time native build (install script removed).
Added missing mcp.d.ts to published files.
Removed stale optionalDependencies.
Tightened native artifact glob to jacs.*.node to avoid shipping stale non-runtime binaries.
npm lockfile synced in package-lock.json.
npm release hardening in release.yml:
Validates required .node artifacts before publish.
Validates required exported files are present in npm pack --dry-run.
Node CI smoke test added in nodejs.yml:
Packs and installs tarball, imports @hai-ai/jacs, @hai-ai/jacs/simple, @hai-ai/jacs/mcp.
Python sdist blocker fixed in Cargo.toml:
exclude = ["examples/**"] to avoid colon-named fixture packaging failure.
Python CI hardening in python.yml:
PR/push-time maturin sdist check.
uv-based wheel smoke job (build + clean venv install + import).
Removed stale setuptools config setup.py (pyproject/maturin is now source of truth).
Fixed Python test correctness in test_fetch_remote_key.py:
Uses valid UUID agent/version for network-path test.
Added robust panic mapping in simple.py:
PyO3 PanicException during remote key fetch now maps to NetworkError.
Docs/changelog updates:
CHANGELOG.md
README.md
README.md
Validation run

jacsnpm tests: 48 passing, 37 pending.
jacspy full suite (make test with UV_NO_SYNC=1): passed.
tests/: 61 passed, 36 skipped
python/jacs/: 12 passed, 2 skipped
uv run maturin sdist --out /tmp/jacspy-dist: passed.
uv run maturin build --release --out /tmp/jacspy-dist: passed.
Wheel clean-venv smoke (uv): passed (import jacs, jacs.simple, jacs.hai).
npm pack --dry-run: confirms mcp.d.ts is present and only jacs.*.node is packaged.
Note

I did not remove any tests.
A fully clean local npm install <tarball> check (with registry dependency resolution) is blocked in this sandbox by DNS/network restrictions; the CI smoke step now enforces that scenario where network is available.
…ent checks, and update A2A/docs

- remove npm install-time native build and validate pack artifacts/types
- fix jacspy sdist packaging and add uv-based wheel/sdist smoke checks
- align Python/Node agreement wrapper behavior with strict check semantics
- add/refresh A2A interoperability tests and docs
- update README, SECURITY, jacsbook, and CHANGELOG
Generates schema-valid agent payloads (includes required service structure).
Writes complete config fields (jacs_agent_private_key_filename, jacs_agent_public_key_filename).
Restores caller environment variables after create (no env pollution).
Fixed trust-store canonical ID handling in trust.rs:
Accepts canonical docs with split jacsId + jacsVersion.
Canonicalizes to UUID:VERSION_UUID before path use.
Added unit test coverage for this case.
Fixed Python create/load password UX in simple.py:
create() now guarantees immediate load with provided password even if env var was initially unset.
Added/updated strict agreement workflow tests:
Python: test_simple.py
Node: simple.test.js
Covers:
unsigned agreement fails
one signer still fails
two distinct agents sign, then succeeds
Kept and completed CI/distribution coverage hardening in:
release.yml
release-pypi.yml
nodejs.yml
python.yml
rust.yml
Updated docs/changelog/security:
README.md (strict agreement sentence)
testing.md (detailed two-agent harness + strict semantics)
security.md
SECURITY.md
CHANGELOG.md
Validation run

cargo test trust_agent_ in /Users/jonathan.hendler/personal/JACS/jacs: passed (including new trust canonicalization test).
npm run build && npm test in /Users/jonathan.hendler/personal/JACS/jacsnpm: 88 passing.
uv run maturin develop --release && uv run pytest tests -v in /Users/jonathan.hendler/personal/JACS/jacspy: 93 passed, 5 skipped.
npm pack --dry-run in /Users/jonathan.hendler/personal/JACS/jacsnpm: passed, confirms exported artifacts include mcp.d.ts.
uv run maturin sdist --out dist-sdist-check in /Users/jonathan.hendler/personal/JACS/jacspy: passed.
Wheel smoke in fresh venv with uv: passed (import jacs, jacs.simple, jacs.hai).
Are the tests useful, and do they demonstrate the use case?

Yes. They now explicitly prove the real agreement contract:
incomplete signatures are rejected,
two separate agents can sign the same agreement,
completion only succeeds when all required signers have signed.
They are integration-level enough to catch real deployment/runtime regressions (config generation, key loading, agreement verification path), not just superficial API mocks.
maturin fix
readme
@Hendler Hendler merged commit 12564d1 into main Feb 8, 2026
8 of 9 checks passed
@Hendler Hendler deleted the v0.6.0 branch March 6, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant