Skip to content

V0.4.1 - #16

Open
Hendler wants to merge 33 commits into
mainfrom
v0.4.1
Open

V0.4.1#16
Hendler wants to merge 33 commits into
mainfrom
v0.4.1

Conversation

@Hendler

@Hendler Hendler commented May 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Hendler and others added 30 commits May 6, 2026 07:16
Remove RSA from the haiai-facing JACS API surface by narrowing the Node client algorithm type, dropping RSA-specific public-key handling in Rust, and updating signing/email tests to exercise Ed25519 or pq2025 behavior instead of deleting coverage.

Refresh the copied JACS knowledge corpus and generated self-knowledge after the JACS book cleanup so docs no longer advertise RSA-PSS or RS256. Update the Rust lockfile for the hardened JACS dependency graph, including Argon2id key envelopes, Hickory 0.26.1, and removal of the rsa package path.
Expose owner mail auth, deterministic email summaries, Musubi summaries, and sender reputation across Rust, Python, Node, and Go SDK EmailMessage surfaces with backwards-compatible defaults.
The pre-commit config now runs cargo fmt, cargo clippy --fix, and ruff
format/check across the whole tree on every commit (always_run: true).
This commit applies the resulting auto-formatting and resolves the
residual lints that auto-fix could not handle:

Rust (clippy):
- haiai/src/lib.rs: move #[cfg(test)] test_support after pub use blocks
  (items_after_test_module)
- haiai/src/client.rs: drop orphaned /// Formula: doc comment
  (empty_line_after_doc_comments)
- haiai/tests/cross_lang_contract.rs: &mut Vec<u8> -> &mut [u8]
- haiai/tests/contract_endpoints.rs: hits_async -> calls_async (httpmock)
- haiigo/src/lib.rs: allow not_unsafe_ptr_arg_deref at the crate level
  (FFI macros take raw pointers by design); replace two match arms with
  unwrap_or_default()

Python (ruff):
- client.py: drop unused old_auth_header binding (pre-sign call kept)
- conftest.py: drop unused original_sync/original_async (monkeypatch
  auto-restores)
- test_binary.py: hoist mid-file import sys to the top
- test_client_security.py: drop unused original_init capture
- several test_*.py files: drop unused ffi/mock_ffi/result/original_verify
  bindings where only the side-effect call was needed
Update license identifier in all 10 package manifests (Cargo.toml,
pyproject.toml, package.json, plugin.json), Homebrew formula, READMEs,
and knowledge docs. Add per-crate LICENSE files for independent
publishing. Add BUSL-1.1 copyright headers to SDK entry points.
Regenerate lock files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Commit 912e1a9 changed build_auth_header to emit JACS {id}:{ts}:{nonce}:{sig},
but the get_raw_email_auth_header_present integration test still asserted the
old 3-segment format, causing the test-rust CI job to fail.
Forward JACS envelope signing methods through boxed provider impls so binding-core clients backed by LocalJacsProvider can use the default html_inline_jacs email path.

Add regression coverage for Box<dyn JacsMediaProvider> and HaiClient HTML-inline generation, document the fix in the changelog, and complete CLI/MCP SendEmailOptions initializers so workspace checks compile.
JACS has consolidated retired application schemas such as message, memory, state, task, todo, commitment, and audit into the generic signed-document model. HAIAI depended on several of those old surfaces in tests, embedded MCP documentation, self-knowledge, and one signed-email assertion. This commit updates HAIAI to align with the current local ../JACS checkout without reintroducing application-level schema semantics in HAIAI.

MCP compatibility: update the embedded JACS MCP integration test to assert that retired jacs_memory_* tools are absent, while preserving HAIAI-owned hai_save_memory. Update the live JACS skill documentation so agents are directed to jacs_sign_document for generic signed payloads and to HAIAI memory/document APIs for HAIAI-managed memory.

Signed document compatibility: change the HAIAI embedded AgentSigner wrapper to emit jacsType=document for raw signed payloads. Relax the email JACS attachment test to accept either document or legacy message during the transition window, because the email attachment is a signed document containing HAIAI email-signature payload data rather than the retired JACS message application schema.

Local JACS loading: canonicalize JACS config, data, and key paths before loading SimpleAgent, and materialize a resolved shadow config for JACS. This avoids failures on macOS temporary paths that enter as /var/folders/... while JACS secure path handling sees the real /private/var/... path. Mirror that behavior in Python config loading and key-rotation temp directories.

Self-knowledge refresh: regenerate rust/haiai/docs/knowledge and self_knowledge_data.rs from the current ../JACS docs so HAIAI no longer embeds deleted schema chapters or retired MCP tool references. This is documentation/context for hai_self_knowledge, not the runtime source of MCP tool registration, but stale entries there could mislead agents.

Changelog: add a succinct Unreleased note for the JACS schema consolidation compatibility update.

Verification run against ../JACS: cargo test --workspace --no-fail-fast; uv run --python .venv/bin/python --no-sync python -m pytest; npm test; npm run build; cargo build -p haiigo --release; GOCACHE=/private/tmp/haiai-go-cache CGO_ENABLED=1 go test -race ./... with the release libhaiigo on the library path; Go cgo native smoke with the local-path test passing and the remote test skipped because JACS_SMOKE_AGENT_DIR is unset; cargo test -p haiai self_knowledge after regenerating embedded knowledge.
Updates all `=0.10.2` pins to `=0.11.0` across the Rust crates and
`jacs==0.11.0` in python/pyproject.toml. Cargo.lock and
node/package-lock.json refreshed via path-patched local JACS checkout
(`~/personal/JACS/jacs` on branch v0.11.0).

