@applitools/mcp 0.10.6 → 0.10.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,38 @@ All notable changes to the Applitools Eyes MCP will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.10.7](https://github.com/Applitools-Dev/sdk/compare/js/mcp@0.10.6...js/mcp@0.10.7) (2026-11-25)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * default review tools to inspect mode when no write key is set | AD-18097 ([#4477](https://github.com/Applitools-Dev/sdk/issues/4477)) ([d012bd2](https://github.com/Applitools-Dev/sdk/commit/d012bd2ec6c7459f60d81af3ebbfaeee8c507cfc))
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * @applitools/utils bumped to 1.16.0
19
+ #### Features
20
+
21
+ * stitch iOS full pages without NML from the accessibility tree | AD-16309 ([#4202](https://github.com/Applitools-Dev/sdk/issues/4202)) ([123cbc8](https://github.com/Applitools-Dev/sdk/commit/123cbc85179d3179c5a8400bb3c1b9927561f8d9))
22
+ * @applitools/eyes-results bumped to 0.2.12
23
+
24
+ * @applitools/logger bumped to 2.3.5
25
+
26
+ * @applitools/req bumped to 1.11.10
27
+
28
+ * @applitools/image bumped to 1.3.7
29
+
30
+ * @applitools/core-base bumped to 1.44.2
31
+ #### Bug Fixes
32
+
33
+ * return the pdf match's session, not the old sync verdict ([#4525](https://github.com/Applitools-Dev/sdk/issues/4525)) ([3f67a03](https://github.com/Applitools-Dev/sdk/commit/3f67a033354b0f436308daec92cd860e4961669d))
34
+
35
+
36
+
37
+ * @applitools/test-server bumped to 1.4.12
38
+
39
+
8
40
  ## [0.10.6](https://github.com/Applitools-Dev/sdk/compare/js/mcp@0.10.5...js/mcp@0.10.6) (2026-11-18)
9
41
 
10
42
 
package/README.md CHANGED
@@ -154,7 +154,7 @@ Three keys control what the server can do, set as global environment variables,
154
154
  * APPLITOOLS_API_KEY: Used for test execution (unchanged; this is the key you already use to run Eyes visual tests). See [our documentation](https://applitools.com/docs/eyes/getting-started/retrieve-api-key) on retrieving your execution key.
155
155
  * Note: The MCP server will look in additional places for this key. See the `eyes_verify_api_key` tool for details.
156
156
  * APPLITOOLS_READ_KEY: A read-only key. Required for all Inspection tools, for all Resolution tools, and for Review tools running in either mode.
157
- * APPLITOOLS_WRITE_KEY: A write-only key. Required for all Resolution tools and for Review tools running in resolve mode (the default).
157
+ * APPLITOOLS_WRITE_KEY: A write-only key. Required for all Resolution tools and for Review tools running in resolve mode. When it is set, Review defaults to resolve mode; without it, Review defaults to inspect mode.
158
158
 
159
159
  How to get read-only and write-only API keys:
160
160
 
@@ -273,7 +273,7 @@ Returns the match regions currently in effect for a step, combining regions defi
273
273
  Returns a DOM node's diff history across prior runs, used as evidence that a change is recurring/dynamic content rather than a one-time real change.
274
274
 
275
275
  ### Review (orchestration)
276
- Requires APPLITOOLS_READ_KEY always, and additionally APPLITOOLS_WRITE_KEY when running in resolve mode (the default). This is the primary way to use these tools day-to-day: ask your assistant to review a batch, scenario, session, or step, and it drives the full investigation for you.
276
+ Requires APPLITOOLS_READ_KEY always, and additionally APPLITOOLS_WRITE_KEY when running in resolve mode. This is the primary way to use these tools day-to-day: ask your assistant to review a batch, scenario, session, or step, and it drives the full investigation for you.
277
277
 
278
278
  Supported Eyes SDKs: All
279
279
 
@@ -288,8 +288,8 @@ Summarizes and finalizes the investigation at the given scope, deduplicating eve
288
288
 
289
289
  Two Review modes:
290
290
 
291
- * inspect: read-only. Produces a summary of what changed with no mutation. Good for a first look, or when you want to see findings before deciding what to do.
292
- * resolve (the default): additionally applies masks for confirmed-dynamic diffs and decides each step's accept/reject/unresolved outcome automatically, as findings come in. Your assistant never has to call the Resolution tools independently to make this happen.
291
+ * inspect (the default when APPLITOOLS_WRITE_KEY is not set): read-only. Produces a summary of what changed with no mutation. Good for a first look, or when you want to see findings before deciding what to do.
292
+ * resolve (the default when APPLITOOLS_WRITE_KEY is set): additionally applies masks for confirmed-dynamic diffs and decides each step's accept/reject/unresolved outcome automatically, as findings come in. Your assistant never has to call the Resolution tools independently to make this happen.
293
293
 
294
294
  Either mode can be scoped to a whole batch or narrowed to a single scenario, session, or step. A completed inspect-mode review can later be promoted to resolve mode without redoing the investigation; its cached findings are simply replayed through the resolve-mode decision logic. Saving changes to the baseline, or resetting it, is never part of Review itself; ask separately for `eyes_resolve_save` (or `eyes_resolve_reset`), each of which still requires your explicit approval.
295
295
 
@@ -154,7 +154,7 @@ Three keys control what the server can do, set as global environment variables,
154
154
  * APPLITOOLS_API_KEY: Used for test execution (unchanged; this is the key you already use to run Eyes visual tests). See [our documentation](https://applitools.com/docs/eyes/getting-started/retrieve-api-key) on retrieving your execution key.
155
155
  * Note: The MCP server will look in additional places for this key. See the `eyes_verify_api_key` tool for details.
156
156
  * APPLITOOLS_READ_KEY: A read-only key. Required for all Inspection tools, for all Resolution tools, and for Review tools running in either mode.
157
- * APPLITOOLS_WRITE_KEY: A write-only key. Required for all Resolution tools and for Review tools running in resolve mode (the default).
157
+ * APPLITOOLS_WRITE_KEY: A write-only key. Required for all Resolution tools and for Review tools running in resolve mode. When it is set, Review defaults to resolve mode; without it, Review defaults to inspect mode.
158
158
 
159
159
  How to get read-only and write-only API keys:
160
160
 
@@ -273,7 +273,7 @@ Returns the match regions currently in effect for a step, combining regions defi
273
273
  Returns a DOM node's diff history across prior runs, used as evidence that a change is recurring/dynamic content rather than a one-time real change.
274
274
 
275
275
  ### Review (orchestration)
276
- Requires APPLITOOLS_READ_KEY always, and additionally APPLITOOLS_WRITE_KEY when running in resolve mode (the default). This is the primary way to use these tools day-to-day: ask your assistant to review a batch, scenario, session, or step, and it drives the full investigation for you.
276
+ Requires APPLITOOLS_READ_KEY always, and additionally APPLITOOLS_WRITE_KEY when running in resolve mode. This is the primary way to use these tools day-to-day: ask your assistant to review a batch, scenario, session, or step, and it drives the full investigation for you.
277
277
 
278
278
  Supported Eyes SDKs: All
279
279
 
@@ -288,8 +288,8 @@ Summarizes and finalizes the investigation at the given scope, deduplicating eve
288
288
 
289
289
  Two Review modes:
290
290
 
291
- * inspect: read-only. Produces a summary of what changed with no mutation. Good for a first look, or when you want to see findings before deciding what to do.
292
- * resolve (the default): additionally applies masks for confirmed-dynamic diffs and decides each step's accept/reject/unresolved outcome automatically, as findings come in. Your assistant never has to call the Resolution tools independently to make this happen.
291
+ * inspect (the default when APPLITOOLS_WRITE_KEY is not set): read-only. Produces a summary of what changed with no mutation. Good for a first look, or when you want to see findings before deciding what to do.
292
+ * resolve (the default when APPLITOOLS_WRITE_KEY is set): additionally applies masks for confirmed-dynamic diffs and decides each step's accept/reject/unresolved outcome automatically, as findings come in. Your assistant never has to call the Resolution tools independently to make this happen.
293
293
 
294
294
  Either mode can be scoped to a whole batch or narrowed to a single scenario, session, or step. A completed inspect-mode review can later be promoted to resolve mode without redoing the investigation; its cached findings are simply replayed through the resolve-mode decision logic. Saving changes to the baseline, or resetting it, is never part of Review itself; ask separately for `eyes_resolve_save` (or `eyes_resolve_reset`), each of which still requires your explicit approval.
295
295
 
package/dist/index.js CHANGED
@@ -4621,8 +4621,8 @@ function keySources() {
4621
4621
 
4622
4622
  var name = "@applitools/mcp";
4623
4623
  var mcpName = "io.github.applitools/applitools";
4624
- var mcpRegistryVersion = "1.0.18";
4625
- var version = "0.10.6";
4624
+ var mcpRegistryVersion = "1.0.19";
4625
+ var version = "0.10.7";
4626
4626
  var description = "Applitools MCP server for AI coding assistants";
4627
4627
  var main = "./dist/index.js";
4628
4628
  var bin = "./dist/index.js";
@@ -6949,6 +6949,10 @@ function getWriteApiKey(urlForAccountHint) {
6949
6949
  note: 'Note: this must be a write-capable key — different from APPLITOOLS_READ_KEY, used by eyes_inspect_* tools.',
6950
6950
  }, urlForAccountHint);
6951
6951
  }
6952
+ /** Whether `APPLITOOLS_WRITE_KEY` is configured — decides the review tools' default `mode`. */
6953
+ function hasWriteApiKey() {
6954
+ return Boolean(process.env.APPLITOOLS_WRITE_KEY);
6955
+ }
6952
6956
  /** Every `eyes_inspect_*` tool's own `ApiKeyProvider` — read access only, never a write key. */
6953
6957
  function readOnlyApiKeyProvider(urlForAccountHint) {
6954
6958
  return new StaticApiKeyProvider({ readKey: getReadApiKey(urlForAccountHint) });
@@ -8168,9 +8172,9 @@ function hasReachedRootScope(level, rootScope) {
8168
8172
  return level === rootScope;
8169
8173
  }
8170
8174
  const MODES = ['inspect', 'resolve'];
8171
- /** `mode`, defaulted to `'resolve'` when the caller omits it — a review is expected to act on what it finds unless told otherwise. */
8172
- function resolveMode(mode) {
8173
- return mode !== null && mode !== void 0 ? mode : 'resolve';
8175
+ /** `mode`, defaulted when the caller omits it to `'resolve'` if a write key is configured, else to `'inspect'` so a read-only setup can still review. */
8176
+ function resolveMode(mode, hasWriteKey) {
8177
+ return mode !== null && mode !== void 0 ? mode : (hasWriteKey ? 'resolve' : 'inspect');
8174
8178
  }
8175
8179
  /**
8176
8180
  * The only way to build a `NextCall` — `rootScope` and `mode` are required parameters, not something
@@ -8720,17 +8724,17 @@ const RootScopeShape = zod.z
8720
8724
  const ModeShape = zod.z
8721
8725
  .enum(MODES)
8722
8726
  .optional()
8723
- .describe('What this investigation is for. "resolve" (the default — used whenever mode is left unspecified, including for ' +
8724
- 'a plain "review"/"check"/"look at" request with no further qualification) additionally acts on what it finds: ' +
8727
+ .describe('What this investigation is for. Leave it unspecified for a plain "review"/"check"/"look at" request: the server ' +
8728
+ 'then uses "resolve" when a write key is configured and "inspect" when it is not. "inspect" only reads and ' +
8729
+ 'reports, with no mutation at all. "resolve" additionally acts on what it finds: ' +
8725
8730
  "each diff's dynamic content is masked with a match region as it is reported, and each step is deterministically " +
8726
8731
  'accepted/rejected/left-unresolved from its own findings. These are pending, undoable decisions, not a commit — ' +
8727
8732
  'eyes_resolve_save (a separate, later call requiring its own explicit user approval) is what actually writes ' +
8728
- 'them to the baseline, and eyes_resolve_reset can discard them before that. So do not switch to "inspect" out ' +
8729
- 'of general caution about mutating actions or to avoid asking for confirmation — that caution belongs at the ' +
8730
- 'eyes_resolve_save step, not here. "inspect" only reads and reports, with no mutation at all — use it only when ' +
8731
- 'the user explicitly asks to just describe/summarize the differences, or explicitly asks not to resolve steps ' +
8732
- 'or add regions (e.g. "just tell me what changed", "don\'t resolve anything yet"); a bare "review"/"check this ' +
8733
- 'batch" does not qualify and should use the resolve default. Only specify it at the top of a traversal, or when ' +
8733
+ 'them to the baseline, and eyes_resolve_reset can discard them before that. So do not pick "inspect" out of ' +
8734
+ 'general caution about mutating actions — that caution belongs at the eyes_resolve_save step. Pass "inspect" ' +
8735
+ 'only when the user explicitly asks to just describe the differences or not to resolve anything (e.g. "just ' +
8736
+ 'tell me what changed", "don\'t resolve anything yet"), and "resolve" only when the user explicitly asks to ' +
8737
+ 'accept/reject steps or mask differences. Only specify it at the top of a traversal, or when ' +
8734
8738
  "a prior call's `next` output already indicated one — and then pass that value through as given, never omitted " +
8735
8739
  'or modified.');
8736
8740
  const RestartShape = zod.z
@@ -9731,6 +9735,15 @@ async function decideOrCreditStepAction(params) {
9731
9735
  resolution: { accepted: live === 'accepted' ? 1 : 0, rejected: live === 'rejected' ? 1 : 0, unresolved: 0 },
9732
9736
  };
9733
9737
  }
9738
+ // An inspect walk offers structural steps as ordinary children; promoting one must still follow §5's rules.
9739
+ const structural = classifyStructuralSteps(session).find(s => s.stepIndex === stepIndex);
9740
+ if ((structural === null || structural === void 0 ? void 0 : structural.kind) === 'new-no-baseline') {
9741
+ return { action: null, resolution: { accepted: 0, rejected: 0, unresolved: 1 } };
9742
+ }
9743
+ if ((structural === null || structural === void 0 ? void 0 : structural.kind) === 'aborted-missing-checkpoint') {
9744
+ await resolveStep(sessionUrl, stepIndex, 'reject', keys, null);
9745
+ return { action: 'reject', resolution: { accepted: 0, rejected: 1, unresolved: 0 } };
9746
+ }
9734
9747
  const action = decideStepAction(findings, stepRegions);
9735
9748
  const resolution = await resolveStepForAction({ sessionUrl, stepIndex, action, keys, deps });
9736
9749
  return { action, resolution };
@@ -9758,6 +9771,10 @@ function promoteSubtreeToResolve(rootLevel, ctx, keys, deps) {
9758
9771
  return walkSubtree(rootLevel, ctx, async (level, nodeCtx, scopeId) => {
9759
9772
  if (getScopeMode(scopeId, deps) !== 'inspect')
9760
9773
  return;
9774
+ // Unfinished: nothing to replay yet. Switching its mode keeps the parent-mode gate from sending the
9775
+ // resumed walk back to inspect; its own `_end` decides it.
9776
+ if (!isCompleted(scopeId, deps))
9777
+ return recordScopeMode(scopeId, 'resolve', deps);
9761
9778
  if (level === 'diff') {
9762
9779
  const findings = getCompletion(scopeId, deps).payload;
9763
9780
  const promoted = await applyRegionMasking({
@@ -10387,13 +10404,13 @@ async function maybeDiscard(restart, level, ctx, deps) {
10387
10404
  // ---------------------------------------------------------------------------
10388
10405
  // Transparent inspect→resolve promotion (see `resolution.ts`'s own §7 doc comment for the full
10389
10406
  // mechanics) — triggered here, at the top of every command function, whenever this exact call's
10390
- // own scope is already fully cached under `mode: 'inspect'` but `mode: 'resolve'` is now wanted.
10407
+ // own scope is cached under `mode: 'inspect'`, finished or not, but `mode: 'resolve'` is now wanted.
10391
10408
  // A `restart` call never promotes — it just discarded this rootScope, so there's nothing cached left
10392
10409
  // to promote.
10393
10410
  // ---------------------------------------------------------------------------
10394
10411
  async function promoteIfNeeded(params) {
10395
10412
  const { level, scopeId, ctx, mode, restart, keys, deps } = params;
10396
- if (restart || mode !== 'resolve' || !isCompleted(scopeId, deps) || getScopeMode(scopeId, deps) !== 'inspect')
10413
+ if (restart || mode !== 'resolve' || getScopeMode(scopeId, deps) !== 'inspect')
10397
10414
  return;
10398
10415
  await promoteSubtreeToResolve(level, ctx, keys, deps);
10399
10416
  }
@@ -11414,7 +11431,7 @@ function registerReviewTools(server, deps = defaultPhaseTrackerDeps) {
11414
11431
  }, async ({ scope, batchUrl, scenarioName, sessionUrl, stepIndex, rootScope: rawRootScope, mode: rawMode, restart }) => {
11415
11432
  const rootScope = resolveRootScope(scope, rawRootScope);
11416
11433
  const rootScopeOmitted = rawRootScope === undefined;
11417
- const mode = resolveMode(rawMode);
11434
+ const mode = resolveMode(rawMode, hasWriteApiKey());
11418
11435
  recordReviewCall(scope, mode);
11419
11436
  const result = await (async () => {
11420
11437
  switch (scope) {
@@ -11464,7 +11481,7 @@ function registerReviewTools(server, deps = defaultPhaseTrackerDeps) {
11464
11481
  }, async ({ scope, batchUrl, scenarioName, sessionUrl, stepIndex, findings: rawFindingsArg, rootScope: rawRootScope, mode: rawMode, restart, }) => {
11465
11482
  const rootScope = resolveRootScope(scope, rawRootScope);
11466
11483
  const rootScopeOmitted = rawRootScope === undefined;
11467
- const mode = resolveMode(rawMode);
11484
+ const mode = resolveMode(rawMode, hasWriteApiKey());
11468
11485
  recordReviewCall(scope, mode);
11469
11486
  const rawFindings = await resolveJsonArg(rawFindingsArg, 'findings');
11470
11487
  const summaryFindings = () => findingsFor(SummaryExampleShape, rawFindings, scope);
@@ -11525,7 +11542,7 @@ function registerReviewTools(server, deps = defaultPhaseTrackerDeps) {
11525
11542
  }, async ({ sessionUrl, stepIndex, reports: rawReportsArg, rootScope: rawRootScope, mode: rawMode, restart }) => {
11526
11543
  const rootScope = resolveRootScope('diff', rawRootScope);
11527
11544
  const rootScopeOmitted = rawRootScope === undefined;
11528
- const mode = resolveMode(rawMode);
11545
+ const mode = resolveMode(rawMode, hasWriteApiKey());
11529
11546
  recordReviewCall('diff', mode);
11530
11547
  const keys = reviewApiKeyProvider(sessionUrl, mode);
11531
11548
  const rawReports = await resolveJsonArg(rawReportsArg, 'reports');