prompttest-mobile 1.5.1

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.
Files changed (64) hide show
  1. package/CONTRIBUTING.md +80 -0
  2. package/LICENSE +42 -0
  3. package/LICENSES.md +81 -0
  4. package/README.md +526 -0
  5. package/SECURITY.md +56 -0
  6. package/TERMS.md +138 -0
  7. package/dist/bin/prompttest.d.ts +2 -0
  8. package/dist/bin/prompttest.js +1418 -0
  9. package/dist/bin/server.d.ts +1 -0
  10. package/dist/constants/commands.d.ts +125 -0
  11. package/dist/engine.bundle.js +1039 -0
  12. package/dist/index.d.ts +143 -0
  13. package/dist/index.js +1039 -0
  14. package/dist/lib/adaptive-timing.d.ts +55 -0
  15. package/dist/lib/adb-provisioner.d.ts +55 -0
  16. package/dist/lib/adb.d.ts +448 -0
  17. package/dist/lib/ai/heuristic-resolver.d.ts +19 -0
  18. package/dist/lib/ai/index.d.ts +16 -0
  19. package/dist/lib/ai/llm-provider.d.ts +40 -0
  20. package/dist/lib/ai/types.d.ts +64 -0
  21. package/dist/lib/baseline.d.ts +159 -0
  22. package/dist/lib/benchmark.d.ts +100 -0
  23. package/dist/lib/checkpoint.d.ts +61 -0
  24. package/dist/lib/ci.d.ts +49 -0
  25. package/dist/lib/config-loader.d.ts +87 -0
  26. package/dist/lib/config.d.ts +136 -0
  27. package/dist/lib/crawler.d.ts +335 -0
  28. package/dist/lib/data-loader.d.ts +53 -0
  29. package/dist/lib/dfs-engine.d.ts +149 -0
  30. package/dist/lib/dictionary.d.ts +41 -0
  31. package/dist/lib/doctor.d.ts +45 -0
  32. package/dist/lib/driver-interface.d.ts +50 -0
  33. package/dist/lib/enterprise.d.ts +71 -0
  34. package/dist/lib/errors.d.ts +68 -0
  35. package/dist/lib/explorer.d.ts +165 -0
  36. package/dist/lib/feedback.d.ts +35 -0
  37. package/dist/lib/form-filler.d.ts +101 -0
  38. package/dist/lib/ios-driver.d.ts +38 -0
  39. package/dist/lib/jail-guard.d.ts +59 -0
  40. package/dist/lib/license.d.ts +51 -0
  41. package/dist/lib/live-server.d.ts +52 -0
  42. package/dist/lib/lock.d.ts +30 -0
  43. package/dist/lib/logger.d.ts +68 -0
  44. package/dist/lib/memory.d.ts +259 -0
  45. package/dist/lib/patterns.d.ts +202 -0
  46. package/dist/lib/profiler.d.ts +75 -0
  47. package/dist/lib/prompt-runner.d.ts +101 -0
  48. package/dist/lib/quiescence.d.ts +44 -0
  49. package/dist/lib/recorder.d.ts +155 -0
  50. package/dist/lib/repl.d.ts +29 -0
  51. package/dist/lib/reporter.d.ts +269 -0
  52. package/dist/lib/runner-utils.d.ts +316 -0
  53. package/dist/lib/scaffold.d.ts +53 -0
  54. package/dist/lib/step-handlers.d.ts +390 -0
  55. package/dist/lib/triage.d.ts +50 -0
  56. package/dist/lib/wizard.d.ts +42 -0
  57. package/dist/lib/zip-util.d.ts +36 -0
  58. package/docs/ARCHITECTURE.md +154 -0
  59. package/docs/CLI_CONTRACT.md +131 -0
  60. package/docs/CLI_STUDIO_CONTRACT.md +123 -0
  61. package/docs/PERFORMANCE_BASELINE.md +71 -0
  62. package/docs/PRODUCT_STATUS.md +56 -0
  63. package/docs/USER_MANUAL.md +764 -0
  64. package/package.json +66 -0
