@casual-simulation/aux-records
Advanced tools
Changelog
V3.2.16
formLDrawPartsAddress
to set the address that LDraw parts should be loaded from.ai.chat()
.ai.chat()
requests.
ai.chat()
messages now support accepting an array of content which can either represent text or image data.@onInstJoined
shout.ai.chat()
would not actually honor any options.Changelog
V3.2.15
ldraw
and ldrawText
subforms.
#form = "mesh"
, they both allow rendering a LDraw file as the bot's form.ldraw
- Renders the LDraw URL stored in #formAddress
ldrawText
- Renders the LDraw text stored in #formAddress
os.ldrawCountAddressBuildSteps(address)
and os.ldrawCountTextBuildSteps(text)
functions.
os.ldrawCountAddressBuildSteps(address)
counts and returns the number of build steps that are in the LDraw file at the given URL. Returns a promise that resolves with the number of build steps that the file has.os.ldrawCountTextBuildSteps(text)
counts and returns the number of build steps that are in the given LDraw text. Returns a promise that resolves with the number of build steps that the file has.os.showUploadFiles()
to return .mpd
and .ldr
files as text.
Changelog
V3.2.14
os.listData()
works to require data.list
access for the account
marker instead of for each item individually.
os.listData()
will continue to work for users that have a record key or are admins (record owner or member of a studio), but it will no longer be possible to list publicRead
data items through this function.os.listDataByMarker()
function to list data based on a marker.os.listData()
to return no results even if there were items after the given address. This is because a fixed number of items would be retrieved from the database and then checked to see if the user has access to it. If the user did not have access to any items, then an empty list would be returned, even if there are items that the user does have access to later in the database.os.listData()
to throw a CausualOSError
if the user is not authorized to list items.
os.grantRecordMarkerPermission()
and os.revokeRecordMarkerPermission()
.
os.grantPermission()
and os.revokePermission()
.os.getCurrentInst()
to always return the name of the inst that the bot exists in, instead of the first inst that was loaded into the session.root:path
.
root
is known as the "root marker" and is what determines the security of a resource.path
is known as the "path marker" and is used to organize the resource.secret
and secret:documents
both have the same root marker: secret
.
secret
root marker in order to access resources with either of these markers.secret:documents
has a path marker of documents
, which means that it is organized separately from other markers.os.listDataByMarker()
function is able to take advantage of this feature.
os.listDataByMarker(recordName, "secret:photos")
will only return data records with secret:photos
, while calling os.listDataByMarker(recordName, "secret:documents")
will only return data records with secret:documents
.os.grantPermission(recordName, permission, options?)
and os.revokePermission(recordName, permissionId, options?)
.
os.grantPermission()
creates a permission that grants the ability to perform an action (or set of actions) on a marker or resource to a user, inst, or role.os.revokePermission()
deletes the permission with the given ID.os.listDataByMarker(recordName, marker, startingAddress?, options?)
function.
secret:documents
will match secret:documents
, but listing by secret
will not list secret:documents
.immersive-vr
mode of WebXR sessions.VM_ORIGIN
environment variable can now be configured to tell CasualOS to load insts into a unique HTTP Origin so that insts are isolated from each other.VM_ORIGIN
is The HTTP Origin that should be used to load the inst virtual machine. Useful for securely isolating insts from each other and from the frontend. Supports {{inst}}
to customize the origin based on the inst that is being loaded. For example setting VM_ORIGIN
to https://{{inst}}.example.com
will cause ?staticInst=myInst
to load inside https://myInst.example.com
. Defaults to null, which means that no special origin is used.experiment.beginRecording()
and experiment.endRecording()
.websocketRateLimit
property on the SERVER_CONFIG
controls the websockets rate limits. If not specified, then the options from rateLimit
will be used for websockets and HTTP.websocketRateLimitPrefix
in redis
controls the namespace that values are stored at in Redis. If not specified, then the rateLimitPrefix
will be used for both.os.getRecordsEndpoint()
function to get the default records endpoint.
os.recordData()
, os.getData()
, os.recordFile()
, etc. can be passed an endpoint which specifies which backend should be used for the request.os.getRecordsEndpoint()
returns a promise that resolves to the endpoint that is used by default.os.showAccountInfo()
function to show the "Account Information" dialog for users who are logged in.ArrayBuffer
support for bytes.toBase64String()
and bytes.toBase64Url()
functions.os.showUploadFiles()
dialog cuts off the "Upload" button when a lot of files are added.portalBackgroundAddress
would render over miniMapPortalBot
..click()
, .focus()
, and .blur()
methods would not work on custom app HTML elements.os.unregisterApp()
would not trigger Preact cleanup code.os.unloadInst()
would not work when going from 2 instances to 1 instance.os.requestAuthBot()
multiple times without waiting for one to complete.experiment.beginRecording()
and experiment.endRecording()
where recording the screen with audio might fail in some cases.Changelog
V3.2.13
ai.generateSkybox()
would fail if an instances array was provided.Changelog
V3.2.12
POST /api/v2/ai/skybox
character limit prompt to match BlockadeLabs limit of 600 characters.studio.name
- The name of the Studio.comID
- The comID for the Studio. Studio admins can request a new comID for their studio.comID.logoURL
- The URL of the logo that should be displayed for the Studio and comID.comID.allowedStudioCreators
- The kinds of users that are allowed to create Studios within the comID. Possible options are "anyone" and "only-members".comID.ab1BootstrapURL
- The URL that specifies where the custom ab1 bootstrapper should be loaded from. If none is specified, then the default ab1 is loaded.comID.allowedBiosOptions
- The list of allowed BIOS options that can be presented to users. If none are specified, then the default list is used.comID.defaultBiosOption
- The BIOS option that is selected in the BIOS by default. If none is specified, then the default is used.comID.automaticBiosOption
- The BIOS option that will be automatically executed instead of displaying the BIOS. If none is specified, then the default is used.comID.jitsiAppName
- The name of the Jitsi App that should be used for the meetPortal. If none is specified, then the default is used.comID.what3WordsApiKey
- The API Key that should be used for os.convertGeolocationToWhat3Words()
. If none is specified, then the default is used.comId
or comID
in the query tells CasualOS to use the settings that were configured on the related Studio settings page. Additionally, the logo of the studio will be displayed on the loading screens and BIOS.os.startFormAnimation()
does not support starting paused animations with an initialTime greater than 0.