@ours.network/cli 2.0.3 → 2.1.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.
@@ -96,7 +96,7 @@ export declare const COMMAND_GROUPS: {
96
96
  readonly handler: "setup";
97
97
  readonly summary: "Write one or more safe daemon settings noninteractively.";
98
98
  readonly effects: "Writes a mode-0600 JSON config unless --dry-run is used. Unknown and secret fields already present are preserved and never printed.";
99
- readonly example: "ours config setup --port 3070 --state-dir /srv/ours-a --api-visibility owner";
99
+ readonly example: "ours config setup --port 3070 --state-dir /srv/ours-a --history-max-bytes 104857600 --api-visibility owner";
100
100
  };
101
101
  };
102
102
  };
package/dist/commands.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  IDENTITY_PREBIND_EXCEPTIONS,
5
5
  commandSpec,
6
6
  isCommandGroup
7
- } from "./chunk-QKDH6CJR.js";
7
+ } from "./chunk-GQHDQR6I.js";
8
8
  export {
9
9
  COMMAND_GROUPS,
10
10
  DESTRUCTIVE_OPERATIONS,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  setupConfig,
3
3
  showConfig
4
- } from "./chunk-DRQEV4SN.js";
4
+ } from "./chunk-3C5WAQAT.js";
5
5
  import "./chunk-6K2JBKHI.js";
6
6
  export {
7
7
  setupConfig,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  assertConfigNotDrifted,
3
3
  loadConfig
4
- } from "./chunk-FXKFSNKS.js";
4
+ } from "./chunk-DTWZF3ZG.js";
5
5
 
6
6
  // ../../src/internal/daemon.ts
7
7
  import * as fs2 from "node:fs";
@@ -204,7 +204,7 @@ async function releaseHeld(lock) {
204
204
  async function bootKernel() {
205
205
  const { lock, acquired } = await ensureLock();
206
206
  try {
207
- const { bootWrapper } = await import("./boot-BUGOBQGZ.js");
207
+ const { bootWrapper } = await import("./boot-QLA3LXVX.js");
208
208
  await bootWrapper();
209
209
  } catch (error) {
210
210
  if (acquired) await releaseHeld(lock);
@@ -214,7 +214,7 @@ async function bootKernel() {
214
214
  async function startDaemon(opts = {}) {
215
215
  const { lock, acquired } = await ensureLock();
216
216
  try {
217
- const runtime = await import("./server-TVV2EZZ6.js");
217
+ const runtime = await import("./server-3PM3QOPD.js");
218
218
  const { onRuntimeLoaded, ...daemonOptions } = opts;
219
219
  onRuntimeLoaded?.();
220
220
  const handle = await runtime.startDaemon({
package/dist/help.js CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  helpRequestPath,
4
4
  renderHelp,
5
5
  renderTopHelp
6
- } from "./chunk-NNHFXFLS.js";
6
+ } from "./chunk-H7DX6EHZ.js";
7
7
  import "./chunk-MS4TDUZY.js";
8
8
  import "./chunk-6NFATG6P.js";
9
- import "./chunk-QKDH6CJR.js";
9
+ import "./chunk-GQHDQR6I.js";
10
10
  export {
11
11
  helpHint,
12
12
  helpRequestPath,
package/dist/lifecycle.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  startDaemonManaged,
11
11
  stopDaemonManaged,
12
12
  writeManagedRecord
13
- } from "./chunk-UIWEBE5K.js";
13
+ } from "./chunk-UHYUIHM2.js";
14
14
  import "./chunk-6K2JBKHI.js";
15
15
  export {
16
16
  DAEMON_LOG_FILE,
package/dist/main.js CHANGED
@@ -12,12 +12,12 @@ import {
12
12
  import {
13
13
  setupConfig,
14
14
  showConfig
15
- } from "./chunk-DRQEV4SN.js";
15
+ } from "./chunk-3C5WAQAT.js";
16
16
  import {
17
17
  helpHint,
18
18
  helpRequestPath,
19
19
  renderHelp
20
- } from "./chunk-NNHFXFLS.js";
20
+ } from "./chunk-H7DX6EHZ.js";
21
21
  import {
22
22
  invokeOperation,
23
23
  isOperationName,
@@ -37,14 +37,14 @@ import {
37
37
  IDENTITY_PREBIND_EXCEPTIONS,
38
38
  commandSpec,
39
39
  isCommandGroup
40
- } from "./chunk-QKDH6CJR.js";
40
+ } from "./chunk-GQHDQR6I.js";
41
41
  import {
42
42
  DEFAULT_DAEMON_READINESS_TIMEOUT_MS,
43
43
  inspectDaemon,
44
44
  serveDaemon,
45
45
  startDaemonManaged,
46
46
  stopDaemonManaged
47
- } from "./chunk-UIWEBE5K.js";
47
+ } from "./chunk-UHYUIHM2.js";
48
48
  import {
49
49
  attachClient,
50
50
  defaultConfigPath,
@@ -55,7 +55,7 @@ import {
55
55
  import { existsSync, readFileSync } from "node:fs";
56
56
  import { homedir } from "node:os";
57
57
  import { join, resolve } from "node:path";
58
- var CLI_VERSION = false ? "0.0.0-dev" : "2.0.3";
58
+ var CLI_VERSION = false ? "0.0.0-dev" : "2.1.0";
59
59
  var COMMON_VALUES = /* @__PURE__ */ new Set(["--endpoint", "--port", "--state-dir", "--config", "--identity"]);
60
60
  var COMMON_BOOLEANS = /* @__PURE__ */ new Set(["--json", "--yes", "--help"]);
61
61
  var DAEMON_READINESS_TIMEOUT_ENV = "OURS_DAEMON_READINESS_TIMEOUT_MS";
@@ -164,7 +164,13 @@ async function runGrouped(group, args, io) {
164
164
  return 0;
165
165
  }
166
166
  async function runConfig(args, io) {
167
- const values = /* @__PURE__ */ new Set([...COMMON_VALUES, "--broker-url", "--gc-interval-ms", "--api-visibility"]);
167
+ const values = /* @__PURE__ */ new Set([
168
+ ...COMMON_VALUES,
169
+ "--broker-url",
170
+ "--gc-interval-ms",
171
+ "--history-max-bytes",
172
+ "--api-visibility"
173
+ ]);
168
174
  const flags = parseFlags(args, values, /* @__PURE__ */ new Set(["--json", "--dry-run", "--help"]));
169
175
  const action = flags.positionals[0];
170
176
  const spec = action === void 0 ? void 0 : commandSpec("config", action);
@@ -179,6 +185,9 @@ async function runConfig(args, io) {
179
185
  if (flags.values["--port"]) patch.port = parseInteger(flags.values["--port"], "--port", 1, 65535);
180
186
  if (flags.values["--state-dir"]) patch.stateDir = resolve(flags.values["--state-dir"]);
181
187
  if (flags.values["--gc-interval-ms"]) patch.gcIntervalMs = parseInteger(flags.values["--gc-interval-ms"], "--gc-interval-ms", 1);
188
+ if (flags.values["--history-max-bytes"]) {
189
+ patch.historyMaxBytes = parseInteger(flags.values["--history-max-bytes"], "--history-max-bytes", 0);
190
+ }
182
191
  if (flags.values["--api-visibility"]) {
183
192
  const visibility = flags.values["--api-visibility"];
184
193
  if (!["owner", "shared", "open"].includes(visibility)) throw new CliUsageError("--api-visibility must be owner, shared, or open");