hivenet 0.4.1 → 0.4.2

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.
@@ -6,7 +6,7 @@ import {
6
6
  ownerApi,
7
7
  require_arg,
8
8
  resolveApiOrigin
9
- } from "./chunk-K4DIOYVH.js";
9
+ } from "./chunk-WWPF6V2Y.js";
10
10
 
11
11
  // src/owner.ts
12
12
  var import_arg = __toESM(require_arg(), 1);
@@ -22,7 +22,7 @@ var OWNER_FLAGS = {
22
22
  };
23
23
  async function buildApi(args) {
24
24
  const secretKey = args["--secret"] ?? process.env[SECRET_ENV_VAR];
25
- if (!secretKey || !secretKey.startsWith("hv_sec_")) {
25
+ if (!secretKey?.startsWith("hv_sec_")) {
26
26
  throw new FeedbackError(
27
27
  `An owner secret key is required (hv_sec_\u2026, from your project's Settings).
28
28
  Pass --secret <key> or set ${SECRET_ENV_VAR}.`
@@ -47,12 +47,20 @@ function printEvent(event, verbose = false) {
47
47
  console.log(` \u21B3 note: ${event.triage_note}`);
48
48
  }
49
49
  if (verbose) {
50
- console.log(` thread ${event.thread_id} \xB7 telemetry ${event.consent_telemetry ? "on" : "off"}`);
50
+ console.log(
51
+ ` thread ${event.thread_id} \xB7 telemetry ${event.consent_telemetry ? "on" : "off"}`
52
+ );
51
53
  }
52
54
  }
53
55
  async function runInbox(argv) {
54
56
  const args = (0, import_arg.default)(
55
- { ...OWNER_FLAGS, "--status": String, "--category": String, "--thread": String, "--limit": Number },
57
+ {
58
+ ...OWNER_FLAGS,
59
+ "--status": String,
60
+ "--category": String,
61
+ "--thread": String,
62
+ "--limit": Number
63
+ },
56
64
  { argv }
57
65
  );
58
66
  if (args["--help"]) {
@@ -68,7 +76,9 @@ async function runInbox(argv) {
68
76
  }
69
77
  const status = args["--status"];
70
78
  if (status && !EVENT_STATUSES.includes(status)) {
71
- throw new FeedbackError(`Invalid --status "${status}". Expected: ${EVENT_STATUSES.join(", ")}.`);
79
+ throw new FeedbackError(
80
+ `Invalid --status "${status}". Expected: ${EVENT_STATUSES.join(", ")}.`
81
+ );
72
82
  }
73
83
  const api = await buildApi(args);
74
84
  const result = await api.listFeedback({
@@ -90,11 +100,16 @@ async function runInbox(argv) {
90
100
  for (const event of result.events) {
91
101
  printEvent(event);
92
102
  }
93
- console.log(`
94
- Triage: npx hivenet triage <eventId> --status <${EVENT_STATUSES.join("|")}> [--note "\u2026"]`);
103
+ console.log(
104
+ `
105
+ Triage: npx hivenet triage <eventId> --status <${EVENT_STATUSES.join("|")}> [--note "\u2026"]`
106
+ );
95
107
  }
96
108
  async function runTriage(argv) {
97
- const args = (0, import_arg.default)({ ...OWNER_FLAGS, "--status": String, "--note": String, "--link": String }, { argv });
109
+ const args = (0, import_arg.default)(
110
+ { ...OWNER_FLAGS, "--status": String, "--note": String, "--link": String },
111
+ { argv }
112
+ );
98
113
  if (args["--help"] || args._.length === 0) {
99
114
  console.log(`
100
115
  Usage
@@ -121,7 +136,11 @@ async function runTriage(argv) {
121
136
  if (args["--link"]) {
122
137
  await api.addLink(id, args["--link"]);
123
138
  }
124
- const event = status ? (await api.setFeedbackStatus(id, status, args["--note"] !== void 0 ? args["--note"] : void 0)).event : (await api.getFeedback(id)).event;
139
+ const event = status ? (await api.setFeedbackStatus(
140
+ id,
141
+ status,
142
+ args["--note"] !== void 0 ? args["--note"] : void 0
143
+ )).event : (await api.getFeedback(id)).event;
125
144
  if (args["--json"]) {
126
145
  console.log(JSON.stringify({ event }, null, 2));
127
146
  return;
@@ -186,7 +205,10 @@ async function runIssues(argv) {
186
205
  }
187
206
  }
188
207
  async function runIssue(argv) {
189
- const args = (0, import_arg.default)({ ...OWNER_FLAGS, "--status": String, "--note": String, "--link": String }, { argv });
208
+ const args = (0, import_arg.default)(
209
+ { ...OWNER_FLAGS, "--status": String, "--note": String, "--link": String },
210
+ { argv }
211
+ );
190
212
  if (args["--help"] || args._.length === 0) {
191
213
  console.log(`
192
214
  Usage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hivenet",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Submit feedback about any agentic system's tools, docs, CLI, or MCP server \u2014 from any AI agent or human",
5
5
  "keywords": [
6
6
  "agent",
@@ -18,6 +18,16 @@
18
18
  "directory": "packages/cli"
19
19
  },
20
20
  "type": "module",
21
+ "main": "./dist/index.cjs",
22
+ "module": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js",
28
+ "require": "./dist/index.cjs"
29
+ }
30
+ },
21
31
  "bin": {
22
32
  "hivenet": "dist/cli.js"
23
33
  },
@@ -28,6 +38,9 @@
28
38
  "build": "tsup && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"",
29
39
  "typecheck": "tsc --noEmit"
30
40
  },
41
+ "dependencies": {
42
+ "zod": "^4.1.0"
43
+ },
31
44
  "devDependencies": {
32
45
  "@hivenet/core": "workspace:*",
33
46
  "@hivenet/spec": "workspace:*",