answer42 0.11.1__tar.gz → 0.11.2__tar.gz

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.
Files changed (68) hide show
  1. {answer42-0.11.1 → answer42-0.11.2}/PKG-INFO +1 -1
  2. {answer42-0.11.1 → answer42-0.11.2}/pyproject.toml +1 -1
  3. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/assets/MCPTestClient.cf +0 -0
  4. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/assets/MCPTestManager.cf +0 -0
  5. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/server.py +27 -3
  6. {answer42-0.11.1 → answer42-0.11.2}/.gitignore +0 -0
  7. {answer42-0.11.1 → answer42-0.11.2}/LICENSE +0 -0
  8. {answer42-0.11.1 → answer42-0.11.2}/README.md +0 -0
  9. {answer42-0.11.1 → answer42-0.11.2}/credentials.example.json +0 -0
  10. {answer42-0.11.1 → answer42-0.11.2}/docs/agent-installation.md +0 -0
  11. {answer42-0.11.1 → answer42-0.11.2}/docs/architecture.md +0 -0
  12. {answer42-0.11.1 → answer42-0.11.2}/docs/assets/answer42-logo.png +0 -0
  13. {answer42-0.11.1 → answer42-0.11.2}/docs/assets/platform42-logo.svg +0 -0
  14. {answer42-0.11.1 → answer42-0.11.2}/docs/installation.md +0 -0
  15. {answer42-0.11.1 → answer42-0.11.2}/scripts/build_cf.py +0 -0
  16. {answer42-0.11.1 → answer42-0.11.2}/scripts/e2e_http_smoke.py +0 -0
  17. {answer42-0.11.1 → answer42-0.11.2}/scripts/e2e_stable.py +0 -0
  18. {answer42-0.11.1 → answer42-0.11.2}/scripts/openclaw_mcp_autoreload.py +0 -0
  19. {answer42-0.11.1 → answer42-0.11.2}/scripts/rag_cli.py +0 -0
  20. {answer42-0.11.1 → answer42-0.11.2}/scripts/read_webclient_start_info.py +0 -0
  21. {answer42-0.11.1 → answer42-0.11.2}/src/cf/ConfigDumpInfo.xml +0 -0
  22. {answer42-0.11.1 → answer42-0.11.2}/src/cf/Configuration.xml +0 -0
  23. {answer42-0.11.1 → answer42-0.11.2}/src/cf/DataProcessors/MCPTestManager/Ext/ObjectModule.bsl +0 -0
  24. {answer42-0.11.1 → answer42-0.11.2}/src/cf/DataProcessors/MCPTestManager/Forms//320/244/320/276/321/200/320/274/320/260/Ext/Form/Module.bsl" +0 -0
  25. {answer42-0.11.1 → answer42-0.11.2}/src/cf/DataProcessors/MCPTestManager/Forms//320/244/320/276/321/200/320/274/320/260/Ext/Form.xml" +0 -0
  26. {answer42-0.11.1 → answer42-0.11.2}/src/cf/DataProcessors/MCPTestManager/Forms//320/244/320/276/321/200/320/274/320/260.xml" +0 -0
  27. {answer42-0.11.1 → answer42-0.11.2}/src/cf/DataProcessors/MCPTestManager.xml +0 -0
  28. {answer42-0.11.1 → answer42-0.11.2}/src/cf/Ext/ManagedApplicationModule.bsl +0 -0
  29. {answer42-0.11.1 → answer42-0.11.2}/src/cf/Languages//320/240/321/203/321/201/321/201/320/272/320/270/320/271.xml" +0 -0
  30. {answer42-0.11.1 → answer42-0.11.2}/src/client_cf/Catalogs//320/237/320/241_/320/222/320/273/320/260/320/264/320/265/320/273/320/265/321/206.xml" +0 -0
  31. {answer42-0.11.1 → answer42-0.11.2}/src/client_cf/Catalogs//320/237/320/241_/320/241/320/277/321/200/320/260/320/262/320/276/321/207/320/275/320/270/320/2721.xml" +0 -0
  32. {answer42-0.11.1 → answer42-0.11.2}/src/client_cf/ConfigDumpInfo.xml +0 -0
  33. {answer42-0.11.1 → answer42-0.11.2}/src/client_cf/Configuration.xml +0 -0
  34. {answer42-0.11.1 → answer42-0.11.2}/src/client_cf/Languages//320/240/321/203/321/201/321/201/320/272/320/270/320/271.xml" +0 -0
  35. {answer42-0.11.1 → answer42-0.11.2}/src/client_cf/Reports//320/237/320/241_/320/241/320/277/320/270/321/201/320/276/320/272/320/255/320/273/320/265/320/274/320/265/320/275/321/202/320/276/320/262/Ext/ManagerModule.bsl" +0 -0
  36. {answer42-0.11.1 → answer42-0.11.2}/src/client_cf/Reports//320/237/320/241_/320/241/320/277/320/270/321/201/320/276/320/272/320/255/320/273/320/265/320/274/320/265/320/275/321/202/320/276/320/262/Ext/ObjectModule.bsl" +0 -0
  37. {answer42-0.11.1 → answer42-0.11.2}/src/client_cf/Reports//320/237/320/241_/320/241/320/277/320/270/321/201/320/276/320/272/320/255/320/273/320/265/320/274/320/265/320/275/321/202/320/276/320/262/Templates//320/236/321/201/320/275/320/276/320/262/320/275/320/260/321/217/320/241/321/205/320/265/320/274/320/260/320/232/320/276/320/274/320/277/320/276/320/275/320/276/320/262/320/272/320/270/320/224/320/260/320/275/320/275/321/213/321/205/Ext/Template.xml" +0 -0
  38. {answer42-0.11.1 → answer42-0.11.2}/src/client_cf/Reports//320/237/320/241_/320/241/320/277/320/270/321/201/320/276/320/272/320/255/320/273/320/265/320/274/320/265/320/275/321/202/320/276/320/262/Templates//320/236/321/201/320/275/320/276/320/262/320/275/320/260/321/217/320/241/321/205/320/265/320/274/320/260/320/232/320/276/320/274/320/277/320/276/320/275/320/276/320/262/320/272/320/270/320/224/320/260/320/275/320/275/321/213/321/205.xml" +0 -0
  39. {answer42-0.11.1 → answer42-0.11.2}/src/client_cf/Reports//320/237/320/241_/320/241/320/277/320/270/321/201/320/276/320/272/320/255/320/273/320/265/320/274/320/265/320/275/321/202/320/276/320/262.xml" +0 -0
  40. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/__init__.py +0 -0
  41. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/assets/__init__.py +0 -0
  42. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/auth.py +0 -0
  43. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/bridge.py +0 -0
  44. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/browser_agent.py +0 -0
  45. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/credentials.py +0 -0
  46. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/credentials_cli.py +0 -0
  47. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/html_agent.py +0 -0
  48. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/os_support.py +0 -0
  49. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/platform.py +0 -0
  50. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/protocol.py +0 -0
  51. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/rag/__init__.py +0 -0
  52. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/rag/detect.py +0 -0
  53. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/rag/dump.py +0 -0
  54. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/rag/model.py +0 -0
  55. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/rag/parsers.py +0 -0
  56. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/rag/service.py +0 -0
  57. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/rag/store.py +0 -0
  58. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/rag/summary_backend.py +0 -0
  59. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/rag/summary_vector.py +0 -0
  60. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/recorder.py +0 -0
  61. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/release_helper.py +0 -0
  62. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/runtime.py +0 -0
  63. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/skill_installer.py +0 -0
  64. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/tool_groups.py +0 -0
  65. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/webclient_probe.py +0 -0
  66. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/webkit_patch.py +0 -0
  67. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/win_desktop.py +0 -0
  68. {answer42-0.11.1 → answer42-0.11.2}/src/mcp_1c/window_control.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: answer42
