Skip to content

feat(owletto): consolidate CLI profiles into lobu.toml#232

Closed
buremba wants to merge 1 commit into
feat/owletto-absorb-contentfrom
feat/owletto-consolidate-profiles
Closed

feat(owletto): consolidate CLI profiles into lobu.toml#232
buremba wants to merge 1 commit into
feat/owletto-absorb-contentfrom
feat/owletto-consolidate-profiles

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented Apr 20, 2026

Summary

Stacked on #231. Replaces the separate owletto.config.json reader in the owletto CLI with a [owletto.profiles.*] section inside the existing lobu.toml, so there's a single canonical config file for the workspace.

  • Extend lobuConfigSchema in @lobu/core with an owletto.profiles block (url, api_url, mcp_url, database_url, embeddings_url, env_file; passthrough for future fields).
  • Rewrite packages/owletto-cli/src/lib/config.ts to locate lobu.toml, parse via smol-toml, validate against lobuConfigSchema, and map snake_case TOML keys to the CLI's camelCase ProfileConfig.
  • When lobu.toml exists but declares no [owletto.profiles.*], fall back to the active session / built-in default (matches behavior when no config file is found), instead of erroring.

Test plan

  • make build-packages
  • bun run typecheck
  • bun run lint
  • Smoke test: lobu.toml with [owletto.profiles.local] + [owletto.profiles.staging] — default, --profile staging, and unknown profile all resolve correctly.

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: 34371cfeab

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

throw new ValidationError(`Invalid TOML syntax in ${configPath}: ${msg}`);
}

const result = lobuConfigSchema.safeParse(parsed);
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 Accept profile-only lobu.toml files

Validating lobu.toml with lobuConfigSchema.safeParse(parsed) requires the top-level agents table, so owletto now fails on files that only define [owletto.profiles.*] (or have unrelated agent-schema issues) even when the selected profile itself is valid. This is a regression from the previous profile-only config behavior and breaks CLI profile resolution for users outside a full Lobu agent workspace.

Useful? React with 👍 / 👎.

@buremba buremba force-pushed the feat/owletto-absorb-content branch from bf9397c to 7268ddf Compare April 20, 2026 16:11
Moves the owletto CLI's profile config from a separate `owletto.config.json`
into the existing `lobu.toml` under `[owletto.profiles.*]`, so there is a
single source of truth for workspace config.

- Extend `lobuConfigSchema` in `@lobu/core` with an `owletto.profiles` section
  (url, api_url, mcp_url, database_url, embeddings_url, env_file; passthrough
  allowed for future fields).
- Rewrite `packages/owletto-cli/src/lib/config.ts` to locate `lobu.toml`, parse
  via `smol-toml`, validate with `lobuConfigSchema`, and map snake_case TOML
  keys to the CLI's camelCase `ProfileConfig`.
- When `lobu.toml` exists but has no `[owletto.profiles.*]`, fall back to the
  active session / built-in default (same behavior as when no config is
  found), instead of erroring.
@buremba buremba force-pushed the feat/owletto-consolidate-profiles branch from 34371cf to 1ce92ab Compare April 20, 2026 16:11
@buremba buremba deleted the branch feat/owletto-absorb-content April 20, 2026 16:23
@buremba buremba closed this Apr 20, 2026
buremba added a commit that referenced this pull request May 26, 2026
Picks up: fix(mac): open menu-bar deep-links as plain web URLs (#232)

Before: d940389
After:  ad46ebf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant