@companion-ai/feynman 0.5.30 → 0.5.32
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/RELEASES.md +8 -0
- package/dist/model/commands.js +12 -1
- package/dist/pi/settings.js +10 -1
- package/package.json +1 -1
package/RELEASES.md
CHANGED
|
@@ -6,6 +6,14 @@ GitHub release notes are generated from the matching `## vX.Y.Z` section in this
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## v0.5.32 - 2026-10-09
|
|
10
|
+
|
|
11
|
+
- **A rejected sign-in now says what to do.** When `feynman model login` or `feynman setup` ended with `invalid_grant`, usually after Sign in with ChatGPT, Feynman printed only the provider's error. It now explains that a stale browser session usually causes it: sign out of the provider's site or use a private window, then run `feynman model login <provider>` again. For ChatGPT it also suggests `feynman model login openai-codex`.
|
|
12
|
+
|
|
13
|
+
## v0.5.31 - 2026-10-09
|
|
14
|
+
|
|
15
|
+
- **Feynman starts again if you once installed the old `session-search` package.** Its entry stayed in `~/.feynman/agent/settings.json` after the preset was removed. On Node 24 that made every launch fail installing it, or crash Pi through its SQLite module or its extension. Feynman now drops the entry on launch; Feynman's sessions are searchable with `grep` or `rg` over `~/.feynman/sessions`.
|
|
16
|
+
|
|
9
17
|
## v0.5.30 - 2026-10-07
|
|
10
18
|
|
|
11
19
|
- **Pi 1.1.0.** Claude browser login no longer fails with "localhost refused to connect" when port 53692 is reserved or in use (common with Hyper-V/WSL on Windows); it falls back to a free port. "Servers are busy" provider errors and Mistral stream errors are retried instead of ending the turn, fewer requests fail on context limits, and session costs count long prompts correctly. Adds Claude Haiku 5.5; Feynman's default for Anthropic stays Claude Opus.
|
package/dist/model/commands.js
CHANGED
|
@@ -742,6 +742,15 @@ export function getOrCreateDeviceId(authPath) {
|
|
|
742
742
|
writeFileSync(settingsPath, `${JSON.stringify({ ...settings, deviceId }, null, 2)}\n`, "utf8");
|
|
743
743
|
return deviceId;
|
|
744
744
|
}
|
|
745
|
+
// A provider answers invalid_grant when it rejects the authorization code,
|
|
746
|
+
// usually because a stale session in the browser interfered with the sign-in.
|
|
747
|
+
// Signing out there (or using a private window) and retrying fixes it.
|
|
748
|
+
export function describeOAuthLoginFailure(providerId, error) {
|
|
749
|
+
if (!(error instanceof Error) || !error.message.includes("invalid_grant"))
|
|
750
|
+
return error;
|
|
751
|
+
const alternative = providerId === "openai" ? " Or sign in with `feynman model login openai-codex` instead." : "";
|
|
752
|
+
return new Error(`${error.message}\nThe sign-in was rejected, usually because of a stale browser session. Sign out of the provider's site in your browser, or use a private window, then run \`feynman model login ${providerId}\` again.${alternative}`);
|
|
753
|
+
}
|
|
745
754
|
export async function loginModelProvider(authPath, providerId, settingsPath) {
|
|
746
755
|
if (providerId) {
|
|
747
756
|
const resolvedProvider = await resolveModelProviderForCommand(authPath, providerId);
|
|
@@ -809,7 +818,9 @@ export async function loginModelProvider(authPath, providerId, settingsPath) {
|
|
|
809
818
|
}
|
|
810
819
|
},
|
|
811
820
|
signal: abortController.signal,
|
|
812
|
-
}, { getDeviceId: () => getOrCreateDeviceId(authPath) })
|
|
821
|
+
}, { getDeviceId: () => getOrCreateDeviceId(authPath) }).catch((error) => {
|
|
822
|
+
throw describeOAuthLoginFailure(provider.id, error);
|
|
823
|
+
});
|
|
813
824
|
printSuccess(`Model provider login complete: ${provider.id}`);
|
|
814
825
|
await maybeSetRecommendedDefaultModel(settingsPath, authPath);
|
|
815
826
|
return true;
|
package/dist/pi/settings.js
CHANGED
|
@@ -138,9 +138,18 @@ function packageSourceName(source) {
|
|
|
138
138
|
// sessions (pi-subagents) see the same resources as the main session. Entries
|
|
139
139
|
// for those packages from any other install or version are replaced; npm
|
|
140
140
|
// entries for them are the pinned core list written by Feynman <= 0.4.0.
|
|
141
|
+
// @kaiserlich-dev/pi-session-search, the retired session-search preset, is
|
|
142
|
+
// dropped: it never saw Feynman's sessions, and on Node 24 its better-sqlite3
|
|
143
|
+
// fails to install or aborts Pi on exit, so Feynman could not start.
|
|
141
144
|
export function reconcileFeynmanPackages(packages, appRoot) {
|
|
142
145
|
const feynmanName = JSON.parse(readFileSync(join(appRoot, "package.json"), "utf8")).name;
|
|
143
|
-
const managedNames = new Set([
|
|
146
|
+
const managedNames = new Set([
|
|
147
|
+
feynmanName,
|
|
148
|
+
"@companion-ai/alpha-hub",
|
|
149
|
+
"pi-otel",
|
|
150
|
+
"@kaiserlich-dev/pi-session-search",
|
|
151
|
+
...BUNDLED_PI_PACKAGES,
|
|
152
|
+
]);
|
|
144
153
|
const configured = Array.isArray(packages) ? packages : [];
|
|
145
154
|
const userPackages = configured.filter((entry) => {
|
|
146
155
|
const source = typeof entry === "string" ? entry : entry.source;
|