Files:
- rust/haiai/Cargo.toml: jacs, jacs-media -> =0.11.0
- rust/haiai-cli/Cargo.toml: jacs, jacs-mcp -> =0.11.0
- rust/hai-mcp/Cargo.toml: jacs, jacs-binding-core, jacs-mcp -> =0.11.0
- python/pyproject.toml: jacs==0.11.0
- rust/Cargo.lock, node/package-lock.json: regenerated

python/uv.lock is not refreshed in this commit because jacs 0.11.0 is
not yet on PyPI; for local dev use `pip install -e ../../JACS/jacspy`
per CLAUDE.md.

`cargo check --workspace` passes against JACS 0.11.0.
…vider (verify surfaces)

Verification is a local operation (recompute hash + Ed25519 check against
the signer's public key), so the remote provider verifies without inner-
provider key material. Signer keys are fetched from hai-api's public
GET /jacs/v1/agents/{jacs_id}/keys/{version} endpoint, cached per
(agent_id, version) raw bytes, and materialized as <signer_id>.public.pem
for the inline-text/image DefaultKeyResolver. Missing agentVersion fails
closed; wrong registry keys are rejected via JACS's publicKeyHash binding
(pinned by test). verify_with_key accepts PEM or raw bytes. Media signing
and verify_dns return BackendUnsupported (local key material required).

Shared map_verification_result extracted to jacs.rs (LocalJacsProvider
refactored onto it); shared create_test_agent helper in test_support.
13 verify_tests: real Ed25519 signing, httpmock key endpoint, tamper/
wrong-key/missing-version negatives, cache-hit pinning, protocol unwrap.

Also loosens jacs* pins =0.11.0 -> 0.11 (haiai, hai-mcp, haiai-cli +
Cargo.lock): exact 0.11.0 was yanked from crates.io (only 0.11.1
resolves), which blocked any commit from passing the clippy hook.

Unblocks hosted agents (RemoteSignerJacsProvider inner) from running
fail-closed verified document stores, e.g. hai temporal memory.
LocalJacsProvider now implements the full JacsAgreementProvider v2
surface against jacs::agreements::v2 (jacs 0.11.2): create, apply
(typed mutations), sign (signer/witness/notary), verify (structural +
hash + policy + signature report), branch-conflict detect, transcript
auto-merge, and explicit conflict resolution — replacing the deferred
P1 stubs. Role parsing and error wording mirror JACS binding-core so
every surface rejects bad input identically. Covered by a real-Ed25519
lifecycle suite mirroring JACS's shared parity scenario fixture.

Agreements are first-class across FFI: 11 methods (4 HTTP workflow:
save/search/get/countersign; 7 local JACS v2 ops) flow through
hai-binding-core -> haiipy/haiinpm/haiigo -> Python/Node/Go clients,
mocks, and adapter-coverage tests. ffi_method_parity.json grows to 105
methods across 16 categories; contract_test pins the new section
member-by-member. binding-core gates every agreement item behind an
'agreements' feature (default-on) so opting out compiles clean.

Plumbing/ordering: haiai requires jacs 0.11.2 (agreements::v2 minimum);
CI JACS_REF moves to v0.11.2 — JACS main must be pushed + tagged +
published before haiai CI/release can green. save/search agreement
endpoints are PRD-documented ahead of their server implementation
(404 until hai-api lands them); doc comments say so explicitly.

Validated: haiai 217 lib + 4 agreement-v2 + 12 contract tests green;
binding-core 99 tests green in both feature modes; workspace check
clean; Python adapter parity 25/25; hai repo (agent-runtime 14 suites,
hai-temporal-memory 15 suites) green against jacs 0.11.2.
… facades, parity 105->110 (CONFLICT_MEMORY_MVP_TASK_008)
Hendler added 3 commits June 13, 2026 11:30
Add sender_mail_auth fields to Rust, Python, Node, and Go EmailMessage models/parsers.

Update shared email-message contract fixtures and assertions so inbound examples carry generic sender auth evidence while outbound omissions still default false.

Verified Rust hosted/default/contract tests, focused Python and Node email tests, and Go JSON plus localhost parser tests.
Align Rust, Python, Node, Go, and native binding paths on JACS 0.11.4. Verify signed event and job-response v2 envelopes strictly, bind response data to job IDs, enforce freshness/replay semantics, propagate stable verification errors, and remove unverifiable local v1 signing fallbacks in favor of explicit JACS_TOO_OLD upgrade failures.

Preserve authenticated JACS config bytes during runtime path relocation and key rotation, add fresh native smoke coverage, and regenerate cross-language image/text fixtures with a PQ signer plus a separate signed test-only Ed25519 verifier. All languages now verify the same current signatures with explicit key directories and no unsigned or legacy compatibility flags.

Constrain npm publication to dist and bin, clean stale build output before compilation, and add a tarball smoke contract that rejects tests, source, generated JACS data, private paths, and removed entry points while requiring CJS, ESM, types, CLI, licenses, and native dependencies. Keep HAIAI licensed under BUSL-1.1.

Verified with Node 424 passed and 16 skipped, Python signing/parity 48 passed plus the fresh-native 573-test baseline, Rust library 234 passed and media contract 10 passed, full Go/CGo tests, Ruff and Rust formatting, version and lock parity, and a 95-file npm package smoke.
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