Skip to content

Custom goose distros without re-builds#8286

Open
jamadeo wants to merge 8 commits intomainfrom
jamadeo/goose-distros
Open

Custom goose distros without re-builds#8286
jamadeo wants to merge 8 commits intomainfrom
jamadeo/goose-distros

Conversation

@jamadeo
Copy link
Copy Markdown
Member

@jamadeo jamadeo commented Apr 3, 2026

Allows customizing a goose distribution without re-building. Can be done either within the electron package (resources dir) or externally in user data (e.g. ~/Library/Application\ Support/Goose/distro)

@jamadeo jamadeo requested a review from DOsinga April 3, 2026 14:18
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f756deb4f5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

distroDir = findDistroDir();
if (distroDir) {
const configPath = path.join(distroDir, 'distro.json');
distroConfig = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard distro.json parsing failures

Handle read/parse failures for distro.json here instead of letting them bubble out of module initialization. Because this code runs at import time, a malformed or unreadable ~/.../Goose/distro/distro.json will throw before the app finishes booting, and the desktop client cannot start at all. This is especially risky because the feature is meant for external, user-editable distro customization.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebbb89d955

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +32 to +34
if (distroExtensions) {
bundledExtensionsOverride = distroExtensions;
return distroExtensions;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate distro extensions payload before overriding defaults

loadBundledExtensions treats any truthy IPC response as a BundledExtension[], so a user-edited bundled-extensions.json that is valid JSON but not an array (for example, an object) will still be accepted here and later crash syncBundledExtensions when it iterates the value. In ConfigContext, that exception aborts extension sync/load for the session instead of falling back to the bundled defaults, which makes extension initialization brittle for the new external distro customization path.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25ad6db3f0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

window.appConfig?.get('DISTRO_CONFIGURATION_ENABLED') ?? true;
export const TELEMETRY_UI_ENABLED = window.appConfig?.get('DISTRO_TELEMETRY_UI_ENABLED') ?? true;
export const DICTATION_ALLOWED_PROVIDERS: string[] | null =
(window.appConfig?.get('DISTRO_DICTATION_ALLOWED_PROVIDERS') as string[] | null) ?? null;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate dictation provider overrides before exposing them

DISTRO_DICTATION_ALLOWED_PROVIDERS is blindly cast to string[] | null here, so a valid-but-mistyped distro value (for example a string or object in distro.json) will flow through as truthy and later hit .includes(...) in DictationSettings, throwing at runtime. Because distro files are explicitly user-editable customization points, this should be type-checked with Array.isArray and fall back to null when invalid.

Useful? React with 👍 / 👎.

@jamadeo
Copy link
Copy Markdown
Member Author

jamadeo commented Apr 7, 2026

so one thing that this kind of misses is how it interacts with goose CLI. Once a config is written, the CLI has it, but bundling distro information in the electron app should ideally only apply to customizations to that UI

@DOsinga DOsinga added the needs_human label to set when a robot looks at a PR and can't handle it label Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs_human label to set when a robot looks at a PR and can't handle it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants