fix: improve WhatsApp settings and isolate IM host authentication
Some checks are pending
CI / Test, build, and verify package (push) Waiting to run

This commit is contained in:
oliver 2026-10-11 17:03:38 +08:00
parent bcbe85fdb1
commit bf73b0c0af
28 changed files with 848 additions and 116 deletions

View file

@ -1,3 +1,5 @@
import { runHarnessHostOperation } from './harness-host-context.mjs';
/**
* Adapt the Host's Typert command gateway to the channel Harness client.
* Programmatic production fixtures may omit the gateway and exercise other assembly paths.
@ -20,7 +22,7 @@ export function createHarnessCommandExecutor(ctx, provided) {
signal: options.signal,
};
try {
return await gateway.invoke(request);
return await runHarnessHostOperation(ctx, () => gateway.invoke(request));
} catch (error) {
// Newer Hosts require images; older Hosts reject that field before
// invoking the command. Retry only that exact pre-dispatch failure so
@ -32,10 +34,10 @@ export function createHarnessCommandExecutor(ctx, provided) {
throw error;
}
options.signal?.throwIfAborted();
return gateway.invoke({
return runHarnessHostOperation(ctx, () => gateway.invoke({
...request,
args: { agentId: sessionId, line },
});
}));
}
};
}