@frankzhang2026/opencode-android-orchestrator 0.10.0 → 1.0.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.
- package/CHANGELOG.md +28 -0
- package/README.md +48 -51
- package/dist/cli.js +14 -1
- package/dist/cli.js.map +1 -1
- package/dist/config/android-sdk.d.ts +10 -0
- package/dist/config/android-sdk.d.ts.map +1 -0
- package/dist/config/android-sdk.js +50 -0
- package/dist/config/android-sdk.js.map +1 -0
- package/dist/config/queue-policy.d.ts +12 -0
- package/dist/config/queue-policy.d.ts.map +1 -0
- package/dist/config/queue-policy.js +18 -0
- package/dist/config/queue-policy.js.map +1 -0
- package/dist/config/verification-policy.d.ts +8 -3
- package/dist/config/verification-policy.d.ts.map +1 -1
- package/dist/config/verification-policy.js +48 -14
- package/dist/config/verification-policy.js.map +1 -1
- package/dist/doctor/index.d.ts.map +1 -1
- package/dist/doctor/index.js +3 -49
- package/dist/doctor/index.js.map +1 -1
- package/dist/doctor/installation.d.ts.map +1 -1
- package/dist/doctor/installation.js +3 -0
- package/dist/doctor/installation.js.map +1 -1
- package/dist/installer/adaptive-templates.d.ts +3 -1
- package/dist/installer/adaptive-templates.d.ts.map +1 -1
- package/dist/installer/adaptive-templates.js +2 -0
- package/dist/installer/adaptive-templates.js.map +1 -1
- package/dist/installer/install-manifest.d.ts +1 -0
- package/dist/installer/install-manifest.d.ts.map +1 -1
- package/dist/installer/install-manifest.js +6 -1
- package/dist/installer/install-manifest.js.map +1 -1
- package/dist/installer/opencode-config.d.ts +3 -3
- package/dist/installer/opencode-config.d.ts.map +1 -1
- package/dist/installer/opencode-config.js +1 -1
- package/dist/installer/opencode-config.js.map +1 -1
- package/dist/installer/uninstall.d.ts.map +1 -1
- package/dist/installer/uninstall.js +5 -0
- package/dist/installer/uninstall.js.map +1 -1
- package/dist/installer/upgrade.d.ts.map +1 -1
- package/dist/installer/upgrade.js +13 -1
- package/dist/installer/upgrade.js.map +1 -1
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +11 -5
- package/dist/plugin/index.js.map +1 -1
- package/dist/queue/approvals.d.ts +49 -0
- package/dist/queue/approvals.d.ts.map +1 -0
- package/dist/queue/approvals.js +68 -0
- package/dist/queue/approvals.js.map +1 -0
- package/dist/queue/cli.d.ts +3 -0
- package/dist/queue/cli.d.ts.map +1 -0
- package/dist/queue/cli.js +115 -0
- package/dist/queue/cli.js.map +1 -0
- package/dist/queue/executor.d.ts +24 -0
- package/dist/queue/executor.d.ts.map +1 -0
- package/dist/queue/executor.js +445 -0
- package/dist/queue/executor.js.map +1 -0
- package/dist/queue/lifecycle.d.ts +3 -0
- package/dist/queue/lifecycle.d.ts.map +1 -0
- package/dist/queue/lifecycle.js +24 -0
- package/dist/queue/lifecycle.js.map +1 -0
- package/dist/queue/queue.d.ts +171 -0
- package/dist/queue/queue.d.ts.map +1 -0
- package/dist/queue/queue.js +506 -0
- package/dist/queue/queue.js.map +1 -0
- package/dist/queue/service.d.ts +15 -0
- package/dist/queue/service.d.ts.map +1 -0
- package/dist/queue/service.js +152 -0
- package/dist/queue/service.js.map +1 -0
- package/dist/queue/storage.d.ts +32 -0
- package/dist/queue/storage.d.ts.map +1 -0
- package/dist/queue/storage.js +180 -0
- package/dist/queue/storage.js.map +1 -0
- package/dist/queue/tools.d.ts +12 -0
- package/dist/queue/tools.d.ts.map +1 -0
- package/dist/queue/tools.js +155 -0
- package/dist/queue/tools.js.map +1 -0
- package/docs/MIGRATION.md +32 -11
- package/docs/QUEUE.md +151 -0
- package/docs/SECURITY.md +38 -31
- package/docs/TROUBLESHOOTING.md +34 -11
- package/package.json +1 -1
- package/templates/.opencode/agents/scheduled-planner.md +64 -131
- package/templates/.opencode/commands/abort-task.md +6 -15
- package/templates/.opencode/commands/acceptance.md +6 -15
- package/templates/.opencode/commands/change.md +3 -1
- package/templates/.opencode/commands/resume-review.md +6 -14
- package/templates/.opencode/commands/resume-task.md +6 -23
- package/templates/.opencode/skills/scheduled-quality-orchestrator/SKILL.md +72 -248
- package/templates/AGENTS.md.fragment +8 -0
- package/templates/automation/config.json +8 -2
- package/templates/automation/config.schema.json +218 -46
- package/templates/scripts/automation/abort-task.sh +2 -1
- package/templates/scripts/automation/accept-and-integrate.sh +5 -0
- package/templates/scripts/automation/acceptance-report.sh +4 -2
- package/templates/scripts/automation/approve-and-run.sh +4 -0
- package/templates/scripts/automation/begin-review.sh +1 -0
- package/templates/scripts/automation/block-task.sh +1 -0
- package/templates/scripts/automation/claim-task.sh +1 -0
- package/templates/scripts/automation/lib.sh +94 -1
- package/templates/scripts/automation/orchestrate-task.sh +11 -0
- package/templates/scripts/automation/preflight.sh +14 -4
- package/templates/scripts/automation/prepare-contract-review.sh +4 -0
- package/templates/scripts/automation/quality-gate.sh +1 -0
- package/templates/scripts/automation/record-red.sh +1 -0
- package/templates/scripts/automation/resume-review-fix.sh +1 -0
- package/templates/scripts/automation/resume-review.sh +1 -0
- package/templates/scripts/automation/resume-task.sh +1 -0
- package/templates/scripts/automation/scope-gate.sh +10 -2
- package/templates/scripts/automation/submit-review.sh +8 -2
- package/templates/scripts/automation/verify-task.sh +13 -0
|
@@ -14,6 +14,10 @@ fi
|
|
|
14
14
|
|
|
15
15
|
automation_validate_task_id "$task_id"
|
|
16
16
|
automation_require_orchestrated
|
|
17
|
+
[[ "$(automation_config_value '.schemaVersion')" != "6" ]] || {
|
|
18
|
+
automation_die "use android_orchestrator_intake draft to seal artifacts in the independent inbox"
|
|
19
|
+
exit 1
|
|
20
|
+
}
|
|
17
21
|
automation_require_approval proposal "$approval"
|
|
18
22
|
automation_assert_repository_lease_available "$task_id"
|
|
19
23
|
"$SCRIPT_DIR/validate-contract.sh" "$task_id" >/dev/null
|
|
@@ -8,6 +8,7 @@ source "$SCRIPT_DIR/lib.sh"
|
|
|
8
8
|
task_id="${1:-}"
|
|
9
9
|
[[ -n "$task_id" ]] || { printf 'Usage: %s TASK-ID\n' "$0" >&2; exit 2; }
|
|
10
10
|
automation_validate_task_id "$task_id"
|
|
11
|
+
automation_require_queue_execution "$task_id"
|
|
11
12
|
[[ "$(automation_read_state "$task_id")" == "CODING" ]] || automation_die "$task_id is not CODING"
|
|
12
13
|
"$SCRIPT_DIR/validate-contract.sh" "$task_id" >/dev/null
|
|
13
14
|
|
|
@@ -16,6 +16,7 @@ if [[ -z "$task_id" || -z "$expected" || "$separator" != "--" || -z "$filter" ||
|
|
|
16
16
|
fi
|
|
17
17
|
|
|
18
18
|
automation_validate_task_id "$task_id"
|
|
19
|
+
automation_require_queue_execution "$task_id"
|
|
19
20
|
automation_validate_test_filter "$filter"
|
|
20
21
|
[[ ${#expected} -ge 3 ]] || automation_die "expected failure text is too short"
|
|
21
22
|
[[ "$(automation_read_state "$task_id")" == "CODING" ]] || automation_die "$task_id is not CODING"
|
|
@@ -8,6 +8,7 @@ source "$SCRIPT_DIR/lib.sh"
|
|
|
8
8
|
task_id="${1:-}"
|
|
9
9
|
[[ "$#" -eq 1 ]] || { printf 'Usage: %s TASK-ID\n' "$0" >&2; exit 2; }
|
|
10
10
|
automation_validate_task_id "$task_id"
|
|
11
|
+
automation_require_queue_execution "$task_id"
|
|
11
12
|
[[ "$(automation_read_state "$task_id")" == "CHANGES_REQUESTED" ]] || automation_die "$task_id is not CHANGES_REQUESTED"
|
|
12
13
|
|
|
13
14
|
workspace_file="$(automation_workspace_path "$task_id")"
|
|
@@ -8,6 +8,7 @@ source "$SCRIPT_DIR/lib.sh"
|
|
|
8
8
|
task_id="${1:-}"
|
|
9
9
|
[[ "$#" -eq 1 ]] || { printf 'Usage: %s TASK-ID\n' "$0" >&2; exit 2; }
|
|
10
10
|
automation_validate_task_id "$task_id"
|
|
11
|
+
automation_require_queue_execution "$task_id"
|
|
11
12
|
automation_require_orchestrated
|
|
12
13
|
|
|
13
14
|
workspace_file="$(automation_workspace_path "$task_id")"
|
|
@@ -17,9 +17,17 @@ baseline_meta="$evidence_dir/baseline.json"
|
|
|
17
17
|
|
|
18
18
|
baseline_head="$(jq -er '.head' "$baseline_meta")"
|
|
19
19
|
current_head="$(git -C "$AUTOMATION_ROOT" rev-parse HEAD)"
|
|
20
|
-
[[ "$baseline_head" == "$current_head" ]] || { automation_die "HEAD changed after baseline"; exit 40; }
|
|
21
|
-
|
|
22
20
|
workspace_file="$(automation_workspace_path "$task_id")"
|
|
21
|
+
if [[ "$baseline_head" != "$current_head" ]]; then
|
|
22
|
+
automation_require_queue_execution "$task_id"
|
|
23
|
+
jq -e --arg original "$baseline_head" --arg current "$current_head" \
|
|
24
|
+
'.queueKey != null and .workspaceStrategy == "isolatedWorktree" and
|
|
25
|
+
.originalBaselineHead == $original and .baselineHead == $current and
|
|
26
|
+
.revalidationRunId != null' "$workspace_file" >/dev/null || {
|
|
27
|
+
automation_die "HEAD changed after baseline"
|
|
28
|
+
exit 40
|
|
29
|
+
}
|
|
30
|
+
fi
|
|
23
31
|
planning_commit_policy="$(jq -r '.planningArtifactsCommitPolicy // "legacyCommittedSeparately"' "$workspace_file")"
|
|
24
32
|
if [[ "$planning_commit_policy" == "withProductChanges" ]]; then
|
|
25
33
|
automation_assert_planning_artifacts_sealed "$task_id" "$AUTOMATION_ROOT" || exit 40
|
|
@@ -16,6 +16,7 @@ if [[ -z "$task_id" || -z "$decision" || -z "$summary" ]]; then
|
|
|
16
16
|
fi
|
|
17
17
|
|
|
18
18
|
automation_validate_task_id "$task_id"
|
|
19
|
+
automation_require_queue_execution "$task_id"
|
|
19
20
|
[[ "$decision" == "APPROVED" || "$decision" == "CHANGES_REQUESTED" ]] || automation_die "invalid review decision: $decision"
|
|
20
21
|
[[ ${#summary} -ge 20 ]] || automation_die "review summary must contain at least 20 characters"
|
|
21
22
|
[[ "$(automation_read_state "$task_id")" == "REVIEWING" ]] || automation_die "$task_id is not REVIEWING"
|
|
@@ -64,8 +65,13 @@ jq -nc \
|
|
|
64
65
|
| automation_append_json "$evidence_dir/reviews.jsonl"
|
|
65
66
|
|
|
66
67
|
if [[ "$decision" == "APPROVED" ]]; then
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
workspace_file="$(automation_workspace_path "$task_id")"
|
|
69
|
+
if [[ -n "${AUTOMATION_QUEUE_RUN_ID:-}" && "$(jq -r '.commitPolicy // "humanApproval"' "$workspace_file")" == "autoCommit" ]]; then
|
|
70
|
+
automation_transition_state "$task_id" "REVIEWING" "READY_TO_COMMIT" "reviewer" "independent review approved; sealed automatic local commit authorization must be verified"
|
|
71
|
+
else
|
|
72
|
+
automation_transition_state "$task_id" "REVIEWING" "AWAITING_HUMAN" "reviewer" "independent review approved; human acceptance required"
|
|
73
|
+
automation_info "$task_id approved and awaiting human acceptance"
|
|
74
|
+
fi
|
|
69
75
|
else
|
|
70
76
|
automation_transition_state "$task_id" "REVIEWING" "CHANGES_REQUESTED" "reviewer" "$summary"
|
|
71
77
|
automation_warn "$task_id requires changes"
|
|
@@ -30,3 +30,16 @@ if [[ "$(jq -r '.deviceTestsRequired' "$contract")" == "true" ]]; then
|
|
|
30
30
|
fi
|
|
31
31
|
|
|
32
32
|
automation_info "all deterministic verification commands passed"
|
|
33
|
+
if [[ -n "${AUTOMATION_QUEUE_RUN_ID:-}" ]]; then
|
|
34
|
+
[[ -n "${AUTOMATION_FULL_TEST_LOG:-}" ]] || automation_die "fresh full unit-test evidence is missing"
|
|
35
|
+
jq -n \
|
|
36
|
+
--arg taskId "$task_id" \
|
|
37
|
+
--arg runId "$AUTOMATION_QUEUE_RUN_ID" \
|
|
38
|
+
--arg diffSha256 "$(automation_worktree_diff_sha)" \
|
|
39
|
+
--arg log "$AUTOMATION_FULL_TEST_LOG" \
|
|
40
|
+
--argjson elapsedSeconds "$AUTOMATION_FULL_TEST_ELAPSED" \
|
|
41
|
+
--argjson tasks "$(jq -c '.gradleVerification.fullUnitTestTasks' "$AUTOMATION_CONFIG")" \
|
|
42
|
+
'{taskId: $taskId, runId: $runId, diffSha256: $diffSha256,
|
|
43
|
+
fullTestsExecuted: true, tasks: $tasks, log: $log, elapsedSeconds: $elapsedSeconds}' \
|
|
44
|
+
| automation_record_json "$evidence_dir/full-test-verification.json"
|
|
45
|
+
fi
|