@c4roa0/agentpay-user 0.3.4 → 0.3.6

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/doc/TODO.md CHANGED
@@ -1,19 +1,27 @@
1
1
  # User TODO
2
2
 
3
+ - [x] Preserve maintenance error guidance and original request identity; controlled HTTP/IPC verification (2026-11-10).
4
+ - [ ] Include maintenance guidance in the next reviewed npm release; no release performed by this change.
5
+
3
6
  ## Existing Market address update
4
7
 
8
+ - [x] Allow source-to-npm reconnect without an onboarding draft; verify Policy contracts and preserve missing files.
9
+ - [x] Publish 0.3.5 and independently verify registry integrity.
10
+ - [x] Retry the participant address update without old onboarding files. Observed User 0.3.5 / Wallet 0.3.2 on 2026-11-09.
11
+
5
12
  - [x] Reauthenticate and verify original account, Wallet tuple and Policy connection before replacing an address.
6
13
  - [x] Verify unchanged deployment; preserve RPC, key, Policy, history/cache and original cancellation IDs.
7
14
  - [x] Apply under installer lock, restart managed Runtime, retain retry marker and show incomplete update in status.
8
15
  - [x] Full regression (387 checks), followed by targeted reconnect-boundary/transaction checks.
9
- - [ ] Publish a reviewed version and verify the existing participant installation against HTTPS.
16
+ - [x] Publish User 0.3.4 through v0.3.4; workflow and independent registry integrity verification passed.
17
+ - [x] Verify the existing participant installation and explicit address update against HTTPS. Observed User 0.3.5 / Wallet 0.3.2 on 2026-11-09.
10
18
 
11
19
  ## Directory npm update, then HTTPS
12
20
 
13
21
  - [x] Support directory-local npm update without replacing source/link installs.
14
22
  - [x] Verify real npm directory upgrade and isolated preflight; nine regression checks passed.
15
23
  - [x] Publish 0.3.3 via v0.3.3 and independently verify registry archive/dependency pins.
16
- - [ ] Verify participant directory install/update.
24
+ - [x] Verify participant directory install/update. Observed User 0.3.5 / Wallet 0.3.2 on 2026-11-09.
17
25
 
18
26
  ## Tag-triggered publication
19
27
 
@@ -29,14 +37,15 @@
29
37
  - [x] Verify website visibility and independently reconcile Settlement/chain outcome; prepare User 0.3.2 candidate.
30
38
  - [x] Pin the verified public Wallet 0.3.2; align package/lockfile/update-pair.
31
39
  - [x] Publish User 0.3.2 through tag-triggered OIDC; verify public registry archive.
32
- - [ ] Accept a real participant npm update/restart.
40
+ - [x] Accept a real participant npm update/restart. Observed User 0.3.5 / Wallet 0.3.2 on 2026-11-09.
33
41
 
34
42
 
35
43
  ## Fixed Skill download loop — 2026-11-08
36
44
 
37
45
  - [x] Request the official ZIP by the built-in SHA-256; reject unavailable/substituted versions without fallback.
38
46
  - [x] Complete fixed-download regression/type checks and publication/deletion review; the separate Market schema-fixture issue was resolved in its later regression.
39
- - [ ] After Market API/Web/nginx support is live, publish the next User version (not 0.3.1 again) and verify old pinned ZIP download and participant upgrade.
47
+ - [x] Publish later User versions and accept participant update through 0.3.5.
48
+ - [ ] Independently verify retained old pinned ZIP download; current package acceptance alone does not close historical-version availability.
40
49
 
41
50
 
42
51
  ## Running-version release loop — 2026-11-07
@@ -47,7 +56,7 @@
47
56
  - [x] Wallet 0.3.1 published through the configured workflow; public npm version/dependencies verified.
48
57
  - [x] Pin User 0.3.1 to published Wallet 0.3.1; pairing metadata/lockfile and standalone archive verification complete.
49
58
  - [x] Publish User 0.3.1; verify public npm/latest and successful Wallet/User OIDC runs.
50
- - [ ] Verify real published-version update/restart on the participant installation.
59
+ - [x] Verify real published-version update/restart on the participant installation. Observed User 0.3.5 / Wallet 0.3.2 on 2026-11-09.
51
60
 
52
61
 
53
62
  ## npm update follow-up — 2026-11-07
@@ -55,7 +64,7 @@
55
64
  - [x] Implement confirmed `agentpay update [-f]`, exact User target and matching Wallet; invoke new repair and pinned official Skill check.
