@m8t-stack/cli 0.2.38 → 0.2.40

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.
package/dist/cli.js CHANGED
@@ -1298,7 +1298,7 @@ var init_enable_hosted_brain = __esm({
1298
1298
  import { Builtins, Cli } from "clipanion";
1299
1299
 
1300
1300
  // src/lib/package-version.ts
1301
- var CLI_VERSION = "0.2.38";
1301
+ var CLI_VERSION = "0.2.40";
1302
1302
 
1303
1303
  // src/lib/render-error.ts
1304
1304
  init_errors();
@@ -26928,8 +26928,7 @@ function orderNewest(values) {
26928
26928
  return values.sort((a, b) => b.createdAt - a.createdAt || a.ordinal - b.ordinal || b.id.localeCompare(a.id));
26929
26929
  }
26930
26930
  async function findOnboardingProfile(args) {
26931
- const userId = decodeFoundryUser(args.token);
26932
- if (!userId) return { ...EMPTY_PROFILE_RESULT };
26931
+ if (!decodeFoundryUser(args.token)) return { ...EMPTY_PROFILE_RESULT };
26933
26932
  const doFetch = args.fetchImpl ?? fetch;
26934
26933
  const H = { Authorization: `Bearer ${args.token}` };
26935
26934
  const base = args.endpoint.replace(/\/+$/, "");
@@ -26942,7 +26941,7 @@ async function findOnboardingProfile(args) {
26942
26941
  const conversations = orderNewest(listed.flatMap((value, ordinal) => {
26943
26942
  if (!isRecord(value) || typeof value.id !== "string" || value.id.length === 0 || !isRecord(value.metadata)) return [];
26944
26943
  const metadata = value.metadata;
26945
- if (metadata.app !== "m8t-webapp" || metadata.agent !== "stacey-intake" || metadata.userId !== userId) return [];
26944
+ if (metadata.app !== "m8t-webapp" || metadata.agent !== "stacey-intake") return [];
26946
26945
  return [{
26947
26946
  id: value.id,
26948
26947
  createdAt: timestamp(value.created_at) !== Number.NEGATIVE_INFINITY ? timestamp(value.created_at) : timestamp(metadata.createdAt),