Commit Graph
277 Commits
Author SHA1 Message Date
Igor Bronovskyi 7c613b4ccf fix(native): name the pipe deadline when the child has exited (#1389)
Split out of #640 at review request: a translation PR is the wrong place for a process-handling change.

## What

When the direct child exits while a captured reader is still unfinished — a descendant holding a pipe, or output still being drained — `run_command_with_output` waits for the readers under the same deadline. On timeout the error said `<program> didn't finish within N seconds`, although the child had finished. It now says `<program> exited, but its output was still being captured at the N second deadline`, which names the shared deadline and does not claim the pipe is still open (`20026ee`).

In `inherited_pipe_tests`, an attempt whose direct child hit its own deadline before the holder filled both pipes proves nothing about inherited pipes, so the test retries it with a longer deadline, as it already did for an attempt that never reached the marker. The retry ceiling is a named `MAX_DEADLINE`.

## Testing

Run locally on Linux x86_64: `cargo test -p artcraft-launcher-native inherited_pipe_tests` passes (1 passed, 2 ignored fixtures), `cargo clippy -p artcraft-launcher-native --all-targets --locked -- -D warnings` is clean, and `cargo fmt --all -- --check` is clean. The wasm check was not run because this crate is not part of the web build. Hosted CI is left to run.
2026-11-15 17:30:01 +01:00
b24238a7d6 Download one app at a time, in the order they're shown (#403)
* feat(install): download one app at a time, in screen order

Downloads running side by side split the connection and each one crawls.
Apps now take turns: a download asked for while another is running waits
(shown as "Waiting for another download…", cancellable), and waiting
downloads start in the order the apps are listed on screen, following the
current sort. A download already finished on an earlier try skips the line,
and the next download starts as soon as the previous one is verified, while
that app installs.

- native: new `downloads::Downloads` queue (`install::DOWNLOADS`)
- protocol: `JobPhase::Queued`, `Command::DownloadOrder`
- ui: sends the sorted app order when it changes; new string in every catalog

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(install): queue apps hidden by a filter or search in suite order

Only the apps on screen are sent as the download order; the queue puts any
other waiting app after them, in suite order, instead of by its place in the
current sort. Tests cover a hidden app, a search, and the queue's fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(install): let users choose how many downloads run at once

A "Simultaneous downloads" setting (1 to 4, default 1) in Settings > Updates,
sent in BackendOptions next to prereleases. The download queue counts running
downloads against it instead of allowing one: raising it starts waiting
downloads at once, lowering it lets running ones finish. Settings saved before
it existed allow one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(install): take a place in the download line when a job starts

Jobs joined the line only on reaching their download, so with nothing
downloading the first to get there started, even below others on screen: an
Update all batch started in suite order. start_job now takes the job's place
(Downloads::join) before its thread runs, and places not yet at their download
count when choosing who goes next. A place dropped before its turn (the job
failed, was stopped or found its file already downloaded) leaves the line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(install): document the functions the download queue touches

CodeRabbit's docstring coverage check was at 38% of the functions in the diff.
Doc comments on the queue, its tests, and the backend and UI functions that
changed. No code changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(install): give the platform-gated test jobs a place in line

Two Job literals in tests that only build on Linux and Windows
(a_downgrade_refuses_anything_but_an_msi_over_an_msi_install and
a_mac_downgrade_goes_ahead_without_a_package_to_put_back) were missing the new
place field, so the native tests didn't compile there.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(install): give the Windows MSI test a place in line, align the queued wording

The Windows-only integration test built a Job without the new place
field. The compact launcher-update row said "Waiting for other installs…"
for a queued download; it now matches the detail row.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* feat(install): let users turn the download limit off

"No limit" in Settings → Updates lets every download run at once, as the
launcher did before. The default stays at one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(install): keep the download queue building after the rebase onto main

Main grew new Job fields, two more UI catalogs (zh-TW, ka) and a settings
test that picked the nearest combo box. The test Job literal and both
catalogs get what the queue added, and the test now finds the install-format
chooser by its label, since the downloads dropdown sits closer to it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MS5Qb6riBMzoujge5GuGZF

* fix(install): join the whole batch to the download line before any worker starts

An "Update all" started each worker right after joining the line, so the
first worker could take a free slot before a row above it had joined.
install_all now prepares every job first and starts the workers after.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MS5Qb6riBMzoujge5GuGZF

* test(install): check the batch path itself takes every place before a worker starts

The test called prepare_job directly, so putting install_all back to
starting each job as it is prepared would still have passed. The backend
now runs workers through a spawn function a test can replace; the test
holds the workers and checks, at each start, that all apps are in line.
Reverting install_all makes it fail.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MS5Qb6riBMzoujge5GuGZF

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: launcher-403-review <review@local>
2026-11-14 23:03:07 -06:00
Dylan M. Taylor 13b200c536 native: require local-mirror for loopback feed overrides (#1473) 2026-11-14 16:07:19 -05:00
Dylan M. Taylor 148a0869a7 native: do not follow redirects on token-bearing API requests (#1472) 2026-11-14 16:04:56 -05:00
FredAppsandFredApps c0735b65ac Linux: detect versions of renamed AppImages (#471) (#499)
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-14 21:53:12 +01:00
FredApps ba56c4587f Merge pull request #1432 from davidmann4/agents-gateway
feat(settings): AI agents reach every Craft app through one MCP entry, with the gateway shipped
2026-11-14 11:36:06 +01:00
FredApps 76727879f3 fix(agents): preserve customized MCP client entries 2026-11-14 11:11:22 +01:00
FredApps ceb0853fb0 which: return an absolute path for a relative PATH entry, so a detected binary stays launchable 2026-11-13 20:44:24 +01:00
FredApps 38300fa7d6 Merge branch 'main' into fix/launch-bare-name-location 2026-11-13 20:43:44 +01:00
David MannandClaude Opus 5.5 02926e1e9f fix(agents): keep an ArtCraft MCP entry the launcher did not write
The launcher treated any `mcpServers.ArtCraft` key as its own: Add replaced
it, and Remove or turning agents off deleted it from every client. Now an
entry is ours only when it starts craft-ai-mcp with exactly `--stdio` and no
environment. Any other ArtCraft entry is never replaced (Add reports it) or
removed, and Settings no longer shows it as added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 10:44:03 +01:00
FredApps 6a6f6dcb3a Merge pull request #1353 from dotCooCoo/fix/msi-session-publisher
Windows: the elevated batch session installs only packages from the launcher's publisher
2026-11-13 10:34:09 +01:00
FredApps 9648d78006 Merge pull request #1354 from dotCooCoo/fix/msi-session-queue-while-running
Windows: the installer queue stays taken while a batch session can't be watched
2026-11-13 10:32:20 +01:00
FredApps f0e2370734 Merge pull request #1385 from dotCooCoo/fix/loose-macos-launcher-update
fix(native): offer the launcher's download when its release has no file for this copy
2026-11-13 10:25:17 +01:00
David MannandClaude Opus 5.5 31c3573274 The app list goes through craft-ai-agents; every app gets plain mcp
- The launcher writes, reads and removes ArtCraft/mcp/apps.json through
  `craft-ai-agents` (storytold/craft-ai-integrations#197), the same crate the
  gateway reads it with and every Craft app checks the switch with, instead
  of its own copy of the format.
- Every app is started as plain `<app>-cli mcp`: by the suite's rule that
  command works in the open window when the app runs and accepts agents, and
  headless otherwise. The per-app argument table (`--live` for PhotoCraft,
  `--headless` for VectorCraft) and reading each CLI's `--help` to see
  whether it takes them are gone.
- Gateway and craft-ai-agents pinned to the head of #197 (35e0352).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 22:57:45 +01:00
David MannandClaude Opus 5.5 acbf667f49 fix: gateway copy keeps its execute bit; packaging test ships a gateway fixture
- install_gateway returned an identical copy before setting its mode, so a
  copy that had lost its execute bit was reused and clients couldn't start
  it. The mode is now checked on both paths (Unix). Test extended: a 0644
  copy with the right bytes comes back executable (fails without the fix;
  run in Linux).
- packaging/linux/test-package-metadata.sh builds packages from a fake
  release folder; it now has a craft-ai-mcp fixture too, since the packages
  install the gateway beside the launcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 22:12:09 +01:00
David MannandClaude Opus 5.5 afaaa8f872 MCP entry is named ArtCraft; offer to restart Claude Desktop after adding
- The entry in a client's configuration (and in the copied JSON, VS Code and
  Codex formats) is `ArtCraft`, which clients show as the integration's
  name, instead of `craft-apps`.
- Right after Add, a client the launcher can restart (Claude Desktop on
  Windows and macOS) gets a note on why it must restart (it loads MCP
  servers only when it starts; restarting closes it, including a reply in
  progress) and a Restart button (`Command::McpRestartClient`). On Windows
  only Claude Desktop's processes are stopped, picked by install folder
  (Store package or classic install), never `claude.exe` by name, which is
  also Claude Code's CLI; it is started again through its Start menu entry.
  On macOS it quits through AppleScript and `open -a Claude` starts it.
- Three strings in all twelve catalogs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:58:10 +01:00
David MannandClaude Opus 5.5 0477241be9 AI agents box: the switch enables MCP, quick install, copy for other clients
- The note says what the switch does: while it is on, MCP clients reach every
  installed Craft app through one entry; while it is off, no agent reaches
  them and the entries added here are removed.
- Quick install: Add / Remove per client found here, with a note to restart
  the client.
- Other clients: copy the configuration as JSON (`mcpServers`: Claude
  Desktop, Cursor, LM Studio, Windsurf and most others), for VS Code
  (`servers`, `type: stdio`) or for Codex (TOML `[mcp_servers.craft-apps]`),
  naming the gateway copy clients start (`McpAgents::gateway`). The formats
  live in `artcraft_launcher_core::mcp_config`, with `SERVER_KEY`.
- Nine strings, translated in all twelve catalogs; the old note is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:25:14 +01:00
David MannandClaude Opus 5.5 8739008472 Claude Desktop's settings in Claude-Data are found
Current Windows versions of Claude Desktop keep their data in
%LOCALAPPDATA%\Claude-Data\<install> and leave a .user-data-left.* marker in
the Store package folder they moved out of. The launcher wrote its entry into
that abandoned config, so Claude never saw it. Claude-Data now comes first,
then %APPDATA%\Claude, then a package folder without the marker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:17:22 +01:00
David MannandClaude Opus 5.5 a68aa2c829 Claude Desktop from the Store is found; flags only from flags.toml
- Windows redirects a packaged app's %APPDATA% into its package, so the
  Microsoft Store install of Claude Desktop reads
  %LOCALAPPDATA%\Packages\Claude_<id>\LocalCache\Roaming\Claude and never
  sees %APPDATA%\Claude: Settings showed it as not installed. The launcher
  now uses the package's folder when only the Store install is there.
- Settings no longer has an Experimental features box: AI-MCP and
  AI-MODELS are turned on in ArtCraft/flags.toml or with CRAFT_FLAGS, not by
  a switch. SetFlag, Event::Flags and FlagState go, with the box's strings
  in every catalog. The AI agents box still shows only while AI-MCP is on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:07:21 +01:00
David MannandClaude Opus 5.5 b2ddff1f0a Apps get the MCP arguments agents should use
The app list gave every app plain `mcp`, so the gateway reached PhotoCraft
only headless. PhotoCraft now gets `mcp --live` (the open window, through
the connection it publishes, storytold/photocraft#13396) and VectorCraft
`mcp --headless` (its plain `mcp` attaches to a control port with no token
yet). Each is used only when that install's `mcp --help` names the
argument, so an older release still gets plain `mcp` instead of a usage
error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:22:36 +01:00
David Mann e61b229c3a refactor(settings): drop Local services; AI agents is the one MCP setting
The Local services box from #1296 managed one LM Studio/Bionic entry per app
and an HTTP bridge on port 12345 that craft-ai-mcp no longer serves. Both are
replaced by the gateway: one craft-ai-mcp entry per MCP client.

Removed: local_mcp.rs, the McpSetService/McpSetBridge commands, the
McpService/McpBridge state, the Local services box and its strings. Kept, in
agents.rs: detecting the installed apps and their CLIs (InstalledApp) and
finding craft-ai-mcp beside the launcher (ARTCRAFT_LAUNCHER_GATEWAY_PATH for
development). Event::Mcp carries the AI agents state only.
2026-11-12 19:11:15 +01:00
dotCooCoo de87cce300 test(native): check installs_from against the format self-update downloads
update reports the format it looked for when a release has no file for
the copy. The new test calls it with an empty release for every kind of
copy and checks that the format matches the one installs_from looks for,
so a change to craft-update's choice of format fails the test.
2026-11-12 09:03:49 -08:00
David Mann d631c5be97 fix(agents): second round of review findings
- the gateway copy is compared byte for byte when the sizes match; a shipped
  build with an older timestamp still replaces it
- MCP commands and every publication of the MCP state share one lock, so a
  state read before a command can't arrive after it
- turning AI-MCP off cleans up first and writes the flag only then; a failed
  cleanup leaves the flag on and the controls to retry
- ng-mcp.json: an entry added since the load is kept (only ids named as
  removed go), a `servers` that is not a list is never replaced, and entries of
  apps that are no longer installed are listed so they can be switched off
- the bridge switch and port are disabled until the saved state is known, so
  a click can't overwrite a saved port with the default
2026-11-12 16:55:21 +01:00
David Mann 1cb228e87d feat(settings): AI agents behind the AI-MCP feature flag
Settings gets an Experimental features box with a switch per feature flag
from craft-flags (storytold/craft-libs#1118): AI-MCP and AI-MODELS, off by
default, shared with every Craft app through ArtCraft/flags.toml. A flag set
by CRAFT_FLAGS shows as such and can't be switched.

The AI agents box shows only while AI-MCP is on; the backend refuses to turn
agents on or add a client without it, and turning AI-MCP off turns agents off
and removes the client entries.

craft-flags is pinned to the head of storytold/craft-libs#1119 until it merges.
2026-11-12 15:48:26 +01:00
David Mann f94bce3ca8 fix(agents): the review findings on the AI agents box
- Changes to the app list and the gateway copy run under one lock, and a
  refresh checks again that agents are on, so detection can't bring the list
  back after it was turned off.
- Clients get a copy of craft-ai-mcp in ArtCraft/mcp/bin, refreshed when the
  shipped one changes, never a path inside an AppImage mount, a Flatpak sandbox
  or a folder an update replaces.
- MCP commands run on a worker thread, one at a time, with one detection per
  command: detection can run flatpak queries for seconds on Linux.
- Saving ng-mcp.json keeps entries it can't read where they were, and fields
  of managed entries it doesn't know; only entries removed on purpose go.
- Without the gateway, agents that are on can still be turned off and their
  entries removed; only turning on and Add need it.
2026-11-12 14:12:55 +01:00
David Mann d8a424e30f feat(settings): AI agents reach every Craft app through one MCP entry
Settings gets an "AI agents" box. "Let AI agents use Craft apps" writes the
installed apps and their CLIs into ArtCraft/mcp/apps.json, the list the
craft-ai-mcp gateway reads (storytold/craft-ai-integrations#197). Each MCP
client found on this machine (Claude Desktop, Claude Code, Cursor, LM Studio)
gets an Add / Remove button for one entry, `craft-apps` -> `craft-ai-mcp
--stdio`, through which the agent reaches every app.

Turning the switch off removes the list and every entry the launcher added.
A client configuration that does not parse is never overwritten, and other
servers and keys in it are kept. While agents are on, the app list is
refreshed whenever Settings asks for the MCP state, so a newly installed app
is reachable too. Without craft-ai-mcp beside the launcher, the box says so
and offers no switch.

Refs storytold/craft-ai-integrations#195
2026-11-12 13:48:45 +01:00
David Mann a5ce794a0a fix(local-mcp): clear the clippy findings (collapsible ifs, slices, is_some_and, doc list) 2026-11-12 13:48:45 +01:00
David Mann a30ec64b7c Merge main into agents-gateway
# Conflicts:
#	crates/ui-egui/src/app.rs
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/de.tsv
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/fr.tsv
#	crates/ui-egui/src/i18n/hu.tsv
#	crates/ui-egui/src/i18n/ja.tsv
#	crates/ui-egui/src/i18n/ka.tsv
#	crates/ui-egui/src/i18n/pl.tsv
#	crates/ui-egui/src/i18n/pt-BR.tsv
#	crates/ui-egui/src/i18n/ru.tsv
#	crates/ui-egui/src/i18n/zh-CN.tsv
#	crates/ui-egui/src/i18n/zh-TW.tsv
2026-11-12 13:35:06 +01:00
Dylan M. Taylor 66beafa52e Allow going back to an older version over the launcher's own Flatpak; bump to 0.19.2 (#1416)
* Allow going back to an older version over the launcher's own Flatpak

* Bump to 0.19.2
2026-11-11 20:28:56 -05:00
Dylan M. Taylor 53b1127dfb Updates: take craft-update from craft-libs main at 6e03f65bf 2026-11-11 13:08:09 -05:00
Dylan M. Taylor f6409da7f7 Load signed hosted launcher catalog with offline fallback (#1115)
* Load and verify the signed website catalog with bundled fallback

* Preserve signed fixture bytes across platforms and fix web lint

* Document the opt-in live catalog integration check
2026-11-11 06:45:32 -05:00
dotCooCoo fff959ff43 fix(native): offer the launcher's download when its release has no file for this copy
The launcher's self-update downloads the release file of the format the
running copy was installed from, and stops when the release has none. A
copy run outside the macOS app bundle updates from a .tar.gz, and the
launcher's macOS releases (v0.17.0 to v0.19.0) ship only the .dmg. Such a
copy was still offered "Update and restart", which then failed.

self_update::installs_from looks for that file with craft-update's own
pick_asset, as the update does. The backend reports self-update as
available, and starts one, only when the release has the file; otherwise
the update dialog and banner offer the download. The doc comment on
Capabilities::self_update states the new condition.
2026-11-10 22:53:17 -08:00
FredApps c48df4ad99 fix(launch): a bare app name is never a launchable location
Detection stores the bare app name when it cannot find an MSI app's exe. Open checked it
with exists(), which looks in the launcher's working folder (its install folder). With the
apps in a custom folder beside the launcher a folder of that name is there, so the name
reached spawn and failed with "program not found" instead of the reinstall message.

Refs #1008, storytold/wordcraft#4831
2026-11-10 18:59:47 +01:00
Timothy Austin e38b02c6af fix(local-mcp): address CodeRabbit review comments
- save_servers now refuses to overwrite a present-but-malformed ng-mcp.json
  instead of clobbering it (prevents lossy writes).
- enable/disable/remove_service only manage stdio entries; a same-named entry
  of another connection type is left alone and we fall back to the deterministic id.
- Save failures are surfaced via a new Event::McpError shown as an error toast,
  so a failed toggle is never silent.
- Settings now explain that the bridge port applies when the toggle flips.

Adds tests for the malformed-config refusal and the non-stdio name guard.
2026-11-10 08:29:33 -08:00
Timothy Austin 71685ab8ec fix(local-mcp): adapt to upstream CraftApp changes; apply rustfmt
Upstream main added the mac_bundle_name field to the CraftApp struct; add it
to the local_mcp test fixture so the crate compiles. Also apply rustfmt to
files whose formatting drifted after rebasing onto main (use-statement
wrapping, method-chain reflow, struct-variant collapse). No logic changes.
2026-11-10 08:04:54 -08:00
Timothy Austin d9c933f6ff test(local-mcp): verify existing entries are recognized against the real config
Gated on ARTCRAFT_LAUNCHER_VERIFY_MCP (dev-box only, never CI), this loads the
real ng-mcp.json and asserts that WordCraft/PdfCraft stdio entries and the Craft AI
bridge are recognized by display name and reported as enabled at port 12345. Guards
against regressions to the name-based matching so existing UUID-id entries keep being
managed in place rather than duplicated.
2026-11-10 07:56:45 -08:00
Timothy Austin cf6dabd9b6 feat(local-mcp): manage existing entries by display name, not just id
The user's ng-mcp.json already contains Craft app + bridge entries created under
UUID ids (by an earlier launcher version). Matching only on the deterministic
craft-ai-mcp-* ids would create duplicates instead of managing those working
entries in place. Now every managed entry is matched by display name first, with
the deterministic id as a creation-only fallback:

- local_mcp: new find_by_name() helper; enable_service/disable_service/remove_service
  now take &LocalService and match by display name (disable/remove fall back to the
  deterministic id). Bridge functions use find_bridge(), which matches the
  deterministic bridge id or a streamableHttp entry named "Craft AI". bridge_entry
  is renamed to "Craft AI" so it lines up with existing entries. New public helpers
  service_enabled / bridge_port_current / bridge_enabled (with parse_port) let the
  backend report current state; enable_bridge refreshes the URL in place.
- backend: mcp_state reports each app's on/off state via service_enabled(name) and
  the bridge's port/enabled via bridge_port_current/bridge_enabled, so UUID entries
  show as already present. McpSetService now passes the detected LocalService to
  both enable and disable.
- tests: cover name-based management for apps and the bridge (id preserved, command/
  URL refreshed, no duplicate created), plus port parsing and enabled reporting.
2026-11-10 07:56:45 -08:00
Timothy Austin 2b8204aad6 feat(local-mcp): Local Services panel in Settings (POC)
Detect installed Craft apps and the unified craft-ai-mcp bridge, and let the
user toggle each on/off as an MCP server in LM Studio / Bionic's ng-mcp.json.

Plumbing:
- core/protocol: Command::McpState | McpSetService { service_id, enabled } |
  McpSetBridge { port, enabled }; Event::Mcp { services, bridge } plus the
  McpService / McpBridge types (Default-derived).
- native/backend: mcp_state(&Shared) reads the manifest + a fresh detection
  snapshot and ng-mcp.json to report which apps have usable CLIs (with their
  current on/off state) and whether the bridge binary is present (found?
  version?). Emits Event::Mcp after every detection pass and after each change.
- native/local_mcp: BRIDGE_ID now public; candidate_bridge_paths collapsed to a
  let-chain (clippy).

UI (egui):
- app.rs: LauncherUi holds mcp_services / mcp_bridge / bridge_port (+ the once-
  synced flag) and handles Event::Mcp.
- dialogs.rs: opening Settings requests Command::McpState once; the request is
  reset when no dialog is on screen so reopening re-fetches fresh state.
- settings_dialog.rs: new "Local services" panel (only where manage_apps). A
  collapsible "Craft apps" section lists each installed app as a toggle with
  its CLI path shown in muted text; the unified bridge row has an editable,
  accessible-labelled port field and a toggle that applies the current port.

i18n: translations for every new literal across all complete catalogs (ru, zh-CN,
zh-TW, de, fr, pt-BR, es, cs, pl, hu, ja, ka).

All tests pass; clippy clean of denied lints.
2026-11-10 07:56:45 -08:00
Timothy Austin 0ff0063b58 feat(local-mcp): add unified-bridge mode that ties in craft-ai-mcp
Locate the unified craft-ai-mcp bridge binary (via ARTCRAFT_LAUNCHER_BRIDGE_PATH
override or derived install locations), version-check it, and register a single
streamableHttp entry at http://127.0.0.1:12345/mcp in ng-mcp.json.

This links the launcher (Branch B) to the unified HTTP bridge crate (Branch A /
PR #154): one 'Enable Local Services' toggle can expose all Craft AI tools over a
single endpoint instead of per-app stdio rows, with per-app stdio as fallback.

- locate_bridge/first_existing/candidate_bridge_paths: pure, testable path lookup
  (no unsafe env mutation in tests)
- bridge_version: delegates to the launcher's existing PE-version reader on Windows
- bridge_entry/enable_bridge/disable_bridge/remove_bridge: manage the single entry
- tests cover shape, port, enable/disable/remove lifecycle, and first_existing
2026-11-10 07:48:06 -08:00
Timothy Austin d4f69b23e0 feat(local-mcp): detect installed Craft Apps and manage LM Studio MCP entries
Adds a native module that reuses the existing app detection to find every
Craft App on this machine (reading each MSI InstallLocation, never a
hardcoded folder), derives each app's stdio CLI path, and writes stdio
server entries into LM Studio/Bionic's ng-mcp.json. Config path is derived
from the user profile and overridable via ARTCRAFT_LAUNCHER_MCP_CONFIG for
tests. Entries are added/disabled/removed atomically, preserving other top-
level keys. Unit tests cover CLI derivation, round-trip, and toggle behavior;
a gated Windows test verifies real detection on a machine with the suite
installed.
2026-11-10 07:48:06 -08:00
Dylan M. Taylor 6e24ed6ee1 Add AniCraft to the launcher suite 2026-11-09 20:12:45 -05:00
dotCooCoo babc8719e4 Windows: the installer queue stays taken while a batch session can't be watched
When the waiting side could not open the elevated session's process for 10 seconds, the
session could still be running, but the batch ended with an error and released the
installer queue, so the next job could start beside it and stop with error 1618.

The queue now stays taken until the session's process ends, or until the session has
written its results and removed its process id, up to 4 hours.
2026-11-09 06:08:58 -08:00
dotCooCoo 3c6bb01cb8 Windows: the elevated batch session installs only packages from the launcher's publisher
The batch session's elevated copy took a package's path and checksum from a manifest
in the launcher's downloads folder, which any process of the user can write. The UAC
prompt names the launcher's publisher, so a manifest written by such a process could
get any MSI installed under that prompt.

The elevated copy now checks each held package's Authenticode signature against its
own, as the self-update helper does, and reports no exit code without running Windows
Installer when they differ. The launcher's side sends a package from another publisher
to install by itself under its own prompt, as SolidCraft and ArtCraft Studio do now.

The elevated copy also resolves the package's path before holding it and refuses a
symbolic link, so the path it checks is the one it installs, and it writes its
process id only to a new file.
2026-11-09 06:02:12 -08:00
Mergen A d1e4940680 fix(linux): ask the package database who owns a binary before running it for its version 2026-11-09 18:35:14 +05:00
Mergen A 3af10d873d fix(windows): the session's hold is named for its lifetime, not for reading 2026-11-09 17:07:55 +05:00
Mergen A 95c751964d fix(native): batch places go back on every early way out, and the session installs only what it hashed 2026-11-09 17:07:55 +05:00
Mergen A 3438aa0a97 fix(windows): the batch session reports only as itself, and falls back only when over
Two review findings on the one-prompt session:

- The results file is bound to its session by a random token, written as
  the file's first line and carried in the held manifest; a leftover or
  planted file in the downloads folder can no longer pass for a
  session's report. The session's name is only taken once its results
  and process-id files are free too.
- The waiting side falls back to one-by-one installs only when the
  elevated session is shown to be over (its process waited out, or its
  process id gone). A session that was launched but cannot be seen to
  finish - a slow antivirus start-up, a process that will not open -
  now reports an error per app instead of racing a second installer.
2026-11-09 17:07:55 +05:00
Mergen A 72c2da2138 fix(native): the one Windows-only test Job missing the batch field
The Linux gate never compiles this test, and Windows clippy stops at the
first hard error, so the field came to light only once the errors before
it were fixed.
2026-11-09 17:07:55 +05:00
Mergen A 31c596ff2b fix(native): the Windows-only batch code as Windows clippy sees it
Clippy on Windows (never compiled on the Linux gate) asked for two
things: run_msi now keeps to its caller's module, the visibility its
Package argument already has, and the session's cleanup-on-error uses
inspect_err, which is what removing a pid file on the way out is.
2026-11-09 17:07:55 +05:00
Mergen A 00b01bc64a fix(native): a batch member that ends before the installer frees the rest at once
A job whose run_install ends before the installer is reached (a
repository-managed Flatpak, a missing release, the overwrite question, a
paused download) dropped its batch's gather without leaving it, so the
rest of the batch waited out the full ten-minute cap before their shared
prompt. The backend now holds the place with the same BatchPlace guard
install_at uses, so every way out of a job gives the place back.
2026-11-09 17:07:55 +05:00