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/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,62 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
declare const attachmentTargetSchema$1: z.ZodObject<{
|
|
4
|
+
type: z.ZodEnum<{
|
|
5
|
+
eval: "eval";
|
|
6
|
+
question: "question";
|
|
7
|
+
event: "event";
|
|
8
|
+
issue: "issue";
|
|
9
|
+
investigation: "investigation";
|
|
10
|
+
investigation_question: "investigation_question";
|
|
11
|
+
investigation_reply: "investigation_reply";
|
|
12
|
+
}>;
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
type AttachmentTarget$1 = z.infer<typeof attachmentTargetSchema$1>;
|
|
16
|
+
declare const attachmentSchema$1: z.ZodObject<{
|
|
17
|
+
filename: z.ZodString;
|
|
18
|
+
mediaType: z.ZodString;
|
|
19
|
+
size: z.ZodNumber;
|
|
20
|
+
sha256: z.ZodString;
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
createdAt: z.ZodString;
|
|
23
|
+
source: z.ZodEnum<{
|
|
24
|
+
reporter: "reporter";
|
|
25
|
+
owner: "owner";
|
|
26
|
+
}>;
|
|
27
|
+
uploader: z.ZodNullable<z.ZodString>;
|
|
28
|
+
target: z.ZodObject<{
|
|
29
|
+
type: z.ZodEnum<{
|
|
30
|
+
eval: "eval";
|
|
31
|
+
question: "question";
|
|
32
|
+
event: "event";
|
|
33
|
+
issue: "issue";
|
|
34
|
+
investigation: "investigation";
|
|
35
|
+
investigation_question: "investigation_question";
|
|
36
|
+
investigation_reply: "investigation_reply";
|
|
37
|
+
}>;
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
description: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
type Attachment$1 = z.infer<typeof attachmentSchema$1>;
|
|
3
43
|
/** Triage lifecycle of a single feedback event (owner plane). */
|
|
4
44
|
declare const EVENT_STATUSES: readonly ["new", "seen", "in_progress", "resolved", "wont_fix", "spam"];
|
|
5
45
|
type EventStatus = (typeof EVENT_STATUSES)[number];
|
|
6
46
|
/** Triage lifecycle of a clustered issue (owner plane). */
|
|
7
|
-
declare const ISSUE_STATUSES: readonly ["open", "in_progress", "resolved", "wont_fix", "spam"];
|
|
8
|
-
|
|
47
|
+
declare const ISSUE_STATUSES: readonly ["open", "in_progress", "needs_review", "resolved", "wont_fix", "spam"];
|
|
48
|
+
declare const issueStatusSchema: z.ZodEnum<{
|
|
49
|
+
in_progress: "in_progress";
|
|
50
|
+
resolved: "resolved";
|
|
51
|
+
wont_fix: "wont_fix";
|
|
52
|
+
spam: "spam";
|
|
53
|
+
open: "open";
|
|
54
|
+
needs_review: "needs_review";
|
|
55
|
+
}>;
|
|
56
|
+
type IssueStatus = z.infer<typeof issueStatusSchema>;
|
|
57
|
+
/** Eval curation states: promoted candidates → accepted corpus → archived. */
|
|
58
|
+
declare const EVAL_STATUSES: readonly ["proposed", "accepted", "archived"];
|
|
59
|
+
type EvalStatus = (typeof EVAL_STATUSES)[number];
|
|
9
60
|
declare const sentimentSchema$1: z.ZodEnum<{
|
|
10
61
|
positive: "positive";
|
|
11
62
|
negative: "negative";
|
|
@@ -83,9 +134,10 @@ declare const feedbackEventSchema$1: z.ZodObject<{
|
|
|
83
134
|
cli: "cli";
|
|
84
135
|
api: "api";
|
|
85
136
|
model: "model";
|
|
86
|
-
eval: "eval";
|
|
87
137
|
ux: "ux";
|
|
88
138
|
other: "other";
|
|
139
|
+
}>, z.ZodEnum<{
|
|
140
|
+
eval: "eval";
|
|
89
141
|
}>, z.ZodString]>>;
|
|
90
142
|
subject: z.ZodOptional<z.ZodString>;
|
|
91
143
|
sentiment: z.ZodOptional<z.ZodEnum<{
|
|
@@ -108,6 +160,12 @@ declare const feedbackEventSchema$1: z.ZodObject<{
|
|
|
108
160
|
mistake: z.ZodOptional<z.ZodString>;
|
|
109
161
|
attempts: z.ZodOptional<z.ZodNumber>;
|
|
110
162
|
}, z.core.$strip>>;
|
|
163
|
+
question: z.ZodOptional<z.ZodString>;
|
|
164
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
165
|
+
id: z.ZodString;
|
|
166
|
+
token: z.ZodString;
|
|
167
|
+
description: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strip>>>;
|
|
111
169
|
context: z.ZodOptional<z.ZodObject<{
|
|
112
170
|
agent: z.ZodOptional<z.ZodObject<{
|
|
113
171
|
id: z.ZodString;
|
|
@@ -146,12 +204,77 @@ declare const feedbackEventSchema$1: z.ZodObject<{
|
|
|
146
204
|
}, z.core.$strip>;
|
|
147
205
|
}, z.core.$strip>;
|
|
148
206
|
type FeedbackEvent$1 = z.infer<typeof feedbackEventSchema$1>;
|
|
207
|
+
/** The existing owner SDK's issue projection; distinct from reporter-visible KnownIssue. */
|
|
208
|
+
declare const ownerIssueSchema: z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
title: z.ZodString;
|
|
211
|
+
summary: z.ZodNullable<z.ZodString>;
|
|
212
|
+
status: z.ZodEnum<{
|
|
213
|
+
in_progress: "in_progress";
|
|
214
|
+
resolved: "resolved";
|
|
215
|
+
wont_fix: "wont_fix";
|
|
216
|
+
spam: "spam";
|
|
217
|
+
open: "open";
|
|
218
|
+
needs_review: "needs_review";
|
|
219
|
+
}>;
|
|
220
|
+
fingerprint: z.ZodNullable<z.ZodString>;
|
|
221
|
+
event_count: z.ZodNumber;
|
|
222
|
+
reopened_count: z.ZodNumber;
|
|
223
|
+
first_seen: z.ZodString;
|
|
224
|
+
last_seen: z.ZodString;
|
|
225
|
+
links_json: z.ZodString;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
type OwnerIssue = z.infer<typeof ownerIssueSchema>;
|
|
149
228
|
/** 202 body returned by every conforming ingest endpoint. */
|
|
150
229
|
declare const ingestResponseSchema$1: z.ZodObject<{
|
|
151
230
|
id: z.ZodString;
|
|
152
231
|
thread: z.ZodString;
|
|
153
232
|
resume: z.ZodOptional<z.ZodString>;
|
|
154
233
|
guidance: z.ZodOptional<z.ZodString>;
|
|
234
|
+
known_issue: z.ZodOptional<z.ZodObject<{
|
|
235
|
+
title: z.ZodString;
|
|
236
|
+
status: z.ZodEnum<{
|
|
237
|
+
wont_fix: "wont_fix";
|
|
238
|
+
open: "open";
|
|
239
|
+
}>;
|
|
240
|
+
reopened: z.ZodOptional<z.ZodBoolean>;
|
|
241
|
+
reports: z.ZodNumber;
|
|
242
|
+
note: z.ZodOptional<z.ZodString>;
|
|
243
|
+
hint: z.ZodString;
|
|
244
|
+
}, z.core.$strip>>;
|
|
245
|
+
ask: z.ZodOptional<z.ZodObject<{
|
|
246
|
+
id: z.ZodString;
|
|
247
|
+
prompt: z.ZodString;
|
|
248
|
+
command: z.ZodString;
|
|
249
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
250
|
+
filename: z.ZodString;
|
|
251
|
+
mediaType: z.ZodString;
|
|
252
|
+
size: z.ZodNumber;
|
|
253
|
+
sha256: z.ZodString;
|
|
254
|
+
id: z.ZodString;
|
|
255
|
+
createdAt: z.ZodString;
|
|
256
|
+
source: z.ZodEnum<{
|
|
257
|
+
reporter: "reporter";
|
|
258
|
+
owner: "owner";
|
|
259
|
+
}>;
|
|
260
|
+
uploader: z.ZodNullable<z.ZodString>;
|
|
261
|
+
target: z.ZodObject<{
|
|
262
|
+
type: z.ZodEnum<{
|
|
263
|
+
eval: "eval";
|
|
264
|
+
question: "question";
|
|
265
|
+
event: "event";
|
|
266
|
+
issue: "issue";
|
|
267
|
+
investigation: "investigation";
|
|
268
|
+
investigation_question: "investigation_question";
|
|
269
|
+
investigation_reply: "investigation_reply";
|
|
270
|
+
}>;
|
|
271
|
+
id: z.ZodString;
|
|
272
|
+
}, z.core.$strip>;
|
|
273
|
+
description: z.ZodOptional<z.ZodString>;
|
|
274
|
+
url: z.ZodURL;
|
|
275
|
+
expiresAt: z.ZodString;
|
|
276
|
+
}, z.core.$strip>>>;
|
|
277
|
+
}, z.core.$strip>>;
|
|
155
278
|
duplicate: z.ZodOptional<z.ZodBoolean>;
|
|
156
279
|
}, z.core.$strip>;
|
|
157
280
|
type IngestResponse$1 = z.infer<typeof ingestResponseSchema$1>;
|
|
@@ -185,6 +308,17 @@ declare const repoEntrySchema$1: z.ZodObject<{
|
|
|
185
308
|
}, z.core.$strip>;
|
|
186
309
|
type RepoEntry$1 = z.infer<typeof repoEntrySchema$1>;
|
|
187
310
|
|
|
311
|
+
/** Configuration or validation error — the caller can fix it. Network failures are not
|
|
312
|
+
* FeedbackErrors; they degrade to the outbox instead of throwing. */
|
|
313
|
+
declare class FeedbackError extends Error {
|
|
314
|
+
constructor(message: string);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
type LocalAttachmentInput = string | {
|
|
318
|
+
path: string;
|
|
319
|
+
description?: string;
|
|
320
|
+
};
|
|
321
|
+
|
|
188
322
|
declare const DSN_ENV_VAR = "HIVENET_DSN";
|
|
189
323
|
declare const REGISTRY_ENV_VAR = "HIVENET_REGISTRY";
|
|
190
324
|
declare const HOME_ENV_VAR = "HIVENET_HOME";
|
|
@@ -265,12 +399,6 @@ declare function registryUrl(env?: EnvLike): string;
|
|
|
265
399
|
*/
|
|
266
400
|
declare function resolveDestination(options?: ResolveDestinationOptions): Promise<Destination>;
|
|
267
401
|
|
|
268
|
-
/** Configuration or validation error — the caller can fix it. Network failures are not
|
|
269
|
-
* FeedbackErrors; they degrade to the outbox instead of throwing. */
|
|
270
|
-
declare class FeedbackError extends Error {
|
|
271
|
-
constructor(message: string);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
402
|
type OutboxEntry = {
|
|
275
403
|
endpoint: string;
|
|
276
404
|
writeKey?: string;
|
|
@@ -292,18 +420,6 @@ declare function flushOutbox(options?: {
|
|
|
292
420
|
timeoutMs?: number;
|
|
293
421
|
}): Promise<FlushResult>;
|
|
294
422
|
|
|
295
|
-
type OwnerIssue = {
|
|
296
|
-
id: string;
|
|
297
|
-
title: string;
|
|
298
|
-
summary: string | null;
|
|
299
|
-
status: IssueStatus;
|
|
300
|
-
fingerprint: string | null;
|
|
301
|
-
event_count: number;
|
|
302
|
-
reopened_count: number;
|
|
303
|
-
first_seen: string;
|
|
304
|
-
last_seen: string;
|
|
305
|
-
links_json: string;
|
|
306
|
-
};
|
|
307
423
|
type OwnerEvent = {
|
|
308
424
|
id: string;
|
|
309
425
|
received_at: string;
|
|
@@ -313,7 +429,8 @@ type OwnerEvent = {
|
|
|
313
429
|
sentiment: string | null;
|
|
314
430
|
author: string | null;
|
|
315
431
|
feedback: string;
|
|
316
|
-
|
|
432
|
+
/** Detector slug of the reporting agent ('claude-code', 'codex'). */
|
|
433
|
+
agent: string | null;
|
|
317
434
|
agent_session: string | null;
|
|
318
435
|
thread_id: string;
|
|
319
436
|
consent_telemetry: number;
|
|
@@ -325,6 +442,52 @@ type OwnerEvent = {
|
|
|
325
442
|
metadata_json: string;
|
|
326
443
|
idempotency_key: string | null;
|
|
327
444
|
};
|
|
445
|
+
type OwnerQuestion = {
|
|
446
|
+
id: string;
|
|
447
|
+
prompt: string;
|
|
448
|
+
source: 'owner' | 'system';
|
|
449
|
+
kind: 'research' | 'verify_fix' | 'setup_request';
|
|
450
|
+
status: 'active' | 'closed';
|
|
451
|
+
created_at: string;
|
|
452
|
+
closed_at: string | null;
|
|
453
|
+
target: {
|
|
454
|
+
category?: string;
|
|
455
|
+
issue_id?: string;
|
|
456
|
+
eval_id?: string;
|
|
457
|
+
thread_id?: string;
|
|
458
|
+
};
|
|
459
|
+
answers: {
|
|
460
|
+
id: string;
|
|
461
|
+
feedback: string;
|
|
462
|
+
agent: string | null;
|
|
463
|
+
client_name: string | null;
|
|
464
|
+
received_at: string;
|
|
465
|
+
}[];
|
|
466
|
+
};
|
|
467
|
+
type OwnerEval = {
|
|
468
|
+
id: string;
|
|
469
|
+
title: string;
|
|
470
|
+
task: string;
|
|
471
|
+
expected: string | null;
|
|
472
|
+
setup: string | null;
|
|
473
|
+
status: EvalStatus;
|
|
474
|
+
note: string | null;
|
|
475
|
+
source_event_id: string | null;
|
|
476
|
+
created_at: string;
|
|
477
|
+
updated_at: string;
|
|
478
|
+
source: {
|
|
479
|
+
event_id: string;
|
|
480
|
+
feedback: string;
|
|
481
|
+
agent: string | null;
|
|
482
|
+
client_name: string | null;
|
|
483
|
+
thread_id: string;
|
|
484
|
+
actual: string | null;
|
|
485
|
+
mistake: string | null;
|
|
486
|
+
attempts: number | null;
|
|
487
|
+
} | null;
|
|
488
|
+
/** Active setup_request question id when reproduction state is still missing. */
|
|
489
|
+
setup_pending: string | null;
|
|
490
|
+
};
|
|
328
491
|
type OwnerFilters = {
|
|
329
492
|
status?: EventStatus;
|
|
330
493
|
category?: string;
|
|
@@ -348,6 +511,18 @@ declare function resolveApiOrigin(options: {
|
|
|
348
511
|
fetchImpl?: typeof fetch;
|
|
349
512
|
}): Promise<string>;
|
|
350
513
|
declare function ownerApi(options: OwnerApiOptions): {
|
|
514
|
+
/** Upload local files and attach them to a record (at most 10 files per record). */
|
|
515
|
+
attachFiles(target: AttachmentTarget$1, paths: LocalAttachmentInput[], cwd?: string): Promise<{
|
|
516
|
+
attachments: Attachment$1[];
|
|
517
|
+
}>;
|
|
518
|
+
/** A record's files; issues and evals include their reports' files. */
|
|
519
|
+
listAttachments(target: AttachmentTarget$1, offset?: number): Promise<{
|
|
520
|
+
attachments: Attachment$1[];
|
|
521
|
+
nextOffset: number | null;
|
|
522
|
+
}>;
|
|
523
|
+
deleteAttachment(id: string): Promise<{
|
|
524
|
+
deleted: boolean;
|
|
525
|
+
}>;
|
|
351
526
|
listFeedback(filters?: OwnerFilters): Promise<{
|
|
352
527
|
project: string;
|
|
353
528
|
repos: RepoEntry$1[];
|
|
@@ -376,6 +551,41 @@ declare function ownerApi(options: OwnerApiOptions): {
|
|
|
376
551
|
setIssueStatus(id: string, status: IssueStatus, note?: string): Promise<{
|
|
377
552
|
issue: OwnerIssue;
|
|
378
553
|
}>;
|
|
554
|
+
listQuestions(filters?: {
|
|
555
|
+
status?: "active" | "closed";
|
|
556
|
+
}): Promise<{
|
|
557
|
+
questions: OwnerQuestion[];
|
|
558
|
+
/** True when the bounded answer window dropped older answers. */
|
|
559
|
+
answers_truncated: boolean;
|
|
560
|
+
}>;
|
|
561
|
+
/** Files are shared with every agent that receives the question. */
|
|
562
|
+
createQuestion(prompt: string, category?: string, options?: {
|
|
563
|
+
files?: LocalAttachmentInput[];
|
|
564
|
+
cwd?: string;
|
|
565
|
+
idempotencyKey?: string;
|
|
566
|
+
}): Promise<{
|
|
567
|
+
question: OwnerQuestion;
|
|
568
|
+
}>;
|
|
569
|
+
closeQuestion(id: string): Promise<{
|
|
570
|
+
closed: boolean;
|
|
571
|
+
id: string;
|
|
572
|
+
}>;
|
|
573
|
+
listEvals(filters?: {
|
|
574
|
+
status?: EvalStatus;
|
|
575
|
+
}): Promise<{
|
|
576
|
+
evals: OwnerEval[];
|
|
577
|
+
}>;
|
|
578
|
+
getEval(id: string): Promise<{
|
|
579
|
+
eval: OwnerEval;
|
|
580
|
+
}>;
|
|
581
|
+
/** Promote a failed-task report (category=eval event) into the eval corpus. */
|
|
582
|
+
promoteEval(eventId: string): Promise<{
|
|
583
|
+
eval: OwnerEval;
|
|
584
|
+
created: boolean;
|
|
585
|
+
}>;
|
|
586
|
+
setEvalStatus(id: string, status: EvalStatus, note?: string): Promise<{
|
|
587
|
+
eval: OwnerEval;
|
|
588
|
+
}>;
|
|
379
589
|
/** Attach an external link (Slack message, Linear/GitHub issue, PR) to evt_… or iss_…. */
|
|
380
590
|
addLink(id: string, url: string, label?: string): Promise<{
|
|
381
591
|
event?: OwnerEvent;
|
|
@@ -399,6 +609,10 @@ type SendFeedbackOptions = {
|
|
|
399
609
|
sentiment?: Sentiment$1;
|
|
400
610
|
author?: FeedbackAuthor$1;
|
|
401
611
|
eval?: EvalReport$1;
|
|
612
|
+
/** Id of a question this submission answers (from a prior response's `ask`). */
|
|
613
|
+
question?: string;
|
|
614
|
+
/** Explicit paths with optional context. Paths stay local; basenames, bytes and descriptions are sent. */
|
|
615
|
+
attachments?: LocalAttachmentInput[];
|
|
402
616
|
/** Resume an existing feedback thread by ID. */
|
|
403
617
|
resume?: string;
|
|
404
618
|
/** Extra product session IDs, merged over detected ones. */
|
|
@@ -422,12 +636,18 @@ type SendFeedbackOptions = {
|
|
|
422
636
|
fetchImpl?: typeof fetch;
|
|
423
637
|
env?: EnvLike;
|
|
424
638
|
};
|
|
639
|
+
/** Files that could not be uploaded; the report went (or was queued) without them. */
|
|
640
|
+
type FilesNotAttached = {
|
|
641
|
+
files: string[];
|
|
642
|
+
reason: string;
|
|
643
|
+
};
|
|
425
644
|
type SendFeedbackResult = {
|
|
426
645
|
delivered: true;
|
|
427
646
|
response: IngestResponse$1;
|
|
428
647
|
event: FeedbackEvent$1;
|
|
429
648
|
destination: Destination;
|
|
430
649
|
resumed: boolean;
|
|
650
|
+
filesNotAttached?: FilesNotAttached;
|
|
431
651
|
} | {
|
|
432
652
|
delivered: false;
|
|
433
653
|
queued: boolean;
|
|
@@ -435,13 +655,17 @@ type SendFeedbackResult = {
|
|
|
435
655
|
event: FeedbackEvent$1;
|
|
436
656
|
destination: Destination;
|
|
437
657
|
resumed: boolean;
|
|
658
|
+
filesNotAttached?: FilesNotAttached;
|
|
438
659
|
};
|
|
439
660
|
/**
|
|
440
661
|
* Build, enrich, validate, and deliver one feedback event.
|
|
441
662
|
*
|
|
442
663
|
* Throws FeedbackError only for caller-fixable problems (no destination, invalid
|
|
443
|
-
* input). Network failures never throw: the event is
|
|
444
|
-
* `{ delivered: false, queued: true }` is returned.
|
|
664
|
+
* input, a file the server rejects). Network failures never throw: the event is
|
|
665
|
+
* queued to the outbox and `{ delivered: false, queued: true }` is returned.
|
|
666
|
+
* Selected files upload first; if they can't be (network, server busy, a server
|
|
667
|
+
* without file storage), the report still goes — or is queued — without them, and
|
|
668
|
+
* `filesNotAttached` says so.
|
|
445
669
|
*/
|
|
446
670
|
declare function sendFeedback(options: SendFeedbackOptions): Promise<SendFeedbackResult>;
|
|
447
671
|
|
|
@@ -463,10 +687,83 @@ type PostEventResult = {
|
|
|
463
687
|
kind: 'unreachable';
|
|
464
688
|
error: string;
|
|
465
689
|
};
|
|
466
|
-
/** One POST, bounded by timeout. 4xx = rejected (do not retry); network/5xx =
|
|
467
|
-
* (outbox-eligible). */
|
|
690
|
+
/** One POST, bounded by timeout. 4xx = rejected (do not retry); network/5xx, 408 and 429 =
|
|
691
|
+
* unreachable (outbox-eligible). */
|
|
468
692
|
declare function postEvent(options: PostEventOptions): Promise<PostEventResult>;
|
|
469
693
|
|
|
694
|
+
declare const MAX_ATTACHMENT_BYTES: number;
|
|
695
|
+
declare const MAX_ATTACHMENTS = 10;
|
|
696
|
+
declare const attachmentTargetSchema: z.ZodObject<{
|
|
697
|
+
type: z.ZodEnum<{
|
|
698
|
+
eval: "eval";
|
|
699
|
+
question: "question";
|
|
700
|
+
event: "event";
|
|
701
|
+
issue: "issue";
|
|
702
|
+
investigation: "investigation";
|
|
703
|
+
investigation_question: "investigation_question";
|
|
704
|
+
investigation_reply: "investigation_reply";
|
|
705
|
+
}>;
|
|
706
|
+
id: z.ZodString;
|
|
707
|
+
}, z.core.$strip>;
|
|
708
|
+
type AttachmentTarget = z.infer<typeof attachmentTargetSchema>;
|
|
709
|
+
declare const attachmentSchema: z.ZodObject<{
|
|
710
|
+
filename: z.ZodString;
|
|
711
|
+
mediaType: z.ZodString;
|
|
712
|
+
size: z.ZodNumber;
|
|
713
|
+
sha256: z.ZodString;
|
|
714
|
+
id: z.ZodString;
|
|
715
|
+
createdAt: z.ZodString;
|
|
716
|
+
source: z.ZodEnum<{
|
|
717
|
+
reporter: "reporter";
|
|
718
|
+
owner: "owner";
|
|
719
|
+
}>;
|
|
720
|
+
uploader: z.ZodNullable<z.ZodString>;
|
|
721
|
+
target: z.ZodObject<{
|
|
722
|
+
type: z.ZodEnum<{
|
|
723
|
+
eval: "eval";
|
|
724
|
+
question: "question";
|
|
725
|
+
event: "event";
|
|
726
|
+
issue: "issue";
|
|
727
|
+
investigation: "investigation";
|
|
728
|
+
investigation_question: "investigation_question";
|
|
729
|
+
investigation_reply: "investigation_reply";
|
|
730
|
+
}>;
|
|
731
|
+
id: z.ZodString;
|
|
732
|
+
}, z.core.$strip>;
|
|
733
|
+
description: z.ZodOptional<z.ZodString>;
|
|
734
|
+
}, z.core.$strip>;
|
|
735
|
+
type Attachment = z.infer<typeof attachmentSchema>;
|
|
736
|
+
/** Question files as delivered to reporting agents, with a short-lived read link. */
|
|
737
|
+
declare const deliveredAttachmentSchema: z.ZodObject<{
|
|
738
|
+
filename: z.ZodString;
|
|
739
|
+
mediaType: z.ZodString;
|
|
740
|
+
size: z.ZodNumber;
|
|
741
|
+
sha256: z.ZodString;
|
|
742
|
+
id: z.ZodString;
|
|
743
|
+
createdAt: z.ZodString;
|
|
744
|
+
source: z.ZodEnum<{
|
|
745
|
+
reporter: "reporter";
|
|
746
|
+
owner: "owner";
|
|
747
|
+
}>;
|
|
748
|
+
uploader: z.ZodNullable<z.ZodString>;
|
|
749
|
+
target: z.ZodObject<{
|
|
750
|
+
type: z.ZodEnum<{
|
|
751
|
+
eval: "eval";
|
|
752
|
+
question: "question";
|
|
753
|
+
event: "event";
|
|
754
|
+
issue: "issue";
|
|
755
|
+
investigation: "investigation";
|
|
756
|
+
investigation_question: "investigation_question";
|
|
757
|
+
investigation_reply: "investigation_reply";
|
|
758
|
+
}>;
|
|
759
|
+
id: z.ZodString;
|
|
760
|
+
}, z.core.$strip>;
|
|
761
|
+
description: z.ZodOptional<z.ZodString>;
|
|
762
|
+
url: z.ZodURL;
|
|
763
|
+
expiresAt: z.ZodString;
|
|
764
|
+
}, z.core.$strip>;
|
|
765
|
+
type DeliveredAttachment = z.infer<typeof deliveredAttachmentSchema>;
|
|
766
|
+
|
|
470
767
|
/**
|
|
471
768
|
* hivenet protocol v1.
|
|
472
769
|
*
|
|
@@ -483,8 +780,12 @@ declare const DEFAULT_INGEST_PATH = "/v1/feedback";
|
|
|
483
780
|
declare const WRITE_KEY_HEADER = "x-af-write-key";
|
|
484
781
|
declare const WRITE_KEY_PATTERN: RegExp;
|
|
485
782
|
declare const THREAD_ID_PATTERN: RegExp;
|
|
486
|
-
/**
|
|
487
|
-
|
|
783
|
+
/**
|
|
784
|
+
* Component kinds of any agentic system's agent-facing surface area. Categories answer
|
|
785
|
+
* "what part of the product is this about?" — kinds of submission (failed-task reports,
|
|
786
|
+
* question answers) are orthogonal markers (`eval` block, `question` id), never categories.
|
|
787
|
+
*/
|
|
788
|
+
declare const FEEDBACK_CATEGORIES: readonly ["tool", "skill", "prompt", "docs", "mcp", "cli", "api", "model", "ux", "other"];
|
|
488
789
|
type FeedbackCategory = (typeof FEEDBACK_CATEGORIES)[number];
|
|
489
790
|
declare const categorySchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
490
791
|
tool: "tool";
|
|
@@ -495,9 +796,10 @@ declare const categorySchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
|
495
796
|
cli: "cli";
|
|
496
797
|
api: "api";
|
|
497
798
|
model: "model";
|
|
498
|
-
eval: "eval";
|
|
499
799
|
ux: "ux";
|
|
500
800
|
other: "other";
|
|
801
|
+
}>, z.ZodEnum<{
|
|
802
|
+
eval: "eval";
|
|
501
803
|
}>, z.ZodString]>;
|
|
502
804
|
declare const sentimentSchema: z.ZodEnum<{
|
|
503
805
|
positive: "positive";
|
|
@@ -576,9 +878,10 @@ declare const feedbackEventSchema: z.ZodObject<{
|
|
|
576
878
|
cli: "cli";
|
|
577
879
|
api: "api";
|
|
578
880
|
model: "model";
|
|
579
|
-
eval: "eval";
|
|
580
881
|
ux: "ux";
|
|
581
882
|
other: "other";
|
|
883
|
+
}>, z.ZodEnum<{
|
|
884
|
+
eval: "eval";
|
|
582
885
|
}>, z.ZodString]>>;
|
|
583
886
|
subject: z.ZodOptional<z.ZodString>;
|
|
584
887
|
sentiment: z.ZodOptional<z.ZodEnum<{
|
|
@@ -601,6 +904,12 @@ declare const feedbackEventSchema: z.ZodObject<{
|
|
|
601
904
|
mistake: z.ZodOptional<z.ZodString>;
|
|
602
905
|
attempts: z.ZodOptional<z.ZodNumber>;
|
|
603
906
|
}, z.core.$strip>>;
|
|
907
|
+
question: z.ZodOptional<z.ZodString>;
|
|
908
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
909
|
+
id: z.ZodString;
|
|
910
|
+
token: z.ZodString;
|
|
911
|
+
description: z.ZodOptional<z.ZodString>;
|
|
912
|
+
}, z.core.$strip>>>;
|
|
604
913
|
context: z.ZodOptional<z.ZodObject<{
|
|
605
914
|
agent: z.ZodOptional<z.ZodObject<{
|
|
606
915
|
id: z.ZodString;
|
|
@@ -646,6 +955,50 @@ declare const ingestResponseSchema: z.ZodObject<{
|
|
|
646
955
|
thread: z.ZodString;
|
|
647
956
|
resume: z.ZodOptional<z.ZodString>;
|
|
648
957
|
guidance: z.ZodOptional<z.ZodString>;
|
|
958
|
+
known_issue: z.ZodOptional<z.ZodObject<{
|
|
959
|
+
title: z.ZodString;
|
|
960
|
+
status: z.ZodEnum<{
|
|
961
|
+
wont_fix: "wont_fix";
|
|
962
|
+
open: "open";
|
|
963
|
+
}>;
|
|
964
|
+
reopened: z.ZodOptional<z.ZodBoolean>;
|
|
965
|
+
reports: z.ZodNumber;
|
|
966
|
+
note: z.ZodOptional<z.ZodString>;
|
|
967
|
+
hint: z.ZodString;
|
|
968
|
+
}, z.core.$strip>>;
|
|
969
|
+
ask: z.ZodOptional<z.ZodObject<{
|
|
970
|
+
id: z.ZodString;
|
|
971
|
+
prompt: z.ZodString;
|
|
972
|
+
command: z.ZodString;
|
|
973
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
974
|
+
filename: z.ZodString;
|
|
975
|
+
mediaType: z.ZodString;
|
|
976
|
+
size: z.ZodNumber;
|
|
977
|
+
sha256: z.ZodString;
|
|
978
|
+
id: z.ZodString;
|
|
979
|
+
createdAt: z.ZodString;
|
|
980
|
+
source: z.ZodEnum<{
|
|
981
|
+
reporter: "reporter";
|
|
982
|
+
owner: "owner";
|
|
983
|
+
}>;
|
|
984
|
+
uploader: z.ZodNullable<z.ZodString>;
|
|
985
|
+
target: z.ZodObject<{
|
|
986
|
+
type: z.ZodEnum<{
|
|
987
|
+
eval: "eval";
|
|
988
|
+
question: "question";
|
|
989
|
+
event: "event";
|
|
990
|
+
issue: "issue";
|
|
991
|
+
investigation: "investigation";
|
|
992
|
+
investigation_question: "investigation_question";
|
|
993
|
+
investigation_reply: "investigation_reply";
|
|
994
|
+
}>;
|
|
995
|
+
id: z.ZodString;
|
|
996
|
+
}, z.core.$strip>;
|
|
997
|
+
description: z.ZodOptional<z.ZodString>;
|
|
998
|
+
url: z.ZodURL;
|
|
999
|
+
expiresAt: z.ZodString;
|
|
1000
|
+
}, z.core.$strip>>>;
|
|
1001
|
+
}, z.core.$strip>>;
|
|
649
1002
|
duplicate: z.ZodOptional<z.ZodBoolean>;
|
|
650
1003
|
}, z.core.$strip>;
|
|
651
1004
|
type IngestResponse = z.infer<typeof ingestResponseSchema>;
|
|
@@ -697,4 +1050,4 @@ declare function validateIngestResponse(input: unknown): ValidationResult<Ingest
|
|
|
697
1050
|
declare function feedbackEventJsonSchema(): Record<string, unknown>;
|
|
698
1051
|
declare function descriptorJsonSchema(): Record<string, unknown>;
|
|
699
1052
|
|
|
700
|
-
export { CONFIG_FILE_NAME, type CollectContextOptions, DEFAULT_INGEST_PATH, DEFAULT_REGISTRY_URL, DSN_ENV_VAR, type Descriptor, type Destination, EVENT_STATUSES, type EnvLike, type EvalReport, type EventStatus, FEEDBACK_CATEGORIES, type FeedbackAuthor, type FeedbackCategory, type FeedbackConfig, type FeedbackContext, FeedbackError, type FeedbackEvent, type FeedbackEventInput, type FeedbackMetadata, type FlushResult, HOME_ENV_VAR, ISSUE_STATUSES, type IngestResponse, type IssueStatus, MAX_FEEDBACK_LENGTH, MAX_GUIDANCE_LENGTH, MAX_SUBJECT_LENGTH, NO_TELEMETRY_ENV_VAR, type OutboxEntry, type OwnerApi, type OwnerApiOptions, type OwnerEvent, type OwnerFilters, type OwnerIssue, PROTOCOL_VERSION, type PostEventOptions, type PostEventResult, REGISTRY_ENV_VAR, type RepoEntry, type ResolveDestinationOptions, type SendFeedbackOptions, type SendFeedbackResult, type Sentiment, type SessionSource, THREAD_ID_PATTERN, type ValidationResult, WELL_KNOWN_PATH, WRITE_KEY_HEADER, WRITE_KEY_PATTERN, appendToOutbox, authorSchema, categorySchema, collectContext, descriptorJsonSchema, descriptorSchema, evalReportSchema, feedbackContextSchema, feedbackEventJsonSchema, feedbackEventSchema, feedbackHomeDir, findConfigFile, flushOutbox, generateThreadId, inferAuthor, ingestResponseSchema, isTelemetryDisabled, metadataSchema, outboxPath, ownerApi, parseDsn, postEvent, registryUrl, repoEntrySchema, repoListSchema, resolveApiOrigin, resolveDestination, resolveThreadId, sendFeedback, sentimentSchema, validateDescriptor, validateFeedbackEvent, validateIngestResponse };
|
|
1053
|
+
export { type Attachment, type AttachmentTarget, CONFIG_FILE_NAME, type CollectContextOptions, DEFAULT_INGEST_PATH, DEFAULT_REGISTRY_URL, DSN_ENV_VAR, type DeliveredAttachment, type Descriptor, type Destination, EVENT_STATUSES, type EnvLike, type EvalReport, type EventStatus, FEEDBACK_CATEGORIES, type FeedbackAuthor, type FeedbackCategory, type FeedbackConfig, type FeedbackContext, FeedbackError, type FeedbackEvent, type FeedbackEventInput, type FeedbackMetadata, type FilesNotAttached, type FlushResult, HOME_ENV_VAR, ISSUE_STATUSES, type IngestResponse, type IssueStatus, type LocalAttachmentInput, MAX_ATTACHMENTS, MAX_ATTACHMENT_BYTES, MAX_FEEDBACK_LENGTH, MAX_GUIDANCE_LENGTH, MAX_SUBJECT_LENGTH, NO_TELEMETRY_ENV_VAR, type OutboxEntry, type OwnerApi, type OwnerApiOptions, type OwnerEvent, type OwnerFilters, type OwnerIssue, PROTOCOL_VERSION, type PostEventOptions, type PostEventResult, REGISTRY_ENV_VAR, type RepoEntry, type ResolveDestinationOptions, type SendFeedbackOptions, type SendFeedbackResult, type Sentiment, type SessionSource, THREAD_ID_PATTERN, type ValidationResult, WELL_KNOWN_PATH, WRITE_KEY_HEADER, WRITE_KEY_PATTERN, appendToOutbox, authorSchema, categorySchema, collectContext, descriptorJsonSchema, descriptorSchema, evalReportSchema, feedbackContextSchema, feedbackEventJsonSchema, feedbackEventSchema, feedbackHomeDir, findConfigFile, flushOutbox, generateThreadId, inferAuthor, ingestResponseSchema, isTelemetryDisabled, metadataSchema, outboxPath, ownerApi, parseDsn, postEvent, registryUrl, repoEntrySchema, repoListSchema, resolveApiOrigin, resolveDestination, resolveThreadId, sendFeedback, sentimentSchema, validateDescriptor, validateFeedbackEvent, validateIngestResponse };
|