casualos 3.7.1 → 3.8.0-alpha.18204122333

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +38 -10
  2. package/package.json +4 -4
package/dist/cli.js CHANGED
@@ -89576,6 +89576,10 @@ var MemoryPartitionImpl = class {
89576
89576
  ...ensureBotIsSerializable(event.bot),
89577
89577
  space: this.space
89578
89578
  };
89579
+ const existingBot = this.state[event.bot.id];
89580
+ if (existingBot && existingBot.masks) {
89581
+ bot.masks = existingBot.masks;
89582
+ }
89579
89583
  if (createdNewState) {
89580
89584
  this.state[event.bot.id] = bot;
89581
89585
  } else {
@@ -93463,7 +93467,7 @@ var trace = TraceAPI.getInstance();
93463
93467
  function hashLowEntropyPasswordWithSalt2(password, salt) {
93464
93468
  const tracer = trace.getTracer(
93465
93469
  "InstrumentedHashHelpers",
93466
- false ? void 0 : "v3.7.1"
93470
+ false ? void 0 : "v3.8.0-alpha.18204122333"
93467
93471
  );
93468
93472
  return tracer.startActiveSpan(
93469
93473
  "hashLowEntropyPasswordWithSalt",
@@ -93481,7 +93485,7 @@ function hashLowEntropyPasswordWithSalt2(password, salt) {
93481
93485
  function hashHighEntropyPasswordWithSalt2(password, salt) {
93482
93486
  const tracer = trace.getTracer(
93483
93487
  "InstrumentedHashHelpers",
93484
- false ? void 0 : "v3.7.1"
93488
+ false ? void 0 : "v3.8.0-alpha.18204122333"
93485
93489
  );
93486
93490
  return tracer.startActiveSpan(
93487
93491
  "hashHighEntropyPasswordWithSalt",
@@ -93499,7 +93503,7 @@ function hashHighEntropyPasswordWithSalt2(password, salt) {
93499
93503
  function verifyPasswordAgainstHashes2(password, salt, hashes) {
93500
93504
  const tracer = trace.getTracer(
93501
93505
  "InstrumentedHashHelpers",
93502
- false ? void 0 : "v3.7.1"
93506
+ false ? void 0 : "v3.8.0-alpha.18204122333"
93503
93507
  );
93504
93508
  return tracer.startActiveSpan(
93505
93509
  "verifyPasswordAgainstHashes",
@@ -100891,7 +100895,7 @@ var import_semantic_conventions = __toESM(require_src3());
100891
100895
  function traced(tracerName, options = {}, metricOptions = {}) {
100892
100896
  const tracer = trace.getTracer(
100893
100897
  tracerName,
100894
- false ? void 0 : "v3.7.1"
100898
+ false ? void 0 : "v3.8.0-alpha.18204122333"
100895
100899
  );
100896
100900
  return function(target, propertyKey, descriptor) {
100897
100901
  const originalMethod = descriptor.value;
@@ -100973,7 +100977,7 @@ function getHistogram(meter) {
100973
100977
  }
100974
100978
  return metrics.getMeter(
100975
100979
  meter.meter,
100976
- false ? void 0 : "v3.7.1"
100980
+ false ? void 0 : "v3.8.0-alpha.18204122333"
100977
100981
  ).createHistogram(meter.name, meter.options);
100978
100982
  }
100979
100983
  function getCounter(meter) {
@@ -100982,7 +100986,7 @@ function getCounter(meter) {
100982
100986
  }
100983
100987
  return metrics.getMeter(
100984
100988
  meter.meter,
100985
- false ? void 0 : "v3.7.1"
100989
+ false ? void 0 : "v3.8.0-alpha.18204122333"
100986
100990
  ).createCounter(meter.name, meter.options);
100987
100991
  }
100988
100992
  function traceHttpResponse(options = {}) {
@@ -111468,7 +111472,7 @@ var RecordsServer = class {
111468
111472
  this._databaseRecordsController = databaseRecordsController;
111469
111473
  this._tracer = trace.getTracer(
111470
111474
  "RecordsServer",
111471
- false ? void 0 : "v3.7.1"
111475
+ false ? void 0 : "v3.8.0-alpha.18204122333"
111472
111476
  );
111473
111477
  this._procedures = this._createProcedures();
111474
111478
  this._setupRoutes();
@@ -113724,6 +113728,26 @@ var RecordsServer = class {
113724
113728
  });
113725
113729
  return result;
113726
113730
  }),
113731
+ aiListChatModels: procedure().origins("api").http("GET", "/api/v2/ai/chat/models").inputs(z.object({})).handler(async (_2, context) => {
113732
+ if (!this._aiController) {
113733
+ return AI_NOT_SUPPORTED_RESULT;
113734
+ }
113735
+ const sessionKeyValidation = await this._validateSessionKey(
113736
+ context.sessionKey
113737
+ );
113738
+ if (sessionKeyValidation.success === false) {
113739
+ if (sessionKeyValidation.errorCode === "no_session_key") {
113740
+ return NOT_LOGGED_IN_RESULT;
113741
+ }
113742
+ return sessionKeyValidation;
113743
+ }
113744
+ const result = await this._aiController.listChatModels({
113745
+ userId: sessionKeyValidation.userId,
113746
+ userSubscriptionTier: sessionKeyValidation.subscriptionTier,
113747
+ userRole: sessionKeyValidation.role
113748
+ });
113749
+ return genericResult(result);
113750
+ }),
113727
113751
  createAiSkybox: procedure().origins("api").http("POST", "/api/v2/ai/skybox").inputs(
113728
113752
  z.object({
113729
113753
  prompt: z.string().nonempty().max(600),
@@ -114580,8 +114604,8 @@ var RecordsServer = class {
114580
114604
  return {
114581
114605
  success: true,
114582
114606
  ...metadata,
114583
- version: true ? "v3.7.1" : void 0,
114584
- versionHash: true ? "6da6837d017e8c884682bf766a125eb0c085ec33" : void 0
114607
+ version: true ? "v3.8.0-alpha.18204122333" : void 0,
114608
+ versionHash: true ? "61916dc671764c173e2e371073f08df6985b866f" : void 0
114585
114609
  };
114586
114610
  })
114587
114611
  };
@@ -131525,6 +131549,10 @@ var WebhookRecordsController = class extends CrudRecordsController {
131525
131549
  fetchTimeoutMs: checkMetrics.features.fetchTimeoutMs ?? 5e3,
131526
131550
  addStateTimeoutMs: checkMetrics.features.addStateTimeoutMs ?? 1e3
131527
131551
  };
131552
+ console.log(
131553
+ `[WebhookRecordsController] [recordName: ${recordName} address: ${webhook.address}] Running webhook with options`,
131554
+ options
131555
+ );
131528
131556
  const result = await this._environment.handleHttpRequest({
131529
131557
  state,
131530
131558
  recordName: stateRecordName,
@@ -146324,7 +146352,7 @@ var config = new Conf({
146324
146352
  projectName: "casualos-cli"
146325
146353
  });
146326
146354
  var program2 = new Command();
146327
- program2.name("casualos").description("A CLI for CasualOS").version("v3.7.1").option(
146355
+ program2.name("casualos").description("A CLI for CasualOS").version("v3.8.0-alpha.18204122333").option(
146328
146356
  "-e, --endpoint <url>",
146329
146357
  "The endpoint to use for queries. Can be used to override the current endpoint."
146330
146358
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "casualos",
3
- "version": "3.7.1",
3
+ "version": "3.8.0-alpha.18204122333",
4
4
  "description": "Command line interface for CasualOS.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "index.d.ts",
@@ -35,8 +35,8 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@casual-simulation/aux-common": "^3.7.1",
39
- "@casual-simulation/aux-records": "^3.7.1",
38
+ "@casual-simulation/aux-common": "^3.8.0-alpha.18204122333",
39
+ "@casual-simulation/aux-records": "^3.8.0-alpha.18204122333",
40
40
  "@octokit/app": "^15.1.0",
41
41
  "@octokit/auth-oauth-device": "^7.1.1",
42
42
  "@octokit/core": "^6.1.2",
@@ -63,5 +63,5 @@
63
63
  "**/*.def",
64
64
  "templates/**"
65
65
  ],
66
- "gitHead": "6da6837d017e8c884682bf766a125eb0c085ec33"
66
+ "gitHead": "61916dc671764c173e2e371073f08df6985b866f"
67
67
  }