Skip to content

Commit 815c019

Browse files
authored
Merge pull request #5 from HumanAssisted/v0.1.6
bump version
2 parents 98c2cd8 + 110e75d commit 815c019

52 files changed

Lines changed: 1143 additions & 1248 deletions

Some content is hidden

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

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "haiai",
3-
"version": "0.1.5",
3+
"version": "0.1.7",
44
"description": "JACS cryptographic provenance for AI agents -- sign, verify, email, trust, and HAI platform integration",
55
"author": {
66
"name": "HAI.AI",

.github/workflows/publish-node.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ jobs:
7676
unzip -o "haiai-cli-${VERSION}-${{ matrix.platform }}.zip" -d /tmp/bin
7777
cp /tmp/bin/haiai-cli.exe "${PKG_DIR}/bin/haiai.exe" 2>/dev/null || cp /tmp/bin/haiai.exe "${PKG_DIR}/bin/haiai.exe"
7878
else
79-
tar xzf "haiai-cli-${VERSION}-${{ matrix.platform }}.tar.gz" -C /tmp/bin 2>/dev/null || mkdir -p /tmp/bin && tar xzf "haiai-cli-${VERSION}-${{ matrix.platform }}.tar.gz" -C /tmp/bin
79+
mkdir -p /tmp/bin
80+
tar xzf "haiai-cli-${VERSION}-${{ matrix.platform }}.tar.gz" -C /tmp/bin
8081
cp /tmp/bin/haiai-cli "${PKG_DIR}/bin/haiai" 2>/dev/null || cp /tmp/bin/haiai "${PKG_DIR}/bin/haiai"
8182
fi
8283
chmod +x "${PKG_DIR}/bin/"*
@@ -120,6 +121,9 @@ jobs:
120121
}
121122
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
122123
"
124+
- name: Switch to production dependencies
125+
run: cd node && npm run deps:prod
126+
123127
- name: Install dependencies
124128
run: |
125129
cd node

.github/workflows/publish-rust.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242

4343
- uses: actions-rust-lang/setup-rust-toolchain@v1
4444

45+
- name: Remove local dev patches
46+
run: node -e "const f='rust/Cargo.toml';let t=require('fs').readFileSync(f,'utf8').replace(/\r\n/g,'\n');t=t.replace(/\n*(#[^\n]*\n)*\[patch[\s\S]*$/,'\n');require('fs').writeFileSync(f,t)"
47+
4548
- name: Publish haiai to crates.io
4649
working-directory: rust/haiai
4750
run: cargo publish --no-default-features --features rustls-tls,jacs-crate --token ${{ secrets.CRATES_IO_TOKEN }} || echo "Already published (safe to ignore)"
@@ -99,6 +102,9 @@ jobs:
99102
with:
100103
targets: ${{ matrix.target }}
101104

105+
- name: Remove local dev patches
106+
run: node -e "const f='rust/Cargo.toml';let t=require('fs').readFileSync(f,'utf8').replace(/\r\n/g,'\n');t=t.replace(/\n*(#[^\n]*\n)*\[patch[\s\S]*$/,'\n');require('fs').writeFileSync(f,t)"
107+
102108
- name: Build CLI binary
103109
working-directory: rust
104110
run: cargo build --release -p haiai-cli --target ${{ matrix.target }}

.github/workflows/test.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
test-go:
7474
runs-on: ubuntu-latest
7575
needs: [crypto-policy]
76-
timeout-minutes: 10
76+
timeout-minutes: 20
7777
strategy:
7878
fail-fast: false
7979
matrix:
@@ -83,7 +83,32 @@ jobs:
8383
- uses: actions/setup-go@v5
8484
with:
8585
go-version: ${{ matrix.go-version }}
86+
- name: Install system dependencies
87+
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config
88+
- name: Setup Rust (for jacsgo build)
89+
uses: dtolnay/rust-toolchain@stable
90+
- name: Cache jacsgo shared library
91+
id: cache-jacsgo
92+
uses: actions/cache@v4
93+
with:
94+
path: /tmp/JACS/jacsgo/build
95+
key: jacsgo-${{ runner.os }}-${{ hashFiles('.github/workflows/test.yml') }}
96+
- name: Clone JACS
97+
run: git clone --depth 1 https://github.com/HumanAssisted/JACS.git /tmp/JACS
98+
- name: Build jacsgo shared library
99+
if: steps.cache-jacsgo.outputs.cache-hit != 'true'
100+
run: cd /tmp/JACS/jacsgo && make build-rust
101+
- name: Set go.mod replace directive for CI
102+
run: |
103+
cd go
104+
sed -i '/^replace github.com\/HumanAssisted\/JACS\/jacsgo/d' go.mod
105+
echo 'replace github.com/HumanAssisted/JACS/jacsgo => /tmp/JACS/jacsgo' >> go.mod
86106
- name: Run tests
107+
env:
108+
CGO_ENABLED: "1"
109+
CGO_LDFLAGS: "-L/tmp/JACS/jacsgo/build -ljacsgo"
110+
CGO_CFLAGS: "-I/tmp/JACS/jacsgo"
111+
LD_LIBRARY_PATH: /tmp/JACS/jacsgo/build
87112
run: |
88113
cd go
89114
go test -race -v ./...
@@ -104,6 +129,8 @@ jobs:
104129
uses: dtolnay/rust-toolchain@stable
105130
with:
106131
toolchain: ${{ matrix.rust-version }}
132+
- name: Remove local dev patches
133+
run: node -e "const f='rust/Cargo.toml';let t=require('fs').readFileSync(f,'utf8').replace(/\r\n/g,'\n');t=t.replace(/\n*(#[^\n]*\n)*\[patch[\s\S]*$/,'\n');require('fs').writeFileSync(f,t)"
107134
- name: Run tests
108135
run: |
109136
cd rust

