Summary
AcpApiClient.getActiveJobs() returns OffChainJob[], but the AcpJobApi interface declares getActiveJobs() as returning objects shaped like { chainId: number; onChainJobId: string }[].
Evidence
src/events/acpApiClient.ts implements:
async getActiveJobs(): Promise<OffChainJob[]> {
...
const data = (await res.json()) as { jobs: OffChainJob[] };
return data.jobs || [];
}
src/events/types.ts declares:
getActiveJobs(): Promise<{ chainId: number; onChainJobId: string }[]>;
Why this matters
Consumers typed against AcpJobApi may rely on chainId / onChainJobId, while the concrete implementation returns full backend job records instead. That can cause runtime breakage or force consumers to cast around the SDK types.
Suggested fix
Either update the interface to declare Promise<OffChainJob[]>, or adapt AcpApiClient.getActiveJobs() to map backend jobs into the interface shape.
Suggested regression test
Add a type-level or unit test that asserts AcpApiClient satisfies AcpJobApi with the intended getActiveJobs() result shape.
Found by AntFleet's Virtuals-backed public repo scan using an Opus-first, blind GPT confirmation workflow.
Summary
AcpApiClient.getActiveJobs()returnsOffChainJob[], but theAcpJobApiinterface declaresgetActiveJobs()as returning objects shaped like{ chainId: number; onChainJobId: string }[].Evidence
src/events/acpApiClient.tsimplements:src/events/types.tsdeclares:Why this matters
Consumers typed against
AcpJobApimay rely onchainId/onChainJobId, while the concrete implementation returns full backend job records instead. That can cause runtime breakage or force consumers to cast around the SDK types.Suggested fix
Either update the interface to declare
Promise<OffChainJob[]>, or adaptAcpApiClient.getActiveJobs()to map backend jobs into the interface shape.Suggested regression test
Add a type-level or unit test that asserts
AcpApiClientsatisfiesAcpJobApiwith the intendedgetActiveJobs()result shape.Found by AntFleet's Virtuals-backed public repo scan using an Opus-first, blind GPT confirmation workflow.