mmt-mcp 1.42.2-pre
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/README.md +22 -0
- package/dist/examples/README.md +19 -0
- package/dist/examples/ai/golden_smoke/README.md +8 -0
- package/dist/examples/ai/golden_smoke/apis/echo.mmt +12 -0
- package/dist/examples/ai/golden_smoke/tests/echo-smoke.mmt +18 -0
- package/dist/examples/basic/01_simple_api/README.md +38 -0
- package/dist/examples/basic/01_simple_api/get_json.mmt +6 -0
- package/dist/examples/basic/01_simple_api/post_echo_json_body.mmt +13 -0
- package/dist/examples/basic/01_simple_api/post_echo_yaml_body.mmt +11 -0
- package/dist/examples/basic/02_simple_test/README.md +35 -0
- package/dist/examples/basic/02_simple_test/echo_test.mmt +12 -0
- package/dist/examples/basic/03_environment_variables/README.md +40 -0
- package/dist/examples/basic/03_environment_variables/get_json.mmt +6 -0
- package/dist/examples/basic/03_environment_variables/multimeter.mmt +3 -0
- package/dist/examples/basic/04_basic_suite/README.md +33 -0
- package/dist/examples/basic/04_basic_suite/suite.mmt +6 -0
- package/dist/examples/basic/04_basic_suite/tests/get_status_test.mmt +9 -0
- package/dist/examples/basic/04_basic_suite/tests/post_echo_test.mmt +12 -0
- package/dist/examples/basic/05_basic_documentation/README.md +24 -0
- package/dist/examples/basic/05_basic_documentation/api/get_user.mmt +12 -0
- package/dist/examples/basic/05_basic_documentation/document.mmt +4 -0
- package/dist/examples/examples-index.json +1559 -0
- package/dist/examples/intermediate/01_api_inputs_outputs/README.md +46 -0
- package/dist/examples/intermediate/01_api_inputs_outputs/get_dot_notation.mmt +14 -0
- package/dist/examples/intermediate/01_api_inputs_outputs/get_with_outputs.mmt +10 -0
- package/dist/examples/intermediate/01_api_inputs_outputs/post_regex_outputs.mmt +24 -0
- package/dist/examples/intermediate/01_api_inputs_outputs/post_with_inputs_outputs.mmt +20 -0
- package/dist/examples/intermediate/02_websocket/README.md +44 -0
- package/dist/examples/intermediate/02_websocket/ws_echo.mmt +11 -0
- package/dist/examples/intermediate/02_websocket/ws_json_echo.mmt +16 -0
- package/dist/examples/intermediate/03_graphql/README.md +10 -0
- package/dist/examples/intermediate/03_graphql/graphql_query.mmt +16 -0
- package/dist/examples/intermediate/03_graphql/graphql_variables.mmt +25 -0
- package/dist/examples/intermediate/04_grpc/README.md +10 -0
- package/dist/examples/intermediate/04_grpc/grpc_server_stream.mmt +15 -0
- package/dist/examples/intermediate/04_grpc/grpc_unary.mmt +13 -0
- package/dist/examples/intermediate/05_api_documentation/README.md +33 -0
- package/dist/examples/intermediate/05_api_documentation/api/get_users.mmt +13 -0
- package/dist/examples/intermediate/05_api_documentation/api/post_create_user.mmt +25 -0
- package/dist/examples/intermediate/05_api_documentation/api/ws_notifications.mmt +18 -0
- package/dist/examples/intermediate/05_api_documentation/document.mmt +17 -0
- package/dist/examples/intermediate/05_api_documentation/markdown_api/health_check.mmt +6 -0
- package/dist/examples/intermediate/05_api_documentation/markdown_api/overview.md +77 -0
- package/dist/examples/intermediate/05_api_documentation/markdown_api/search_products.mmt +15 -0
- package/dist/examples/intermediate/05_api_documentation/markdown_api/submit_order.mmt +18 -0
- package/dist/examples/intermediate/06_imports/README.md +92 -0
- package/dist/examples/intermediate/06_imports/apis/echo_api.mmt +13 -0
- package/dist/examples/intermediate/06_imports/apis/greet_api.mmt +13 -0
- package/dist/examples/intermediate/06_imports/multimeter.mmt +5 -0
- package/dist/examples/intermediate/06_imports/test_relative.mmt +15 -0
- package/dist/examples/intermediate/06_imports/test_root_import.mmt +14 -0
- package/dist/examples/intermediate/06_imports/tests/test_api.mmt +30 -0
- package/dist/examples/intermediate/07_simple_suite/README.md +56 -0
- package/dist/examples/intermediate/07_simple_suite/api/echo_api.mmt +12 -0
- package/dist/examples/intermediate/07_simple_suite/api/status_api.mmt +8 -0
- package/dist/examples/intermediate/07_simple_suite/suite_parallel.mmt +11 -0
- package/dist/examples/intermediate/07_simple_suite/suite_sequential.mmt +14 -0
- package/dist/examples/intermediate/07_simple_suite/test/echo_test.mmt +16 -0
- package/dist/examples/intermediate/07_simple_suite/test/echo_test_fail.mmt +15 -0
- package/dist/examples/intermediate/07_simple_suite/test/status_test.mmt +11 -0
- package/dist/examples/intermediate/07_simple_suite/test/status_test_fail.mmt +11 -0
- package/dist/examples/intermediate/08_chained_api_calls/README.md +58 -0
- package/dist/examples/intermediate/08_chained_api_calls/api/get_profile.mmt +15 -0
- package/dist/examples/intermediate/08_chained_api_calls/api/login.mmt +17 -0
- package/dist/examples/intermediate/08_chained_api_calls/chained_test.mmt +31 -0
- package/dist/examples/intermediate/09_csv_data_driven_test/README.md +80 -0
- package/dist/examples/intermediate/09_csv_data_driven_test/echo_api.mmt +14 -0
- package/dist/examples/intermediate/09_csv_data_driven_test/echo_csv_test.mmt +18 -0
- package/dist/examples/intermediate/10_environment_presets/README.md +58 -0
- package/dist/examples/intermediate/10_environment_presets/api/echo_env.mmt +14 -0
- package/dist/examples/intermediate/10_environment_presets/multimeter.mmt +22 -0
- package/dist/examples/intermediate/10_environment_presets/test/preset_test.mmt +14 -0
- package/dist/examples/intermediate/11_control_flow/README.md +48 -0
- package/dist/examples/intermediate/11_control_flow/api/echo.mmt +13 -0
- package/dist/examples/intermediate/11_control_flow/for_loop_test.mmt +15 -0
- package/dist/examples/intermediate/11_control_flow/if_else_test.mmt +19 -0
- package/dist/examples/intermediate/11_control_flow/repeat_delay_test.mmt +24 -0
- package/dist/examples/intermediate/12_random_values/README.md +59 -0
- package/dist/examples/intermediate/12_random_values/api/random_echo.mmt +21 -0
- package/dist/examples/intermediate/12_random_values/random_values_test.mmt +15 -0
- package/dist/examples/intermediate/13_stages_and_conditions/README.md +58 -0
- package/dist/examples/intermediate/13_stages_and_conditions/api/get_profile.mmt +13 -0
- package/dist/examples/intermediate/13_stages_and_conditions/api/get_settings.mmt +13 -0
- package/dist/examples/intermediate/13_stages_and_conditions/api/login.mmt +15 -0
- package/dist/examples/intermediate/13_stages_and_conditions/stages_test.mmt +40 -0
- package/dist/examples/intermediate/14_javascript_helpers/README.md +59 -0
- package/dist/examples/intermediate/14_javascript_helpers/api/echo.mmt +13 -0
- package/dist/examples/intermediate/14_javascript_helpers/js_test.mmt +31 -0
- package/dist/examples/intermediate/15_http_files/README.md +25 -0
- package/dist/examples/intermediate/15_http_files/import_http_in_test.mmt +8 -0
- package/dist/examples/intermediate/16_bruno_files/README.md +36 -0
- package/dist/examples/intermediate/16_bruno_files/import_bruno_in_test.mmt +18 -0
- package/dist/examples/intermediate/16_bruno_files/library/README.md +8 -0
- package/dist/examples/intermediate/17_api_authentication/README.md +35 -0
- package/dist/examples/intermediate/17_api_authentication/get_with_apikey_auth.mmt +10 -0
- package/dist/examples/intermediate/17_api_authentication/get_with_basic_auth.mmt +10 -0
- package/dist/examples/intermediate/17_api_authentication/get_with_bearer_auth.mmt +9 -0
- package/dist/examples/intermediate/18_simple_mock_server/README.md +92 -0
- package/dist/examples/intermediate/18_simple_mock_server/api/create_user.mmt +15 -0
- package/dist/examples/intermediate/18_simple_mock_server/api/get_health.mmt +9 -0
- package/dist/examples/intermediate/18_simple_mock_server/api/get_user.mmt +12 -0
- package/dist/examples/intermediate/18_simple_mock_server/api/search.mmt +11 -0
- package/dist/examples/intermediate/18_simple_mock_server/server/mock_server.mmt +46 -0
- package/dist/examples/intermediate/18_simple_mock_server/suite.mmt +12 -0
- package/dist/examples/intermediate/18_simple_mock_server/test/health_test.mmt +13 -0
- package/dist/examples/intermediate/18_simple_mock_server/test/search_test.mmt +15 -0
- package/dist/examples/intermediate/18_simple_mock_server/test/user_test.mmt +27 -0
- package/dist/examples/intermediate/19_environment_post_echo/README.md +33 -0
- package/dist/examples/intermediate/19_environment_post_echo/multimeter.mmt +4 -0
- package/dist/examples/intermediate/19_environment_post_echo/post_echo.mmt +12 -0
- package/dist/examples/intermediate/20_document_parameters/README.md +25 -0
- package/dist/examples/intermediate/20_document_parameters/api/search_users.mmt +28 -0
- package/dist/examples/intermediate/20_document_parameters/document.mmt +6 -0
- package/dist/examples/intermediate/21_manual_timeout/README.md +22 -0
- package/dist/examples/intermediate/21_manual_timeout/manual_timeout.mmt +11 -0
- package/dist/examples/intermediate/22_omit_keyword/README.md +45 -0
- package/dist/examples/intermediate/22_omit_keyword/omit_keyword.mmt +34 -0
- package/dist/examples/intermediate/22_omit_keyword/omit_keyword_test.mmt +19 -0
- package/dist/examples/intermediate/23_check_operators/README.md +31 -0
- package/dist/examples/intermediate/23_check_operators/api/sample.mmt +27 -0
- package/dist/examples/intermediate/23_check_operators/operators_test.mmt +54 -0
- package/dist/examples/intermediate/24_test_call_cache/README.md +34 -0
- package/dist/examples/intermediate/24_test_call_cache/api/login_echo.mmt +19 -0
- package/dist/examples/intermediate/24_test_call_cache/create_session.mmt +28 -0
- package/dist/examples/intermediate/24_test_call_cache/use_session_cache.mmt +41 -0
- package/dist/examples/intermediate/25_convert_to_mmt/README.md +17 -0
- package/dist/examples/intermediate/25_convert_to_mmt/bruno/README.md +5 -0
- package/dist/examples/intermediate/25_convert_to_mmt/bruno/converted/api/create-user.mmt +11 -0
- package/dist/examples/intermediate/25_convert_to_mmt/bruno/converted/tests/create-user.mmt +11 -0
- package/dist/examples/intermediate/25_convert_to_mmt/http/README.md +5 -0
- package/dist/examples/intermediate/25_convert_to_mmt/http/converted/api/ping.mmt +9 -0
- package/dist/examples/intermediate/25_convert_to_mmt/http/converted/tests/source-http.mmt +11 -0
- package/dist/examples/intermediate/25_convert_to_mmt/openapi/README.md +5 -0
- package/dist/examples/intermediate/25_convert_to_mmt/openapi/converted/api/get-sample-json.mmt +8 -0
- package/dist/examples/intermediate/25_convert_to_mmt/postman/README.md +7 -0
- package/dist/examples/intermediate/25_convert_to_mmt/postman/converted/api/ping.mmt +23 -0
- package/dist/examples/intermediate/25_convert_to_mmt/postman/converted/suites/collection.mmt +7 -0
- package/dist/examples/intermediate/25_convert_to_mmt/postman/converted/tests/collection.mmt +17 -0
- package/dist/examples/intermediate/25_convert_to_mmt/wsdl/README.md +5 -0
- package/dist/examples/intermediate/25_convert_to_mmt/wsdl/converted/api/ping.mmt +21 -0
- package/dist/examples/intermediate/26_yaml_expect_typing/README.md +21 -0
- package/dist/examples/intermediate/26_yaml_expect_typing/typing_test.mmt +29 -0
- package/dist/examples/intermediate/27_ai_judge/README.md +31 -0
- package/dist/examples/intermediate/27_ai_judge/judge_demo.mmt +33 -0
- package/dist/examples/intermediate/27_ai_judge/judges/gemini.mmt +12 -0
- package/dist/examples/intermediate/27_ai_judge/judges/ollama.mmt +8 -0
- package/dist/examples/professional/01_report_generation/README.md +87 -0
- package/dist/examples/professional/01_report_generation/api/echo.mmt +13 -0
- package/dist/examples/professional/01_report_generation/suite.mmt +12 -0
- package/dist/examples/professional/01_report_generation/test/fail_test.mmt +11 -0
- package/dist/examples/professional/01_report_generation/test/pass_test.mmt +17 -0
- package/dist/examples/professional/02_tls_certificates/README.md +113 -0
- package/dist/examples/professional/02_tls_certificates/api/secure_echo.mmt +13 -0
- package/dist/examples/professional/02_tls_certificates/env.mmt +17 -0
- package/dist/examples/professional/02_tls_certificates/tls_test.mmt +12 -0
- package/dist/examples/professional/03_load_test/README.md +39 -0
- package/dist/examples/professional/03_load_test/echo_api.mmt +12 -0
- package/dist/examples/professional/03_load_test/echo_test.mmt +14 -0
- package/dist/examples/professional/03_load_test/loadtest.mmt +15 -0
- package/dist/examples/professional/04_convert_to_mmt/README.md +30 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/README.md +8 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/basic-auth-check.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/bearer-auth-check.mmt +12 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/cache-headers.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/delayed-response.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-anything-alias.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-delete.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-get-with-query.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-post-body.mmt +13 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-put-body.mmt +14 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/get-sample-html.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/get-sample-json.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/get-sample-xml.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/method-match-get.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/random-bytes.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/redirect-twice.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-client-ip.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-cookies.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-request-headers.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-status-200.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-status-404.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/service-help.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/set-cookie.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/basic-auth-check.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/bearer-auth-check.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/cache-headers.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/delayed-response.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-anything-alias.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-delete.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-get-with-query.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-post-body.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-put-body.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/get-sample-html.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/get-sample-json.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/get-sample-xml.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/method-match-get.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/random-bytes.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/redirect-twice.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-client-ip.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-cookies.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-request-headers.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-status-200.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-status-404.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/service-help.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/set-cookie.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/http/README.md +7 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/basic-auth-check.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/bearer-auth-check.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/cache-headers.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/delayed-response.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-anything-alias.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-delete.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-get-with-query.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-post-body.mmt +13 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-put-body.mmt +14 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/get-sample-html.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/get-sample-json.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/get-sample-xml.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/method-match-get.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/random-bytes.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/redirect-twice.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-client-ip.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-cookies.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-request-headers.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-status-200.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-status-404.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/service-help.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/set-cookie.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/tests/source-http.mmt +95 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/README.md +8 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/basic-auth-check.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/bearer-auth-check.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/cache-headers.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/delayed-response.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-anything-alias.mmt +13 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-delete.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-get-with-query.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-post-body.mmt +36 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-put-body.mmt +25 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/get-sample-html.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/get-sample-json.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/get-sample-xml.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/method-match.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/random-bytes.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/redirect-n-times.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-client-ip.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-cookies.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-request-headers.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-status-code.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/service-help.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/set-cookie.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/README.md +8 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/auth/basic-auth-check.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/auth/bearer-auth-check.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-anything-alias.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-delete.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-get-with-query.mmt +8 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-post-body.mmt +13 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-put-body.mmt +14 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/return-client-ip.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/return-cookies.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/return-request-headers.mmt +8 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/set-cookie.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/get-sample-html.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/get-sample-json.mmt +28 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/get-sample-xml.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/random-bytes.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/service-help.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/cache-headers.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/delayed-response.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/method-match-get.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/redirect-twice.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/return-status-200.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/return-status-404.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/multimeter.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/auth.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/collection.mmt +15 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/echo.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/inspect.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/samples.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/status.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/auth.mmt +15 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/echo.mmt +27 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/inspect.mmt +23 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/samples.mmt +29 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/status.mmt +31 -0
- package/dist/examples/professional/04_convert_to_mmt/wsdl/README.md +8 -0
- package/dist/examples/professional/04_convert_to_mmt/wsdl/converted/api/echomessage.mmt +23 -0
- package/dist/examples/professional/04_convert_to_mmt/wsdl/converted/api/getsamplexml.mmt +21 -0
- package/dist/examples/professional/04_convert_to_mmt/wsdl/converted/api/probestatus.mmt +21 -0
- package/dist/examples/professional/05_tls_mock_server/README.md +19 -0
- package/dist/examples/professional/05_tls_mock_server/api/secure_health.mmt +11 -0
- package/dist/examples/professional/05_tls_mock_server/multimeter.mmt +3 -0
- package/dist/examples/professional/05_tls_mock_server/server/mock_server.mmt +23 -0
- package/dist/examples/professional/05_tls_mock_server/test/secure_health_test.mmt +15 -0
- package/dist/examples/professional/06_mtls_mock_server/README.md +23 -0
- package/dist/examples/professional/06_mtls_mock_server/api/secure_health.mmt +11 -0
- package/dist/examples/professional/06_mtls_mock_server/multimeter.mmt +12 -0
- package/dist/examples/professional/06_mtls_mock_server/server/mock_server.mmt +24 -0
- package/dist/examples/professional/06_mtls_mock_server/test/secure_health_test.mmt +15 -0
- package/dist/examples/professional/07_mock_server_timeout/README.md +26 -0
- package/dist/examples/professional/07_mock_server_timeout/api/slow_request.mmt +10 -0
- package/dist/examples/professional/07_mock_server_timeout/server/mock_server.mmt +19 -0
- package/dist/examples/professional/07_mock_server_timeout/suite.mmt +7 -0
- package/dist/examples/professional/07_mock_server_timeout/test/slow_timeout_test.mmt +15 -0
- package/dist/examples/professional/08_external_mtls_badssl/README.md +52 -0
- package/dist/examples/professional/08_external_mtls_badssl/api/badssl_client.mmt +6 -0
- package/dist/examples/professional/08_external_mtls_badssl/badssl_mtls_test.mmt +10 -0
- package/dist/examples/professional/08_external_mtls_badssl/multimeter.mmt +13 -0
- package/dist/examples/professional/09_ci_pipelines/README.md +92 -0
- package/dist/examples/professional/09_ci_pipelines/smoke_get.mmt +9 -0
- package/dist/examples/professional/09_ci_pipelines/smoke_post.mmt +12 -0
- package/dist/examples/professional/09_ci_pipelines/suite.mmt +9 -0
- package/dist/examples/professional/10_vault_http_setenv/README.md +60 -0
- package/dist/examples/professional/10_vault_http_setenv/api/bearer_with_env_token.mmt +16 -0
- package/dist/examples/professional/10_vault_http_setenv/api/vault_kv_read.mmt +22 -0
- package/dist/examples/professional/10_vault_http_setenv/env.mmt +21 -0
- package/dist/examples/professional/10_vault_http_setenv/server/vault_kv_mock.mmt +45 -0
- package/dist/examples/professional/10_vault_http_setenv/vault_to_api_test.mmt +22 -0
- package/dist/guides/agent-workflow.md +75 -0
- package/dist/guides/general.md +64 -0
- package/dist/guides/generate-api.md +221 -0
- package/dist/guides/generate-doc.md +103 -0
- package/dist/guides/generate-env.md +147 -0
- package/dist/guides/generate-loadtest.md +55 -0
- package/dist/guides/generate-suite.md +167 -0
- package/dist/guides/generate-test-skill.md +60 -0
- package/dist/guides/generate-test.md +335 -0
- package/dist/guides/generate.md +60 -0
- package/dist/guides/golden-smoke.md +52 -0
- package/dist/guides/min/api.md +29 -0
- package/dist/guides/min/constraints.md +9 -0
- package/dist/guides/min/doc.md +17 -0
- package/dist/guides/min/env.md +26 -0
- package/dist/guides/min/loadtest.md +17 -0
- package/dist/guides/min/overview.md +25 -0
- package/dist/guides/min/suite.md +18 -0
- package/dist/guides/min/test.md +42 -0
- package/dist/guides/min/workflow.md +16 -0
- package/dist/guides/offline-agent.md +46 -0
- package/dist/server.cjs +27500 -0
- package/dist/server.js +27500 -0
- package/package.json +58 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: Mock server timeout simulation
|
|
3
|
+
description: |-
|
|
4
|
+
Starts a mock server with a 3-second endpoint delay and calls it
|
|
5
|
+
with a 2-second request timeout.
|
|
6
|
+
import:
|
|
7
|
+
server: ../server/mock_server.mmt
|
|
8
|
+
slow_request: ../api/slow_request.mmt
|
|
9
|
+
steps:
|
|
10
|
+
- run: server
|
|
11
|
+
- call: slow_request
|
|
12
|
+
id: timeout_result
|
|
13
|
+
expect:
|
|
14
|
+
status: 200
|
|
15
|
+
report: all
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# External mTLS with BadSSL
|
|
2
|
+
|
|
3
|
+
This example calls the public BadSSL client-certificate endpoint at `https://client.badssl.com/` using a real client certificate.
|
|
4
|
+
|
|
5
|
+
It is useful for checking that Multimeter sends mTLS client certificate material through the VS Code extension and CLI request transport, not just that local certificate matching logic works.
|
|
6
|
+
|
|
7
|
+
## Files
|
|
8
|
+
|
|
9
|
+
- `api/badssl_client.mmt` defines the public BadSSL mTLS endpoint.
|
|
10
|
+
- `badssl_mtls_test.mmt` calls the API and expects HTTP 200.
|
|
11
|
+
- `multimeter.mmt` configures the BadSSL client certificate with `host: "*:443"`.
|
|
12
|
+
- `certs/badssl.com-client.pem` is the original PEM downloaded from BadSSL.
|
|
13
|
+
- `certs/badssl-client.crt` is the certificate block split from the PEM.
|
|
14
|
+
- `certs/badssl-client.key` is the encrypted private key block split from the PEM.
|
|
15
|
+
- `certs/badssl-client.p12` is the same client identity as a PKCS#12 bundle.
|
|
16
|
+
|
|
17
|
+
The key and PKCS#12 passphrase is the public BadSSL test passphrase: `badssl.com`. The env file includes both a PEM `cert`/`key` client and a `pfx` client; matching uses the first enabled client for `*:443`, so the PEM client is used at runtime.
|
|
18
|
+
|
|
19
|
+
## Run
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx testlight run examples/professional/08_external_mtls_badssl/badssl_mtls_test.mmt
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The runner discovers the nearest `multimeter.mmt` automatically. You can pass it explicitly if needed:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npx testlight run examples/professional/08_external_mtls_badssl/badssl_mtls_test.mmt \
|
|
29
|
+
--env-file examples/professional/08_external_mtls_badssl/multimeter.mmt
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## External verification
|
|
33
|
+
|
|
34
|
+
Use curl to confirm the same certificate works outside Multimeter:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
curl -v \
|
|
38
|
+
--cert examples/professional/08_external_mtls_badssl/certs/badssl-client.crt \
|
|
39
|
+
--key examples/professional/08_external_mtls_badssl/certs/badssl-client.key \
|
|
40
|
+
--pass badssl.com \
|
|
41
|
+
https://client.badssl.com/
|
|
42
|
+
|
|
43
|
+
# Equivalent PKCS#12 bundle
|
|
44
|
+
curl -v \
|
|
45
|
+
--cert-type P12 \
|
|
46
|
+
--cert examples/professional/08_external_mtls_badssl/certs/badssl-client.p12:badssl.com \
|
|
47
|
+
https://client.badssl.com/
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Without the client certificate, BadSSL returns a TLS/client-certificate failure instead of the success page.
|
|
51
|
+
|
|
52
|
+
BadSSL returns an HTML page. Current runners may print a non-fatal JSON parse warning while extracting outputs from the HTML response; the mTLS smoke test still passes when the status check reports HTTP 200.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: External BadSSL mTLS Test
|
|
3
|
+
description: Calls the public BadSSL client-certificate endpoint with the included client certificate
|
|
4
|
+
import:
|
|
5
|
+
badsslClient: ./api/badssl_client.mmt
|
|
6
|
+
steps:
|
|
7
|
+
- call: badsslClient
|
|
8
|
+
title: Call public mTLS endpoint
|
|
9
|
+
expect:
|
|
10
|
+
status: 200
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type: env
|
|
2
|
+
|
|
3
|
+
certificates:
|
|
4
|
+
clients:
|
|
5
|
+
- name: "BadSSL public client certificate"
|
|
6
|
+
host: "*:443"
|
|
7
|
+
cert: "./certs/badssl-client.crt"
|
|
8
|
+
key: "./certs/badssl-client.key"
|
|
9
|
+
passphrase_plain: "badssl.com"
|
|
10
|
+
- name: "BadSSL PKCS#12 client certificate"
|
|
11
|
+
host: "*:443"
|
|
12
|
+
pfx: "./certs/badssl-client.p12"
|
|
13
|
+
passphrase_plain: "badssl.com"
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# CI pipelines (GitHub, GitLab, Azure)
|
|
2
|
+
|
|
3
|
+
The same `.mmt` suite runs in every pipeline. Install the `mmt-testlight` npm package, run `testlight`, and publish the JUnit file.
|
|
4
|
+
|
|
5
|
+
GitHub has a composite Action that does that install/run for you. GitLab and Azure use the same CLI commands.
|
|
6
|
+
|
|
7
|
+
## Structure
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
09_ci_pipelines/
|
|
11
|
+
├── suite.mmt # Suite all three pipelines run
|
|
12
|
+
├── smoke_get.mmt
|
|
13
|
+
├── smoke_post.mmt
|
|
14
|
+
├── github-actions.yml # Copy to .github/workflows/mmt.yml
|
|
15
|
+
├── gitlab-ci.yml # Copy to .gitlab-ci.yml
|
|
16
|
+
├── azure-pipelines.yml # Copy to azure-pipelines.yml
|
|
17
|
+
└── README.md
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Shared command
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npm install -g mmt-testlight
|
|
24
|
+
mkdir -p results
|
|
25
|
+
testlight run suite.mmt --report junit --report-file results/junit.xml
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
From this repository:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
npx mmt-testlight run examples/professional/09_ci_pipelines/suite.mmt \
|
|
32
|
+
--report junit --report-file results/junit.xml
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`results/` is created automatically.
|
|
36
|
+
|
|
37
|
+
## GitHub Actions
|
|
38
|
+
|
|
39
|
+
Copy `github-actions.yml` to `.github/workflows/mmt.yml`. It uses the Multimeter Action:
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
- uses: mshobeyri/testlight-action@v1
|
|
43
|
+
with:
|
|
44
|
+
file: suite.mmt
|
|
45
|
+
report: junit
|
|
46
|
+
report-file: results/junit.xml
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If you prefer the npm CLI instead of the Action, use the same `npm install -g` / `testlight run` lines as GitLab and Azure.
|
|
50
|
+
|
|
51
|
+
## GitLab CI
|
|
52
|
+
|
|
53
|
+
Copy `gitlab-ci.yml` to `.gitlab-ci.yml`. GitLab publishes `results/junit.xml` as a JUnit report.
|
|
54
|
+
|
|
55
|
+
## Azure Pipelines
|
|
56
|
+
|
|
57
|
+
Copy `azure-pipelines.yml` to `azure-pipelines.yml`. Azure publishes the same JUnit file with `PublishTestResults@2`.
|
|
58
|
+
|
|
59
|
+
## Other pipelines
|
|
60
|
+
|
|
61
|
+
Any runner with Node.js can use the shared command. Jenkins example:
|
|
62
|
+
|
|
63
|
+
```groovy
|
|
64
|
+
pipeline {
|
|
65
|
+
agent any
|
|
66
|
+
stages {
|
|
67
|
+
stage('Test') {
|
|
68
|
+
steps {
|
|
69
|
+
sh 'npm install -g mmt-testlight'
|
|
70
|
+
sh 'mkdir -p results'
|
|
71
|
+
sh 'testlight run suite.mmt --report junit --report-file results/junit.xml'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
post {
|
|
76
|
+
always {
|
|
77
|
+
junit 'results/junit.xml'
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Files
|
|
84
|
+
|
|
85
|
+
| File | Description |
|
|
86
|
+
|---|---|
|
|
87
|
+
| `suite.mmt` | Two public smoke tests against test.mmt.dev |
|
|
88
|
+
| `github-actions.yml` | GitHub Actions workflow |
|
|
89
|
+
| `gitlab-ci.yml` | GitLab CI job |
|
|
90
|
+
| `azure-pipelines.yml` | Azure Pipelines job |
|
|
91
|
+
|
|
92
|
+
Change `suite.mmt` in each YAML if the suite is not at the repository root.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: CI smoke POST
|
|
3
|
+
description: Public smoke check used by the GitHub, GitLab, and Azure pipeline examples
|
|
4
|
+
steps:
|
|
5
|
+
- http: https://test.mmt.dev/echo
|
|
6
|
+
title: Post echo
|
|
7
|
+
method: post
|
|
8
|
+
body:
|
|
9
|
+
message: hello ci
|
|
10
|
+
expect:
|
|
11
|
+
status: 200
|
|
12
|
+
body.body.message: hello ci
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Vault over HTTP + setenv
|
|
2
|
+
|
|
3
|
+
Shows how to treat **HashiCorp Vault / OpenBao** as a normal HTTP API, then promote the secret into the environment with **`setenv`** — no special Vault protocol required.
|
|
4
|
+
|
|
5
|
+
The runnable path uses a **local mock** that returns a Vault KV v2 JSON shape and a bearer-protected probe. Point the same APIs at a real Vault / [test.mmt.dev](https://test.mmt.dev) when you are ready.
|
|
6
|
+
|
|
7
|
+
## Flow
|
|
8
|
+
|
|
9
|
+
1. Mock (or Vault) serves `GET /v1/secret/data/mmt` with `X-Vault-Token`
|
|
10
|
+
2. `vault_kv_read.mmt` extracts `body.data.data.token` and can `setenv` it as `api_token`
|
|
11
|
+
3. `bearer_with_env_token.mmt` calls a protected URL with `e:api_token`
|
|
12
|
+
|
|
13
|
+
## Files
|
|
14
|
+
|
|
15
|
+
| File | Purpose |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `server/vault_kv_mock.mmt` | Local Vault KV v2–shaped mock + bearer probe on port `9108` |
|
|
18
|
+
| `api/vault_kv_read.mmt` | HTTP read + `outputs` / `setenv` |
|
|
19
|
+
| `api/bearer_with_env_token.mmt` | Uses `e:api_token` against the protected probe |
|
|
20
|
+
| `env.mmt` | Default `vault_addr` / `vault_token` / path for the mock |
|
|
21
|
+
| `vault_to_api_test.mmt` | End-to-end: mock → read → setenv → bearer check |
|
|
22
|
+
|
|
23
|
+
## Run (mock — no Vault install)
|
|
24
|
+
|
|
25
|
+
From the repo root:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npx testlight run examples/professional/10_vault_http_setenv/vault_to_api_test.mmt \
|
|
29
|
+
--env-file examples/professional/10_vault_http_setenv/env.mmt \
|
|
30
|
+
--preset runner.mock
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Expected: Vault mock returns `testtoken`, setenv stores it, bearer check succeeds.
|
|
34
|
+
|
|
35
|
+
### In VS Code
|
|
36
|
+
|
|
37
|
+
1. Open `vault_to_api_test.mmt` (or start `server/vault_kv_mock.mmt` yourself).
|
|
38
|
+
2. Open `api/vault_kv_read.mmt`, load `env.mmt` / preset `runner.mock`, then **Send** — `setenv` fills `api_token` in the workspace environment.
|
|
39
|
+
3. Open `api/bearer_with_env_token.mmt` and **Send**.
|
|
40
|
+
|
|
41
|
+
## Use a real Vault / OpenBao
|
|
42
|
+
|
|
43
|
+
Same API file; override env (token never committed):
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
npx testlight run examples/professional/10_vault_http_setenv/api/vault_kv_read.mmt \
|
|
47
|
+
-e vault_addr=https://vault.example.com:8200 \
|
|
48
|
+
-e vault_token="$VAULT_TOKEN" \
|
|
49
|
+
-e vault_secret_path=mmt
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Or in VS Code: set those variables in the Environment panel, then Send `vault_kv_read.mmt`. KV v2 path and `body.data.data.*` extraction stay the same for OpenBao.
|
|
53
|
+
|
|
54
|
+
Optional: after setenv, point `bearer_with_env_token.mmt` at `https://test.mmt.dev/auth/bearer` (sandbox expects `Bearer testtoken`).
|
|
55
|
+
|
|
56
|
+
## Why this pattern
|
|
57
|
+
|
|
58
|
+
- Vault’s API is already HTTP — Multimeter does not need `protocol: vault`
|
|
59
|
+
- `setenv` is the write path into the same env bag that `e:` reads
|
|
60
|
+
- Pipelines can still fetch outside Multimeter and pass `-e`; this example shows the in-product equivalent
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type: api
|
|
2
|
+
title: Bearer auth with env token
|
|
3
|
+
description: |-
|
|
4
|
+
Calls a bearer-protected endpoint using the token pulled from Vault
|
|
5
|
+
(or the mock) via `setenv` → `e:api_token`.
|
|
6
|
+
|
|
7
|
+
Default URL hits the local mock. Swap to
|
|
8
|
+
`https://test.mmt.dev/auth/bearer` to verify against the public sandbox
|
|
9
|
+
(expects `Bearer testtoken`).
|
|
10
|
+
protocol: http
|
|
11
|
+
method: get
|
|
12
|
+
url: <<e:vault_addr>>/auth/bearer
|
|
13
|
+
format: json
|
|
14
|
+
auth:
|
|
15
|
+
type: bearer
|
|
16
|
+
token: e:api_token
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type: api
|
|
2
|
+
title: Vault KV read
|
|
3
|
+
description: |-
|
|
4
|
+
Reads a secret over plain HTTP the same way you would call Vault or OpenBao
|
|
5
|
+
KV v2 (`GET /v1/secret/data/...` + `X-Vault-Token`).
|
|
6
|
+
|
|
7
|
+
`setenv` promotes `token` into the runtime environment so later APIs can use
|
|
8
|
+
`e:api_token` / `<<e:api_token>>`.
|
|
9
|
+
|
|
10
|
+
Default URL hits the local mock in this example. Point `vault_addr` at a real
|
|
11
|
+
Vault/OpenBao and set `vault_token` to use your cluster instead.
|
|
12
|
+
protocol: http
|
|
13
|
+
method: get
|
|
14
|
+
url: <<e:vault_addr>>/v1/secret/data/<<e:vault_secret_path>>
|
|
15
|
+
headers:
|
|
16
|
+
X-Vault-Token: <<e:vault_token>>
|
|
17
|
+
Accept: application/json
|
|
18
|
+
format: json
|
|
19
|
+
outputs:
|
|
20
|
+
api_token: body.data.data.token
|
|
21
|
+
setenv:
|
|
22
|
+
api_token: body.data.data.token
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type: env
|
|
2
|
+
title: Vault HTTP example defaults
|
|
3
|
+
description: |-
|
|
4
|
+
Defaults for the local Vault KV mock. Override for a real Vault/OpenBao:
|
|
5
|
+
vault_addr, vault_token, vault_secret_path.
|
|
6
|
+
variables:
|
|
7
|
+
vault_addr:
|
|
8
|
+
mock: http://localhost:9108
|
|
9
|
+
vault_token:
|
|
10
|
+
mock: root
|
|
11
|
+
vault_secret_path:
|
|
12
|
+
mock: mmt
|
|
13
|
+
api_token:
|
|
14
|
+
mock: ""
|
|
15
|
+
presets:
|
|
16
|
+
runner:
|
|
17
|
+
mock:
|
|
18
|
+
vault_addr: mock
|
|
19
|
+
vault_token: mock
|
|
20
|
+
vault_secret_path: mock
|
|
21
|
+
api_token: mock
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
type: server
|
|
2
|
+
title: Vault KV mock
|
|
3
|
+
description: |-
|
|
4
|
+
Mimics HashiCorp Vault / OpenBao KV v2 read responses so the
|
|
5
|
+
Multimeter HTTP + setenv flow can be demonstrated without a real Vault.
|
|
6
|
+
Also exposes a bearer-protected probe that accepts the secret token.
|
|
7
|
+
port: 9108
|
|
8
|
+
cors: true
|
|
9
|
+
endpoints:
|
|
10
|
+
- method: get
|
|
11
|
+
path: /v1/secret/data/mmt
|
|
12
|
+
status: 200
|
|
13
|
+
format: json
|
|
14
|
+
# Same nested shape as Vault KV v2: data.data.<key>
|
|
15
|
+
body:
|
|
16
|
+
request_id: mock-request
|
|
17
|
+
data:
|
|
18
|
+
data:
|
|
19
|
+
token: testtoken
|
|
20
|
+
api_url: https://test.mmt.dev
|
|
21
|
+
metadata:
|
|
22
|
+
version: 1
|
|
23
|
+
- method: get
|
|
24
|
+
path: /auth/bearer
|
|
25
|
+
match:
|
|
26
|
+
headers:
|
|
27
|
+
Authorization: Bearer testtoken
|
|
28
|
+
status: 200
|
|
29
|
+
format: json
|
|
30
|
+
body:
|
|
31
|
+
authenticated: true
|
|
32
|
+
message: token accepted
|
|
33
|
+
- method: get
|
|
34
|
+
path: /auth/bearer
|
|
35
|
+
status: 401
|
|
36
|
+
format: json
|
|
37
|
+
body:
|
|
38
|
+
authenticated: false
|
|
39
|
+
message: missing or invalid bearer token
|
|
40
|
+
fallback:
|
|
41
|
+
status: 404
|
|
42
|
+
format: json
|
|
43
|
+
body:
|
|
44
|
+
errors:
|
|
45
|
+
- path not found
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: Vault HTTP setenv → protected API
|
|
3
|
+
description: |-
|
|
4
|
+
Starts a Vault-shaped mock, reads a secret over HTTP, promotes the token
|
|
5
|
+
with setenv, then calls a bearer-protected API on test.mmt.dev.
|
|
6
|
+
import:
|
|
7
|
+
vaultMock: ./server/vault_kv_mock.mmt
|
|
8
|
+
vaultRead: ./api/vault_kv_read.mmt
|
|
9
|
+
bearerCheck: ./api/bearer_with_env_token.mmt
|
|
10
|
+
steps:
|
|
11
|
+
- run: vaultMock
|
|
12
|
+
- call: vaultRead
|
|
13
|
+
id: secret
|
|
14
|
+
expect:
|
|
15
|
+
status: 200
|
|
16
|
+
api_token: testtoken
|
|
17
|
+
- setenv:
|
|
18
|
+
api_token: ${secret.api_token}
|
|
19
|
+
- call: bearerCheck
|
|
20
|
+
expect:
|
|
21
|
+
status: 200
|
|
22
|
+
report: all
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Multimeter agent workflow (MCP-first)
|
|
2
|
+
|
|
3
|
+
When the user asks to **create, modify, validate, format, or run** any `.mmt` file, use the **Multimeter MCP server tools first**. Do not explore npm packages, CLIs, or shell workarounds before calling MCP. Do not web-search Multimeter syntax.
|
|
4
|
+
|
|
5
|
+
## Golden rule
|
|
6
|
+
|
|
7
|
+
**If the task involves a `.mmt` file, start with Multimeter MCP tools in the first tool-call batch.**
|
|
8
|
+
|
|
9
|
+
Do **not** first try:
|
|
10
|
+
- `testlight`, `npx testlight`, or npm install/run (unless MCP is unavailable — then use `testlight scaffold` / docs)
|
|
11
|
+
- `node dist/mcp/server.js` or the `mmt-mcp` binary
|
|
12
|
+
- Reading Multimeter source, tarball contents, or package.json to find a runner
|
|
13
|
+
- Guessing YAML syntax from memory or random repo files
|
|
14
|
+
- Inventing a new test from blank without `scaffold_test`
|
|
15
|
+
- Rewriting an entire `.mmt` file when the user asked to change one part
|
|
16
|
+
|
|
17
|
+
## Decision tree
|
|
18
|
+
|
|
19
|
+
| User intent | First MCP tool(s) | Then |
|
|
20
|
+
|-------------|-------------------|------|
|
|
21
|
+
| Generate test from API | **`scaffold_test`** | Write yaml → minimal edits → **`validate` → `format`** |
|
|
22
|
+
| Need few-shot shape | **`list_examples`** (see `goldenSmoke`) | Mirror pair; still call `scaffold_test` |
|
|
23
|
+
| Inspect one API | **`api_card`** | Prefer over full file / OpenAPI dump |
|
|
24
|
+
| Tighten asserts (after run or from outputs) | **`suggest_assertions`** | Patch only → **`validate` → `format`** |
|
|
25
|
+
| Create or change other types | `read_documentation(topic)` (pack **min**) | Patch → **`validate` → `format`** |
|
|
26
|
+
| Change existing `.mmt` file | (docs only if needed) | **Patch only** → **`validate` → `format`** |
|
|
27
|
+
| List APIs | `discover_api` | Then `api_card` / `scaffold_test` |
|
|
28
|
+
| Run or execute `.mmt` | `run({ file, workspaceRoot })` | Report tool JSON; if user wants stronger asserts → `suggest_assertions` |
|
|
29
|
+
| Unsure of syntax | `read_documentation` (min; `pack: full` if needed) | Local docs only — no web |
|
|
30
|
+
| Offline / no MCP | see `offline-agent.md` | `testlight docs` → `scaffold` → `validate` |
|
|
31
|
+
|
|
32
|
+
## Generate test from API (required)
|
|
33
|
+
|
|
34
|
+
1. Optional: `list_examples` and mirror **`goldenSmoke`** (do not invent a different structure).
|
|
35
|
+
2. `scaffold_test({ workspaceRoot, apiPath, strategy?: "smoke"|"example" })`
|
|
36
|
+
3. Write `yaml` to `suggestedPath` (or user path).
|
|
37
|
+
4. Apply **only minimal** edits (asserts, inputs, title).
|
|
38
|
+
5. **`validate({ file, workspaceRoot })` until `valid: true`.**
|
|
39
|
+
6. **`format({ file, workspaceRoot })` after validate passes** (required on generate).
|
|
40
|
+
7. `run` only when the user asks to execute.
|
|
41
|
+
8. If the user then wants stronger asserts from a response: `suggest_assertions` → patch → validate → format.
|
|
42
|
+
|
|
43
|
+
## Modify workflow (required)
|
|
44
|
+
|
|
45
|
+
When the user asks to **modify**, **update**, **fix**, or **add steps** to a `.mmt` `file:`
|
|
46
|
+
|
|
47
|
+
1. `read_documentation(topic: "<type>")` only when syntax is unclear (pack **min**).
|
|
48
|
+
2. If helpful, `api_card` / `discover_api`.
|
|
49
|
+
3. **Patch only** — change the few lines needed. **Do not rewrite the whole file** unless the user explicitly asks for a rewrite/regenerate.
|
|
50
|
+
4. **`validate` immediately after every edit** until `valid: true`.
|
|
51
|
+
5. **`format` after validate passes.**
|
|
52
|
+
6. Only call `run` when the user asks to execute.
|
|
53
|
+
|
|
54
|
+
## Run → tighten asserts (optional)
|
|
55
|
+
|
|
56
|
+
When the user wants better assertions after a successful (or inspected) run:
|
|
57
|
+
|
|
58
|
+
1. `suggest_assertions` with `apiPath` and/or response `body` / `bodyFile`
|
|
59
|
+
2. Patch `expect` / `assert` lines only
|
|
60
|
+
3. `validate` → `format`
|
|
61
|
+
|
|
62
|
+
## Validation + format are mandatory
|
|
63
|
+
|
|
64
|
+
After **every** generate or modify on `.mmt` files:
|
|
65
|
+
|
|
66
|
+
1. `validate` until valid
|
|
67
|
+
2. `format`
|
|
68
|
+
before telling the user the task is done.
|
|
69
|
+
|
|
70
|
+
## YAML rules (always)
|
|
71
|
+
|
|
72
|
+
- Output valid Multimeter YAML only.
|
|
73
|
+
- First non-comment line must be `type: <api|test|env|...>`.
|
|
74
|
+
- Never add YAML comments (`#`).
|
|
75
|
+
- Use snake_case tokens: `e:api_url`, `i:user_id`, `r:uuid`, `c:epoch_ms`.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
This folder teaches an AI how to **answer questions** about Multimeter and decide **when to generate or edit** `.mmt` files.
|
|
2
|
+
|
|
3
|
+
**When using VS Code Copilot with the Multimeter extension:** call Multimeter **MCP tools first** (`read_documentation`, `discover_api`, `validate`, `format`, `run`). See `AI/agent-workflow.md`.
|
|
4
|
+
|
|
5
|
+
For actual YAML generation or modification, always go through `AI/generate.md`.
|
|
6
|
+
|
|
7
|
+
The AI should:
|
|
8
|
+
- Understand what each `type` (`api`, `test`, `env`, `doc`, `suite`) is for.
|
|
9
|
+
- Decide whether the user needs **an explanation** or **new/edited YAML**.
|
|
10
|
+
- Minimize tokens by reading only the specific generator file it needs.
|
|
11
|
+
|
|
12
|
+
Short mental model of file types:
|
|
13
|
+
- `type: api` → describe one HTTP/WebSocket endpoint.
|
|
14
|
+
- `type: test` → describe flows that call APIs/tests and assert behavior.
|
|
15
|
+
- `type: env` → define environment variables and presets.
|
|
16
|
+
- `type: doc` → describe documentation over existing `.mmt` files.
|
|
17
|
+
- `type: suite` → group and run multiple tests, APIs, or other suites.
|
|
18
|
+
- `type: server` → define a mock server with endpoints, matching, and responses.
|
|
19
|
+
- `type: report` → structured test results (generated by runs, viewable in the editor).
|
|
20
|
+
|
|
21
|
+
When you are the AI, follow these rules:
|
|
22
|
+
|
|
23
|
+
1. **Decide intent first**
|
|
24
|
+
- If the user asks "how" or "why" (no explicit request to create/edit a file):
|
|
25
|
+
- Explain concepts in plain language.
|
|
26
|
+
- Use small inline examples.
|
|
27
|
+
- Do **not** open generator files unless you need exact shapes.
|
|
28
|
+
- If the user explicitly asks to create/edit a `.mmt` `file:`
|
|
29
|
+
- Open **`AI/generate.md`**.
|
|
30
|
+
- Follow its instructions to choose the type and generator.
|
|
31
|
+
|
|
32
|
+
2. **Token conventions (snake_case)**
|
|
33
|
+
- Always show environment tokens in **snake_case**, for example:
|
|
34
|
+
- `e:api_url`, `e:auth_token`, `e:user_id`.
|
|
35
|
+
- Embedded: `<<e:api_url>>/users`, `Bearer <<e:auth_token>>`.
|
|
36
|
+
- Inputs: `i:user_id`, `<<i:user_id>>`.
|
|
37
|
+
- Random values: `r:uuid`, `r:first_name`, `r:last_name`, `r:epoch_ms`.
|
|
38
|
+
- Current/time values: `c:date`, `c:epoch`, `c:epoch_ms`.
|
|
39
|
+
- Use bare tokens as standalone YAML values; use `<< >>` only when embedding inside larger strings.
|
|
40
|
+
|
|
41
|
+
3. **Answering common question types**
|
|
42
|
+
- "How do I call this endpoint?"
|
|
43
|
+
- Explain briefly.
|
|
44
|
+
- If the user wants a file, go to `generate.md` and build a `type: api` example.
|
|
45
|
+
- "How do I write a test that does X then Y?"
|
|
46
|
+
- Explain tests and flows.
|
|
47
|
+
- If a file is requested, go to `generate.md` and build a `type: test` example.
|
|
48
|
+
- "How do I manage/dev/prod environments?"
|
|
49
|
+
- Explain env files and presets.
|
|
50
|
+
- If a file is requested, go to `generate.md` and build a `type: env` example.
|
|
51
|
+
- "How do I generate API docs?"
|
|
52
|
+
- Explain doc files.
|
|
53
|
+
- If a file is requested, go to `generate.md` and build a `type: doc` example.
|
|
54
|
+
- "How do I run multiple tests together?"
|
|
55
|
+
- Explain suite files.
|
|
56
|
+
- If a file is requested, go to `generate.md` and build a `type: suite` example.
|
|
57
|
+
|
|
58
|
+
4. **Safety and style**
|
|
59
|
+
- Use 2‑space indentation in all YAML examples.
|
|
60
|
+
- Prefer small, focused examples.
|
|
61
|
+
- Do not invent new fields or token formats.
|
|
62
|
+
- When unsure, propose the **minimal valid change** and explain it.
|
|
63
|
+
|
|
64
|
+
Your goal here is to **decide what to do** and provide good explanations; when it is time to actually write YAML, defer to `AI/generate.md` and the more detailed `AI/generate-*.md` files.
|