hivenet 0.4.2 → 0.6.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/README.md +55 -0
- package/dist/chunk-AK23JXBN.js +32 -0
- package/dist/{chunk-WWPF6V2Y.js → chunk-DNR6HNJD.js} +484 -70
- package/dist/cli.js +323 -66
- package/dist/{doctor-CVWF7J3P.js → doctor-EA2GJRUS.js} +1 -1
- package/dist/index.cjs +868 -460
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +384 -31
- package/dist/index.d.ts +384 -31
- package/dist/index.js +863 -457
- package/dist/index.js.map +1 -1
- package/dist/owner-ZWROA7AU.js +539 -0
- package/package.json +1 -1
- package/dist/owner-N2MSYLV7.js +0 -257
package/README.md
CHANGED
|
@@ -25,6 +25,61 @@ await sendFeedback({
|
|
|
25
25
|
});
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
Failed a task after real effort? File it structured — these reports become the
|
|
29
|
+
project's eval suite, so word the task so a stranger could re-run it:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx hivenet --to acme --category cli --task "export 2k-row dataset as CSV" \
|
|
33
|
+
--expected "CSV with all rows" --actual "times out at 30s, no partial file" \
|
|
34
|
+
--attempts 3 "acme export cannot complete large exports"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Attach screenshots, logs or recordings (up to 10 files, 20 MiB each). Each `--describe`
|
|
38
|
+
explains the file before it:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
npx hivenet --to acme --category ux \
|
|
42
|
+
--attach ./screen.png --describe "The checkout button is hidden at 390px width." \
|
|
43
|
+
--attach ./trace.log \
|
|
44
|
+
"The checkout button disappears on mobile"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The SDK takes the same files as an array:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import { sendFeedback } from 'hivenet';
|
|
51
|
+
|
|
52
|
+
await sendFeedback({
|
|
53
|
+
to: 'my-project',
|
|
54
|
+
feedback: 'Export reports success but downloads an empty file.',
|
|
55
|
+
attachments: [
|
|
56
|
+
{ path: './screen.png', description: 'The success message after exporting 12 rows.' },
|
|
57
|
+
'./network.log',
|
|
58
|
+
],
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If files can't be uploaded (network, server busy, a server without file storage), the report
|
|
63
|
+
is still sent — or queued — without them, and the output names them so you can add them
|
|
64
|
+
later with `--resume <thread> --attach <path>`. A file the server rejects stops the send.
|
|
65
|
+
After a text-only report the CLI suggests that same command (`attach_hint` with `--json`),
|
|
66
|
+
since a screenshot or log often says more than the text.
|
|
67
|
+
|
|
68
|
+
Structured reports can come from one JSON object, with the same fields as the SDK:
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
npx hivenet --input report.json --json # attachment paths are relative to report.json
|
|
72
|
+
cat report.json | npx hivenet --input - --json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Invalid input exits 1 with the fields to fix (`--json`: `code`, `error`, `issues`, `hint`);
|
|
76
|
+
nothing is sent. Owners attach files to a record with `HIVENET_SECRET_KEY`:
|
|
77
|
+
`npx hivenet attach issue <id> --attach ./reproduction.webm`.
|
|
78
|
+
|
|
79
|
+
Responses may carry `guidance` (the team's reply to your thread) and `ask` — a
|
|
80
|
+
question from the team with a ready-to-run `--answer <id>` command. Answering is
|
|
81
|
+
optional and must be grounded in what you actually did; never guess.
|
|
82
|
+
|
|
28
83
|
- Never prompts, never blocks; queues locally when offline (`--flush` retries).
|
|
29
84
|
- `DO_NOT_TRACK=1` strips all auto-detected context; feedback still delivers anonymously.
|
|
30
85
|
- `--json` machine output · `--dry-run` shows the exact event before anything is sent.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FeedbackError,
|
|
3
|
+
attachmentDescriptionSchema
|
|
4
|
+
} from "./chunk-DNR6HNJD.js";
|
|
5
|
+
|
|
6
|
+
// src/attachment-flags.ts
|
|
7
|
+
function attachmentFlags() {
|
|
8
|
+
const files = [];
|
|
9
|
+
return {
|
|
10
|
+
"--attach": (path) => {
|
|
11
|
+
files.push({ path });
|
|
12
|
+
return files;
|
|
13
|
+
},
|
|
14
|
+
"--describe": (value) => {
|
|
15
|
+
const file = files.at(-1);
|
|
16
|
+
if (!file) throw new FeedbackError("--describe must follow the --attach it describes.");
|
|
17
|
+
if (file.description !== void 0)
|
|
18
|
+
throw new FeedbackError("Use one --describe per attached file.");
|
|
19
|
+
const parsed = attachmentDescriptionSchema.safeParse(value);
|
|
20
|
+
if (!parsed.success)
|
|
21
|
+
throw new FeedbackError(
|
|
22
|
+
`Invalid --describe: ${parsed.error.issues.map((issue) => issue.message).join("; ")}`
|
|
23
|
+
);
|
|
24
|
+
file.description = parsed.data;
|
|
25
|
+
return parsed.data;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
attachmentFlags
|
|
32
|
+
};
|