@kurtbruns/kestrel 1.21.0 → 1.22.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.
@@ -2,27 +2,29 @@
2
2
 
3
3
  A new release of Kestrel is a new version of the `@kurtbruns/kestrel` package. Upgrading changes the version your instance's repository names, brings in the release's database changes, and deploys. The app can't undo a database change, so you note a restore point first.
4
4
 
5
- In this guide, you read what changed, install the release, and note where your database stands. Then you apply the database changes, deploy, and check the new version. If you run a staging environment, upgrade it first, and repeat each step for production once it checks out.
5
+ In this guide, you first read what changed and check that your repository is clean, which changes nothing. Then you install the release, note where your database stands, apply the database changes, deploy, and check the new version. If you run a staging environment, upgrade it first, and repeat each step for production once it checks out.
6
6
 
7
- ## 1. Read what changed
7
+ ## 1. Check before you change anything
8
8
 
9
- A release can ask you to change a setting or a record before it runs. The changelog says so, release by release.
9
+ A release can ask you to change a setting or a record before it runs. The changelog says so, release by release. The upgrade also has to start from a clean repository.
10
10
 
11
11
  1. Find the version you run. In the editor, open the **Docs** or **API** tab. The foot of its contents list shows the version, then the commit. Your instance's `package.json` names it too, as the version of `@kurtbruns/kestrel`.
12
12
 