56
65
  - [x] Fix relocation preparation ordering, matching legacy purge and packaged document links.
57
66
  - [x] Complete update/migration regressions (374 full-suite and 35 final targeted checks) and real npm replacement of local candidate artifacts; controlled service/registry dependencies.
58
- - [ ] After User release, verify a real published-version npm upgrade and participant service recovery.
67
+ - [x] Verify published-version directory npm update and participant service recovery: User 0.3.5 / Wallet 0.3.2, 2026-11-09. Deliberate interruption remains separate.
59
68
 
60
69
  ## npm client distribution — 2026-11-07
61
70
 
@@ -66,7 +75,8 @@
66
75
  - [x] Step 3: migrate User to Wallet npm dependency and `agentpay` entry; remove sibling/build assumptions; isolated tarball/process acceptance passed.
67
76
  - [x] Step 4a: exact installed-package checks, service-path/client relocation, installer lock, recovery-safe preparation and explicit uninstall modes.
68
77
  - [x] Step 4b implementation: installed/running version and interface checks.
69
- - [ ] Step 4b acceptance: participant upgrade/interruption recovery (same gate as the running-version loop above).
78
+ - [x] Step 4b participant existing-installation update/restart and HTTPS original-Order read recovery (2026-11-09).
79
+ - [ ] Step 4b deliberate interrupted-upgrade acceptance; normal restart recovery does not close this case.
70
80
  - [ ] Step 5: publish Wallet then User via OIDC; verify registry installs and update Market guides.
71
81
  - [x] Wallet 0.3.0 first Token publication; registry integrity/latest and fresh public install/CLI/IPC verified.
72
82
  - [x] Owner configured Wallet npm Trusted Publisher; validated by 0.3.1 publication.
@@ -46,9 +46,13 @@ lock, confirm no installer is running before following the lock-review guidance;
46
46
  User does not break an unknown live lock automatically. Existing cancellation requests keep their
47
47
  original IDs; recovery checks refresh observations from the new Settlement.
48
48
  Keep any old SSH tunnels until the update succeeds and `status` confirms operation.
49
- This feature requires User 0.3.4 or newer. Updating software does not change
49
+ This feature requires User 0.3.5 or newer. Updating software does not change
50
50
  your saved addresses; run the command above to review the change.
51
51
 
52
+ Older source installations may leave onboarding files outside the npm package.
53
+ Address updates use the saved Wallet Policy and Runtime settings; they do not
54
+ require or recreate an old onboarding draft.
55
+
52
56
  ## Wallet identity and Policy access
53
57
 
54
58
  A Wallet is identified by network + Module + Safe + execution address. Its nickname
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@c4roa0/agentpay-user",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@c4roa0/agentpay-protocol": "0.14.3",
7
- "@c4roa0/agentpay-wallet": "0.3.2",
7
+ "@c4roa0/agentpay-wallet": "0.3.3",
8
8
  "ethers": "^6.17.0",
9
9
  "fs-native-extensions": "1.5.3"
10
10
  },
package/progress.md CHANGED
@@ -1,12 +1,65 @@
1
1
  # AgentPay User progress
2
2
 
