@casual-simulation/aux-records
Advanced tools
Changelog
V3.3.13
Added ai.chat.allowedModels
feature to enforce model usage limits, restricting access to specific models based on configuration.
Added shared documents.
Shared documents utilize insts to be able to share data without using bots and tags.
Additionally, shared documents can be loaded and unloaded at will.
The following functions have been added:
os.getSharedDocument(name)
- Gets a document that is stored in the current inst.os.getSharedDocument(recordName, inst, name)
- Gets a document that is stored in the specified inst.os.getLocalDocument(name)
- Gets a document that is stored on this device.os.getMemoryDocument()
- Gets a document that is stored in memory and cleared upon refresh.Usage:
// Get a document stored in this inst named "test"
const doc = await os.getSharedDocument('test');
// maps work like the Map type (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)
const inventory = doc.getMap<number>('inventory');
inventory.set('spoons', 2);
inventory.set('forks', 3);
os.log('Number of spoons: ' + inventory.get('spoons'));
// arrays work like regular JavaScript arrays:
const shoppingList = doc.getArray<string>('shoppingList');
shoppingList.push('cereal', 'milk', 'eggs');
os.log('Shopping list:', inventory.toArray());
// Text is a special type that makes it easy to work with long strings
const blogPost = doc.getText('blogPost');
blogPost.insert(0, 'Hello, world!');
os.log('Blog Post:\n', blogPost.toString());
os.joinRoom()
.Changelog
V3.3.12
moderator
user role.
sessionKey
and connectionKey
in the URL might not actually log the user in.Changelog
V3.3.11
data
: The webhook will use the bots from a data record.file
: The webhook will use the bots from a file record.inst
: The webhook will use the bots from an inst record.
publicRead
: The publicRead
marker can be used to allow anyone to execute the webhook.private
: The private
marker can be used to only allow the record members to execute the webhook.create
read
update
delete
list
run
os.getWebhook()
or by inspecting the webhook through the admin panel.os.recordWebhook(recordName, webhook)
os.getWebhook(recordName, address)
os.runWebhook(recordName, address, input)
os.listWebhooks(recordName, address?)
os.listWebhooksByMarker(recordName, marker, address?)
os.eraseWebhook(recordName, address)
os.toast()
, os.showInput()
, etc.)
os.recordData()
).os.subscribeToNotification(recordName, address)
.os.sendNotification()
.publicRead
: The publicRead
marker can be used to allow anyone to read and subscribe to a notification.create
read
update
delete
list
subscribe
unsubscribe
listSubscriptions
send
os.recordNotification(recordName, notification)
os.getNotification(recordName, address)
os.eraseNotification(recordName, address)
os.listNotifications(recordName, address?)
os.listNotificationsByMarker(recordName, marker, address?)
os.subscribeToNotification(recordName, address)
os.unsubscribeFromNotification(recordName, address)
os.sendNotification(recordName, address, payload)
os.listNotificationSubscriptions(recordName, address)
os.listUserNotificationSubscriptions()
jsonObject
form subtype.
gltf
, but it uses ObjectLoader to load meshes from the URL specified in the formAddress
tag.