zeno-mobile-runner 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +497 -0
- package/CONTRIBUTING.md +42 -0
- package/FEATURES.md +111 -0
- package/LICENSE +21 -0
- package/README.md +176 -0
- package/SECURITY.md +34 -0
- package/build.zig +38 -0
- package/build.zig.zon +7 -0
- package/clients/README.md +149 -0
- package/clients/go/README.md +24 -0
- package/clients/go/examples/fake-session/main.go +93 -0
- package/clients/go/go.mod +3 -0
- package/clients/go/zmr/client.go +432 -0
- package/clients/kotlin/README.md +35 -0
- package/clients/kotlin/build.gradle.kts +35 -0
- package/clients/kotlin/settings.gradle.kts +15 -0
- package/clients/kotlin/src/main/kotlin/dev/zmr/FakeSession.kt +86 -0
- package/clients/kotlin/src/main/kotlin/dev/zmr/ZmrClient.kt +67 -0
- package/clients/python/README.md +29 -0
- package/clients/python/examples/fake_session.py +48 -0
- package/clients/python/pyproject.toml +13 -0
- package/clients/python/zmr_client.py +202 -0
- package/clients/rust/Cargo.lock +107 -0
- package/clients/rust/Cargo.toml +10 -0
- package/clients/rust/README.md +19 -0
- package/clients/rust/examples/fake_session.rs +70 -0
- package/clients/rust/src/lib.rs +461 -0
- package/clients/swift/Package.swift +16 -0
- package/clients/swift/README.md +36 -0
- package/clients/swift/Sources/ZMRClient/ZMRClient.swift +114 -0
- package/clients/swift/Sources/ZMRFakeSession/main.swift +86 -0
- package/clients/typescript/README.md +34 -0
- package/clients/typescript/examples/fake-session.mjs +36 -0
- package/clients/typescript/index.d.ts +144 -0
- package/clients/typescript/index.mjs +192 -0
- package/clients/typescript/package.json +8 -0
- package/docs/adr/0001-agent-native-runner-boundary.md +31 -0
- package/docs/adr/0002-app-local-zmr-contract.md +39 -0
- package/docs/adr/0003-ios-simulator-xctest-shim.md +41 -0
- package/docs/adr/0004-benchmark-claims-and-baseline-collection.md +37 -0
- package/docs/adr/README.md +12 -0
- package/docs/ai-agents.md +154 -0
- package/docs/app-integration.md +330 -0
- package/docs/benchmarking.md +273 -0
- package/docs/client-installation.md +133 -0
- package/docs/clients.md +98 -0
- package/docs/config.md +175 -0
- package/docs/demo.md +259 -0
- package/docs/frameworks.md +72 -0
- package/docs/install.md +95 -0
- package/docs/npm.md +356 -0
- package/docs/protocol-fixtures/README.md +8 -0
- package/docs/protocol-fixtures/core-session.requests.jsonl +8 -0
- package/docs/protocol-fixtures/core-session.responses.jsonl +8 -0
- package/docs/protocol-versioning.md +65 -0
- package/docs/protocol.md +560 -0
- package/docs/scenario-authoring.md +88 -0
- package/docs/trace-privacy.md +88 -0
- package/docs/troubleshooting.md +256 -0
- package/examples/android-app-auth-probe.json +89 -0
- package/examples/android-app-error-state.json +13 -0
- package/examples/android-app-login-smoke.json +192 -0
- package/examples/android-app-onboarding.json +12 -0
- package/examples/android-app-referral-deep-link.json +12 -0
- package/examples/android-shim-smoke.json +19 -0
- package/examples/demo-failure.json +12 -0
- package/examples/demo-fake.json +14 -0
- package/examples/ios-dev-client-open-link.json +26 -0
- package/examples/ios-dev-client-route-snapshot.json +24 -0
- package/examples/ios-shim-smoke.json +23 -0
- package/examples/ios-smoke.json +9 -0
- package/go.work +3 -0
- package/npm/agents.mjs +183 -0
- package/npm/app-config.mjs +95 -0
- package/npm/build-zmr.mjs +21 -0
- package/npm/commands.mjs +104 -0
- package/npm/generated-files.mjs +50 -0
- package/npm/index.mjs +75 -0
- package/npm/init-app.mjs +80 -0
- package/npm/package-scripts.mjs +72 -0
- package/npm/postinstall.mjs +21 -0
- package/npm/scaffold.mjs +179 -0
- package/npm/scenarios.mjs +93 -0
- package/npm/setup.mjs +69 -0
- package/npm/wizard.mjs +117 -0
- package/npm/zmr.mjs +23 -0
- package/package.json +118 -0
- package/schemas/README.md +26 -0
- package/schemas/action-result.schema.json +27 -0
- package/schemas/capabilities-output.schema.json +98 -0
- package/schemas/devices-output.schema.json +25 -0
- package/schemas/doctor-output.schema.json +51 -0
- package/schemas/explain-output.schema.json +51 -0
- package/schemas/import-output.schema.json +23 -0
- package/schemas/init-output.schema.json +71 -0
- package/schemas/json-rpc.schema.json +55 -0
- package/schemas/release-manifest.schema.json +43 -0
- package/schemas/release-readiness-output.schema.json +127 -0
- package/schemas/run-output.schema.json +43 -0
- package/schemas/scenario.schema.json +128 -0
- package/schemas/schemas-output.schema.json +26 -0
- package/schemas/semantic-snapshot.schema.json +116 -0
- package/schemas/snapshot.schema.json +60 -0
- package/schemas/trace-event.schema.json +14 -0
- package/schemas/trace-manifest.schema.json +59 -0
- package/schemas/validate-output.schema.json +42 -0
- package/schemas/version-output.schema.json +23 -0
- package/schemas/zmr-config.schema.json +75 -0
- package/scripts/android-emulator.sh +126 -0
- package/scripts/assert-ios-physical-ready.sh +213 -0
- package/scripts/benchmark-command.sh +307 -0
- package/scripts/benchmark.sh +359 -0
- package/scripts/benchmark_gate.py +117 -0
- package/scripts/benchmark_result_row.py +88 -0
- package/scripts/compare-benchmarks.py +288 -0
- package/scripts/create-android-demo-app.sh +342 -0
- package/scripts/create-ios-demo-app.sh +261 -0
- package/scripts/demo-android-real.sh +232 -0
- package/scripts/demo-ios-real.sh +270 -0
- package/scripts/demo.sh +464 -0
- package/scripts/device-matrix.sh +338 -0
- package/scripts/ensure-ios-shim-target.rb +237 -0
- package/scripts/install-android-shim.sh +281 -0
- package/scripts/install-ios-shim.sh +589 -0
- package/scripts/pilot-gate.sh +560 -0
- package/scripts/release-readiness.py +838 -0
- package/scripts/release-readiness.sh +91 -0
- package/scripts/run-android-pilot.sh +561 -0
- package/scripts/run-ios-pilot.sh +509 -0
- package/shims/android/README.md +21 -0
- package/shims/android/ZMRShimInstrumentedTest.java +152 -0
- package/shims/android/protocol.md +18 -0
- package/shims/ios/README.md +50 -0
- package/shims/ios/ZMRShim.swift +110 -0
- package/shims/ios/ZMRShimUITestCase.swift +518 -0
- package/shims/ios/protocol.md +74 -0
- package/skills/zmr-mobile-testing/SKILL.md +127 -0
- package/src/android.zig +344 -0
- package/src/android_device_info.zig +99 -0
- package/src/android_emulator.zig +154 -0
- package/src/android_screen_recording.zig +112 -0
- package/src/android_shell.zig +112 -0
- package/src/bundle.zig +124 -0
- package/src/bundle_redaction.zig +272 -0
- package/src/bundle_tar.zig +123 -0
- package/src/cli_devices.zig +97 -0
- package/src/cli_doctor.zig +114 -0
- package/src/cli_import.zig +70 -0
- package/src/cli_info.zig +39 -0
- package/src/cli_init.zig +72 -0
- package/src/cli_output.zig +467 -0
- package/src/cli_run.zig +259 -0
- package/src/cli_serve.zig +287 -0
- package/src/cli_trace.zig +111 -0
- package/src/cli_validate.zig +41 -0
- package/src/command.zig +211 -0
- package/src/config.zig +305 -0
- package/src/config_diagnostics.zig +212 -0
- package/src/config_paths.zig +49 -0
- package/src/device_registry.zig +37 -0
- package/src/doctor.zig +412 -0
- package/src/doctor_hints.zig +52 -0
- package/src/errors.zig +55 -0
- package/src/fake_device.zig +163 -0
- package/src/health.zig +28 -0
- package/src/importer.zig +343 -0
- package/src/importer_json.zig +100 -0
- package/src/importer_model.zig +103 -0
- package/src/ios.zig +399 -0
- package/src/ios_devices.zig +219 -0
- package/src/ios_lifecycle.zig +72 -0
- package/src/ios_shim.zig +242 -0
- package/src/ios_snapshot.zig +20 -0
- package/src/json_fields.zig +80 -0
- package/src/json_rpc.zig +150 -0
- package/src/json_rpc_methods.zig +318 -0
- package/src/json_rpc_observation.zig +31 -0
- package/src/json_rpc_params.zig +52 -0
- package/src/json_rpc_protocol.zig +110 -0
- package/src/json_rpc_trace.zig +73 -0
- package/src/main.zig +131 -0
- package/src/mcp.zig +234 -0
- package/src/mcp_protocol.zig +64 -0
- package/src/mcp_trace.zig +83 -0
- package/src/report.zig +346 -0
- package/src/report_html.zig +63 -0
- package/src/report_values.zig +27 -0
- package/src/run_options.zig +152 -0
- package/src/runner.zig +280 -0
- package/src/runner_actions.zig +109 -0
- package/src/runner_config.zig +6 -0
- package/src/runner_diagnostics.zig +268 -0
- package/src/runner_events.zig +170 -0
- package/src/runner_native.zig +88 -0
- package/src/runner_waits.zig +300 -0
- package/src/scaffold.zig +472 -0
- package/src/scenario.zig +346 -0
- package/src/scenario_fields.zig +50 -0
- package/src/schema_registry.zig +53 -0
- package/src/selector.zig +84 -0
- package/src/semantic.zig +171 -0
- package/src/trace.zig +315 -0
- package/src/trace_json.zig +340 -0
- package/src/trace_summary.zig +218 -0
- package/src/trace_summary_diagnostic.zig +202 -0
- package/src/types.zig +120 -0
- package/src/uiautomator.zig +164 -0
- package/src/validation.zig +187 -0
- package/src/version.zig +22 -0
- package/viewer/app.js +373 -0
- package/viewer/index.html +126 -0
- package/viewer/parser.js +233 -0
- package/viewer/styles.css +585 -0
package/package.json
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "zeno-mobile-runner",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Agent-native mobile app test runner for React Native, Expo, Flutter, and native Android/iOS.",
|
|
5
|
+
"main": "npm/index.mjs",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/johnmikel/zeno-mobile-runner.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/johnmikel/zeno-mobile-runner/issues"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/johnmikel/zeno-mobile-runner#readme",
|
|
14
|
+
"bin": {
|
|
15
|
+
"zmr": "npm/zmr.mjs",
|
|
16
|
+
"zmr-init": "npm/init-app.mjs",
|
|
17
|
+
"zmr-wizard": "npm/wizard.mjs",
|
|
18
|
+
"zmr-benchmark": "scripts/benchmark.sh",
|
|
19
|
+
"zmr-benchmark-command": "scripts/benchmark-command.sh",
|
|
20
|
+
"zmr-compare-benchmarks": "scripts/compare-benchmarks.py",
|
|
21
|
+
"zmr-device-matrix": "scripts/device-matrix.sh",
|
|
22
|
+
"zmr-pilot-gate": "scripts/pilot-gate.sh",
|
|
23
|
+
"zmr-assert-ios-physical-ready": "scripts/assert-ios-physical-ready.sh",
|
|
24
|
+
"zmr-release-readiness": "scripts/release-readiness.sh",
|
|
25
|
+
"zmr-install-android-shim": "scripts/install-android-shim.sh",
|
|
26
|
+
"zmr-install-ios-shim": "scripts/install-ios-shim.sh",
|
|
27
|
+
"zmr-create-android-demo-app": "scripts/create-android-demo-app.sh",
|
|
28
|
+
"zmr-create-ios-demo-app": "scripts/create-ios-demo-app.sh",
|
|
29
|
+
"zmr-demo-android": "scripts/demo-android-real.sh",
|
|
30
|
+
"zmr-demo-ios": "scripts/demo-ios-real.sh"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"npm/",
|
|
34
|
+
"clients/README.md",
|
|
35
|
+
"go.work",
|
|
36
|
+
"clients/typescript/",
|
|
37
|
+
"clients/python/README.md",
|
|
38
|
+
"clients/python/pyproject.toml",
|
|
39
|
+
"clients/python/zmr_client.py",
|
|
40
|
+
"clients/python/examples/",
|
|
41
|
+
"clients/go/",
|
|
42
|
+
"!clients/go/**/*_test.go",
|
|
43
|
+
"clients/rust/Cargo.toml",
|
|
44
|
+
"clients/rust/Cargo.lock",
|
|
45
|
+
"clients/rust/README.md",
|
|
46
|
+
"clients/rust/src/",
|
|
47
|
+
"clients/rust/examples/",
|
|
48
|
+
"clients/swift/Package.swift",
|
|
49
|
+
"clients/swift/README.md",
|
|
50
|
+
"clients/swift/Sources/",
|
|
51
|
+
"clients/kotlin/build.gradle.kts",
|
|
52
|
+
"clients/kotlin/settings.gradle.kts",
|
|
53
|
+
"clients/kotlin/README.md",
|
|
54
|
+
"clients/kotlin/src/",
|
|
55
|
+
"!clients/kotlin/src/test/",
|
|
56
|
+
"prebuilds/",
|
|
57
|
+
"src/",
|
|
58
|
+
"!src/*_tests.zig",
|
|
59
|
+
"!src/test_harness.zig",
|
|
60
|
+
"examples/",
|
|
61
|
+
"schemas/",
|
|
62
|
+
"skills/",
|
|
63
|
+
"shims/",
|
|
64
|
+
"viewer/",
|
|
65
|
+
"docs/",
|
|
66
|
+
"scripts/",
|
|
67
|
+
"!scripts/build-npm-package.sh",
|
|
68
|
+
"!scripts/build-release.sh",
|
|
69
|
+
"!scripts/ci-gate.sh",
|
|
70
|
+
"!scripts/coverage.sh",
|
|
71
|
+
"!scripts/generate-homebrew-formula.mjs",
|
|
72
|
+
"!scripts/generate-release-manifest.mjs",
|
|
73
|
+
"!scripts/generate-release-metadata.mjs",
|
|
74
|
+
"!scripts/notarize-macos-release.sh",
|
|
75
|
+
"!scripts/release-candidate.sh",
|
|
76
|
+
"!scripts/release-gate.sh",
|
|
77
|
+
"!scripts/release-smoke.sh",
|
|
78
|
+
"!scripts/sign-macos-release.sh",
|
|
79
|
+
"!scripts/verify-release-artifacts.sh",
|
|
80
|
+
"!scripts/__pycache__/",
|
|
81
|
+
"!scripts/**/*.pyc",
|
|
82
|
+
"!scripts/_cod[e]x_write_test.txt",
|
|
83
|
+
"!scripts/python_redirect_test.txt",
|
|
84
|
+
"build.zig",
|
|
85
|
+
"build.zig.zon",
|
|
86
|
+
"README.md",
|
|
87
|
+
"FEATURES.md",
|
|
88
|
+
"LICENSE",
|
|
89
|
+
"SECURITY.md",
|
|
90
|
+
"CONTRIBUTING.md",
|
|
91
|
+
"CHANGELOG.md"
|
|
92
|
+
],
|
|
93
|
+
"scripts": {
|
|
94
|
+
"postinstall": "node npm/postinstall.mjs",
|
|
95
|
+
"build:zmr": "node npm/build-zmr.mjs",
|
|
96
|
+
"pack:npm": "bash scripts/build-npm-package.sh",
|
|
97
|
+
"zmr:demo": "node npm/zmr.mjs validate examples/demo-fake.json",
|
|
98
|
+
"test": "node --test tests/viewer-parser.test.mjs tests/npm-scaffold-helpers.test.mjs tests/npm-cli.test.mjs tests/npm-package.test.mjs tests/typescript-client.test.mjs && python3 -W error -m unittest tests/python_client_test.py && bash tests/go-client-test.sh && bash tests/rust-client-test.sh"
|
|
99
|
+
},
|
|
100
|
+
"keywords": [
|
|
101
|
+
"mobile-testing",
|
|
102
|
+
"mobile-automation",
|
|
103
|
+
"android",
|
|
104
|
+
"ios",
|
|
105
|
+
"react-native",
|
|
106
|
+
"flutter",
|
|
107
|
+
"expo",
|
|
108
|
+
"adb",
|
|
109
|
+
"simctl",
|
|
110
|
+
"ai-agents",
|
|
111
|
+
"ai-testing",
|
|
112
|
+
"test-runner"
|
|
113
|
+
],
|
|
114
|
+
"license": "MIT",
|
|
115
|
+
"engines": {
|
|
116
|
+
"node": ">=18"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ZMR Schemas
|
|
2
|
+
|
|
3
|
+
This directory contains draft 2020-12 JSON Schemas for public ZMR file and protocol payloads.
|
|
4
|
+
|
|
5
|
+
- `scenario.schema.json`: scenario files consumed by `zmr run` and `zmr validate`
|
|
6
|
+
- `snapshot.schema.json`: `ObservationSnapshot` JSON emitted by live RPC and persisted trace snapshots, including viewport and optional display density metrics
|
|
7
|
+
- `semantic-snapshot.schema.json`: agent-optimized semantic tree emitted by `observe.semanticSnapshot` and `zmr mcp` `semantic_snapshot`
|
|
8
|
+
- `action-result.schema.json`: typed action result shape reserved for richer protocol responses
|
|
9
|
+
- `trace-event.schema.json`: one JSONL event row from `events.jsonl`
|
|
10
|
+
- `trace-manifest.schema.json`: `trace.json` summary for one traced run
|
|
11
|
+
- `json-rpc.schema.json`: JSON-RPC requests and responses used by `zmr serve`
|
|
12
|
+
- `zmr-config.schema.json`: app-local `.zmr/config.json` defaults used by the CLI and npm wizard, including Android emulator lifecycle defaults
|
|
13
|
+
- `doctor-output.schema.json`: machine-readable `zmr doctor --json` setup diagnostics, including remediation hints for actionable checks
|
|
14
|
+
- `init-output.schema.json`: machine-readable `zmr init --json` bootstrap output for scenario and app-local `.zmr/` initialization
|
|
15
|
+
- `import-output.schema.json`: machine-readable `zmr import --json` output for one-time scenario migration helpers
|
|
16
|
+
- `devices-output.schema.json`: machine-readable `zmr devices --json` output for Android, iOS simulator, and physical iOS discovery
|
|
17
|
+
- `validate-output.schema.json`: machine-readable `zmr validate --json` scenario preflight output
|
|
18
|
+
- `version-output.schema.json`: machine-readable `zmr version --json` output for runner and protocol compatibility discovery
|
|
19
|
+
- `capabilities-output.schema.json`: machine-readable `runner.capabilities` JSON-RPC result for protocol, platform support, transport, and method discovery
|
|
20
|
+
- `explain-output.schema.json`: machine-readable `zmr explain --json` failure triage output for agents and CI
|
|
21
|
+
- `run-output.schema.json`: machine-readable `zmr run --json` terminal run summary output
|
|
22
|
+
- `release-manifest.schema.json`: machine-readable `RELEASE_MANIFEST.json` emitted with release archives
|
|
23
|
+
- `release-readiness-output.schema.json`: machine-readable `zmr-release-readiness --json` release evidence gate output
|
|
24
|
+
- `schemas-output.schema.json`: machine-readable `zmr schemas --json` index of public schema names, paths, ids, and descriptions
|
|
25
|
+
|
|
26
|
+
The Zig test suite verifies these files parse as JSON. Full schema validation is intentionally left to client tooling for now.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/action-result.schema.json",
|
|
4
|
+
"title": "ZMR ActionResult",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["status", "elapsedMs", "action"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"status": {
|
|
10
|
+
"enum": ["ok", "not_found", "timeout", "device_error", "protocol_error"]
|
|
11
|
+
},
|
|
12
|
+
"elapsedMs": { "type": "integer", "minimum": 0 },
|
|
13
|
+
"action": { "type": "string" },
|
|
14
|
+
"target": { "type": ["string", "null"] },
|
|
15
|
+
"beforeSnapshotId": { "type": ["string", "null"] },
|
|
16
|
+
"afterSnapshotId": { "type": ["string", "null"] },
|
|
17
|
+
"error": {
|
|
18
|
+
"type": ["object", "null"],
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["code", "message"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"code": { "type": "string" },
|
|
23
|
+
"message": { "type": "string" }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/capabilities-output.schema.json",
|
|
4
|
+
"title": "ZMR Capabilities Output",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"name",
|
|
9
|
+
"version",
|
|
10
|
+
"protocolVersion",
|
|
11
|
+
"protocol",
|
|
12
|
+
"platforms",
|
|
13
|
+
"platformSupport",
|
|
14
|
+
"iosPreview",
|
|
15
|
+
"transports",
|
|
16
|
+
"methods"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"name": { "const": "zmr" },
|
|
20
|
+
"version": { "type": "string", "minLength": 1 },
|
|
21
|
+
"protocolVersion": { "type": "string", "minLength": 1 },
|
|
22
|
+
"protocol": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"version",
|
|
27
|
+
"minimumCompatibleVersion",
|
|
28
|
+
"stability",
|
|
29
|
+
"breakingChangePolicy"
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"version": { "type": "string", "minLength": 1 },
|
|
33
|
+
"minimumCompatibleVersion": { "type": "string", "minLength": 1 },
|
|
34
|
+
"stability": { "type": "string", "minLength": 1 },
|
|
35
|
+
"breakingChangePolicy": { "type": "string", "minLength": 1 }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"platforms": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"minItems": 1,
|
|
41
|
+
"items": { "enum": ["android", "ios"] },
|
|
42
|
+
"uniqueItems": true
|
|
43
|
+
},
|
|
44
|
+
"platformSupport": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"required": ["android", "ios"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"android": { "$ref": "#/$defs/platformSupport" },
|
|
50
|
+
"ios": {
|
|
51
|
+
"allOf": [{ "$ref": "#/$defs/platformSupport" }],
|
|
52
|
+
"required": ["status", "deviceTypes", "automation", "physicalDevices"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"physicalDevices": { "const": true }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"iosPreview": { "const": false },
|
|
60
|
+
"transports": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"minItems": 1,
|
|
63
|
+
"items": { "enum": ["stdio", "tcp"] },
|
|
64
|
+
"uniqueItems": true
|
|
65
|
+
},
|
|
66
|
+
"methods": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"minItems": 1,
|
|
69
|
+
"items": { "type": "string", "minLength": 1 },
|
|
70
|
+
"uniqueItems": true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"$defs": {
|
|
74
|
+
"platformSupport": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": false,
|
|
77
|
+
"required": ["status", "deviceTypes", "automation"],
|
|
78
|
+
"properties": {
|
|
79
|
+
"status": { "enum": ["supported", "preview", "unsupported"] },
|
|
80
|
+
"deviceTypes": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"minItems": 1,
|
|
83
|
+
"items": {
|
|
84
|
+
"enum": ["emulator", "physical", "simulator"]
|
|
85
|
+
},
|
|
86
|
+
"uniqueItems": true
|
|
87
|
+
},
|
|
88
|
+
"automation": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"minItems": 1,
|
|
91
|
+
"items": { "type": "string", "minLength": 1 },
|
|
92
|
+
"uniqueItems": true
|
|
93
|
+
},
|
|
94
|
+
"physicalDevices": { "type": "boolean" }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/devices-output.schema.json",
|
|
4
|
+
"title": "ZMR Devices Output",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["platform", "count", "devices"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"platform": { "enum": ["android", "ios"] },
|
|
10
|
+
"count": { "type": "integer", "minimum": 0 },
|
|
11
|
+
"devices": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"required": ["serial", "state", "ready"],
|
|
17
|
+
"properties": {
|
|
18
|
+
"serial": { "type": "string", "minLength": 1 },
|
|
19
|
+
"state": { "type": "string", "minLength": 1 },
|
|
20
|
+
"ready": { "type": "boolean" }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/doctor-output.schema.json",
|
|
4
|
+
"title": "ZMR Doctor Output",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["ok", "checks"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"ok": { "type": "boolean" },
|
|
10
|
+
"checks": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": { "$ref": "#/$defs/check" }
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"$defs": {
|
|
16
|
+
"check": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["name", "status", "detail"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"name": {
|
|
22
|
+
"enum": [
|
|
23
|
+
"zig",
|
|
24
|
+
"config",
|
|
25
|
+
"adb",
|
|
26
|
+
"android-devices",
|
|
27
|
+
"android-shim",
|
|
28
|
+
"android-smoke-scenario",
|
|
29
|
+
"xcrun",
|
|
30
|
+
"ios-simulators",
|
|
31
|
+
"ios-physical-devices",
|
|
32
|
+
"ios-shim",
|
|
33
|
+
"ios-smoke-scenario"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"status": { "enum": ["ok", "warning", "missing"] },
|
|
37
|
+
"errorCode": { "type": "string", "minLength": 1 },
|
|
38
|
+
"detail": { "type": "string" },
|
|
39
|
+
"count": { "type": "integer", "minimum": 0 },
|
|
40
|
+
"readyCount": { "type": "integer", "minimum": 0 },
|
|
41
|
+
"scriptCount": { "type": "integer", "minimum": 0 },
|
|
42
|
+
"scriptNames": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": { "type": "string", "minLength": 1 }
|
|
45
|
+
},
|
|
46
|
+
"fieldPath": { "type": "string", "minLength": 1 },
|
|
47
|
+
"hint": { "type": "string", "minLength": 1 }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/explain-output.schema.json",
|
|
4
|
+
"title": "ZMR Explain Output",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["ok", "scenario", "status"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"ok": { "const": true },
|
|
10
|
+
"traceDir": { "type": "string", "minLength": 1 },
|
|
11
|
+
"scenario": { "type": "string" },
|
|
12
|
+
"status": { "type": "string", "minLength": 1 },
|
|
13
|
+
"appId": { "type": "string", "minLength": 1 },
|
|
14
|
+
"durationMs": { "type": "integer", "minimum": 0 },
|
|
15
|
+
"eventCount": { "type": "integer", "minimum": 0 },
|
|
16
|
+
"snapshotCount": { "type": "integer", "minimum": 0 },
|
|
17
|
+
"failedStepIndex": { "type": "integer", "minimum": 0 },
|
|
18
|
+
"error": { "type": "string", "minLength": 1 },
|
|
19
|
+
"diagnostic": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": ["kind"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
25
|
+
"status": { "type": "string", "minLength": 1 },
|
|
26
|
+
"snapshotId": { "type": "string", "minLength": 1 },
|
|
27
|
+
"artifactStatus": { "type": "string", "minLength": 1 },
|
|
28
|
+
"semanticStatus": { "type": "string", "minLength": 1 },
|
|
29
|
+
"error": { "type": "string", "minLength": 1 },
|
|
30
|
+
"screenshotArtifact": { "type": "string", "minLength": 1 },
|
|
31
|
+
"source": { "type": "string", "minLength": 1 },
|
|
32
|
+
"activePackage": { "type": "string", "minLength": 1 },
|
|
33
|
+
"activeActivity": { "type": "string", "minLength": 1 },
|
|
34
|
+
"visibleTexts": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": { "type": "string" }
|
|
37
|
+
},
|
|
38
|
+
"nearestTextMatches": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": { "type": "string" }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"lastEvent": { "type": "string", "minLength": 1 },
|
|
45
|
+
"nextCommands": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"minItems": 1,
|
|
48
|
+
"items": { "type": "string", "minLength": 1 }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/import-output.schema.json",
|
|
4
|
+
"title": "ZMR Import Output",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["ok", "format", "source", "out", "name", "appId", "stepCount", "next", "nextCommands"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"ok": { "const": true },
|
|
10
|
+
"format": { "enum": ["flow-yaml"] },
|
|
11
|
+
"source": { "type": "string", "minLength": 1 },
|
|
12
|
+
"out": { "type": "string", "minLength": 1 },
|
|
13
|
+
"name": { "type": "string", "minLength": 1 },
|
|
14
|
+
"appId": { "type": ["string", "null"] },
|
|
15
|
+
"stepCount": { "type": "integer", "minimum": 0 },
|
|
16
|
+
"next": { "type": "string", "minLength": 1 },
|
|
17
|
+
"nextCommands": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"minItems": 1,
|
|
20
|
+
"items": { "type": "string", "minLength": 1 }
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/init-output.schema.json",
|
|
4
|
+
"title": "ZMR Init Output",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{ "$ref": "#/$defs/appInit" },
|
|
7
|
+
{ "$ref": "#/$defs/scenarioInit" }
|
|
8
|
+
],
|
|
9
|
+
"$defs": {
|
|
10
|
+
"appInit": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": ["ok", "mode", "dir", "appId", "created", "configPath", "deviceMatrixPath", "agentInstructionsPath", "next", "nextCommands", "smokeCommands"],
|
|
14
|
+
"properties": {
|
|
15
|
+
"ok": { "const": true },
|
|
16
|
+
"mode": { "const": "app" },
|
|
17
|
+
"dir": { "type": "string", "minLength": 1 },
|
|
18
|
+
"appId": { "type": "string", "minLength": 1 },
|
|
19
|
+
"created": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"minItems": 4,
|
|
22
|
+
"items": { "type": "string", "minLength": 1 }
|
|
23
|
+
},
|
|
24
|
+
"configPath": { "type": "string", "minLength": 1 },
|
|
25
|
+
"androidScenarioPath": { "type": "string", "minLength": 1 },
|
|
26
|
+
"iosScenarioPath": { "type": "string", "minLength": 1 },
|
|
27
|
+
"androidDevClientScenarioPath": { "type": "string", "minLength": 1 },
|
|
28
|
+
"iosDevClientScenarioPath": { "type": "string", "minLength": 1 },
|
|
29
|
+
"deviceMatrixPath": { "type": "string", "minLength": 1 },
|
|
30
|
+
"agentInstructionsPath": { "type": "string", "minLength": 1 },
|
|
31
|
+
"next": { "type": "string", "minLength": 1 },
|
|
32
|
+
"nextCommands": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"minItems": 1,
|
|
35
|
+
"items": { "type": "string", "minLength": 1 }
|
|
36
|
+
},
|
|
37
|
+
"smokeCommands": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"minItems": 1,
|
|
40
|
+
"items": { "type": "string", "minLength": 1 }
|
|
41
|
+
},
|
|
42
|
+
"scriptCount": { "type": "integer", "minimum": 0 },
|
|
43
|
+
"scriptNames": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": { "type": "string", "minLength": 1 }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"scenarioInit": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["ok", "mode", "appId", "created", "next", "nextCommands"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"ok": { "const": true },
|
|
55
|
+
"mode": { "const": "scenario" },
|
|
56
|
+
"appId": { "type": "string", "minLength": 1 },
|
|
57
|
+
"created": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"minItems": 1,
|
|
60
|
+
"items": { "type": "string", "minLength": 1 }
|
|
61
|
+
},
|
|
62
|
+
"next": { "type": "string", "minLength": 1 },
|
|
63
|
+
"nextCommands": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"minItems": 1,
|
|
66
|
+
"items": { "type": "string", "minLength": 1 }
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/json-rpc.schema.json",
|
|
4
|
+
"title": "ZMR JSON-RPC Message",
|
|
5
|
+
"oneOf": [
|
|
6
|
+
{ "$ref": "#/$defs/request" },
|
|
7
|
+
{ "$ref": "#/$defs/successResponse" },
|
|
8
|
+
{ "$ref": "#/$defs/errorResponse" }
|
|
9
|
+
],
|
|
10
|
+
"$defs": {
|
|
11
|
+
"id": {
|
|
12
|
+
"type": ["string", "integer", "null"]
|
|
13
|
+
},
|
|
14
|
+
"request": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": ["jsonrpc", "id", "method"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"jsonrpc": { "const": "2.0" },
|
|
20
|
+
"id": { "$ref": "#/$defs/id" },
|
|
21
|
+
"method": { "type": "string" },
|
|
22
|
+
"params": {}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"successResponse": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["jsonrpc", "id", "result"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"jsonrpc": { "const": "2.0" },
|
|
31
|
+
"id": { "$ref": "#/$defs/id" },
|
|
32
|
+
"result": {}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"errorResponse": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["jsonrpc", "id", "error"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"jsonrpc": { "const": "2.0" },
|
|
41
|
+
"id": { "$ref": "#/$defs/id" },
|
|
42
|
+
"error": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"required": ["code", "message"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"code": { "type": "integer" },
|
|
48
|
+
"message": { "type": "string" },
|
|
49
|
+
"publicCode": { "type": "string" }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/release-manifest.schema.json",
|
|
4
|
+
"title": "ZMR Release Manifest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["schemaVersion", "name", "version", "generatedAt", "releaseBaseUrl", "artifacts", "totals"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schemaVersion": { "const": 1 },
|
|
10
|
+
"name": { "type": "string", "minLength": 1 },
|
|
11
|
+
"version": { "type": "string", "minLength": 1 },
|
|
12
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
13
|
+
"releaseBaseUrl": { "type": ["string", "null"] },
|
|
14
|
+
"artifacts": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"minItems": 1,
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["path", "type", "sizeBytes", "sha256"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"path": { "type": "string", "minLength": 1 },
|
|
23
|
+
"type": { "enum": ["archive", "npm-package", "sbom", "notices", "homebrew-formula", "notarization-receipt", "metadata"] },
|
|
24
|
+
"sizeBytes": { "type": "integer", "minimum": 0 },
|
|
25
|
+
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
26
|
+
"target": { "type": "string", "minLength": 1 },
|
|
27
|
+
"platform": { "type": "string", "minLength": 1 },
|
|
28
|
+
"arch": { "type": "string", "minLength": 1 }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"totals": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"required": ["artifacts", "archives", "sizeBytes"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"artifacts": { "type": "integer", "minimum": 1 },
|
|
38
|
+
"archives": { "type": "integer", "minimum": 1 },
|
|
39
|
+
"sizeBytes": { "type": "integer", "minimum": 0 }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|