3
- ## User 0.3.4 release candidate — 2026-11-09
3
+ ## User 0.3.6 release candidate — 2026-11-10
4
+
5
+ Pins published Wallet 0.3.3, retaining Protocol 0.14.3. Maintenance errors provide
6
+ same-request guidance without automatic write retries. Package manifest, lockfile
7
+ and update-pair metadata agree. Publication uses the matching v0.3.6 tag after
8
+ independent installation and behavior checks; completion is not implied by this
9
+ candidate record. No local data, Policy or service changes occur on publication.
10
+
11
+
12
+ ## Maintenance guidance — 2026-11-10
13
+
14
+ Added explicit maintenance guidance without automatic write retries or replacement
15
+ purchases. Controlled HTTP/IPC tests verify that retry retains original request
16
+ identifiers. This is source verification, not live financial acceptance. Changes
17
+ have not been published to npm.
18
+
19
+
20
+ ## Acceptance bookkeeping — 2026-11-10
21
+
22
+ Existing-installation npm update/restart and HTTPS original-Order read recovery
23
+ are closed by the 2026-11-09 participant evidence below. Older pending publication
24
+ and migration paragraphs are historical checkpoints, not instructions to repeat
25
+ the accepted update. Deliberate upgrade interruption, clean installation/uninstall
26
+ and historical pinned-download availability remain separate acceptance items.
27
+ No runtime code or package version changed in this documentation closeout.
28
+
29
+
30
+ ## Participant HTTPS address update accepted — 2026-11-09
31
+
32
+ Participant directory-npm installation reports User 0.3.5 / Wallet 0.3.2.
33
+ Market reconnect completed with the existing Wallet and Policy. With Anvil 8547
34
+ forwarded, explicit Settlement Order read succeeded over HTTPS; subsequent Runtime
35
+ status recovered to 2 saved / 2 settled / 0 waiting. The one older missing result
36
+ predates this update and is retained. Initial unavailable checks cleared on retry.
37
+ No new paid Order, Policy replacement or result recovery was performed. This closes
38
+ the observed existing-installation update/address/read-recovery loop, not fresh
39
+ installation, a new HTTPS paid journey or real-network acceptance.
40
+
41
+ ## Missing onboarding draft during npm address update — 2026-11-09
42
+
43
+ Participant 0.3.4 reconnect stopped before address writes because an old onboarding
44
+ file was absent. Address updates now validate the saved Policy and service settings
45
+ without requiring that draft; existing draft/public files are updated only if
46
+ present. No RPC, Policy, test configuration or private history is synthesized.
47
+ 389 full regressions passed, followed by targeted error-guidance checks. Missing
48
+ drafts still reject contract drift; preflight errors explain the stage, preserved
49
+ state and retry action, while interrupted writes warn about partial updates.
50
+ User 0.3.5 published from tag v0.3.5 (6c57c12). GitHub run 42575980847
51
+ and independent registry archive verification passed;
52
+ participant migration remains unverified.
53
+
54
+ ## User 0.3.4 published — 2026-11-09
4
55
 
5
56
  Release the explicit Market address update with unchanged Wallet 0.3.2 and
6
57
  Protocol 0.14.3 pins. No participant data or running services are changed by
7
58
  publication. Independent npm archive installation and real isolated local-service
8
- startup passed; all 388 release regressions passed. Tag publication, registry verification and participant migration
9
- are separate gates; participant acceptance remains pending.
59
+ startup passed; all 388 release regressions passed. Tag v0.3.4 identifies c63ff80.
60
+ GitHub run 42574859894 completed OIDC publication and registry verification.
61
+ Independent registry integrity comparison matched the reviewed local archive.
62
+ Participant address migration remains pending.
10
63
 
11
64
 
12
65
  ## Explicit Market address update — 2026-11-09
@@ -385,9 +438,11 @@ approval. Detailed operational records are not distributed in this repository.
385
438
 
386
439
  ## Next work
387
440
 
388
- Public source preparation is complete within the recorded review scope. Next is the approved
389
- [distribution plan](doc/plans/user-wallet-distribution.md): a supported public Wallet
390
- client/version boundary and combined release archive. No automatic source updater.
441
+ Public npm distribution and the existing-participant update/HTTPS loop are verified
442
+ within the recorded scope. User pins Wallet and Protocol packages; npm update is
443
+ available. Combined release archives remain optional, not the next installation
444
+ prerequisite. Remaining compatibility and fresh-install checks follow the
445
+ [distribution plan](doc/plans/user-wallet-distribution.md).
391
446
 
392
447
  Official test network mapping, deployment/artifact handoff, complete interrupted owner
393
448
  signing and real-network acceptance remain open. macOS and graphical unlock remain
@@ -273,7 +273,21 @@ export async function connectMarket(
273
273
  String(p.policyId).toLowerCase() === String(previous.connection.policyId).toLowerCase());
274
274
  if (changingOrigin && !originalConnectionMatches)
275
275
  throw Error("Your original Wallet connection was not found at this address. The previous connection and addresses were kept.");
276
- const endpoints = previous ? await prepareEndpoints({dataDir,origin,scope,fetchJson,changingOrigin}) : {changed:false,apply:async()=>{}};
276
+ let endpoints;
277
+ try {
278
+ endpoints = previous ? await prepareEndpoints({dataDir,origin,scope,fetchJson,changingOrigin}) : {changed:false,apply:async()=>{}};
279
+ } catch (error) {
280
+ const networkFailure = ["AbortError", "TimeoutError"].includes(error.name) ||
281
+ ["ECONNREFUSED", "ECONNRESET", "ENOTFOUND", "ETIMEDOUT"].includes(error.code || error.cause?.code) || error.message === "fetch failed";
282
+ const reason = networkFailure
283
+ ? "Could not reach the platform to check its settings. Check your network and the Market address."
284
+ : error.message;
285
+ write("\n[!] Platform address check stopped");
286
+ write(reason);
287
+ write("No local settings were changed by this check. Your Wallet and Order records are kept.");
288
+ write("Next: resolve the issue above, then retry this command.");
289
+ return 1;
290
+ }
277
291
  if (endpoints.changed && (previous?.accountId !== signedIn.developer.id || !originalConnectionMatches))
