agentOS API Reference - v0.0.1
Docs
Preparing search index...
createAgentOS
Function createAgentOS
createAgentOS
<
TState
=
undefined
,
TConnParams
=
undefined
,
TConnState
=
undefined
,
TVars
=
undefined
,
TInput
=
undefined
,
TEvents
extends
EventSchemaConfig
=
Record
<
never
,
never
>
,
TQueues
extends
QueueSchemaConfig
=
Record
<
never
,
never
>
,
TUserActions
extends
Actions
<
TState
,
TConnParams
,
TConnState
,
TVars
,
TInput
,
DatabaseProvider
<
RawAccess
>
,
TEvents
,
TQueues
,
>
=
Record
<
never
,
never
>
,
>
(
config
?:
AgentOSActorConfigInput
<
TState
,
TConnParams
,
TConnState
,
TVars
,
TInput
,
TEvents
,
TQueues
,
TUserActions
,
>
,
)
:
ActorDefinition
<
TState
,
TConnParams
,
TConnState
,
TVars
,
TInput
,
DatabaseProvider
<
RawAccess
>
,
TEvents
&
BuiltInEvents
,
TQueues
,
TUserActions
&
{
agents
:
{
list
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
}
;
cancelCronJob
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
cancelPrompt
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
closeProcessStdin
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
closeShell
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
contexts
:
{
delete
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
get
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
list
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
reset
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
createContext
:
(
c
:
ActorContext
,
contextId
:
string
)
=>
Promise
<
any
>
;
createPreviewUrl
:
(
c
:
ActorContext
,
port
:
number
,
ttlSeconds
?:
number
,
)
=>
Promise
<
{
expiresAt
:
number
;
path
:
string
;
port
:
number
;
token
:
any
}
,
>
;
cron
:
{
cancel
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
list
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
schedule
:
(
c
:
ActorContext
,
cronOptions
:
SerializableCronJobOptions
,
)
=>
Promise
<
{
id
:
any
}
>
;
}
;
deleteSession
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
exec
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
execArgv
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
exists
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
expirePreviewUrl
:
(
c
:
ActorContext
,
token
:
string
)
=>
Promise
<
void
>
;
exportRootFilesystem
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
,
)
=>
Promise
<
any
>
;
filesystem
:
{
exists
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
export
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
listMounts
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
mkdir
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
mount
:
(
c
:
ActorContext
,
descriptor
:
DynamicMountDescriptor
,
)
=>
Promise
<
void
>
;
move
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readdir
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readdirEntries
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readdirRecursive
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readFile
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readFiles
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
remove
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
stat
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
unmount
:
(
c
:
ActorContext
,
path
:
string
)
=>
Promise
<
void
>
;
writeFile
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeFiles
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
getProcess
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getSession
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getSessionAgentInfo
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getSessionCapabilities
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
,
)
=>
Promise
<
any
>
;
getSessionConfig
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
httpRequest
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
javascript
:
{
evaluate
:
(
c
:
ActorContext
,
expression
:
string
,
actorOptions
?:
ActorJavaScriptExecutionOptions
,
)
=>
Promise
<
unknown
>
;
execute
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorJavaScriptExecutionOptions
,
)
=>
Promise
<
unknown
>
;
executeFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorLanguageExecutionOptions
,
)
=>
Promise
<
unknown
>
;
npm
:
{
install
:
(
c
:
ActorContext
,
...
args
:
|
[
options
?:
ActorNpmProjectInstallOptions
]
|
[
packages
:
string
|
string
[]
,
options
?:
ActorNpmPackageInstallOptions
,
]
,
)
=>
Promise
<
CodeExecutionResult
>
;
runPackage
:
(
c
:
ActorContext
,
packageSpec
:
string
,
actorOptions
?:
Omit
<
LanguageExecutionOptions
,
"stdin"
|
"signal"
|
"onStdout"
|
"onStderr"
,
>
&
{
stdin
?:
ActorData
}
&
{
binary
?:
string
}
,
)
=>
Promise
<
unknown
>
;
runScript
:
(
c
:
ActorContext
,
script
:
string
,
actorOptions
?:
ActorLanguageExecutionOptions
,
)
=>
Promise
<
unknown
>
;
}
;
spawn
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
spawnFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
}
;
killProcess
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
linkSoftware
:
(
c
:
ActorContext
,
descriptor
:
PackageDescriptor
,
)
=>
Promise
<
void
>
;
listAgents
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
listCronJobs
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
listMounts
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
listProcesses
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
listSessions
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
listSoftware
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
mkdir
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
mountFs
:
(
c
:
ActorContext
,
descriptor
:
DynamicMountDescriptor
,
)
=>
Promise
<
void
>
;
move
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
network
:
{
httpRequest
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
openSession
:
(
c
:
ActorContext
,
input
:
OpenSessionInput
)
=>
Promise
<
void
>
;
openShell
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
process
:
{
closeStdin
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
exec
:
(
c
:
ActorContext
,
command
:
string
,
actorOptions
?:
ActorLanguageExecutionOptions
,
)
=>
Promise
<
unknown
>
;
execFile
:
(
c
:
ActorContext
,
command
:
string
,
args
?:
readonly
string
[]
,
actorOptions
?:
Omit
<
ActorLanguageExecutionOptions
,
"args"
>
,
)
=>
Promise
<
unknown
>
;
get
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
kill
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
list
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
readOutput
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
resizePty
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
signal
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
spawn
:
(
c
:
ActorContext
,
command
:
string
,
args
?:
string
[]
,
actorOptions
?:
ActorSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
tree
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
wait
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeStdin
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
processTree
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
prompt
:
(
c
:
ActorContext
,
input
:
PromptInput
)
=>
Promise
<
any
>
;
python
:
{
evaluate
:
(
c
:
ActorContext
,
expression
:
string
,
actorOptions
?:
ActorInlineExecutionOptions
,
)
=>
Promise
<
unknown
>
;
execute
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorInlineExecutionOptions
,
)
=>
Promise
<
unknown
>
;
executeFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorLanguageExecutionOptions
,
)
=>
Promise
<
unknown
>
;
executeModule
:
(
c
:
ActorContext
,
module
:
string
,
actorOptions
?:
ActorLanguageExecutionOptions
,
)
=>
Promise
<
unknown
>
;
install
:
(
c
:
ActorContext
,
...
args
:
|
[
options
?:
ActorPythonInstallOptions
]
|
[
packages
:
string
|
string
[]
,
options
?:
ActorPythonInstallOptions
]
,
)
=>
Promise
<
CodeExecutionResult
>
;
spawn
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
spawnFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
spawnModule
:
(
c
:
ActorContext
,
module
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
}
;
readdir
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readdirEntries
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readdirRecursive
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readFile
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readFiles
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readHistory
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
remove
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
resizeShell
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
respondPermission
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
scheduleCron
:
(
c
:
ActorContext
,
cronOptions
:
SerializableCronJobOptions
,
)
=>
Promise
<
{
id
:
any
}
>
;
sessions
:
{
cancelPrompt
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
delete
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
get
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getAgentInfo
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getCapabilities
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getConfig
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
list
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
open
:
(
c
:
ActorContext
,
input
:
OpenSessionInput
)
=>
Promise
<
void
>
;
prompt
:
(
c
:
ActorContext
,
input
:
PromptInput
)
=>
Promise
<
any
>
;
readHistory
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
respondPermission
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
setConfigOption
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
unload
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
setSessionConfigOption
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
,
)
=>
Promise
<
any
>
;
software
:
{
link
:
(
c
:
ActorContext
,
descriptor
:
PackageDescriptor
,
)
=>
Promise
<
void
>
;
list
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
}
;
spawn
:
(
c
:
ActorContext
,
command
:
string
,
args
?:
string
[]
,
actorOptions
?:
ActorSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
stat
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
terminal
:
{
close
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
open
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
resize
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
wait
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
write
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
typescript
:
{
check
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorTypeScriptCheckOptions
,
)
=>
Promise
<
unknown
>
;
checkProject
:
(
c
:
ActorContext
,
actorOptions
?:
Omit
<
ActorTypeScriptCheckOptions
,
"filePath"
|
"compilerOptions"
,
>
,
)
=>
Promise
<
unknown
>
;
evaluate
:
(
c
:
ActorContext
,
expression
:
string
,
actorOptions
?:
ActorTypeScriptExecutionOptions
,
)
=>
Promise
<
unknown
>
;
execute
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorTypeScriptExecutionOptions
,
)
=>
Promise
<
unknown
>
;
executeFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorTypeScriptFileExecutionOptions
,
)
=>
Promise
<
unknown
>
;
spawn
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
spawnFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
}
;
unloadSession
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
unmountFs
:
(
c
:
ActorContext
,
path
:
string
)
=>
Promise
<
void
>
;
vmFetch
:
(
c
:
ActorContext
,
port
:
number
,
url
:
string
,
requestOptions
?:
VmFetchOptions
,
)
=>
Promise
<
VmFetchResponse
>
;
vmFetchStreamCancel
:
(
c
:
ActorContext
,
streamId
:
string
)
=>
Promise
<
void
>
;
vmFetchStreamRead
:
(
c
:
ActorContext
,
streamId
:
string
,
maxBytes
?:
number
,
)
=>
Promise
<
VmFetchStreamChunk
>
;
vmFetchStreamStart
:
(
c
:
ActorContext
,
port
:
number
,
url
:
string
,
requestOptions
?:
VmFetchOptions
,
)
=>
Promise
<
VmFetchStreamHead
>
;
waitProcess
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
waitShell
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeFile
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeFiles
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeProcessStdin
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeShell
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
,
>
Type Parameters
TState
=
undefined
TConnParams
=
undefined
TConnState
=
undefined
TVars
=
undefined
TInput
=
undefined
TEvents
extends
EventSchemaConfig
=
Record
<
never
,
never
>
TQueues
extends
QueueSchemaConfig
=
Record
<
never
,
never
>
TUserActions
extends
Actions
<
TState
,
TConnParams
,
TConnState
,
TVars
,
TInput
,
DatabaseProvider
<
RawAccess
>
,
TEvents
,
TQueues
,
>
=
Record
<
never
,
never
>
Parameters
config
:
AgentOSActorConfigInput
<
TState
,
TConnParams
,
TConnState
,
TVars
,
TInput
,
TEvents
,
TQueues
,
TUserActions
,
>
= ...
Returns
ActorDefinition
<
TState
,
TConnParams
,
TConnState
,
TVars
,
TInput
,
DatabaseProvider
<
RawAccess
>
,
TEvents
&
BuiltInEvents
,
TQueues
,
TUserActions
&
{
agents
:
{
list
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
}
;
cancelCronJob
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
cancelPrompt
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
closeProcessStdin
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
closeShell
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
contexts
:
{
delete
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
get
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
list
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
reset
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
createContext
:
(
c
:
ActorContext
,
contextId
:
string
)
=>
Promise
<
any
>
;
createPreviewUrl
:
(
c
:
ActorContext
,
port
:
number
,
ttlSeconds
?:
number
,
)
=>
Promise
<
{
expiresAt
:
number
;
path
:
string
;
port
:
number
;
token
:
any
}
,
>
;
cron
:
{
cancel
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
list
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
schedule
:
(
c
:
ActorContext
,
cronOptions
:
SerializableCronJobOptions
,
)
=>
Promise
<
{
id
:
any
}
>
;
}
;
deleteSession
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
exec
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
execArgv
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
exists
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
expirePreviewUrl
:
(
c
:
ActorContext
,
token
:
string
)
=>
Promise
<
void
>
;
exportRootFilesystem
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
,
)
=>
Promise
<
any
>
;
filesystem
:
{
exists
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
export
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
listMounts
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
mkdir
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
mount
:
(
c
:
ActorContext
,
descriptor
:
DynamicMountDescriptor
,
)
=>
Promise
<
void
>
;
move
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readdir
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readdirEntries
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readdirRecursive
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readFile
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readFiles
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
remove
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
stat
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
unmount
:
(
c
:
ActorContext
,
path
:
string
)
=>
Promise
<
void
>
;
writeFile
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeFiles
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
getProcess
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getSession
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getSessionAgentInfo
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getSessionCapabilities
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
,
)
=>
Promise
<
any
>
;
getSessionConfig
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
httpRequest
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
javascript
:
{
evaluate
:
(
c
:
ActorContext
,
expression
:
string
,
actorOptions
?:
ActorJavaScriptExecutionOptions
,
)
=>
Promise
<
unknown
>
;
execute
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorJavaScriptExecutionOptions
,
)
=>
Promise
<
unknown
>
;
executeFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorLanguageExecutionOptions
,
)
=>
Promise
<
unknown
>
;
npm
:
{
install
:
(
c
:
ActorContext
,
...
args
:
|
[
options
?:
ActorNpmProjectInstallOptions
]
|
[
packages
:
string
|
string
[]
,
options
?:
ActorNpmPackageInstallOptions
,
]
,
)
=>
Promise
<
CodeExecutionResult
>
;
runPackage
:
(
c
:
ActorContext
,
packageSpec
:
string
,
actorOptions
?:
Omit
<
LanguageExecutionOptions
,
"stdin"
|
"signal"
|
"onStdout"
|
"onStderr"
,
>
&
{
stdin
?:
ActorData
}
&
{
binary
?:
string
}
,
)
=>
Promise
<
unknown
>
;
runScript
:
(
c
:
ActorContext
,
script
:
string
,
actorOptions
?:
ActorLanguageExecutionOptions
,
)
=>
Promise
<
unknown
>
;
}
;
spawn
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
spawnFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
}
;
killProcess
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
linkSoftware
:
(
c
:
ActorContext
,
descriptor
:
PackageDescriptor
,
)
=>
Promise
<
void
>
;
listAgents
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
listCronJobs
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
listMounts
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
listProcesses
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
listSessions
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
listSoftware
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
mkdir
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
mountFs
:
(
c
:
ActorContext
,
descriptor
:
DynamicMountDescriptor
,
)
=>
Promise
<
void
>
;
move
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
network
:
{
httpRequest
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
openSession
:
(
c
:
ActorContext
,
input
:
OpenSessionInput
)
=>
Promise
<
void
>
;
openShell
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
process
:
{
closeStdin
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
exec
:
(
c
:
ActorContext
,
command
:
string
,
actorOptions
?:
ActorLanguageExecutionOptions
,
)
=>
Promise
<
unknown
>
;
execFile
:
(
c
:
ActorContext
,
command
:
string
,
args
?:
readonly
string
[]
,
actorOptions
?:
Omit
<
ActorLanguageExecutionOptions
,
"args"
>
,
)
=>
Promise
<
unknown
>
;
get
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
kill
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
list
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
readOutput
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
resizePty
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
signal
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
spawn
:
(
c
:
ActorContext
,
command
:
string
,
args
?:
string
[]
,
actorOptions
?:
ActorSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
tree
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
wait
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeStdin
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
processTree
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
prompt
:
(
c
:
ActorContext
,
input
:
PromptInput
)
=>
Promise
<
any
>
;
python
:
{
evaluate
:
(
c
:
ActorContext
,
expression
:
string
,
actorOptions
?:
ActorInlineExecutionOptions
,
)
=>
Promise
<
unknown
>
;
execute
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorInlineExecutionOptions
,
)
=>
Promise
<
unknown
>
;
executeFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorLanguageExecutionOptions
,
)
=>
Promise
<
unknown
>
;
executeModule
:
(
c
:
ActorContext
,
module
:
string
,
actorOptions
?:
ActorLanguageExecutionOptions
,
)
=>
Promise
<
unknown
>
;
install
:
(
c
:
ActorContext
,
...
args
:
|
[
options
?:
ActorPythonInstallOptions
]
|
[
packages
:
string
|
string
[]
,
options
?:
ActorPythonInstallOptions
]
,
)
=>
Promise
<
CodeExecutionResult
>
;
spawn
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
spawnFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
spawnModule
:
(
c
:
ActorContext
,
module
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
}
;
readdir
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readdirEntries
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readdirRecursive
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readFile
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readFiles
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
readHistory
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
remove
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
resizeShell
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
respondPermission
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
scheduleCron
:
(
c
:
ActorContext
,
cronOptions
:
SerializableCronJobOptions
,
)
=>
Promise
<
{
id
:
any
}
>
;
sessions
:
{
cancelPrompt
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
delete
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
get
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getAgentInfo
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getCapabilities
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
getConfig
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
list
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
open
:
(
c
:
ActorContext
,
input
:
OpenSessionInput
)
=>
Promise
<
void
>
;
prompt
:
(
c
:
ActorContext
,
input
:
PromptInput
)
=>
Promise
<
any
>
;
readHistory
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
respondPermission
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
setConfigOption
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
unload
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
setSessionConfigOption
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
,
)
=>
Promise
<
any
>
;
software
:
{
link
:
(
c
:
ActorContext
,
descriptor
:
PackageDescriptor
,
)
=>
Promise
<
void
>
;
list
:
(
c
:
ActorContext
)
=>
Promise
<
any
>
;
}
;
spawn
:
(
c
:
ActorContext
,
command
:
string
,
args
?:
string
[]
,
actorOptions
?:
ActorSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
stat
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
terminal
:
{
close
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
open
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
resize
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
wait
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
write
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
;
typescript
:
{
check
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorTypeScriptCheckOptions
,
)
=>
Promise
<
unknown
>
;
checkProject
:
(
c
:
ActorContext
,
actorOptions
?:
Omit
<
ActorTypeScriptCheckOptions
,
"filePath"
|
"compilerOptions"
,
>
,
)
=>
Promise
<
unknown
>
;
evaluate
:
(
c
:
ActorContext
,
expression
:
string
,
actorOptions
?:
ActorTypeScriptExecutionOptions
,
)
=>
Promise
<
unknown
>
;
execute
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorTypeScriptExecutionOptions
,
)
=>
Promise
<
unknown
>
;
executeFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorTypeScriptFileExecutionOptions
,
)
=>
Promise
<
unknown
>
;
spawn
:
(
c
:
ActorContext
,
source
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
spawnFile
:
(
c
:
ActorContext
,
path
:
string
,
actorOptions
?:
ActorLanguageSpawnOptions
,
)
=>
Promise
<
ProcessDescriptor
>
;
}
;
unloadSession
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
unmountFs
:
(
c
:
ActorContext
,
path
:
string
)
=>
Promise
<
void
>
;
vmFetch
:
(
c
:
ActorContext
,
port
:
number
,
url
:
string
,
requestOptions
?:
VmFetchOptions
,
)
=>
Promise
<
VmFetchResponse
>
;
vmFetchStreamCancel
:
(
c
:
ActorContext
,
streamId
:
string
)
=>
Promise
<
void
>
;
vmFetchStreamRead
:
(
c
:
ActorContext
,
streamId
:
string
,
maxBytes
?:
number
,
)
=>
Promise
<
VmFetchStreamChunk
>
;
vmFetchStreamStart
:
(
c
:
ActorContext
,
port
:
number
,
url
:
string
,
requestOptions
?:
VmFetchOptions
,
)
=>
Promise
<
VmFetchStreamHead
>
;
waitProcess
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
waitShell
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeFile
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeFiles
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeProcessStdin
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
writeShell
:
(
c
:
ActorContext
,
...
args
:
unknown
[]
)
=>
Promise
<
any
>
;
}
,
>
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
Docs
agentOS API Reference - v0.0.1
Loading...