feat(ai-profiles): add plugin profile SDK and Cline demo (#342)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
14
examples/cline-ai-plugin/tests/helpers/adapter-child.mjs
Normal file
14
examples/cline-ai-plugin/tests/helpers/adapter-child.mjs
Normal file
@ -0,0 +1,14 @@
|
||||
import { fakeProvider } from "./fake-provider.mjs";
|
||||
import { runAdapter } from "../../src/adapter.mjs";
|
||||
|
||||
globalThis.fetch = async () => { throw new Error("live network is forbidden in child QA"); };
|
||||
const provider = fakeProvider({ text: process.argv[3] });
|
||||
await runAdapter({
|
||||
input: process.stdin, output: process.stdout, storageRoot: process.argv[2],
|
||||
fetch: async (...args) => {
|
||||
const response = await provider.fetch(...args);
|
||||
process.send?.({ kind: "providerCall", call: provider.calls.at(-1) });
|
||||
return response;
|
||||
},
|
||||
});
|
||||
process.disconnect?.();
|
||||
Reference in New Issue
Block a user