@c4roa0/agentpay-user 0.3.9 → 0.3.10

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,7 +1,11 @@
1
1
  # User TODO
2
2
 
3
+ - [x] Fix switching back from setup cancelled before Wallet creation; retain stop/listener and established-data checks.
4
+ - [ ] Deliver the fix and verify participant switch-back to the original installation.
5
+ - [ ] Improve unconfigured installation status/info: direct to setup, not service start or missing-key recovery.
6
+
3
7
  - [x] Verify local official Skill files before downloading and stream update repair progress (2026-11-12; targeted checks).
4
- - [ ] Publish and verify the local official-Skill check optimization in the next User patch.
8
+ - [x] Publish local official-Skill verification and streaming update progress in User 0.3.9; tag and npm integrity verified (2026-11-12).
5
9
 
6
10
  - [x] Publish User 0.3.8 with matching v0.3.8 tag; full CI, standalone package and public registry integrity passed (2026-11-12).
7
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4roa0/agentpay-user",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@c4roa0/agentpay-protocol": "0.14.3",
package/progress.md CHANGED
@@ -1,8 +1,22 @@
1
1
  # AgentPay User progress
2
2
 
3
+ ## Participant incomplete-setup switch — 2026-11-12
4
+
5
+ Participant A-to-B setup cancellation exposed a switch-back failure: B had no
6
+ Wallet directory, but selection required complete service settings. User 0.3.10 candidate
7
+ allows demonstrably unconfigured B to release selection after confirmed systemd
8
+ stop and socket checks. Existing key/Policy/connection or invalid directories still
9
+ block missing-configuration bypass. Original participant A remains stopped until
10
+ the corrected switch is run. Full two-running-installation acceptance is pending.
11
+
3
12
  ## Official Skill local verification — 2026-11-12
4
13
 
5
- User 0.3.9 candidate: update/repair verifies the release-pinned local ZIP and its extracted
14
+ Published as `v0.3.9` at `8fbae4e`. Full GitHub behavior and standalone package
15
+ checks passed; npm latest and archive integrity independently verified. Wallet stays
16
+ 0.3.3, Protocol 0.14.3 and official test Skill 1.2.1.
17
+ [Release workflow](https://github.com/c4rO-0/agentpay-user/actions/runs/43162494802).
18
+
19
+ User 0.3.9: update/repair verifies the release-pinned local ZIP and its extracted
6
20
  files before using the network. Matching files skip download; edited or incomplete
7
21
  extracted files are preserved with guidance. Software-update repair progress streams
8
22
  as it happens. Targeted update/package regressions passed; the actual pinned 1.2.1
@@ -45,6 +45,26 @@ async function targetUnitsPrepared(unitDir, target) {
45
45
  } catch { return false; }
46
46
  }
47
47
 
48
+ // A cancelled first setup can own generated units before it has a Wallet or
49
+ // runtime address. Only that demonstrably unconfigured state may omit settings;
50
+ // missing settings in an established installation still require review.
51
+ async function previousServiceSettings(dataDir) {
52
+ try { return await readServiceSettings(dataDir); }
53
+ catch (error) {
54
+ if (error.code !== 'ENOENT') throw error;
55
+ for (const directory of [dataDir, join(dataDir,'wallet'), join(dataDir,'runtime')]) {
56
+ const info = await lstat(directory).catch(e => { if(e.code==='ENOENT' && directory!==dataDir)return null;throw e; });
57
+ if (info && (!info.isDirectory() || info.isSymbolicLink() || info.uid!==process.getuid() || info.mode & 0o077))
58
+ throw Error('Previous installation directories need ownership review before switching.');
59
+ }
60
+ for (const name of ['wallet/session.keystore.json','wallet/policy.json','runtime/local-services.json','runtime/connection.json']) {
61
+ const exists = await lstat(join(dataDir,name)).then(()=>true,e=>{if(e.code==='ENOENT')return false;throw e;});
62
+ if (exists) throw Error('Previous installation has saved Wallet or Runtime settings, but its service configuration is incomplete. Keep its files and repair it before switching.');
63
+ }
64
+ return null;
65
+ }
66
+ }
67
+
48
68
  // The caller holds this lock through unit replacement and start/stop. No prompts
49
69
  // can grant approval to a different target while the current transition writes.
50
70
  export async function withServiceSelection({target, action, ask, write = console.log, ctl, unitDir, operation, verifyReady = waitForServiceReadiness}) {
@@ -104,9 +124,9 @@ export async function withServiceSelection({target, action, ask, write = console
104
124
  }
105
125
  }
106
126
  if (different) {
107
- const settings = await readServiceSettings(previous.dataDir);
127
+ const settings = await previousServiceSettings(previous.dataDir);
108
128
  if (await listenerPresent(join(previous.dataDir,'wallet/wallet.sock')) ||
109
- await listenerPresent({host:'127.0.0.1',port:Number(new URL(settings.runtimeUrl).port)}))
129
+ (settings && await listenerPresent({host:'127.0.0.1',port:Number(new URL(settings.runtimeUrl).port)})))
110
130
  throw Error('An original Wallet or Runtime listener is still running. Stop it before switching; no new service was started.');
111
131
  }
112
132
  if (different) {
package/update-pair.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "format": "agentpay.local-update-pair.v1",
3
- "userVersion": "0.3.9",
3
+ "userVersion": "0.3.10",
4
4
  "walletVersion": "0.3.3",
5
5
  "typesDependency": "0.14.3"
6
6
  }