@driftless-sh/cli 0.1.42 → 0.1.44

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/index.js CHANGED
@@ -214642,7 +214642,7 @@ async function installSkillCommand() {
214642
214642
  // src/commands/init.ts
214643
214643
  function getVersion() {
214644
214644
  try {
214645
- return "0.1.42";
214645
+ return "0.1.44";
214646
214646
  } catch {
214647
214647
  return "0.0.0";
214648
214648
  }
@@ -215112,7 +215112,7 @@ async function initCommand(args) {
215112
215112
  watchersSkipped++;
215113
215113
  }
215114
215114
  }
215115
- step("creating context", `${watchersCreated} topics \u2713`);
215115
+ step("creating context", `${watchersCreated} suggested \u2713`);
215116
215116
  } else {
215117
215117
  step("creating context", "skipped (use --suggest to auto-generate)");
215118
215118
  }
@@ -215129,14 +215129,14 @@ async function initCommand(args) {
215129
215129
  step("installing skill", skillLine);
215130
215130
  console.log("");
215131
215131
  console.log("\u2713 repo context bootstrapped");
215132
- console.log(` \u251C\u2500 topics ${suggest ? watchersCreated : "(use --suggest to generate)"}`);
215132
+ console.log(` \u251C\u2500 suggested ${suggest ? `${watchersCreated} topic(s) \u2014 pending review, not yet active` : "(use --suggest to generate)"}`);
215133
215133
  console.log(` \u251C\u2500 rules ${suggest ? rulesCreated : "(use --suggest to generate)"}`);
215134
215134
  console.log(` \u251C\u2500 docs found ${existingDocs.length} (ask your agent to sync them)`);
215135
215135
  console.log(` \u251C\u2500 components ${components.length}`);
215136
215136
  console.log(` \u2514\u2500 relations ${relationCount}`);
215137
215137
  console.log("");
215138
215138
  console.log(" dashboard \u2192 driftless.icu/ecosystem");
215139
- console.log(" next \u2192 driftless context list");
215139
+ console.log(` next \u2192 ${suggest && watchersCreated > 0 ? "driftless context list --suggested # review & confirm suggestions" : "driftless context list"}`);
215140
215140
  console.log("");
215141
215141
  console.log(DIVIDER);
215142
215142
  analyticsEvent("cli_init_run", workspaceSlug, {
@@ -216484,7 +216484,8 @@ async function saveConfig(apiKey, apiUrl) {
216484
216484
  init_api_client();
216485
216485
  var import_node_fs7 = require("node:fs");
216486
216486
  var import_node_path7 = require("node:path");
216487
- async function doctorCommand() {
216487
+ async function doctorCommand(args = []) {
216488
+ const isJSON = args.includes("--json");
216488
216489
  const checks = [];
216489
216490
  const apiKey = getApiKey();
216490
216491
  if (apiKey) {
@@ -216588,6 +216589,21 @@ async function doctorCommand() {
216588
216589
  } else {
216589
216590
  checks.push({ name: "GitHub App", status: "warn", detail: "Skipped (not a git repo)" });
216590
216591
  }
216592
+ if (isJSON) {
216593
+ const ok = checks.filter((c) => c.status === "ok").length;
216594
+ const warn = checks.filter((c) => c.status === "warn").length;
216595
+ const fail = checks.filter((c) => c.status === "fail").length;
216596
+ const out = {
216597
+ ok: fail === 0,
216598
+ summary: { ok, warn, fail },
216599
+ checks: checks.map((c) => ({ name: c.name, status: c.status, detail: c.detail }))
216600
+ };
216601
+ if (!resolution.ok && resolution.reason === "no_workspace" && resolution.diagnostics) {
216602
+ out["workspace_diagnostics"] = resolution.diagnostics;
216603
+ }
216604
+ console.log(JSON.stringify(out, null, 2));
216605
+ process.exit(fail > 0 ? 1 : 0);
216606
+ }
216591
216607
  const padWidth = Math.max(...checks.map((c) => c.name.length)) + 2;
216592
216608
  let okCount = 0;
216593
216609
  let warnCount = 0;
@@ -216619,7 +216635,7 @@ function pad2(s, n) {
216619
216635
  }
216620
216636
 
216621
216637
  // src/index.ts
216622
- var VERSION = "0.1.42";
216638
+ var VERSION = "0.1.44";
216623
216639
  var HELP_TEXT = `Driftless CLI v${VERSION} \u2014 Living repo context for humans and coding agents
216624
216640
 
216625
216641
  Install: npm install -g @driftless-sh/cli
@@ -216877,7 +216893,7 @@ async function main() {
216877
216893
  if (args[1] === "--help") {
216878
216894
  showCommandHelp("doctor");
216879
216895
  } else {
216880
- await doctorCommand();
216896
+ await doctorCommand(args.slice(1));
216881
216897
  }
216882
216898
  break;
216883
216899
  case "help":