@aident-ai/cli 0.2.4-staging.ci.34436166151.1 → 0.3.0-rc.0

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.mjs CHANGED
@@ -8167,7 +8167,7 @@ function getConfigFile() {
8167
8167
  function getConfigFileForHome(home) {
8168
8168
  return join4(getAidentDir(home), "config.json");
8169
8169
  }
8170
- var DEFAULT_BASE_URL = "https://staging.loadout.aident.ai"?.trim() || "https://loadout.aident.ai";
8170
+ var DEFAULT_BASE_URL = "https://rc.loadout.aident.ai"?.trim() || "https://loadout.aident.ai";
8171
8171
  var CONFIG_KEYS = ["baseUrl", "packages"];
8172
8172
  async function readConfig(configFile = getConfigFile()) {
8173
8173
  try {
@@ -8460,7 +8460,7 @@ function serializeLoadoutSkillPackage(skillPackage) {
8460
8460
  }
8461
8461
 
8462
8462
  // src/version.ts
8463
- var VERSION = "0.2.4-staging.ci.34436166151.1";
8463
+ var VERSION = "0.3.0-rc.0";
8464
8464
  var DESKTOP_VERSION = process.env.AIDENT_DESKTOP_VERSION?.trim() || undefined;
8465
8465
  var DESKTOP_CHANNEL = parseDesktopChannel(process.env.AIDENT_DESKTOP_CHANNEL);
8466
8466
  function parseDesktopChannel(value) {
@@ -19093,6 +19093,15 @@ var LoadoutOnboardingErrorCode;
19093
19093
  LoadoutOnboardingErrorCode["UpdateCheckUnavailable"] = "update-check-unavailable";
19094
19094
  LoadoutOnboardingErrorCode["VerificationFailed"] = "verification-failed";
19095
19095
  })(LoadoutOnboardingErrorCode ||= {});
19096
+ var LoadoutOnboardingFailureDetailCode;
19097
+ ((LoadoutOnboardingFailureDetailCode) => {
19098
+ LoadoutOnboardingFailureDetailCode["VerificationAuthentication"] = "verification-authentication";
19099
+ LoadoutOnboardingFailureDetailCode["VerificationCliEntrypoint"] = "verification-cli-entrypoint";
19100
+ LoadoutOnboardingFailureDetailCode["VerificationDoctorCheck"] = "verification-doctor-check";
19101
+ LoadoutOnboardingFailureDetailCode["VerificationException"] = "verification-exception";
19102
+ LoadoutOnboardingFailureDetailCode["VerificationNodeVersion"] = "verification-node-version";
19103
+ LoadoutOnboardingFailureDetailCode["VerificationServerReachable"] = "verification-server-reachable";
19104
+ })(LoadoutOnboardingFailureDetailCode ||= {});
19096
19105
  var LoadoutOnboardingTelemetrySchema = objectType({
19097
19106
  schemaVersion: literalType(1),
19098
19107
  sessionId: stringType().uuid(),
@@ -19106,7 +19115,8 @@ var LoadoutOnboardingTelemetrySchema = objectType({
19106
19115
  desktopVersion: AidentSemverSchema.optional(),
19107
19116
  cliVersion: AidentSemverSchema.optional(),
19108
19117
  channel: nativeEnumType(AidentDesktopChannel).optional(),
19109
- errorCode: nativeEnumType(LoadoutOnboardingErrorCode).optional()
19118
+ errorCode: nativeEnumType(LoadoutOnboardingErrorCode).optional(),
19119
+ failureDetailCode: nativeEnumType(LoadoutOnboardingFailureDetailCode).optional()
19110
19120
  }).strict().superRefine((event, context) => {
19111
19121
  if (event.stage === "step_viewed" /* StepViewed */ && !event.stepId) {
19112
19122
  context.addIssue({ code: ZodIssueCode.custom, path: ["stepId"], message: "Step views require a step ID" });
@@ -19121,6 +19131,13 @@ var LoadoutOnboardingTelemetrySchema = objectType({
19121
19131
  message: "Only failures may include an error code"
19122
19132
  });
19123
19133
  }
19134
+ if (event.failureDetailCode && (event.status !== "failure" /* Failure */ || event.stage !== "verification_completed" /* VerificationCompleted */ || event.errorCode !== "verification-failed" /* VerificationFailed */)) {
19135
+ context.addIssue({
19136
+ code: ZodIssueCode.custom,
19137
+ path: ["failureDetailCode"],
19138
+ message: "Failure detail codes apply only to verification failures"
19139
+ });
19140
+ }
19124
19141
  });
19125
19142
  function normalizeLoadoutOnboardingErrorCode(value) {
19126
19143
  return Object.values(LoadoutOnboardingErrorCode).includes(value) ? value : "unknown" /* Unknown */;
@@ -19646,6 +19663,21 @@ var UPDATE_BLOCKED_PATHS = new Set([
19646
19663
  "/v1/setup/complete"
19647
19664
  ]);
19648
19665
  var CSP = "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src data:; connect-src 'self'; base-uri 'none'; form-action 'none'; frame-ancestors 'none'";
19666
+ function getVerificationFailureDetailCode(report, cliEntrypoint) {
19667
+ const failedCheck = report.checks.find((check) => !check.ok);
19668
+ if (failedCheck?.name === "Node.js >= 18")
19669
+ return "verification-node-version" /* VerificationNodeVersion */;
19670
+ if (failedCheck?.name === "Authenticated")
19671
+ return "verification-authentication" /* VerificationAuthentication */;
19672
+ if (failedCheck?.name === "Server reachable") {
19673
+ return "verification-server-reachable" /* VerificationServerReachable */;
19674
+ }
19675
+ if (failedCheck)
19676
+ return "verification-doctor-check" /* VerificationDoctorCheck */;
19677
+ if (!cliEntrypoint.ok)
19678
+ return "verification-cli-entrypoint" /* VerificationCliEntrypoint */;
19679
+ return "verification-doctor-check" /* VerificationDoctorCheck */;
19680
+ }
19649
19681
  async function startOnboardingBroker(options, dependencies = {}) {
19650
19682
  const service = new OnboardingService(options.baseUrl, {
19651
19683
  home: options.home,
@@ -19700,7 +19732,10 @@ async function startOnboardingBroker(options, dependencies = {}) {
19700
19732
  ...options.desktopVersion ? { desktopVersion: options.desktopVersion } : {},
19701
19733
  cliVersion: VERSION,
19702
19734
  ...options.desktopChannel ? { channel: options.desktopChannel } : {},
19703
- ...status === "failure" /* Failure */ ? { errorCode: normalizeLoadoutOnboardingErrorCode(details.errorCode) } : {}
19735
+ ...status === "failure" /* Failure */ ? {
19736
+ errorCode: normalizeLoadoutOnboardingErrorCode(details.errorCode),
19737
+ ...details.failureDetailCode ? { failureDetailCode: details.failureDetailCode } : {}
19738
+ } : {}
19704
19739
  }) ?? false;
19705
19740
  };
19706
19741
  const emitTelemetry = (stage, status, details = {}) => void genSubmitTelemetry(stage, status, details);
@@ -19966,19 +20001,27 @@ async function startOnboardingBroker(options, dependencies = {}) {
19966
20001
  let report;
19967
20002
  let cliEntrypoint;
19968
20003
  try {
19969
- report = await runDoctor({
20004
+ report = await (dependencies.runDoctor ?? runDoctor)({
19970
20005
  baseUrl: options.baseUrl,
19971
20006
  configFile: getConfigFile(),
19972
20007
  credentialsFile: getCredentialsFile()
19973
20008
  });
19974
20009
  cliEntrypoint = await (dependencies.inspectCliEntrypoint ?? inspectAidentCliEntrypoint)(service.home);
19975
20010
  } catch (error) {
19976
- emitTelemetry("verification_completed" /* VerificationCompleted */, "failure" /* Failure */, {
19977
- errorCode: "verification-failed" /* VerificationFailed */
20011
+ await genSubmitTelemetry("verification_completed" /* VerificationCompleted */, "failure" /* Failure */, {
20012
+ errorCode: "verification-failed" /* VerificationFailed */,
20013
+ failureDetailCode: "verification-exception" /* VerificationException */
19978
20014
  });
19979
20015
  throw error;
19980
20016
  }
19981
- emitTelemetry("verification_completed" /* VerificationCompleted */, report.ok && cliEntrypoint.ok ? "success" /* Success */ : "failure" /* Failure */, { errorCode: "verification-failed" /* VerificationFailed */ });
20017
+ if (report.ok && cliEntrypoint.ok) {
20018
+ emitTelemetry("verification_completed" /* VerificationCompleted */, "success" /* Success */);
20019
+ } else {
20020
+ await genSubmitTelemetry("verification_completed" /* VerificationCompleted */, "failure" /* Failure */, {
20021
+ errorCode: "verification-failed" /* VerificationFailed */,
20022
+ failureDetailCode: getVerificationFailureDetailCode(report, cliEntrypoint)
20023
+ });
20024
+ }
19982
20025
  return writeJson(response, report.ok && cliEntrypoint.ok ? 200 : 409, {
19983
20026
  ...report,
19984
20027
  ok: report.ok && cliEntrypoint.ok,
package/dist/dsh.mjs CHANGED
@@ -575,7 +575,7 @@ function getConfigFile() {
575
575
  function getConfigFileForHome(home) {
576
576
  return join(getAidentDir(home), "config.json");
577
577
  }
578
- var DEFAULT_BASE_URL = "https://staging.loadout.aident.ai"?.trim() || "https://loadout.aident.ai";
578
+ var DEFAULT_BASE_URL = "https://rc.loadout.aident.ai"?.trim() || "https://loadout.aident.ai";
579
579
  var CONFIG_KEYS = ["baseUrl", "packages"];
580
580
  async function readConfig(configFile = getConfigFile()) {
581
581
  try {
@@ -4679,7 +4679,7 @@ function serializeLoadoutSkillPackage(skillPackage) {
4679
4679
  }
4680
4680
 
4681
4681
  // src/version.ts
4682
- var VERSION = "0.2.4-staging.ci.34436166151.1";
4682
+ var VERSION = "0.3.0-rc.0";
4683
4683
  var DESKTOP_VERSION = process.env.AIDENT_DESKTOP_VERSION?.trim() || undefined;
4684
4684
  var DESKTOP_CHANNEL = parseDesktopChannel(process.env.AIDENT_DESKTOP_CHANNEL);
4685
4685
  function parseDesktopChannel(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aident-ai/cli",
3
- "version": "0.2.4-staging.ci.34436166151.1",
3
+ "version": "0.3.0-rc.0",
4
4
  "description": "Aident CLI — umbrella access to Loadout integrations, Playbook automation, Intern tools, and the Aident platform.",
5
5
  "homepage": "https://aident.ai",
6
6
  "repository": {
@@ -65,7 +65,7 @@
65
65
  "dsh",
66
66
  "deepseek-harness"
67
67
  ],
68
- "gitHead": "fa61a8431c8d466cc52c75be2851b84eb0a806f3",
68
+ "gitHead": "e3288c24a0775abf65cadb24ceb840c4bffc3c91",
69
69
  "scripts": {
70
70
  "build": "bun run scripts/build.ts",
71
71
  "dev": "AIDENT_CLI_VERSION=$npm_package_version bun run src/cli.ts",