feat: package vscode skill target
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"platform": "vscode",
|
||||
"canonical_metadata": "agents/interface.yaml",
|
||||
"required_generated_file": "targets/vscode/README.md",
|
||||
"required_fields": [
|
||||
"canonical_format",
|
||||
"activation_mode",
|
||||
"execution_context",
|
||||
"shell",
|
||||
"trust_level",
|
||||
"remote_inline_execution",
|
||||
"degradation_strategy",
|
||||
"portability_profile",
|
||||
"job_to_be_done",
|
||||
"ir_source",
|
||||
"ir_schema_version",
|
||||
"semantic_contract",
|
||||
"semantic_parity",
|
||||
"compiler",
|
||||
"compiled_contract",
|
||||
"permission_contract",
|
||||
"target_permission_contract",
|
||||
"target_native_contract",
|
||||
"target_transform"
|
||||
]
|
||||
}
|
||||
@@ -39,6 +39,8 @@ def main() -> None:
|
||||
"claude",
|
||||
"--platform",
|
||||
"generic",
|
||||
"--platform",
|
||||
"vscode",
|
||||
"--expectations",
|
||||
str(EXPECTATIONS),
|
||||
"--output-dir",
|
||||
@@ -54,7 +56,7 @@ def main() -> None:
|
||||
raise SystemExit(proc.returncode)
|
||||
|
||||
failures = []
|
||||
for name in ("openai", "claude", "generic"):
|
||||
for name in ("openai", "claude", "generic", "vscode"):
|
||||
snapshot = json.loads((SNAPSHOTS / f"{name}_adapter.json").read_text(encoding="utf-8"))
|
||||
adapter = json.loads((TMP / "targets" / name / "adapter.json").read_text(encoding="utf-8"))
|
||||
if adapter.get("platform") != snapshot["platform"]:
|
||||
@@ -152,6 +154,10 @@ def main() -> None:
|
||||
readme = (TMP / "targets" / "claude" / "README.md").read_text(encoding="utf-8")
|
||||
if "Native surface:" not in readme or "Activation:" not in readme:
|
||||
failures.append(f"{name}: generated README does not describe native behavior")
|
||||
if name == "vscode":
|
||||
readme = (TMP / "targets" / "vscode" / "README.md").read_text(encoding="utf-8")
|
||||
if "VS Code / Copilot Agent Skills Package" not in readme or "workspace trust" not in readme:
|
||||
failures.append(f"{name}: generated README does not describe VS Code install and trust behavior")
|
||||
|
||||
report = {"ok": not failures, "failures": failures}
|
||||
print(json.dumps(report, ensure_ascii=False, indent=2))
|
||||
|
||||
@@ -44,6 +44,8 @@ def main() -> None:
|
||||
"claude",
|
||||
"--target",
|
||||
"generic",
|
||||
"--target",
|
||||
"vscode",
|
||||
"--output-json",
|
||||
str(output_json),
|
||||
"--output-md",
|
||||
@@ -54,13 +56,13 @@ def main() -> None:
|
||||
payload = json.loads(proc.stdout)
|
||||
assert payload["ok"], payload
|
||||
assert payload["schema_version"] == "1.0", payload
|
||||
assert payload["summary"]["target_count"] == 3, payload
|
||||
assert payload["summary"]["pass_count"] == 3, payload
|
||||
assert payload["summary"]["target_count"] == 4, payload
|
||||
assert payload["summary"]["pass_count"] == 4, payload
|
||||
assert output_json.exists(), output_json
|
||||
assert output_md.exists(), output_md
|
||||
assert "Compiled Targets" in output_md.read_text(encoding="utf-8")
|
||||
by_target = {item["target"]: item for item in payload["targets"]}
|
||||
for target in ("openai", "claude", "generic"):
|
||||
for target in ("openai", "claude", "generic", "vscode"):
|
||||
item = by_target[target]
|
||||
assert item["compiler"]["name"] == "yao-skill-ir-compiler", item
|
||||
assert item["compiler"]["source"] == "skill-ir", item
|
||||
|
||||
@@ -40,6 +40,8 @@ def build_package(out_dir: Path) -> dict:
|
||||
"claude",
|
||||
"--platform",
|
||||
"generic",
|
||||
"--platform",
|
||||
"vscode",
|
||||
"--expectations",
|
||||
str(EXPECTATIONS),
|
||||
"--output-dir",
|
||||
@@ -85,7 +87,7 @@ def main() -> None:
|
||||
assert payload["summary"]["entrypoint_loaded"], payload
|
||||
assert payload["summary"]["manifest_loaded"], payload
|
||||
assert payload["summary"]["interface_loaded"], payload
|
||||
assert payload["summary"]["adapter_count"] == 3, payload
|
||||
assert payload["summary"]["adapter_count"] == 4, payload
|
||||
assert not payload["failures"], payload
|
||||
assert "Install Simulation" in (TMP / "install_simulation.md").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ def build_package(out_dir: Path) -> dict:
|
||||
"claude",
|
||||
"--platform",
|
||||
"generic",
|
||||
"--platform",
|
||||
"vscode",
|
||||
"--expectations",
|
||||
str(EXPECTATIONS),
|
||||
"--output-dir",
|
||||
@@ -84,8 +86,8 @@ def main() -> None:
|
||||
payload = valid["payload"]
|
||||
assert valid["ok"], valid
|
||||
assert payload["ok"], payload
|
||||
assert payload["summary"]["target_count"] == 3, payload
|
||||
assert payload["summary"]["adapter_count"] == 3, payload
|
||||
assert payload["summary"]["target_count"] == 4, payload
|
||||
assert payload["summary"]["adapter_count"] == 4, payload
|
||||
assert payload["summary"]["archive_present"], payload
|
||||
assert payload["summary"]["archive_sha256"], payload
|
||||
assert not payload["failures"], payload
|
||||
|
||||
@@ -59,6 +59,7 @@ def main() -> None:
|
||||
assert package["compatibility"]["openai"] == "pass", package
|
||||
assert package["compatibility"]["claude"] == "pass", package
|
||||
assert package["compatibility"]["generic"] == "pass", package
|
||||
assert package["compatibility"]["vscode"] == "pass", package
|
||||
assert (registry_dir / "index.json").exists(), registry_dir
|
||||
assert (registry_dir / "packages" / "yao-meta-skill.json").exists(), registry_dir
|
||||
assert output_json.exists(), output_json
|
||||
|
||||
@@ -59,6 +59,8 @@ def main() -> None:
|
||||
"claude",
|
||||
"--platform",
|
||||
"generic",
|
||||
"--platform",
|
||||
"vscode",
|
||||
"--expectations",
|
||||
str(ROOT / "evals" / "packaging_expectations.json"),
|
||||
"--output-dir",
|
||||
@@ -266,7 +268,7 @@ def main() -> None:
|
||||
assert "gaps 0" in permission_gate["detail"], permission_gate
|
||||
permission_runtime_gate = next(item for item in payload["gates"] if item["key"] == "permission-runtime")
|
||||
assert permission_runtime_gate["status"] == "pass", permission_runtime_gate
|
||||
assert "metadata fallback 3" in permission_runtime_gate["detail"], permission_runtime_gate
|
||||
assert "metadata fallback 4" in permission_runtime_gate["detail"], permission_runtime_gate
|
||||
assert "native 0" in permission_runtime_gate["detail"], permission_runtime_gate
|
||||
intent_gate = next(item for item in payload["gates"] if item["key"] == "intent-canvas")
|
||||
assert intent_gate["status"] == "pass", intent_gate
|
||||
@@ -300,7 +302,7 @@ def main() -> None:
|
||||
assert full_payload["data"]["review_annotations"]["summary"]["annotation_count"] == 0, full_payload["data"]["review_annotations"]
|
||||
assert full_payload["data"]["compiled_targets"]["summary"]["target_count"] >= 4, full_payload["data"]["compiled_targets"]
|
||||
assert full_payload["data"]["compiled_targets"]["summary"]["block_count"] == 0, full_payload["data"]["compiled_targets"]
|
||||
assert full_payload["data"]["runtime_permissions"]["summary"]["metadata_fallback_count"] == 3, full_payload["data"]["runtime_permissions"]
|
||||
assert full_payload["data"]["runtime_permissions"]["summary"]["metadata_fallback_count"] == 4, full_payload["data"]["runtime_permissions"]
|
||||
assert full_payload["evidence_paths"]["runtime_permissions"] == "reports/runtime_permission_probes.md", full_payload["evidence_paths"]
|
||||
action_keys = {item["gate_key"] for item in full_payload["review_actions"]}
|
||||
assert action_keys == {"output-lab", "review-waivers"}, full_payload["review_actions"]
|
||||
|
||||
@@ -40,6 +40,8 @@ def main() -> None:
|
||||
"claude",
|
||||
"--platform",
|
||||
"generic",
|
||||
"--platform",
|
||||
"vscode",
|
||||
"--expectations",
|
||||
str(ROOT / "evals" / "packaging_expectations.json"),
|
||||
"--output-dir",
|
||||
@@ -65,12 +67,12 @@ def main() -> None:
|
||||
assert probe["ok"], probe
|
||||
payload = probe["payload"]
|
||||
summary = payload["summary"]
|
||||
assert summary["target_count"] == 3, summary
|
||||
assert summary["pass_count"] == 3, summary
|
||||
assert summary["target_count"] == 4, summary
|
||||
assert summary["pass_count"] == 4, summary
|
||||
assert summary["fail_count"] == 0, summary
|
||||
assert summary["native_enforcement_count"] == 0, summary
|
||||
assert summary["metadata_fallback_count"] == 3, summary
|
||||
assert summary["residual_risk_count"] == 3, summary
|
||||
assert summary["metadata_fallback_count"] == 4, summary
|
||||
assert summary["residual_risk_count"] == 4, summary
|
||||
assert payload["expected_capabilities"] == ["file_write", "network", "subprocess"], payload
|
||||
assert {item["assurance"] for item in payload["targets"]} == {"metadata-fallback-explicit"}, payload["targets"]
|
||||
assert (TMP / "runtime_permission_probes.md").exists(), TMP
|
||||
|
||||
@@ -52,6 +52,7 @@ def main() -> None:
|
||||
assert payload["summary"]["declared_bump"] == "minor", payload
|
||||
assert payload["summary"]["recommended_bump"] == "minor", payload
|
||||
assert "agent-skills-compatible" in payload["upgrade_diff"]["added_targets"], payload
|
||||
assert "vscode" in payload["upgrade_diff"]["added_targets"], payload
|
||||
assert output_json.exists(), output_json
|
||||
assert "Upgrade Check" in output_md.read_text(encoding="utf-8"), output_md
|
||||
|
||||
|
||||
@@ -336,9 +336,9 @@ def main() -> None:
|
||||
assert created_skill_ir["schema_version"] == "2.0.0", created_skill_ir
|
||||
assert created_skill_ir["trigger_surface"]["description"], created_skill_ir
|
||||
|
||||
compile_result = run("compile-skill", str(created), "--target", "openai", "--target", "claude", "--target", "generic")
|
||||
compile_result = run("compile-skill", str(created), "--target", "openai", "--target", "claude", "--target", "generic", "--target", "vscode")
|
||||
assert compile_result["ok"], compile_result
|
||||
assert compile_result["payload"]["summary"]["target_count"] == 3, compile_result
|
||||
assert compile_result["payload"]["summary"]["target_count"] == 4, compile_result
|
||||
assert compile_result["payload"]["summary"]["block_count"] == 0, compile_result
|
||||
assert compile_result["payload"]["artifacts"]["markdown"].endswith("reports/compiled_targets.md"), compile_result
|
||||
|
||||
@@ -523,6 +523,8 @@ def main() -> None:
|
||||
"claude",
|
||||
"--platform",
|
||||
"generic",
|
||||
"--platform",
|
||||
"vscode",
|
||||
"--expectations",
|
||||
str(ROOT / "evals" / "packaging_expectations.json"),
|
||||
"--output-dir",
|
||||
@@ -548,7 +550,7 @@ def main() -> None:
|
||||
"2026-06-13",
|
||||
)
|
||||
assert package_verify_result["ok"], package_verify_result
|
||||
assert package_verify_result["payload"]["summary"]["adapter_count"] == 3, package_verify_result
|
||||
assert package_verify_result["payload"]["summary"]["adapter_count"] == 4, package_verify_result
|
||||
assert package_verify_result["payload"]["summary"]["archive_sha256"], package_verify_result
|
||||
|
||||
runtime_permissions_result = run(
|
||||
@@ -562,7 +564,7 @@ def main() -> None:
|
||||
str(tmp_root / "runtime_permission_probes.md"),
|
||||
)
|
||||
assert runtime_permissions_result["ok"], runtime_permissions_result
|
||||
assert runtime_permissions_result["payload"]["summary"]["metadata_fallback_count"] == 3, runtime_permissions_result
|
||||
assert runtime_permissions_result["payload"]["summary"]["metadata_fallback_count"] == 4, runtime_permissions_result
|
||||
assert runtime_permissions_result["payload"]["summary"]["native_enforcement_count"] == 0, runtime_permissions_result
|
||||
|
||||
install_simulate_result = run(
|
||||
@@ -581,7 +583,7 @@ def main() -> None:
|
||||
)
|
||||
assert install_simulate_result["ok"], install_simulate_result
|
||||
assert install_simulate_result["payload"]["summary"]["archive_extracted"], install_simulate_result
|
||||
assert install_simulate_result["payload"]["summary"]["adapter_count"] == 3, install_simulate_result
|
||||
assert install_simulate_result["payload"]["summary"]["adapter_count"] == 4, install_simulate_result
|
||||
|
||||
upgrade_result = run(
|
||||
"upgrade-check",
|
||||
|
||||
Reference in New Issue
Block a user