Brings in the translations merged to craft-i18n since the last pin.
The flatpak manifests name the same commit.
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
As agreed in craft-ai-integrations#195: one switch for every Craft app, in
the launcher; only the launcher writes MCP client configurations; plain
`<app>-cli mcp` works in the open app.
- Consent: with the AI-MCP flag, the launcher's switch alone decides,
read through `craft-ai-agents` (craft-ai-integrations#197), the crate the
launcher writes the app list with and the gateway reads it with. The
"Let AI agents connect" box is gone; without the flag everything is as on
main (a saved Control Port keeps its connection).
- `photocraft-cli mcp`: works in the open window while agents may use it
(what `--live` did), and headless otherwise, exactly as before (only the
roots given to it; the app is never started). `--headless` forces that;
`--bridge` / PHOTOCRAFT_CONTROL_PORT as before. `--live` and `mcp install`
are gone. Several read roots work again, invalid roots stop the start, and
`--gpu` applies to the headless session.
- Client setup is the launcher's: the client code (Claude Desktop, Claude
Code, Cursor, JSON), Copy Configuration, its service and its docs are
removed (about 740 lines net).
- CLI tests run with their own settings, launcher and flags folders: plain
`mcp` would otherwise find (or start) the developer's own PhotoCraft.
- Docs, book, README, scorecard row, packaging comments follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Integrations page holds more than the agent connection: open PRs add the
AI services for Generative Fill and other AI features to it (#10903, #12391,
#7007). The menu item stays "AI Integrations…" and the page "Integrations", as
on main; messages and docs say Edit › Preferences › AI Integrations.
The page only holds the MCP connection, so Edit › Preferences › AI Integrations… is now
Edit › Preferences › MCP… (command id and the `integrations` preference keys unchanged).
Copy Prompt for an Agent puts a text on the clipboard that an agent with a terminal
(Claude Code, Codex, Cursor's agent) pastes to register `photocraft-cli mcp --live` itself
and check the connection; Claude Desktop has no terminal and keeps Add to Claude Desktop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported onto current main and #11363:
- The dialog moved into prefs/prefs_ui/agents.rs (prefs_ui.rs was split on main); the port
field is labelled for the accessibility check.
- One agent connection: Preferences start and stop it live (agent_link service); only
--control opens a port at launch. #11363's token reuse, folder rules (absolute paths,
warnings) and readRoot/writeRoot names are kept; a saved controlPort from before loads
with connectAgents on.
- agent_link.rs: #11363's connection file code plus #5525's client install code.
- CLI: mcp --live, --when-closed and mcp install --client on main's clap parser.
- control_server: listen()/Listening on top of main's challenge authentication.
- app_dirs: main's resolver moved to photocraft-automation so the CLI finds the same folder.
- Interface catalogs moved to craft-i18n on main; the PR's rows are not carried over.
Co-Authored-By: Furoxfufu <Furoxfufu@users.noreply.github.com>
Co-Authored-By: ingling <ingling@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
import-cert.sh wrote the decoded .p12 to a fixed name in the temp
directory. If another account had created that file first, the shell
redirection truncated and reused it, keeping its owner and mode, and the
signing key was readable to that account. Create it with mktemp.
Keep all 34 catalog deletions; sync crop options and fill rasterization text via craft-i18n 4a642c06dbcb8172f307f827c1167cd5dd8ac341. Adapt the fill prompt catalog test to embedded catalogs and preserve both parity-document updates.
Behaviour-preserving: `[[ ]]` in place of `[ ]` for bash tests (SonarCloud shell:S7688). Every script has a bash shebang; no test uses `-a`/`-o`, escaped parentheses or an unquoted pattern on the right of `=`. `bash -n` passes on each script; the rest is left to CI.
- `packaging/linux/apprun-cli-test.sh` (14)
Keeps the TSV deletions; pins craft-i18n 87f45ab (storytold/craft-i18n#216
head, now also carrying #11193's Move Toolbar rows) until #216 merges.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps the TSV deletions. The Hindi and RAW Develop catalog tests read the
embedded craft-i18n catalogs behind needs_catalogs(); display_names scans
CRAFT_I18N_DIR's locales/*/photocraft.tsv instead of the deleted src/i18n.
Pins craft-i18n 31d158f (storytold/craft-i18n#216 head, the #12403 top-up)
until #216 merges.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
COPY . . used to bring the in-repo catalogs; the builder now fetches the
pinned craft-i18n commit and builds with CRAFT_I18N_DIR and
CRAFT_I18N_REQUIRED=1, so the image is not English only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `craft-i18n` crate (craft-libs c5a1cbfb, PhotoCraft's existing pin; already in the tree through
craft-ui) as a ui-egui dependency.
- build.rs writes `CRAFT_I18N` from `CRAFT_I18N_DIR`: one (locale, common.tsv, photocraft.tsv)
entry per locale with a PhotoCraft catalog, paths written with `{:?}` and never canonicalized.
Unset: empty, English only; `CRAFT_I18N_REQUIRED=1` makes a missing checkout an error.
- `craft-i18n.rev` pins storytold/craft-i18n 4bafe3ed (the cutover sync of photocraft@848fa30),
LF through `.gitattributes`.
- Both flatpak manifests fetch craft-i18n at that commit; the source build sets `CRAFT_I18N_DIR`
and `CRAFT_I18N_REQUIRED=1`. A test keeps both manifests equal to the pin.
- ci.yml: the Windows, without-heif and web jobs check out craft-i18n at the pin, as the shared
gate and release workflows do; a pin bump selects the web and Windows jobs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main now installs NOTICE and ATTRIBUTION.md in the AppImage and in the source
Flatpak, and the Flatpak manifests start with a cups-client module. The test
copied a fixed list of files without them and ran the build commands of the first
module. Copy NOTICE and ATTRIBUTION.md into the fixture, and pick the photocraft
module by name.
Main now installs photocraft-cli, its man pages and shell completions, and the
NOTICE files in the Linux packages. Keep those and add what this branch still
provides: the CLI and the two offline automation guides (docs/mcp.md and
docs/control-protocol.md) in the source Flatpak manifest, and the guides in the
package staging directory.
Resolve the packaging/linux/AppRun conflict by keeping both sides: main's early
`--cli` / `photocraft-cli` ARGV0 dispatch runs first, then this branch's
valid_baseline() check for the desktop-integration launcher.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* packaging: Flatpak finds and prints to CUPS printers
The Print dialog listed no printers in the Flatpak: the runtime has libcups but not
lpstat/lp, the sandbox couldn't reach the CUPS socket, and driverless network printers
(lpstat -e) need Avahi. Bundle lpstat/lp/lpoptions from CUPS 2.4.20 (Apache-2.0,
statically linked, licence installed) and grant --socket=cups and
--system-talk-name=org.freedesktop.Avahi in both manifests.
* print: lp takes the job only when CUPS lists a printer; the only printer by default; ~/.cups read-only
Review (CodeRabbit) on bundling lp in the Flatpak:
- With lp present but CUPS down or empty, the job failed on lp instead of reaching the
IPP route and the print portal. lp_route now gives up the route when lpstat lists no
printer, before anything is submitted.
- With no printer named, no default and one queue, IPP picked it but lp failed. lp_route
names the only printer.
- The sandbox ignored the user's default printer, saved options and client.conf server:
grant ~/.cups read-only in both manifests.
* print: no printers for lp means the portal, not IPP; bounded listing; CUPS socket wrapper
Review:
- When lp is there but CUPS lists no printer, the job went to the IPP route, whose
server detection ignores ~/.cups/client.conf and could print to a local default
printer instead of the configured server. It now goes to the print portal, or fails
with no portal.
- The lpstat listing before a job is bounded (10 s, then lp takes the job as before)
and runs outside SPOOLER, which guards only Windows driver calls.
- Flatpak mounts the host's CUPS socket at /var/run/cups/cups.sock whatever path
client.conf or CUPS_SERVER names; the CUPS tools now run through a wrapper that
points a socket path missing in the sandbox there, leaving server names alone.
* packaging: redirect a custom CUPS socket only when it is the one Flatpak mounted
Review (CodeRabbit): Flatpak picks the socket it mounts at /var/run/cups/cups.sock
with stricter rules than CUPS (flatpak-run-cups.c: a socket CUPS_SERVER, else the
first line spelled exactly "ServerName /path" in ~/.cups/client.conf, else the
default), while CUPS reads the keyword in any case and takes the last ServerName. The
wrapper now redirects only when CUPS' socket is the one Flatpak chose, so a job can't
reach a different server; otherwise CUPS fails on the missing path.
* print: a printer listing past its deadline kills and reaps lpstat
Review: the 10 s limit stopped waiting but left a hung lpstat and its thread
running, so repeated print attempts could pile them up. photocraft now runs the two
lpstat listings itself (craft-print's lpstat_command and an equivalent lpstat -e,
parsed by printers_parsed) and kills and reaps each one at the shared deadline. The
output is read on a thread that ends with the process, so nothing outlives the job.
* packaging: never redirect a CUPS_SERVER the sandbox was given
Review (CodeRabbit): Flatpak picks the socket it mounts from the host's CUPS_SERVER,
so one set by flatpak run --env or an override may not be what it mounted. The
wrapper now leaves any CUPS_SERVER alone and redirects only a client.conf socket that
matches Flatpak's choice; otherwise CUPS fails on the missing path instead of
reaching a different server.
* packaging: point CUPS at the mounted socket only when it is the one Flatpak chose, else fail
Review (CodeRabbit): with a custom socket listed first and the default last in
~/.cups/client.conf, Flatpak mounts the custom one at /var/run/cups/cups.sock while
CUPS picks the last line, finds that path, and talks to the custom server. The
wrapper now compares CUPS' socket with Flatpak's choice even when the path exists:
equal, CUPS is pointed at the mount; different, the tool fails with an error instead
of reaching another server.
Also (CodeRabbit):
- A printer named in the job goes to lp even when CUPS lists none: listing can be
forbidden while printing is not, and the portal can't honour a name.
- A failed lpstat -e (CUPS unreachable, listing forbidden) means the list can't be
told, so lp takes the job, instead of an empty list sending it to the portal.
- A listing longer than 1 MiB counts as no answer, instead of growing without bound.
- The kill test checks the process with kill -0, which works on every Unix.
- docs/printing.md: the only-printer fallback is on the lp and IPP routes, and the
portal is Linux only.
Adds Swedish (sv, Svenska) as an interface language. The catalog combines
the open Swedish catalogs of #5985 and #9536: each row takes the best of
their translations, with one Swedish term per concept across the UI and
the reference application's established Swedish terms where they are
unambiguous, and the strings added since are filled in. 4,537 rows, every
measured key; plural rule one|other.
Where the rows come from: 2,710 both catalogs agreed on, 979 from #5985,
655 from #9536, 193 written new; 177 of the taken rows
were edited for consistency.
The tests that used sv-SE as an unsupported locale now use sw-KE and
fi-FI, and sv-SE / sv_FI.UTF-8 are positive cases. macOS lists sv in
CFBundleLocalizations.
Fixes#10020.
Co-authored-by: kler <966132+kler@users.noreply.github.com>
Co-authored-by: davvarn <1687962+davvarn@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Honor CARGO_BUILD_TARGET in FreeBSD packaging for aarch64 release builds
package.sh took the arch from uname -m. The release VM is an x86_64 guest that
cross-compiles aarch64 with CARGO_BUILD_TARGET set, so an aarch64 build was
named freebsd-x86_64 and read binaries from the host target dir.
Read the arch from CARGO_BUILD_TARGET when it is set, and read binaries from
target/<triple>/release. Skip the man-page example and the --version run when
cross-building, since the aarch64 binaries cannot run on the x86_64 guest.
Unset CARGO_BUILD_TARGET keeps the old behavior.
* Reject unsupported CARGO_BUILD_TARGET and resolve host-tuple in FreeBSD packaging
Accept only x86_64-unknown-freebsd and aarch64-unknown-freebsd. Any other
target exits 2 before any build, so a non-FreeBSD target cannot be packaged
as an x86_64 FreeBSD archive.
Resolve cargo's host-tuple alias to the real host triple before choosing the
binary dir, so the path matches cargo's output.
* Skip the photocraft-cli --version run when CARGO_BUILD_TARGET is set
A target build's binary may not run on the host (aarch64 on the x86_64 VM),
and under set -e the smoke run would fail the release after the archive is
written. The native path (CARGO_BUILD_TARGET unset) still runs it.
Reapply Linux Adwaita no-title winit feature and its lockfile,
keep integrated title bar as default, and port compatible tests/docs.
Preserve upstream's preferences UI refactor rather than restoring
its removed prefs_ui.rs file.
The policy check now reads the compiled AppSearch and RegLocator rows for the
remembered-folder properties (registry root, key, value name and type for both
scopes) and runs the DIR, FOLDER, PATH and legacy exe actions in sequence order
against seeded values, so their precedence and the preset-folder guard cannot
regress. It also replays the wizard folder actions in sequence order (a
remembered folder beats the new-install default, a typed folder beats both) and
requires the machine restore action between the scope page and costing.
The pre-signing check matched any folder named Program Files, so it rejected
a valid MSI when Windows resolves Program Files elsewhere, accepted the 64-bit
root for an x86 package and accepted a different app name. Build the expected
folder from the package architecture's resolved root and the policy name.
Real msiexec runs (per-user and all-users, silent and wizard) found two defects
that the metadata fixtures cannot see:
- "Only for me" published ALLUSERS=2, so FindRelatedProducts treated the run as
per-machine and skipped the existing per-user copy. An interactive upgrade
left two registered products and uninstall left files behind. The page now
leaves ALLUSERS unset for a per-user choice.
- Windows Installer resolves Program Files once, for the context it started in,
so choosing "Everyone" in the wizard installed into the user profile with a
machine-wide registration. The wizard now sets the new-install folder itself
after the choice (Program Files, Program Files (x86) for 32-bit, or the
per-user Programs folder). Silent installs are unchanged.
check-install-policy.ps1 now fails if either regresses.