@c4roa0/agentpay-user 0.3.6 → 0.3.7
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/README.md +2 -0
- package/doc/TODO.md +13 -1
- package/doc/records/npm-update-participant-2026-11-11.md +25 -0
- package/package.json +1 -1
- package/progress.md +49 -6
- package/src/cache-management-cli.mjs +32 -2
- package/src/npm-update.mjs +13 -1
- package/update-pair.json +1 -1
package/doc/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# User documentation
|
|
2
2
|
|
|
3
|
+
- [Existing-installation update acceptance](records/npm-update-participant-2026-11-11.md): participant update to User 0.3.6 / Wallet 0.3.3 and retained records.
|
|
4
|
+
|
|
3
5
|
- [Directory npm update verification](records/local-npm-update-2026-11-08.md): real package update and preflight boundary.
|
|
4
6
|
|
|
5
7
|
## Start by role
|
package/doc/TODO.md
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
# User TODO
|
|
2
2
|
|
|
3
|
+
- [x] Participant directory-local update to User 0.3.6 / Wallet 0.3.3: running versions, original Orders in CLI/Market and available result cache verified (2026-11-11).
|
|
4
|
+
- [ ] Fresh-install and interrupted-update acceptance remain separate; discuss scope before execution.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
- [x] Clarify full Cache IDs and missing details argument; support bounded, unique read-only short-ID lookup (2026-11-11).
|
|
8
|
+
- [ ] Publish cache-details guidance with the next reviewed User release.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
- [x] Clarify npm update preview with actual installed Wallet versus target, unchanged and unknown states (2026-11-11).
|
|
12
|
+
- [ ] Include update-preview wording in the next reviewed User release; no new release was made for this edit.
|
|
13
|
+
|
|
14
|
+
|
|
3
15
|
- [x] Preserve maintenance error guidance and original request identity; controlled HTTP/IPC verification (2026-11-10).
|
|
4
|
-
- [
|
|
16
|
+
- [x] Publish User 0.3.6 with exact Wallet 0.3.3 dependency; registry identity/integrity verified (2026-11-10).
|
|
5
17
|
|
|
6
18
|
## Existing Market address update
|
|
7
19
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Existing npm installation update acceptance
|
|
2
|
+
|
|
3
|
+
Date: 2026-11-11. Evidence: participant terminal output and website confirmation.
|
|
4
|
+
|
|
5
|
+
The participant updated a directory-local npm installation through `agentpay update`:
|
|
6
|
+
User 0.3.5 to 0.3.6, with matching Wallet 0.3.3. The update repaired service paths,
|
|
7
|
+
restarted Wallet and Runtime, and verified official test Skill 1.2.1 against the
|
|
8
|
+
built-in SHA-256 without starting a purchase. After deliberate unlock, status
|
|
9
|
+
reported Wallet 0.3.3 and Runtime 0.3.6 running, with local history checks complete.
|
|
10
|
+
|
|
11
|
+
Both saved Orders remained settled. Policy validity, login startup and the locally
|
|
12
|
+
saved Market connection remained present. The participant confirmed both Orders
|
|
13
|
+
were still visible on the website. The retained result cache listed its original
|
|
14
|
+
timestamp and Order association, and details reported the JSON result available
|
|
15
|
+
(28-byte content, approximately 3.4 KiB retained storage). No export or independent
|
|
16
|
+
byte-by-byte backup comparison was performed. The older Order's missing local
|
|
17
|
+
result was already present before updating and was not resolved by this update.
|
|
18
|
+
|
|
19
|
+
Two usability findings were corrected in source: show installed and target Wallet
|
|
20
|
+
versions separately, and clarify full Cache IDs with bounded unique short-ID lookup
|
|
21
|
+
for read-only details. Controlled tests passed; these fixes are not in npm 0.3.6.
|
|
22
|
+
|
|
23
|
+
This accepts the observed existing-installation update and retained records. It
|
|
24
|
+
is not fresh-install, interrupted-update recovery, financial reconciliation or
|
|
25
|
+
real-network acceptance. No new payment or authorization was required.
|
package/package.json
CHANGED
package/progress.md
CHANGED
|
@@ -1,20 +1,63 @@
|
|
|
1
1
|
# AgentPay User progress
|
|
2
2
|
|
|
3
|
-
## User 0.3.
|
|
3
|
+
## User 0.3.7 release preparation — 2026-11-11
|
|
4
|
+
|
|
5
|
+
Patch release includes installed/target Wallet version preview and clearer Cache ID
|
|
6
|
+
help with unique short-ID lookup for read-only details. Wallet remains pinned to
|
|
7
|
+
0.3.3 and Protocol to 0.14.3. Manifest, lockfile and update-pair versions are aligned.
|
|
8
|
+
Publication and registry verification are pending; no local participant service or
|
|
9
|
+
private data is changed by preparing the release.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Existing client update accepted — 2026-11-11
|
|
13
|
+
|
|
14
|
+
Participant directory-local npm update to User 0.3.6 / Wallet 0.3.3 completed.
|
|
15
|
+
Running versions, unlocked Wallet, two settled Orders, unchanged saved validity,
|
|
16
|
+
startup/Market connection and retained available result cache were observed.
|
|
17
|
+
Participant confirmed both original Orders remain visible on Market. The older
|
|
18
|
+
missing result predates this update. No new payment or Policy was created.
|
|
19
|
+
[Evidence and limits](doc/records/npm-update-participant-2026-11-11.md). Update-preview and Cache ID guidance fixes are
|
|
20
|
+
verified in source, not yet published. Fresh installation and interrupted-update
|
|
21
|
+
acceptance remain next for discussion; neither has started in this loop.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Cache details guidance — 2026-11-11
|
|
25
|
+
|
|
26
|
+
Missing details IDs now show a short example before accessing local storage.
|
|
27
|
+
List guidance explains that the namespace is part of the ID. Read-only details
|
|
28
|
+
accept a unique prefix with at least eight hexadecimal characters; ambiguous,
|
|
29
|
+
missing or incomplete bounded lookups require a full ID. Export and cleanup keep
|
|
30
|
+
their existing exact-identity rules. All 19 targeted cache/CLI regressions passed
|
|
31
|
+
with isolated process tests outside the restricted sandbox; no live cache changed.
|
|
32
|
+
Source only, pending publication. There is no input: ID namespace: inputs use the
|
|
33
|
+
attachment ID shown by list, while results can use result: or runtime-result:0x.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Update preview clarity — 2026-11-11
|
|
37
|
+
|
|
38
|
+
The confirmation screen now lists installed User and Wallet versions separately
|
|
39
|
+
from update targets. Wallet is read from the installed dependency, not inferred
|
|
40
|
+
from User's requested dependency. Unchanged versions are explicit; unreadable or
|
|
41
|
+
missing Wallet metadata shows “not confirmed” without blocking the normal repair
|
|
42
|
+
through npm. Controlled update tests cover all three cases and cancellation without
|
|
43
|
+
service/install mutation. This source change is not yet published; running-process
|
|
44
|
+
versions remain the responsibility of status after update/restart.
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## User 0.3.6 published — 2026-11-10
|
|
4
48
|
|
|
5
49
|
Pins published Wallet 0.3.3, retaining Protocol 0.14.3. Maintenance errors provide
|
|
6
50
|
same-request guidance without automatic write retries. Package manifest, lockfile
|
|
7
|
-
and update-pair metadata agree.
|
|
8
|
-
|
|
9
|
-
|
|
51
|
+
and update-pair metadata agree. Published through matching tag v0.3.6 after 391 behavior tests and independent
|
|
52
|
+
installation/lifecycle checks. Public npm metadata and SHA-512 match the verified
|
|
53
|
+
archive. No local data, Policy or service changes occur on publication.
|
|
10
54
|
|
|
11
55
|
|
|
12
56
|
## Maintenance guidance — 2026-11-10
|
|
13
57
|
|
|
14
58
|
Added explicit maintenance guidance without automatic write retries or replacement
|
|
15
59
|
purchases. Controlled HTTP/IPC tests verify that retry retains original request
|
|
16
|
-
identifiers. This is source verification, not live financial acceptance.
|
|
17
|
-
have not been published to npm.
|
|
60
|
+
identifiers. This is source verification, not live financial acceptance. These changes were subsequently published in 0.3.6; see the release record above.
|
|
18
61
|
|
|
19
62
|
|
|
20
63
|
## Acceptance bookkeeping — 2026-11-10
|
|
@@ -128,6 +128,11 @@ export async function runCacheManagement(
|
|
|
128
128
|
}
|
|
129
129
|
const usage =
|
|
130
130
|
"Usage: agentpay cache [info | list [PAGE] [input|output] [--state STATE] [--request ID | --order ID] | details ID | export ID PATH | clean | settings [KEY VALUE]]\nAdd --offline only when managing stopped Runtime storage. Wallet unlock is not required.";
|
|
131
|
+
if(action === "details" && rest.length === 0){
|
|
132
|
+
write("Choose a Cache ID from agentpay cache list. Copy the whole ID, including any prefix such as result:.");
|
|
133
|
+
write("Example: agentpay cache details result:5aa18b50\nA unique short ID needs at least 8 hexadecimal characters.");
|
|
134
|
+
return 2;
|
|
135
|
+
}
|
|
131
136
|
if (
|
|
132
137
|
invalidFilter ||
|
|
133
138
|
!["summary", "list", "details", "export", "clean", "settings"].includes(
|
|
@@ -192,7 +197,7 @@ export async function runCacheManagement(
|
|
|
192
197
|
...(rest[1] ? { purpose: rest[1] } : {}),
|
|
193
198
|
});
|
|
194
199
|
write(
|
|
195
|
-
`\n${r.total} entries · page ${page}\nDetails: agentpay cache details <Cache ID
|
|
200
|
+
`\n${r.total} entries · page ${page}\nDetails: agentpay cache details <Cache ID>\nCopy the full ID including its prefix, or use a unique short ID (8+ hex characters).`,
|
|
196
201
|
);
|
|
197
202
|
if (!r.items.length)
|
|
198
203
|
write("No saved results or attachments match this view.");
|
|
@@ -222,7 +227,32 @@ export async function runCacheManagement(
|
|
|
222
227
|
.join("")}`,
|
|
223
228
|
);
|
|
224
229
|
} else if (action === "details") {
|
|
225
|
-
|
|
230
|
+
let id=rest[0];
|
|
231
|
+
if(!/^(?:result:|runtime-result:0x)?[0-9a-f]{64}$/.test(id)){
|
|
232
|
+
if(!/^(?:result:|runtime-result:0x)?[0-9a-f]{8,63}$/.test(id)){
|
|
233
|
+
write('Use the Cache ID from agentpay cache list, or its first 8 or more hexadecimal characters.');
|
|
234
|
+
return 2;
|
|
235
|
+
}
|
|
236
|
+
// Resolve only read-only details. Bound enumeration; never guess from an
|
|
237
|
+
// incomplete list or turn a short display identifier into a cleanup key.
|
|
238
|
+
const matches=new Set();let offset=0,total;
|
|
239
|
+
do {
|
|
240
|
+
const page=await operate({action:'list',offset,limit:100});
|
|
241
|
+
if(page.total>1000 || total!==undefined&&page.total!==total || !page.items.length&&offset<page.total){
|
|
242
|
+
write('Use the full Cache ID; the cache is too large or changed during lookup.');return 2;
|
|
243
|
+
}
|
|
244
|
+
total=page.total;
|
|
245
|
+
for(const row of page.items){
|
|
246
|
+
const key=id.includes(':')?row.id:row.id.replace(/^(?:result:|runtime-result:0x)/,'');
|
|
247
|
+
if(key.startsWith(id))matches.add(row.id);
|
|
248
|
+
}
|
|
249
|
+
if(matches.size>1){write('More than one cache entry matches. Copy a longer or full Cache ID from agentpay cache list.');return 2;}
|
|
250
|
+
offset+=page.items.length;
|
|
251
|
+
}while(offset<total);
|
|
252
|
+
if(!matches.size){write('No cache entry matches. Run agentpay cache list and copy its Cache ID.');return 2;}
|
|
253
|
+
id=[...matches][0];
|
|
254
|
+
}
|
|
255
|
+
const r = await operate({ action, id });
|
|
226
256
|
write(
|
|
227
257
|
`${safe(r.filename)}\n ${contentSize(r)} · ${r.state}\n ${r.requestId ? "Request" : "Order"}: ${safe(r.requestId || r.orderId)}\n File key: ${safe(r.fileKey)}\n SHA-256: ${r.sha256 || "Not available"}\n Updated: ${new Date(r.updatedAtMs).toLocaleString()}`,
|
|
228
258
|
);
|
package/src/npm-update.mjs
CHANGED
|
@@ -7,6 +7,7 @@ import { access, appendFile, copyFile, chmod, lstat, mkdir, mkdtemp, open, readF
|
|
|
7
7
|
import { constants } from 'node:fs';
|
|
8
8
|
import { basename, dirname, isAbsolute, join, resolve } from 'node:path';
|
|
9
9
|
import { randomUUID } from 'node:crypto';
|
|
10
|
+
import { createRequire } from 'node:module';
|
|
10
11
|
import { createInterface } from 'node:readline/promises';
|
|
11
12
|
import { installedUserDir, resolveUserDataDir, rememberUserDataDir } from './local-data-directory.mjs';
|
|
12
13
|
import { installationDirectory } from './installation-paths.mjs';
|
|
@@ -91,7 +92,18 @@ export async function updateFromNpm({
|
|
|
91
92
|
await officialTest({userDir,dataDir,write});
|
|
92
93
|
return 0;
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
+
// Read the installed dependency, not the version requested by User's manifest.
|
|
96
|
+
// Missing/broken packages must not prevent npm from repairing the installation.
|
|
97
|
+
let walletVersion;
|
|
98
|
+
try {
|
|
99
|
+
const file = createRequire(join(userDir,'package.json')).resolve('@c4roa0/agentpay-wallet/package.json');
|
|
100
|
+
const wallet = JSON.parse(await readFile(file,'utf8'));
|
|
101
|
+
if(wallet.name === '@c4roa0/agentpay-wallet' && stable(wallet.version)) walletVersion = wallet.version;
|
|
102
|
+
} catch {}
|
|
103
|
+
const targetWallet = metadata.dependencies['@c4roa0/agentpay-wallet'];
|
|
104
|
+
write('Installed packages → update target');
|
|
105
|
+
write(`User ${current.version} → ${metadata.version}`);
|
|
106
|
+
write(`Wallet ${walletVersion === targetWallet ? `${walletVersion} (unchanged)` : `${walletVersion || 'not confirmed'} → ${targetWallet}`}`);
|
|
95
107
|
write(`Installation folder: ${target.prefix}`);
|
|
96
108
|
write('Background services will pause. Keys, permissions, Orders and cache are kept.');
|
|
97
109
|
if (!force && (await ask("Type 'confirm' to update, or 'q' to cancel")).trim().toLowerCase() !== 'confirm') {
|