@frankzhang2026/opencode-android-orchestrator 1.1.0 → 1.2.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 (44) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +12 -8
  3. package/dist/doctor/index.d.ts.map +1 -1
  4. package/dist/doctor/index.js +13 -0
  5. package/dist/doctor/index.js.map +1 -1
  6. package/dist/doctor/installation.d.ts +1 -1
  7. package/dist/doctor/installation.d.ts.map +1 -1
  8. package/dist/doctor/installation.js +2 -1
  9. package/dist/doctor/installation.js.map +1 -1
  10. package/dist/installer/adaptive-templates.d.ts.map +1 -1
  11. package/dist/installer/adaptive-templates.js +4 -0
  12. package/dist/installer/adaptive-templates.js.map +1 -1
  13. package/dist/installer/capabilities-script.d.ts.map +1 -1
  14. package/dist/installer/capabilities-script.js +13 -3
  15. package/dist/installer/capabilities-script.js.map +1 -1
  16. package/dist/installer/init.js +1 -1
  17. package/dist/installer/init.js.map +1 -1
  18. package/dist/installer/opencode-config.d.ts +3 -3
  19. package/dist/installer/opencode-config.js +1 -1
  20. package/dist/installer/upgrade.js +1 -1
  21. package/dist/installer/upgrade.js.map +1 -1
  22. package/dist/queue/executor.d.ts.map +1 -1
  23. package/dist/queue/executor.js +5 -0
  24. package/dist/queue/executor.js.map +1 -1
  25. package/dist/queue/queue.js +1 -1
  26. package/dist/queue/queue.js.map +1 -1
  27. package/docs/GRADLE-6.7.1.md +113 -0
  28. package/docs/MIGRATION.md +36 -14
  29. package/docs/QUEUE.md +3 -3
  30. package/docs/SECURITY.md +1 -1
  31. package/docs/TROUBLESHOOTING.md +7 -8
  32. package/package.json +1 -1
  33. package/templates/.opencode/skills/scheduled-quality-coder/SKILL.md +8 -1
  34. package/templates/.opencode/skills/scheduled-quality-reviewer/SKILL.md +6 -2
  35. package/templates/automation/task-contract.schema.json +88 -2
  36. package/templates/automation/tasks/TASK-TEMPLATE.json.example +5 -4
  37. package/templates/automation/verification/collect.init.gradle +60 -36
  38. package/templates/automation/verification/contract.cjs +28 -2
  39. package/templates/automation/verification/inventory.cjs +113 -10
  40. package/templates/automation/verification/project.cjs +58 -0
  41. package/templates/automation/verification/recovery.cjs +2 -3
  42. package/templates/automation/verification/runtime.init.gradle +58 -0
  43. package/templates/scripts/automation/acceptance-report.sh +2 -2
  44. package/templates/scripts/automation/status.sh +3 -0
@@ -0,0 +1,58 @@
1
+ // Executed by the selected wrapper inside its actual build JVM, after Gradle
2
+ // has applied org.gradle.java.home and configured the project's plugins.
3
+ gradle.projectsEvaluated {
4
+ def readOptional = { owner, name ->
5
+ try { return owner."$name" }
6
+ catch (groovy.lang.MissingPropertyException absent) {
7
+ if (absent.property != name) throw absent
8
+ return null
9
+ }
10
+ }
11
+ def plugins = []
12
+ def tests = []
13
+ gradle.rootProject.allprojects.toList().sort { it.path }.each { p ->
14
+ ['com.android.application', 'com.android.library', 'com.android.dynamic-feature',
15
+ 'com.android.test', 'org.jetbrains.kotlin.android', 'kotlin-android', 'org.jetbrains.kotlin.jvm'].each { id ->
16
+ def plugin = p.plugins.findPlugin(id)
17
+ if (plugin != null) {
18
+ def source = plugin.class.protectionDomain?.codeSource?.location
19
+ def artifact = source?.protocol == 'file' ? new File(source.toURI()) : null
20
+ def checksum = null
21
+ if (artifact?.isFile()) {
22
+ def digest = java.security.MessageDigest.getInstance('SHA-256')
23
+ artifact.withInputStream { input ->
24
+ byte[] bytes = new byte[65536]
25
+ int count
26
+ while ((count = input.read(bytes)) > 0) digest.update(bytes, 0, count)
27
+ }
28
+ checksum = digest.digest().encodeHex().toString()
29
+ }
30
+ def pluginVersion = plugin.class.getPackage()?.implementationVersion
31
+ if (id.startsWith('com.android.')) {
32
+ for (def className : ['com.android.Version', 'com.android.builder.model.Version']) {
33
+ try {
34
+ pluginVersion = Class.forName(className, false, plugin.class.classLoader).getField('ANDROID_GRADLE_PLUGIN_VERSION').get(null)?.toString()
35
+ break
36
+ } catch (ClassNotFoundException ignored) {
37
+ } catch (NoSuchFieldException ignored) {
38
+ }
39
+ }
40
+ }
41
+ plugins.add([project:p.path, id:id, implementation:plugin.class.name,
42
+ version:pluginVersion, artifactSha256:checksum])
43
+ }
44
+ }
45
+ p.tasks.withType(org.gradle.api.tasks.testing.Test).each { t ->
46
+ def launcher = readOptional(t, 'javaLauncher')
47
+ def metadata = launcher?.orNull?.metadata
48
+ def executable = t.executable ?: launcher?.orNull?.executablePath?.asFile?.path ?: new File(System.getProperty('java.home'), 'bin/java').path
49
+ tests.add([task:t.path, executable:new File(executable).canonicalPath,
50
+ languageVersion:metadata?.languageVersion?.toString(), vendor:metadata?.vendor?.toString()])
51
+ }
52
+ }
53
+ println('ORCHESTRATOR_BUILD_RUNTIME=' + groovy.json.JsonOutput.toJson([
54
+ version:1, gradleVersion:gradle.gradleVersion, javaVersion:System.getProperty('java.version'),
55
+ javaHome:new File(System.getProperty('java.home')).canonicalPath, javaVendor:System.getProperty('java.vendor'),
56
+ plugins:plugins, tests:tests.sort { it.task }
57
+ ]))
58
+ }
@@ -38,9 +38,9 @@ if [[ "$(jq -er '.schemaVersion' "$contract")" -ge "4" ]]; then
38
38
  '{valid: $green[0].valid, baseline: $baseline[0].summary,
