run402 4.35.0 → 4.35.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/lib/cdn.mjs +9 -2
- package/lib/contacts.mjs +5 -5
- package/package.json +1 -1
package/lib/cdn.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Usage:
|
|
5
5
|
* run402 cdn wait-fresh <url> --sha <sha256> [--timeout <seconds>] [--project <id>]
|
|
6
6
|
*
|
|
7
|
-
* Wraps the SDK's `client.
|
|
7
|
+
* Wraps the SDK's `client.project(id).assets.waitFresh(...)`. Polls the gateway diagnose
|
|
8
8
|
* endpoint until the URL serves the expected SHA, then exits 0. On timeout,
|
|
9
9
|
* exits 1 (agent shell loops can chain a fallback action).
|
|
10
10
|
*
|
|
@@ -108,7 +108,14 @@ async function waitFresh(projectId, argv) {
|
|
|
108
108
|
|
|
109
109
|
const timeoutMs = (opts.timeout ?? 60) * 1000;
|
|
110
110
|
try {
|
|
111
|
-
|
|
111
|
+
// TWO things were wrong here, and together they meant this command threw
|
|
112
|
+
// "Cannot read properties of undefined" on EVERY invocation — it has
|
|
113
|
+
// never worked. `blobs` is not a namespace at all (the surface is
|
|
114
|
+
// `assets`, renamed at some point without this call site following), and
|
|
115
|
+
// the scoped handle is a thenable that must be AWAITED before its
|
|
116
|
+
// namespaces exist. Found by the SDK-method gate.
|
|
117
|
+
const scoped = await getSdk().project(resolvedId);
|
|
118
|
+
const result = await scoped.assets.waitFresh({
|
|
112
119
|
url,
|
|
113
120
|
sha256: opts.sha.toLowerCase(),
|
|
114
121
|
timeoutMs,
|
package/lib/contacts.mjs
CHANGED
|
@@ -318,8 +318,8 @@ async function listContacts(args) {
|
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
try {
|
|
321
|
-
allowanceAuthHeaders("/agent/v1/notifications");
|
|
322
|
-
const res = await sdk.admin.
|
|
321
|
+
allowanceAuthHeaders("/agent/v1/notifications/channels");
|
|
322
|
+
const res = await sdk.admin.channels.list();
|
|
323
323
|
for (const ch of res.channels ?? []) {
|
|
324
324
|
rows.push({ kind: "telegram", id: ch.binding_id ?? ch.id, ...ch });
|
|
325
325
|
}
|
|
@@ -353,11 +353,11 @@ async function removeContact(args) {
|
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
allowanceAuthHeaders("/agent/v1/notifications");
|
|
357
|
-
const chans = await sdk.admin.
|
|
356
|
+
allowanceAuthHeaders("/agent/v1/notifications/channels");
|
|
357
|
+
const chans = await sdk.admin.channels.list();
|
|
358
358
|
const chan = (chans.channels ?? []).find((c) => (c.binding_id ?? c.id) === id);
|
|
359
359
|
if (chan) {
|
|
360
|
-
console.log(JSON.stringify({ kind: "telegram", ...(await sdk.admin.
|
|
360
|
+
console.log(JSON.stringify({ kind: "telegram", ...(await sdk.admin.channels.revokeTelegram(id)) }, null, 2));
|
|
361
361
|
return;
|
|
362
362
|
}
|
|
363
363
|
fail({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "run402",
|
|
3
|
-
"version": "4.35.
|
|
3
|
+
"version": "4.35.1",
|
|
4
4
|
"description": "CLI for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|