@higherdev/cli 0.39.0 → 0.40.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.
package/dist/index.js CHANGED
@@ -95,6 +95,7 @@ async function cmdStatus() {
95
95
  const seconds = Math.max(0, Math.round(data.chat_reply_median_ms / 1_000));
96
96
  console.log(`\n${c.bold("Chat replies")} median ${seconds}s (last day)`);
97
97
  }
98
+ console.log(`\n${c.bold("Consults")} ${data.consults_today ?? 0} today`);
98
99
  }
99
100
  export function runAge(started, created, now = Date.now()) {
100
101
  const seconds = Math.max(0, Math.floor((now - Date.parse(started ?? created)) / 1000));
package/dist/tui/data.js CHANGED
@@ -71,6 +71,7 @@ export async function loadSnapshot(config = loadConfig(), options = {}) {
71
71
  },
72
72
  max_attempts: Number(workspaceData.workspace.settings.max_attempts ?? 3),
73
73
  chat_timeout_ms: Number(workspaceData.workspace.settings.chat_timeout_ms ?? 600_000),
74
+ consult_notice_after: Number(workspaceData.workspace.settings.consults?.notice_after ?? 3),
74
75
  },
75
76
  board: {
76
77
  tickets,
@@ -14,6 +14,8 @@ export function settingsRows(workspace, agents) {
14
14
  { key: "w:max_attempts", kind: "number", label: "max attempts", value: String(workspace.max_attempts) },
15
15
  { key: "w:chat_timeout_ms", kind: "number", label: "chat timeout",
16
16
  value: String(Math.round((workspace.chat_timeout_ms ?? 600_000) / 60_000)), hint: "minutes, integer >= 1" },
17
+ { key: "w:consults:notice_after", kind: "number", label: "consult notice after",
18
+ value: String(workspace.consult_notice_after ?? 3), hint: "integer >= 0" },
17
19
  ];
18
20
  for (const provider of providers) {
19
21
  rows.push({
@@ -89,6 +91,12 @@ export function editFor(row, raw) {
89
91
  return { ok: false, error: "chat timeout must be an integer >= 1 minute." };
90
92
  return { ok: true, value: { target: "workspace", fields: { chat_timeout_ms: number * 60_000 } } };
91
93
  }
94
+ if (id === "consults" && field === "notice_after") {
95
+ const number = Number(value);
96
+ if (!Number.isInteger(number) || number < 0)
97
+ return { ok: false, error: "consult notice must be an integer >= 0." };
98
+ return { ok: true, value: { target: "workspace", fields: { consults: { notice_after: number } } } };
99
+ }
92
100
  if (id === "auto_merge")
93
101
  return { ok: true, value: { target: "workspace", fields: { auto_merge: value === "yes" } } };
94
102
  if (!value)
@@ -156,6 +156,12 @@ export async function workspaceSet(argv) {
156
156
  throw new Error("--chat-timeout-minutes must be an integer >= 1");
157
157
  fields.chat_timeout_ms = value * 60_000;
158
158
  }
159
+ if (opts["consult-notice-after"]) {
160
+ const value = Number(opts["consult-notice-after"]);
161
+ if (!Number.isInteger(value) || value < 0)
162
+ throw new Error("--consult-notice-after must be an integer >= 0");
163
+ fields.consults = { notice_after: value };
164
+ }
159
165
  if (!Object.keys(fields).length)
160
166
  throw new Error(WORKSPACE_USAGE);
161
167
  return (await updateWorkspace(fields)).workspace;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@higherdev/cli",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",