@lazyingart/agintiflow 0.20.40 → 0.20.41

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/README.md CHANGED
@@ -50,7 +50,7 @@ aginti --list-profiles
50
50
  aginti --sandbox-status
51
51
  ```
52
52
 
53
- When AgInTiFlow is installed globally from npm, normal `aginti`, `aginti chat`, `aginti resume`, and `aginti web` startup checks npm for a newer `@lazyingart/agintiflow` release at a throttled interval. If a newer version is found in an interactive terminal, AgInTiFlow shows an Up/Down selector with `Update now`, `Skip this time`, and `Skip this version`; updating runs `npm install -g @lazyingart/agintiflow@latest` and restarts the CLI once. Source checkouts and non-TTY automation skip this behavior. Force a check with `aginti update`, skip one run with `--no-auto-update`, or disable it with `AGINTIFLOW_NO_AUTO_UPDATE=1`.
53
+ When AgInTiFlow is installed globally from npm, normal `aginti`, `aginti chat`, `aginti resume`, and `aginti web` startup revalidates npm for a newer `@lazyingart/agintiflow` release before the session starts. If a newer version is found in an interactive terminal, AgInTiFlow shows an Up/Down selector with `Update now`, `Skip this time`, and `Skip this version`; updating runs `npm install -g @lazyingart/agintiflow@latest` and restarts the CLI once. Source checkouts, non-TTY automation, and utility commands skip this behavior. Force a check with `aginti update`, skip one run with `--no-auto-update`, disable it with `AGINTIFLOW_NO_AUTO_UPDATE=1`, or throttle startup checks with `AGINTIFLOW_AUTO_UPDATE_STARTUP_INTERVAL_MS`.
54
54
 
55
55
  On first interactive use, if no main model key is detected, `aginti` opens an auth wizard. Use Up/Down to choose DeepSeek, OpenAI, Qwen, or Venice, paste the key, and press Enter to save it to the project-local ignored file `.aginti/.env` with `0600` permissions. The wizard points to DeepSeek keys at `https://platform.deepseek.com/api_keys`, OpenAI keys at `https://platform.openai.com/api-keys`, and Venice at `https://venice.ai`. It then offers the optional auxiliary image key; press Esc to skip. You can rerun it even when keys already exist:
56
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazyingart/agintiflow",
3
- "version": "0.20.40",
3
+ "version": "0.20.41",
4
4
  "type": "module",
5
5
  "description": "AgInTiFlow is a web-first coding agent and CLI with DeepSeek routing, sandboxed tools, model providers, canvas artifacts, and optional wrappers.",
6
6
  "license": "Apache-2.0",
@@ -52,7 +52,9 @@ assert(skipped.skipped === "source-checkout", "source checkout update guard fail
52
52
 
53
53
  const tempHome = await fs.mkdtemp(path.join(os.tmpdir(), "agintiflow-auto-update-"));
54
54
  const previousHome = process.env.AGINTIFLOW_HOME;
55
+ const previousStartupInterval = process.env.AGINTIFLOW_AUTO_UPDATE_STARTUP_INTERVAL_MS;
55
56
  process.env.AGINTIFLOW_HOME = tempHome;
57
+ process.env.AGINTIFLOW_AUTO_UPDATE_STARTUP_INTERVAL_MS = String(24 * 60 * 60 * 1000);
56
58
  await fs.mkdir(tempHome, { recursive: true });
57
59
  await fs.writeFile(
58
60
  path.join(tempHome, "update-check.json"),
@@ -92,5 +94,7 @@ const repeatedSkip = await maybeAutoUpdate({
92
94
  assert(repeatedSkip.skipped === "skipped-version", "cached skipped version was not respected");
93
95
  if (previousHome === undefined) delete process.env.AGINTIFLOW_HOME;
94
96
  else process.env.AGINTIFLOW_HOME = previousHome;
97
+ if (previousStartupInterval === undefined) delete process.env.AGINTIFLOW_AUTO_UPDATE_STARTUP_INTERVAL_MS;
98
+ else process.env.AGINTIFLOW_AUTO_UPDATE_STARTUP_INTERVAL_MS = previousStartupInterval;
95
99
 
96
100
  console.log("auto-update smoke ok");
@@ -8,6 +8,7 @@ import { promisify } from "node:util";
8
8
  const execFileAsync = promisify(execFile);
9
9
  const DEFAULT_PACKAGE_NAME = "@lazyingart/agintiflow";
10
10
  const DEFAULT_CHECK_INTERVAL_MS = 6 * 60 * 60 * 1000;
11
+ const DEFAULT_STARTUP_CHECK_INTERVAL_MS = 0;
11
12
  const DEFAULT_FAILURE_RETRY_MS = 6 * 60 * 60 * 1000;
12
13
  const UPDATE_CHOICES = [
13
14
  {
@@ -97,6 +98,13 @@ export function shouldAutoUpdateCommand(argv = []) {
97
98
  return true;
98
99
  }
99
100
 
101
+ function isStartupUpdateCommand(argv = []) {
102
+ if (!shouldAutoUpdateCommand(argv)) return false;
103
+ const command = String(argv[0] || "").trim();
104
+ if (!command) return true;
105
+ return START_COMMANDS.has(command);
106
+ }
107
+
100
108
  function envDisablesAutoUpdate() {
101
109
  const noValues = [process.env.AGINTIFLOW_NO_AUTO_UPDATE, process.env.AGINTI_NO_AUTO_UPDATE].map((value) => String(value || "").toLowerCase());
102
110
  if (noValues.some((value) => ["1", "true", "yes", "on"].includes(value))) return true;
@@ -139,6 +147,13 @@ function checkIntervalMs() {
139
147
  return Number.isFinite(value) && value >= 0 ? value : DEFAULT_CHECK_INTERVAL_MS;
140
148
  }
141
149
 
150
+ function startupCheckIntervalMs() {
151
+ const raw = process.env.AGINTIFLOW_AUTO_UPDATE_STARTUP_INTERVAL_MS;
152
+ if (raw === undefined || raw === "") return DEFAULT_STARTUP_CHECK_INTERVAL_MS;
153
+ const value = Number(raw);
154
+ return Number.isFinite(value) && value >= 0 ? value : DEFAULT_STARTUP_CHECK_INTERVAL_MS;
155
+ }
156
+
142
157
  function failureRetryMs() {
143
158
  const raw = process.env.AGINTIFLOW_AUTO_UPDATE_FAILURE_RETRY_MS;
144
159
  if (raw === undefined || raw === "") return DEFAULT_FAILURE_RETRY_MS;
@@ -295,7 +310,8 @@ export async function maybeAutoUpdate({
295
310
  const cache = await readCache();
296
311
  let latest = String(cache.latest || "");
297
312
  const checkedAt = Number(cache.checkedAt || 0);
298
- const stale = force || currentMs - checkedAt >= checkIntervalMs();
313
+ const interval = !manual && !force && isStartupUpdateCommand(argv) ? startupCheckIntervalMs() : checkIntervalMs();
314
+ const stale = force || currentMs - checkedAt >= interval;
299
315
 
300
316
  if (stale || !latest) {
301
317
  try {