feat: complete TASK-WP3-03 adapters and contract evidence
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const allowedServices = new Set(["ai", "resend", "amap"]);
|
||||
const allowedServices = new Set(["ai", "ai-gateway-service-id", "resend", "amap"]);
|
||||
|
||||
function argument(name) {
|
||||
const index = process.argv.indexOf(name);
|
||||
@@ -7,17 +7,21 @@ function argument(name) {
|
||||
|
||||
const service = argument("--service");
|
||||
const runId = argument("--run-id");
|
||||
const model = argument("--model");
|
||||
|
||||
if (!allowedServices.has(service) || !runId) {
|
||||
console.error("Usage: pnpm validate:external -- --service <ai|resend|amap> --run-id <id>");
|
||||
if (!allowedServices.has(service) || !runId || ((service === "ai" || service === "ai-gateway-service-id") && !model)) {
|
||||
console.error("Usage: pnpm validate:external -- --service <ai|ai-gateway-service-id|resend|amap> --run-id <id> [--model <model-id>]");
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
console.log(
|
||||
JSON.stringify({
|
||||
blocker: service === "ai" || service === "ai-gateway-service-id" ? "real_gateway_credentials_absent" : undefined,
|
||||
mode: "mock",
|
||||
model,
|
||||
real_calls: 0,
|
||||
run_id: runId,
|
||||
service,
|
||||
status: "not_applicable_for_TASK-WP0-01",
|
||||
status: service === "ai" || service === "ai-gateway-service-id" ? "not_applicable" : "not_applicable_for_TASK-WP0-01",
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user