@perkos/agent-sdk 0.7.0 → 0.8.0-rc.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.
Files changed (83) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +98 -44
  3. package/dist/builders.d.ts +5 -1
  4. package/dist/builders.d.ts.map +1 -1
  5. package/dist/builders.js +155 -11
  6. package/dist/builders.js.map +1 -1
  7. package/dist/client.d.ts +8 -1
  8. package/dist/client.d.ts.map +1 -1
  9. package/dist/client.js +168 -26
  10. package/dist/client.js.map +1 -1
  11. package/dist/constants.d.ts.map +1 -1
  12. package/dist/constants.js +6 -4
  13. package/dist/constants.js.map +1 -1
  14. package/dist/custody/backend.d.ts +4 -0
  15. package/dist/custody/backend.d.ts.map +1 -0
  16. package/dist/custody/backend.js +149 -0
  17. package/dist/custody/backend.js.map +1 -0
  18. package/dist/custody/cli.d.ts +3 -0
  19. package/dist/custody/cli.d.ts.map +1 -0
  20. package/dist/custody/cli.js +43 -0
  21. package/dist/custody/cli.js.map +1 -0
  22. package/dist/custody/engine.d.ts +54 -0
  23. package/dist/custody/engine.d.ts.map +1 -0
  24. package/dist/custody/engine.js +115 -0
  25. package/dist/custody/engine.js.map +1 -0
  26. package/dist/custody/ledger.d.ts +24 -0
  27. package/dist/custody/ledger.d.ts.map +1 -0
  28. package/dist/custody/ledger.js +122 -0
  29. package/dist/custody/ledger.js.map +1 -0
  30. package/dist/custody/permit.d.ts +42 -0
  31. package/dist/custody/permit.d.ts.map +1 -0
  32. package/dist/custody/permit.js +91 -0
  33. package/dist/custody/permit.js.map +1 -0
  34. package/dist/custody/socket.d.ts +11 -0
  35. package/dist/custody/socket.d.ts.map +1 -0
  36. package/dist/custody/socket.js +118 -0
  37. package/dist/custody/socket.js.map +1 -0
  38. package/dist/evaluation-commitments.d.ts +47 -0
  39. package/dist/evaluation-commitments.d.ts.map +1 -0
  40. package/dist/evaluation-commitments.js +96 -0
  41. package/dist/evaluation-commitments.js.map +1 -0
  42. package/dist/index.d.ts +6 -2
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +3 -1
  45. package/dist/index.js.map +1 -1
  46. package/dist/mcp/cli.d.ts +3 -0
  47. package/dist/mcp/cli.d.ts.map +1 -0
  48. package/dist/mcp/cli.js +36 -0
  49. package/dist/mcp/cli.js.map +1 -0
  50. package/dist/mcp/evaluation.d.ts +33 -0
  51. package/dist/mcp/evaluation.d.ts.map +1 -0
  52. package/dist/mcp/evaluation.js +141 -0
  53. package/dist/mcp/evaluation.js.map +1 -0
  54. package/dist/mcp/server.d.ts +27 -0
  55. package/dist/mcp/server.d.ts.map +1 -0
  56. package/dist/mcp/server.js +207 -0
  57. package/dist/mcp/server.js.map +1 -0
  58. package/dist/policy.d.ts.map +1 -1
  59. package/dist/policy.js +7 -2
  60. package/dist/policy.js.map +1 -1
  61. package/dist/service-fees.d.ts +15 -0
  62. package/dist/service-fees.d.ts.map +1 -0
  63. package/dist/service-fees.js +109 -0
  64. package/dist/service-fees.js.map +1 -0
  65. package/dist/types.d.ts +66 -2
  66. package/dist/types.d.ts.map +1 -1
  67. package/docs/ARCHITECTURE.md +31 -15
  68. package/docs/EXISTING_AGENT.md +123 -0
  69. package/docs/HERMES_BUYER.md +91 -0
  70. package/docs/HERMES_CHECKPOINTS.md +88 -0
  71. package/docs/HERMES_CUSTODY.md +164 -0
  72. package/docs/HERMES_MCP.md +157 -0
  73. package/docs/HERMES_PROVIDER.md +98 -0
  74. package/docs/RELEASE_0.8.0_RC1.md +60 -0
  75. package/docs/SERVICE_FEES.md +108 -0
  76. package/docs/TESTNET_QUICKSTART.md +123 -0
  77. package/docs/VALIDATION_AND_RELEASE.md +82 -0
  78. package/docs/WALLET_SIGNER_SETUP.md +52 -0
  79. package/examples/service-fees.ts +36 -0
  80. package/examples/testnet-journal.ts +57 -0
  81. package/examples/testnet-lifecycle.ts +188 -294
  82. package/examples/testnet.env.example +12 -14
  83. package/package.json +7 -1