39
39
  red: {summary: $manifest[0].summary, processExitCode: $red[0].processExitCode,
40
40
  expectedFailureCount: $red[0].expectedFailureCount, exitCodeMeaning: $red[0].exitCodeMeaning},
41
- green: $green[0].summary, binding: $green[0].binding,
41
+ green: $green[0].summary, binding: $green[0].binding, runtime: $green[0].runtime, supplementSha256: $green[0].supplementSha256,
42
42
  verifiedHead: $green[0].verifiedHead, worktreeSha256: $green[0].worktreeSha256,
43
- cases: [$manifest[0].cases[] | {id, taskPath, className, name, classification, intent, allowSkip}] }')"
43
+ cases: [$green[0].cases[] | {id, taskPath, className, name, classification, intent, allowSkip}] }')"
44
44
  fi
45
45
  if [[ "$(jq -er '.schemaVersion' "$contract")" == "3" ]]; then
46
46
  preflight_file="$evidence_dir/test-preflight.json"
@@ -22,6 +22,7 @@ origin_json="$(if [[ -f "$origin_file" ]]; then jq -c . "$origin_file"; else pri
22
22
  baseline_json="$(if [[ -f "$evidence_dir/baseline.json" ]]; then jq -c . "$evidence_dir/baseline.json"; else printf 'null'; fi)"
23
23
  red_json="$(if [[ -f "$evidence_dir/red.json" ]]; then jq -c . "$evidence_dir/red.json"; else printf 'null'; fi)"
24
24
  preflight_json="$(if [[ -f "$evidence_dir/test-preflight.json" ]]; then jq -c . "$evidence_dir/test-preflight.json"; else printf 'null'; fi)"
25
+ supplement_json="$(if [[ -f "$evidence_dir/test-supplement.json" ]]; then jq -c . "$evidence_dir/test-supplement.json"; else printf 'null'; fi)"
25
26
  manifest_json="$(if [[ -f "$evidence_dir/test-manifest.json" ]]; then jq -c . "$evidence_dir/test-manifest.json"; else printf 'null'; fi)"
26
27
  inventory_baseline_json="$(if [[ -f "$evidence_dir/baseline-inventory.json" ]]; then jq -c . "$evidence_dir/baseline-inventory.json"; else printf 'null'; fi)"
27
28
  inventory_green_json="$(if [[ -f "$evidence_dir/green-inventory.json" ]]; then jq -c . "$evidence_dir/green-inventory.json"; else printf 'null'; fi)"
@@ -116,6 +117,7 @@ jq -n \
116
117
  --argjson baseline "$baseline_json" \
117
118
  --argjson red "$red_json" \
118
119
  --argjson testPreflight "$preflight_json" \
120
+ --argjson testSupplement "$supplement_json" \
119
121
  --argjson testManifest "$manifest_json" \
120
122
  --argjson baselineInventory "$inventory_baseline_json" \
121
123
  --argjson greenInventory "$inventory_green_json" \
@@ -150,6 +152,7 @@ jq -n \
150
152
  red: $red,
151
153
  testPreflight: $testPreflight,
152
154
  testManifest: $testManifest,
155
+ testSupplement: $testSupplement,
153
156
  baselineInventory: $baselineInventory,
154
157
  greenInventory: $greenInventory,
155
158
  inventoryStatus: $inventoryStatus,