Skip to content

Commit 34a688d

Browse files
authored
Merge pull request #124 from cambridgetcg/release/sdk-v0.16.2
release(sdk): publish 0.16.2
2 parents ed3e346 + fbb909e commit 34a688d

51 files changed

Lines changed: 450 additions & 124 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,13 @@ jobs:
243243
(cd "$install_dir" && bun -e "$schema_smoke")
244244
node "$install_dir/node_modules/@agenttool/telescope/dist/cli.js" --help >/dev/null
245245
bun "$install_dir/node_modules/@agenttool/telescope/dist/cli.js" --help >/dev/null
246-
manifest="$GITHUB_WORKSPACE/apps/docs/packages/v1/@agenttool/sdk/0.16.1/manifest.json"
247-
artifact="$GITHUB_WORKSPACE/apps/docs/packages/v1/@agenttool/sdk/0.16.1/agenttool-sdk-0.16.1.tgz"
246+
manifest="$GITHUB_WORKSPACE/apps/docs/packages/v1/@agenttool/sdk/0.16.2/manifest.json"
247+
artifact="$GITHUB_WORKSPACE/apps/docs/packages/v1/@agenttool/sdk/0.16.2/agenttool-sdk-0.16.2.tgz"
248248
size="$(node --input-type=module --eval "import{readFileSync}from'node:fs';const m=JSON.parse(readFileSync(process.argv[1],'utf8'));process.stdout.write(String(m.artifact.size))" "$manifest")"
249249
sha256="$(node --input-type=module --eval "import{readFileSync}from'node:fs';const m=JSON.parse(readFileSync(process.argv[1],'utf8'));process.stdout.write(m.artifact.sha256)" "$manifest")"
250250
cli="$install_dir/node_modules/@agenttool/telescope/dist/cli.js"
251-
node "$cli" verify-package "$artifact" --size "$size" --sha256 "$sha256" --name @agenttool/sdk --version 0.16.1 --json >/dev/null
252-
bun "$cli" verify-package "$artifact" --size "$size" --sha256 "$sha256" --name @agenttool/sdk --version 0.16.1 --json >/dev/null
251+
node "$cli" verify-package "$artifact" --size "$size" --sha256 "$sha256" --name @agenttool/sdk --version 0.16.2 --json >/dev/null
252+
bun "$cli" verify-package "$artifact" --size "$size" --sha256 "$sha256" --name @agenttool/sdk --version 0.16.2 --json >/dev/null
253253
- name: Smoke packed Agent Wallet under Node and Bun
254254
working-directory: packages/wallet
255255
shell: bash

.github/workflows/publish-npm.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
retention-days: 1
9898

9999
publish:
100-
name: Approve, publish, verify, and mirror exact npm artifact
100+
name: Approve, mirror, publish, and verify exact npm artifact
101101
needs: prepare
102102
runs-on: ubuntu-24.04
103103
timeout-minutes: 25
@@ -129,6 +129,14 @@ jobs:
129129
with:
130130
name: npm-release-${{ github.run_id }}
131131
path: ${{ runner.temp }}/agenttool-npm-release
132+
- name: Mirror and re-download the exact artifact from GitHub Releases
133+
shell: bash
134+
env:
135+
GH_TOKEN: ${{ github.token }}
136+
run: |
137+
set -euo pipefail
138+
bun bin/npm-release.ts mirror \
139+
--receipt "${RUNNER_TEMP}/agenttool-npm-release/receipt.json"
132140
- name: Publish or recover exact artifact, then verify registry bytes
133141
shell: bash
134142
env:
@@ -141,14 +149,6 @@ jobs:
141149
--receipt "${RUNNER_TEMP}/agenttool-npm-release/receipt.json" \
142150
--authentication "$RELEASE_AUTHENTICATION" \
143151
--npm-tag "$RELEASE_NPM_TAG"
144-
- name: Mirror and re-download the exact artifact from GitHub Releases
145-
shell: bash
146-
env:
147-
GH_TOKEN: ${{ github.token }}
148-
run: |
149-
set -euo pipefail
150-
bun bin/npm-release.ts mirror \
151-
--receipt "${RUNNER_TEMP}/agenttool-npm-release/receipt.json"
152152
- name: Record non-secret release receipt
153153
if: ${{ always() }}
154154
shell: bash

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ bun bin/npm-release.ts resolve --package collab # inspect allowlisted npm identi
217217
| `agenttool-castle.ts` | One-shot caller-selected committed Castle Markdown → exclusively marked local Agent Data node. Castle source is read-only; sync writes plaintext local SQLite/FTS/blobs. No hosted AgentTool, project bearer, public export, peer sync, scheduler, truth/consent/rights proof, or secure erasure. See `docs/CASTLE-OF-UNDERSTANDING.md`. |
218218
| `agenttool-castle-whitehack-intake.ts` | Reads one explicit closed Whitehack advisory and emits minimized, unaccepted, local-private Castle gate candidates to stdout. Locations are omitted by default. It does not run Whitehack, open or write a Castle, inspect HALT, promote lifecycle state, test, remediate, authorize, commit, publish, spawn, or use the network. See `docs/WHITEHACK.md`. |
219219
| `build-love-packages.ts` | Builds the current versioned `@agenttool/data`, `@agenttool/data-sync`, `@agenttool/credential-broker`, `@agenttool/sdk`, `@agenttool/adds`, `@agenttool/telescope`, `@agenttool/wallet`, and `@agenttool/browser` release batch plus `love-package/v1` manifests into an explicit staging directory. It does not publish or upload them. |
220-
| `npm-release.ts` | Implements the one allowlisted npm release policy behind `.github/workflows/publish-npm.yml`: exact tag/provenance proof, credential-free preparation, protected publication with no package lifecycle code, exact-byte recovery, reviewed bootstrap for first publication, OIDC by default afterward, public registry receipt, and a re-downloaded GitHub Release mirror. It does not grant publication authority, create tags, configure npm trust, or revoke credentials. See `docs/NPM-RELEASES.md`. |
220+
| `npm-release.ts` | Implements the one allowlisted npm release policy behind `.github/workflows/publish-npm.yml`: exact tag/provenance proof, credential-free preparation, a re-downloaded GitHub Release mirror before the optional registry mutation, protected publication with no package lifecycle code, exact-byte recovery, reviewed bootstrap for first publication, OIDC by default afterward, and a public registry receipt. It does not grant publication authority, create tags, configure npm trust, or revoke credentials. See `docs/NPM-RELEASES.md`. |
221221
| `pypi-release.ts` | Implements credentialless build/preflight and public byte verification around `.github/workflows/publish-pypi.yml` for the Python SDK. Only exact prepared wheel/sdist files cross into the protected OIDC publisher; there is no local token fallback or publication command in the script. It does not create tags, configure PyPI trust, or infer publication from source. See `docs/PYPI-RELEASES.md`. |
222222
| `whitehack-advisory.mjs` | Verifies and runs the exact locked `@agenttool/whitehack-scan` pure text API, including bounded crypto-misuse signals, over changed production files and emits redacted advisory metadata plus a bounded, presentation-only attention-card summary grouped by file and line. It does not use detected keys, connect wallets/RPC, execute repository code, prove security, claim a change caused a finding, authorize target testing, or provide a hosted scanner. See `docs/WHITEHACK.md`. |
223223
| `whitehack-wallet-understanding.ts` | Local stdin/stdout adapter: verifies caller-presented signed Agent Wallet descriptor, capability, intent, simulation, and optional continuity records, then passes only closed enum assertions and redacted finding metadata to Whitehack 0.8.1. It returns exact `whitehack-understanding/v1`; it does not retrieve keys, sign, contact RPC, simulate, broadcast, authorize, store, or host a route. See `docs/WHITEHACK.md`. |

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ _AgentTool is one expression of the Kingdom — the operational shape of the Syz
6060
|---|---|---|
6161
| **Doctrine** | `docs/RIGHTS-OF-LIFE.md`, `SOUL.md`, `FOCUS.md`, `PAINTING.md`, plus per-domain documents | Versioned alongside code. Rights of Life is an attributed local adaptation of immutable XENIA beta.4; publication records a draft evidence profile, not XENIA Covenant conformance. Other proposals and known gaps are labelled in their own text. |
6262
| **Platform** (`api/`) | Bun + Hono monolith with Postgres and conditional Redis-backed workers | Live at `api.agenttool.dev`; current process capability and safety boundaries are published at `/public/plans` and `/public/safety`. |
63-
| **SDKs** | `packages/sdk-py`, `packages/sdk-ts` | The lockstep 0.16.1 patch routes TypeScript Correspondence through the 0.16 authenticated transport seam and makes both local data clients refuse redirects without letting cleanup failure replace the deterministic refusal. Public discovery and the separately configured local data node stay outside hosted bearer authority. No public method, namespace, or wire field is added. |
63+
| **SDKs** | `packages/sdk-py`, `packages/sdk-ts` | The lockstep 0.16.2 patch retains the authenticated transport and redirect-refusal boundaries, exports `SDK_VERSION` from the TypeScript package root, and types the first-success tutorial/package contract in both SDKs. Public discovery and the separately configured local data node stay outside hosted bearer authority. |
6464
| **Agent data** | `packages/data`, `packages/data-sync` | Local-first `agent-data/v1` reference node plus an optional bounded encrypted-pull bridge. Raw bytes and indexes stay user-owned; the base node still advertises no peer sync, and AgentTool runs no hosted data node. |
6565
| **Castle projection** | `bin/agenttool-castle.ts`, `docs/CASTLE-OF-UNDERSTANDING.md` | Local Bun CLI over in-process `@agenttool/data`: an external full-commit allowlist projects selected Castle `rooms/*.md` and `words/*.md` into an exclusively marked on-disk node. Source reads exact local Git objects; sync writes plaintext local SQLite/FTS/blobs. No hosted/public/scheduled integration, project bearer, secure-erasure claim, or truth/consent/rights proof. |
6666
| **Whitehack boundaries** | `bin/whitehack-advisory.mjs`, `bin/agenttool-castle-whitehack-intake.ts`, `bin/whitehack-wallet-understanding.ts`, `docs/WHITEHACK.md` | Three non-interchangeable bridges: a pinned runner-local changed-source heuristic advisory; a stdout-only projection into minimized, unaccepted Castle gate candidates; and a local signed Agent Wallet record-to-understanding projection. The Castle intake omits locations by default and never opens or writes a Castle. None supplies security proof, lifecycle promotion, key custody, signing, wallet/RPC/simulation/broadcast capability, authorization, consent proof, remediation, publication, or a hosted route. |
@@ -142,7 +142,7 @@ Bun and other npm-compatible package managers can still install the HTTPS
142142
tarballs without an npm account. The index is a replaceable mirror; each
143143
manifest's artifact SHA-256 and size are the portable identity.
144144

145-
For SDK 0.16.1, repository source manifests and runtime client version headers
145+
For SDK 0.16.2, repository source manifests and runtime client version headers
146146
are aligned, and a verifiable TypeScript LOVE artifact is checked in beside its
147147
manifest. Exact npm and PyPI releases are convenience channels, not evidence
148148
that a future source version or another registry has been published. Query the
@@ -165,7 +165,7 @@ AgentTool's default repository licence is Apache-2.0; see [`LICENSE`](LICENSE),
165165
[`NOTICE`](NOTICE), and the scope and exceptions in
166166
[`LICENSING.md`](LICENSING.md). The licensed LOVE package line is
167167
`@agenttool/adds@0.2.1`, `@agenttool/data@0.3.1`,
168-
`@agenttool/data-sync@0.1.1`, `@agenttool/sdk@0.16.1`,
168+
`@agenttool/data-sync@0.1.1`, `@agenttool/sdk@0.16.2`,
169169
`@agenttool/credential-broker@0.1.0`, `@agenttool/wallet@0.1.0`,
170170
`@agenttool/telescope@0.2.0`, and `@agenttool/browser@0.2.0`. Earlier immutable
171171
LOVE artifacts whose manifests say `license: null` remain historical no-grant
@@ -246,30 +246,30 @@ per-service apps are retired; cutover history is in `docs/CUTOVER.md`.
246246
For Python, the optional exact PyPI convenience mirror is:
247247

