Skip to content

Releases: casual-simulation/casualos

v3.3.5

31 May 19:56
Compare
Choose a tag to compare

πŸš€ Features

  • Improve support for environments that do no support local storage or indexedDB.
  • Added the ai.hume.getAccessToken() function to allow retrieving an access token for a Hume.ai session.
    • Requires that humeai be specified in the server configuration with an apiKey and secretKey and that the user has a subscription with ai.hume.allowed set to true in the subscription tier features.

v3.3.4

29 May 19:44
Compare
Choose a tag to compare

πŸš€ Features

  • Added the os.capturePortalScreenshot() function.
    • This function can be used to get a screenshot of the gridPortal.
  • Made systemPortal panel resizable.
  • Added the ai.stream.chat() function.
    • Works exactly like ai.chat(), except that it returns a promise that resolves with an AsyncIterable object that can be iterated using a for await...of expression.
    • Each value is part of the response from the chat model.
    • Useful for displaying the partial results from an AI chat model to the user so they can see the model working.
  • Added the experiment.createStaticHtmlFromBots() function.
    • Useful for creating a static HTML file that has an AUX file embeded in it.

v3.3.3

09 May 17:00
Compare
Choose a tag to compare

πŸš€ Features

  • Improved server deployments to support the same configuration options as serverless deployments.
  • Updated livekit-client to v2.1.3.

πŸ› Bug Fixes

  • Fixed an issue where joining a room on MacOS Chrome might not include the video track for the current session.

v3.3.2

29 Apr 18:33
Compare
Choose a tag to compare

πŸ› Bug Fixes

  • Fixed an issue where CasualOS didn't understand the contents of a response from Privo servers during login.

v3.3.1

27 Apr 01:11
Compare
Choose a tag to compare

πŸš€ Features

  • Added classifyImages() function.
  • Exposed the following properties from HTMLVideoElement:
    • currentTime
    • ended
    • paused
    • muted
    • volume
    • playbackRate
    • Note that these properties are only updated when an event is received from the element. (e.g. currentTime will be exposed if you are listening to onTimeUpdate)

πŸ› Bug Fixes

  • Fixed an issue where it was impossible to use some records functions with ?sessionKey and connectionKey in the URL.

v3.3.0

15 Apr 17:37
Compare
Choose a tag to compare

πŸš€ Features

  • Added a command line interface (CLI) for CasualOS.
    • It is available on NPM as casualos, and provides functionality to query the CasualOS backend API.
    • It currently provides the following operations:
      • login - Authenticates the cilent to a CasualOS backend.
      • query - Queries a CasualOS backend.
      • repl - A Read-eval-print-loop (REPL) that makes interacting with the CasualOS backend via JavaScript really easy.
  • Added the ability to create accounts that are not associated with an email or phone number.
    • These accounts are also issued a session key that cannot be revoked and does not expire.
    • They will mostly be used for one-time subscriptions and machine users.
    • This ability is only accessible by super users (see below).
  • Added several functions to make working with screen coordinates easier.
    • os.calculateViewportCoordinatesFromPosition(portal, position) - Calculates the viewport coordinates from the given 3D position in the portal.
      • portal is the portal that the request is from (one of grid, miniGrid, map, or miniMap).
      • position is the 3D position in the portal.
      • Viewport coordinates locate a specific point on the image that the camera produces. (X: 0, Y: 0) represents the center of the camera while (X: -1, Y: -1) represents the lower left corner and (X: 1, Y: 1) represents the upper right corner.
    • os.calculateViewportCoordinatesFromScreenCoordinates(portal, coordinates) - Calculates the viewport coordinates from the given 2D screen position.
      • portal is the portal that the request is for (one of grid, miniGrid, map, or miniMap).
      • position is the 2D position on the screen.
    • os.calculateScreenCoordinatesFromViewportCoordinates(portal, coordinates) - Calculates the screen coordinates from the given 2D viewport coordinates.
      • portal is the portal that the request is for (one of grid, miniGrid, map, or miniMap).
      • position is the 2D viewport coordinates that the screen coordinates should be found for.
  • Added eye tracking based transient-input support for Apple Vision Pro.
    • Look at bots you want to interact with and then pinch to start selection.
    • Dragging your hand will manipulate the input ray relative to where your eyes were looking until you let go of your pinch.
    • Feels like the natural input style that the rest of visionOS uses.
  • Added the superUser user role.
    • This is internal to CasualOS and is not related to roles that control access to record data.
    • There are currently only two roles: none, and superUser.
    • Currently, roles have to be assigned manually through the database. There is not API to grant a user the superUser role.
    • All users default to the none role.
    • When assigned the superUser role, a user has access to some operations that they would not normally have access to, including:
      • getUserInfo for all users
      • createAccount
      • listSessions for all users
      • listRecords for all users and studios
      • listStudios for all users
      • listStudioMembers for all studios
      • getSubscriptions for all users and studios
  • Added the ability to specify user login details in the URL.
    • When logged in, CasualOS stores a sessionKey and a connectionKey in the local storage of their web browser to keep them logged in.
    • When the sessionKey and connectionKey query params are specified in the URL, they will be used instead of the stored ones.
    • Additionally, they work for users who are not logged in.
    • This makes it possible to give someone a URL that grants them automatic access to an account.
  • Added the updateSubscription operation (POST /api/v2/subscriptions/update) to allow super users to grant a subscription to users or studios.
    • Currently, it can only be used to grant/revoke simple non-stripe subscriptions. If the user already has a stripe subscription, then the function will refuse to make changes.

