niahere 0.2.78 → 0.2.79

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "niahere",
3
- "version": "0.2.78",
3
+ "version": "0.2.79",
4
4
  "description": "A personal AI assistant daemon — chat, scheduled jobs, persona system, extensible via skills.",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/cli/index.ts CHANGED
@@ -16,7 +16,7 @@ import { rulesCommand, memoryCommand } from "./self";
16
16
  import { watchCommand } from "./watch";
17
17
  import { agentCommand } from "./agent";
18
18
  import { employeeCommand } from "./employee";
19
- import { guardActiveEngines, parseGuardFlags } from "../core/engine-guard";
19
+ import { guardActiveEngines, parseGuardFlags, withDefaultWait } from "../core/engine-guard";
20
20
 
21
21
  // Set LOG_LEVEL from config before anything else logs
22
22
  try {
@@ -497,7 +497,7 @@ switch (command) {
497
497
  }
498
498
 
499
499
  case "update": {
500
- const updateGuard = parseGuardFlags(process.argv.slice(3));
500
+ const updateGuard = withDefaultWait(parseGuardFlags(process.argv.slice(3)), 1);
501
501
  const { version: currentVersion } = await import("../../package.json");
502
502
  console.log(`Current: v${currentVersion}`);
503
503
 
@@ -30,6 +30,11 @@ export function parseGuardFlags(args: string[]): GuardOptions {
30
30
  return { waitMinutes, force };
31
31
  }
32
32
 
33
+ export function withDefaultWait(opts: GuardOptions, defaultWaitMinutes: number): GuardOptions {
34
+ if (opts.force || opts.waitMinutes > 0) return opts;
35
+ return { ...opts, waitMinutes: defaultWaitMinutes };
36
+ }
37
+
33
38
  interface ActiveSummary {
34
39
  count: number;
35
40
  rooms: string[];
@@ -90,6 +90,7 @@ After config changes, run `nia restart` to apply.
90
90
  `nia stop`, `nia restart`, and `nia update` guard against active engines by default.
91
91
 
92
92
  - `--wait <minutes>` — poll every 5s, proceed when engines clear or timeout
93
+ - `nia update` waits up to 1 minute by default when engines are active
93
94
  - `--force` — skip the engine check, proceed immediately
94
95
 
95
96
  Config reference: