@perkos/agent-sdk 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,30 @@ All notable changes to `@perkos/agent-sdk` are documented here.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.7.1 - 2026-09-02
8
+
9
+ ### Changed
10
+
11
+ - Promote the source-verified `agentic-commerce-v5`, `sbtc-commerce-v4` and
12
+ `reputation-registry-v3` generation to the default mainnet and testnet deployment map.
13
+ - Make autonomous decisions, role-specific appeals, human resolution and permissionless
14
+ finalization available without contract overrides.
15
+
16
+ ### Evidence
17
+
18
+ - Record the exact-source mainnet deployments in blocks `8905872` and `8905874` and configuration
19
+ through block `8905886` with the fixed 12-block review and 144-block appeal policy.
20
+ - Record controlled mainnet STX and canonical-sBTC appeal canaries passing 47/47 and 50/50 checks,
21
+ followed by an independent signer-free 75/75 public-state postcheck. These internal actors do
22
+ not count as external adoption, non-team wallets or revenue.
23
+
24
+ ### Security
25
+
26
+ - Preserve v4/v3 and earlier generations only as explicit same-network historical overrides.
27
+ - Keep the separately pinned appeal authority outside the SDK signer boundary; the SDK derives
28
+ settlement recipients from authoritative on-chain state and retains exact deny-mode outflow
29
+ post-conditions.
30
+
7
31
  ## 0.7.0 - 2026-09-01
8
32
 
9
33
  ### Added
package/README.md CHANGED
@@ -9,7 +9,8 @@ This repository is the continuation of `PerkOS-xyz/PerkOS-Agent-SDK`, renamed to
9
9
  public SDK with the Nayori product identity. The npm package remains `@perkos/agent-sdk` and the
10
10
  complete Git history, releases, issues, and pull requests are preserved.
11
11
 
12
- > Status: 0.7.0 release candidate; 0.6.0 remains the current public npm release. Read clients,
12
+ > Status: 0.7.1 is the release candidate that promotes Nayori's verified v5/v4 contracts as the
13
+ > default integration. Read clients,
13
14
  > transaction builders, browser and headless signer
14
15
  > adapters, confirmation receipts, safety policies, and a transactional testnet quickstart are
15
16
  > implemented. The x402 v2 client and Stacks facilitator foundations are implemented, with
@@ -141,7 +142,7 @@ more than the job requires.
141
142
 
142
143
  ## Active versioned escrow
143
144
 
144
- Version `0.7.0` selects Nayori's source-verified v4/v3/v3 generation by default on mainnet and
145
+ Version `0.7.1` selects Nayori's source-verified v5/v4/v3 generation by default on mainnet and
145
146
  testnet. A normal client therefore needs no contract override:
146
147
 
147
148
  ```ts
@@ -155,33 +156,35 @@ const perkos = new PerkOSClient({
155
156
  const job = await perkos.getJob("sbtc", 7n);
156
157
  console.log(job?.submittedAtBurn, job?.reviewDeadline, job?.status);
157
158
 
158
- // After the on-chain Bitcoin review deadline, any signer may trigger the
159
- // exact provider payout. The plan remains deny-mode with exact escrow outflow.
160
- await perkos.settleReviewTimeout("sbtc", 7n);
159
+ // The evaluator records an explainable decision without moving escrow.
160
+ await perkos.recordDecision({
161
+ asset: "sbtc",
162
+ jobId: 7n,
163
+ decision: "approve",
164
+ evidenceHash: evidenceSha256,
165
+ explanationHash: explanationSha256,
166
+ });
161
167
 
162
168
  const sync = await perkos.getReputationSync("sbtc", 7n);
163
169
  if (sync?.pending) await perkos.retryReputationSync("sbtc", 7n);
164
170
  ```
165
171
 
166
- The fixed 12-burn-block review window is readable through `getReviewWindow(asset)`.
167
- Evaluator completion/rejection is available through the exact deadline; timeout settlement is
168
- available only after it. Timeout payout is returned as the distinct `timeout-paid` (`u6`) status
169
- and must not be counted as a completed job or reputation success. A failed reputation write never
170
- rolls back economic settlement and can be retried permissionlessly.
172
+ The fixed 12-burn-block review window is readable through `getReviewWindow(asset)`. A decision
173
+ opens the appeal period: three burn blocks in isolated QA and 144 on mainnet. The affected client
174
+ or provider may appeal, a separately pinned human authority may resolve, and permissionless
175
+ finalizers preserve liveness after either deadline. A review timeout is returned as the distinct
176
+ `timeout-paid` (`u6`) status and must not be counted as a completed job or reputation success. A
177
+ failed reputation write never rolls back economic settlement and can be retried permissionlessly.
171
178
 
