Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
"@ai-sdk/google": "^3.0.30",
"@ai-sdk/openai": "^3.0.30",
"@alpacahq/alpaca-trade-api": "^3.1.3",
"@anthropic-ai/claude-agent-sdk": "^0.2.72",
"@anthropic-ai/claude-agent-sdk": "^0.3.150",
"@anthropic-ai/sdk": "^0.96.0",
"@grammyjs/auto-retry": "^2.0.2",
"@hono/node-server": "^2.0.0",
"@modelcontextprotocol/sdk": "^1.27.1",
"@modelcontextprotocol/sdk": "^1.29.0",
"@sinclair/typebox": "0.34.48",
"@traderalice/ibkr": "workspace:*",
"@traderalice/opentypebb": "workspace:*",
Expand Down
270 changes: 90 additions & 180 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions scripts/guardian/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

import { resolve } from 'node:path'
import { readdirSync } from 'node:fs'
import type { ChildProcess } from 'node:child_process'
import {
probePorts,
Expand All @@ -39,10 +40,30 @@ async function main(): Promise<void> {
console.log(`[guardian] flag → ${flagPath}`)
console.log('')

// On Windows, the Claude Code CLI (claude.exe) lives in a versioned AppData
// subdirectory that isn't on the system PATH. Agent SDK spawns `claude` as a
// subprocess, so we inject the directory here so every child process can find it.
const claudeCodeDir =
process.platform === 'win32' && process.env['APPDATA']
? (() => {
const base = `${process.env['APPDATA']}\\Claude\\claude-code`
try {
const entries = readdirSync(base) as string[]
const latest = entries.filter((e) => /^\d/.test(e)).sort().at(-1)
return latest ? `${base}\\${latest}` : undefined
} catch {
return undefined
}
})()
: undefined

const baseEnv = {
...process.env,
NODE_OPTIONS: `${process.env['NODE_OPTIONS'] ?? ''} --conditions=openalice-source`.trim(),
OPENALICE_USER_DATA_HOME: dataHome,
...(claudeCodeDir
? { PATH: `${claudeCodeDir}${process.platform === 'win32' ? ';' : ':'}${process.env['PATH'] ?? ''}` }
: {}),
}

// ── UTA spec (re-used by Guardian for restart) ────────────
Expand Down
Loading