Skip to content

Conversation

KallynGowdy
Copy link
Member

No description provided.

@KallynGowdy KallynGowdy added area:backend Is related to the backend server. (Everything in aux-records and aux-server/aux-backend) area:runtime Is related to the CasualOS runtime. (Everything in aux-runtime, aux-common, aux-vm, etc.) area:player Is related to the player frontend. (Everything in aux-server/aux-web/aux-player) area:auth Everything related to the Auth Frontend. (Everything in aux-server/aux-web/aux-auth) labels Apr 14, 2025
Comment on lines +887 to +893
_enabled: z
.boolean()
.optional()
.default(false)
.describe(
'Whether TigerBeetle is enabled, this allows for pre-defining and shipping default configuration.'
),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LandonSiler We don't need a flag for if tiger beetle is enabled. We can simply allow the tigerBeetle key in the server config to be null/undefined to disable it.

* Get an Xp user's meta data (Xp meta associated with an auth user)
* Creates an Xp user for the auth user if one does not exist
*/
async getXpUser(id: GetXpUserById): Promise<GetXpUserResult> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LandonSiler This function should receive the ID of the currently logged in user in addition to the the ID of the user that the metadata is requested for. This is so we can validate who is allowed to access the metadata for a user and what amount of metadata they can access.

For example, we will eventually start including account balances with these metadata requests, but we don't want to return the account balance for user A to user B.

} else return result;
}
return user
? { success: true, user }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LandonSiler Controllers should always try to be explicit about what they are returning so that we don't accidentally return more from the store than should be returned. For example, instead of:

return {
  success: true,
  user
};

I would prefer:

return {
  success: true,
  user: {
    id: user.id,
    accountId: user.accountId,
    // etc...
  }
};

so we can see exactly what is being returned from the controller without having to consult the store.

* Get a contract by its id
* @param id The id of the contract to get
*/
async getContractById(id: XpContract['id']): Promise<GetContractResult> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LandonSiler This function should also accept the current user ID so that we can validate whether the current user is allowed to access the given contract.

Comment on lines +1313 to +1324
await Promise.race([
client.lookupAccounts([0n]),
new Promise((_, rej) => {
setTimeout(() => {
rej(
new Error(
'Failed to connect to tigerbeetle server in time.'
)
);
}, 3000);
}),
]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LandonSiler We don't need to validate the tiger beetle connection on start. If we are having issues, then the server should start but each request should fail. This helps the system recover from temporary failures and not run into issues where we have to manually restart the server executable.

@KallynGowdy KallynGowdy force-pushed the feature/integrate-xp-contract branch from 4111dd0 to 7f6dd3b Compare May 13, 2025 21:12
@KallynGowdy KallynGowdy self-assigned this May 16, 2025
@CLAassistant
Copy link

CLAassistant commented Jun 10, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 4 committers have signed the CLA.

✅ KallynGowdy
✅ rboorman
❌ TroyceGowdy
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

KallynGowdy and others added 21 commits August 13, 2025 17:44
…Click argument for codeTool bots

- These new properties tell the user which bot and tag is currently displayed in the code editor
… branch wasn't found for the temporary connection
Implement additional properties to determine which bot and tag is displayed in the code editor for a code tool bot
…oken

Fix record key issues with `os.getSharedDocument()`
- This means that static insts will be treated similarly to how private insts are treated.
# Conflicts:
#	CHANGELOG.md
KallynGowdy and others added 30 commits September 25, 2025 12:12
…e18-4e4b-90de-989bb9220185

Fix: Remove erroneous rounding of from position values in drag/drop events
…252-430b-8c7d-710f30acbaba

Add ai.listChatModels() function to list available AI chat models
…fc1-4edc-9797-d01703ca209c

Add os.eraseInst() function to delete insts programmatically
…eeb-4d07-a396-03da62d6039a

Fix sheetPortal button to prioritize mapPortal over gridPortal when inferring dimension
…o the record that the webhook owns

- This prevents potential leaks by allowing the webhook to read its own logs by default.
- Also makes managing file subscriptions for webhooks easier.
- This fixes trying to publish package versions into studios, or in cases where the system is recording a file to a studio
# Conflicts:
#	package.json
#	pnpm-lock.yaml
#	src/aux-common/common/PolicyPermissions.ts
#	src/aux-common/rpc/ErrorCodes.spec.ts
#	src/aux-common/rpc/ErrorCodes.ts
#	src/aux-common/rpc/Result.spec.ts
#	src/aux-common/rpc/Result.ts
#	src/aux-records/AuthController.spec.ts
#	src/aux-records/MemoryStore.ts
#	src/aux-records/PolicyController.spec.ts
#	src/aux-records/PolicyStore.ts
#	src/aux-records/RecordsServer.spec.ts
#	src/aux-records/RecordsServer.ts
#	src/aux-records/SubscriptionConfigBuilder.ts
#	src/aux-records/SubscriptionConfiguration.ts
#	src/aux-records/Utils.ts
#	src/aux-records/__snapshots__/RecordsServer.spec.ts.snap
#	src/aux-records/__snapshots__/ServerConfig.spec.ts.snap
#	src/aux-records/crud/CrudRecordsController.ts
#	src/aux-records/crud/CrudRecordsControllerTests.ts
#	src/aux-records/index.ts
#	src/aux-records/webhooks/WebhookRecordsController.ts
#	src/aux-runtime/runtime/AuxLibrary.spec.ts
#	src/aux-runtime/runtime/AuxLibrary.ts
#	src/aux-runtime/runtime/AuxLibraryDefinitions.def
#	src/aux-runtime/runtime/RecordsEvents.ts
#	src/aux-server/aux-backend/prisma/index.ts
#	src/aux-server/aux-backend/schemas/auth.prisma
#	src/aux-server/aux-backend/shared/ServerBuilder.ts
#	src/aux-server/aux-web/aux-auth/site/index.ts
#	src/aux-vm/managers/RecordsManager.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:auth Everything related to the Auth Frontend. (Everything in aux-server/aux-web/aux-auth) area:backend Is related to the backend server. (Everything in aux-records and aux-server/aux-backend) area:player Is related to the player frontend. (Everything in aux-server/aux-web/aux-player) area:runtime Is related to the CasualOS runtime. (Everything in aux-runtime, aux-common, aux-vm, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants