feat(android): add opt-in package summaries and retained manifest views

Add explicit package summary delivery and exact retained manifest pages while preserving complete MCP defaults, one-shot CLI output, provider requests, source identity and session lifetime. Return distinct linked Evidence and preserve partial/null facts; reject unavailable retention before engine work.

Validation: 27 relevant SDK/domain/Android boundary checks, focused test-only correction rerun, full supported compiler/lint and docs checks, real NewPipe SDK pairs, authentic old Evidence continuation, four actual Codex trials with failures/regressions retained, and all 39 exact-head CI checks. Package replies shrink 119,527 to 8,659 bytes; no model-token or time gain is established.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
Ysopwnable
2026-10-13 10:21:53 +08:00
committed by GitHub
co-authored by factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent ca2d15b3ee
commit f254f5ac2b
14 changed files with 777 additions and 11 deletions
+40 -4
View File
@@ -666,7 +666,40 @@ const workflows = {
}
},
"newpipe.apk": async () => {
const pkg = await call("inspect_android_package", { path: values.path });
const packageInput = {
path: values.path,
...(values.delivery === "summary" ? { detail: "summary" } : {}),
};
const definition = catalogDefinitions.get("inspect_android_package");
if (
definition === undefined ||
!new Ajv2020({ strict: false, validateFormats: false }).validate(
definition.inputSchema,
packageInput,
)
)
throw new Error(
"Selected Android delivery is not advertised by this runtime",
);
const pkg = await call("inspect_android_package", packageInput);
const result = normalized(pkg);
const report = values.delivery === "summary" ? result.summary : result;
if (
values.delivery === "summary" &&
(result.kind !== "summary" ||
result.parent_operation !== "inspect_android_package")
)
throw new Error("Runtime returned no retained Android package summary");
const { manifest, ...declarations } = report;
const manifestObservation =
values.delivery === "summary"
? manifest
: {
status: manifest.status,
reported_total_bytes: manifest.reported_total_bytes,
text_code_units: manifest.text.length,
text_included: false,
};
const found = await call("search_android_classes", {
path: values.path,
query: "MainActivity",
@@ -677,9 +710,12 @@ const workflows = {
});
return {
artifact_sha256: targetSha(pkg),
package_name: normalized(pkg).package_name,
version_name: normalized(pkg).version_name,
version_code: normalized(pkg).version_code,
package_name: report.package_name,
version_name: report.version_name,
version_code: report.version_code,
package_declarations: declarations,
manifest_observation: manifestObservation,
package_limitations: pkg.limitations,
matches: normalized(found).matches,
coverage: normalized(found).coverage,
onCreate: normalized(cls).methods.filter(