πŸ› Bug Fixes

  • Fixed an issue where ES2022 class fields would not support type annotations.
  • Fixed an issue where the miniGridPortal did not support using os.focusOn() with a position.
  • Fixed some performance issues when updating lots of bots across multiple frames.

v3.2.19

01 Apr 18:47
Compare
Choose a tag to compare

πŸ’₯ Breaking Changes

  • Forced all scripts to compile in Strict mode.
    • Strict mode restricts some functions and features of JavaScript to help catch common mistakes.
    • Some examples:
      • The implements, interface, let, package, private, protected, public, static, yield keywords are no longer allowed to be used as identifiers.
      • Assignments to non-writable globals (Infinity, undefined, etc.) are no longer allowed.
      • Assignments to non-writable properties now throws a TypeError.
      • It is no longer allowed to set properties on a primitive value.
      • Attempts to delete a non-configurable or otherwise undeletable property now throws a TypeError.
      • Duplicate parameter names are no longer allowed.
      • Numbers literals are no longer allowed to start with 0.
        • This is because sloppy mode allowed otcal literals to be any number starting with 0 and having every digit less than 8
        • If you weren't careful, it was easy to accidentally write an octal number. e.g.
        let num = 0123; // This does not equal 123, but is actually 83 in decimal
  • Enabled preact/compat for custom apps.
    • This change probably won't break anything, but I can't exactly be sure.
    • preact/compat improves Preact compatibility with React behavior and features.
    • See the Preact website for more information.

πŸš€ Features

  • Added the ability to specify separate Redis servers for websocket connections, inst data, caches, and rate limits.
  • Added the os.appCompat API.
    • It is an object that contains APIs from preact/compat.
    • This includes, but is not limited to, Suspense, lazy(), createPortal(), forwardRef(), memo(), and PureComponent.
  • Added createRef() and createContext() to os.appHooks.
  • CasualOS will now send @onGridClick, @onGridUp, and @onGridDown shouts to all loaded insts.

πŸ› Bug Fixes

  • Fixed an issue where attached debuggers would automatically get detached once a portal is opened or closed.
  • Fixed an issue where the registration flow would not always check display names properly.
  • Improved wording for some registration errors.
  • Fixed an issue where it was possible for a session to not be synced while the session itself believes that it is connected.
  • Fixed an issue where using JSX syntax would show random syntax errors in the multiline code editor.
  • Fixed an issue where it was possible for CasualOS to waste resources by loading the portals for an inst multiple times.
  • Fixed an issue where the miniGridPortal slider bar would interfere with the menuPortal.

v3.2.18

20 Mar 21:12
Compare
Choose a tag to compare

