@kaeawc/auto-mobile 0.0.87 → 0.0.88
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 +3 -3
- package/README.md.backup +3 -3
- package/dist/build-info.json +10 -10
- package/dist/schemas/test-plan.schema.json +256 -0
- package/dist/src/index.js +1147 -1066
- package/dist/src/utils/workers/iosBundleExtractWorker.js +3 -3
- package/node_modules/strtok3/README.md +161 -10
- package/node_modules/strtok3/lib/BufferTokenizer.js +1 -1
- package/node_modules/strtok3/lib/FileTokenizer.js +8 -2
- package/node_modules/strtok3/lib/NotRegularFileError.js +8 -0
- package/node_modules/strtok3/lib/ReadStreamTokenizer.js +7 -2
- package/node_modules/strtok3/lib/TokenizerBoundaryError.js +10 -0
- package/node_modules/strtok3/lib/TokenizerView.js +184 -0
- package/node_modules/strtok3/lib/core.js +5 -18
- package/node_modules/strtok3/lib/index.js +1 -0
- package/node_modules/strtok3/lib/isRandomAccessTokenizer.js +10 -0
- package/node_modules/strtok3/package.json +10 -8
- package/package.json +11 -11
- package/schemas/test-plan.schema.json +256 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { isRandomAccessTokenizer } from './isRandomAccessTokenizer.js';
|
|
2
|
+
import { EndOfStreamError } from './stream/index.js';
|
|
3
|
+
import { TokenizerBoundaryError } from './TokenizerBoundaryError.js';
|
|
4
|
+
function validateOffset(value, name) {
|
|
5
|
+
if (!Number.isSafeInteger(value) || value < 0) {
|
|
6
|
+
throw new RangeError(`${name} must be a non-negative safe integer`);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export function createTokenizerView(source, length) {
|
|
10
|
+
return isRandomAccessTokenizer(source)
|
|
11
|
+
? new RandomAccessTokenizerView(source, length)
|
|
12
|
+
: new TokenizerView(source, length);
|
|
13
|
+
}
|
|
14
|
+
class TokenizerView {
|
|
15
|
+
constructor(source, size) {
|
|
16
|
+
this.source = source;
|
|
17
|
+
this.size = size;
|
|
18
|
+
this.closed = false;
|
|
19
|
+
this.closedPosition = 0;
|
|
20
|
+
this.busy = false;
|
|
21
|
+
validateOffset(size, 'length');
|
|
22
|
+
validateOffset(source.position, 'source position');
|
|
23
|
+
validateOffset(source.position + size, 'end position');
|
|
24
|
+
if (source instanceof TokenizerView) {
|
|
25
|
+
source.assertAvailable();
|
|
26
|
+
source.translateRange(size, source.position);
|
|
27
|
+
}
|
|
28
|
+
this.start = source.position;
|
|
29
|
+
// A chunk has its own size; the outer file's MIME type/path need not describe it.
|
|
30
|
+
this.fileInfo = { size };
|
|
31
|
+
}
|
|
32
|
+
get position() {
|
|
33
|
+
return this.closed ? this.closedPosition : this.source.position - this.start;
|
|
34
|
+
}
|
|
35
|
+
get remaining() {
|
|
36
|
+
return this.size - this.position;
|
|
37
|
+
}
|
|
38
|
+
supportsRandomAccess() {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
createView(length) {
|
|
42
|
+
this.assertAvailable();
|
|
43
|
+
return createTokenizerView(this, length);
|
|
44
|
+
}
|
|
45
|
+
async readBuffer(buffer, options) {
|
|
46
|
+
return this.bufferOperation('readBuffer', buffer, options);
|
|
47
|
+
}
|
|
48
|
+
async peekBuffer(buffer, options) {
|
|
49
|
+
return this.bufferOperation('peekBuffer', buffer, options);
|
|
50
|
+
}
|
|
51
|
+
async bufferOperation(method, buffer, options) {
|
|
52
|
+
this.assertAvailable();
|
|
53
|
+
const length = options?.length ?? buffer.length;
|
|
54
|
+
const position = options?.position ?? this.position;
|
|
55
|
+
const absolutePosition = this.translateRange(length, position);
|
|
56
|
+
if (length > buffer.length) {
|
|
57
|
+
throw new RangeError('length must not exceed the target buffer length');
|
|
58
|
+
}
|
|
59
|
+
return this.run(() => this.source[method](buffer, { ...options, length, position: absolutePosition }));
|
|
60
|
+
}
|
|
61
|
+
async readToken(token, position = this.position) {
|
|
62
|
+
this.assertAvailable();
|
|
63
|
+
const absolutePosition = this.translateRange(token.len, position);
|
|
64
|
+
return this.run(() => this.source.readToken(token, absolutePosition));
|
|
65
|
+
}
|
|
66
|
+
async peekToken(token, position = this.position) {
|
|
67
|
+
this.assertAvailable();
|
|
68
|
+
const absolutePosition = this.translateRange(token.len, position ?? this.position);
|
|
69
|
+
return this.run(() => this.source.peekToken(token, absolutePosition));
|
|
70
|
+
}
|
|
71
|
+
async readNumber(token) {
|
|
72
|
+
this.assertAvailable();
|
|
73
|
+
this.translateRange(token.len, this.position);
|
|
74
|
+
return this.run(() => this.source.readNumber(token));
|
|
75
|
+
}
|
|
76
|
+
async peekNumber(token) {
|
|
77
|
+
this.assertAvailable();
|
|
78
|
+
this.translateRange(token.len, this.position);
|
|
79
|
+
return this.run(() => this.source.peekNumber(token));
|
|
80
|
+
}
|
|
81
|
+
async ignore(length) {
|
|
82
|
+
this.assertAvailable();
|
|
83
|
+
this.translateRange(length, this.position);
|
|
84
|
+
return this.run(() => this.source.ignore(length));
|
|
85
|
+
}
|
|
86
|
+
async consumeRemainder() {
|
|
87
|
+
this.assertAvailable();
|
|
88
|
+
const length = this.remaining;
|
|
89
|
+
const end = this.translateRange(length, this.position) + length;
|
|
90
|
+
return this.run(async () => {
|
|
91
|
+
if (length === 0) {
|
|
92
|
+
return 0;
|
|
93
|
+
}
|
|
94
|
+
if (isRandomAccessTokenizer(this.source)) {
|
|
95
|
+
// Unlike ignore()/setPosition(), this verifies that the final byte exists,
|
|
96
|
+
// including a file that was truncated after its initial stat. No large read.
|
|
97
|
+
if ((await this.source.peekBuffer(new Uint8Array(1), { position: end - 1 })) !== 1) {
|
|
98
|
+
throw new EndOfStreamError();
|
|
99
|
+
}
|
|
100
|
+
this.source.setPosition(end);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
const ignored = await this.source.ignore(length);
|
|
104
|
+
if (ignored !== length) {
|
|
105
|
+
throw new EndOfStreamError();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return length;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/** Release this view only. Never drain, close or abort the borrowed source. */
|
|
112
|
+
async close() {
|
|
113
|
+
if (this.closed) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (this.busy) {
|
|
117
|
+
throw new Error('Cannot close a tokenizer view during an active operation');
|
|
118
|
+
}
|
|
119
|
+
this.closedPosition = this.position;
|
|
120
|
+
this.closed = true;
|
|
121
|
+
}
|
|
122
|
+
/** Explicit cancellation propagates to the shared source and affects its other users. */
|
|
123
|
+
async abort() {
|
|
124
|
+
if (this.closed) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
try {
|
|
128
|
+
await this.source.abort();
|
|
129
|
+
}
|
|
130
|
+
finally {
|
|
131
|
+
this.closedPosition = this.position;
|
|
132
|
+
this.closed = true;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
assertAvailable() {
|
|
136
|
+
if (this.closed) {
|
|
137
|
+
throw new Error('Tokenizer view is closed');
|
|
138
|
+
}
|
|
139
|
+
if (this.busy) {
|
|
140
|
+
throw new Error('Tokenizer views require sequential operations');
|
|
141
|
+
}
|
|
142
|
+
if (this.source instanceof TokenizerView) {
|
|
143
|
+
this.source.assertAvailable();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/** Validate the whole request before delegating or allowing a token allocation. */
|
|
147
|
+
translateRange(length, position) {
|
|
148
|
+
validateOffset(length, 'length');
|
|
149
|
+
validateOffset(position, 'position');
|
|
150
|
+
validateOffset(position + length, 'end position');
|
|
151
|
+
if (position > this.size || length > this.size - position) {
|
|
152
|
+
throw new TokenizerBoundaryError(position, length, this.size);
|
|
153
|
+
}
|
|
154
|
+
if (!this.supportsRandomAccess() && position < this.position) {
|
|
155
|
+
throw new Error('`options.position` must be equal or greater than `tokenizer.position`');
|
|
156
|
+
}
|
|
157
|
+
return this.start + position;
|
|
158
|
+
}
|
|
159
|
+
async run(operation) {
|
|
160
|
+
this.busy = true;
|
|
161
|
+
try {
|
|
162
|
+
return await operation();
|
|
163
|
+
}
|
|
164
|
+
finally {
|
|
165
|
+
this.busy = false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
class RandomAccessTokenizerView extends TokenizerView {
|
|
170
|
+
constructor(source, size) {
|
|
171
|
+
super(source, size);
|
|
172
|
+
}
|
|
173
|
+
supportsRandomAccess() {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
setPosition(position) {
|
|
177
|
+
this.assertAvailable();
|
|
178
|
+
this.source.setPosition(this.translateRange(0, position));
|
|
179
|
+
}
|
|
180
|
+
createView(length) {
|
|
181
|
+
this.assertAvailable();
|
|
182
|
+
return createTokenizerView(this, length);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -6,7 +6,10 @@ import { ReadStreamTokenizer } from './ReadStreamTokenizer.js';
|
|
|
6
6
|
import { makeWebStreamReader, StreamReader } from './stream/index.js';
|
|
7
7
|
export { AbstractTokenizer } from './AbstractTokenizer.js';
|
|
8
8
|
export { BufferSizeError } from './BufferSizeError.js';
|
|
9
|
+
export { isRandomAccessTokenizer } from './isRandomAccessTokenizer.js';
|
|
9
10
|
export { AbortError, EndOfStreamError } from './stream/index.js';
|
|
11
|
+
export { TokenizerBoundaryError } from './TokenizerBoundaryError.js';
|
|
12
|
+
export { createTokenizerView } from './TokenizerView.js';
|
|
10
13
|
/**
|
|
11
14
|
* Construct ReadStreamTokenizer from given Stream.
|
|
12
15
|
* Will set fileSize, if provided given Stream has set the .path property/
|
|
@@ -18,15 +21,7 @@ export function fromStream(stream, options) {
|
|
|
18
21
|
getMaxBufferSize(options);
|
|
19
22
|
throwIfAborted(options?.abortSignal);
|
|
20
23
|
const streamReader = new StreamReader(stream);
|
|
21
|
-
|
|
22
|
-
const chainedClose = _options.onClose;
|
|
23
|
-
_options.onClose = async () => {
|
|
24
|
-
await streamReader.close();
|
|
25
|
-
if (chainedClose) {
|
|
26
|
-
return chainedClose();
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
return new ReadStreamTokenizer(streamReader, _options);
|
|
24
|
+
return new ReadStreamTokenizer(streamReader, options);
|
|
30
25
|
}
|
|
31
26
|
/**
|
|
32
27
|
* Construct ReadStreamTokenizer from given ReadableStream (WebStream API).
|
|
@@ -39,15 +34,7 @@ export function fromWebStream(webStream, options) {
|
|
|
39
34
|
getMaxBufferSize(options);
|
|
40
35
|
throwIfAborted(options?.abortSignal);
|
|
41
36
|
const webStreamReader = makeWebStreamReader(webStream);
|
|
42
|
-
|
|
43
|
-
const chainedClose = _options.onClose;
|
|
44
|
-
_options.onClose = async () => {
|
|
45
|
-
await webStreamReader.close();
|
|
46
|
-
if (chainedClose) {
|
|
47
|
-
return chainedClose();
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
return new ReadStreamTokenizer(webStreamReader, _options);
|
|
37
|
+
return new ReadStreamTokenizer(webStreamReader, options);
|
|
51
38
|
}
|
|
52
39
|
/**
|
|
53
40
|
* Construct ReadStreamTokenizer from given Buffer.
|
|
@@ -3,6 +3,7 @@ import { fromStream as coreFromStream } from './core.js';
|
|
|
3
3
|
import { FileTokenizer } from './FileTokenizer.js';
|
|
4
4
|
export * from './core.js';
|
|
5
5
|
export { FileTokenizer } from './FileTokenizer.js';
|
|
6
|
+
export { NotRegularFileError } from './NotRegularFileError.js';
|
|
6
7
|
/**
|
|
7
8
|
* Construct ReadStreamTokenizer from given Stream.
|
|
8
9
|
* Will set fileSize, if provided given Stream has set the .path property.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check for random-access capability, position control and a known file size.
|
|
3
|
+
* A known size alone does not imply random access.
|
|
4
|
+
*/
|
|
5
|
+
export function isRandomAccessTokenizer(tokenizer) {
|
|
6
|
+
return (tokenizer.supportsRandomAccess() &&
|
|
7
|
+
'setPosition' in tokenizer &&
|
|
8
|
+
typeof tokenizer.setPosition === 'function' &&
|
|
9
|
+
typeof tokenizer.fileInfo.size === 'number');
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strtok3",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.6.2",
|
|
4
4
|
"description": "A promise based streaming tokenizer",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Borewit",
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"clean": "del-cli 'lib/**/*.js' 'lib/**/*.js.map' 'lib/**/*.d.ts' 'test/**/*.js' 'test/**/*.js.map'",
|
|
15
15
|
"compile-src": "tsc -p lib --sourceMap false",
|
|
16
|
+
"compile-src:dev": "tsc -p lib --sourceMap --inlineSources",
|
|
16
17
|
"compile-test": "tsc -p test",
|
|
17
|
-
"compile": "yarn run compile-src && yarn run compile-test",
|
|
18
|
+
"compile": "yarn run compile-src && yarn run compile-test && yarn run test:types",
|
|
18
19
|
"build": "yarn run clean && yarn run compile",
|
|
20
|
+
"build:dev": "yarn run clean && yarn run compile-test && yarn run compile-src:dev && yarn run test:types",
|
|
19
21
|
"prepublishOnly": "yarn run build",
|
|
20
22
|
"eslint": "eslint lib test",
|
|
21
23
|
"lint:md": "remark -u preset-lint-recommended .",
|
|
@@ -23,9 +25,9 @@
|
|
|
23
25
|
"lint": "yarn run lint:md && yarn run lint:ts",
|
|
24
26
|
"fix": "yarn run lint:ts:fix",
|
|
25
27
|
"test": "mocha",
|
|
28
|
+
"test:types": "tsc -p test/types && tsc -p test/types/tsconfig.browser.json",
|
|
26
29
|
"bun:test": "bun run --bun test",
|
|
27
30
|
"test-coverage": "c8 yarn run test",
|
|
28
|
-
"send-codacy": "c8 report --reporter=text-lcov | codacy-coverage",
|
|
29
31
|
"start": "yarn run compile && yarn run lint && yarn run cover-test",
|
|
30
32
|
"update-biome": "yarn add -D --exact @biomejs/biome && npx @biomejs/biome migrate --write",
|
|
31
33
|
"lint:ts:fix": "biome check --write"
|
|
@@ -59,16 +61,16 @@
|
|
|
59
61
|
},
|
|
60
62
|
"devDependencies": {
|
|
61
63
|
"@biomejs/biome": "2.5.15",
|
|
62
|
-
"@types/chai": "^5.2.
|
|
64
|
+
"@types/chai": "^5.2.3",
|
|
63
65
|
"@types/chai-as-promised": "^8.0.2",
|
|
64
|
-
"@types/debug": "^4.1.
|
|
66
|
+
"@types/debug": "^4.1.13",
|
|
65
67
|
"@types/mocha": "^10.0.10",
|
|
66
|
-
"@types/node": "^
|
|
68
|
+
"@types/node": "^26.6.5",
|
|
67
69
|
"c8": "^12.0.0",
|
|
68
70
|
"chai": "^6.3.0",
|
|
69
71
|
"chai-as-promised": "^8.0.2",
|
|
70
|
-
"del-cli": "^
|
|
71
|
-
"mocha": "^11",
|
|
72
|
+
"del-cli": "^8.0.1",
|
|
73
|
+
"mocha": "^11.8.0",
|
|
72
74
|
"node-readable-to-web-readable-stream": "^0.4.2",
|
|
73
75
|
"remark-cli": "^12.0.1",
|
|
74
76
|
"remark-preset-lint-recommended": "^7.0.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaeawc/auto-mobile",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.88",
|
|
4
4
|
"description": "Mobile device interaction automation via MCP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adb",
|
|
@@ -59,11 +59,10 @@
|
|
|
59
59
|
"lint:prune": "bash scripts/oxlint-baseline.sh --update",
|
|
60
60
|
"lint:baseline": "bash scripts/oxlint-baseline.sh --update",
|
|
61
61
|
"lint:file-size:baseline": "bash scripts/file-size-baseline.sh --update",
|
|
62
|
-
"test:as-any:baseline": "bash scripts/test-as-any-baseline.sh --update",
|
|
63
62
|
"format": "oxfmt",
|
|
64
63
|
"format:check": "oxfmt --check",
|
|
65
64
|
"typecheck": "bash scripts/typecheck-baseline.sh",
|
|
66
|
-
"typecheck:
|
|
65
|
+
"typecheck:test": "bash scripts/typecheck-baseline.sh --project=test",
|
|
67
66
|
"docs:assets": "bun scripts/docs/build-docs-assets.ts",
|
|
68
67
|
"docs:assets:check": "bun scripts/docs/build-docs-assets.ts --check",
|
|
69
68
|
"watch": "bun --watch src/index.ts",
|
|
@@ -181,7 +180,7 @@
|
|
|
181
180
|
"semver": "7.8.5",
|
|
182
181
|
"sharp": "0.35.5",
|
|
183
182
|
"simple-xml-to-json": "1.2.3",
|
|
184
|
-
"strtok3": "10.
|
|
183
|
+
"strtok3": "10.6.2",
|
|
185
184
|
"tinycolor2": "1.6.0",
|
|
186
185
|
"token-types": "6.1.2",
|
|
187
186
|
"tslib": "2.8.1",
|
|
@@ -192,11 +191,12 @@
|
|
|
192
191
|
"zod": "3.25.76"
|
|
193
192
|
},
|
|
194
193
|
"devDependencies": {
|
|
195
|
-
"@anthropic-ai/sdk": "^0.
|
|
194
|
+
"@anthropic-ai/sdk": "^0.135.0",
|
|
196
195
|
"@faker-js/faker": "^10.2.0",
|
|
197
196
|
"@modelcontextprotocol/client": "^2.3.1",
|
|
198
197
|
"@modelcontextprotocol/node": "^2.1.1",
|
|
199
198
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
199
|
+
"@types/bun": "1.4.3",
|
|
200
200
|
"@types/node": "^26.0.0",
|
|
201
201
|
"@types/pngjs": "^6.0.5",
|
|
202
202
|
"@types/ws": "^8.18.1",
|
|
@@ -210,10 +210,10 @@
|
|
|
210
210
|
"js-tiktoken": "^1.0.21",
|
|
211
211
|
"js-yaml": "^5.1.0",
|
|
212
212
|
"knip": "^6.0.0",
|
|
213
|
-
"kysely": "0.29.
|
|
214
|
-
"oxc-parser": "0.
|
|
215
|
-
"oxfmt": "0.
|
|
216
|
-
"oxlint": "1.
|
|
213
|
+
"kysely": "0.29.7",
|
|
214
|
+
"oxc-parser": "0.155.0",
|
|
215
|
+
"oxfmt": "0.74.0",
|
|
216
|
+
"oxlint": "1.89.0",
|
|
217
217
|
"oxlint-tsgolint": "7.0.2004",
|
|
218
218
|
"pixelmatch": "^8.0.0",
|
|
219
219
|
"pngjs": "^7.0.0",
|
|
@@ -269,9 +269,9 @@
|
|
|
269
269
|
"tar": "^7.5.8"
|
|
270
270
|
},
|
|
271
271
|
"engines": {
|
|
272
|
-
"bun": ">=1.
|
|
272
|
+
"bun": ">=1.4.4"
|
|
273
273
|
},
|
|
274
|
-
"packageManager": "bun@1.
|
|
274
|
+
"packageManager": "bun@1.4.4",
|
|
275
275
|
"//overrides": {
|
|
276
276
|
"lodash": "CVE-2025-13465: prototype pollution in _.unset and _.omit",
|
|
277
277
|
"tar": "CVE-2026-26960 (GHSA-83g3-92jg-28cx): Arbitrary file read/write via hardlink target escape through symlink chain",
|
|
@@ -792,6 +792,15 @@
|
|
|
792
792
|
{
|
|
793
793
|
"required": ["cameraPoster"]
|
|
794
794
|
},
|
|
795
|
+
{
|
|
796
|
+
"required": ["screenLock"]
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"required": ["power"]
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"required": ["deviceCondition"]
|
|
803
|
+
},
|
|
795
804
|
{
|
|
796
805
|
"required": ["params"]
|
|
797
806
|
}
|
|
@@ -1668,6 +1677,105 @@
|
|
|
1668
1677
|
},
|
|
1669
1678
|
"additionalProperties": false
|
|
1670
1679
|
},
|
|
1680
|
+
"screenLock": {
|
|
1681
|
+
"description": "Android only. Set a lock-screen PIN, password, or pattern (digits 1-9) with locksettings, or clear one with type none and currentCredential. A recorded plan has the credential replaced by <redacted>: set it by hand before a replay.",
|
|
1682
|
+
"anyOf": [
|
|
1683
|
+
{
|
|
1684
|
+
"type": "object",
|
|
1685
|
+
"properties": {
|
|
1686
|
+
"type": { "type": "string", "const": "pin" },
|
|
1687
|
+
"credential": { "type": "string", "pattern": "^\\d{4,16}$" }
|
|
1688
|
+
},
|
|
1689
|
+
"required": ["type", "credential"],
|
|
1690
|
+
"additionalProperties": false
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
"type": "object",
|
|
1694
|
+
"properties": {
|
|
1695
|
+
"type": { "type": "string", "const": "password" },
|
|
1696
|
+
"credential": {
|
|
1697
|
+
"type": "string",
|
|
1698
|
+
"pattern": "^(?!-)[\\x20-\\x26\\x28-\\x7e]{4,16}$"
|
|
1699
|
+
}
|
|
1700
|
+
},
|
|
1701
|
+
"required": ["type", "credential"],
|
|
1702
|
+
"additionalProperties": false
|
|
1703
|
+
},
|
|
1704
|
+
{
|
|
1705
|
+
"type": "object",
|
|
1706
|
+
"properties": {
|
|
1707
|
+
"type": { "type": "string", "const": "pattern" },
|
|
1708
|
+
"credential": { "type": "string", "pattern": "^[1-9]{4,9}$" }
|
|
1709
|
+
},
|
|
1710
|
+
"required": ["type", "credential"],
|
|
1711
|
+
"additionalProperties": false
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
"type": "object",
|
|
1715
|
+
"properties": {
|
|
1716
|
+
"type": { "type": "string", "const": "none" },
|
|
1717
|
+
"currentCredential": {
|
|
1718
|
+
"type": "string",
|
|
1719
|
+
"pattern": "^(?!-)[\\x20-\\x26\\x28-\\x7e]{4,16}$"
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1722
|
+
"required": ["type", "currentCredential"],
|
|
1723
|
+
"additionalProperties": false
|
|
1724
|
+
}
|
|
1725
|
+
]
|
|
1726
|
+
},
|
|
1727
|
+
"power": {
|
|
1728
|
+
"description": "Android only. Fake battery (level, charging ac|usb|wireless|none, reset), battery saver, Doze (off|light|deep; light/deep unplug the battery and turn the screen off first), an app's standby bucket and inactive state, Data Saver and thermal status (0-6 or reset). Battery, Doze and thermal faking is refused on physical devices. A session restores every changed field on release.",
|
|
1729
|
+
"type": "object",
|
|
1730
|
+
"properties": {
|
|
1731
|
+
"battery": {
|
|
1732
|
+
"type": "object",
|
|
1733
|
+
"properties": {
|
|
1734
|
+
"level": { "type": "integer", "minimum": 0, "maximum": 100 },
|
|
1735
|
+
"charging": { "type": "string", "enum": ["ac", "usb", "wireless", "none"] },
|
|
1736
|
+
"reset": { "type": "boolean" }
|
|
1737
|
+
},
|
|
1738
|
+
"additionalProperties": false
|
|
1739
|
+
},
|
|
1740
|
+
"batterySaver": { "type": "boolean" },
|
|
1741
|
+
"doze": { "type": "string", "enum": ["off", "light", "deep"] },
|
|
1742
|
+
"standbyBucket": {
|
|
1743
|
+
"type": "object",
|
|
1744
|
+
"properties": {
|
|
1745
|
+
"appId": {
|
|
1746
|
+
"type": "string",
|
|
1747
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)+$"
|
|
1748
|
+
},
|
|
1749
|
+
"bucket": {
|
|
1750
|
+
"type": "string",
|
|
1751
|
+
"enum": ["active", "working_set", "frequent", "rare", "restricted"]
|
|
1752
|
+
}
|
|
1753
|
+
},
|
|
1754
|
+
"required": ["appId", "bucket"],
|
|
1755
|
+
"additionalProperties": false
|
|
1756
|
+
},
|
|
1757
|
+
"appInactive": {
|
|
1758
|
+
"type": "object",
|
|
1759
|
+
"properties": {
|
|
1760
|
+
"appId": {
|
|
1761
|
+
"type": "string",
|
|
1762
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*(?:\\.[A-Za-z][A-Za-z0-9_]*)+$"
|
|
1763
|
+
},
|
|
1764
|
+
"inactive": { "type": "boolean" }
|
|
1765
|
+
},
|
|
1766
|
+
"required": ["appId", "inactive"],
|
|
1767
|
+
"additionalProperties": false
|
|
1768
|
+
},
|
|
1769
|
+
"dataSaver": { "type": "boolean" },
|
|
1770
|
+
"thermalStatus": {
|
|
1771
|
+
"anyOf": [
|
|
1772
|
+
{ "type": "integer", "minimum": 0, "maximum": 6 },
|
|
1773
|
+
{ "type": "string", "const": "reset" }
|
|
1774
|
+
]
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
"additionalProperties": false
|
|
1778
|
+
},
|
|
1671
1779
|
"location": {
|
|
1672
1780
|
"description": "Set a static fix, start a timed route, or stop route playback on an Android emulator or iOS Simulator.",
|
|
1673
1781
|
"anyOf": [
|
|
@@ -1799,6 +1907,145 @@
|
|
|
1799
1907
|
"additionalProperties": false
|
|
1800
1908
|
}
|
|
1801
1909
|
]
|
|
1910
|
+
},
|
|
1911
|
+
"deviceCondition": {
|
|
1912
|
+
"description": "Session-scoped root/integrity/fault test fixtures (behind the 'device-condition' feature flag). Sent in its own setDeviceState call.",
|
|
1913
|
+
"type": "object",
|
|
1914
|
+
"properties": {
|
|
1915
|
+
"version": { "type": "number", "const": 1 },
|
|
1916
|
+
"rootState": { "type": "string", "enum": ["rooted-detectable", "unset"] },
|
|
1917
|
+
"integrityState": { "type": "string", "const": "unset" },
|
|
1918
|
+
"faults": {
|
|
1919
|
+
"type": "object",
|
|
1920
|
+
"properties": {
|
|
1921
|
+
"battery": { "type": "string", "enum": ["unplug", "low", "full", "unset"] },
|
|
1922
|
+
"lowPower": { "type": "string", "enum": ["on", "unset"] },
|
|
1923
|
+
"doze": { "type": "string", "enum": ["on", "unset"] },
|
|
1924
|
+
"thermal": { "type": "string", "enum": ["throttling", "critical", "unset"] },
|
|
1925
|
+
"storage": { "type": "string", "enum": ["low", "full", "unset"] },
|
|
1926
|
+
"dontKeepActivities": { "type": "string", "enum": ["on", "unset"] },
|
|
1927
|
+
"revokePermission": {
|
|
1928
|
+
"oneOf": [
|
|
1929
|
+
{ "type": "string", "const": "unset" },
|
|
1930
|
+
{
|
|
1931
|
+
"type": "object",
|
|
1932
|
+
"properties": {
|
|
1933
|
+
"package": {
|
|
1934
|
+
"type": "string",
|
|
1935
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*)+$"
|
|
1936
|
+
},
|
|
1937
|
+
"permission": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_.]*$" }
|
|
1938
|
+
},
|
|
1939
|
+
"required": ["package", "permission"],
|
|
1940
|
+
"additionalProperties": false
|
|
1941
|
+
}
|
|
1942
|
+
]
|
|
1943
|
+
},
|
|
1944
|
+
"disablePackage": {
|
|
1945
|
+
"oneOf": [
|
|
1946
|
+
{ "type": "string", "const": "unset" },
|
|
1947
|
+
{
|
|
1948
|
+
"type": "object",
|
|
1949
|
+
"properties": {
|
|
1950
|
+
"package": {
|
|
1951
|
+
"type": "string",
|
|
1952
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*)+$"
|
|
1953
|
+
}
|
|
1954
|
+
},
|
|
1955
|
+
"required": ["package"],
|
|
1956
|
+
"additionalProperties": false
|
|
1957
|
+
}
|
|
1958
|
+
]
|
|
1959
|
+
},
|
|
1960
|
+
"corruptAppFile": {
|
|
1961
|
+
"oneOf": [
|
|
1962
|
+
{ "type": "string", "const": "unset" },
|
|
1963
|
+
{
|
|
1964
|
+
"type": "object",
|
|
1965
|
+
"properties": {
|
|
1966
|
+
"package": {
|
|
1967
|
+
"type": "string",
|
|
1968
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*)+$"
|
|
1969
|
+
},
|
|
1970
|
+
"path": {
|
|
1971
|
+
"type": "string",
|
|
1972
|
+
"pattern": "^(?!\\.{1,2}(?:/|$))[A-Za-z0-9_.-]+(?:/(?!\\.{1,2}(?:/|$))[A-Za-z0-9_.-]+)*$"
|
|
1973
|
+
},
|
|
1974
|
+
"mode": { "type": "string", "enum": ["overwrite", "truncate"] }
|
|
1975
|
+
},
|
|
1976
|
+
"required": ["package", "path", "mode"],
|
|
1977
|
+
"additionalProperties": false
|
|
1978
|
+
}
|
|
1979
|
+
]
|
|
1980
|
+
},
|
|
1981
|
+
"killApp": {
|
|
1982
|
+
"oneOf": [
|
|
1983
|
+
{ "type": "string", "const": "unset" },
|
|
1984
|
+
{
|
|
1985
|
+
"type": "object",
|
|
1986
|
+
"properties": {
|
|
1987
|
+
"package": {
|
|
1988
|
+
"type": "string",
|
|
1989
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*)+$"
|
|
1990
|
+
},
|
|
1991
|
+
"mode": { "type": "string", "enum": ["background", "forceStop"] }
|
|
1992
|
+
},
|
|
1993
|
+
"required": ["package", "mode"],
|
|
1994
|
+
"additionalProperties": false
|
|
1995
|
+
}
|
|
1996
|
+
]
|
|
1997
|
+
},
|
|
1998
|
+
"trimMemory": {
|
|
1999
|
+
"oneOf": [
|
|
2000
|
+
{ "type": "string", "const": "unset" },
|
|
2001
|
+
{
|
|
2002
|
+
"type": "object",
|
|
2003
|
+
"properties": {
|
|
2004
|
+
"package": {
|
|
2005
|
+
"type": "string",
|
|
2006
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*)+$"
|
|
2007
|
+
},
|
|
2008
|
+
"level": {
|
|
2009
|
+
"type": "string",
|
|
2010
|
+
"enum": [
|
|
2011
|
+
"HIDDEN",
|
|
2012
|
+
"RUNNING_MODERATE",
|
|
2013
|
+
"BACKGROUND",
|
|
2014
|
+
"RUNNING_LOW",
|
|
2015
|
+
"MODERATE",
|
|
2016
|
+
"RUNNING_CRITICAL",
|
|
2017
|
+
"COMPLETE"
|
|
2018
|
+
]
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
"required": ["package", "level"],
|
|
2022
|
+
"additionalProperties": false
|
|
2023
|
+
}
|
|
2024
|
+
]
|
|
2025
|
+
},
|
|
2026
|
+
"clearPackageData": {
|
|
2027
|
+
"oneOf": [
|
|
2028
|
+
{ "type": "string", "const": "unset" },
|
|
2029
|
+
{
|
|
2030
|
+
"type": "object",
|
|
2031
|
+
"properties": {
|
|
2032
|
+
"package": {
|
|
2033
|
+
"type": "string",
|
|
2034
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_]*(\\.[A-Za-z][A-Za-z0-9_]*)+$"
|
|
2035
|
+
}
|
|
2036
|
+
},
|
|
2037
|
+
"required": ["package"],
|
|
2038
|
+
"additionalProperties": false
|
|
2039
|
+
}
|
|
2040
|
+
]
|
|
2041
|
+
}
|
|
2042
|
+
},
|
|
2043
|
+
"additionalProperties": false
|
|
2044
|
+
},
|
|
2045
|
+
"expiresInSeconds": { "type": "integer", "minimum": 1, "maximum": 86400 },
|
|
2046
|
+
"reset": { "type": "boolean", "const": true }
|
|
2047
|
+
},
|
|
2048
|
+
"additionalProperties": false
|
|
1802
2049
|
}
|
|
1803
2050
|
},
|
|
1804
2051
|
"anyOf": [
|
|
@@ -1822,6 +2069,15 @@
|
|
|
1822
2069
|
},
|
|
1823
2070
|
{
|
|
1824
2071
|
"required": ["cameraPoster"]
|
|
2072
|
+
},
|
|
2073
|
+
{
|
|
2074
|
+
"required": ["screenLock"]
|
|
2075
|
+
},
|
|
2076
|
+
{
|
|
2077
|
+
"required": ["power"]
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
"required": ["deviceCondition"]
|
|
1825
2081
|
}
|
|
1826
2082
|
],
|
|
1827
2083
|
"description": "Parameters for setDeviceState"
|