3
- Version: 0.11.1
3
+ Version: 0.11.2
4
4
  Summary: Answer42 — The Answer to Life, Universe, and 1C — UI Driver. MCP-powered 1C:Enterprise UI automation: click, fill, navigate, test, and introspect managed forms through the test-client API
5
5
  Author: Marvin (AI Assistant), 42Clouds, and contributors
6
6
  Author-email: "Kosolapov Stanislav (proDOOMman)" <prodoomman@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "answer42"
3
- version = "0.11.1"
3
+ version = "0.11.2"
4
4
  description = "Answer42 — The Answer to Life, Universe, and 1C — UI Driver. MCP-powered 1C:Enterprise UI automation: click, fill, navigate, test, and introspect managed forms through the test-client API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -540,6 +540,7 @@ class SessionState:
540
540
  self.xvfb_pid: int = 0
541
541
  self.client_xvfb_pid: int = 0
542
542
  self.target_connection_mode: str = ""
543
+ self.browser_query: str = "" # query switches of the browser client address (client_mode=browser)
543
544
  self.target_connection_value: str = ""
544
545
  self.bridge = OneCBridgeServer(
545
546
  host="127.0.0.1",
@@ -5599,6 +5600,7 @@ async def start_session(
5599
5600
  and (not original_password or original_password == credential_ref.get("password"))
5600
5601
  )
5601
5602
  saved_credentials_unverified = not bool(credential_ref.get("verified", False))
5603
+ browser_query = urlsplit(str(base_url or "").strip()).query # switches the browser client keeps, e.g. OIDA-
5602
5604
  base_url = _platform.normalize_infobase_url(base_url)
5603
5605
  connection_mode = "auto"
5604
5606
  connection_value = ""
@@ -5914,7 +5916,7 @@ async def start_session(
5914
5916
  if effective_client_mode == "browser":
5915
5917
  connect_result = await _connect_browser_client_impl(
5916
5918
  sess, base_url=connect_base_url, username=username, password=password,
5917
- browser_path=browser_path, headless=browser_headless,
5919
+ browser_path=browser_path, headless=browser_headless, query=browser_query,
5918
5920
  )
5919
5921
  else:
5920
5922
  connect_result = await _connect_test_client_impl(
@@ -6741,6 +6743,7 @@ async def _connect_browser_client_impl(
6741
6743
  password: str = "",
6742
6744
  browser_path: str = "",
6743
6745
  headless: bool = False,
6746
+ query: str = "",
6744
6747
  ) -> Any:
6745
6748
  """Open the web client in Chrome/Edge as a test client and attach the test manager to it by identifier."""
6746
6749
  start_monotonic = time.perf_counter()
@@ -6749,6 +6752,10 @@ async def _connect_browser_client_impl(
6749
6752
  r_base = _platform.normalize_infobase_url(base_url or sess.base_url)
6750
6753
  if not r_base:
6751
6754
  raise ValueError("base_url is required for client_mode=browser")
6755
+ # The browser opens the address as given: its query switches (for example OIDA- that turns the single
6756
+ # sign-on off) matter, while the manager and the credentials work with the canonical publication address.
6757
+ raw_query = query or sess.browser_query
6758
+ sess.browser_query = raw_query
6752
6759
  r_user = username or sess.username
6753
6760
  r_pass = password if password else sess.password
6754
6761
  if not r_user and not r_pass:
@@ -6761,8 +6768,12 @@ async def _connect_browser_client_impl(
6761
6768
  "Укажите настоящий пароль или сохраните корректные креды через credentials_save()."
6762
6769
  )
6763
6770
  client_id = browser_agent.new_client_id()
6771
+ # The manager finds the browser client through the server of its own infobase; a client registered on a
6772
+ # remote server is out of its reach.
6773
+ remote = (urlsplit(r_base).hostname or "").lower() not in {"localhost", "127.0.0.1", "::1", "[::1]"}
6764
6774
  try:
6765
- url = browser_agent.browser_client_url(r_base, client_id)
6775
+ open_url = f"{r_base}?{raw_query}" if raw_query else r_base
6776
+ url = browser_agent.browser_client_url(open_url, client_id)
6766
6777
  bridge = browser_agent.BrowserBridge(browser_path, headless=headless)
6767
6778
  host, port = browser_agent.manager_endpoint(r_base)
6768
6779
  except html_agent.HtmlAgentError as exc:
@@ -6789,16 +6800,29 @@ async def _connect_browser_client_impl(
6789
6800
  # The web client registers itself with the server when its interface has started; the manager then finds
6790
6801
  # it by the identifier (it keeps trying for the pairing time).
6791
6802
  try:
6803
+ if remote and os.environ.get("ONEC_MCP_BROWSER_FORCE_PAIRING") != "1":
6804
+ # The manager cannot see a client registered on a remote server and then blocks for minutes.
6805
+ raise BridgeError("pairing not attempted: remote publication")
6792
6806
  result = await sess.bridge.call("attach_test_client", params)
6793
6807
  except BridgeError as pairing_error:
6794
6808
  # The browser and its page tools work without the test manager: keep them and say what is missing.
6809
+ if remote:
6810
+ hint = (
6811
+ f"The publication {urlsplit(r_base).netloc} is on another host: the test manager looks for the "
6812
+ "browser client on the server of its own infobase, so it cannot find a client that registered "
6813
+ "on a remote server. Open the base on this machine, or work through the html_* and browser_* "
6814
+ "tools. ONEC_MCP_BROWSER_FORCE_PAIRING=1 tries the pairing anyway."
6815
+ )
6816
+ else:
6817
+ hint = "Check that the web publication is reachable and its web server allows the test-client ports."
6795
6818
  result = {
6796
6819
  "connected": False,
6797
6820
  "attach_error": str(pairing_error).splitlines()[0][:500],
6798
6821
  "warning": (
6799
6822
  "The test manager did not pair with the browser client; form/table tools are unavailable, "
6800
- "the html_* and browser_* tools work on the page."
6823
+ "the html_* and browser_* tools work on the page. " + hint
6801
6824
  ),
6825
+ "available_tools": ["html_*", "browser_*"],
6802
6826
  }
6803
6827
  except html_agent.HtmlAgentError as exc:
6804
6828
  await _stop_browser_bridge(sess)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes