sapwebguimcp 0.20.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.
- sapwebguimcp-0.20.2/.claude/skills/readme-demo/SKILL.md +248 -0
- sapwebguimcp-0.20.2/.env.example +29 -0
- sapwebguimcp-0.20.2/.gitattributes +16 -0
- sapwebguimcp-0.20.2/.github/dependabot.yml +31 -0
- sapwebguimcp-0.20.2/.github/workflows/build_executable.yml +195 -0
- sapwebguimcp-0.20.2/.github/workflows/coverage.yml +31 -0
- sapwebguimcp-0.20.2/.github/workflows/dependabot_automerge.yml +18 -0
- sapwebguimcp-0.20.2/.github/workflows/dev_test.yml +23 -0
- sapwebguimcp-0.20.2/.github/workflows/docker-publish.yml +45 -0
- sapwebguimcp-0.20.2/.github/workflows/formatting.yml +27 -0
- sapwebguimcp-0.20.2/.github/workflows/linting.yml +25 -0
- sapwebguimcp-0.20.2/.github/workflows/no_byte_order_mark.yml +15 -0
- sapwebguimcp-0.20.2/.github/workflows/packaging_test.yml +38 -0
- sapwebguimcp-0.20.2/.github/workflows/prettier.yml +26 -0
- sapwebguimcp-0.20.2/.github/workflows/python-publish.yml +63 -0
- sapwebguimcp-0.20.2/.github/workflows/pythonlint.yml +32 -0
- sapwebguimcp-0.20.2/.github/workflows/spell_check.yml +27 -0
- sapwebguimcp-0.20.2/.github/workflows/unittests.yml +33 -0
- sapwebguimcp-0.20.2/.gitignore +133 -0
- sapwebguimcp-0.20.2/.gitmodules +6 -0
- sapwebguimcp-0.20.2/.prettierrc +9 -0
- sapwebguimcp-0.20.2/ARCHITECTURE.md +279 -0
- sapwebguimcp-0.20.2/CLAUDE.md +88 -0
- sapwebguimcp-0.20.2/CONTRIBUTING.md +319 -0
- sapwebguimcp-0.20.2/Dockerfile +58 -0
- sapwebguimcp-0.20.2/LICENSE +21 -0
- sapwebguimcp-0.20.2/PKG-INFO +696 -0
- sapwebguimcp-0.20.2/README.md +664 -0
- sapwebguimcp-0.20.2/docker-compose.yml +27 -0
- sapwebguimcp-0.20.2/docs/SAP_TEST_PREREQUISITES.md +150 -0
- sapwebguimcp-0.20.2/docs/bulk-operations-performance.md +133 -0
- sapwebguimcp-0.20.2/docs/design/sap-quick-report-design.md +421 -0
- sapwebguimcp-0.20.2/docs/design/sap-quick-report-implementation-plan.md +1166 -0
- sapwebguimcp-0.20.2/docs/plans/2024-12-19-utilities-consulting-ai-tools-design.md +396 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-02-js-extraction-design.md +109 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-02-pydantic-tool-results-design.md +445 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-02-sap-fill-form-design.md +184 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-03-github-feedback-issues-design.md +109 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-03-intent-logging-design.md +204 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-04-dropdown-support-design.md +148 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-04-popup-handling-design.md +107 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-04-workflow-learning-design.md +374 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-05-popup-semantics-design.md +108 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-05-tool-capabilities-discovery-design.md +114 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-08-se11-lookup-tool-design.md +167 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-08-se16-data-browser-design.md +206 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-09-typed-test-helpers-design.md +136 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-09-typed-test-helpers.md +1124 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-12-fm-class-catalog-design.md +176 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-14-multi-session-implementation.md +1493 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-14-multi-session-support-design.md +319 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-21-agent-session-binding-design.md +152 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-21-agent-session-binding-impl.md +1177 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-23-abapgit-api-pull-design.md +231 -0
- sapwebguimcp-0.20.2/docs/plans/2026-01-27-mcp-prompts-design.md +85 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-13-logging-improvements-design.md +103 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-13-logging-improvements-plan.md +1002 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-13-onboarding-prompts-design.md +142 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-13-onboarding-prompts-plan.md +828 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-18-exe-bundling-design.md +174 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-18-exe-bundling-plan.md +462 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-18-sap-identity-log-correlation-design.md +95 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-18-sap-identity-log-correlation-plan.md +579 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-19-default-browser-mode-connect-design.md +26 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-19-pat-validation-design.md +95 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-19-pat-validation-plan.md +451 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-20-readme-env-vars-fix-design.md +85 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-20-readme-env-vars-fix-plan.md +429 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-20-se38-edit-tool-design.md +111 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-20-se38-edit-tool-plan.md +693 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-22-general-purpose-tools-design.md +422 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-22-se09-transport-tool-plan.md +1326 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-22-slg1-tool-plan.md +1330 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-22-sm30-tool-plan.md +1612 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-22-sm37-tool-plan.md +1646 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-22-st22-tool-plan.md +1786 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-24-sm30-finish-and-spro-search-plan.md +625 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-24-sm30-spro-search-design.md +112 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-26-abapgit-list-repos-design.md +63 -0
- sapwebguimcp-0.20.2/docs/plans/2026-02-26-abapgit-list-repos-plan.md +573 -0
- sapwebguimcp-0.20.2/docs/plans/2026-03-02-remove-sampling-design.md +73 -0
- sapwebguimcp-0.20.2/docs/plans/2026-03-02-remove-sampling-plan.md +372 -0
- sapwebguimcp-0.20.2/docs/plans/2026-03-03-abapgit-pull-status-bar-fix-design.md +52 -0
- sapwebguimcp-0.20.2/docs/plans/2026-03-03-abapgit-pull-status-bar-fix-plan.md +348 -0
- sapwebguimcp-0.20.2/docs/plans/2026-03-04-ui-backend-abstraction-design.md +259 -0
- sapwebguimcp-0.20.2/docs/plans/2026-03-04-ui-backend-abstraction-plan.md +1504 -0
- sapwebguimcp-0.20.2/docs/plans/2026-03-11-stateless-selection-screens-design.md +502 -0
- sapwebguimcp-0.20.2/docs/plans/2026-03-11-stateless-selection-screens-plan.md +1634 -0
- sapwebguimcp-0.20.2/docs/plans/PLAN_TRANSACTION_CATALOG.md +267 -0
- sapwebguimcp-0.20.2/docs/readme-demo.gif +0 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-03-12-protocol-cleanup-plan.md +878 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-03-14-pysapgui-library.md +3895 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-03-15-desktop-backend-phase1.md +1285 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-03-16-desktop-tools-remaining.md +293 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-03-17-desktop-multi-session.md +279 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-03-18-readme-desktop-backend.md +363 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-03-20-pysapgui-open-source-readiness.md +1600 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-03-24-reduce-local-imports.md +395 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-04-04-popup-rework-active-window.md +886 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-04-05-full-depth-element-info.md +776 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-04-07-sap-fill-form-desktop-perf.md +1070 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-07-07-breakpoint-confirmation-elicitation.md +497 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-10-02-se16-strict-filter-fields.md +1014 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-10-03-issue-879-retry-partial-progress-design.md +53 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-10-06-readme-demo.md +1237 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-11-10-session-language.md +611 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-11-11-language-packs-core.md +2893 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-11-11-language-packs-guards.md +2350 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-11-11-language-packs-migration.md +783 -0
- sapwebguimcp-0.20.2/docs/superpowers/plans/2026-11-11-language-packs-sources.md +1688 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-12-protocol-cleanup-design.md +146 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-13-backend-encapsulation-design.md +271 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-14-pysapgui-library-design.md +545 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-14-sapgui-login-fixture-design.md +204 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-15-desktop-backend-adapter-design.md +295 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-16-com-evaluate-tool-design.md +131 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-17-desktop-multi-session-design.md +126 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-18-readme-desktop-backend-design.md +106 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-20-pysapgui-open-source-readiness-design.md +186 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-24-architecture-docs-design.md +29 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-24-reduce-local-imports-design.md +124 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-03-24-test-gating-design.md +47 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-04-04-popup-rework-active-window-design.md +262 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-04-05-full-depth-element-info-design.md +206 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-04-07-sap-fill-form-desktop-perf-design.md +302 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-04-30-breakpoint-tool-design.md +333 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-05-20-sap-run-script-design.md +291 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-07-07-breakpoint-confirmation-elicitation-design.md +188 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-10-02-se16-strict-filter-fields-design.md +145 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-10-02-statusbar-message-fields-design.md +58 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-10-06-readme-demo-design.md +260 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-11-10-language-packs-design.md +561 -0
- sapwebguimcp-0.20.2/docs/superpowers/specs/2026-11-17-desktop-webgui-repo-split-design.md +192 -0
- sapwebguimcp-0.20.2/domain-specific-terms.txt +93 -0
- sapwebguimcp-0.20.2/nginx-cdp-proxy.conf +26 -0
- sapwebguimcp-0.20.2/package-lock.json +29 -0
- sapwebguimcp-0.20.2/package.json +12 -0
- sapwebguimcp-0.20.2/pyproject.toml +315 -0
- sapwebguimcp-0.20.2/scripts/README.md +151 -0
- sapwebguimcp-0.20.2/scripts/add_inline_results.py +215 -0
- sapwebguimcp-0.20.2/scripts/consolidate_catalog.py +139 -0
- sapwebguimcp-0.20.2/scripts/harvest_lang_texts.py +380 -0
- sapwebguimcp-0.20.2/scripts/recapture-snapshots.ps1 +69 -0
- sapwebguimcp-0.20.2/scripts/render_readme_demo.py +6 -0
- sapwebguimcp-0.20.2/scripts/smoke_test_exe.py +128 -0
- sapwebguimcp-0.20.2/src/_sapwebguimcp_version.py +1 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/__init__.py +38 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/__init__.py +19 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/manager.py +87 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/__init__.py +1 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/backend.py +1685 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/browser.py +571 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/chrome_finder.py +212 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/__init__.py +1 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/check_field_type.js +129 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/check_popup.js +164 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/click_table_cell.js +127 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/detect_form_fields.js +126 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/discover_buttons.js +81 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/discover_fields.js +158 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/extract_sap_user.js +26 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/extract_screen_info.js +41 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/extract_screen_text.js +86 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/extract_status_bar.js +150 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/extract_table_data.js +264 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/fill_form_fields.js +112 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/find_field_utils.js +226 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/find_main_input.js +61 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/get_dropdown_options.js +87 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/read_se16n_selection_rows.js +112 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/select_dropdown_option.js +148 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/set_field.js +103 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/set_language_field.js +17 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/set_okcode_field.js +16 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js/wait_for_sap_ready.js +18 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/js_helpers.py +42 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/models/__init__.py +0 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/models/browser_results.py +83 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/models/session_registry.py +279 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/__init__.py +23 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/screen_state_parser.py +129 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/se09_parser.py +207 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/se16_parser.py +309 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/se24_parser.py +335 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/se37_parser.py +282 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/se93_parser.py +188 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/slg1_parser.py +302 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/sm30_parser.py +332 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/sm37_parser.py +233 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/spro_parser.py +175 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/parsers/st22_parser.py +507 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/types.py +12 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/backend/webgui/utils.py +61 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/catalog/__init__.py +78 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/catalog/loader.py +114 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/catalog/models.py +528 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/catalog/scraper.py +440 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/catalog/search.py +218 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/classcatalog/__init__.py +17 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/classcatalog/loader.py +66 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/classcatalog/models.py +36 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/classcatalog/search.py +83 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/data/__init__.py +1 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/data/classes.json +20 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/data/function_modules.json +27152 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/data/sap_field_registry.json +98 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/data/sap_knowledge.md +399 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/data/tables.json +4311 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/data/transactions.json +58824 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/demo/__init__.py +0 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/demo/render_readme_demo.py +510 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/fmcatalog/__init__.py +17 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/fmcatalog/loader.py +66 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/fmcatalog/models.py +80 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/fmcatalog/search.py +108 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/lang/ADDING_A_LANGUAGE.md +128 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/lang/__init__.py +205 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/lang/backends.py +235 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/lang/de.py +309 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/lang/en.py +299 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/lang/invariant.py +45 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/lang/it.py +346 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/lang/schema.py +570 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/lang/sources.py +326 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/lang/text.py +366 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/logging_config.py +262 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/loghandlers/__init__.py +5 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/loghandlers/feedback_issue_handler.py +247 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/mcp_session.py +43 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/middleware/__init__.py +5 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/middleware/logging.py +232 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/README.md +106 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/__init__.py +296 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/abapgit_models.py +128 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/alv_models.py +38 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/base.py +144 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/config.py +309 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/intent_models.py +68 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/middleware.py +139 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/quick_report_models.py +51 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/sap_results.py +538 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/screen_state.py +82 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/se09_models.py +59 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/se11_models.py +81 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/se16_models.py +63 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/se24_edit_models.py +15 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/se24_models.py +228 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/se37_edit_models.py +14 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/se37_models.py +89 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/se38_edit_models.py +15 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/se93_models.py +79 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/slg1_models.py +55 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/sm30_models.py +67 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/sm37_models.py +53 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/spro_models.py +51 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/models/st22_models.py +58 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/prompts/README.md +63 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/prompts/__init__.py +138 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/prompts/abapgit_workflow.md +144 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/prompts/create_business_partner.md +174 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/prompts/explore_class.md +65 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/prompts/explore_function_module.md +74 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/prompts/explore_table.md +82 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/prompts/se16_bulk_read.md +89 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/resources/__init__.py +6 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/resources/feedback_resource.py +35 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/resources/intent_resource.py +30 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/server.py +346 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/session_language.py +91 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/skills/README.md +256 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/skills/__init__.py +13 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/skills/examples/create_business_partner_bp.md +221 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/skills/examples/create_contract_account_caa1.md +221 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/skills/examples/general_navigation.md +154 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/skills/examples/monitor_process_documents_idxgc.md +242 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tables/__init__.py +39 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tables/loader.py +71 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tables/models.py +47 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tables/scraper.py +245 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tables/search.py +114 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/README.md +331 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/__init__.py +73 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/abapgit_tools.py +1501 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/browser_tools.py +550 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/catalog_tools.py +156 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/class_tools.py +115 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/confirmation_helpers.py +111 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/edit_helpers.py +37 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/feedback_tools.py +203 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/field_helpers.py +208 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/fm_tools.py +158 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/intent_tools.py +82 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/quick_report_tools.py +404 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/sap_list_connections_impl.py +76 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/sap_login_impl.py +88 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/sap_tools.py +1724 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/screen_state_helpers.py +151 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/se09_tools.py +422 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/se11_tools.py +544 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/se16_tools.py +890 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/se24_edit_tools.py +286 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/se24_tools.py +263 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/se37_edit_tools.py +230 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/se37_tools.py +224 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/se38_edit_tools.py +234 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/se93_tools.py +190 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/session_tools.py +221 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/slg1_tools.py +263 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/sm30_tools.py +247 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/sm37_tools.py +340 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/spro_tools.py +325 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/st22_tools.py +438 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/tools/table_tools.py +138 -0
- sapwebguimcp-0.20.2/src/sapwebguimcp/utils.py +251 -0
- sapwebguimcp-0.20.2/uv.lock +2778 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: readme-demo
|
|
3
|
+
description: >
|
|
4
|
+
End-to-end demo of this MCP server for the project README and for users who
|
|
5
|
+
want to see it in action: log into an SAP system, create a business partner
|
|
6
|
+
(Max Mustermann by default), save it with Ctrl+S, capture a screenshot for
|
|
7
|
+
the documentation, and verify the partner in SE16 (table BUT000). Use when
|
|
8
|
+
the user says "run the readme demo", "demo the SAP MCP server", or invokes
|
|
9
|
+
/readme-demo. Announce each step in one short chat sentence so the run reads
|
|
10
|
+
as a story, and capture a numbered screenshot after every SAP-visible step.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# README Demo
|
|
14
|
+
|
|
15
|
+
You are demonstrating this MCP server end to end. The run produces two things:
|
|
16
|
+
a readable chat story (the sentences you say between steps) and the artifacts
|
|
17
|
+
that prove the work (screenshots, transcript).
|
|
18
|
+
|
|
19
|
+
**Work directory:** `/readme-demo/` (repo-root-relative, git-ignored). Create
|
|
20
|
+
it if missing. It receives `transcript.md` and `frames/` (create `frames/`
|
|
21
|
+
before the first capture).
|
|
22
|
+
|
|
23
|
+
**Data:** use obviously fake data — first name `Max`, last name `Mustermann`
|
|
24
|
+
(unless the user passed other values), street `Teststraße 1`, postal code
|
|
25
|
+
`12345`, city `Testhausen`, country `DE`. Never use real personal data.
|
|
26
|
+
|
|
27
|
+
**Optional arguments:** partner first/last name, address, system key
|
|
28
|
+
(default: the default system in `systems.json`).
|
|
29
|
+
|
|
30
|
+
## How to run the demo
|
|
31
|
+
|
|
32
|
+
Work through the beats below. For every beat:
|
|
33
|
+
|
|
34
|
+
1. Say one short chat sentence announcing what you are about to do (plain
|
|
35
|
+
language, no JSON, no internal jargon — the reader is a first-time user).
|
|
36
|
+
2. Call the tool.
|
|
37
|
+
3. If the beat captures a frame (see the list), save it to the named file
|
|
38
|
+
under `readme-demo/frames/` with the `hard_copy` script described below
|
|
39
|
+
(`sap_screenshot` only shows you the picture, it cannot save a file). For
|
|
40
|
+
beats with overlays, read the rectangles in that same script.
|
|
41
|
+
4. Append the beat to `readme-demo/transcript.md` in the sidecar format
|
|
42
|
+
below. `tool=` names the beat's primary tool; `frame=` references the
|
|
43
|
+
screenshot file (relative to `readme-demo/`), when the beat has one.
|
|
44
|
+
|
|
45
|
+
**Prerequisites:** besides the SAP tools you need file write access (the
|
|
46
|
+
`sap_run_script` sandbox cannot create folders or write files other than via
|
|
47
|
+
`hard_copy`). Create `readme-demo/frames/` with your file tools before the
|
|
48
|
+
first frame; stop and tell the user if you have none.
|
|
49
|
+
|
|
50
|
+
**Once, right after `sap_login`:** note the `session_id` from its result
|
|
51
|
+
(`sap_login` always opens a *new* session) and pass `session=<that id>` on
|
|
52
|
+
**every** later call, including every `sap_run_script` — otherwise calls go to
|
|
53
|
+
the primary session, which may be an older login. Then shrink the SAP window so
|
|
54
|
+
its text stays legible at GIF size: `wnd.restore()` then
|
|
55
|
+
`wnd.resize_working_pane(100, 22, False)` via `sap_run_script` (gives a frame
|
|
56
|
+
of about 1045×900 px; check the first PNG's size). Do not resize again during
|
|
57
|
+
the run: the overlay coordinates below are only valid for the window size the
|
|
58
|
+
frame was captured at.
|
|
59
|
+
|
|
60
|
+
Do not add artificial waits between steps. Pacing happens later at GIF
|
|
61
|
+
assembly time, outside this skill.
|
|
62
|
+
|
|
63
|
+
### How to capture frames (important)
|
|
64
|
+
|
|
65
|
+
`sap_screenshot` returns the picture to *you* (the agent sees it) but cannot
|
|
66
|
+
save it to disk. To write a frame file, use `sap_run_script` (desktop backend)
|
|
67
|
+
with the COM `hard_copy` call — the same way the server itself implements
|
|
68
|
+
screenshots. Absolute path required:
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
# via sap_run_script, one shot per frame:
|
|
72
|
+
wnd = session.find_by_id("wnd[0]")
|
|
73
|
+
wnd.hard_copy(r"C:\<absolute path to repo>\readme-demo\frames\03_bp_initial.png", 2)
|
|
74
|
+
output("frame saved")
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
(`2` = PNG. `open()`/`import` are sandbox-blocked, but the injected
|
|
78
|
+
`session` object writes the file through COM — no `open()` needed. After the
|
|
79
|
+
first frame, check that the PNG exists at that path before proceeding; if it
|
|
80
|
+
does not, the path form is wrong.)
|
|
81
|
+
|
|
82
|
+
### Beats
|
|
83
|
+
|
|
84
|
+
| Beat | Say | Do | Frame (if any) |
|
|
85
|
+
| --- | --- | --- | --- |
|
|
86
|
+
| 1 | State the whole task in one sentence. | — (no tool call; transcript block is `role=user` with the user's prompt text) | none of its own — write `frame=frames/02_easy_access.png` (the later beat-2 frame) |
|
|
87
|
+
| 2 | "Logging into the dev system…" | `sap_login(system_key=…)` | `frames/02_easy_access.png` |
|
|
88
|
+
| 3 | "Opening transaction BP…" | `sap_transaction(tcode="bp")` | `frames/03_bp_initial.png` |
|
|
89
|
+
| 4 | "Creating a person…" | `sap_press_key(key="F5")` (if a type-selection popup appears — visible as `wnd[1]` in the `sap_press_key` response's `active_window` — confirm it with `sap_press_key(key="Enter")`) | `frames/04_bp_empty.png` |
|
|
90
|
+
| 5 | "Filling in name and address…" | `sap_fill_form({...})` — see field table | `frames/05_bp_filled.png` |
|
|
91
|
+
| 6 | "Saving…" | `sap_press_key(key="Ctrl+S")` | none of its own — write `frame=frames/07_bp_saved.png` (the later beat-7 frame) |
|
|
92
|
+
| 7 | "Capturing a screenshot for the documentation…" | `sap_screenshot` (shows you the picture) + `sap_run_script` `hard_copy` → `frames/07_bp_saved.png`, and a second `hard_copy` in the same script → `readme-demo/BP_<Nachname>.png` | `frames/07_bp_saved.png` |
|
|
93
|
+
| 8 | "Now verifying it exists in SE16…" | `sap_se16_query(table="BUT000", filters={"PARTNER": "<GP number>"})` (leaves the result list on screen for the frame) | `frames/08_se16_result.png` |
|
|
94
|
+
| 9 | "✓ Partner <GP number> exists in BUT000, screenshot saved as BP_<Nachname>.png." | — (report to the user) | none of its own — repeat `frame=frames/08_se16_result.png` |
|
|
95
|
+
|
|
96
|
+
Beat numbering in `transcript.md` follows the table. If a step needs extra
|
|
97
|
+
tool calls (field discovery, popup handling), fold them into the narrative of
|
|
98
|
+
the current beat — do not invent new beats.
|
|
99
|
+
|
|
100
|
+
### BP form fields (labels are the keys for `sap_fill_form`)
|
|
101
|
+
|
|
102
|
+
| Key | Value |
|
|
103
|
+
| --- | --- |
|
|
104
|
+
| `Vorname` | `<first name>` |
|
|
105
|
+
| `Nachname` | `<last name>` |
|
|
106
|
+
| `Straße/Hausnummer` | `<street>` |
|
|
107
|
+
| `Postleitzahl/Ort` | `<postal code>` |
|
|
108
|
+
| `Ort` | `<city>` |
|
|
109
|
+
| `Land` | `DE` |
|
|
110
|
+
|
|
111
|
+
> `Postleitzahl/Ort` labels the whole address row and resolves to the postal
|
|
112
|
+
> code field; `Ort` addresses the city field in the same row, which has no
|
|
113
|
+
> separate visible label. Both keys are required. Do not fill `Anrede`
|
|
114
|
+
> (salutation) unless the user asked for it.
|
|
115
|
+
|
|
116
|
+
If `sap_fill_form` reports `not_found` fields, call `sap_discover_fields` to
|
|
117
|
+
read the system's actual labels, adjust the keys, and retry. If the status
|
|
118
|
+
bar reports a duplicate or validation error after `Ctrl+S`, or if
|
|
119
|
+
`active_window` in the `Ctrl+S` response is `wnd[1]` (e.g. the duplicate-check
|
|
120
|
+
dialog), do not confirm anything: take a `sap_screenshot`, show it and the
|
|
121
|
+
message to the user and stop — do not create duplicates on purpose. (Running
|
|
122
|
+
the demo again with the default name creates another "Max Mustermann".) If the flow needs
|
|
123
|
+
repeated manual correction that this file did not anticipate, report that
|
|
124
|
+
upstream instead of silently patching this skill.
|
|
125
|
+
|
|
126
|
+
### Save and result evaluation
|
|
127
|
+
|
|
128
|
+
`Ctrl+S` is the save action. The `sap_press_key(key="Ctrl+S")` response
|
|
129
|
+
carries `status_bar_type` and `status_bar_message` — read the result directly
|
|
130
|
+
from that response; no separate `sap_read_status_bar` call is needed. On
|
|
131
|
+
`type=S` (success), extract the business partner number from the message. If
|
|
132
|
+
the message carries no partner number or the type is not `S`, show it to the
|
|
133
|
+
user and stop (you may re-read the status bar with `sap_read_status_bar`).
|
|
134
|
+
Report it in beat 9 and use it as the `PARTNER` filter in beat 8. Note: run
|
|
135
|
+
beat 7's screenshot *after* the successful save so the status bar shows the
|
|
136
|
+
success message.
|
|
137
|
+
|
|
138
|
+
### Transcript sidecar format
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
[beat 1] role=user frame=frames/02_easy_access.png
|
|
142
|
+
<the user's one-sentence task>
|
|
143
|
+
|
|
144
|
+
[beat 2] role=assistant frame=frames/02_easy_access.png
|
|
145
|
+
Logging into the dev system…
|
|
146
|
+
tool=sap_login
|
|
147
|
+
|
|
148
|
+
[beat 3] role=assistant frame=frames/03_bp_initial.png
|
|
149
|
+
Opening transaction BP…
|
|
150
|
+
tool=sap_transaction
|
|
151
|
+
mark=20,91,156,26 Transaction: BP
|
|
152
|
+
|
|
153
|
+
[beat 6] role=assistant frame=frames/07_bp_saved.png
|
|
154
|
+
Saving…
|
|
155
|
+
tool=sap_press_key
|
|
156
|
+
status=8,853,1029,40 <status bar message>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Rules:
|
|
160
|
+
|
|
161
|
+
- One block per beat; blocks are separated by a blank line, so there are no
|
|
162
|
+
blank lines inside a block.
|
|
163
|
+
- The header is `[beat N] role=… frame=…`. `role=` is `user` or `assistant`
|
|
164
|
+
(`title` exists for a title card, which the demo does not use). `frame=` is
|
|
165
|
+
optional, relative to `readme-demo/`, and may repeat an earlier file.
|
|
166
|
+
- Then the message text, then — each on its own line, never in the header —
|
|
167
|
+
`tool=` (assistant beats only; the beat's primary tool, fold retries and
|
|
168
|
+
popup handling under it) and the overlay lines below.
|
|
169
|
+
|
|
170
|
+
**Overlays (assistant beats only, optional):** `mark=x,y,w,h caption` draws an
|
|
171
|
+
orange ring and caption pill around an element of the frame; `status=x,y,w,h text`
|
|
172
|
+
draws the status-bar message (the screenshot does not render it; at most one
|
|
173
|
+
per beat). `x,y,w,h` are four plain integers separated by commas — no spaces,
|
|
174
|
+
brackets or minus signs — in pixels *of the captured frame*. A malformed line
|
|
175
|
+
is a parse error in the renderer.
|
|
176
|
+
|
|
177
|
+
Which beats get overlays: beat 3 marks the command field (`Transaction: BP`),
|
|
178
|
+
beat 4 the `Person` toolbar button (`F5 = Person`), beat 5 each filled field
|
|
179
|
+
(caption = the value, e.g. `Max`), beat 6 and beat 7 carry the same `status=`
|
|
180
|
+
line (the status bar text after the save; read in beat 7's script, so write
|
|
181
|
+
beat 6's block only after that script has run and copy its `status=` line),
|
|
182
|
+
beat 8 and beat 9 mark the result list if you can locate that control (its id
|
|
183
|
+
differs between SE16 variants; if `wnd[0]` does not show the result grid, take
|
|
184
|
+
the frame anyway and leave out the marks). Beats 1 and 2 have none.
|
|
185
|
+
|
|
186
|
+
Read the rectangles live via COM in the **same `sap_run_script` call that saves
|
|
187
|
+
the frame**, after the beat's SAP action. This script prints ready-made lines:
|
|
188
|
+
|
|
189
|
+
```python
|
|
190
|
+
wnd = session.find_by_id("wnd[0]")
|
|
191
|
+
wx, wy = wnd.screen_left, wnd.screen_top
|
|
192
|
+
|
|
193
|
+
def rect(el): # element position relative to the window = pixel position in the frame
|
|
194
|
+
return "%d,%d,%d,%d" % (el.screen_left - wx, el.screen_top - wy, el.width, el.height)
|
|
195
|
+
|
|
196
|
+
wnd.hard_copy(r"C:\<absolute path to repo>\readme-demo\frames\03_bp_initial.png", 2)
|
|
197
|
+
output("mark=" + rect(session.find_by_id("wnd[0]/tbar[0]/okcd")) + " Transaction: BP")
|
|
198
|
+
sbar = session.find_by_id("wnd[0]/sbar")
|
|
199
|
+
output("status=" + rect(sbar) + " " + sbar.text) # beats 6 and 7
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Toolbar buttons are under `wnd[0]/tbar[1]` (match on `.text`, e.g. `Person`).
|
|
203
|
+
Form fields are nested deep in subscreens: take their ids from
|
|
204
|
+
`sap_discover_fields`, or find them with a recursive walk over `.children`
|
|
205
|
+
that matches the end of the id (`txtBUT000-NAME_FIRST`, `txtBUT000-NAME_LAST`,
|
|
206
|
+
`txtADDR2_DATA-STREET`, `txtADDR2_DATA-POST_CODE1`, `txtADDR2_DATA-CITY1`,
|
|
207
|
+
`ctxtADDR2_DATA-COUNTRY`). Each walk traverses the whole screen tree, so
|
|
208
|
+
collect all fields in one script and pass `timeout=120` to `sap_run_script`:
|
|
209
|
+
|
|
210
|
+
```python
|
|
211
|
+
def find_by_suffix(node, suffix, depth=0):
|
|
212
|
+
if depth > 14:
|
|
213
|
+
return None
|
|
214
|
+
try:
|
|
215
|
+
kids = node.children
|
|
216
|
+
except Exception:
|
|
217
|
+
return None
|
|
218
|
+
for kid in kids:
|
|
219
|
+
if kid.id.endswith(suffix):
|
|
220
|
+
return kid
|
|
221
|
+
hit = find_by_suffix(kid, suffix, depth + 1)
|
|
222
|
+
if hit is not None:
|
|
223
|
+
return hit
|
|
224
|
+
return None
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
If an element cannot be found or reports a zero size, skip that mark — marks
|
|
228
|
+
are optional and must never block the run.
|
|
229
|
+
|
|
230
|
+
### After the run
|
|
231
|
+
|
|
232
|
+
Before anyone publishes the frames, open each PNG and check it for a person's
|
|
233
|
+
name (the Easy Access user menu can show one), a logon ID (`CRUSR`/`CHUSR`
|
|
234
|
+
columns in the BUT000 grid), a client column or a hostname. If one is visible,
|
|
235
|
+
crop the frame or re-capture with a narrower view, and tell the user.
|
|
236
|
+
|
|
237
|
+
Tell the user: partner number, screenshot path, SE16 confirmation, and where
|
|
238
|
+
the artifacts live (`readme-demo/`). If the user wants the README GIF, point
|
|
239
|
+
them to `scripts/README.md` (render + ffmpeg commands) — that step is
|
|
240
|
+
maintainer-side.
|
|
241
|
+
|
|
242
|
+
### An improved internal recipe
|
|
243
|
+
|
|
244
|
+
An improved internal skill for creating business partners may be installed in
|
|
245
|
+
this environment (it is not part of this repository). If present, you may
|
|
246
|
+
prefer it for the beat 3–6 flow; it handles more edge cases (role/grouping
|
|
247
|
+
prompts, company-code data). When in doubt or when fields mismatch, fall back
|
|
248
|
+
to the flow above — it is authoritative for this demo.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# SAP Web GUI URL (optional — can also be derived from systems.json host)
|
|
2
|
+
SAP_URL=https://your-sap-server/sap/bc/gui/sap/its/webgui
|
|
3
|
+
|
|
4
|
+
# SAP system credentials are configured in ~/.config/sap-mcp/systems.json
|
|
5
|
+
# (or set SAP_CONFIG_FILE to point to a different location).
|
|
6
|
+
# See: https://github.com/Hochfrequenz/sap-mcp-config
|
|
7
|
+
|
|
8
|
+
# Browser configuration (optional)
|
|
9
|
+
# Default is connect mode: expects Chrome running with --remote-debugging-port=9222
|
|
10
|
+
# CDP_URL=http://localhost:9222
|
|
11
|
+
# Chrome is auto-launched on Windows only; set CHROME_PATH if it is not found.
|
|
12
|
+
# CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe
|
|
13
|
+
# Uncomment to use Playwright-managed browser instead (requires `playwright install`):
|
|
14
|
+
# BROWSER_MODE=launch
|
|
15
|
+
# BROWSER_HEADLESS=false
|
|
16
|
+
|
|
17
|
+
# GitHub integration
|
|
18
|
+
# GITHUB_PAT is used for two things:
|
|
19
|
+
# 1. Feedback: creating GitHub issues via log_feedback (needs 'issues' scope on GITHUB_REPO)
|
|
20
|
+
# 2. abapGit: authenticating pulls from private repos (needs 'repo' scope on your ABAP repos)
|
|
21
|
+
# If you only set GITHUB_PAT, it is used for both.
|
|
22
|
+
# Generate token at: https://github.com/settings/tokens
|
|
23
|
+
GITHUB_USER=your-github-username
|
|
24
|
+
GITHUB_PAT=ghp_your_token_here
|
|
25
|
+
# GITHUB_REPO=Hochfrequenz/sapwebgui.mcp
|
|
26
|
+
|
|
27
|
+
# Optional: separate PAT for abapGit only (overrides GITHUB_PAT for pulls).
|
|
28
|
+
# Use this if you want different scopes for abapGit vs feedback/issues.
|
|
29
|
+
# ABAPGIT_PAT=ghp_your_abapgit_token_here
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
|
3
|
+
|
|
4
|
+
# Ensure HTML snapshots use LF line endings on all platforms
|
|
5
|
+
*.html text eol=lf
|
|
6
|
+
|
|
7
|
+
# Python files
|
|
8
|
+
*.py text eol=lf
|
|
9
|
+
|
|
10
|
+
# Config files
|
|
11
|
+
*.yml text eol=lf
|
|
12
|
+
*.yaml text eol=lf
|
|
13
|
+
*.toml text eol=lf
|
|
14
|
+
*.ini text eol=lf
|
|
15
|
+
*.json text eol=lf
|
|
16
|
+
*.md text eol=lf
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "uv" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
12
|
+
reviewers:
|
|
13
|
+
- "@Hochfrequenz/python-developers-review-team"
|
|
14
|
+
- package-ecosystem: "github-actions"
|
|
15
|
+
directory: "/"
|
|
16
|
+
schedule:
|
|
17
|
+
interval: "weekly"
|
|
18
|
+
- package-ecosystem: "docker"
|
|
19
|
+
directory: "/"
|
|
20
|
+
schedule:
|
|
21
|
+
interval: "weekly"
|
|
22
|
+
- package-ecosystem: "npm"
|
|
23
|
+
directory: "/"
|
|
24
|
+
schedule:
|
|
25
|
+
interval: "weekly"
|
|
26
|
+
|
|
27
|
+
# Keep git submodules up to date
|
|
28
|
+
- package-ecosystem: "gitsubmodule"
|
|
29
|
+
directory: "/"
|
|
30
|
+
schedule:
|
|
31
|
+
interval: "weekly"
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
name: Build Executable
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
release:
|
|
9
|
+
types: [created]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
include:
|
|
17
|
+
- os: windows-latest
|
|
18
|
+
artifact: sapwebgui_mcp_windows
|
|
19
|
+
binary: sapwebgui_mcp_windows.exe
|
|
20
|
+
- os: macos-latest
|
|
21
|
+
artifact: sapwebgui_mcp_macos_arm64
|
|
22
|
+
binary: sapwebgui_mcp_macos_arm64
|
|
23
|
+
runs-on: ${{ matrix.os }}
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout code
|
|
26
|
+
uses: actions/checkout@v7
|
|
27
|
+
|
|
28
|
+
- name: Install uv
|
|
29
|
+
uses: astral-sh/setup-uv@v10.3.3
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.15"
|
|
32
|
+
|
|
33
|
+
- name: Build Executable (Windows)
|
|
34
|
+
if: matrix.os == 'windows-latest'
|
|
35
|
+
run: uv run --locked --group build_executable pyinstaller --noconfirm sapwebgui_mcp_windows.spec
|
|
36
|
+
|
|
37
|
+
- name: Build Executable (macOS)
|
|
38
|
+
if: matrix.os == 'macos-latest'
|
|
39
|
+
run: |
|
|
40
|
+
uv run --locked --group build_executable pyinstaller --onefile --name sapwebgui_mcp_macos_arm64 \
|
|
41
|
+
--copy-metadata fastmcp \
|
|
42
|
+
--collect-submodules lupa \
|
|
43
|
+
--collect-data fakeredis \
|
|
44
|
+
--collect-data sapwebguimcp \
|
|
45
|
+
src/sapwebguimcp/server.py
|
|
46
|
+
codesign --force --deep --sign - dist/sapwebgui_mcp_macos_arm64
|
|
47
|
+
|
|
48
|
+
- name: Freeze build dependencies
|
|
49
|
+
run: uv pip freeze > dist/build-dependencies.txt
|
|
50
|
+
|
|
51
|
+
- name: Upload Executable as Artifact
|
|
52
|
+
uses: actions/upload-artifact@v7
|
|
53
|
+
with:
|
|
54
|
+
name: ${{ matrix.artifact }}
|
|
55
|
+
path: |
|
|
56
|
+
dist/${{ matrix.binary }}
|
|
57
|
+
dist/build-dependencies.txt
|
|
58
|
+
|
|
59
|
+
smoke_test:
|
|
60
|
+
needs: build
|
|
61
|
+
strategy:
|
|
62
|
+
fail-fast: false
|
|
63
|
+
matrix:
|
|
64
|
+
os: [windows-latest, macos-latest]
|
|
65
|
+
chrome: [true, false]
|
|
66
|
+
include:
|
|
67
|
+
- os: windows-latest
|
|
68
|
+
artifact: sapwebgui_mcp_windows
|
|
69
|
+
binary: sapwebgui_mcp_windows.exe
|
|
70
|
+
- os: macos-latest
|
|
71
|
+
artifact: sapwebgui_mcp_macos_arm64
|
|
72
|
+
binary: sapwebgui_mcp_macos_arm64
|
|
73
|
+
runs-on: ${{ matrix.os }}
|
|
74
|
+
name: "Smoke Test (${{ matrix.os }}, Chrome: ${{ matrix.chrome }})"
|
|
75
|
+
steps:
|
|
76
|
+
- name: Checkout code
|
|
77
|
+
uses: actions/checkout@v7
|
|
78
|
+
|
|
79
|
+
- name: Install uv
|
|
80
|
+
uses: astral-sh/setup-uv@v10.3.3
|
|
81
|
+
with:
|
|
82
|
+
python-version: "3.15"
|
|
83
|
+
|
|
84
|
+
- name: Download Executable
|
|
85
|
+
uses: actions/download-artifact@v8
|
|
86
|
+
with:
|
|
87
|
+
name: ${{ matrix.artifact }}
|
|
88
|
+
path: dist
|
|
89
|
+
|
|
90
|
+
# Chrome is pre-installed on GitHub Actions windows-latest runners
|
|
91
|
+
- name: Start Chrome headless (Windows)
|
|
92
|
+
if: matrix.chrome && matrix.os == 'windows-latest'
|
|
93
|
+
run: |
|
|
94
|
+
Start-Process -FilePath "C:\Program Files\Google\Chrome\Application\chrome.exe" `
|
|
95
|
+
-ArgumentList "--headless", "--disable-gpu", "--remote-debugging-port=9222", "--user-data-dir=$env:TEMP\chrome-debug"
|
|
96
|
+
# Wait up to 15s for CDP endpoint to come up (avoids fixed-sleep race)
|
|
97
|
+
$ok = $false
|
|
98
|
+
for ($i = 0; $i -lt 15; $i++) {
|
|
99
|
+
try {
|
|
100
|
+
Invoke-WebRequest -Uri "http://localhost:9222/json/version" -UseBasicParsing | Out-Null
|
|
101
|
+
$ok = $true
|
|
102
|
+
break
|
|
103
|
+
} catch {
|
|
104
|
+
Start-Sleep -Seconds 1
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (-not $ok) { throw "Chrome CDP endpoint did not come up within 15s" }
|
|
108
|
+
shell: pwsh
|
|
109
|
+
|
|
110
|
+
# Chrome is pre-installed on GitHub Actions macos-latest runners
|
|
111
|
+
- name: Start Chrome headless (macOS)
|
|
112
|
+
if: matrix.chrome && matrix.os == 'macos-latest'
|
|
113
|
+
run: |
|
|
114
|
+
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
|
|
115
|
+
--headless --disable-gpu --remote-debugging-port=9222 \
|
|
116
|
+
--user-data-dir="$RUNNER_TEMP/chrome-debug" &
|
|
117
|
+
# Wait up to 15s for CDP endpoint to come up (avoids fixed-sleep race)
|
|
118
|
+
for i in $(seq 1 15); do
|
|
119
|
+
if curl -sSf http://localhost:9222/json/version >/dev/null 2>&1; then
|
|
120
|
+
exit 0
|
|
121
|
+
fi
|
|
122
|
+
sleep 1
|
|
123
|
+
done
|
|
124
|
+
echo "Chrome CDP endpoint did not come up within 15s" >&2
|
|
125
|
+
exit 1
|
|
126
|
+
shell: bash
|
|
127
|
+
|
|
128
|
+
# actions/upload-artifact zips contents and the zip format does not
|
|
129
|
+
# reliably preserve Unix mode bits on download — restore +x.
|
|
130
|
+
- name: Make binary executable (macOS)
|
|
131
|
+
if: matrix.os == 'macos-latest'
|
|
132
|
+
run: chmod +x dist/${{ matrix.binary }}
|
|
133
|
+
shell: bash
|
|
134
|
+
|
|
135
|
+
- name: Smoke Test
|
|
136
|
+
run: uv run --no-project --python 3.15 python scripts/smoke_test_exe.py dist/${{ matrix.binary }}
|
|
137
|
+
|
|
138
|
+
release:
|
|
139
|
+
needs: [build, smoke_test]
|
|
140
|
+
if: github.event_name == 'release'
|
|
141
|
+
runs-on: ubuntu-latest
|
|
142
|
+
permissions:
|
|
143
|
+
contents: write
|
|
144
|
+
steps:
|
|
145
|
+
- name: Download Windows Executable
|
|
146
|
+
uses: actions/download-artifact@v8
|
|
147
|
+
with:
|
|
148
|
+
name: sapwebgui_mcp_windows
|
|
149
|
+
path: dist/windows
|
|
150
|
+
continue-on-error: true
|
|
151
|
+
|
|
152
|
+
- name: Download macOS Executable
|
|
153
|
+
uses: actions/download-artifact@v8
|
|
154
|
+
with:
|
|
155
|
+
name: sapwebgui_mcp_macos_arm64
|
|
156
|
+
path: dist/macos
|
|
157
|
+
continue-on-error: true
|
|
158
|
+
|
|
159
|
+
# Rename each binary independently so a missing artifact from one
|
|
160
|
+
# platform does not prevent the other from being attached to the release.
|
|
161
|
+
- name: Rename Executables with version
|
|
162
|
+
run: |
|
|
163
|
+
set -eu
|
|
164
|
+
mkdir -p dist/release
|
|
165
|
+
if [ -f ./dist/windows/sapwebgui_mcp_windows.exe ]; then
|
|
166
|
+
mv ./dist/windows/sapwebgui_mcp_windows.exe ./dist/release/sapwebgui_mcp_windows_${{ github.ref_name }}.exe
|
|
167
|
+
else
|
|
168
|
+
echo "::warning::Windows artifact missing; skipping"
|
|
169
|
+
fi
|
|
170
|
+
if [ -f ./dist/macos/sapwebgui_mcp_macos_arm64 ]; then
|
|
171
|
+
mv ./dist/macos/sapwebgui_mcp_macos_arm64 ./dist/release/sapwebgui_mcp_macos_arm64_${{ github.ref_name }}
|
|
172
|
+
else
|
|
173
|
+
echo "::warning::macOS arm64 artifact missing; skipping"
|
|
174
|
+
fi
|
|
175
|
+
ls -la dist/release/
|
|
176
|
+
|
|
177
|
+
- name: Generate release checksums
|
|
178
|
+
run: |
|
|
179
|
+
cd dist/release
|
|
180
|
+
shopt -s nullglob
|
|
181
|
+
assets=(./*)
|
|
182
|
+
if ((${#assets[@]})); then
|
|
183
|
+
sha256sum "${assets[@]}" > checksums.txt
|
|
184
|
+
else
|
|
185
|
+
: > checksums.txt
|
|
186
|
+
fi
|
|
187
|
+
|
|
188
|
+
- name: Upload Executables to Release
|
|
189
|
+
uses: softprops/action-gh-release@v3
|
|
190
|
+
with:
|
|
191
|
+
files: |
|
|
192
|
+
./dist/release/sapwebgui_mcp_windows_${{ github.ref_name }}.exe
|
|
193
|
+
./dist/release/sapwebgui_mcp_macos_arm64_${{ github.ref_name }}
|
|
194
|
+
./dist/release/checksums.txt
|
|
195
|
+
fail_on_unmatched_files: false
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Coverage
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
coverage:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
PYTHONPATH: src
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v10.3.3
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.15"
|
|
23
|
+
|
|
24
|
+
- name: Install Chromium for the browser unit tests
|
|
25
|
+
run: uv run --locked --group coverage playwright install --with-deps chromium
|
|
26
|
+
|
|
27
|
+
- name: Run coverage
|
|
28
|
+
run: |
|
|
29
|
+
uv run --locked --group coverage coverage run -m pytest -m "not integration"
|
|
30
|
+
uv run --locked --group coverage coverage html --omit '.venv/*,unittests/*'
|
|
31
|
+
uv run --locked --group coverage coverage report --fail-under 20 --omit '.venv/*,unittests/*'
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Dependabot auto-approve / -merge
|
|
2
|
+
on: pull_request
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
dependabot:
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
pull-requests: write
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
env:
|
|
11
|
+
PR_URL: ${{github.event.pull_request.html_url}}
|
|
12
|
+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
13
|
+
if: ${{ github.actor == 'dependabot[bot]' }}
|
|
14
|
+
steps:
|
|
15
|
+
- name: Approve a PR
|
|
16
|
+
run: gh pr review --approve "$PR_URL"
|
|
17
|
+
- name: Enable auto-merge for Dependabot PRs
|
|
18
|
+
run: gh pr merge --auto --squash "$PR_URL"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: "Test Dev Environment"
|
|
2
|
+
# Checks that the dev environment (uv sync --group dev) can be set up.
|
|
3
|
+
# This might not work, if different linting/testing groups refer to different versions of the same lib (e.g. typing-extensions).
|
|
4
|
+
# Different versions of the same package might work for isolated specific groups (only linting, only testing...) but the dev environment inherits from all of them.
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
pull_request: {}
|
|
9
|
+
jobs:
|
|
10
|
+
check:
|
|
11
|
+
runs-on: ${{ matrix.os }}
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
|
|
15
|
+
os: [ubuntu-latest]
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v10.3.3
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
- name: Create a Dev Environment
|
|
23
|
+
run: uv sync --locked --group dev
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Publish Docker Image
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
docker:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
packages: write
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
|
+
|
|
17
|
+
- name: Set up Docker Buildx
|
|
18
|
+
uses: docker/setup-buildx-action@v4
|
|
19
|
+
|
|
20
|
+
- name: Login to GitHub Container Registry
|
|
21
|
+
uses: docker/login-action@v4
|
|
22
|
+
with:
|
|
23
|
+
registry: ghcr.io
|
|
24
|
+
username: ${{ github.actor }}
|
|
25
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
+
|
|
27
|
+
- name: Extract metadata
|
|
28
|
+
id: meta
|
|
29
|
+
uses: docker/metadata-action@v6
|
|
30
|
+
with:
|
|
31
|
+
images: ghcr.io/${{ github.repository }}
|
|
32
|
+
tags: |
|
|
33
|
+
type=semver,pattern={{version}}
|
|
34
|
+
type=semver,pattern={{major}}.{{minor}}
|
|
35
|
+
type=raw,value=latest
|
|
36
|
+
|
|
37
|
+
- name: Build and push
|
|
38
|
+
uses: docker/build-push-action@v7
|
|
39
|
+
with:
|
|
40
|
+
context: .
|
|
41
|
+
push: true
|
|
42
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
43
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
44
|
+
cache-from: type=gha
|
|
45
|
+
cache-to: type=gha,mode=max
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Formatting
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
formatting:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
PYTHONPATH: src
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v10.3.3
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.15"
|
|
23
|
+
|
|
24
|
+
- name: Check formatting
|
|
25
|
+
run: |
|
|
26
|
+
uv run --locked --group linting ruff format --check .
|
|
27
|
+
uv run --locked --group linting ruff check --select I .
|