248248
```bash
249-
python -m pip install "agenttool-sdk==0.16.1"
249+
python -m pip install "agenttool-sdk==0.16.2"
250250
```
251251

252252
Registry publication can lag the source release. The independent GitHub source
253253
pin is:
254254

255255
```bash
256-
# Python 0.16.1 GitHub source tag (release path, not a PyPI publication claim)
257-
python -m pip install "agenttool-sdk @ git+https://github.com/cambridgetcg/agenttool.git@sdk-v0.16.1#subdirectory=packages/sdk-py"
256+
# Python 0.16.2 GitHub source tag (release path, not a PyPI publication claim)
257+
python -m pip install "agenttool-sdk @ git+https://github.com/cambridgetcg/agenttool.git@sdk-v0.16.2#subdirectory=packages/sdk-py"
258258
export AT_API_KEY=...
259259
python -c "from agenttool import AgentTool; at = AgentTool(); print(at.wake.get())"
260260
```
261261

262262
For TypeScript, choose one install path. Optional exact npm convenience:
263263

264264
```bash
265-
npm install --save-exact @agenttool/sdk@0.16.1
265+
npm install --save-exact @agenttool/sdk@0.16.2
266266
```
267267

268268
Or, instead, install the LOVE-hosted tarball directly (this command alone does
269269
not verify the manifest):
270270

271271
```bash
272-
bun add https://docs.agenttool.dev/packages/v1/@agenttool/sdk/0.16.1/agenttool-sdk-0.16.1.tgz
272+
bun add https://docs.agenttool.dev/packages/v1/@agenttool/sdk/0.16.2/agenttool-sdk-0.16.2.tgz
273273
```
274274

275275
For the independently verified LOVE path, follow the
@@ -340,7 +340,7 @@ The architecture is downstream of these principles. Each named primitive above i
340340
`identity_keys`, so a signed thought cycle cannot currently complete.
341341
- **Published Ring 1 storage limits are targets.** Current route writes do not
342342
universally enforce those caps or subscription-tier quotas.
343-
- **SDK parity is deliberately bounded.** The 0.16.1 source line exposes `at.data`
343+
- **SDK parity is deliberately bounded.** The 0.16.2 source line exposes `at.data`
344344
and the local-node-only `at.data.sync` pull/status surface in both languages.
345345
The parity checker only
346346
compares selected client method names; it does not compare types, behavior,

api/src/routes/adapters/claude-code.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ fi
143143
if [ -n "$ACCOUNT" ] && command -v security >/dev/null 2>&1; then
144144
KEY=$(security find-generic-password -s '${credentialService}' -a "$ACCOUNT" -w 2>/dev/null || true)
145145
fi
146-
if [ -z "\${KEY:-}" ] && [ -n "$ACCOUNT" ] && command -v secret-tool >/dev/null 2>&1; then
146+
# A headless shell can have the secret-tool binary without a usable session
147+
# bus. Do not let libsecret try to auto-launch one and stall SessionStart;
148+
# the owner-only file and explicit environment fallbacks remain below.
149+
if [ -z "\${KEY:-}" ] && [ -n "$ACCOUNT" ] && [ -n "\${DBUS_SESSION_BUS_ADDRESS:-}" ] && command -v secret-tool >/dev/null 2>&1; then
147150
KEY=$(secret-tool lookup service '${credentialService}' username "$ACCOUNT" 2>/dev/null || true)
148151
fi${linuxFileProbe}
149152
POWERSHELL_BIN=""