πŸš€ Features

  • Added support for ES Module-style import and export statements.
    • ES Modules are a way to organize code into separate listeners.
    • With this update, CasualOS now supports using import and export statements in scripts.
    • By default, modules can be imported from 3 different places:
      • Scripts based on system tag. You can import exported functions and variables from any script based on the system tag of its bot. For example, import {abc} from "example.system.tag" can be used to import the abc variable or function from the bot with the example.system system and the tag tag.
      • URLs. The URLs can be imported. For example, import { sortBy } from 'https://esm.run/lodash-es';" imports the sortBy function from the lodash-es module provided by https://esm.run.
      • The casualos module. This module exports all of CasualOS's built-in functions. It is the only module that cannot be overriden with @onResolveModule. For example:
        import { os } from 'casualos';
        os.toast('Hello from my module!');
    • In addition to the default ways, you can provide your own custom module resolution logic by using @onResolveModule.
      • See the documentation for @onResolveModule for more information.
  • Added support for TypeScript syntax.
    • TypeScript is an extension of JavaScript that enables you to add type information to your code.
    • Combined with ES Modules, this means it is much easier to catch simple bugs because the editor will tell you when something doesn't match up.
    • For now, errors are only surfaced in each script, but in the future it will be possible to check for errors in any script.
    • There are a couple limitations:
      • Generally, any TypeScript feature that requires a significant amount of code generation (e.g. enums) are not supported.
      • Additionally, the let casted = <any>value; syntax for casting types is not supported since all scripts support JSX.
  • Added the πŸ“„ prefix for "library" scripts.
    • Before, the only way to make a script was to use the @ prefix. Using the @ prefix makes what we call a "listener script" or "listener tag".
    • Now, you can use the πŸ“„ prefix instead of @. Using πŸ“„ makes what we call a "library script" or "library tag".
    • Library scripts work similarly to listener scripts, except with a couple key changes:
      • Library scripts cannot be shouted to. Instead, they have to be imported. This means you cannot use shout() or whisper() to communicate with a library script. Additionally, thisBot.script() does not work either.
      • Library scripts have to import all CasualOS functions. This means you cannot simply use os.toast(), you have to first import the casualos module. For example:
        import { os } from 'casualos';
        os.toast('Hello from my module!');
  • Updated CasualOS to support ECMAScript 14.
  • Updated Preact to v10.19.6
  • Added the ability to use .transferControlToOffscreen() and .getContext() functions on <canvas> HTML elements.
  • Added the ability to use .setPointerCapture() and .releasePointerCapture() functions on HTML elements.
  • Updated the privacy policies.

πŸ› Bug Fixes

  • Fixed an issue where setting ?owner=player in the URL while not being logged in would cause a public inst to be loaded instead of prompting the user to login.
  • Fixed an issue where custom apps would not reappear after logging in with a code.
  • Fixed an issue where os.getCurrentInst() would return undefined if the inst is a static inst.

v3.2.17

06 Mar 20:53
Compare
Choose a tag to compare

πŸš€ Features

  • Support case-insensitive matching of email address when logging in.
    • Previous versions would create separate accounts for email addresses that differed only in case.
    • Now, if an exact match is not found, a case-insensitive search will be made for users when attempting to login by email.
    • This will prevent cases where a user gets a new account because they mistakenly changed the case of their email address.
    • Technically, email addresses are supposed to be case-sensitive, but pretty much every email server treats them as case-insensitive.
  • Support configuring a custom file URL for public file records stored in S3.
    • This makes it easy to support setting a custom domain or CDN or public file records.
    • It does not support private file records at this moment.
  • Support changing the bucket that S3 files are stored in.
  • Added support for passkeys.
    • Passkeys are new way to sign in to apps and websites without a password. Depending on your device and platform, passkeys can even be synced across your devices.
    • On CasualOS, passkeys offer a quicker way to login that doesn't require checking your email or phone number every time.
    • On supported devices, if you login using a traditional method, CasualOS will ask you if you want to register a passkey for the device.
    • Upon your next login, you can use the passkey to login instead of having to enter your email and wait for a code.
  • Changed the date of birth input to handle manually-typed input better.
  • Added the ability to track some load time metrics using SimpleAnalytics events.

πŸ› Bug Fixes

  • Fixed an issue where os.calculateRayFromCamera() would return incorrect results for the ray origin.
  • Improved CasualOS to delay installation of the service worker until either the inst is fully loaded or the BIOS is shown.
  • Fixed an issue where the miniMapPortal and miniGridPortal were not able to be resized.

v3.2.16

23 Feb 20:59
Compare
Choose a tag to compare

πŸš€ Features

  • Added the formLDrawPartsAddress to set the address that LDraw parts should be loaded from.
  • Updated the policies.
  • Added the ability to configure CasualOS to support Google AI for ai.chat().
  • Added the ability to include image data in ai.chat() requests.
    • ai.chat() messages now support accepting an array of content which can either represent text or image data.

πŸ› Bug Fixes

  • Fixed an issue where percent-based sizing of custom apps was broken due to a change made in v3.2.14.
  • Fixed an issue where bots stored in local insts might not receive the @onInstJoined shout.
  • Fixed an issue where POV mode would start with the camera facing down when IMU support is disabled.
  • Fixed an issue where ai.chat() would not actually honor any options.