@thallylabs/cli 0.7.0 → 0.8.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.
Files changed (2) hide show
  1. package/dist/index.js +56 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -13,7 +13,8 @@ var COMMANDS = [
13
13
  { name: "translate", summary: "Translate content into a locale", usage: "thally translate --locale <code>" },
14
14
  { name: "mcp", summary: "Start the Model Context Protocol server (stdio)", usage: "thally mcp" },
15
15
  { name: "agent", summary: "Draft docs from a task (PR, diff, or instruction) as a reviewed PR", usage: 'thally agent "<instruction>" [--diff <ref>] [--from-pr <url>] [--context-file <path>] [--dry-run] [--pr]' },
16
- { name: "track", summary: "Track product repos \u2014 their merged PRs become docs PRs", usage: "thally track <add|list|test|setup> [owner/repo] [--branch <base>] [--paths <globs>] [--pr <n>]" }
16
+ { name: "track", summary: "Track product repos \u2014 their merged PRs become docs PRs", usage: "thally track <add|list|test|setup> [owner/repo] [--branch <base>] [--paths <globs>] [--pr <n>]" },
17
+ { name: "starter", summary: "Review or apply an immutable starter runtime update", usage: "thally starter update [--apply]" }
17
18
  ];
18
19
  function parseArgs(argv) {
19
20
  const command = argv[0] && !argv[0].startsWith("-") ? argv[0] : void 0;
@@ -6451,6 +6452,57 @@ async function runTrackCommand(args) {
6451
6452
  return sub ? 1 : 0;
6452
6453
  }
6453
6454
 
6455
+ // src/commands/starter.ts
6456
+ import {
6457
+ updateStarterProject
6458
+ } from "create-thally-docs/starter-update";
6459
+ function formatPaths(label, paths) {
6460
+ if (paths.length === 0) return [];
6461
+ return [` ${label}:`, ...paths.map((path5) => ` - ${path5}`)];
6462
+ }
6463
+ function formatStarterUpdateResult(result) {
6464
+ if (result.isUpToDate) {
6465
+ return `
6466
+ Starter release ${result.targetRelease.starterVersion} is already current.
6467
+
6468
+ `;
6469
+ }
6470
+ const lines = [
6471
+ "",
6472
+ ` Starter ${result.previousRelease.starterVersion} \u2192 ${result.targetRelease.starterVersion}`,
6473
+ ` ${result.plan.copyPaths.length} copy/update \xB7 ${result.plan.deletePaths.length} delete \xB7 ${result.plan.conflictPaths.length} conflict \xB7 ${result.plan.manualReviewPaths.length} manual review`,
6474
+ "",
6475
+ ...formatPaths("Copy/update", result.plan.copyPaths),
6476
+ ...formatPaths("Delete", result.plan.deletePaths),
6477
+ ...formatPaths("Conflicts", result.plan.conflictPaths),
6478
+ ...formatPaths("Manual review", result.plan.manualReviewPaths),
6479
+ ""
6480
+ ];
6481
+ if (result.applied) {
6482
+ lines.push(" Starter update applied and provenance advanced.", "");
6483
+ } else if (result.plan.conflictPaths.length > 0) {
6484
+ lines.push(" Dry run only. Resolve conflicts before applying.", "");
6485
+ } else {
6486
+ lines.push(' Dry run only. Review the plan, then run "thally starter update --apply".', "");
6487
+ }
6488
+ return lines.join("\n");
6489
+ }
6490
+ async function runStarterCommand(args) {
6491
+ const subcommand = args.positionals[0];
6492
+ if (subcommand !== "update" || args.hasFlag("--help", "-h")) {
6493
+ process.stdout.write("\n Usage: thally starter update [--apply]\n\n");
6494
+ return subcommand && subcommand !== "update" ? 1 : 0;
6495
+ }
6496
+ const apply = args.hasFlag("--apply");
6497
+ const result = await updateStarterProject({
6498
+ targetDir: process.cwd(),
6499
+ apply,
6500
+ confirmed: apply
6501
+ });
6502
+ process.stdout.write(formatStarterUpdateResult(result));
6503
+ return result.plan.conflictPaths.length > 0 ? 1 : 0;
6504
+ }
6505
+
6454
6506
  // src/index.ts
6455
6507
  var [major] = process.versions.node.split(".").map(Number);
6456
6508
  if (major < 18) {
@@ -6505,6 +6557,9 @@ async function main() {
6505
6557
  case "track":
6506
6558
  requireProject();
6507
6559
  return runTrackCommand(args);
6560
+ case "starter":
6561
+ requireProject();
6562
+ return runStarterCommand(args);
6508
6563
  default:
6509
6564
  process.stderr.write(`
6510
6565
  Unknown command: ${args.command}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thallylabs/cli",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "The Thally CLI for authoring knowledge surfaces, tracing product changes, and keeping documentation checked.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@anthropic-ai/sdk": "^0.78.0",
27
- "@thallylabs/mcp": "0.9.0",
28
- "create-thally-docs": "0.9.0"
27
+ "@thallylabs/mcp": "0.10.0",
28
+ "create-thally-docs": "0.10.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@thallylabs/agent": "*",