Commit Graph
2836 Commits
Author SHA1 Message Date
David Mann de93ee2d38 Merge pull request #13396 from davidmann4/integration-mcp
Integration batch MCP: agents in the open PhotoCraft window, one switch in the ArtCraft Launcher (#11363, #5525)
2026-11-13 17:41:24 +01:00
David MannandClaude Opus 5.5 309fdf1cde Address CodeRabbit review: document per-direction root overrides
In closed-app headless MCP mode, a given --automation-read-root or
--automation-write-root replaces the app's agent folder for that
direction only. Say so in control-protocol.md and mcp.md, and pin it
with a test for each direction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:19:38 +01:00
David MannandClaude Opus 5.5 28c3a53367 docs(mcp): the open-window entry names the closed-app choice
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 13:29:57 +01:00
David MannandClaude Opus 5.5 94082119f1 docs(mcp): say when plain mcp is headless and that --headless always is
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 13:17:58 +01:00
David MannandClaude Opus 5.5 19f040a6ae docs(mcp): plain mcp uses the open window only with the AI-MCP flag
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:36:40 +01:00
David MannandClaude Opus 5.5 dbd2cd1628 fix(mcp): plain mcp stays headless without the AI-MCP flag; integrations read leniently
- Without the AI-MCP flag plain `photocraft-cli mcp` is headless as before: a
  Control Port saved before the agents switch no longer makes it look for the
  app, start it or apply When PhotoCraft Is Closed. Test in
  mcp_without_consent_works_headless (fails without the gate).
- `prefs::read_integrations_section` (migrate + lenient read) is shared by the
  app's launch read and `photocraft-cli mcp`: one bad value resets only itself,
  so a saved "error" closed-app choice no longer falls back to Launch in the CLI.
  Replaces the app's hand-written per-field reader. Test in
  integrations_come_from_the_saved_preferences_or_default (fails without it).
- docs/development.md: the headless client examples pass --headless.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 12:36:22 +01:00
David Mann 968ba560e5 Merge origin/main into PR #13124 2026-11-13 11:16:48 +01:00
FredApps 0fb40c534a Merge pull request #4420 from vangel76/docs/parity-refresh-2
Docs: refresh ui, localization, brush and hardware parity docs against main (#4419)
2026-11-13 10:33:13 +01:00
David Mann 1f8f724ad4 Merge pull request #13190 from TrevorBrown-dev/fix/space-hand-menu-esc-pasteboard-11271
Space-Hand view menu: Esc closes only the menu and Enter can't reach a pending crop; the pasteboard menu under Space (#11271)
2026-11-13 09:40:34 +01:00
David Mann 373addc734 Merge pull request #13382 from tjbbjt/perf/free-transform-drag-stalls
Free Transform: follow the pointer from the press and build mip levels off the UI thread
2026-11-13 09:40:22 +01:00
David Mann ca0c90cb05 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-13 02:04:48 +01:00
David Mann b20eeb7a2e Merge branch 'main' into actions-frame-from-layers (merge queue) 2026-11-13 00:54:34 +01:00
David MannandClaude Opus 5.5 fcbc0a69f8 docs: tests and agents run mcp --headless
Plain `photocraft-cli mcp` now works in the open window while the ArtCraft
Launcher's agents switch is on, and may start PhotoCraft, also on a
developer's machine. AGENTS.md says scripts, tests and agent sessions pass
`--headless` (and tests give the CLI their own settings, launcher and flags
folders); the headless examples in docs/development.md, docs/mcp.md,
docs/control-protocol.md, the book and the README use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 23:55:27 +01:00
David MannandClaude Opus 5.5 fd626999fc One switch for agents, in the ArtCraft Launcher; plain mcp works in the open app
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>
2026-11-12 23:41:14 +01:00
David MannandClaude Opus 5.5 ce1dd3a594 docs: the AI-MCP flag is set in flags.toml or CRAFT_FLAGS only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:07:58 +01:00
vangel76 f01d97428d Merge remote-tracking branch 'upstream/main' into HEAD
# Conflicts:
#	docs/brush-parity.md
2026-11-12 20:46:47 +01:00
David Mann e960d8e410 Merge remote-tracking branch 'origin/main' into integration-mcp 2026-11-12 20:07:17 +01:00
David MannandClaude Opus 5.5 d3a0166eeb Client setup moves to the ArtCraft Launcher
The launcher's Settings > AI agents adds one entry for every Craft app to
Claude Desktop, Claude Code, Cursor and LM Studio (craft-launcher#1432), so
PhotoCraft's page drops its Add to Claude Desktop / Claude Code / Cursor and
Copy Prompt for an Agent buttons. Copy Configuration stays for people
without the launcher, and so does `photocraft-cli mcp install --client`.
Docs, README and the AUTO-MCP-LIVE scorecard row follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:07:08 +01:00
David MannandClaude Opus 5.5 d0f01a515e The ArtCraft Launcher's agents switch lets agents in
Turning on ArtCraft Launcher > Settings > AI agents is the person's consent
for every Craft app (craft-ai-integrations#195). While the AI-MCP flag is on
and the launcher's app list (ArtCraft/mcp/apps.json) names photocraft,
PhotoCraft accepts agents as if Let AI agents connect were ticked: the
desktop app watches those files every 2 s and starts or stops the
connection, and `mcp --live` checks them before every call. The page shows
the box ticked and says the launcher turned it on; PhotoCraft's own choice
is kept. Allow Agent Control off still refuses agents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:02:54 +01:00
Ian ab01524630 Merge main and reconcile Clone Stamp source handling
Integrate the merged cross-document implementation while retaining picked-layer sampling, ICC and source coverage, preview strength, and offset fixes. Preserve upstream explicit preview mappings and closed-document state, and adapt regression fixtures and mode/layer lifetime expectations.
2026-11-12 13:21:56 -05:00
Alan Rockefeller f75cfd5a56 Clone Stamp and Healing Brush clone from a source set in another open document (#10381)
* Clone Stamp and Healing Brush clone from a source set in another open document

Alt-clicking a clone source in one document and painting in another sampled the
painted document at the source point: a clone source slot held a point and a layer
but not the document. Slots now record the document (and its layer) they were set
in, and painting elsewhere samples that document, as in Photoshop.

- Engine: CloneSource gains `document` (serde default, so older slots read as
  "the document being painted"). Clone Stamp, Healing Brush, the live stroke, the
  Pattern Preview wrap and the brush-tip preview read the source document. Pixels
  are converted to the painted document's colour mode and depth like Edit > Paste
  (no ICC conversion, same as Paste). Current Layer / Current & Below use the
  layer the source was set on (that document's active layer if it was deleted);
  All Layers uses its composite.
- A source whose document was closed is an error asking for a new source, and
  stores no aligned anchor, instead of silently sampling the wrong document.
- cloneSource.set takes an optional `"document": index` (with `source`);
  cloneSource.list and set report each slot's document index.
- UI: the Clone Source panel names the source document (or says it was closed),
  the source crosshair isn't drawn over another document, and the brush preview
  cache includes the source document's revision.

Tests: engine tests for 8/16/32-bit with and without wrap, colour-mode conversion
(Gray > RGB16, RGB > CMYK), sampled layer, Healing Brush, live stroke vs commit,
preview, closed/invalid documents and cloneSource.set/list; a UI test that
Alt-clicks in one document and paints in another.

* Clone test: the aligned stroke past the smaller source document's edge leaves the destination unchanged

Review follow-up: with "aligned": false the stroke sampled inside the source, so it didn't test the edge its comment named, and nothing was asserted.

* Clone Stamp / Healing Brush: an empty Clone Source slot refuses to paint

clone_params fell back to ui.clone_source / ui.clone_offset when the active
slot was empty. Those coordinates carry no document, so after Alt-clicking in
one document and picking an empty slot in another, the stroke read the first
document's coordinates from the second one's pixels.

* fix: reject stale cross-document clone previews

* Clone Source: a copy opened after the source document closed isn't its source

A native copy keeps its document's ID, and a reopened document may keep its ID. A slot set in
a document that was then closed resolved that ID again once a copy was open, and painted from
the copy instead of reporting the closed source (CodeRabbit, clone_source.rs).

Session::close now marks the slots set in the closing document closed (CloneSources::forget_doc,
next to the other per-feature forget_doc calls). A closed slot refuses the stroke and its live
preview with the closed-source error, shows "Source: document closed" in the panel, reports no
`document` in cloneSource.list/set, and draws no overlay or crosshair, whatever document has the
ID now. Setting a new source clears it.
2026-11-12 18:00:54 +01:00
David Mann 1a63521c8b The agent settings wait for the suite's AI-MCP feature flag
Preferences › AI Integrations shows the new agent settings (Let AI agents
connect, the agent folders, When PhotoCraft is closed, the buttons that add
PhotoCraft to MCP clients) only while the Craft suite's AI-MCP feature flag is
on (craft-flags, storytold/craft-libs#1118: ArtCraft/flags.toml, which the
ArtCraft Launcher's Experimental features switch writes, or CRAFT_FLAGS).
Without it the page shows Allow Agent Control and Control Port as before, and
a Control Port already set keeps its connection.

craft-flags is pinned to the head of storytold/craft-libs#1119 until it merges.
2026-11-12 16:02:23 +01:00
David Mann 09ad48fcee Keep the page named AI Integrations, not MCP
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.
2026-11-12 15:38:51 +01:00
David Mann a16144256f Merge main into integration-mcp
# Conflicts:
#	docs/scorecard.md
2026-11-12 13:51:25 +01:00
David Mann e165933772 Merge pull request #12430 from ljkx/atn-fit-image
Actions: map File › Automate › Fit Image (#10723)
2026-11-12 13:26:58 +01:00
David Mann a037e55a7f Merge pull request #9952 from ashokram-si/feat/jpeg-options-size-readout
JPEG Options: show how big the file will be (FILE-215-19, #7843)
2026-11-12 13:26:45 +01:00
ljkx da6f09ce70 docs/atn.md: Fit Image leaves a fitting document unchanged only with limit (Don't Enlarge) 2026-11-12 11:03:28 +01:00
Dylan M. Taylor 74330157cb Use craft-psd for PSD/PSB format code (#13414)
* Use craft-psd from craft-libs; remove crates/psd

* Regenerate the scorecard (28 crate roots)

* Take craft-psd at craft-libs 55d120f2

* Regenerate lockfile for current shared format crates

* Pin shared format crates to current craft-libs main

* Match brush import cap to shared decoder budget

* xtask: update layer fixtures after PSD extraction
2026-11-12 02:53:54 -05:00
Dylan M. Taylor 21bb9fda63 Use shared crates for raster codecs (#13416)
* Use craft-raster-codecs, craft-dpx, craft-tga, craft-gif and craft-exr for the format code in crates/codecs

* Regenerate lockfile for current shared format crates

* Pin shared format crates to current craft-libs main

* Fix codec module imports for clippy
2026-11-12 01:29:33 -05:00
David MannandClaude Opus 5.5 9dd0364db2 Batch: regenerate docs/scorecard.md (AUTO-MCP-LIVE, Integrations prefs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 02:59:23 +01:00
David MannandClaude Opus 5.5 cd41d63394 Batch: Preferences page is "MCP"; Copy Prompt for an Agent
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>
2026-11-12 02:56:45 +01:00
7444ab6c03 Merge PR #5525: AI Integrations: connect Claude Desktop, Claude Code and Cursor to PhotoCraft without a terminal
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>
2026-11-12 02:26:09 +01:00
David Mann 82adf56e11 Merge remote-tracking branch 'origin/main' into feat/jpeg-options-size-readout 2026-11-12 02:22:55 +01:00
David Mann 2261a98943 Merge PR #11363: Control from the Dock: publish the control connection, and automation folders in Preferences › Integrations
# Conflicts:
#	crates/ui-egui/src/i18n/ar.tsv
#	crates/ui-egui/src/i18n/cs.tsv
#	crates/ui-egui/src/i18n/da.tsv
#	crates/ui-egui/src/i18n/de.tsv
#	crates/ui-egui/src/i18n/el.tsv
#	crates/ui-egui/src/i18n/es.tsv
#	crates/ui-egui/src/i18n/fi.tsv
#	crates/ui-egui/src/i18n/fr.tsv
#	crates/ui-egui/src/i18n/hi.tsv
#	crates/ui-egui/src/i18n/hu.tsv
#	crates/ui-egui/src/i18n/id.tsv
#	crates/ui-egui/src/i18n/it.tsv
#	crates/ui-egui/src/i18n/ja.tsv
#	crates/ui-egui/src/i18n/ko.tsv
#	crates/ui-egui/src/i18n/nb.tsv
#	crates/ui-egui/src/i18n/nl.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/sr.tsv
#	crates/ui-egui/src/i18n/sv.tsv
#	crates/ui-egui/src/i18n/tr.tsv
#	crates/ui-egui/src/i18n/uk.tsv
#	crates/ui-egui/src/i18n/vi.tsv
#	crates/ui-egui/src/i18n/zh-hans.tsv
#	crates/ui-egui/src/i18n/zh-hant.tsv
#	docs/control-protocol.md
2026-11-12 01:37:44 +01:00
Ian d209bb863e Keep healing source coverage and clone overlays consistent 2026-11-11 18:12:44 -05:00
Ian 85446b50e5 Merge main and retain clone source allocation safeguards 2026-11-11 16:52:51 -05:00
tjbbjt e459bcc824 Scorecard: Free Transform budgets 2026-11-11 13:19:19 -08:00
vangel76andClaude Sonnet 5.5 c1f2ae16b8 Merge upstream/main into docs/parity-refresh-2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 21:51:14 +01:00
tjbbjt 0926cf9663 Scorecard: list the Free Transform scenarios 2026-11-11 12:34:53 -08:00
Ian 8829007eb8 Document explicit clone coordinates selecting the destination 2026-11-11 15:01:25 -05:00
Ian 5839de951c Document explicit clone source layer overrides 2026-11-11 14:51:14 -05:00
Ian a078a37054 Clarify clone sampling fallbacks and composite boundaries 2026-11-11 14:27:30 -05:00
Ian 967e987edd Preserve clone canvas coverage for sources without alpha 2026-11-11 13:51:05 -05:00
Trevor Brown 4d7fd8bd34 Merge remote-tracking branch 'upstream/main' into fix/space-hand-menu-esc-pasteboard-11271 2026-11-11 11:39:40 -05:00
David MannandClaude Opus 5.5 0d9a9a5a70 Docs: the screenshot rule allows a doc's own before/after comparison
CodeRabbit on #13206: docs/multi-channel-editing.md displays before/after
comparisons, which the rule keeps; it targets screenshots that only show a
PR's change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 16:41:05 +01:00
David MannandClaude Opus 5.5 0cc411241b Docs: before/after screenshots go in the PR description, not the repo
AGENTS.md rule 6 and docs/images/SOURCES.md now say docs/images holds only
images the README or a doc displays. Removes the nine PR before/after
captures nothing references (gradient-overlay-method, guide-position,
native-pipette-macos, preferences-apply; 1.9 MB) and their ATTRIBUTION.md
rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 16:28:16 +01:00
ljkx 0a2a49852a Merge remote-tracking branch 'origin/main' into atn-fit-image
# Conflicts:
#	crates/engine/src/cmd/atn_cmds.rs
2026-11-11 16:24:18 +01:00
Trevor BrownandClaude Opus 5.5 0eafc3b674 Docs: under the Space-Hand view menu Esc closes it and Enter does nothing (#11271)
A plain Enter is only withheld from the dispatch; it doesn't close the
menu. Both rows said "Esc or Enter only closes the menu".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 09:38:40 -05:00
Trevor BrownandClaude Opus 5.5 44b175ef7a Docs: the Space-Hand rows name only what this follow-up adds (#11271)
The menu itself came with #11292; these rows now describe the Esc/Enter
guard and the pasteboard menu under Space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 09:14:37 -05:00
Trevor BrownandClaude Sonnet 5.5 6146287eda Space-Hand view menu: a plain Esc or Enter only closes the menu; pasteboard tests (#11271)
Follow-up to #11323 as asked there, on top of main's Space-Hand view menu (#11292). With the view menu open under Space, a plain Esc or Enter no longer reaches a pending crop (Esc only closes the menu); modified keys dispatch as before. Space + right-click on the pasteboard now keeps its menu open after Space is released (the menu records the tool underneath, as the view menu does). Tests for both, plus the context-menu and UI parity rows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
2026-11-11 09:13:42 -05:00