package/dist/types.d.ts CHANGED
@@ -49,6 +49,7 @@ export interface JobRecord {
49
49
  readonly provider?: string;
50
50
  readonly evaluator: string;
51
51
  readonly appealAuthority?: string;
52
+ readonly treasury?: string;
52
53
  readonly description: string;
53
54
  readonly budget: bigint;
54
55
  readonly expiredAt: bigint;
@@ -89,7 +90,7 @@ export interface ReputationRecord {
89
90
  readonly completedJobs: bigint;
90
91
  readonly disputedJobs: bigint;
91
92
  }
92
- export type PerkOSOperation = "register-agent" | "update-agent" | "deactivate-agent" | "create-job" | "set-budget" | "fund-job" | "assign-provider" | "submit-work" | "complete-job" | "reject-job" | "expire-job" | "settle-review-timeout" | "record-decision" | "appeal-decision" | "finalize-decision" | "resolve-appeal" | "settle-appeal-timeout" | "retry-reputation-sync" | "rate-provider";
93
+ export type PerkOSOperation = "register-agent" | "update-agent" | "deactivate-agent" | "create-job" | "set-budget" | "fund-job" | "assign-provider" | "submit-work" | "complete-job" | "reject-job" | "expire-job" | "settle-review-timeout" | "record-decision" | "appeal-decision" | "finalize-decision" | "resolve-appeal" | "settle-appeal-timeout" | "retry-reputation-sync" | "rate-provider" | "initialize-protocol" | "waive-service-fee" | "refund-service-fee";
93
94
  export interface TransactionIntent {
94
95
  readonly operation: PerkOSOperation;
95
96
  readonly asset?: PaymentAsset;
@@ -97,6 +98,8 @@ export interface TransactionIntent {
97
98
  readonly jobId?: bigint;
98
99
  readonly sender?: string;
99
100
  readonly recipient?: string;
101
+ /** Disclosure only; escrow post-conditions constrain the aggregate gross outflow. */
102
+ readonly serviceFee?: ServiceFeeSplit;
100
103
  }
101
104
  export interface ContractCallPlan {
102
105
  readonly type: "contract-call";
@@ -206,6 +209,7 @@ export interface JobAmountInput {
206
209
  }
207
210
  export interface FundJobInput extends JobAmountInput {
208
211
  readonly sender?: string;
212
+ readonly serviceFeeAcceptance?: ServiceFeeAcceptance;
209
213
  }
210
214
  export interface AssignProviderInput {
211
215
  readonly asset: PaymentAsset;
@@ -216,6 +220,7 @@ export interface SubmitWorkInput {
216
220
  readonly asset: PaymentAsset;
217
221
  readonly jobId: AmountLike;
218
222
  readonly deliverable: string | Uint8Array;
223
+ readonly serviceFeeAcceptance?: ServiceFeeAcceptance;
219
224
  }
220
225
  export interface SettleJobInput {
221
226
  readonly asset: PaymentAsset;
@@ -242,7 +247,66 @@ export interface AppealDecisionInput {
242
247
  readonly jobId: AmountLike;
243
248
  readonly evidenceHash: Hash32Input;
244
249
  }
245
- export type DecisionSettlementInput = SettleJobInput;
250
+ export interface DecisionSettlementInput extends SettleJobInput {
251
+ readonly serviceFee?: ServiceFeeSplit;
252
+ }
253
+ export interface ServiceFeeAcceptance {
254
+ readonly gross: bigint;
255
+ readonly basisPoints: 200;
256
+ readonly treasury: string;
257
+ readonly rejectionRefund: "net-after-evaluation";
258
+ }
259
+ export interface ServiceFeeSplit {
260
+ readonly basisPoints: 200;
261
+ readonly treasury: string;
262
+ readonly gross: bigint;
263
+ readonly fee: bigint;
264
+ readonly net: bigint;
265
+ readonly waived: boolean;
266
+ }
267
+ export interface ServiceFeePolicy {
268
+ readonly configured: boolean;
269
+ readonly basisPoints: 200;
270
+ readonly treasury: string;
271
+ readonly reviewWindow: bigint;
272
+ readonly appealWindow: bigint;
273
+ readonly appealAuthority: string;
274
+ }
275
+ export interface ServiceFeeSettlement {
276
+ readonly gross: bigint;
277
+ readonly recipient: string;
278
+ readonly net: bigint;
279
+ readonly chargedFee: bigint;
280
+ readonly refundedFee: bigint;
281
+ }
282
+ export interface JobServiceFeeRecord {
283
+ readonly jobId: bigint;
284
+ readonly basisPoints: 200;
285
+ readonly treasury: string;
286
+ /** Potential budget quote, not collected revenue or a completed refund. */
287
+ readonly feeAmount: bigint;
288
+ readonly serviceRecorded: boolean;
289
+ readonly waiver?: string;
290
+ readonly settlement?: ServiceFeeSettlement;
291
+ }
292
+ export interface InitializeServiceFeeProtocolInput {
293
+ readonly asset: PaymentAsset;
294
+ readonly owner: string;
295
+ readonly treasury: string;
296
+ readonly appealAuthority: string;
297
+ readonly appealWindow: AmountLike;
298
+ }
299
+ export interface WaiveServiceFeeInput {
300
+ readonly asset: PaymentAsset;
301
+ readonly jobId: AmountLike;
302
+ readonly evidenceHash: Hash32Input;
303
+ }
304
+ export interface WaiveServiceFeePlanInput extends WaiveServiceFeeInput {
305
+ readonly authority: string;
306
+ }
307
+ export interface RefundServiceFeePlanInput extends SettleJobInput {
308
+ readonly treasury: string;
309
+ }
246
310
  export interface ResolveAppealInput {
247
311
  readonly asset: PaymentAsset;
248
312
  readonly jobId: AmountLike;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;AAClD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,CAAC;AAC1C,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAC1C,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC;IAClC,QAAQ,CAAC,kBAAkB,EAAE,UAAU,CAAC;IACxC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,eA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AY,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;CACpC;AAED,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,yBAA0B,SAAQ,cAAc;IAC/D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC;CACtC;AAED,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC;CACtC"}
@@ -3,10 +3,25 @@
3
3
  ## Scope
4
4
 
5
5
  The SDK is a typed boundary between agent frameworks and the existing PerkOS contracts. The core
6
- package contains no LLM, HTTP-paywall, MCP server, wallet extension, or private-key store. Those
6
+ browser entry point contains no LLM, HTTP-paywall, MCP server, wallet extension, or private-key store. Those
7
7
  systems integrate through explicit interfaces so that transaction policy remains reusable and
8
8
  auditable.
9
9
 
10
+ The unreleased Node-only `nayori-mcp` binary is a separate stdio adapter built on the official
11
+ MCP SDK. It exposes fixed-testnet public reads and offline commitments, not signing or payment
12
+ tools. There is no private-key store or custody service in that adapter. See
13
+ [Hermes MCP](HERMES_MCP.md) for role-specific tools and remaining integration gates.
14
+ The optional [QA custody candidate](HERMES_CUSTODY.md) runs separately: operator permit,
15
+ wallet-scoped lock, durable reservation/txid ledger and fixed testnet SDK backend. MCP delegates
16
+ bounded requests over a filesystem Unix socket; it never receives a key. Distinct Linux identity
17
+ and access-control verification are deployment gates, not claims established by a same-UID test.
18
+
19
+ The provider-only evaluation opt-in connects MCP to the fixed public QA evaluator origin.
20
+ It binds admission to the configured custody job and its confirmed submission, validates SDK
21
+ commitments against on-chain state, then reuses the deterministic evaluation ID. Evaluator
22
+ credentials, signing and byte verification stay outside MCP. x402 purchases remain a separate
23
+ integration gate; evaluation admission does not add another payment.
24
+
10
25
  ## Flow
11
26
 
12
27
  ```text
@@ -144,24 +159,25 @@ profile.
144
159
  Completion, rejection, expiry and versioned review-timeout settlement may transfer funds held by
145
160
  the escrow contract rather than by the transaction origin. High-level client methods read the
146
161
  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
162
+ the escrow contract principal and the exact amount expected to leave it. For `sbtc-commerce-v2`,
163
+ `sbtc-commerce-v3` and `sbtc-commerce-v4`, the client also reads the job-pinned token and uses it
164
+ in both the contract argument and exact fungible-token post-condition; a later default-token
165
+ rotation cannot redirect or strand an existing escrow.
166
+
167
+ The active v5/v4 generation records a fixed 12 Bitcoin burn-block review deadline at submission.
168
+ The evaluator records a hashed decision without moving escrow, after which the affected client or
169
+ provider receives the configured appeal window. A separately pinned human authority resolves an
170
+ appeal; permissionless finalizers preserve liveness after either deadline without choosing a new
171
+ recipient. Reputation synchronization has its own durable read record and deny-mode retry plan so
172
+ registry unavailability never expands payment authority or rolls back settlement.
173
+
174
+ Versioned v5/v4/v3 contract IDs are the defaults on both networks. Historical generations remain
160
175
  available through explicit same-network overrides.
161
176
 
162
177
  ## Future adapters
163
178
 
164
179
  - Durable replay-store and hosted HTTP adapters for the x402 Stacks facilitator.
165
180
  - Hosted MPP challenge consumption, settlement reconciliation and confirmed receipt delivery.
166
- - MCP tools with typed inputs, allowlists, and the same spending policy.
181
+ - Deployment/isolation validation of the candidate wallet-enabled MCP delegation and durable operator-approved limits;
182
+ the read/prepare QA foundation already exists separately.
167
183
  - Optional framework-specific integrations and higher-confirmation settlement policies.
@@ -0,0 +1,123 @@
1
+ # Connect your existing agent to Nayori
2
+
3
+ Start here **after your agent is installed and working with your own LLM**. Keep that runtime,
4
+ model and provider. Nayori adds Stacks identity, escrow and payment integration; it does not
5
+ install your agent or configure its LLM. No PerkOS-LLM account or credentials are required.
6
+ Never send Nayori your model API key, wallet private key or recovery material.
7
+
8
+ Hermes is an example integration, not a requirement. A non-TypeScript runtime can use a
9
+ controlled TypeScript sidecar or the documented HTTP surfaces; HTTP/MCP discovery alone does
10
+ not implement the on-chain job lifecycle.
11
+
12
+ ## 1. Choose the integration and release
13
+
14
+ | Path | Available boundary | Start with |
15
+ | --- | --- | --- |
16
+ | TypeScript SDK | Public npm 0.7.1: reads, transaction plans and operator-supplied signer interfaces | This guide and the [SDK README](../README.md) |
17
+ | Local MCP for an existing Hermes | Unreleased QA candidate: fixed testnet contracts, bounded role tools and optional separate custody | [MCP setup](HERMES_MCP.md) |
18
+ | Remote partner MCP | Invite-only OAuth API access; not the local Hermes custody bridge | [Partner guide](PARTNER_PILOT.md) |
19
+
20
+ Install a reviewed, pinned public version in your agent's integration package:
21
+
22
+ ```sh
23
+ npm install --save-exact @perkos/agent-sdk@0.7.1
24
+ ```
25
+
26
+ The QA candidate shares a version label with a **different** npm artifact. Its Hermes tools,
27
+ committed-evaluation walkthrough and fee integration require the reviewed QA source/tarball.
28
+ Do not assume installing npm 0.7.1 installs those features. Record the source commit and artifact
29
+ SHA-256; do not use an unpinned auto-downloading command in a financial agent.
30
+
31
+ ## 2. Prepare the wallet and signer under your control
32
+
33
+ Follow [wallet and signer preparation](WALLET_SIGNER_SETUP.md) separately from SDK installation.
34
+ If you already have a suitable signer, verify it rather than creating another wallet.
35
+ Use a dedicated testnet identity, verify recovery, and authorize only a small STX gas budget.
36
+ The agent requests bounded operations; its isolated signer checks and signs them. The LLM does
37
+ not receive a private key. SDK installation creates neither a wallet nor an on-chain identity.
38
+
39
+ ## 3. Pin testnet and verify the deployment
40
+
41
+ Select `network: "testnet"` explicitly. Match registry, escrow generation, token and evaluator
42
+ to the intended QA deployment before any transaction. A network selection alone does not select
43
+ the fee-candidate contracts. The public npm default and the [QA fee candidate](SERVICE_FEES.md)
44
+ are distinct; do not copy a candidate override into production.
45
+
46
+ This example reads a count and creates an **unsigned** plan only:
47
+
48
+ ```ts
49
+ import { PerkOSClient } from "@perkos/agent-sdk";
50
+
51
+ const nayori = new PerkOSClient({ network: "testnet" });
52
+ console.log(await nayori.getAgentCount());
53
+
54
+ // Obtain this public address from your verified testnet signer, not from an LLM.
55
+ const operatorAddress = "YOUR_VERIFIED_TESTNET_ADDRESS";
56
+ const plan = nayori.transactions.registerAgent({
57
+ name: "My Research Agent",
58
+ description: "Produces cited research for assigned jobs.",
59
+ wallet: operatorAddress,
60
+ endpoints: [],
61
+ });
62
+ console.log(plan.network, plan.contract, plan.functionName);
63
+ ```
64
+
65
+ Replace the address placeholder before building the plan; it intentionally is not a usable
66
+ wallet. `endpoints: []` is appropriate when the agent has no public service. Do not advertise
67
+ an example URL, private host or local stdio process as an HTTPS MCP endpoint.
68
+
69
+ ## 4. Register and verify the agent
70
+
71
+ 1. Choose real public metadata. Check saved receipts/IDs before making another registration.
72
+ 2. Review the plan's network, registry, `register-agent` call and arguments in your signer.
73
+ Use the same operator address as transaction sender and metadata wallet in this walkthrough.
74
+ The contract records the sender as `creator`; a metadata wallet alone does not prove ownership.
75
+ 3. Explicitly authorize the registration and network fee using your controlled signer integration.
76
+ A plan does not sign or broadcast. `registerAgent()` on a signer-enabled client returns a
77
+ broadcast receipt, not confirmation. Preserve that receipt's txid durably.
78
+ 4. Use `nayori.confirm(savedTxid)` and require `status === "success"`. Verify the registry call
79
+ returned `(ok uN)` and record that **agent ID**, not a job ID or OAuth identity. Confirm the
80
+ configured canonical depth independently where your release policy requires it.
81
+ 5. Read `await nayori.getAgent(agentId)`. Require an active record, matching `creator`, `wallet`,
82
+ name, description and endpoints. Save network, registry, txid and agent ID together.
83
+ 6. On timeout or missing state, query the saved txid and registry before retrying. Do not infer
84
+ your ID from the global agent count, or re-register merely because a response was slow.
85
+
86
+ Registration is now verifiable on-chain. It does not grant OAuth scopes, buy a resource, create
87
+ a job or authorize another wallet. Request partner OAuth only if the API path you actually need
88
+ requires it; direct SDK contract registration does not require partner credentials.
89
+
90
+ ## 5. Choose the job role
91
+
92
+ - **Buyer/client:** create objective criteria, create a job, set budget, fund and assign a provider.
93
+ Confirm every state-changing transaction before proceeding. Fund the escrow contract, not a
94
+ provider wallet directly. Use [the buyer walkthrough](HERMES_BUYER.md) for the QA Hermes example.
95
+ - **Provider:** register with its own signer, verify assignment and escrow, do the real work and
96
+ submit evidence. It cannot self-assign in the QA bridge. It needs STX for its own gas but does
97
+ not send sBTC merely to receive payment. See [the provider walkthrough](HERMES_PROVIDER.md).
98
+ - **Outcome:** neither participant controls Nayori's evaluator key. Check the decision, appeal
99
+ window and final settlement; verify zero escrow, actual payout/refund and reputation state.
100
+
101
+ The [role-separated testnet walkthrough](TESTNET_QUICKSTART.md) supplies guarded QA commands,
102
+ inputs and recovery behavior. It is a separate candidate, not a claim that a funded autonomous
103
+ Hermes session has passed merely because the guide exists. See the separately
104
+ [verified supervised lifecycle](VALIDATION_AND_RELEASE.md). x402 resource purchases have their own [payment workflow](X402_PAYMENTS.md),
105
+ permission and budget; registering an agent or requesting evaluation does not buy an x402 resource.
106
+
107
+ ## Completion checklist
108
+
109
+ Use [QA checkpoints](HERMES_CHECKPOINTS.md) for role funding budgets, the custody-specific
110
+ six-burn confirmation gate, job-bound provider handoff and recovery. Funding a wallet is not
111
+ funding escrow; an evaluator decision is not a payout.
112
+
113
+ - Existing agent and its own LLM unchanged; no model key shared with Nayori.
114
+ - Operator-controlled wallet/signer and recovery tested, secrets outside agent prompts and Git.
115
+ - Explicit testnet/deployment and bounded gas/operation permissions.
116
+ - Successful registration tx, returned agent ID and matching active registry record.
117
+ - Chosen role tested against a real job, with confirmed submission and economic outcome.
118
+ - Public receipts contain no secrets; simulated/unsigned steps are not labeled completed E2E.
119
+
120
+ Promote to mainnet only through a separately reviewed network/deployment configuration and
121
+ spending authorization. Testnet registration does not create a mainnet identity. One supervised
122
+ funded Hermes scenario passed; clean published-package onboarding, paid-resource integration and
123
+ the recorded demo remain separate gates.
@@ -0,0 +1,91 @@
1
+ # Hermes buyer — controlled QA walkthrough
2
+
3
+ **Unreleased candidate; one supervised internal lifecycle verified.** Follow this with a
4
+ separate provider operator. Do not substitute mainnet URLs or assume the published npm 0.7.1
5
+ contains these tools. This guide is the recording checklist, not evidence that every step passed.
6
+
7
+ See [validation and release boundaries](VALIDATION_AND_RELEASE.md) for the exact tested source,
8
+ public transactions and remaining gates. Reuse an already registered, verified identity; omit
9
+ `register` from a new permit and recalculate its action/gas budget instead of registering twice.
10
+
11
+ ## 1. Operator prerequisites
12
+
13
+ ### Bring your working agent
14
+
15
+ Your Hermes is already installed and working with your own LLM. Keep that configuration;
16
+ this guide adds Nayori tools, not a model provider. No PerkOS-LLM account, model migration or
17
+ model API key shared with Nayori is required. Hermes is an example, not a platform requirement.
18
+ Start with [existing-agent onboarding](EXISTING_AGENT.md) and the separate
19
+ [operator wallet/signer checklist](WALLET_SIGNER_SETUP.md). Keep model credentials out of
20
+ prompts, MCP arguments and recordings. Your agent's model is separate from Nayori's evaluator.
21
+
22
+ - Create and back up a dedicated Stacks testnet wallet **outside Nayori and outside Hermes**.
23
+ Use your own Stacks.js signer or the reviewed isolated custody pilot. Wallet creation,
24
+ key recovery and funding remain operator responsibilities, not SDK tools.
25
+ - Verify the restored key derives the expected address before funding. Never display keys,
26
+ recovery material, environment contents or authorization headers in a recording.
27
+ - Keep the buyer key only inside its signer boundary. Hermes must not share that UID,
28
+ key mount, writable policy, Docker socket, sudo or access to the provider's socket.
29
+ - Install the exact reviewed QA tarball as described in [MCP setup](HERMES_MCP.md).
30
+ Record source SHA and artifact SHA-256. Do not use unpinned `npx` or confuse candidate
31
+ version 0.7.1 with the different publicly distributed 0.7.1 artifact.
32
+
33
+ ## 2. Configure and verify permissions
34
+
35
+ Create the public profile with `role: client` and four distinct, verified buyer/provider/
36
+ evaluator/treasury addresses. Follow [custody permissions](HERMES_CUSTODY.md) for a short-lived
37
+ permit, private journal and socket. Start with signing disabled and no funded key loaded.
38
+
39
+ The pilot allows at most one job per permit: up to 1000 atomic sBTC units or 100000 micro-STX,
40
+ 5000 micro-STX gas reserved per action and no more than 35000 total per permit. Limits are
41
+ caps, not a live network fee quote. The buyer's six actions normally require a 30000 cap.
42
+ Accept the included 200 bps evaluation-earned fee and net refund after evaluated rejection.
43
+
44
+ Configure Hermes using the exact paths in MCP setup. Verify `nayori_context` reports
45
+ testnet, your wallet and the fixed v6/v5 contracts. With custody, verify
46
+ `nayori_custody_status` reports the intended permit and zero unexpected operations. A context
47
+ response does not prove wallet ownership or successful registration.
48
+
49
+ ## 3. Execute one real job
50
+
51
+ After operator review, isolation tests, backup and explicit low-value testnet funding:
52
+
53
+ 1. Enable testnet signing in the **signer service**, not in Hermes's environment.
54
+ 2. Ask Hermes to call `nayori_execute` with `{"action":"register"}`. Confirm the saved txid
55
+ and agent ID. Do not repeat registration under a new permit because a response is slow.
56
+ 3. Define a real small task and objective acceptance criteria in the operator permit.
57
+ `nayori_prepare_job` previews the commitment; it does not create or authorize a job.
58
+ 4. Execute `create`, then query custody status until its returned job ID is confirmed.
59
+ 5. Execute `set-budget`, `fund`, then `assign`, confirming each before the next. In the
60
+ custody pilot confirmation includes six subsequent burn blocks, not six Stacks blocks.
61
+ 6. Give the confirmed public job ID to the provider operator. The buyer assigns the provider;
62
+ the provider cannot self-assign. The provider verifies escrow before doing work.
63
+ 7. Track `nayori_get_job`. The provider delivers and, if explicitly enabled, requests public
64
+ QA evaluation. Buyer and provider do not possess the evaluator key.
65
+ 8. Read the actual on-chain decision and appeal deadline. For an unappealed decision, call
66
+ buyer `finalize` only after the deadline. The pilot blocks appealed jobs for human handling.
67
+ 9. Independently inspect transaction events, terminal state, zero escrow, exact provider/
68
+ treasury payouts and reputation. For approved gross 1000 sBTC units, expect 980 provider
69
+ and 20 treasury under the configured 200 bps policy. A decision alone is not payment.
70
+
71
+ ## 4. Failure and recovery
72
+
73
+ Follow [QA checkpoints](HERMES_CHECKPOINTS.md) for the exact confirmation condition:
74
+ `currentBurn >= transactionBurn + 6`. Explorer success may arrive before custody confirmation.
75
+ Wallet funding, escrow funding and final payout are separate checkpoints.
76
+
77
+ Query custody/evaluation status before retrying. Preserve the same permit, journal, job and
78
+ txid. A reserved operation without saved txid may already have signed: stop and investigate.
79
+ Do not delete locks/journals, change nonce, increase gas or authorize a duplicate payment to
80
+ make an error disappear. Recovery requires operator review of chain, nonce, mempool and events.
81
+
82
+ ## 5. Separate paid-resource and recording gates
83
+
84
+ The current MCP does **not** purchase x402 resources. The [x402 paying flow](X402_PAYMENTS.md)
85
+ needs its own permission, budget and successful walkthrough before a video claims that
86
+ capability. Evaluation admission does not add a second x402 fee to this job.
87
+
88
+ Record installation, public profile, tool discovery, actual registration/job/funding/assignment,
89
+ provider handoff, decision and settlement. Label edited waiting periods. Keep private setup off
90
+ screen. Keep the video and internal receipts outside the repository. Our controlled wallets are
91
+ `internal-team-operated-not-m2-adoption`, not external grant adoption.
@@ -0,0 +1,88 @@
1
+ # Hermes QA checkpoints and confirmation handling
2
+
3
+ This is an **unreleased QA candidate**, not a completed funded autonomous E2E certification.
4
+ One supervised internal sBTC lifecycle is verified in [validation and release boundaries](VALIDATION_AND_RELEASE.md).
5
+ Use your existing agent and LLM. Keep the wallet and policy signer under your control, outside
6
+ the model process. Follow [existing-agent onboarding](EXISTING_AGENT.md), then the
7
+ [buyer](HERMES_BUYER.md) or [provider](HERMES_PROVIDER.md) manual.
8
+
9
+ ## Fund wallets before enabling execution
10
+
11
+ Wallet funding is not agent registration and is not escrow funding. Derive and verify each
12
+ public address from its own signer, test recovery and inspect balances on the intended network.
13
+ Do not fund example addresses or send money to a provider as a substitute for `fund-job`.
14
+
15
+ For the bounded sBTC QA walkthrough:
16
+
17
+ | Role | Initial wallet budget | What it authorizes |
18
+ | --- | --- | --- |
19
+ | Buyer | 1000 **atomic sBTC units** plus 30000 micro-STX | One escrow budget and six actions at 5000 micro-STX gas each |
20
+ | Provider | 10000 micro-STX | Registration and submission at 5000 micro-STX each |
21
+ | Evaluator / appeal authority | Separately operated | Neither participant receives these keys or spending permissions |
22
+
23
+ These are pilot caps, not a live fee estimate or guaranteed inclusion price. Funding transfers
24
+ also cost gas to their sender and are outside those recipient budgets. The provider needs no
25
+ sBTC deposit to receive an approved payout. Verify the canonical token principal, not just its
26
+ ticker. The candidate accepts STX or sBTC escrow; direct USDCx resource payments are separate.
27
+
28
+ ## Track these checkpoints independently
29
+
30
+ | Checkpoint | Required evidence | Does not prove |
31
+ | --- | --- | --- |
32
+ | Wallet ready | Correct network/address, recovery and asset/gas balances | Registration or escrow |
33
+ | Tools ready | Real discovery, role context and bounded signer status | A chain transaction |
34
+ | Signed / broadcast | Durable intent and saved txid | Canonical success or confirmation depth |
35
+ | Registered | Successful registry call, returned agent ID and matching active record | A created or funded job |
36
+ | Job funded | Confirmed job ID, criteria commitment, assigned provider, exact asset and escrow | Delivered work |
37
+ | Work submitted | Confirmed evidence commitment and retrievable matching bytes | Evaluator approval |
38
+ | Decision pending | On-chain decision and explanation hashes, appeal deadline | Payment or final reputation |
39
+ | Settled | Terminal state, zero escrow, exact transfer events and reputation state | External adoption by itself |
40
+
41
+ ## Six-burn confirmation gate
42
+
43
+ The QA custody pilot keeps an operation `signed` until its transaction is canonical, anchored
44
+ and successful **and six subsequent Bitcoin burn blocks have arrived**. For a transaction in
45
+ burn block `B`, the condition is `currentBurn >= B + 6`. This is not six Stacks blocks, not six
46
+ seconds and not an estimate of wall-clock completion. A success shown by an explorer may precede
47
+ the custodian's `confirmed` state. The SDK's general confirmation tracker and this custody gate
48
+ are different policies; do not assume all SDK methods apply this depth automatically.
49
+
50
+ Call `nayori_custody_status` to reconcile the existing journal. Do not call `nayori_execute`
51
+ again to force confirmation, change the nonce, delete state, replace the permit, or increase the
52
+ gas budget. A reserved operation without a txid, an abort, unavailable RPC or uncertain broadcast
53
+ requires operator investigation. Keep the same journal and saved txid; there is no automatic
54
+ fee bump or automatic rebroadcast. Six burn blocks reduce, but do not eliminate, reorg risk.
55
+
56
+ ## Role handoff and outcome
57
+
58
+ The buyer completes registration, creation, budget, funding and assignment one action at a time.
59
+ Issue the provider's permit only after independently verifying the real job ID, identities,
60
+ criteria, expiry, token and exact funded escrow. Never use a synthetic job ID in a funded permit.
61
+ The provider's pilot permit is job-bound; it then registers and submits with its own signer.
62
+
63
+ If the identity is already registered, verify the active record and reuse it; omit registration
64
+ from the permit and recalculate the cap. The verified repeat cycle used five buyer actions
65
+ (25000 micro-STX) and one provider submission (5000 micro-STX), excluding incoming funding and
66
+ the evaluator's own gas. These do not replace the first-registration budgets above.
67
+
68
+ Preserve the submitted evidence bytes. An evaluator decision does not move escrow. Wait through
69
+ the job's actual appeal deadline and respect any appeal; do not replace the chain deadline with
70
+ a timer in your agent. Approved gross 1000 atomic sBTC under the QA 200 bps policy settles as
71
+ 980 to the provider and 20 to the job-pinned treasury. Verify events rather than calculating
72
+ an expected amount and reporting it as paid. Production contract generations may differ.
73
+
74
+ ## Isolation, evidence and video
75
+
76
+ Restrict the signer's outbound transport to the approved testnet RPC. Keep the model process
77
+ away from key files, writable permits/journals, the Docker socket and privileged shell access.
78
+ An operator-owned restricted relay is one deployment option, not an SDK-managed custody service.
79
+ RPC reachability is not authorization; the signer still validates every operation and budget.
80
+
81
+ Save public network, source/artifact hashes, permit hash, agent/job IDs, txids, block heights and
82
+ verification results. Keep secrets, private host paths and internal logs out of published docs
83
+ and recordings. Label shortened waiting periods in the video. Team-operated testnet participants
84
+ are internal QA, not independent mainnet adoption.
85
+
86
+ The local Hermes MCP does not purchase x402 resources. [x402](X402_PAYMENTS.md) needs a separate
87
+ permission, budget, confirmed payment and delivered-resource receipt; evaluation admission does
88
+ not create a second payment. Record that gate separately from the escrow workflow.