@scheduler-systems/gal-run 0.0.282 → 0.0.284

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.cjs +11 -9
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -3970,7 +3970,7 @@ var cliVersion, defaultApiUrl, BUILD_CONSTANTS, constants_default;
3970
3970
  var init_constants = __esm({
3971
3971
  "src/constants.ts"() {
3972
3972
  "use strict";
3973
- cliVersion = true ? "0.0.282" : "0.0.0-dev";
3973
+ cliVersion = true ? "0.0.284" : "0.0.0-dev";
3974
3974
  defaultApiUrl = true ? "https://api.gal.run" : "http://localhost:3000";
3975
3975
  BUILD_CONSTANTS = Object.freeze([cliVersion, defaultApiUrl]);
3976
3976
  constants_default = BUILD_CONSTANTS;
@@ -4812,7 +4812,7 @@ function detectEnvironment() {
4812
4812
  return "dev";
4813
4813
  }
4814
4814
  try {
4815
- const version = true ? "0.0.282" : void 0;
4815
+ const version = true ? "0.0.284" : void 0;
4816
4816
  if (version && version.includes("-local")) {
4817
4817
  return "dev";
4818
4818
  }
@@ -5181,7 +5181,7 @@ function getId() {
5181
5181
  }
5182
5182
  function getCliVersion() {
5183
5183
  try {
5184
- return true ? "0.0.282" : "0.0.0-dev";
5184
+ return true ? "0.0.284" : "0.0.0-dev";
5185
5185
  } catch {
5186
5186
  return "0.0.0-dev";
5187
5187
  }
@@ -7833,9 +7833,9 @@ var init_feature_flags2 = __esm({
7833
7833
  )
7834
7834
  };
7835
7835
  INTERNAL_OPTIONS = {
7836
- // sync command: --check, --regenerate, --auto, --output-json are internal workflow flags
7836
+ // sync command: --regenerate, --auto, and --output-json are internal workflow flags.
7837
+ // --check is public because the local-first flow instructs users to validate after approve.
7837
7838
  sync: [
7838
- { flag: "--check", audience: "internal" },
7839
7839
  { flag: "--regenerate", audience: "internal" },
7840
7840
  { flag: "--auto", audience: "internal" },
7841
7841
  { flag: "--output-json", audience: "internal" }
@@ -31238,13 +31238,13 @@ if (!state) {
31238
31238
  }
31239
31239
  }
31240
31240
 
31241
- if (state && state.lastSyncHash !== state.approvedConfigHash) {
31241
+ if (state && state.approvedConfigHash && state.lastSyncHash !== state.approvedConfigHash) {
31242
31242
  try {
31243
31243
  execSync('gal sync --pull --auto', { stdio: 'pipe', timeout: 5000 });
31244
31244
  state = readSyncState();
31245
31245
  } catch {}
31246
31246
 
31247
- if (state && state.lastSyncHash !== state.approvedConfigHash) {
31247
+ if (state && state.approvedConfigHash && state.lastSyncHash !== state.approvedConfigHash) {
31248
31248
  const days = Math.floor((Date.now() - new Date(state.lastSyncTimestamp).getTime()) / (24 * 60 * 60 * 1000));
31249
31249
  showMessage(\`\\u26a0\\ufe0f GAL: Config is \${days} day(s) behind \${state.organization}'s approved version.\\nRun: gal sync --pull\`, 'config_outdated');
31250
31250
  return;
@@ -32418,7 +32418,9 @@ function writeSyncStateV2(orgName, platformStates, hookSettings) {
32418
32418
  lastSyncTimestamp: primaryState?.lastSyncTimestamp,
32419
32419
  syncedFiles: primaryState?.syncedFiles,
32420
32420
  policyName: primaryState?.policyName,
32421
- version: primaryState?.approvedConfigVersion
32421
+ version: primaryState?.approvedConfigVersion,
32422
+ // After a successful sync, approved hash matches local hash
32423
+ approvedConfigHash: primaryState?.lastSyncHash
32422
32424
  };
32423
32425
  (0, import_fs19.writeFileSync)(statePath, JSON.stringify(state, null, 2), "utf-8");
32424
32426
  }
@@ -54538,7 +54540,7 @@ var init_index = __esm({
54538
54540
  });
54539
54541
 
54540
54542
  // src/bootstrap.ts
54541
- var cliVersion10 = true ? "0.0.282" : "0.0.0-dev";
54543
+ var cliVersion10 = true ? "0.0.284" : "0.0.0-dev";
54542
54544
  var args = process.argv.slice(2);
54543
54545
  var requestedGlobalHelp = args.length === 1 && (args[0] === "--help" || args[0] === "-h");
54544
54546
  var requestedVersion = args.length === 1 && (args[0] === "--version" || args[0] === "-V");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scheduler-systems/gal-run",
3
- "version": "0.0.282",
3
+ "version": "0.0.284",
4
4
  "description": "GAL CLI - Command-line tool for managing AI agent configurations across your organization",
5
5
  "license": "Elastic-2.0",
6
6
  "private": false,