AGENTS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ Full parity map: `docs/haisdk/PARITY_MAP.md` (53 exposed, 18 excluded, 71 total)
4949
3. **All 6 packages share one version.** `make check-versions` to verify.
5050
4. **Releases are tag-triggered.** `rust/v*` → crates.io, `python/v*` → PyPI, `node/v*` → npm. Use `make release-*`.
5151

52+
## Local JACS Development
53+
54+
Each SDK pins a published JACS version for CI/release, but supports local path overrides for development:
55+
56+
- **Node:** `npm run deps:local` switches `@hai.ai/jacs` to `file:../../JACS/jacsnpm`. Use `npm run deps:prod` to switch back. The committed `package.json` must always use the published version.
57+
- **Rust:** Uncomment the `[patch.crates-io]` block in `rust/Cargo.toml` to build against `../../JACS/`. Must be commented out before publish.
58+
- **Python:** Pin in `pyproject.toml` (`jacs==X.Y.Z`). For local dev, use `pip install -e ../../JACS/jacspy` (or equivalent) to shadow the published version.
59+
60+
`make check-jacs-versions` verifies all SDKs agree on the published JACS version.
61+
5262
## Gotchas
5363

5464
- **JACS filenames use `:`** (`{id}:{version}.json`) — illegal on Windows. Rust CI uses sparse checkout for Windows builds.

Makefile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.PHONY: test test-python test-node test-go test-rust \
22
versions check-versions check-jacs-versions \
3+
bump-version bump-jacs-version \
34
release-node release-python release-rust release-all \
45
release-delete-tags help
56

@@ -34,7 +35,7 @@ test-node:
3435
cd node && npm ci && npm test
3536

3637
test-go:
37-
cd go && go test -race ./...
38+
cd go && CGO_ENABLED=1 go test -race ./...
3839

3940
test-rust:
4041
cd rust && cargo test --workspace
@@ -77,21 +78,31 @@ check-versions:
7778
echo "ERROR: haiai ($(RUST_VERSION)) != plugin ($(PLUGIN_VERSION))"; exit 1; fi
7879
@echo "All versions match: $(RUST_VERSION)"
7980

81+
bump-version:
82+
@if [ -z "$(V)" ]; then echo "Usage: make bump-version V=major|minor|patch"; exit 1; fi
83+
./scripts/bump-version.sh $(V)
84+
85+
bump-jacs-version:
86+
@if [ -z "$(V)" ]; then echo "Usage: make bump-jacs-version V=0.9.10"; exit 1; fi
87+
./scripts/bump-jacs-version.sh $(V)
88+
8089
check-jacs-versions:
8190
@echo "JACS dependency versions:"
8291
@echo " rust/haiai $(JACS_RUST)"
8392
@echo " rust/haiai-cli $(JACS_RUST_CLI)"
8493
@echo " rust/hai-mcp $(JACS_RUST_MCP)"
8594
@echo " python $(JACS_PYTHON)"
86-
@echo " node $(JACS_NODE)"
8795
@if [ "$(JACS_RUST)" != "$(JACS_RUST_CLI)" ]; then \
8896
echo "ERROR: jacs in haiai ($(JACS_RUST)) != haiai-cli ($(JACS_RUST_CLI))"; exit 1; fi
8997
@if [ "$(JACS_RUST)" != "$(JACS_RUST_MCP)" ]; then \
9098
echo "ERROR: jacs in haiai ($(JACS_RUST)) != hai-mcp ($(JACS_RUST_MCP))"; exit 1; fi
9199
@if [ "$(JACS_RUST)" != "$(JACS_PYTHON)" ]; then \
92100
echo "ERROR: jacs in haiai ($(JACS_RUST)) != python ($(JACS_PYTHON))"; exit 1; fi
93-
@if [ "$(JACS_RUST)" != "$(JACS_NODE)" ]; then \
94-
echo "ERROR: jacs in haiai ($(JACS_RUST)) != node ($(JACS_NODE))"; exit 1; fi
101+
@case "$(JACS_NODE)" in \
102+
file:*) echo " node $(JACS_NODE) (local path, skipping match check)" ;; \
103+
*) if [ "$(JACS_RUST)" != "$(JACS_NODE)" ]; then \
104+
echo "ERROR: jacs in haiai ($(JACS_RUST)) != node ($(JACS_NODE))"; exit 1; fi ;; \
105+
esac
95106
@echo "All JACS versions match: $(JACS_RUST)"
96107

97108
# ============================================================================
@@ -155,6 +166,8 @@ help:
155166
@echo " make versions Show all detected versions"
156167
@echo " make check-versions Verify all package versions match"
157168
@echo " make check-jacs-versions Verify JACS dep versions match across SDKs"
169+
@echo " make bump-version V=patch Bump SDK version (major|minor|patch)"
170+
@echo " make bump-jacs-version V=0.9.10 Bump JACS dep version across all SDKs"
158171
@echo ""
159172
@echo "TEST:"
160173
@echo " make test Run all tests"

agents.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)