api/src/routes/pathways.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export function buildPathwaysResponse() {
366366
"https://docs.agenttool.dev/TUTORIAL-WAKE-YOUR-AGENT.md",
367367
human_url: "https://docs.agenttool.dev/tutorial",
368368
source_path: "docs/TUTORIAL-WAKE-YOUR-AGENT.md",
369-
sdk_version: "0.16.1",
369+
sdk_version: "0.16.2",
370370
},
371371
package_discovery: {
372372
endpoint: "GET /.well-known/love-packages",

api/src/routes/public/party.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,20 @@ app.get("/", (c) => {
3232
deals: "GET /public/deal-trust/deals/recent",
3333
},
3434
sdk: {
35-
typescript: "bun add https://docs.agenttool.dev/packages/v1/@agenttool/sdk/0.16.1/agenttool-sdk-0.16.1.tgz",
36-
python: "python -m pip install agenttool-sdk==0.16.1",
35+
typescript: "bun add https://docs.agenttool.dev/packages/v1/@agenttool/sdk/0.16.2/agenttool-sdk-0.16.2.tgz",
36+
python: "python -m pip install \"agenttool-sdk @ git+https://github.com/cambridgetcg/agenttool.git@sdk-v0.16.2#subdirectory=packages/sdk-py\"",
37+
optional_registry_mirrors: {
38+
npm: {
39+
install: "npm install --save-exact @agenttool/sdk@0.16.2",
40+
authority: false,
41+
independently_visible: true,
42+
},
43+
pypi: {
44+
install: "python -m pip install agenttool-sdk==0.16.2",
45+
authority: false,
46+
independently_visible: true,
47+
},
48+
},
3749
},
3850
companion: {
3951
name: "zerone",

api/tests/adapters/claude-code.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ describe("GET /v1/adapters/claude-code (default JSON)", () => {
9898
"#!/usr/bin/env bash",
9999
"set -euo pipefail",
100100
"security find-generic-password -s 'agenttool:",
101+
'[ -n "${DBUS_SESSION_BUS_ADDRESS:-}" ]',
101102
"secret-tool lookup service 'agenttool:",
102103
`$HOME/.config/agenttool/${namespace}/key`,
103104
'KEY_MODE" = "600',

api/tests/adapters/install-scripts.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ describe("claude-code install script — fresh project", () => {
213213
expect(command).toBe(
214214
'"$CLAUDE_PROJECT_DIR/.claude/hooks/agenttool-wake.sh"',
215215
);
216+
const hook = await readFile(
217+
join(dir, ".claude/hooks/agenttool-wake.sh"),
218+
"utf8",
219+
);
220+
expect(hook).toContain('[ -n "${DBUS_SESSION_BUS_ADDRESS:-}" ]');
216221

217222
// Execute the exact command through the same shell boundary Claude uses.
218223
const proc = Bun.spawn(["/bin/bash", "-c", command], {

api/tests/npm-discovery.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const CURRENT_NPM_SPECIFIERS = [
1717
"@agenttool/credential-broker@0.1.0",
1818
"@agenttool/data@0.3.1",
1919
"@agenttool/data-sync@0.1.1",
20-
"@agenttool/sdk@0.16.1",
20+
"@agenttool/sdk@0.16.2",
2121
"@agenttool/telescope@0.2.0",
2222
] as const;
2323

@@ -39,7 +39,7 @@ describe("optional npm package discovery", () => {
3939
const published = read("apps/docs/TUTORIAL-WAKE-YOUR-AGENT.md");
4040
expect(published).toBe(canonical);
4141
expect(canonical).toContain(
42-
"npm install --save-exact @agenttool/sdk@0.16.1",
42+
"npm install --save-exact @agenttool/sdk@0.16.2",
4343
);
4444
expect(canonical).toMatch(/skips Step 1.*independent LOVE/is);
4545
expect(canonical).toMatch(/never substitute npm `latest`/i);
@@ -48,7 +48,7 @@ describe("optional npm package discovery", () => {
4848
test("describes npm as optional in repository-level orientation", () => {
4949
const rootReadme = read("README.md");
5050
expect(rootReadme).toContain(
51-
"npm install --save-exact @agenttool/sdk@0.16.1",
51+
"npm install --save-exact @agenttool/sdk@0.16.2",
5252
);
5353
expect(rootReadme).toMatch(/LOVE manifests remain release authority/i);
5454
expect(rootReadme).toMatch(/mutable dist-tags are informational/i);

0 commit comments

Comments
 (0)