feat(owletto): consolidate CLI profiles into lobu.toml#232
Conversation
There was a problem hiding this comment.
💡 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); |
There was a problem hiding this comment.
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 👍 / 👎.
bf9397c to
7268ddf
Compare
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.
34371cf to
1ce92ab
Compare
Picks up: fix(mac): open menu-bar deep-links as plain web URLs (#232) Before: d940389 After: ad46ebf
Summary
Stacked on #231. Replaces the separate
owletto.config.jsonreader in the owletto CLI with a[owletto.profiles.*]section inside the existinglobu.toml, so there's a single canonical config file for the workspace.lobuConfigSchemain@lobu/corewith anowletto.profilesblock (url,api_url,mcp_url,database_url,embeddings_url,env_file; passthrough for future fields).packages/owletto-cli/src/lib/config.tsto locatelobu.toml, parse viasmol-toml, validate againstlobuConfigSchema, and map snake_case TOML keys to the CLI's camelCaseProfileConfig.lobu.tomlexists 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-packagesbun run typecheckbun run lintlobu.tomlwith[owletto.profiles.local]+[owletto.profiles.staging]— default,--profile staging, and unknown profile all resolve correctly.