@maxceem/agw 0.6.4 → 0.7.0

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 (2) hide show
  1. package/dist/agw.mjs +8 -5
  2. package/package.json +2 -2
package/dist/agw.mjs CHANGED
@@ -6,7 +6,7 @@ var __export = (target, all) => {
6
6
  };
7
7
 
8
8
  // <define:__AGW_MANIFEST__>
9
- var define_AGW_MANIFEST_default = { version: "0.6.4", wrangler: "4.96.0", upgradeFrom: ["0.6.4", "0.6.3", "0.6.2", "0.6.1", "0.6.0", "0.5.2", "0.5.1", "0.5.0", "0.4.0"], release: { url: "https://github.com/maxceem/app-ai-gateway/releases/download/v0.6.4/gateway-0.6.4.tar.gz", sha256: "cd40eaa3809e18174d57091191363f14cf5ca5c00850e826ccb0d5710f7ce80c", manifest: "bdb9f85fc16464e81f03c0f14d3127b804e06ad97f4d31f0d50f8d205d1d1e7c" } };
9
+ var define_AGW_MANIFEST_default = { version: "0.7.0", wrangler: "4.96.0", upgradeFrom: ["0.7.0", "0.6.4", "0.6.3", "0.6.2", "0.6.1", "0.6.0", "0.5.2", "0.5.1", "0.5.0", "0.4.0"], release: { url: "https://github.com/maxceem/app-ai-gateway/releases/download/v0.7.0/gateway-0.7.0.tar.gz", sha256: "9cbcb05a1b611470c03e522af7e34d786a4d7e9889b589bac7603695187575bd", manifest: "707e02868d2133307ff4d71a3fbcb7abe6d0b62cbc9498fab5b7d3f6d2d96fb0" } };
10
10
 
11
11
  // src/main.ts
12
12
  import { Writable as Writable2 } from "node:stream";
@@ -19059,7 +19059,7 @@ var CATALOG = {
19059
19059
  path: "/v1/cli/bootstrap",
19060
19060
  tags: ["CLI"],
19061
19061
  summary: "Initialize a recoverable CLI account",
19062
- description: "Persist the random token before sending: its digest is the operation's id, and an identical retry returns the same account and protected credential during its exchange window. Cloud initialization is public and rate limited. Self-hosted initialization is public too and creates the deployment's single initial account, so whoever initializes an empty deployment first owns it, exactly as its first console registration does; it is not rate limited, because the only thing a limit could refuse on a deployment nobody owns yet is its own installer retrying, and every caller after the first is refused permanently anyway. All responses are no-store.",
19062
+ description: "Persist the random token before sending: its digest is the operation's id, and an identical retry returns the same account and protected credential during its exchange window. Cloud initialization is public and rate limited. Self-hosted initialization creates the deployment's single unclaimed account, and only for the token whose SHA-256 the deploying CLI stored as the Worker secret `CLI_BOOTSTRAP_TOKEN_DIGEST`; any other token, or a deployment without that secret, is refused with 403. It is not rate limited, because only the deploying CLI can pass it, and a limit would refuse that CLI retrying a deployment whose storage has not come up yet. All responses are no-store.",
19063
19063
  security: "public",
19064
19064
  request: CliBootstrapRequestSchema,
19065
19065
  response: CliOperationSchema,
@@ -20308,7 +20308,7 @@ async function openBrowser(url2) {
20308
20308
  }
20309
20309
 
20310
20310
  // src/deployment.ts
20311
- import { randomUUID } from "node:crypto";
20311
+ import { createHash as createHash4, randomUUID } from "node:crypto";
20312
20312
  import { writeFile as writeFile3, unlink as unlink2 } from "node:fs/promises";
20313
20313
  import { join as join4 } from "node:path";
20314
20314
 
@@ -20850,7 +20850,7 @@ async function configFile(ctx, journal, artifact) {
20850
20850
  ],
20851
20851
  vars: {
20852
20852
  ...artifact.config.vars,
20853
- ALLOW_ADDITIONAL_REGISTRATIONS: "false",
20853
+ ALLOWED_REGISTRATION_EMAILS: "",
20854
20854
  ...journal.vars,
20855
20855
  DEPLOYMENT_ID: journal.id
20856
20856
  },
@@ -21201,7 +21201,10 @@ async function install(ctx, cf, journal, artifact, url2, domain2) {
21201
21201
  });
21202
21202
  const secrets = {
21203
21203
  ...journal.secrets,
21204
- SECRET_VAULT_LOCAL_KEK_V1: await ctx.store.vaultKey(journal.id)
21204
+ SECRET_VAULT_LOCAL_KEK_V1: await ctx.store.vaultKey(journal.id),
21205
+ // The Worker creates its account only for the token this digest is of, so
21206
+ // the account is this CLI's however soon anyone else finds the address.
21207
+ CLI_BOOTSTRAP_TOKEN_DIGEST: createHash4("sha256").update(journal.bootstrap.token).digest("hex")
21205
21208
  };
21206
21209
  const secretPath = join4(file2.directory, "secrets.json");
21207
21210
  await writeFile3(secretPath, JSON.stringify(secrets), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxceem/agw",
3
- "version": "0.6.4",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "description": "Manage App AI Gateway from a terminal or coding agent: providers, iOS and server apps, usage, and self-hosted deployment on Cloudflare",
6
6
  "keywords": [
@@ -25,7 +25,7 @@
25
25
  "directory": "cli"
26
26
  },
27
27
  "bugs": "https://github.com/maxceem/app-ai-gateway/issues",
28
- "upgradeFrom": ["0.6.3", "0.6.2", "0.6.1", "0.6.0", "0.5.2", "0.5.1", "0.5.0", "0.4.0"],
28
+ "upgradeFrom": ["0.6.4", "0.6.3", "0.6.2", "0.6.1", "0.6.0", "0.5.2", "0.5.1", "0.5.0", "0.4.0"],
29
29
  "license": "Apache-2.0",
30
30
  "bin": {
31
31
  "agw": "dist/agw.mjs"