codebase-snapshot 0.9.5 → 0.9.7

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.d.cts CHANGED
@@ -72,7 +72,13 @@ declare function parseCliArgs(argv: string[]): ParsedInvocation;
72
72
  * project's package manager.
73
73
  */
74
74
  declare function cleanInstallEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
75
- /** Runs the CLI and returns the process exit code. */
75
+ /**
76
+ * Runs one invocation, and mentions a newer release when there is one.
77
+ *
78
+ * The check is *started* before the command and awaited after it, so on any real work the request
79
+ * overlaps the command entirely and adds no wall time. The notice goes to stderr: stdout belongs
80
+ * to the payload, and a JSON consumer must never have to parse a suggestion.
81
+ */
76
82
  declare function main(argv?: string[]): Promise<number>;
77
83
  /** Coalesce bursts of filesystem events into one run. */
78
84
  declare const WATCH_DEBOUNCE_MS = 250;
package/dist/cli.d.ts CHANGED
@@ -72,7 +72,13 @@ declare function parseCliArgs(argv: string[]): ParsedInvocation;
72
72
  * project's package manager.
73
73
  */
74
74
  declare function cleanInstallEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
75
- /** Runs the CLI and returns the process exit code. */
75
+ /**
76
+ * Runs one invocation, and mentions a newer release when there is one.
77
+ *
78
+ * The check is *started* before the command and awaited after it, so on any real work the request
79
+ * overlaps the command entirely and adds no wall time. The notice goes to stderr: stdout belongs
80
+ * to the payload, and a JSON consumer must never have to parse a suggestion.
81
+ */
76
82
  declare function main(argv?: string[]): Promise<number>;
77
83
  /** Coalesce bursts of filesystem events into one run. */
78
84
  declare const WATCH_DEBOUNCE_MS = 250;
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
- import { buildAgentContract, runStdioServer, COMMAND_OPTION_SCOPE, commandsForOption, SKILL_NAME, renderSkill, renderContractText } from './chunk-4AHHSNGG.js';
2
- import { loadConfigFileDetailed, resolveConfig, validateSnapshot, describeManifestShapeProblem, explainPath, compareManifests, loadManifest, renderDiffText, generateSnapshot, formatNumber, GENERATOR_VERSION, isDiscoveryMode, ARTIFACT_NAMES, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, PromptCancelled, planFirstRun, isEffectivelyEmpty, isInteractive, defaultIO, hasPriorSnapshot, DEFAULT_ANSWERS, findConfigFile, firstRunMessage, parseByteSize, gitignorePath, appendGitignoreEntries, escapeControls, MIN_MAX_PART_BYTES, renderExplainText } from './chunk-B336MMNC.js';
1
+ import { buildAgentContract, runStdioServer, COMMAND_OPTION_SCOPE, commandsForOption, SKILL_NAME, renderSkill, renderContractText } from './chunk-DPK6ZTOG.js';
2
+ import { shouldCheck, checkForUpdate, GENERATOR_VERSION, cacheFilePath, formatUpdateNotice, loadConfigFileDetailed, resolveConfig, validateSnapshot, describeManifestShapeProblem, explainPath, compareManifests, loadManifest, renderDiffText, generateSnapshot, formatNumber, isDiscoveryMode, ARTIFACT_NAMES, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, PromptCancelled, planFirstRun, isEffectivelyEmpty, isInteractive, defaultIO, hasPriorSnapshot, DEFAULT_ANSWERS, findConfigFile, firstRunMessage, parseByteSize, gitignorePath, appendGitignoreEntries, escapeControls, MIN_MAX_PART_BYTES, renderExplainText } from './chunk-QABL7NRC.js';
3
3
  import { spawnSync } from 'child_process';
4
4
  import * as fs from 'fs';
5
5
  import * as path2 from 'path';
@@ -145,6 +145,7 @@ var CLI_OPTIONS = {
145
145
  install: { type: "boolean" },
146
146
  "no-install": { type: "boolean" },
147
147
  target: { type: "string" },
148
+ "no-update-check": { type: "boolean" },
148
149
  help: { type: "boolean", short: "h" },
149
150
  version: { type: "boolean", short: "v" }
150
151
  };
@@ -219,6 +220,8 @@ Options:
219
220
  --install Write the skill into the repository instead of printing
220
221
  --target <name> claude | cursor | all (default: all)
221
222
 
223
+ --no-update-check Skip the daily check for a newer published version
224
+
222
225
  -h, --help Display this help message
223
226
  -v, --version Display version
224
227
 
@@ -843,6 +846,17 @@ function requestsJsonFormat(argv) {
843
846
  return format === "json";
844
847
  }
845
848
  async function main(argv = process.argv.slice(2)) {
849
+ const pending = process.stdout.isTTY === true && shouldCheck(argv, process.env) ? checkForUpdate({ current: GENERATOR_VERSION, cacheFile: cacheFilePath() }) : null;
850
+ const code = await runCommand(argv);
851
+ if (pending) {
852
+ const notice = await pending;
853
+ if (notice) process.stderr.write(`
854
+ ${formatUpdateNotice(notice)}
855
+ `);
856
+ }
857
+ return code;
858
+ }
859
+ async function runCommand(argv) {
846
860
  let invocation;
847
861
  try {
848
862
  invocation = parseCliArgs(argv);