adb-ready 0.7.0 → 0.9.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 +25 -1
- package/README.md +2 -0
- package/dist/cli.js +281 -8
- package/docs/automation.md +6 -1
- package/docs/completions.md +61 -0
- package/docs/stability.md +68 -0
- package/llms.txt +1 -0
- package/package.json +2 -2
- package/schema/agent-tools-v1.json +1 -1
- package/schema/automation-v1.schema.json +156 -0
- package/skills/adb-ready/SKILL.md +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,28 @@ breaking changes.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.9.0] - 2026-09-29
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Add a packaged JSON Schema for the stable JSON result and NDJSON event
|
|
17
|
+
envelopes, plus an explicit 1.x compatibility, deprecation, migration, and
|
|
18
|
+
support-claim policy for CLI, configuration, automation, and MCP consumers.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Strengthen package and release verification so the automation schema is
|
|
23
|
+
always shipped and generated agent contracts cannot drift from the package
|
|
24
|
+
version.
|
|
25
|
+
|
|
26
|
+
## [0.8.0] - 2026-09-29
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Add deterministic, offline shell completion generation for Bash, zsh, fish,
|
|
31
|
+
PowerShell, and Nushell, covering both `adb-ready` and `adbr` without loading
|
|
32
|
+
project configuration or contacting ADB.
|
|
33
|
+
|
|
12
34
|
## [0.7.0] - 2026-09-27
|
|
13
35
|
|
|
14
36
|
### Added
|
|
@@ -499,7 +521,9 @@ breaking changes.
|
|
|
499
521
|
explainable configuration precedence.
|
|
500
522
|
- Human, plain, JSON, and NDJSON output across Node, Bun, and Deno entrypoints.
|
|
501
523
|
|
|
502
|
-
[Unreleased]: https://github.com/Adam014/adb-ready/compare/v0.
|
|
524
|
+
[Unreleased]: https://github.com/Adam014/adb-ready/compare/v0.9.0...HEAD
|
|
525
|
+
[0.9.0]: https://github.com/Adam014/adb-ready/compare/v0.8.0...v0.9.0
|
|
526
|
+
[0.8.0]: https://github.com/Adam014/adb-ready/compare/v0.7.0...v0.8.0
|
|
503
527
|
[0.7.0]: https://github.com/Adam014/adb-ready/compare/v0.6.0...v0.7.0
|
|
504
528
|
[0.6.0]: https://github.com/Adam014/adb-ready/compare/v0.5.1...v0.6.0
|
|
505
529
|
[0.5.1]: https://github.com/Adam014/adb-ready/compare/v0.5.0...v0.5.1
|
package/README.md
CHANGED
|
@@ -284,6 +284,7 @@ Android transport backend.
|
|
|
284
284
|
| Guide | Start here when you want to… |
|
|
285
285
|
| --- | --- |
|
|
286
286
|
| [Getting started](./docs/getting-started.md) | Reach the first ready development session. |
|
|
287
|
+
| [Shell completion](./docs/completions.md) | Enable command discovery in Bash, zsh, fish, PowerShell, or Nushell. |
|
|
287
288
|
| [Development sessions](./docs/dev-sessions.md) | Configure frameworks, commands, ports, readiness, and cleanup. |
|
|
288
289
|
| [Targets and Wireless debugging](./docs/targets-and-wireless.md) | Pair, connect, recover, or explicitly select a target. |
|
|
289
290
|
| [Apps and evidence](./docs/apps-and-evidence.md) | Control the app and capture screenshots or recordings. |
|
|
@@ -291,6 +292,7 @@ Android transport backend.
|
|
|
291
292
|
| [Logs and AI context](./docs/logs-and-context.md) | Diagnose a failure with bounded, redacted evidence. |
|
|
292
293
|
| [AI agent integration](./docs/agent-integration.md) | Connect an MCP-capable coding agent. |
|
|
293
294
|
| [Automation](./docs/automation.md) | Use readiness, exit codes, JSON, NDJSON, JUnit, and CI artifacts. |
|
|
295
|
+
| [Stability and versioning](./docs/stability.md) | Understand the 1.x API, schema, deprecation, and migration guarantees. |
|
|
294
296
|
| [Gradle Managed Devices](./docs/gradle-managed-devices.md) | Run build-owned virtual-device and group tests with normalized evidence. |
|
|
295
297
|
| [Firebase Test Lab](./docs/firebase-test-lab.md) | Run explicit remote instrumentation or Robo matrices with bounded evidence. |
|
|
296
298
|
| [Target pools and fan-out](./docs/target-pools.md) | Bound parallel verification across an explicit target set. |
|
package/dist/cli.js
CHANGED
|
@@ -3304,7 +3304,7 @@ import process15 from "node:process";
|
|
|
3304
3304
|
// package.json
|
|
3305
3305
|
var package_default = {
|
|
3306
3306
|
name: "adb-ready",
|
|
3307
|
-
version: "0.
|
|
3307
|
+
version: "0.9.0",
|
|
3308
3308
|
description: "Agent-ready Android CLI for reliable ADB sessions, app automation, and verified evidence.",
|
|
3309
3309
|
private: false,
|
|
3310
3310
|
type: "module",
|
|
@@ -3403,7 +3403,7 @@ var package_default = {
|
|
|
3403
3403
|
"@yarnpkg/cli-dist": "4.18.0",
|
|
3404
3404
|
npm: "12.0.2",
|
|
3405
3405
|
publint: "0.3.24",
|
|
3406
|
-
runpalette: "0.
|
|
3406
|
+
runpalette: "0.5.0",
|
|
3407
3407
|
tinyexec: "1.3.1",
|
|
3408
3408
|
typescript: "7.0.2",
|
|
3409
3409
|
yarn: "1.22.22"
|
|
@@ -57732,12 +57732,259 @@ function resolveTerminalCapabilities(preferences) {
|
|
|
57732
57732
|
};
|
|
57733
57733
|
}
|
|
57734
57734
|
|
|
57735
|
+
// src/cli/completion.ts
|
|
57736
|
+
var COMPLETION_SHELLS = ["bash", "zsh", "fish", "powershell", "nushell"];
|
|
57737
|
+
var COMMANDS = [
|
|
57738
|
+
{ name: "agent", description: "Configure a project-local AI agent bridge", values: ["setup"] },
|
|
57739
|
+
{
|
|
57740
|
+
name: "app",
|
|
57741
|
+
description: "Resolve, inspect, install, or control one app",
|
|
57742
|
+
values: ["resolve", "info", "install", "launch", "stop", "restart", "clear-data", "uninstall"]
|
|
57743
|
+
},
|
|
57744
|
+
{ name: "apps", description: "List packages on one Android target", values: ["list"] },
|
|
57745
|
+
{
|
|
57746
|
+
name: "capture",
|
|
57747
|
+
description: "Capture verified device evidence",
|
|
57748
|
+
values: ["screenshot", "screen-record"]
|
|
57749
|
+
},
|
|
57750
|
+
{ name: "completion", description: "Generate shell completion", values: COMPLETION_SHELLS },
|
|
57751
|
+
{
|
|
57752
|
+
name: "config",
|
|
57753
|
+
description: "Validate or explain configuration",
|
|
57754
|
+
values: ["validate", "explain"]
|
|
57755
|
+
},
|
|
57756
|
+
{ name: "connect", description: "Connect a wireless Android target" },
|
|
57757
|
+
{ name: "context", description: "Export bounded AI-ready context" },
|
|
57758
|
+
{ name: "dev", description: "Start a target-bound development session" },
|
|
57759
|
+
{ name: "devices", description: "List visible Android targets" },
|
|
57760
|
+
{ name: "doctor", description: "Inspect the local ADB environment" },
|
|
57761
|
+
{ name: "help", description: "Show command help" },
|
|
57762
|
+
{ name: "init", description: "Create detected project configuration" },
|
|
57763
|
+
{
|
|
57764
|
+
name: "inspect",
|
|
57765
|
+
description: "Build bounded device evidence",
|
|
57766
|
+
values: ["app", "failures", "ui"]
|
|
57767
|
+
},
|
|
57768
|
+
{ name: "logs", description: "Stream focused target logs" },
|
|
57769
|
+
{ name: "mcp", description: "Serve typed tools over local stdio" },
|
|
57770
|
+
{ name: "open", description: "Open a deep link or web URL" },
|
|
57771
|
+
{ name: "pair", description: "Pair through Wireless debugging" },
|
|
57772
|
+
{ name: "ports", description: "Manage verified TCP mappings", values: ["forward", "reverse"] },
|
|
57773
|
+
{ name: "problems", description: "Show saved session problems" },
|
|
57774
|
+
{ name: "run", description: "Run one bounded verification job" },
|
|
57775
|
+
{ name: "sessions", description: "Inspect saved sessions", values: ["list", "show", "events"] },
|
|
57776
|
+
{ name: "test", description: "Run managed Android tests", values: ["gradle", "firebase"] },
|
|
57777
|
+
{
|
|
57778
|
+
name: "ui",
|
|
57779
|
+
description: "Perform a bounded verified UI action",
|
|
57780
|
+
values: [
|
|
57781
|
+
"audit",
|
|
57782
|
+
"find",
|
|
57783
|
+
"get",
|
|
57784
|
+
"assert",
|
|
57785
|
+
"compare",
|
|
57786
|
+
"tap",
|
|
57787
|
+
"long-press",
|
|
57788
|
+
"scroll",
|
|
57789
|
+
"swipe",
|
|
57790
|
+
"fill",
|
|
57791
|
+
"clear",
|
|
57792
|
+
"type",
|
|
57793
|
+
"press",
|
|
57794
|
+
"keyboard",
|
|
57795
|
+
"permission",
|
|
57796
|
+
"wait"
|
|
57797
|
+
]
|
|
57798
|
+
},
|
|
57799
|
+
{ name: "version", description: "Show version" }
|
|
57800
|
+
];
|
|
57801
|
+
var GLOBAL_OPTIONS = [
|
|
57802
|
+
"--help",
|
|
57803
|
+
"-h",
|
|
57804
|
+
"--version",
|
|
57805
|
+
"-V",
|
|
57806
|
+
"--format",
|
|
57807
|
+
"--json",
|
|
57808
|
+
"--quiet",
|
|
57809
|
+
"--verbose",
|
|
57810
|
+
"--color",
|
|
57811
|
+
"--no-color",
|
|
57812
|
+
"--unicode",
|
|
57813
|
+
"--no-unicode",
|
|
57814
|
+
"--animation",
|
|
57815
|
+
"--no-animation",
|
|
57816
|
+
"--non-interactive",
|
|
57817
|
+
"--timeout",
|
|
57818
|
+
"--adb",
|
|
57819
|
+
"--adb-host",
|
|
57820
|
+
"--adb-port",
|
|
57821
|
+
"--config",
|
|
57822
|
+
"--profile",
|
|
57823
|
+
"--select",
|
|
57824
|
+
"--device",
|
|
57825
|
+
"--serial",
|
|
57826
|
+
"-s",
|
|
57827
|
+
"--transport-id",
|
|
57828
|
+
"--last",
|
|
57829
|
+
"--dry-run"
|
|
57830
|
+
];
|
|
57831
|
+
var commandNames = () => COMMANDS.map(({ name }) => name).join(" ");
|
|
57832
|
+
var optionNames = () => GLOBAL_OPTIONS.join(" ");
|
|
57833
|
+
function bash() {
|
|
57834
|
+
const cases = COMMANDS.filter(({ values: values2 }) => values2 !== undefined).map(({ name, values: values2 }) => ` ${name}) candidates="${values2?.join(" ")}" ;;`).join(`
|
|
57835
|
+
`);
|
|
57836
|
+
return `# Generated by adb-ready. Source this file from ~/.bashrc.
|
|
57837
|
+
_adb_ready_complete() {
|
|
57838
|
+
local current command candidates
|
|
57839
|
+
COMPREPLY=()
|
|
57840
|
+
current="\${COMP_WORDS[COMP_CWORD]}"
|
|
57841
|
+
command="\${COMP_WORDS[1]}"
|
|
57842
|
+
if [[ \${COMP_CWORD} -eq 1 ]]; then
|
|
57843
|
+
candidates="${commandNames()} ${optionNames()}"
|
|
57844
|
+
elif [[ \${COMP_CWORD} -eq 2 ]]; then
|
|
57845
|
+
case "\${command}" in
|
|
57846
|
+
${cases}
|
|
57847
|
+
help) candidates="${commandNames()}" ;;
|
|
57848
|
+
*) candidates="${optionNames()}" ;;
|
|
57849
|
+
esac
|
|
57850
|
+
else
|
|
57851
|
+
candidates="${optionNames()}"
|
|
57852
|
+
fi
|
|
57853
|
+
COMPREPLY=( $(compgen -W "\${candidates}" -- "\${current}") )
|
|
57854
|
+
}
|
|
57855
|
+
complete -F _adb_ready_complete adb-ready adbr
|
|
57856
|
+
`;
|
|
57857
|
+
}
|
|
57858
|
+
function zsh() {
|
|
57859
|
+
const commands = COMMANDS.map(({ name, description }) => ` '${name}:${description.replaceAll("'", "'\\''")}'`).join(`
|
|
57860
|
+
`);
|
|
57861
|
+
const cases = COMMANDS.filter(({ values: values2 }) => values2 !== undefined).map(({ name, values: values2 }) => ` ${name}) _values 'action' ${values2?.join(" ")} ;;`).join(`
|
|
57862
|
+
`);
|
|
57863
|
+
return `#compdef adb-ready adbr
|
|
57864
|
+
# Generated by adb-ready. Add its directory to fpath, then run compinit.
|
|
57865
|
+
_adb_ready() {
|
|
57866
|
+
local -a commands
|
|
57867
|
+
commands=(
|
|
57868
|
+
${commands}
|
|
57869
|
+
)
|
|
57870
|
+
_arguments -C \\
|
|
57871
|
+
'(-h --help)'{-h,--help}'[show help]' \\
|
|
57872
|
+
'(-V --version)'{-V,--version}'[show version]' \\
|
|
57873
|
+
'--format[select output format]:format:(human plain json ndjson)' \\
|
|
57874
|
+
'--json[emit JSON]' \\
|
|
57875
|
+
'--non-interactive[never prompt]' \\
|
|
57876
|
+
'1:command:->command' \\
|
|
57877
|
+
'*::argument:->argument'
|
|
57878
|
+
case $state in
|
|
57879
|
+
command) _describe 'command' commands ;;
|
|
57880
|
+
argument)
|
|
57881
|
+
case $words[2] in
|
|
57882
|
+
${cases}
|
|
57883
|
+
help) _describe 'command' commands ;;
|
|
57884
|
+
esac
|
|
57885
|
+
;;
|
|
57886
|
+
esac
|
|
57887
|
+
}
|
|
57888
|
+
_adb_ready "$@"
|
|
57889
|
+
`;
|
|
57890
|
+
}
|
|
57891
|
+
function fish() {
|
|
57892
|
+
const lines = [
|
|
57893
|
+
"# Generated by adb-ready. Save as ~/.config/fish/completions/adb-ready.fish."
|
|
57894
|
+
];
|
|
57895
|
+
for (const binary of ["adb-ready", "adbr"]) {
|
|
57896
|
+
for (const { name, description } of COMMANDS) {
|
|
57897
|
+
const safeDescription = description.replaceAll("'", "\\'");
|
|
57898
|
+
lines.push(`complete -c ${binary} -f -n '__fish_use_subcommand' -a '${name}' -d '${safeDescription}'`);
|
|
57899
|
+
}
|
|
57900
|
+
for (const { name, values: values2 } of COMMANDS) {
|
|
57901
|
+
if (values2 === undefined)
|
|
57902
|
+
continue;
|
|
57903
|
+
lines.push(`complete -c ${binary} -f -n '__fish_seen_subcommand_from ${name}' -a '${values2.join(" ")}'`);
|
|
57904
|
+
}
|
|
57905
|
+
lines.push(`complete -c ${binary} -s h -l help -d 'Show help'`, `complete -c ${binary} -s V -l version -d 'Show version'`, `complete -c ${binary} -l json -d 'Emit JSON'`, `complete -c ${binary} -l non-interactive -d 'Never prompt'`, `complete -c ${binary} -l dry-run -d 'Plan without mutation'`);
|
|
57906
|
+
}
|
|
57907
|
+
return `${lines.join(`
|
|
57908
|
+
`)}
|
|
57909
|
+
`;
|
|
57910
|
+
}
|
|
57911
|
+
function powershell() {
|
|
57912
|
+
const map = COMMANDS.filter(({ values: values2 }) => values2 !== undefined).map(({ name, values: values2 }) => ` '${name}' = @('${values2?.join("','")}')`).join(`
|
|
57913
|
+
`);
|
|
57914
|
+
return `# Generated by adb-ready. Add this script to your PowerShell profile.
|
|
57915
|
+
$AdbReadyCommands = @('${commandNames().replaceAll(" ", "','")}')
|
|
57916
|
+
$AdbReadyOptions = @('${optionNames().replaceAll(" ", "','")}')
|
|
57917
|
+
$AdbReadyActions = @{
|
|
57918
|
+
${map}
|
|
57919
|
+
}
|
|
57920
|
+
Register-ArgumentCompleter -Native -CommandName adb-ready,adbr -ScriptBlock {
|
|
57921
|
+
param($wordToComplete, $commandAst, $cursorPosition)
|
|
57922
|
+
$words = $commandAst.CommandElements | ForEach-Object { $_.Extent.Text }
|
|
57923
|
+
$candidates = if ($words.Count -le 1) {
|
|
57924
|
+
$AdbReadyCommands + $AdbReadyOptions
|
|
57925
|
+
} elseif ($words.Count -eq 2 -and $AdbReadyActions.ContainsKey($words[1])) {
|
|
57926
|
+
$AdbReadyActions[$words[1]] + $AdbReadyOptions
|
|
57927
|
+
} elseif ($words[1] -eq 'help') {
|
|
57928
|
+
$AdbReadyCommands
|
|
57929
|
+
} else {
|
|
57930
|
+
$AdbReadyOptions
|
|
57931
|
+
}
|
|
57932
|
+
$candidates | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {
|
|
57933
|
+
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
|
|
57934
|
+
}
|
|
57935
|
+
}
|
|
57936
|
+
`;
|
|
57937
|
+
}
|
|
57938
|
+
function nushellExtern(binary) {
|
|
57939
|
+
return `export extern "${binary}" [
|
|
57940
|
+
command?: string@"nu-complete adb-ready commands"
|
|
57941
|
+
...args: string
|
|
57942
|
+
--help(-h)
|
|
57943
|
+
--version(-V)
|
|
57944
|
+
--json
|
|
57945
|
+
--quiet
|
|
57946
|
+
--verbose
|
|
57947
|
+
--non-interactive
|
|
57948
|
+
--dry-run
|
|
57949
|
+
]`;
|
|
57950
|
+
}
|
|
57951
|
+
function nushell() {
|
|
57952
|
+
const records = COMMANDS.map(({ name, description }) => ` { value: "${name}", description: "${description}" }`).join(`
|
|
57953
|
+
`);
|
|
57954
|
+
return `# Generated by adb-ready. Source this file from config.nu.
|
|
57955
|
+
def "nu-complete adb-ready commands" [] {
|
|
57956
|
+
[
|
|
57957
|
+
${records}
|
|
57958
|
+
]
|
|
57959
|
+
}
|
|
57960
|
+
|
|
57961
|
+
${nushellExtern("adb-ready")}
|
|
57962
|
+
|
|
57963
|
+
${nushellExtern("adbr")}
|
|
57964
|
+
`;
|
|
57965
|
+
}
|
|
57966
|
+
function generateCompletion(shell) {
|
|
57967
|
+
switch (shell) {
|
|
57968
|
+
case "bash":
|
|
57969
|
+
return bash();
|
|
57970
|
+
case "zsh":
|
|
57971
|
+
return zsh();
|
|
57972
|
+
case "fish":
|
|
57973
|
+
return fish();
|
|
57974
|
+
case "powershell":
|
|
57975
|
+
return powershell();
|
|
57976
|
+
case "nushell":
|
|
57977
|
+
return nushell();
|
|
57978
|
+
}
|
|
57979
|
+
}
|
|
57980
|
+
|
|
57735
57981
|
// src/cli/arguments.ts
|
|
57736
|
-
var
|
|
57982
|
+
var COMMANDS2 = new Set([
|
|
57737
57983
|
"agent",
|
|
57738
57984
|
"app",
|
|
57739
57985
|
"apps",
|
|
57740
57986
|
"capture",
|
|
57987
|
+
"completion",
|
|
57741
57988
|
"config",
|
|
57742
57989
|
"connect",
|
|
57743
57990
|
"context",
|
|
@@ -57887,6 +58134,7 @@ function splitLongOption(argument) {
|
|
|
57887
58134
|
function parseArguments(argv) {
|
|
57888
58135
|
let command;
|
|
57889
58136
|
let helpTarget;
|
|
58137
|
+
let completionShell;
|
|
57890
58138
|
let format = "human";
|
|
57891
58139
|
let quiet = false;
|
|
57892
58140
|
let verbose = false;
|
|
@@ -58024,17 +58272,17 @@ function parseArguments(argv) {
|
|
|
58024
58272
|
}
|
|
58025
58273
|
if (!argument.startsWith("-")) {
|
|
58026
58274
|
if (command === undefined) {
|
|
58027
|
-
if (!
|
|
58028
|
-
const hint = suggestion(argument,
|
|
58275
|
+
if (!COMMANDS2.has(argument)) {
|
|
58276
|
+
const hint = suggestion(argument, COMMANDS2);
|
|
58029
58277
|
return failure4("CLI_USAGE", `Unknown command: ${argument}${hint === "" ? "" : `. ${hint}`}`);
|
|
58030
58278
|
}
|
|
58031
58279
|
const candidate = argument;
|
|
58032
58280
|
command = candidate;
|
|
58033
58281
|
continue;
|
|
58034
58282
|
}
|
|
58035
|
-
if (command === "help" &&
|
|
58283
|
+
if (command === "help" && COMMANDS2.has(argument)) {
|
|
58036
58284
|
const candidate = argument;
|
|
58037
|
-
if (candidate === "agent" || candidate === "app" || candidate === "apps" || candidate === "capture" || candidate === "connect" || candidate === "config" || candidate === "context" || candidate === "dev" || candidate === "devices" || candidate === "doctor" || candidate === "logs" || candidate === "mcp" || candidate === "open" || candidate === "init" || candidate === "inspect" || candidate === "pair" || candidate === "ports" || candidate === "problems" || candidate === "run" || candidate === "sessions" || candidate === "test" || candidate === "ui" || candidate === "version") {
|
|
58285
|
+
if (candidate === "agent" || candidate === "app" || candidate === "apps" || candidate === "capture" || candidate === "completion" || candidate === "connect" || candidate === "config" || candidate === "context" || candidate === "dev" || candidate === "devices" || candidate === "doctor" || candidate === "logs" || candidate === "mcp" || candidate === "open" || candidate === "init" || candidate === "inspect" || candidate === "pair" || candidate === "ports" || candidate === "problems" || candidate === "run" || candidate === "sessions" || candidate === "test" || candidate === "ui" || candidate === "version") {
|
|
58038
58286
|
helpTarget = candidate;
|
|
58039
58287
|
continue;
|
|
58040
58288
|
}
|
|
@@ -58043,6 +58291,13 @@ function parseArguments(argv) {
|
|
|
58043
58291
|
endpoint = argument;
|
|
58044
58292
|
continue;
|
|
58045
58293
|
}
|
|
58294
|
+
if (command === "completion" && completionShell === undefined) {
|
|
58295
|
+
if (!COMPLETION_SHELLS.includes(argument)) {
|
|
58296
|
+
return failure4("CLI_INVALID_VALUE", `Invalid completion shell: ${argument}. Expected bash, zsh, fish, powershell, or nushell.`);
|
|
58297
|
+
}
|
|
58298
|
+
completionShell = argument;
|
|
58299
|
+
continue;
|
|
58300
|
+
}
|
|
58046
58301
|
if (command === "agent" && argument === "setup" && !agentSetupSeen) {
|
|
58047
58302
|
agentSetupSeen = true;
|
|
58048
58303
|
continue;
|
|
@@ -58927,6 +59182,12 @@ function parseArguments(argv) {
|
|
|
58927
59182
|
if (command === "capture" && captureKind === undefined) {
|
|
58928
59183
|
return failure4("CLI_USAGE", "capture requires screenshot or screen-record.");
|
|
58929
59184
|
}
|
|
59185
|
+
if (command === "completion" && completionShell === undefined) {
|
|
59186
|
+
return failure4("CLI_USAGE", "completion requires bash, zsh, fish, powershell, or nushell.");
|
|
59187
|
+
}
|
|
59188
|
+
if (command === "completion" && argv.some((argument) => argument !== "completion" && argument !== completionShell)) {
|
|
59189
|
+
return failure4("CLI_USAGE", "completion accepts only one shell name; redirect its exact script output to a file.");
|
|
59190
|
+
}
|
|
58930
59191
|
if (command === "inspect" && inspectKind === undefined) {
|
|
58931
59192
|
return failure4("CLI_USAGE", "inspect requires app, failures, or ui.");
|
|
58932
59193
|
}
|
|
@@ -59232,6 +59493,7 @@ function parseArguments(argv) {
|
|
|
59232
59493
|
options: {
|
|
59233
59494
|
command,
|
|
59234
59495
|
...helpTarget === undefined ? {} : { helpTarget },
|
|
59496
|
+
...completionShell === undefined ? {} : { completionShell },
|
|
59235
59497
|
format,
|
|
59236
59498
|
quiet,
|
|
59237
59499
|
verbose,
|
|
@@ -59360,6 +59622,7 @@ Commands:
|
|
|
59360
59622
|
app ACTION [APP_ID] Resolve, inspect, install, or control one app
|
|
59361
59623
|
apps list List packages on one Android target
|
|
59362
59624
|
capture ACTION Save a verified screenshot or bounded screen recording
|
|
59625
|
+
completion SHELL Generate completion for bash, zsh, fish, PowerShell, or Nushell
|
|
59363
59626
|
config ACTION Validate or explain resolved configuration
|
|
59364
59627
|
connect [HOST:PORT] Connect and verify a wireless Android target
|
|
59365
59628
|
context [SESSION] Export bounded AI-ready diagnostic context
|
|
@@ -59466,6 +59729,12 @@ Writes verified binary evidence inside the current project. Existing files are
|
|
|
59466
59729
|
never replaced unless --force is explicit. Recordings are bounded to 180s.
|
|
59467
59730
|
Screenshot crops use source pixels. Dimension limits preserve aspect ratio and
|
|
59468
59731
|
never upscale the image. The CLI keeps full resolution unless limits are set.
|
|
59732
|
+
`,
|
|
59733
|
+
completion: `Usage: adb-ready completion bash|zsh|fish|powershell|nushell
|
|
59734
|
+
|
|
59735
|
+
Prints a static completion script for both adb-ready and adbr. Generation is
|
|
59736
|
+
offline, deterministic, and never loads project configuration or contacts ADB.
|
|
59737
|
+
See docs/completions.md for one-time installation instructions.
|
|
59469
59738
|
`,
|
|
59470
59739
|
config: `Usage:
|
|
59471
59740
|
adb-ready config validate [options]
|
|
@@ -60225,6 +60494,10 @@ async function runCliInternal(argv, io, dependencies = {}, signal) {
|
|
|
60225
60494
|
});
|
|
60226
60495
|
return 0 /* Success */;
|
|
60227
60496
|
}
|
|
60497
|
+
if (options.command === "completion") {
|
|
60498
|
+
io.output.write(generateCompletion(options.completionShell ?? "bash"));
|
|
60499
|
+
return 0 /* Success */;
|
|
60500
|
+
}
|
|
60228
60501
|
if (options.command === "mcp") {
|
|
60229
60502
|
const explicitRoot = io.env.ADB_READY_MCP_PROJECT_ROOT?.trim();
|
|
60230
60503
|
await runMcpStdio({
|
|
@@ -61355,4 +61628,4 @@ try {
|
|
|
61355
61628
|
process16.removeListener("SIGTERM", abort);
|
|
61356
61629
|
}
|
|
61357
61630
|
|
|
61358
|
-
//# debugId=
|
|
61631
|
+
//# debugId=24EB6A0CAE0CFFFC64756E2164756E21
|
package/docs/automation.md
CHANGED
|
@@ -62,12 +62,17 @@ JSON commands return this top-level shape:
|
|
|
62
62
|
Consumers must ignore unknown additive fields and event types within the same
|
|
63
63
|
schema version.
|
|
64
64
|
|
|
65
|
-
The npm package includes
|
|
65
|
+
The npm package includes three versioned public artifacts:
|
|
66
66
|
|
|
67
67
|
- `schema/config-v1.schema.json` validates project configuration; and
|
|
68
|
+
- `schema/automation-v1.schema.json` validates the common JSON result and
|
|
69
|
+
NDJSON event envelopes; and
|
|
68
70
|
- `schema/agent-tools-v1.json` catalogs every MCP tool's generated input and
|
|
69
71
|
output schemas plus safety annotations for the matching package version.
|
|
70
72
|
|
|
73
|
+
See [Stability and versioning](./stability.md) for the 1.x compatibility,
|
|
74
|
+
deprecation, and migration policy.
|
|
75
|
+
|
|
71
76
|
## Event envelope
|
|
72
77
|
|
|
73
78
|
NDJSON events include:
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Shell completion
|
|
2
|
+
|
|
3
|
+
ADB Ready generates static tab-completion scripts for both `adb-ready` and its
|
|
4
|
+
short alias, `adbr`. Generation is instant and offline: it does not load project
|
|
5
|
+
configuration, start ADB, or inspect a device.
|
|
6
|
+
|
|
7
|
+
## Bash
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
mkdir -p ~/.local/share/bash-completion/completions
|
|
11
|
+
adb-ready completion bash > ~/.local/share/bash-completion/completions/adb-ready
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Start a new shell. If the user completion directory is not loaded by your Bash
|
|
15
|
+
installation, source the generated file from `~/.bashrc`.
|
|
16
|
+
|
|
17
|
+
## zsh
|
|
18
|
+
|
|
19
|
+
```zsh
|
|
20
|
+
mkdir -p ~/.zfunc
|
|
21
|
+
adb-ready completion zsh > ~/.zfunc/_adb-ready
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Add the directory before `compinit` in `~/.zshrc`:
|
|
25
|
+
|
|
26
|
+
```zsh
|
|
27
|
+
fpath=(~/.zfunc $fpath)
|
|
28
|
+
autoload -Uz compinit && compinit
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## fish
|
|
32
|
+
|
|
33
|
+
```fish
|
|
34
|
+
mkdir -p ~/.config/fish/completions
|
|
35
|
+
adb-ready completion fish > ~/.config/fish/completions/adb-ready.fish
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
fish loads the file automatically in new shell sessions.
|
|
39
|
+
|
|
40
|
+
## PowerShell
|
|
41
|
+
|
|
42
|
+
```powershell
|
|
43
|
+
New-Item -ItemType Directory -Force (Split-Path $PROFILE) | Out-Null
|
|
44
|
+
adb-ready completion powershell | Out-File -Append -Encoding utf8 $PROFILE
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Reload the profile with `. $PROFILE` or open a new PowerShell session.
|
|
48
|
+
|
|
49
|
+
## Nushell
|
|
50
|
+
|
|
51
|
+
```nu
|
|
52
|
+
mkdir ($nu.data-dir | path join "vendor" "autoload")
|
|
53
|
+
adb-ready completion nushell | save --force ($nu.data-dir | path join "vendor" "autoload" "adb-ready.nu")
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Nushell loads vendor autoload files in new sessions. The generated declarations
|
|
57
|
+
complete public commands while preserving ordinary file completion for command
|
|
58
|
+
arguments.
|
|
59
|
+
|
|
60
|
+
Regenerate the script after upgrading ADB Ready so newly added commands become
|
|
61
|
+
available to the shell.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Stability and versioning
|
|
2
|
+
|
|
3
|
+
ADB Ready follows Semantic Versioning for the npm package and versions its
|
|
4
|
+
machine contracts independently. Version `1.0.0` starts the compatibility
|
|
5
|
+
policy below; pre-1.0 releases remain governed by their changelog.
|
|
6
|
+
|
|
7
|
+
## Stable in 1.x
|
|
8
|
+
|
|
9
|
+
Within the `1.x` package line, ADB Ready will not remove or rename a documented
|
|
10
|
+
CLI command, option, configuration field, exit-code category, result-envelope
|
|
11
|
+
field, event-envelope field, MCP tool, or MCP resource without a new major
|
|
12
|
+
version. Existing documented meanings will not be silently reassigned.
|
|
13
|
+
|
|
14
|
+
Backward-compatible additions may ship in a minor release. These include new
|
|
15
|
+
commands, options, event types, problem codes, optional object fields, enum
|
|
16
|
+
values, MCP tools, and target capabilities. Automation must ignore unknown
|
|
17
|
+
additive fields and handle unknown event or problem types conservatively.
|
|
18
|
+
|
|
19
|
+
Human terminal layout, animation, color, progress wording, and diagnostic prose
|
|
20
|
+
are presentation rather than an automation API. Do not parse them. Use JSON,
|
|
21
|
+
NDJSON, the packaged schemas, or MCP instead.
|
|
22
|
+
|
|
23
|
+
## Versioned contracts
|
|
24
|
+
|
|
25
|
+
The npm package contains three contract artifacts:
|
|
26
|
+
|
|
27
|
+
- `schema/config-v1.schema.json` — declarative project configuration;
|
|
28
|
+
- `schema/automation-v1.schema.json` — common JSON result and NDJSON event
|
|
29
|
+
envelopes; and
|
|
30
|
+
- `schema/agent-tools-v1.json` — the exact MCP tool input/output surface for
|
|
31
|
+
the installed package version.
|
|
32
|
+
|
|
33
|
+
`schemaVersion` identifies an envelope or configuration shape; it is not the
|
|
34
|
+
npm package version. Additive changes retain the same schema version. An
|
|
35
|
+
incompatible machine-shape change requires a new schema version and a new npm
|
|
36
|
+
major release. ADB Ready 1.x continues to accept configuration schema v1.
|
|
37
|
+
|
|
38
|
+
The generated agent contract records `packageVersion`. Clients should load the
|
|
39
|
+
artifact from the same installed package that starts the MCP server instead of
|
|
40
|
+
combining contracts from different releases.
|
|
41
|
+
|
|
42
|
+
## Exit behavior
|
|
43
|
+
|
|
44
|
+
The category exit codes documented in [Automation](./automation.md#exit-codes)
|
|
45
|
+
are stable in 1.x. A bounded `dev` or `run` child may preserve its own non-zero
|
|
46
|
+
exit code, so callers must not assume every non-zero value belongs to the ADB
|
|
47
|
+
Ready category table. Read the structured `problems` array for classification.
|
|
48
|
+
|
|
49
|
+
## Deprecation and migration
|
|
50
|
+
|
|
51
|
+
A deprecated capability remains functional throughout the current major line
|
|
52
|
+
unless retaining it would create a security or data-integrity risk. ADB Ready
|
|
53
|
+
will mark the replacement in CLI help, public documentation, and the changelog
|
|
54
|
+
before removal. Removal or an incompatible semantic change waits for the next
|
|
55
|
+
major release and receives a migration section.
|
|
56
|
+
|
|
57
|
+
Security fixes, upstream Android/ADB behavior, and hosted-provider changes can
|
|
58
|
+
make an operation unavailable without changing its public shape. Such cases
|
|
59
|
+
must fail explicitly with structured evidence; ADB Ready does not fabricate a
|
|
60
|
+
successful result to preserve compatibility.
|
|
61
|
+
|
|
62
|
+
## Support claims
|
|
63
|
+
|
|
64
|
+
API stability does not turn every upstream-capable environment into a tested
|
|
65
|
+
environment. [Compatibility](../COMPATIBILITY.md) distinguishes CI-tested,
|
|
66
|
+
hardware-observed, and upstream-capable tiers. A new host, runtime, transport,
|
|
67
|
+
or Android form factor is promoted only after its stated acceptance evidence
|
|
68
|
+
exists.
|
package/llms.txt
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
- Logs and diagnostic context: `docs/logs-and-context.md`
|
|
46
46
|
- Configuration: `docs/configuration.md`
|
|
47
47
|
- Automation contract: `docs/automation.md`
|
|
48
|
+
- Stability and versioning: `docs/stability.md`
|
|
48
49
|
- Compatibility: `COMPATIBILITY.md`
|
|
49
50
|
- Security: `SECURITY.md`
|
|
50
51
|
- Threat model: `docs/threat-model.md`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adb-ready",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Agent-ready Android CLI for reliable ADB sessions, app automation, and verified evidence.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@yarnpkg/cli-dist": "4.18.0",
|
|
100
100
|
"npm": "12.0.2",
|
|
101
101
|
"publint": "0.3.24",
|
|
102
|
-
"runpalette": "0.
|
|
102
|
+
"runpalette": "0.5.0",
|
|
103
103
|
"tinyexec": "1.3.1",
|
|
104
104
|
"typescript": "7.0.2",
|
|
105
105
|
"yarn": "1.22.22"
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/Adam014/adb-ready/blob/main/schema/automation-v1.schema.json",
|
|
4
|
+
"title": "ADB Ready automation envelope v1",
|
|
5
|
+
"description": "Common JSON result and NDJSON event envelopes emitted by ADB Ready.",
|
|
6
|
+
"oneOf": [{ "$ref": "#/$defs/result" }, { "$ref": "#/$defs/event" }],
|
|
7
|
+
"$defs": {
|
|
8
|
+
"jsonValue": {
|
|
9
|
+
"oneOf": [
|
|
10
|
+
{ "type": "null" },
|
|
11
|
+
{ "type": "boolean" },
|
|
12
|
+
{ "type": "number" },
|
|
13
|
+
{ "type": "string" },
|
|
14
|
+
{ "type": "array", "items": { "$ref": "#/$defs/jsonValue" } },
|
|
15
|
+
{
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": { "$ref": "#/$defs/jsonValue" }
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"correlation": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"required": ["commandId"],
|
|
24
|
+
"properties": {
|
|
25
|
+
"commandId": { "type": "string", "minLength": 1 },
|
|
26
|
+
"operationId": { "type": "string", "minLength": 1 },
|
|
27
|
+
"sessionId": { "type": "string", "minLength": 1 },
|
|
28
|
+
"targetId": { "type": "string", "minLength": 1 }
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": true
|
|
31
|
+
},
|
|
32
|
+
"evidence": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"required": ["source", "value"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"source": { "type": "string", "minLength": 1 },
|
|
37
|
+
"field": { "type": "string", "minLength": 1 },
|
|
38
|
+
"value": { "$ref": "#/$defs/jsonValue" },
|
|
39
|
+
"redacted": { "type": "boolean" }
|
|
40
|
+
},
|
|
41
|
+
"additionalProperties": true
|
|
42
|
+
},
|
|
43
|
+
"action": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"required": ["id", "title", "kind", "risk", "automatic"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"id": { "type": "string", "minLength": 1 },
|
|
48
|
+
"title": { "type": "string", "minLength": 1 },
|
|
49
|
+
"kind": { "enum": ["command", "user", "documentation"] },
|
|
50
|
+
"risk": {
|
|
51
|
+
"enum": [
|
|
52
|
+
"none",
|
|
53
|
+
"read-only",
|
|
54
|
+
"local-additive",
|
|
55
|
+
"device-reversible",
|
|
56
|
+
"shared-global",
|
|
57
|
+
"destructive",
|
|
58
|
+
"open-world"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"automatic": { "type": "boolean" },
|
|
62
|
+
"idempotent": { "type": "boolean" },
|
|
63
|
+
"command": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"required": ["executable", "args"],
|
|
66
|
+
"properties": {
|
|
67
|
+
"executable": { "type": "string", "minLength": 1 },
|
|
68
|
+
"args": { "type": "array", "items": { "type": "string" } }
|
|
69
|
+
},
|
|
70
|
+
"additionalProperties": true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"additionalProperties": true
|
|
74
|
+
},
|
|
75
|
+
"problem": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"required": [
|
|
78
|
+
"code",
|
|
79
|
+
"category",
|
|
80
|
+
"severity",
|
|
81
|
+
"summary",
|
|
82
|
+
"detail",
|
|
83
|
+
"retryable",
|
|
84
|
+
"evidence",
|
|
85
|
+
"actions",
|
|
86
|
+
"correlation"
|
|
87
|
+
],
|
|
88
|
+
"properties": {
|
|
89
|
+
"code": { "type": "string", "minLength": 1 },
|
|
90
|
+
"category": { "type": "string", "minLength": 1 },
|
|
91
|
+
"severity": { "enum": ["warning", "error"] },
|
|
92
|
+
"summary": { "type": "string" },
|
|
93
|
+
"detail": { "type": "string" },
|
|
94
|
+
"retryable": { "type": "boolean" },
|
|
95
|
+
"evidence": { "type": "array", "items": { "$ref": "#/$defs/evidence" } },
|
|
96
|
+
"actions": { "type": "array", "items": { "$ref": "#/$defs/action" } },
|
|
97
|
+
"correlation": { "$ref": "#/$defs/correlation" }
|
|
98
|
+
},
|
|
99
|
+
"additionalProperties": true
|
|
100
|
+
},
|
|
101
|
+
"result": {
|
|
102
|
+
"type": "object",
|
|
103
|
+
"required": [
|
|
104
|
+
"schemaVersion",
|
|
105
|
+
"command",
|
|
106
|
+
"commandId",
|
|
107
|
+
"ok",
|
|
108
|
+
"startedAt",
|
|
109
|
+
"finishedAt",
|
|
110
|
+
"durationMs",
|
|
111
|
+
"data",
|
|
112
|
+
"problems"
|
|
113
|
+
],
|
|
114
|
+
"properties": {
|
|
115
|
+
"schemaVersion": { "const": 1 },
|
|
116
|
+
"command": { "type": "string", "minLength": 1 },
|
|
117
|
+
"commandId": { "type": "string", "minLength": 1 },
|
|
118
|
+
"ok": { "type": "boolean" },
|
|
119
|
+
"startedAt": { "type": "string", "format": "date-time" },
|
|
120
|
+
"finishedAt": { "type": "string", "format": "date-time" },
|
|
121
|
+
"durationMs": { "type": "number", "minimum": 0 },
|
|
122
|
+
"data": { "$ref": "#/$defs/jsonValue" },
|
|
123
|
+
"problems": { "type": "array", "items": { "$ref": "#/$defs/problem" } }
|
|
124
|
+
},
|
|
125
|
+
"additionalProperties": true
|
|
126
|
+
},
|
|
127
|
+
"event": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"required": [
|
|
130
|
+
"schemaVersion",
|
|
131
|
+
"sequence",
|
|
132
|
+
"timestamp",
|
|
133
|
+
"type",
|
|
134
|
+
"source",
|
|
135
|
+
"severity",
|
|
136
|
+
"message",
|
|
137
|
+
"correlation"
|
|
138
|
+
],
|
|
139
|
+
"properties": {
|
|
140
|
+
"schemaVersion": { "const": 1 },
|
|
141
|
+
"sequence": { "type": "integer", "minimum": 1 },
|
|
142
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
143
|
+
"type": { "type": "string", "minLength": 1 },
|
|
144
|
+
"source": { "type": "string", "minLength": 1 },
|
|
145
|
+
"severity": { "enum": ["debug", "info", "warning", "error"] },
|
|
146
|
+
"message": { "type": "string" },
|
|
147
|
+
"correlation": { "$ref": "#/$defs/correlation" },
|
|
148
|
+
"data": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"additionalProperties": { "$ref": "#/$defs/jsonValue" }
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"additionalProperties": true
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -3,7 +3,7 @@ name: adb-ready
|
|
|
3
3
|
description: Prepare, automate, debug, and verify one Android target through the ADB Ready MCP server. Use for Android development sessions, app lifecycle work, UI automation, failure evidence, screenshots, and agent-driven device checks.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
<!-- Generated by adb-ready 0.
|
|
6
|
+
<!-- Generated by adb-ready 0.9.0; do not edit. -->
|
|
7
7
|
|
|
8
8
|
# ADB Ready
|
|
9
9
|
|
|
@@ -51,4 +51,4 @@ Use the typed `adb-ready` MCP tools. Do not replace them with generic shell or r
|
|
|
51
51
|
- `session`: 12 tools
|
|
52
52
|
- `ui`: 29 tools
|
|
53
53
|
|
|
54
|
-
Contract: ADB Ready 0.
|
|
54
|
+
Contract: ADB Ready 0.9.0, agent schema v1.
|