278
292
  throw Error("Platform addresses changed, but your original account and Wallet connection could not be confirmed. Current addresses were kept.");
279
293
  if (existing) write(`Using your Wallet name: ${existing.label}`);
@@ -63,25 +63,32 @@ export async function preparePlatformEndpoints({dataDir,origin,scope,userDir=ins
63
63
  // changed origin or an interrupted update owns transport changes.
64
64
  if(!changingOrigin&&!pending)return {changed:false,apply:async()=>{}};
65
65
  const setup=await readPrivateJson(await deploymentFilePath(dataDir,userDir,'anvil-onboarding.json'));
66
- if(!setup)throw Error('Local setup settings are missing. Run agentpay setup before connecting Market.');
66
+ // A source-to-npm installation may have no copied onboarding draft. The
67
+ // bound Policy and live service settings remain the authoritative local state.
68
+ // Never synthesize a draft or replace its RPC/test configuration from Market.
67
69
  const policy=await readPrivateJson(join(dataDir,'wallet/policy.json'));
70
+ if(!policy)throw Error('Saved spending permission is missing (wallet/policy.json). Check your data folder with agentpay wallet info and restore its backup before retrying. Do not create a replacement Policy to fix this.');
68
71
  if(!policy||policy.policyId?.toLowerCase()!==scope.policyId?.toLowerCase()||policy.safe?.toLowerCase()!==scope.safe?.toLowerCase()||`eip155:${policy.chainId}`!==scope.network||policy.module?.toLowerCase()!==scope.module?.toLowerCase())
69
72
  throw Error('Wallet authorization changed. Run agentpay market connect again.');
70
73
  const connectionBefore=await readPrivateJson(join(dataDir,'market-connection.json'));
71
74
  if(pending&&(pending.version!==1||pending.origin!==origin||pending.policyId!==policy.policyId))
72
75
  throw Error('Finish the pending address update with the same Policy. Retry: agentpay market connect --market '+pending.origin);
73
76
  const {response,result}=await fetchJson(origin+'/market/web/onboarding/user-config',{method:'GET'},15000);
74
- if(!response.ok)throw Error('Market settings could not be checked. Your current addresses are kept.');
77
+ if(!response.ok)throw Error('Market deployment settings are unavailable. Check the website address and your connection, then retry.');
75
78
  const proposed=validatePublicDeployment(result);
76
- const settings=await readServiceSettings(dataDir);
79
+ let settings;
80
+ try{settings=await readServiceSettings(dataDir);}catch(e){
81
+ if(e.code==='ENOENT')throw Error('Runtime settings are missing (runtime/local-services.json). Run agentpay repair, then retry this command.');
82
+ throw Error('Runtime settings could not be read safely. Check the selected data folder with agentpay wallet info before retrying.');
83
+ }
77
84
  const urls={settlementUrl:proposed.settlementUrl,marketBundleMetadataUrl:proposed.marketBundleMetadataUrl};
78
- const changed=Object.keys(urls).some(key=>normalize(setup[key])!==normalize(urls[key]))||normalize(settings.settlementUrl)!==normalize(urls.settlementUrl)||!!pending;
85
+ const changed=!!setup&&Object.keys(urls).some(key=>normalize(setup[key])!==normalize(urls[key]))||normalize(settings.settlementUrl)!==normalize(urls.settlementUrl)||!!pending;
79
86
  // RPC is participant-owned: a different local tunnel must never be overwritten.
80
87
  // A Market connection alone is not authority to rotate contracts or test packages.
81
88
  const publicPath=await deploymentFilePath(dataDir,userDir,'user-deployment.json');
82
89
  const previousPublic=await readPrivateJson(publicPath);
83
90
  if(!changed&&!changingOrigin)return {changed:false,apply:async()=>{}};
84
- if(deploymentChanges(policy,proposed).length||deploymentChanges(setup,proposed).length||setup.mode!==proposed.mode||setup.tokenDecimals!==proposed.tokenDecimals||setup.tokenSymbol!==proposed.tokenSymbol)
91
+ if(deploymentChanges(policy,proposed).length||(setup&&(deploymentChanges(setup,proposed).length||setup.mode!==proposed.mode||setup.tokenDecimals!==proposed.tokenDecimals||setup.tokenSymbol!==proposed.tokenSymbol)))
85
92
  throw Error('This Market uses different network or contract settings. Address update stopped; your current Policy and Orders are kept.');
86
93
 
87
94
  // Query an unknown service to inspect deployment identity without depending on
@@ -101,6 +108,7 @@ export async function preparePlatformEndpoints({dataDir,origin,scope,userDir=ins
101
108
  if(!stat.isDirectory()||stat.isSymbolicLink()||stat.uid!==process.getuid()||(stat.mode&0o077))throw Error('Unsafe installation state directory.');
102
109
  const lockPath=join(stateDir,'install.lock');let lock;
103
110
  try{lock=await open(lockPath,'wx',0o600);}catch(e){if(e.code==='EEXIST')throw Error('Another setup or update is running. Retry market connect when it finishes.');throw e;}
111
+ let updating=false;
104
112
  try{
105
113
  if(!same(await readPrivateJson(join(dataDir,'market-connection.json')),connectionBefore)||!same(await readPrivateJson(join(dataDir,'wallet/policy.json')),policy)||!same(await readServiceSettings(dataDir),settings)||!same(await readPrivateJson(publicPath),previousPublic)||!same(await readPrivateJson(await deploymentFilePath(dataDir,userDir,'anvil-onboarding.json')),setup))
106
114
  throw Error('Local settings changed during connection. Retry market connect; no addresses were changed.');
@@ -114,16 +122,17 @@ export async function preparePlatformEndpoints({dataDir,origin,scope,userDir=ins
114
122
  // A durable marker makes interruptions retryable even after settings are written.
115
123
  // Write the alias before the new active address; never mutate cancellation IDs.
116
124
  await durableJson(pendingPath(dataDir),{version:1,origin,policyId:policy.policyId});
125
+ updating=true;
117
126
  await saveConnection();
118
127
  await manage('stop',{dataDir,settings});
119
128
  await durableJson(aliasesPath(dataDir),aliases);
120
129
  if(previousPublic)await durableJson(join(dataDir,'user-deployment.json'),{...previousPublic,...urls});
121
- await durableJson(join(dataDir,'anvil-onboarding.json'),{...setup,...urls});
130
+ if(setup)await durableJson(join(dataDir,'anvil-onboarding.json'),{...setup,...urls});
122
131
  await durableJson(join(dataDir,'runtime/local-services.json'),{...settings,settlementUrl:normalize(urls.settlementUrl)});
123
132
  await manage('start',{dataDir,settings:{...settings,settlementUrl:normalize(urls.settlementUrl)}});
124
133
  await unlink(pendingPath(dataDir));
125
134
  write('Platform addresses updated. Your Wallet, permission and Order records were kept.');
126
- }catch(e){throw Error('Address update did not finish. Run agentpay market connect --market '+origin+' again. '+e.message);}
135
+ }catch(e){throw Error('Address update did not finish.\n'+e.message+'\n'+(updating?'Some connection settings may already be saved. Wallet keys, Policies and Orders were kept.':'No connection addresses were changed.')+'\nNext: agentpay market connect --market '+origin);}
127
136
  finally{await lock.close();await unlink(lockPath);}
128
137
  }};
129
138
  }
@@ -676,7 +676,7 @@ async function invokeSaved(
676
676
  WALLET_LOCKED:
677
677
  "From the User repository, run agentpay wallet unlock, then resume this request.",
678
678
  SERVICE_MAINTENANCE:
679
- "Service is under maintenance. Resume this request later.",
679
+ "The service is under maintenance. Try this same request later; do not create a replacement purchase.",
680
680
  SERVICE_NOT_READY:
681
681
  "Service is not ready. Check its status, then resume this request.",
682
682
  };
package/update-pair.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "format": "agentpay.local-update-pair.v1",
3
- "userVersion": "0.3.4",
4
- "walletVersion": "0.3.2",
3
+ "userVersion": "0.3.6",
4
+ "walletVersion": "0.3.3",
5
5
  "typesDependency": "0.14.3"
6
6
  }