Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
d981d36
Migrate Dict.size from Int64 to Int
OceanOak Jun 15, 2026
ad1b85d
Migrate DB.count and DB.queryCount from Int64 to Int
OceanOak Jun 15, 2026
7e613ce
Migrate Blob.length and Blob.slice from Int64 to Int
OceanOak Jun 15, 2026
bfcee22
Migrate Float rounding fns (and JsonRPC RequestID.Int) from Int64 to Int
OceanOak Jun 16, 2026
8c2a053
Add Int.remainder/mod tests
OceanOak Jun 16, 2026
319166d
Migrate Int.parse error from String to ParseError
OceanOak Jun 16, 2026
80460e0
Migrate Char.toAsciiCode and Char.fromCodepoint from Int64 to Int
OceanOak Jun 16, 2026
2aebd24
Migrate Duration.parse from Int64 to Int and add tests
OceanOak Jun 16, 2026
8337929
Migrate File.size and Dir.size from Int64 to Int
OceanOak Jun 16, 2026
2e7c5cd
Migrate the List index/count cluster andString repeat/charAt/random f…
OceanOak Jun 16, 2026
24cb42f
Migrate opml nodesToOpml depth to Int
OceanOak Jun 16, 2026
5a02848
Migrate navInteractive index/viewport state to Int
OceanOak Jun 16, 2026
8771fce
Migrate String length/index/slice fns from Int64 to Int
OceanOak Jun 17, 2026
e80f21f
Migrate CLI UI numeric layer (terminal dims, layout, selection/cursor…
OceanOak Jun 17, 2026
e61d5e0
Migrate HTTP statusCode/port/maxBodyBytes/maxAge from Int64 to Int
OceanOak Jun 17, 2026
d80619d
Migrate the AltJson + AI/LLM client stack from Int64 to Int
OceanOak Jun 17, 2026
315f1c0
Migrate LLM model/agent token limits from Int64 to Int
OceanOak Jun 17, 2026
74df830
Migrate diff edit-distance table from Int64 to Int
OceanOak Jun 17, 2026
3ea0ecd
Migrate LLM file-search counts to Int and fix provider maxContextTokens
OceanOak Jun 17, 2026
cc67ce6
Migrate SCM package-ops counts from Int64 to Int
OceanOak Jun 17, 2026
c46dc31
Migrate misc CLI/stdlib counts from Int64 to Int
OceanOak Jun 17, 2026
959ce51
Migrate outliner from Int64 to Int
OceanOak Jun 17, 2026
42b2f35
Fix LLM example maxTokens passing Int64 literals to migrated Int param
OceanOak Jun 17, 2026
e9ae787
Migrate caps editors from Int64 to Int
OceanOak Jun 17, 2026
a522afd
Migrate search rank / countMatchingPrefix / Stream.take counts to Int
OceanOak Jun 17, 2026
f6da743
Add JSON Int overflow tests
OceanOak Jun 18, 2026
507a0c7
Migrate package-manager Stats counts from Int64 to Int
OceanOak Jun 18, 2026
5432cc3
Fix Discord embed color Int64/Int mismatch
OceanOak Jun 18, 2026
2b50cb9
Migrate JSON-RPC error codes from Int64 to Int
OceanOak Jun 18, 2026
d04c1ef
Migrate tailscale serve port from Int64 to Int
OceanOak Jun 18, 2026
5376eb4
Migrate ports, config ints, and protocol error codes from Int64 to Int
OceanOak Jun 18, 2026
3a91203
Migrate tracing maxDepth from Int64 to Int
OceanOak Jun 18, 2026
5bfd7fc
Migrate tracing from Int64 to Int
OceanOak Jun 18, 2026
c0f84c9
Migrate LSP TextDocumentItem.version and DiagnosticCode to Int
OceanOak Jun 18, 2026
d68a82c
Migrate CLI TestSummary counts from Int64 to Int
OceanOak Jun 18, 2026
de6313a
Migrate parser Point positions from Int64 to Int
OceanOak Jun 18, 2026
ccfc0c4
Migrate CLI exit codes from Int64 to Int
OceanOak Jun 18, 2026
41ad060
Migrate telemetry timing from Int64 to Int
OceanOak Jun 18, 2026
41af41b
Add Int bitwise builtins
OceanOak Jun 18, 2026
6d39464
Migrate CLI process and POSIX syscall layer from Int64 to Int
OceanOak Jun 18, 2026
97b5dae
Migrate DateTime from Int64 to Int
OceanOak Jun 18, 2026
3ebf9f7
Migrate capability ports, LSP versions, and MCP exit codes from Int64…
OceanOak Jun 18, 2026
b17a95c
Update docs to use Int instead of Int64
OceanOak Jun 18, 2026
ef48269
Migrate LSP Position from Int64 to Int
OceanOak Jun 18, 2026
1aea5d6
Fix capability port conversion build error
OceanOak Jun 18, 2026
e526b3f
Migrate runtime-error integer counts from Int64 to Int
OceanOak Jun 18, 2026
4a74534
Migrate LSP and MCP protocol integers from Int64 to Int
OceanOak Jun 18, 2026
c1ecf28
Migrate LLM Int64 fields to Int
OceanOak Jun 18, 2026
a359de2
Migrate EArg argument index from Int64 to Int
OceanOak Jun 18, 2026
76c77c2
Add Int.random and simplify randomChar
OceanOak Jun 18, 2026
8c4a59a
Migrate reflection/pretty-printer integers from Int64 to Int
OceanOak Jun 18, 2026
d1dd773
Migrate JSON parse-error integers from Int64 to Int
OceanOak Jun 18, 2026
c82d29d
Migrate ESelf recursion/shadowing test from Int64 to Int
OceanOak Jun 18, 2026
11b7371
Add Int to the type-coverage fixture; migrate sample functions to Int
OceanOak Jun 18, 2026
0fa14ae
Migrate TreeItemLabel highlight offsets from Int64 to Int
OceanOak Jun 18, 2026
df86016
Migrate push-notification server main from Int64 to Int
OceanOak Jun 18, 2026
5c22b50
Update example and comment text to use Int
OceanOak Jun 18, 2026
5617f2a
Fix docs signatures resolution and eval help examples
OceanOak Jun 19, 2026
62b29b1
Improve CLI docs for AI
OceanOak Jun 19, 2026
0b1c14f
Fix unchecked Int narrowing and queryability mismatches in builtins
OceanOak Jun 26, 2026
f5ea074
Fix unchecked Int conversions and stale queryability in builtins
OceanOak Jun 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 14 additions & 15 deletions backend/src/Builtins/Builtins.Cli/Libs/Execution.fs
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ let prepareProcessCommand (command : string) : string * string =

/// Creates an ExecutionOutcome record
let createExecutionOutcome
(exitCode : int64)
(exitCode : int)
(stdout : string)
(stderr : string)
: Dval =
let typeName = executionOutcomeTypeName ()
let fields =
[ "exitCode", DInt64 exitCode
[ "exitCode", Dval.int (bigint exitCode)
"stdout", DString stdout
"stderr", DString stderr ]
DRecord(typeName, typeName, [], Map fields)
Expand Down Expand Up @@ -223,7 +223,7 @@ let fns () : List<BuiltInFn> =
description = "Spawns an interactive process and returns a handle ID"
typeParams = []
parameters = [ Param.make "command" TString "The command to execute" ]
returnType = TInt64
returnType = TInt
fn =
function
| _, _, _, [ DString command ] ->
Expand Down Expand Up @@ -256,7 +256,7 @@ let fns () : List<BuiltInFn> =
ErrorBuffer = "" }

processHandles.TryAdd(processId, processInfo) |> ignore<bool>
DInt64 processId |> Ply
Dval.int (bigint processId) |> Ply
| _ -> incorrectArgs ()
sqlSpec = NotQueryable
previewable = Impure
Expand All @@ -268,15 +268,16 @@ let fns () : List<BuiltInFn> =
description = "Send input to process and read available output (non-blocking)"
typeParams = []
parameters =
[ Param.make "processId" TInt64 "The process handle ID"
[ Param.make "processId" TInt "The process handle ID"
Param.make "input" TString "The input to send (empty string to just read)" ]
returnType =
let typeName =
FQTypeName.fqPackage (PackageRefs.Type.Stdlib.Cli.executionOutcome ())
TCustomType(NR.ok typeName, [])
fn =
function
| _, _, _, [ DInt64 processId; DString input ] ->
| _, vm, _, [ DInt processIdArg; DString input ] ->
let processId = intToInt64 vm processIdArg
match processHandles.TryGetValue processId with
| true, processInfo when not processInfo.Process.HasExited ->
try
Expand Down Expand Up @@ -361,9 +362,9 @@ let fns () : List<BuiltInFn> =
createExecutionOutcome exitCode (stdout.ToString()) (stderr.ToString())
|> Ply
with ex ->
createExecutionOutcome -1L "" $"Process IO error: {ex.Message}" |> Ply
createExecutionOutcome -1 "" $"Process IO error: {ex.Message}" |> Ply
| _ ->
createExecutionOutcome -1L "" "Process not found or has exited" |> Ply
createExecutionOutcome -1 "" "Process not found or has exited" |> Ply
| _ -> incorrectArgs ()
sqlSpec = NotQueryable
previewable = Impure
Expand All @@ -374,14 +375,15 @@ let fns () : List<BuiltInFn> =
{ name = fn "cliTerminateProcess" 0
description = "Terminates a spawned process and returns final output"
typeParams = []
parameters = [ Param.make "processId" TInt64 "The process handle ID" ]
parameters = [ Param.make "processId" TInt "The process handle ID" ]
returnType =
let typeName =
FQTypeName.fqPackage (PackageRefs.Type.Stdlib.Cli.executionOutcome ())
TCustomType(NR.ok typeName, [])
fn =
function
| _, _, _, [ DInt64 processId ] ->
| _, vm, _, [ DInt processIdArg ] ->
let processId = intToInt64 vm processIdArg
match processHandles.TryGetValue processId with
| true, processInfo ->
try
Expand Down Expand Up @@ -412,12 +414,9 @@ let fns () : List<BuiltInFn> =
createExecutionOutcome exitCode finalStdout finalStderr |> Ply
with ex ->
processHandles.TryRemove processId |> ignore<bool * ProcessInfo>
createExecutionOutcome
-1L
""
$"Process termination error: {ex.Message}"
createExecutionOutcome -1 "" $"Process termination error: {ex.Message}"
|> Ply
| false, _ -> createExecutionOutcome -1L "" "Process not found" |> Ply
| false, _ -> createExecutionOutcome -1 "" "Process not found" |> Ply
| _ -> incorrectArgs ()
sqlSpec = NotQueryable
previewable = Impure
Expand Down
Loading