zig-mobile-runner 0.1.0
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 +484 -0
- package/CONTRIBUTING.md +42 -0
- package/FEATURES.md +112 -0
- package/LICENSE +21 -0
- package/README.md +255 -0
- package/SECURITY.md +34 -0
- package/build.zig +38 -0
- package/build.zig.zon +7 -0
- package/clients/README.md +144 -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 +156 -0
- package/docs/app-integration.md +316 -0
- package/docs/benchmarking.md +275 -0
- package/docs/client-installation.md +141 -0
- package/docs/clients.md +98 -0
- package/docs/config.md +175 -0
- package/docs/demo.md +259 -0
- package/docs/dsl.md +57 -0
- package/docs/install.md +233 -0
- package/docs/market-positioning.md +70 -0
- package/docs/npm.md +359 -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/publication.md +77 -0
- package/docs/release-audit.md +99 -0
- package/docs/release-candidate.md +111 -0
- package/docs/release-evidence.md +188 -0
- package/docs/release-notes-template.md +58 -0
- package/docs/roadmap.md +334 -0
- package/docs/scenario-authoring.md +88 -0
- package/docs/shipping.md +170 -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 +114 -0
- package/prebuilds/darwin-arm64/zmr +0 -0
- package/prebuilds/darwin-x64/zmr +0 -0
- package/prebuilds/linux-arm64/zmr +0 -0
- package/prebuilds/linux-x64/zmr +0 -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 +475 -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 +135 -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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/release-readiness-output.schema.json",
|
|
4
|
+
"title": "ZMR Release Readiness Output",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["ok", "target", "status", "evidence", "evidenceFiles", "passed", "satisfied", "failed", "planned", "missing", "insufficient", "blocked", "requirements", "nextSteps", "recommendedWording", "claimLimitations"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"ok": { "type": "boolean" },
|
|
10
|
+
"target": { "enum": ["dev-preview", "production", "market-claim"] },
|
|
11
|
+
"status": { "enum": ["ready", "blocked"] },
|
|
12
|
+
"evidence": { "type": "string", "minLength": 1 },
|
|
13
|
+
"evidenceFiles": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"minItems": 1,
|
|
16
|
+
"items": { "type": "string", "minLength": 1 }
|
|
17
|
+
},
|
|
18
|
+
"passed": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"description": "Raw evidence row names whose status is passed. A passed row can still be insufficient for a requirement; use satisfied for proven requirements.",
|
|
21
|
+
"items": { "type": "string", "minLength": 1 }
|
|
22
|
+
},
|
|
23
|
+
"satisfied": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"description": "Requirement names that are fully satisfied after threshold and evidence validation.",
|
|
26
|
+
"items": { "type": "string", "minLength": 1 }
|
|
27
|
+
},
|
|
28
|
+
"failed": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": { "type": "string", "minLength": 1 }
|
|
31
|
+
},
|
|
32
|
+
"planned": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": { "type": "string", "minLength": 1 }
|
|
35
|
+
},
|
|
36
|
+
"missing": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"description": "Required evidence rows or evidence files that are absent or unreadable. Passed rows that fail validation are listed in insufficient instead.",
|
|
39
|
+
"items": { "type": "string", "minLength": 1 }
|
|
40
|
+
},
|
|
41
|
+
"insufficient": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"description": "Requirement names with passed evidence rows that do not satisfy threshold, target, device, app, or benchmark proof requirements.",
|
|
44
|
+
"items": { "type": "string", "minLength": 1 }
|
|
45
|
+
},
|
|
46
|
+
"blocked": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"description": "Requirement names that are not satisfied, including missing, failed, planned, and insufficient evidence rows.",
|
|
49
|
+
"items": { "type": "string", "minLength": 1 }
|
|
50
|
+
},
|
|
51
|
+
"requirements": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"additionalProperties": false,
|
|
56
|
+
"required": ["name", "status"],
|
|
57
|
+
"allOf": [
|
|
58
|
+
{
|
|
59
|
+
"if": {
|
|
60
|
+
"properties": {
|
|
61
|
+
"status": { "const": "satisfied" }
|
|
62
|
+
},
|
|
63
|
+
"required": ["status"]
|
|
64
|
+
},
|
|
65
|
+
"then": {
|
|
66
|
+
"required": ["evidenceName"]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"if": {
|
|
71
|
+
"properties": {
|
|
72
|
+
"status": { "enum": ["missing", "planned", "failed", "insufficient"] }
|
|
73
|
+
},
|
|
74
|
+
"required": ["status"]
|
|
75
|
+
},
|
|
76
|
+
"then": {
|
|
77
|
+
"required": ["reason"]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"properties": {
|
|
82
|
+
"name": { "type": "string", "minLength": 1 },
|
|
83
|
+
"status": {
|
|
84
|
+
"enum": ["satisfied", "missing", "planned", "failed", "insufficient"]
|
|
85
|
+
},
|
|
86
|
+
"evidenceName": { "type": "string" },
|
|
87
|
+
"reason": { "type": "string" }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"nextSteps": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"description": "Shortest executable remediation plan. A next step may cover multiple blocked requirements when one command writes several evidence rows.",
|
|
94
|
+
"items": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"additionalProperties": false,
|
|
97
|
+
"required": ["requirement", "command", "commands", "covers"],
|
|
98
|
+
"properties": {
|
|
99
|
+
"requirement": { "type": "string", "minLength": 1 },
|
|
100
|
+
"command": { "type": "string", "minLength": 1 },
|
|
101
|
+
"commands": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"description": "Executable command sequence for this next step. command is the shell-joined legacy representation.",
|
|
104
|
+
"minItems": 1,
|
|
105
|
+
"items": { "type": "string", "minLength": 1 }
|
|
106
|
+
},
|
|
107
|
+
"covers": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"description": "Blocked requirement or evidence issue labels this next step is intended to resolve.",
|
|
110
|
+
"minItems": 1,
|
|
111
|
+
"items": { "type": "string", "minLength": 1 }
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"recommendedWording": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"minLength": 1,
|
|
119
|
+
"description": "Safe wording for the checked release claim. Agents should quote or paraphrase this instead of inferring a stronger claim from ok/status alone."
|
|
120
|
+
},
|
|
121
|
+
"claimLimitations": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"description": "Claims that remain unsupported by the checked evidence.",
|
|
124
|
+
"items": { "type": "string", "minLength": 1 }
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://zmr.dev/schemas/run-output.schema.json",
|
|
4
|
+
"title": "ZMR Run Output",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["ok", "status"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"ok": { "type": "boolean" },
|
|
10
|
+
"status": { "enum": ["passed", "failed", "partial"] },
|
|
11
|
+
"scenario": { "type": "string", "minLength": 1 },
|
|
12
|
+
"appId": { "type": "string", "minLength": 1 },
|
|
13
|
+
"traceDir": { "type": "string", "minLength": 1 },
|
|
14
|
+
"eventsPath": { "type": "string", "minLength": 1 },
|
|
15
|
+
"artifactsDir": { "type": "string", "minLength": 1 },
|
|
16
|
+
"durationMs": { "type": "integer", "minimum": 0 },
|
|
17
|
+
"eventCount": { "type": "integer", "minimum": 0 },
|
|
18
|
+
"snapshotCount": { "type": "integer", "minimum": 0 },
|
|
19
|
+
"partialFailureCount": { "type": "integer", "minimum": 0 },
|
|
20
|
+
"partialFailure": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": ["kind"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"kind": { "type": "string", "minLength": 1 },
|
|
26
|
+
"status": { "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
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"failedStepIndex": { "type": "integer", "minimum": 0 },
|
|
35
|
+
"error": { "type": "string", "minLength": 1 },
|
|
36
|
+
"reportPath": { "type": "string", "minLength": 1 },
|
|
37
|
+
"nextCommands": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"minItems": 1,
|
|
40
|
+
"items": { "type": "string", "minLength": 1 }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|