mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Fix type errors in server code
- Filter undefined values from env record for Codex SDK - Add string type check for ParsedQs array element 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -498,10 +498,12 @@ export class CodexAgentClient implements AgentClient {
|
||||
mcpBearerToken,
|
||||
developerInstructions ?? ""
|
||||
);
|
||||
const env = {
|
||||
...process.env,
|
||||
...(this.baseOptions.env ?? {}),
|
||||
};
|
||||
const env = Object.fromEntries(
|
||||
Object.entries({
|
||||
...process.env,
|
||||
...(this.baseOptions.env ?? {}),
|
||||
}).filter((entry): entry is [string, string] => entry[1] !== undefined)
|
||||
);
|
||||
|
||||
return {
|
||||
codex: new Codex({
|
||||
|
||||
@@ -215,7 +215,8 @@ async function main() {
|
||||
const callerAgentId =
|
||||
typeof callerAgentIdRaw === "string"
|
||||
? callerAgentIdRaw
|
||||
: Array.isArray(callerAgentIdRaw)
|
||||
: Array.isArray(callerAgentIdRaw) &&
|
||||
typeof callerAgentIdRaw[0] === "string"
|
||||
? callerAgentIdRaw[0]
|
||||
: undefined;
|
||||
transport = await createAgentMcpTransport(callerAgentId);
|
||||
|
||||
Reference in New Issue
Block a user