@@ -0,0 +1,80 @@
1
+ # Contributing to PromptTest
2
+
3
+ Thank you for your interest in contributing to **PromptTest**!
4
+
5
+ PromptTest is an ultra-fast, zero-code autonomous mobile testing & visual QA brain designed for Android. We welcome contributions from the community.
6
+
7
+ ---
8
+
9
+ ## ๐Ÿš€ Getting Started
10
+
11
+ 1. **Fork and Clone the Repository**:
12
+
13
+ ```bash
14
+ git clone https://github.com/<your-username>/prompttest.git
15
+ cd prompttest
16
+ ```
17
+
18
+ 2. **Install Dependencies**:
19
+
20
+ ```bash
21
+ npm install
22
+ ```
23
+
24
+ 3. **Verify Build**:
25
+
26
+ ```bash
27
+ npm run build
28
+ ```
29
+
30
+ 4. **Connect an Android Device or Emulator**:
31
+ Ensure `adb` is in your system PATH and run:
32
+ ```bash
33
+ npm run devices
34
+ ```
35
+
36
+ ---
37
+
38
+ ## ๐Ÿ›  Project Structure
39
+
40
+ - `bin/prompttest.ts`: CLI entry point and command router (`run`, `explore`, `status`, `devices`).
41
+ - `lib/adb.ts`: High-performance ADB driver for fast XML hierarchy dumping, input dispatching, and screenshot capture.
42
+ - `lib/prompt-runner.ts`: Core test execution engine with expectation-driven polling, auto-scroll triage, and collision disambiguation.
43
+ - `lib/patterns.ts`: Plain-English DSL parser and step tokenizers.
44
+ - `lib/memory.ts`: Persistent autonomous knowledge engine and fast-forward cache.
45
+ - `lib/dictionary.ts`: Standard UI component vocabulary and intent mapping heuristics.
46
+ - `lib/crawler.ts` & `lib/explorer.ts`: Autonomous screen exploration and dynamic component graph discovery.
47
+ - `lib/reporter.ts`: Markdown & JSON QA test report generator with visual blackbox capture.
48
+ - `specs/`: Sample test spec files written in plain English.
49
+
50
+ ---
51
+
52
+ ## ๐Ÿ“ Adding New Prompt Grammar / Verbs
53
+
54
+ If you want to introduce a new plain-English command:
55
+
56
+ 1. Update `PromptStepType` and parser regex in [`lib/patterns.ts`](lib/patterns.ts).
57
+ 2. Add execution handler in `PromptRunner.executeStep()` inside [`lib/prompt-runner.ts`](lib/prompt-runner.ts).
58
+ 3. Add corresponding unit or integration tests in `specs/`.
59
+
60
+ ---
61
+
62
+ ## ๐Ÿงช Testing Guidelines
63
+
64
+ Before opening a pull request:
65
+
66
+ 1. Ensure TypeScript compiles with zero errors:
67
+ ```bash
68
+ npm run build
69
+ ```
70
+ 2. Test against a connected Android device or emulator:
71
+ ```bash
72
+ npm run test:teacher
73
+ ```
74
+ 3. Keep code modular, universal (no hardcoded application-specific coordinates or package IDs), and well-documented.
75
+
76
+ ---
77
+
78
+ ## ๐Ÿ“„ Code of Conduct & Licensing
79
+
80
+ By contributing, you agree that your contributions will be licensed under the project's [MIT License](LICENSE).
package/LICENSE ADDED
@@ -0,0 +1,42 @@
1
+ Business Source License 1.1
2
+
3
+ Parameters
4
+
5
+ Licensor:
6
+ PromptTest (Shriram Singh)
7
+
8
+ Licensed Work:
9
+ PromptTest (including its command-line interface, autonomous state-graph exploration engine,
10
+ heuristic gesture systems, and programmatic SDK), in source code, binary, and bundled distribution forms.
11
+
12
+ Additional Use Grant:
13
+ You may use the Licensed Work free of charge for:
14
+ 1. Non-commercial, educational, academic, and open-source purposes.
15
+ 2. Personal and evaluation use.
16
+ 3. Internal software testing within organizations that have an annual gross revenue of less
17
+ than $100,000 USD (or equivalent) and fewer than 10 employees.
18
+
19
+ Commercial License Requirement:
20
+ Any use within organizations exceeding the revenue or employee threshold, any use by testing
21
+ agencies providing commercial QA services to third-party clients, or any deployment into production
22
+ commercial CI/CD pipelines requires a commercial license from the Licensor.
23
+
24
+ Hosting & Managed Service Restriction:
25
+ You may not provide the Licensed Work, whether modified or unmodified, as a hosted service,
26
+ managed QA service, or cloud testing platform to third parties without prior written consent.
27
+
28
+ Change Date:
29
+ 2030-09-14
30
+
31
+ Change License:
32
+ Apache License, Version 2.0
33
+
34
+ Notice:
35
+ For commercial licensing inquiries, enterprise agreements, or custom SLAs, contact:
36
+ PromptTest (https://github.com/shriramsingh/promptTest)
37
+
38
+ Scope Notice:
39
+ This License applies solely to the Licensed Work identified above (the PromptTest
40
+ command-line interface, SDK, and associated engine). PromptTest Studio and any other
41
+ PromptTest-branded products or services are separate products governed by their own
42
+ license agreements and are NOT licensed under this License.
package/LICENSES.md ADDED
@@ -0,0 +1,81 @@
1
+ # Open Source Software Licenses & Bill of Materials (SBOM)
2
+
3
+ PromptTest is licensed under the [Business Source License 1.1 (BSL 1.1)](LICENSE).
4
+
5
+ This document catalogs third-party dependencies utilized by PromptTest, their licenses, and compliance attestations.
6
+
7
+ ---
8
+
9
+ ## License Compliance Attestation
10
+
11
+ - **Zero Copyleft / Zero GPL**: PromptTest does **not** link against or distribute any code licensed under GPL, LGPL, AGPL, or other reciprocal copyleft licenses.
12
+ - **Enterprise Friendly**: All runtime dependencies use widely accepted permissive licenses (MIT, ISC, Apache-2.0), making PromptTest safe for commercial and proprietary enterprise deployments.
13
+
14
+ ---
15
+
16
+ ## Production Runtime Dependencies
17
+
18
+ | Package | Version | License | Primary Purpose | Home / Repository |
19
+ | :------------- | :------- | :------ | :--------------------------------------------- | :----------------------------------- |
20
+ | **chalk** | `^5.3.0` | MIT | Terminal colorization and CLI styling | https://github.com/chalk/chalk |
21
+ | **pixelmatch** | `^7.2.0` | ISC | Visual pixel-by-pixel regression image diffing | https://github.com/mapbox/pixelmatch |
22
+ | **pngjs** | `^7.0.0` | MIT | PNG image encoding and decoding | https://github.com/lukeapage/pngjs |
23
+
24
+ ---
25
+
26
+ ## Development & Build Dependencies
27
+
28
+ | Package | Version | License | Purpose |
29
+ | :---------------------- | :--------- | :--------- | :------------------------------------ |
30
+ | **typescript** | `^5.7.2` | Apache-2.0 | Static type checking and compiler |
31
+ | **vitest** | `^5.0.0` | MIT | Fast unit and integration test runner |
32
+ | **eslint** | `^10.10.0` | MIT | Code quality and lint analysis |
33
+ | **prettier** | `^3.9.6` | MIT | Opinionated code formatter |
34
+ | **tsx** | `^4.19.2` | MIT | TypeScript execution engine |
35
+ | **@vitest/coverage-v8** | `^5.0.0` | MIT | V8 code coverage provider |
36
+ | **typescript-eslint** | `^8.70.0` | MIT | TypeScript ESLint tooling |
37
+ | **@types/node** | `^22.10.2` | MIT | Node.js TypeScript definitions |
38
+ | **@types/pixelmatch** | `^5.2.6` | MIT | Pixelmatch TypeScript definitions |
39
+ | **@types/pngjs** | `^6.0.5` | MIT | PNGjs TypeScript definitions |
40
+
41
+ ---
42
+
43
+ ## Full License Texts
44
+
45
+ ### MIT License
46
+
47
+ ```text
48
+ Permission is hereby granted, free of charge, to any person obtaining a copy
49
+ of this software and associated documentation files (the "Software"), to deal
50
+ in the Software without restriction, including without limitation the rights
51
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52
+ copies of the Software, and to permit persons to whom the Software is
53
+ furnished to do so, subject to the following conditions:
54
+
55
+ The above copyright notice and this permission notice shall be included in all
56
+ copies or substantial portions of the Software.
57
+
58
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
64
+ SOFTWARE.
65
+ ```
66
+
67
+ ### ISC License
68
+
69
+ ```text
70
+ Permission to use, copy, modify, and/or distribute this software for any
71
+ purpose with or without fee is hereby granted, provided that the above
72
+ copyright notice and this permission notice appear in all copies.
73
+
74
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
75
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
76
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
77
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
78
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
79
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
80
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
81
+ ```