fix(pi): resolve packaged proxy token lazily
This commit is contained in:
@@ -102,9 +102,11 @@ describe('PI-100 coding core Host contract', () => {
|
||||
const projectPath = await mkdtemp(path.join(tmpdir(), 'makelore-pi-composition-project-'));
|
||||
const userDataDir = await mkdtemp(path.join(tmpdir(), 'makelore-pi-composition-user-'));
|
||||
roots.push(projectPath, userDataDir);
|
||||
const getLocalProxyCredential = vi.fn(() => 'host-token-after-server-start');
|
||||
const composition = createCodingComposition({
|
||||
storage: createMemoryCodingProjectStorage(),
|
||||
browser: { close: vi.fn(async () => undefined) } as unknown as AgentBrowserModule,
|
||||
getLocalProxyCredential,
|
||||
paths: {
|
||||
executablePath: process.execPath,
|
||||
cliPath: path.join(projectPath, 'unused-cli.js'),
|
||||
@@ -131,10 +133,12 @@ describe('PI-100 coding core Host contract', () => {
|
||||
title: 'Local only',
|
||||
});
|
||||
expect(composition.runtime.getDiagnostics().workers).toEqual([]);
|
||||
expect(getLocalProxyCredential).not.toHaveBeenCalled();
|
||||
expect(await composition.host.listCommands(conversation.id)).toEqual(
|
||||
expect.arrayContaining([expect.objectContaining({ name: 'compact', source: 'makelore' })]),
|
||||
);
|
||||
expect(composition.runtime.getDiagnostics().workers).toEqual([]);
|
||||
expect(getLocalProxyCredential).not.toHaveBeenCalled();
|
||||
} finally {
|
||||
await composition.shutdown();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user