Integrate runtime support for Moss Desktop release workflow#213
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4437d4246c
ℹ️ 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".
| engine: text("engine").notNull().default("claude-code"), // "claude-code" | "codex" | "hermes" | "custom-acp" | ||
| engineSessionId: text("engine_session_id"), // Native engine session ID for resume | ||
| engineConfigDir: text("engine_config_dir"), // Per-engine config/session projection dir | ||
| modelId: text("model_id"), // Last selected runtime model for this sub-chat | ||
| runtimeMetadata: text("runtime_metadata"), // JSON object for engine-specific metadata |
There was a problem hiding this comment.
Add a migration for the new sub-chat columns
These fields are used by the new runtime routers, but the commit does not add a Drizzle migration; the latest file under drizzle/ is still 0007_clammy_grim_reaper.sql, which only adds projects.icon_path. Since initDatabase() only applies migrations, upgraded installs with an existing SQLite DB will keep the old sub_chats table and any select/insert touching engine, engine_session_id, model_id, etc. will fail with no such column; add an ALTER TABLE sub_chats ... migration for these columns.
Useful? React with 👍 / 👎.
| @@ -206,7 +260,7 @@ export const selectedProjectAtom = atomWithWindowStorage<SelectedProject>( | |||
|
|
|||
| export const lastSelectedAgentIdAtom = atomWithStorage<string>( | |||
| "agents:lastSelectedAgentId", | |||
| "claude-code", | |||
| "hermes", | |||
There was a problem hiding this comment.
Wire Hermes into the selector before defaulting to it
Changing the stored default to hermes does not actually make new chats use Hermes because NewChatForm still builds its selectable agents list from only Claude/Cursor/Codex and falls back to the first enabled entry when this atom value is not found. On a fresh profile this therefore resolves back to Claude Code and creates chats with engine: "claude-code"; add Hermes to the selector/runtime flow or keep the default on an engine the form can select.
Useful? React with 👍 / 👎.
| import { mkdir, readFile, readdir, rm, writeFile } from "fs/promises" | ||
| import { homedir } from "os" | ||
| import { join, resolve, sep } from "path" | ||
| import { parseTOML, stringifyTOML } from "confbox/toml" |
There was a problem hiding this comment.
Declare confbox before importing it in main code
This new main-process module is imported when the window IPC handlers are registered, but confbox is not declared in package.json dependencies; it only appears in the lockfile as a transitive dependency. In a production/pruned install or after an unrelated dependency update stops hoisting it, startup or the Codex automation handlers can fail with Cannot find module 'confbox/toml'; add confbox as a direct dependency or avoid the external import.
Useful? React with 👍 / 👎.
Summary
This PR lands the runtime support closure required before the Moss Desktop release workflow publication PR can be repaired or merged.
It contains the verified runtime, provider, MCP/session, shared-resource, release-readiness, and release-script support paths that the workflow contract depends on. The workflow-only PR should remain blocked until this support closure lands.
Verification
.moss/team/generated/release-workflow-runtime-integration.patch089e9afe203d4fff5cfcda213a61d297f7a83573ab3e6b196ef4fa4a96894aba68 pass,0 fail,308 expect() calls, across 13 filesCommand run:
bun test src/main/lib/moss-account/entitlement.test.ts src/main/lib/moss-source/provider-config.test.ts src/main/lib/mcp-stdio-compat.test.ts src/main/lib/trpc/routers/chat-runtime-selection.test.ts src/main/lib/trpc/routers/codex-mcp-session.test.ts src/main/lib/codex-automations.test.ts src/main/lib/shared-resources/registry.test.ts src/main/lib/shared-resources/codex-native-resources.test.ts src/main/lib/shared-resources/governance.test.ts src/renderer/features/agents/lib/agent-runtime.test.ts src/renderer/features/agents/lib/models.test.ts src/renderer/features/plugins/plugin-entry-surfaces.test.ts src/shared/codex-runtime-notices.test.tsRelease Gate Notes
main.