13
13
  1. Read the [release notes](https://github.com/kurtbruns/kestrel/releases) for every version after yours, up to the one you're moving to. Each release opens with an **Upgrading from…** paragraph that says what to do. Its **Breaking** entries say what changed underneath you.
14
14
 
15
- ## 2. Install the release
16
-
17
- Each step here changes only your instance's repository. Nothing reaches your deployed app until section 5.
18
-
19
- 1. Start from a clean repository, so the upgrade's commit holds only the upgrade and going back undoes nothing else:
15
+ 1. Check that your repository is clean, so the upgrade's commit holds only the upgrade and going back undoes nothing else:
20
16
 
21
17
  ```bash
22
18
  git status
23
19
  ```
24
20
 
25
- If it lists anything, commit it first, as its own commit, or move it out of the repository.
21
+ It has to say `nothing to commit, working tree clean`. If it lists anything, untracked files included, the upgrade waits until it doesn't.
22
+
23
+ Nothing has changed yet. If you aren't going on, stop here.
24
+
25
+ ## 2. Install the release
26
+
27
+ Each step here changes only your instance's repository. Nothing reaches your deployed app until section 5.
26
28
 
27
29
  1. Install the release. Replace `X.Y.Z` with its version:
28
30
 
@@ -97,6 +97,7 @@ Nothing on your list changes. Kestrel refuses a file it can't read with certaint
97
97
  [Connect Claude](08-connect-claude.md) covers connecting it. Most failures are in your instance's Cloudflare Access setup, and [Allow Claude to connect](../guides/01-allow-claude.md#check-it) lists their fixes. When connecting fails:
98
98
 
99
99
  - **Claude says it couldn't connect, or the sign-in failed.** Check that the connector's address is your publication's address followed by `/api/mcp`, and that your instance is deployed, not running on your own computer. If both are right, your instance's Access setup needs the fix.
100
+ - **Claude Code says Dynamic Client Registration was rejected.** `claude mcp login` fails with `Dynamic Client Registration rejected (HTTP 404)`, and a new session shows the connector as failed with the same words. Start `claude`, run `/mcp`, choose the connector, choose Authenticate, and sign in in the browser. The sign-in is stored, so later sessions connect. Nothing on your instance is wrong. `claude mcp login` looks for sign-in details at the standard well-known addresses before reading your instance's own answer, so it never reaches Access. The MCP specification has a client do that only as a fallback.
100
101
  - Signing in shows `invalid_target`, or `kestrel login` says your instance "doesn't offer a sign-in for programs". Your instance's Access setup needs the fix.
101
102
  - `kestrel login` or `kestrel api` reports a `401`. Access signed you in, but Kestrel refused the sign-in, and your instance's Access setup needs the fix. If either names `access_unidentified`, it's the "Access let you in" problem below. If `kestrel api` says your sign-in has ended, sign in again as [Connect Claude](08-connect-claude.md#claude-code) describes.
102
103
  - `kestrel api` says it couldn't renew your sign-in because its Access team answered 404 (not found). First check which instance it called: when you don't name one, it prints a line naming it before "the only instance you're signed in to", which may not be the one you meant. Name yours with `--url`. If it is yours, the Access team domain was most likely renamed or removed since you signed in. Sign in again with `npx kestrel login` and your instance's address, which finds the team it uses now.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kurtbruns/kestrel",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "type": "module",
5
5
  "description": "An open-source, self-hosted newsletter app where you own the list and the archive. Work in the editor, or just ask Claude. Runs on Cloudflare Workers.",
6
6
  "license": "MIT",
@@ -26,14 +26,15 @@ export const KESTREL_CLI_CLIENT = "kestrel-cli";
26
26
 
27
27
  /**
28
28
  * The name a request carries unless told another: Claude Code's when Claude Code ran this
29
- * process, and the command's own otherwise, so what a person runs never reads as Claude's.
30
- * CLAUDE_CODE_CHILD_SESSION is set only by Claude Code, on what its tools launch. CLAUDECODE
29
+ * process, and the command's own otherwise, as in a terminal a person opened themselves.
30
+ * CLAUDE_CODE_CHILD_SESSION is set only by Claude Code, on what it launches. CLAUDECODE
31
31
  * won't do: IDE extensions also set it in their integrated terminals, where a person types.
32
32
  *
33
33
  * That makes the name truthful in the normal case, not proven, as with every client name. Claude
34
- * Code older than v2.1.172 doesn't set the variable, so its calls read as the command's own; and
35
- * a `screen` session or a background launcher Claude Code started passes it on, so what a person
36
- * later runs inside one reads as Claude Code's.
34
+ * Code older than v2.1.172 doesn't set the variable, so its calls read as the command's own; a
35
+ * command typed after Claude Code's `!` runs in its shell, with output landing in the transcript,
36
+ * so it reads as Claude Code's; and a `screen` session or a background launcher Claude Code
37
+ * started passes the variable on, so what a person later runs inside one reads as Claude Code's.
37
38
  */
38
39
  export function defaultClient() {
39
40
  return process.env.CLAUDE_CODE_CHILD_SESSION === "1" ? CLAUDE_CODE_CLIENT : KESTREL_CLI_CLIENT;
@@ -6,12 +6,13 @@ argument-hint: "[X.Y.Z]"
6
6
 
7
7
  # Upgrade the instance
8
8
 
9
- An upgrade moves the instance to a newer release of `@kurtbruns/kestrel`. The guide's upgrade page is the procedure: `node_modules/@kurtbruns/kestrel/docs/guides/07-upgrade.md`. Read it now, and again after installing the new release, whose page then replaces it. Follow it section by section, running each step's commands as written. This skill holds only what the page leaves to you, and never adds or replaces a step. If anything here seems to disagree with the page, the page wins; say so.
9
+ An upgrade moves the instance to a newer release of `@kurtbruns/kestrel`. The guide's upgrade page is the procedure: `node_modules/@kurtbruns/kestrel/docs/guides/07-upgrade.md`. Read it now, and again after installing the new release, whose page then replaces it from the step after the install. Follow it section by section, running each step's commands as written. This skill holds only what the page leaves to you, and never adds or replaces a step. If anything here seems to disagree with the page, the page wins; say so.
10
10
 
11
11
  ## What's yours to judge
12
12
 
13
- - **Which release, and what it asks.** The installed version is in `package.json`. Read every changelog section between it and the target (the release notes at `https://github.com/kurtbruns/kestrel/releases`, or the new `CHANGELOG.md` once installed). Name each **Breaking** entry and each step in an *Upgrading* paragraph, and say what it means for this instance.
14
- - **Anything not yet committed.** If the page's `git status` lists anything, show the person and ask whether to commit it first, as its own commit. If they'd rather not, the upgrade waits until the repository is clean. Never let it go into the upgrade's commit: the page's **Go back** reverts that commit, and would undo it too.
13
+ - **Which release, and what it asks.** The installed version is in `package.json`. Read every changelog section between it and the target, in the release notes at `https://github.com/kurtbruns/kestrel/releases`, and work out what each **Breaking** entry and each step in an *Upgrading* paragraph means for this instance.
14
+ - **Anything not yet committed.** If the page's `git status` lists anything, report what it lists and stop until it lists nothing. How it gets clean is the person's call, so don't offer to commit it or move it.
15
+ - **The go-ahead.** The page's section 1 changes nothing, and neither do you until this is settled. Name the releases, each **Breaking** entry, and each *Upgrading* step, say what each means for this instance, and ask whether to go ahead. Run nothing from section 2 until they say yes. "Not now" ends the upgrade with nothing changed.
15
16
  - **The context check.** `npm run check-context` compares this repository's Claude files with the release's. Show the person what it reports. When Kestrel changed a file the person has edited, show what changed, merge it with their edits, and run the command it suggests to record the merge. A change marked as bearing on safety comes first.
16
17
  - **The local try.** Ask the person to try what they care about on `npm run dev` before anything reaches production.
17
18
  - **The checks.** Report each one's result. A failure stops the upgrade until it's fixed or the person decides.