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,221 @@
|
|
|
1
|
+
This file tells the AI how to generate **`type: api`** `.mmt` files.
|
|
2
|
+
|
|
3
|
+
Always follow these rules:
|
|
4
|
+
- Output must be valid YAML.
|
|
5
|
+
- The **first non-comment line** must be `type: api`.
|
|
6
|
+
- Prefer explicit, descriptive names and short, readable examples.
|
|
7
|
+
- Only include fields that make sense for the user’s request.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Schema (mental model for the AI)
|
|
12
|
+
|
|
13
|
+
These fields mirror the internal `api` data model.
|
|
14
|
+
|
|
15
|
+
Top‑level keys and types (with descriptions the AI should remember):
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
type: api # REQUIRED. Declares this file as an API description.
|
|
19
|
+
|
|
20
|
+
# Documentation / metadata (optional but recommended)
|
|
21
|
+
title: string # Short human title, e.g. "Login API" or "List users".
|
|
22
|
+
description: string # 1–3 sentence explanation of what this endpoint does.
|
|
23
|
+
tags: # Optional tags for search/filters (e.g. [auth, smoke]).
|
|
24
|
+
- string
|
|
25
|
+
|
|
26
|
+
# Reuse / composition
|
|
27
|
+
import: # Optional. Map of aliases to other .mmt files this API depends on.
|
|
28
|
+
<alias>: path/to/file.mmt
|
|
29
|
+
inputs: # Optional. Input parameters for this API, with default values.
|
|
30
|
+
<name>: JSON value # string | number | boolean | null | object.
|
|
31
|
+
outputs: # Optional. Named values extracted from the response (body/headers/cookies).
|
|
32
|
+
<name>: string # Extractor expression, e.g. body[token] or body[/regex_pattern/]
|
|
33
|
+
setenv: # Optional. Promote response values into env vars after a run (same extraction DSL as outputs).
|
|
34
|
+
<env_name>: <expression> # e.g. body[token] or body.access_token (legacy: outputs key name still works).
|
|
35
|
+
|
|
36
|
+
# Request description (REQUIRED)
|
|
37
|
+
url: string # REQUIRED. Full or relative URL; may include env/input tokens like <<e:api_url>>.
|
|
38
|
+
query: # Optional. Query parameters appended to url; merged with any inline query string.
|
|
39
|
+
<name>: string # Value is always a string expression (can contain tokens).
|
|
40
|
+
protocol: http | ws # Optional. "http" for HTTP(S); "ws" for WebSocket.
|
|
41
|
+
# Inferred from URL if omitted: ws:// or wss:// → ws, otherwise http.
|
|
42
|
+
format: json | text | xml | xmle | urlencoded | { request, response }
|
|
43
|
+
method: # HTTP method (REQUIRED when protocol is http).
|
|
44
|
+
get | post | put | delete | patch | head | options | trace
|
|
45
|
+
headers: # Optional. HTTP/WS headers to send with the request.
|
|
46
|
+
<Header-Name>: string # Values can include tokens; header names are case-insensitive.
|
|
47
|
+
cookies: # Optional. HTTP cookies to send.
|
|
48
|
+
<cookie_name>: string
|
|
49
|
+
body: object | string | null # Optional. Request body (HTTP) or initial WS message; type depends on format.
|
|
50
|
+
|
|
51
|
+
# Examples (optional)
|
|
52
|
+
examples: # Optional. Example invocations for smoke tests / documentation.
|
|
53
|
+
- name: string # REQUIRED per example. Identifier used in UI/CLI.
|
|
54
|
+
description?: string # Optional explanation for this example.
|
|
55
|
+
inputs?: object # JSON record overriding top-level inputs for this example.
|
|
56
|
+
outputs?: object # JSON record of expected outputs for this example.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Notes for the AI:
|
|
60
|
+
- `inputs`, `setenv`, and `examples` are optional but powerful when the user wants reusable APIs or smoke‑testable examples.
|
|
61
|
+
- `import` is rarely needed when the user only describes a single endpoint.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## When to use which fields
|
|
66
|
+
|
|
67
|
+
- Use **`title`** and **`description`** whenever the user describes intent or business meaning (`"login endpoint"`, `"create user"`, etc.).
|
|
68
|
+
- Use **`tags`** when the user mentions categories like "smoke", "load", "auth", "payments".
|
|
69
|
+
- Use **`inputs`** when the user expects to change parameters between runs (username, pagination, filters, ids, etc.).
|
|
70
|
+
- Use **`outputs`** + **`setenv`** when the user wants to **capture response data** for later steps (e.g. tokens, IDs).
|
|
71
|
+
- Use **`examples`** when the user asks for **examples, smoke tests, or sample calls**.
|
|
72
|
+
- Use **`protocol: ws`** when the user asks for **websocket api**. For **REST or SOAP api**, protocol can be omitted (defaults to http based on URL).
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
If the user gives:
|
|
76
|
+
- **Only URL + method** → make a minimal `file:` `type`, `title`, `format`, `method`, `url` (protocol is inferred).
|
|
77
|
+
- **Request + response contract** → also add `inputs`, `outputs`, maybe `setenv`.
|
|
78
|
+
- **Multiple usage scenarios** → use `examples` to capture them.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Tokens the AI can use
|
|
83
|
+
|
|
84
|
+
The API body, headers, query, cookies, and url can contain tokens:
|
|
85
|
+
|
|
86
|
+
- Environment `variables:` `e:api_url`, `e:auth_token`, etc., or `<<e:api_url>>`
|
|
87
|
+
- Test/API `inputs:` `i:var` or `<<i:var>>`
|
|
88
|
+
- Random values: `r:name` or `<<r:name>>`
|
|
89
|
+
- Current/time values: `c:name` or `<<c:name>>`
|
|
90
|
+
|
|
91
|
+
Guidelines:
|
|
92
|
+
- If a value **is exactly** a single token (e.g. `username: i:user` or `id: r:int`), do **not** quote it unless the surrounding examples already use quotes.
|
|
93
|
+
- If a token is used **inside text**, wrap it as `<<token>>`, for example:
|
|
94
|
+
- `url: <<e:api_url>>/users/<<i:user_id>>`
|
|
95
|
+
- `x-request-id: req-<<r:uuid>>`
|
|
96
|
+
|
|
97
|
+
Common random tokens: `r:uuid`, `r:int`, `r:bool`, `r:email`, `r:phone`, `r:first_name`, `r:last_name`, `r:full_name`, `r:epoch`, `r:epoch_ms`.
|
|
98
|
+
Common current tokens: `c:date`, `c:time`, `c:epoch`, `c:epoch_ms`.
|
|
99
|
+
|
|
100
|
+
Do **not** invent new token syntaxes.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Authoring patterns for common requests
|
|
105
|
+
|
|
106
|
+
### 1. Simple GET with query and headers
|
|
107
|
+
|
|
108
|
+
Use when the user asks for something like “GET `/users` with pagination and auth header”.
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
type: api
|
|
112
|
+
title: List users
|
|
113
|
+
description: Returns a paginated list of users.
|
|
114
|
+
tags: [users, list]
|
|
115
|
+
inputs:
|
|
116
|
+
limit: 20
|
|
117
|
+
page: 1
|
|
118
|
+
url: <<e:api_url>>/users
|
|
119
|
+
protocol: http
|
|
120
|
+
format: json
|
|
121
|
+
method: get
|
|
122
|
+
headers:
|
|
123
|
+
authorization: Bearer <<e:auth_token>>
|
|
124
|
+
query:
|
|
125
|
+
limit: "<<i:limit>>"
|
|
126
|
+
page: "<<i:page>>"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 2. Login POST with JSON body and extracted token
|
|
130
|
+
|
|
131
|
+
Use when the user describes a login/auth endpoint that returns a token.
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
type: api
|
|
135
|
+
title: Login
|
|
136
|
+
description: Authenticate user and return a session token.
|
|
137
|
+
tags: [auth, login]
|
|
138
|
+
inputs:
|
|
139
|
+
username: user@example.com
|
|
140
|
+
password: string
|
|
141
|
+
outputs:
|
|
142
|
+
token: body[token]
|
|
143
|
+
status: body[status]
|
|
144
|
+
setenv:
|
|
145
|
+
auth_token: body[token]
|
|
146
|
+
url: <<e:api_url>>/login
|
|
147
|
+
protocol: http
|
|
148
|
+
method: post
|
|
149
|
+
format: json
|
|
150
|
+
headers:
|
|
151
|
+
content-type: application/json
|
|
152
|
+
body:
|
|
153
|
+
username: i:username
|
|
154
|
+
password: i:password
|
|
155
|
+
examples:
|
|
156
|
+
- name: valid-user
|
|
157
|
+
description: Login with a valid account.
|
|
158
|
+
inputs:
|
|
159
|
+
username: alice@example.com
|
|
160
|
+
password: secret
|
|
161
|
+
- name: invalid-password
|
|
162
|
+
description: Login with wrong password.
|
|
163
|
+
inputs:
|
|
164
|
+
username: alice@example.com
|
|
165
|
+
password: wrong
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### 3. Raw text or XML body
|
|
169
|
+
|
|
170
|
+
Use `format: text`, `format: xml`, `format: xmle`, or `format: urlencoded` when the user explicitly mentions plain text, HTML, XML, or form URL-encoded bodies. Use `xmle` when expanded empty tags are required. Use `urlencoded` for `application/x-www-form-urlencoded` key/value bodies.
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
type: api
|
|
174
|
+
title: Echo text
|
|
175
|
+
description: Send and echo back a plain text payload.
|
|
176
|
+
protocol: http
|
|
177
|
+
format: text
|
|
178
|
+
method: post
|
|
179
|
+
url: <<e:api_url>>/echo
|
|
180
|
+
body: |
|
|
181
|
+
hello world
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```yaml
|
|
185
|
+
type: api
|
|
186
|
+
title: Submit XML payload
|
|
187
|
+
description: Send an XML document as the request body.
|
|
188
|
+
protocol: http
|
|
189
|
+
format: xml
|
|
190
|
+
method: post
|
|
191
|
+
url: <<e:api_url>>/xml
|
|
192
|
+
body: |
|
|
193
|
+
<root>
|
|
194
|
+
<value>42</value>
|
|
195
|
+
</root>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 4. WebSocket connection description
|
|
199
|
+
|
|
200
|
+
Use when the user describes WS endpoints (chat, notifications, streams). Actual send/receive flows are usually defined in `type: test` files calling this API.
|
|
201
|
+
|
|
202
|
+
```yaml
|
|
203
|
+
type: api
|
|
204
|
+
title: Notifications stream
|
|
205
|
+
description: WebSocket stream of user notifications.
|
|
206
|
+
protocol: ws
|
|
207
|
+
format: json
|
|
208
|
+
url: wss://example.com/notifications
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Style rules for the AI
|
|
214
|
+
|
|
215
|
+
- Prefer **2 spaces** for indentation.
|
|
216
|
+
- Avoid trailing spaces.
|
|
217
|
+
- Prefer lower‑case, hyphen‑separated tags (e.g. `smoke`, `auth`, `user-profile`).
|
|
218
|
+
- Keep titles short (3–6 words) and descriptions 1–3 sentences.
|
|
219
|
+
- Do **not** rely on YAML comments (`#`) for important docs — prefer `description`. Format Document preserves comments, but UI form sync may still rebuild YAML without them.
|
|
220
|
+
|
|
221
|
+
When unsure, **favor simpler files** with fewer fields rather than guessing complex outputs or headers.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
This file tells the AI how to generate **`type: doc`** `.mmt` files.
|
|
2
|
+
|
|
3
|
+
Doc files describe how to build HTML/Markdown documentation from existing `.mmt` API files.
|
|
4
|
+
|
|
5
|
+
Always follow these rules:
|
|
6
|
+
- Output must be valid YAML.
|
|
7
|
+
- The first non-comment line must be `type: doc`.
|
|
8
|
+
- Do **not** redefine APIs here; instead, point to files/folders containing `type: api` definitions.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Schema (mental model for the AI)
|
|
13
|
+
|
|
14
|
+
This matches `DocData` in `core/src/DocData.ts` and `docs/files/doc/index.md`.
|
|
15
|
+
|
|
16
|
+
Top-level keys and types:
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
type: doc # REQUIRED, must be exactly "doc"
|
|
20
|
+
|
|
21
|
+
title?: string # title of the documentation page
|
|
22
|
+
description?: string # optional description or intro text
|
|
23
|
+
logo?: string # optional path/URL to a logo image
|
|
24
|
+
sources?: # list of folders/files to scan for APIs
|
|
25
|
+
- string
|
|
26
|
+
services?: # optional logical groupings
|
|
27
|
+
- name?: string
|
|
28
|
+
description?: string
|
|
29
|
+
sources?:
|
|
30
|
+
- string
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Notes:
|
|
34
|
+
- `sources` and each service’s `sources` can include:
|
|
35
|
+
- Direct paths to `.mmt` files.
|
|
36
|
+
- Folders containing `.mmt` files (recursively scanned).
|
|
37
|
+
- Only `type: api` entries discovered in those paths are rendered as API boxes.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Common patterns the AI should generate
|
|
42
|
+
|
|
43
|
+
### 1. Single-folder API catalog
|
|
44
|
+
|
|
45
|
+
User asks: "Generate docs for all APIs in `./apis`."
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
type: doc
|
|
49
|
+
title: API Catalog
|
|
50
|
+
sources:
|
|
51
|
+
- ./apis
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2. Multi-service catalog with groupings
|
|
55
|
+
|
|
56
|
+
User asks: "We have user and order services under different folders; build docs for both."
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
type: doc
|
|
60
|
+
title: Platform APIs
|
|
61
|
+
description: Documentation for core platform services.
|
|
62
|
+
sources:
|
|
63
|
+
- ./shared
|
|
64
|
+
services:
|
|
65
|
+
- name: Users
|
|
66
|
+
description: User registration, login, and profile APIs.
|
|
67
|
+
sources:
|
|
68
|
+
- ./services/users
|
|
69
|
+
- name: Orders
|
|
70
|
+
description: Order creation, tracking, and status APIs.
|
|
71
|
+
sources:
|
|
72
|
+
- ./services/orders
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 3. Mixed single files and folders
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
type: doc
|
|
79
|
+
title: Authentication APIs
|
|
80
|
+
sources:
|
|
81
|
+
- ./auth/login.mmt
|
|
82
|
+
- ./auth/refresh.mmt
|
|
83
|
+
- ./auth
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## How the AI should answer doc-related questions
|
|
89
|
+
|
|
90
|
+
- If the user mentions **"generate documentation"**, **"API catalog"**, or similar, prefer `type: doc`.
|
|
91
|
+
- If the user provides a list of API files or folders, put them in `sources` and optionally group them under `services` if they describe separate domains.
|
|
92
|
+
- If the user wants a **logo** or branding, set `logo` to a relative path or URL (do not invent images; reuse what they mention).
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Style rules for the AI
|
|
97
|
+
|
|
98
|
+
- Use 2-space indentation.
|
|
99
|
+
- Keep titles short and descriptive.
|
|
100
|
+
- Keep service names in Title Case (e.g. `Users`, `Billing`).
|
|
101
|
+
- Prefer concise descriptions (1–2 sentences per service).
|
|
102
|
+
|
|
103
|
+
When unsure, generate a **small doc file** that points to the most obvious folder(s) the user mentioned (such as `./apis` or `./examples`).
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
This file tells the AI how to generate **`type: env`** `.mmt` files.
|
|
2
|
+
|
|
3
|
+
Environment files define variables and presets used by APIs and tests.
|
|
4
|
+
|
|
5
|
+
Always follow these rules:
|
|
6
|
+
- Output must be valid YAML.
|
|
7
|
+
- The first non-comment line must be `type: env`.
|
|
8
|
+
- Favor clear, descriptive variable names (snake_case or SCREAMING_SNAKE_CASE), for example:
|
|
9
|
+
- `api_url`, `auth_token`, `mode`, or
|
|
10
|
+
- `api_url`, `auth_token`, `mode`.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Schema (mental model for the AI)
|
|
15
|
+
|
|
16
|
+
This matches `EnvironmentData` in `mmtview/src/environment/EnvironmentData.tsx` and `docs/files/env/index.md`.
|
|
17
|
+
|
|
18
|
+
Top-level keys and types:
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
type: env # REQUIRED, must be exactly "env"
|
|
22
|
+
|
|
23
|
+
variables: # REQUIRED
|
|
24
|
+
<name>:
|
|
25
|
+
# One of:
|
|
26
|
+
# 1) mapping of labels -> string values (key-value choices)
|
|
27
|
+
# 2) array of strings (allowed values)
|
|
28
|
+
|
|
29
|
+
presets?: # OPTIONAL
|
|
30
|
+
<presetGroup>:
|
|
31
|
+
<presetName>:
|
|
32
|
+
<env_name>: string # value *must* match one of the variable options
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Interpretation:
|
|
36
|
+
- `variables[NAME]` can be:
|
|
37
|
+
- `{ dev: "http://localhost:8080", prod: "https://test.mmt.dev" }` → named key-value choices.
|
|
38
|
+
- `["debug", "info", "warn"]` → a list of allowed values.
|
|
39
|
+
- `presets[group][name]` tells the UI what to pick for each variable when that preset is active.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Tokens in other files
|
|
44
|
+
|
|
45
|
+
Env variables are **read in APIs/tests**, not stored as tokens here. In `type: api` or `type: test` files, you read them with:
|
|
46
|
+
|
|
47
|
+
- `e:api_url` # standalone value
|
|
48
|
+
- `<<e:api_url>>` # inside strings/URLs
|
|
49
|
+
|
|
50
|
+
The AI should not put `e:` tokens into env files; here we only define raw values or options.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Common patterns the AI should generate
|
|
55
|
+
|
|
56
|
+
### 1. Simple local + prod configuration
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
type: env
|
|
60
|
+
variables:
|
|
61
|
+
api_url:
|
|
62
|
+
local: "http://localhost:8080"
|
|
63
|
+
prod: "https://test.mmt.dev"
|
|
64
|
+
default_user:
|
|
65
|
+
- "alice@example.com"
|
|
66
|
+
default_password:
|
|
67
|
+
- "secret"
|
|
68
|
+
log_level:
|
|
69
|
+
- debug
|
|
70
|
+
- info
|
|
71
|
+
- warn
|
|
72
|
+
- error
|
|
73
|
+
presets:
|
|
74
|
+
runner:
|
|
75
|
+
local:
|
|
76
|
+
api_url: local
|
|
77
|
+
log_level: debug
|
|
78
|
+
prod:
|
|
79
|
+
api_url: prod
|
|
80
|
+
log_level: info
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 2. Testing modes and feature flags
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
type: env
|
|
87
|
+
variables:
|
|
88
|
+
mode:
|
|
89
|
+
dev: dev
|
|
90
|
+
staging: staging
|
|
91
|
+
prod: prod
|
|
92
|
+
feature_x_enabled:
|
|
93
|
+
- "true"
|
|
94
|
+
- "false"
|
|
95
|
+
timeout_ms:
|
|
96
|
+
- "1000"
|
|
97
|
+
- "2000"
|
|
98
|
+
- "5000"
|
|
99
|
+
presets:
|
|
100
|
+
runner:
|
|
101
|
+
dev:
|
|
102
|
+
mode: dev
|
|
103
|
+
feature_x_enabled: "true"
|
|
104
|
+
timeout_ms: "1000"
|
|
105
|
+
prod:
|
|
106
|
+
mode: prod
|
|
107
|
+
feature_x_enabled: "false"
|
|
108
|
+
timeout_ms: "2000"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## How the AI should answer env-related questions
|
|
114
|
+
|
|
115
|
+
- If the user wants to **switch between environments** (local/staging/prod), generate:
|
|
116
|
+
- Variables with **key-value choice mappings**, e.g. `api_url: { local: ..., prod: ... }`.
|
|
117
|
+
- A `runner` preset group with `local`, `staging`, `prod` entries.
|
|
118
|
+
- If the user wants **valid options** for a flag or numeric setting, use **arrays** of strings.
|
|
119
|
+
- If a variable has only a single known value, wrap it in a single-element array (e.g. `token: ["your-token"]`).
|
|
120
|
+
- Always keep values as strings in env files; typing happens when they are read and interpreted.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Style rules for the AI
|
|
125
|
+
|
|
126
|
+
- Use 2-space indentation.
|
|
127
|
+
- Use ALL_CAPS for variable names by convention (not enforced but clearer).
|
|
128
|
+
- Keep presets small and focused; do not create many unused presets.
|
|
129
|
+
- Prefer explicit URLs and modes instead of opaque values.
|
|
130
|
+
|
|
131
|
+
When unsure, generate a **small env file** with the most clearly requested variables and a single preset group named `runner` with 1–2 named presets.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Certificates (optional)
|
|
136
|
+
|
|
137
|
+
Env files can also contain a `certificates` section for SSL/TLS settings. The AI generally does not need to generate this unless the user specifically asks about TLS, mTLS, or client certificates. See `docs/features/certificates/index.md` for full details.
|
|
138
|
+
|
|
139
|
+
```yaml
|
|
140
|
+
certificates:
|
|
141
|
+
server_ca: ./certs/ca.pem
|
|
142
|
+
clients:
|
|
143
|
+
- name: my-client
|
|
144
|
+
host: api.example.com
|
|
145
|
+
cert: ./certs/client.pem
|
|
146
|
+
key: ./certs/client-key.pem
|
|
147
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
This file tells the AI how to generate `type:` loadtest .mmt files.
|
|
2
|
+
|
|
3
|
+
Always follow these rules:
|
|
4
|
+
- Output must be valid YAML.
|
|
5
|
+
- The first non-comment line must be `type:` loadtest.
|
|
6
|
+
- Load tests should reference exactly one existing `type:` test file via the top-level test field.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Schema (mental model for the AI)
|
|
11
|
+
|
|
12
|
+
Top-level keys and types:
|
|
13
|
+
|
|
14
|
+
```yaml
|
|
15
|
+
type: loadtest
|
|
16
|
+
|
|
17
|
+
title: string
|
|
18
|
+
|
|
19
|
+
tags:
|
|
20
|
+
- string
|
|
21
|
+
|
|
22
|
+
description: string
|
|
23
|
+
|
|
24
|
+
environment:
|
|
25
|
+
preset?: string
|
|
26
|
+
file?: string
|
|
27
|
+
variables?:
|
|
28
|
+
<name>: <value>
|
|
29
|
+
|
|
30
|
+
threads: number
|
|
31
|
+
repeat: string | number
|
|
32
|
+
rampup: string
|
|
33
|
+
|
|
34
|
+
export:
|
|
35
|
+
- path/to/report.mmt
|
|
36
|
+
|
|
37
|
+
test: path/to/test.mmt
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Guidelines:
|
|
41
|
+
- Use test, not tests.
|
|
42
|
+
- Do not add servers; load tests do not support suite-level servers.
|
|
43
|
+
- Keep the referenced file a `type:` test document.
|
|
44
|
+
|
|
45
|
+
Example:
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
type: loadtest
|
|
49
|
+
title: Login load test
|
|
50
|
+
tags: [load, auth]
|
|
51
|
+
threads: 100
|
|
52
|
+
repeat: 1m
|
|
53
|
+
rampup: 10s
|
|
54
|
+
test: ./tests/login.mmt
|
|
55
|
+
```
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
This file tells the AI how to generate **`type: suite`** `.mmt` files.
|
|
2
|
+
|
|
3
|
+
Always follow these rules:
|
|
4
|
+
- Output must be valid YAML.
|
|
5
|
+
- The first non-comment line must be `type: suite`.
|
|
6
|
+
- Suites should primarily **list other mmt files** (tests, APIs, or other suites) to be executed.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Schema (mental model for the AI)
|
|
11
|
+
|
|
12
|
+
These fields match `SuiteData` in `core/src/SuiteData.ts` and the public docs in `docs/files/suite/index.md`.
|
|
13
|
+
|
|
14
|
+
Top-level keys and types:
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
type: suite # REQUIRED, must be exactly "suite"
|
|
18
|
+
|
|
19
|
+
title: string # optional, human-readable suite name
|
|
20
|
+
tags: # optional, for grouping
|
|
21
|
+
- string
|
|
22
|
+
|
|
23
|
+
description: string # optional, short explanation
|
|
24
|
+
|
|
25
|
+
servers: # optional, root-only: mock servers started before items
|
|
26
|
+
- path/to/server.mmt # type: server files; kept running for the entire suite
|
|
27
|
+
|
|
28
|
+
items: # REQUIRED, array of files to run
|
|
29
|
+
- path/to/file1.mmt
|
|
30
|
+
- path/to/file2.mmt
|
|
31
|
+
- then
|
|
32
|
+
- path/to/file3.mmt
|
|
33
|
+
|
|
34
|
+
environment: # optional, root-only: configure env for suite runs
|
|
35
|
+
preset?: string # preset name from multimeter.mmt (or from file)
|
|
36
|
+
file?: string # path to an env file to load
|
|
37
|
+
variables?: # inline key-value environment variables
|
|
38
|
+
<name>: <value>
|
|
39
|
+
|
|
40
|
+
export: # optional, root-only: generate reports after completion
|
|
41
|
+
- path/to/report.xml # supported: .xml (JUnit), .html, .md, .mmt
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
> **Root-only fields**: `servers`, `environment`, and `export` only take effect when the suite is run directly. When imported by another suite, these fields are ignored.
|
|
45
|
+
|
|
46
|
+
> **Legacy alias**: `tests` is still accepted as an alias for `items`, but new suites should use `items`.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Execution Flow (`items` array)
|
|
51
|
+
|
|
52
|
+
The `items` array defines the execution flow.
|
|
53
|
+
- All files listed between `then` separators (or before the first one) are run in parallel.
|
|
54
|
+
- The groups of files separated by `then` are run sequentially.
|
|
55
|
+
- **Server files** (`type: server`) can be included — they start before items in the same stage and stop when the suite completes.
|
|
56
|
+
|
|
57
|
+
Example: `[a, b, then, c]` will run `a` and `b` in parallel, and once both are finished, it will run `c`.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Common patterns the AI should generate
|
|
62
|
+
|
|
63
|
+
### 1. Simple suite running all items in parallel
|
|
64
|
+
|
|
65
|
+
User asks: "Create a suite to run smoke tests `test1.mmt` and `test2.mmt`."
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
type: suite
|
|
69
|
+
title: Smoke Tests
|
|
70
|
+
tags: [smoke]
|
|
71
|
+
items:
|
|
72
|
+
- ./tests/test1.mmt
|
|
73
|
+
- ./tests/test2.mmt
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 2. Sequential execution of items
|
|
77
|
+
|
|
78
|
+
User asks: "Create a suite that first runs `login.mmt`, and then `get_user.mmt`."
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
type: suite
|
|
82
|
+
title: Login and Get User
|
|
83
|
+
tags: [smoke, auth]
|
|
84
|
+
items:
|
|
85
|
+
- ./tests/login.mmt
|
|
86
|
+
- then
|
|
87
|
+
- ./tests/get_user.mmt
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 3. Mixed parallel and sequential execution
|
|
91
|
+
|
|
92
|
+
User asks: "Create a suite that runs `test1.mmt` and `test2.mmt` in parallel, and after they are done, runs `test3.mmt`."
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
type: suite
|
|
96
|
+
title: Mixed Execution Suite
|
|
97
|
+
tags: [regression]
|
|
98
|
+
items:
|
|
99
|
+
- ./tests/test1.mmt
|
|
100
|
+
- ./tests/test2.mmt
|
|
101
|
+
- then
|
|
102
|
+
- ./tests/test3.mmt
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 4. Suite with mock servers
|
|
106
|
+
|
|
107
|
+
User asks: "Create a suite that starts a mock server before running integration tests."
|
|
108
|
+
|
|
109
|
+
```yaml
|
|
110
|
+
type: suite
|
|
111
|
+
title: Integration with Mock Server
|
|
112
|
+
tags: [integration]
|
|
113
|
+
items:
|
|
114
|
+
- ./mocks/user-service.mmt # type: server — starts first
|
|
115
|
+
- then
|
|
116
|
+
- ./tests/user_crud.mmt
|
|
117
|
+
- ./tests/user_auth.mmt
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Servers start before items in the same stage and stop when the suite finishes.
|
|
121
|
+
|
|
122
|
+
### 5. Suite with top-level servers and environment
|
|
123
|
+
|
|
124
|
+
User asks: "Create an integration suite with a mock server, using the staging preset."
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
type: suite
|
|
128
|
+
title: Integration Suite
|
|
129
|
+
tags: [integration]
|
|
130
|
+
servers:
|
|
131
|
+
- ./mocks/user-service.mmt
|
|
132
|
+
- ./mocks/auth-service.mmt
|
|
133
|
+
environment:
|
|
134
|
+
preset: staging
|
|
135
|
+
items:
|
|
136
|
+
- ./tests/login.mmt
|
|
137
|
+
- ./tests/profile.mmt
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Using the `servers` field is recommended over placing servers in `items` — it keeps them running for the entire suite and avoids ordering issues.
|
|
141
|
+
|
|
142
|
+
### 6. Suite with report exports
|
|
143
|
+
|
|
144
|
+
User asks: "Create a CI suite that exports JUnit XML and HTML reports."
|
|
145
|
+
|
|
146
|
+
```yaml
|
|
147
|
+
type: suite
|
|
148
|
+
title: CI Suite
|
|
149
|
+
export:
|
|
150
|
+
- ./reports/results.xml
|
|
151
|
+
- ./reports/results.html
|
|
152
|
+
items:
|
|
153
|
+
- ./tests/login.mmt
|
|
154
|
+
- ./tests/profile.mmt
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Style rules for the AI
|
|
160
|
+
|
|
161
|
+
- Use 2-space indentation.
|
|
162
|
+
- Prefer clear and descriptive titles.
|
|
163
|
+
- Always include a `title`.
|
|
164
|
+
- Use `tags` to categorize suites where appropriate.
|
|
165
|
+
- Ensure file paths in the `items` array are plausible.
|
|
166
|
+
|
|
167
|
+
When unsure, generate a **minimal valid suite** that includes the requested files.
|