Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .motoko/config/local/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"agent": {
"model": "openai/deepseek-v4-flash",
"workdir": ".",
"max_steps": 50,
"max_steps": 500,
"step_delay_ms": 0,
"max_retries": 3,
"retry_base_ms": 1000,
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ run: build
install:
./scripts/install-prerequisites.sh

# Install all prerequisites (Go, Bun, Node, context-mode, AILANG, TUI deps, Lean 4)
install_with_lean:
./scripts/install-prerequisites.sh --with-lean

# Run all core runtime module tests
test_core:
@echo "Running src/core/agents_md.ail tests..."
Expand Down
9 changes: 9 additions & 0 deletions src/tui/src/env-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,14 @@ export async function startEnvServer(port: number, workdir: string): Promise<num
]) || "lake";
}

function leanEnv(): Record<string, string> {
const elanBin = join(String(process.env.HOME ?? ""), ".elan", "bin");
const currentPath = String(process.env.PATH ?? "");
return existsSync(elanBin) && !currentPath.split(":").includes(elanBin)
? { PATH: `${elanBin}:${currentPath}` }
: {};
}

function projectRootForReplBin(bin: string): string {
// <project>/.lake/build/bin/repl -> <project>
const marker = "/.lake/build/bin/repl";
Expand Down Expand Up @@ -834,6 +842,7 @@ export async function startEnvServer(port: number, workdir: string): Promise<num
command: replBin || lake,
args: replBin ? splitArgs(process.env.MOTOKO_LEAN_REPL_ARGS, []) : splitArgs(process.env.MOTOKO_LEAN_REPL_ARGS, ["exe", "repl"]),
cwd: replCwd || undefined,
env: leanEnv(),
mathlibCommand: mathlibCwd && mathlibReplBin ? lake : (mathlibBin || (replBin || lake)),
mathlibArgs: mathlibCwd && mathlibReplBin
? splitArgs(process.env.MOTOKO_LEAN_MATHLIB_REPL_ARGS, ["env", mathlibReplBin])
Expand Down
Loading