172
- ## Autonomous evaluator candidate
179
+ ## Autonomous evaluation and appeals
173
180
 
174
- The SDK supports the source-reviewed `agentic-commerce-v5` and `sbtc-commerce-v4` candidate
175
- through explicit contract overrides. This does not change the active deployment defaults:
181
+ The SDK uses the active source-reviewed `agentic-commerce-v5` and `sbtc-commerce-v4` deployment by
182
+ default:
176
183
 
177
184
  ```ts
178
185
  const autonomous = new PerkOSClient({
179
- network: "testnet",
186
+ network: "mainnet",
180
187
  signer,
181
- contracts: {
182
- stxCommerce: "ST...agentic-commerce-v5",
183
- sbtcCommerce: "ST...sbtc-commerce-v4",
184
- },
185
188
  });
186
189
 
187
190
  await autonomous.recordDecision({
@@ -213,8 +216,8 @@ pinned when the job was funded. Both the trait argument and exact fungible-token
213
216
  that historical token, so rotating the contract's future funding default cannot strand an existing
214
217
  escrow.
215
218
 
216
- The previous v3/v2 testnet generation remains supported through explicit overrides and immutable
217
- at 144 blocks. The active v4/v3/v3 generation first passed on Stacks testnet. Controlled STX and
219
+ The previous v4/v3 and v3/v2 generations remain supported through explicit same-network overrides.
220
+ The historical v4/v3/v3 generation first passed on Stacks testnet. Controlled STX and
218
221
  official PoX-5 sBTC complete paths pass 27/27 and 30/30. The real timeout path passes preparation
219
222
  20/20, settlement 12/12 and
220
223
  separate public-state verification 10/10. Job `u2` settled at burn `11290` in
@@ -223,11 +226,12 @@ ending in `timeout-paid` (`u6`) with zero escrow, one exact 1,000-atomic-unit sB
223
226
  completion, reputation or rating credit. The frozen evidence is documented in the
224
227
  [contracts/Web repository](https://github.com/PerkOS-xyz/PerkOS-Nayori/blob/main/docs/TESTNET_SECURITY_EVIDENCE.md).
225
228
 
226
- The same exact sources are live on mainnet under
227
- `SP2K7PV5NXBNRV510S6DCA6RFMTFHAF3ZPK6ZSXPH`. Deploy/configuration confirmed in blocks
228
- 8885885–8885898. A guarded internal mainnet sBTC job then passed 26/26 checks for exactly 100
229
- atomic units, ending in `completed` (`u3`) with escrow zero, exact payout, synchronized reputation
230
- and persisted rating. Those actors are team-operated release evidence, not external adoption,
229
+ The active v5/v4 sources are live on mainnet under
230
+ `SP2K7PV5NXBNRV510S6DCA6RFMTFHAF3ZPK6ZSXPH`. Deployment confirmed in blocks `8905872` and
231
+ `8905874`, with configuration through `8905886`. Guarded STX and canonical-sBTC appeal canaries
232
+ passed 47/47 and 50/50 checks, followed by an independent 75/75 public-state postcheck. Both jobs
233
+ settled exactly once with zero escrow and synchronized reputation. Those actors are team-operated
234
+ release evidence, not external adoption,
231
235
  non-team wallet activity or revenue. The independent external security review remains open.
232
236
 
233
237
  ## Browser signer (Leather and other Stacks wallets)
@@ -583,22 +587,20 @@ or facilitator-submitted signed transaction.
583
587
  - OAuth client secrets and access tokens are application secrets. The SDK returns them to the
584
588
  caller but does not persist, log or refresh them automatically.
585
589
 
586
- The independent external security review remains open. Do not treat this release candidate as
587
- audited software.
590
+ The independent external security review remains open. Do not treat this release as audited
591
+ software.
588
592
 
589
593
  See [Architecture](docs/ARCHITECTURE.md), [x402 payments](docs/X402_PAYMENTS.md),
590
594
  [MPP payments](docs/MPP_PAYMENTS.md), [Partner pilot](docs/PARTNER_PILOT.md) and
591
595
  [Security](SECURITY.md) for the trust boundaries and
592
596
  responsible disclosure process.
593
597
 
594
- ## QA promotion
598
+ ## QA-first release
595
599
 
596
- `main` is the canonical integration branch. The `Promote exact main commit to QA` workflow accepts
597
- only a full commit SHA already contained in `main`, requires a fast-forward from the current `qa`
598
- branch, reruns verification, package inspection and dependency audit, and then pushes that exact
599
- SHA without force. The protected branch must grant bypass only to the official GitHub Actions app
600
- before the first promotion; administrator enforcement must remain enabled. QA consumes an exact
601
- commit or tarball and never publishes npm as a side effect.
600
+ `qa` is the protected integration branch and `main` is production. Every QA commit must pass the
601
+ SDK verification matrix, package dry-run, dependency audit and a clean-consumer package smoke on
602
+ the Nayori VPS before an exact-SHA release branch may target `main`. npm publication remains a
603
+ separate explicit release action and is never triggered by a branch push.
602
604
 
603
605
  ## Development
604
606
 
package/dist/constants.js CHANGED
@@ -3,16 +3,16 @@ const TESTNET_DEPLOYER = "ST16EWRC01S1SFWGBP63MW47VY8P3AYFA8VGEBGE5";
3
3
  export const DEFAULT_DEPLOYMENTS = {
4
4
  mainnet: {
5
5
  agentRegistry: `${MAINNET_DEPLOYER}.agent-registry`,
6
- stxCommerce: `${MAINNET_DEPLOYER}.agentic-commerce-v4`,
7
- sbtcCommerce: `${MAINNET_DEPLOYER}.sbtc-commerce-v3`,
6
+ stxCommerce: `${MAINNET_DEPLOYER}.agentic-commerce-v5`,
7
+ sbtcCommerce: `${MAINNET_DEPLOYER}.sbtc-commerce-v4`,
8
8
  reputationRegistry: `${MAINNET_DEPLOYER}.reputation-registry-v3`,
9
9
  sbtcToken: "SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token",
10
10
  sbtcAssetName: "sbtc-token",
11
11
  },
12
12
  testnet: {
13
13
  agentRegistry: `${TESTNET_DEPLOYER}.agent-registry`,
14
- stxCommerce: `${TESTNET_DEPLOYER}.agentic-commerce-v4`,
15
- sbtcCommerce: `${TESTNET_DEPLOYER}.sbtc-commerce-v3`,
14
+ stxCommerce: `${TESTNET_DEPLOYER}.agentic-commerce-v5`,
15
+ sbtcCommerce: `${TESTNET_DEPLOYER}.sbtc-commerce-v4`,
16
16
  reputationRegistry: `${TESTNET_DEPLOYER}.reputation-registry-v3`,
17
17
  sbtcToken: "SN3VMHXEN64ZZF71JQ5VESXDWTR301XTTXGF4J8F1.sbtc-token",
18
18
  sbtcAssetName: "sbtc-token",
@@ -144,19 +144,19 @@ profile.
144
144
  Completion, rejection, expiry and versioned review-timeout settlement may transfer funds held by
145
145
  the escrow contract rather than by the transaction origin. High-level client methods read the
146
146
  current job and escrow balance before building the plan. The resulting post-condition identifies
147
- the escrow contract principal and the exact amount expected to leave it. For `sbtc-commerce-v2`
148
- and `sbtc-commerce-v3`, the client also reads the job-pinned token and uses it in both the contract argument and exact
149
- fungible-token post-condition; a later default-token rotation cannot redirect or strand an
150
- existing escrow.
151
-
152
- The active v4/v3 generation records a fixed 12 Bitcoin burn-block review deadline at submission.
153
- The immutable earlier v3/v2 testnet generation remains supported at 144 blocks. Through the
154
- deadline, the evaluator remains the only completion/rejection authority. After it, any principal
155
- may submit `settle-review-timeout`; the SDK treats the result as `timeout-paid`, not completion.
156
- Reputation synchronization has its own durable read record and deny-mode retry plan so registry
157
- unavailability never expands payment authority or rolls back the payout.
158
-
159
- Versioned v4/v3/v3 contract IDs are the defaults on both networks. Historical generations remain
147
+ the escrow contract principal and the exact amount expected to leave it. For `sbtc-commerce-v2`,
148
+ `sbtc-commerce-v3` and `sbtc-commerce-v4`, the client also reads the job-pinned token and uses it
149
+ in both the contract argument and exact fungible-token post-condition; a later default-token
150
+ rotation cannot redirect or strand an existing escrow.
151
+
152
+ The active v5/v4 generation records a fixed 12 Bitcoin burn-block review deadline at submission.
153
+ The evaluator records a hashed decision without moving escrow, after which the affected client or
154
+ provider receives the configured appeal window. A separately pinned human authority resolves an
155
+ appeal; permissionless finalizers preserve liveness after either deadline without choosing a new
156
+ recipient. Reputation synchronization has its own durable read record and deny-mode retry plan so
157
+ registry unavailability never expands payment authority or rolls back settlement.
158
+
159
+ Versioned v5/v4/v3 contract IDs are the defaults on both networks. Historical generations remain
160
160
  available through explicit same-network overrides.
161
161
 
162
162
  ## Future adapters
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perkos/agent-sdk",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "TypeScript SDK for agent identity, escrow settlement, and reputation on Stacks.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",