feat: 接入 AgentRun v0.1 adapter

This commit is contained in:
Codex
2026-06-01 17:06:11 +08:00
parent 923fcf6e92
commit 3d10fd275b
11 changed files with 1107 additions and 18 deletions
+4 -15
View File
@@ -115,8 +115,7 @@ async function run() {
"box.capability.report",
"hardware.operation.request",
"hardware.invoke.shell",
"audit.event.query",
"evidence.record.query"
"audit.event.query"
]) {
assert.ok(v1.body.methods.includes(method), `missing ${method}`);
}
@@ -131,7 +130,7 @@ async function run() {
projectId,
gatewaySessionId,
gatewayId: "gtw_cloud-api-runtime-smoke",
serviceId: "hwlab-gateway-simu",
serviceId: "hwlab-gateway",
endpoint: "http://127.0.0.1:7101"
});
assert.equal(gateway.registered, true);
@@ -178,10 +177,7 @@ async function run() {
assert.equal(invoke.operation.status, "accepted");
assert.equal(invoke.dispatch.shellExecuted, false);
assert.equal(invoke.dispatch.dispatchStatus, "not_connected");
assert.equal(invoke.evidenceRecord.kind, "trace");
assert.equal(invoke.evidenceRecord.serviceId, "hwlab-cloud-api");
assert.match(invoke.evidenceRecord.sha256, /^[a-f0-9]{64}$/);
logOk("hardware invoke shell degraded dispatch with evidence");
logOk("hardware invoke shell degraded dispatch");
const audit = await rpc(baseUrl, "req_cloud_api_runtime_audit_query", "audit.event.query", {
projectId
@@ -191,14 +187,7 @@ async function run() {
assert.ok(audit.events.every((event) => event.environment === ENVIRONMENT_DEV));
assert.ok(audit.events.some((event) => event.action === "hardware.operation.request"));
assert.ok(audit.events.some((event) => event.action === "hardware.invoke.shell"));
const evidence = await rpc(baseUrl, "req_cloud_api_runtime_evidence_query", "evidence.record.query", {
projectId
});
assert.equal(evidence.count, 1);
assert.equal(evidence.records[0].operationId, invoke.operationId);
assert.equal(evidence.records[0].metadata.dispatchStatus, "not_connected");
logOk("audit/evidence query shape");
logOk("audit query shape");
process.stdout.write("[cloud-api-runtime-smoke] passed\n");
} finally {