agentfootprint 9.8.0 → 9.9.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/adapters/observability/audit.js +2 -28
- package/dist/adapters/observability/audit.js.map +1 -1
- package/dist/adapters/observability/githubBugReporter.js +461 -0
- package/dist/adapters/observability/githubBugReporter.js.map +1 -0
- package/dist/adapters/observability/githubDeviceSignIn.js +263 -0
- package/dist/adapters/observability/githubDeviceSignIn.js.map +1 -0
- package/dist/esm/adapters/observability/audit.js +1 -27
- package/dist/esm/adapters/observability/audit.js.map +1 -1
- package/dist/esm/adapters/observability/githubBugReporter.d.ts +154 -0
- package/dist/esm/adapters/observability/githubBugReporter.js +457 -0
- package/dist/esm/adapters/observability/githubBugReporter.js.map +1 -0
- package/dist/esm/adapters/observability/githubDeviceSignIn.d.ts +131 -0
- package/dist/esm/adapters/observability/githubDeviceSignIn.js +259 -0
- package/dist/esm/adapters/observability/githubDeviceSignIn.js.map +1 -0
- package/dist/esm/lib/bug-report/build.d.ts +103 -0
- package/dist/esm/lib/bug-report/build.js +648 -0
- package/dist/esm/lib/bug-report/build.js.map +1 -0
- package/dist/esm/lib/bug-report/index.d.ts +14 -0
- package/dist/esm/lib/bug-report/index.js +13 -0
- package/dist/esm/lib/bug-report/index.js.map +1 -0
- package/dist/esm/lib/bug-report/transcript.d.ts +61 -0
- package/dist/esm/lib/bug-report/transcript.js +124 -0
- package/dist/esm/lib/bug-report/transcript.js.map +1 -0
- package/dist/esm/lib/bug-report/types.d.ts +206 -0
- package/dist/esm/lib/bug-report/types.js +12 -0
- package/dist/esm/lib/bug-report/types.js.map +1 -0
- package/dist/esm/lib/bug-report/zip.d.ts +71 -0
- package/dist/esm/lib/bug-report/zip.js +202 -0
- package/dist/esm/lib/bug-report/zip.js.map +1 -0
- package/dist/esm/lib/libraryVersion.d.ts +23 -0
- package/dist/esm/lib/libraryVersion.js +46 -0
- package/dist/esm/lib/libraryVersion.js.map +1 -0
- package/dist/esm/lib/trace-toolpack/openRecording.d.ts +17 -0
- package/dist/esm/lib/trace-toolpack/openRecording.js +8 -2
- package/dist/esm/lib/trace-toolpack/openRecording.js.map +1 -1
- package/dist/esm/observability-providers.d.ts +2 -0
- package/dist/esm/observability-providers.js +9 -0
- package/dist/esm/observability-providers.js.map +1 -1
- package/dist/esm/observe.d.ts +1 -0
- package/dist/esm/observe.js +6 -0
- package/dist/esm/observe.js.map +1 -1
- package/dist/lib/bug-report/build.js +656 -0
- package/dist/lib/bug-report/build.js.map +1 -0
- package/dist/lib/bug-report/index.js +18 -0
- package/dist/lib/bug-report/index.js.map +1 -0
- package/dist/lib/bug-report/transcript.js +128 -0
- package/dist/lib/bug-report/transcript.js.map +1 -0
- package/dist/lib/bug-report/types.js +13 -0
- package/dist/lib/bug-report/types.js.map +1 -0
- package/dist/lib/bug-report/zip.js +207 -0
- package/dist/lib/bug-report/zip.js.map +1 -0
- package/dist/lib/libraryVersion.js +51 -0
- package/dist/lib/libraryVersion.js.map +1 -0
- package/dist/lib/trace-toolpack/openRecording.js +9 -2
- package/dist/lib/trace-toolpack/openRecording.js.map +1 -1
- package/dist/observability-providers.js +12 -1
- package/dist/observability-providers.js.map +1 -1
- package/dist/observe.js +14 -6
- package/dist/observe.js.map +1 -1
- package/dist/types/adapters/observability/audit.d.ts.map +1 -1
- package/dist/types/adapters/observability/githubBugReporter.d.ts +155 -0
- package/dist/types/adapters/observability/githubBugReporter.d.ts.map +1 -0
- package/dist/types/adapters/observability/githubDeviceSignIn.d.ts +132 -0
- package/dist/types/adapters/observability/githubDeviceSignIn.d.ts.map +1 -0
- package/dist/types/lib/bug-report/build.d.ts +104 -0
- package/dist/types/lib/bug-report/build.d.ts.map +1 -0
- package/dist/types/lib/bug-report/index.d.ts +15 -0
- package/dist/types/lib/bug-report/index.d.ts.map +1 -0
- package/dist/types/lib/bug-report/transcript.d.ts +62 -0
- package/dist/types/lib/bug-report/transcript.d.ts.map +1 -0
- package/dist/types/lib/bug-report/types.d.ts +207 -0
- package/dist/types/lib/bug-report/types.d.ts.map +1 -0
- package/dist/types/lib/bug-report/zip.d.ts +72 -0
- package/dist/types/lib/bug-report/zip.d.ts.map +1 -0
- package/dist/types/lib/libraryVersion.d.ts +24 -0
- package/dist/types/lib/libraryVersion.d.ts.map +1 -0
- package/dist/types/lib/trace-toolpack/openRecording.d.ts +17 -0
- package/dist/types/lib/trace-toolpack/openRecording.d.ts.map +1 -1
- package/dist/types/observability-providers.d.ts +2 -0
- package/dist/types/observability-providers.d.ts.map +1 -1
- package/dist/types/observe.d.ts +1 -0
- package/dist/types/observe.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../src/lib/bug-report/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAcpC,wEAAwE;AACxE,MAAM,uBAAuB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjD,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAclC,MAAM,IAAI,GAAG,CAAC,KAAc,EAA0C,EAAE,CACtE,OAAO,KAAK,KAAK,UAAU,CAAC;AAE9B,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAuC,EAAE,CACvE,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAE,KAAiC,CAAC,CAAC,CAAC,SAAS,CAAC;AAE/F;;;;;;;;;GASG;AACH,SAAS,YAA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AAE,EAAE,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;AACzE,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,MAAM,IAAI,GAAG,KAAK;SACf,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;SACZ,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACvB,OAAO,IAAI,IAAI,YAAY,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bug-report — package a run as the evidence for a bug report.
|
|
3
|
+
*
|
|
4
|
+
* `describeBugReport` measures and offers; `exportBugReport` bundles what the
|
|
5
|
+
* reporter consented to, as named files and a real (stored) zip.
|
|
6
|
+
* `githubBugReporter` — in `agentfootprint/observe` too — files that bundle.
|
|
7
|
+
*
|
|
8
|
+
* The zip writer is deliberately NOT exported: it exists for this bundle, it
|
|
9
|
+
* stores rather than compresses, and a general-purpose zip writer is not a
|
|
10
|
+
* promise this library wants to keep.
|
|
11
|
+
*/
|
|
12
|
+
export { describeBugReport, exportBugReport } from './build.js';
|
|
13
|
+
export type { BugReport, BugReportEnvironment, BugReportExcluded, BugReportFields, BugReportFile, BugReportFileSummary, BugReportInput, BugReportManifest, BugReportOversize, BugReportSource, BugReportUnit, DescribeBugReportOptions, ExportBugReportOptions, } from './types.js';
|
|
14
|
+
export type { Transcript, TranscriptStep, TranscriptTurn } from './transcript.js';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bug-report — package a run as the evidence for a bug report.
|
|
3
|
+
*
|
|
4
|
+
* `describeBugReport` measures and offers; `exportBugReport` bundles what the
|
|
5
|
+
* reporter consented to, as named files and a real (stored) zip.
|
|
6
|
+
* `githubBugReporter` — in `agentfootprint/observe` too — files that bundle.
|
|
7
|
+
*
|
|
8
|
+
* The zip writer is deliberately NOT exported: it exists for this bundle, it
|
|
9
|
+
* stores rather than compresses, and a general-purpose zip writer is not a
|
|
10
|
+
* promise this library wants to keep.
|
|
11
|
+
*/
|
|
12
|
+
export { describeBugReport, exportBugReport } from './build.js';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/bug-report/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* transcript — the conversation, read back out of the event stream.
|
|
3
|
+
*
|
|
4
|
+
* A maintainer opening a bug report reads the conversation first: what was
|
|
5
|
+
* asked, what the model said, which tools ran, what came back. All of that is
|
|
6
|
+
* already in the typed events — `agent.turn_start` carries the prompt,
|
|
7
|
+
* `stream.llm_end` the model's content, `stream.tool_start` / `tool_end` the
|
|
8
|
+
* call and its result, `agent.turn_end` the final answer — so `conversation.json`
|
|
9
|
+
* is DERIVED, never a second copy the reporter has to keep in sync.
|
|
10
|
+
*
|
|
11
|
+
* ## Derivable, and when it is not
|
|
12
|
+
*
|
|
13
|
+
* Turn markers come from the Agent loop. A bare `LLMCall`, a `Sequence` of
|
|
14
|
+
* them, a pattern — none of those fire `turn_start`, so the walk falls back to
|
|
15
|
+
* ONE synthetic turn holding the model and tool steps in order, and says so on
|
|
16
|
+
* the turn (`derived: 'no-turn-markers'`). A recording with no LLM and no tool
|
|
17
|
+
* events yields no transcript at all, and the manifest carries a note rather
|
|
18
|
+
* than an empty file that reads like an empty conversation.
|
|
19
|
+
*
|
|
20
|
+
* ## What it does NOT do
|
|
21
|
+
*
|
|
22
|
+
* It does not summarize, truncate or scrub. Whatever the events carry is what
|
|
23
|
+
* this writes — including tool arguments and results. Redaction is upstream, at
|
|
24
|
+
* commit time; the manifest lists the keys that were scrubbed so the reporter
|
|
25
|
+
* can see it happened. Anything that must never leave must never reach the
|
|
26
|
+
* event stream in the first place.
|
|
27
|
+
*/
|
|
28
|
+
/** One model or tool step inside a turn. */
|
|
29
|
+
export type TranscriptStep = {
|
|
30
|
+
readonly kind: 'assistant';
|
|
31
|
+
readonly content: string;
|
|
32
|
+
readonly stopReason?: string;
|
|
33
|
+
readonly toolCallCount?: number;
|
|
34
|
+
} | {
|
|
35
|
+
readonly kind: 'tool';
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly toolCallId?: string;
|
|
38
|
+
readonly args?: unknown;
|
|
39
|
+
readonly result?: unknown;
|
|
40
|
+
readonly error?: boolean;
|
|
41
|
+
};
|
|
42
|
+
/** One turn: what the user asked, what happened, what came back. */
|
|
43
|
+
export interface TranscriptTurn {
|
|
44
|
+
readonly index: number;
|
|
45
|
+
readonly user?: string;
|
|
46
|
+
readonly steps: readonly TranscriptStep[];
|
|
47
|
+
readonly final?: string;
|
|
48
|
+
/** Present when there were no turn markers and this turn was inferred. */
|
|
49
|
+
readonly derived?: 'no-turn-markers';
|
|
50
|
+
}
|
|
51
|
+
/** One conversation's readable transcript. */
|
|
52
|
+
export interface Transcript {
|
|
53
|
+
readonly turns: readonly TranscriptTurn[];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Walk one conversation's events into turns.
|
|
57
|
+
*
|
|
58
|
+
* @returns the transcript, or `undefined` when nothing conversational
|
|
59
|
+
* happened — which the manifest reports as a note.
|
|
60
|
+
*/
|
|
61
|
+
export declare function deriveTranscript(events: readonly unknown[]): Transcript | undefined;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* transcript — the conversation, read back out of the event stream.
|
|
3
|
+
*
|
|
4
|
+
* A maintainer opening a bug report reads the conversation first: what was
|
|
5
|
+
* asked, what the model said, which tools ran, what came back. All of that is
|
|
6
|
+
* already in the typed events — `agent.turn_start` carries the prompt,
|
|
7
|
+
* `stream.llm_end` the model's content, `stream.tool_start` / `tool_end` the
|
|
8
|
+
* call and its result, `agent.turn_end` the final answer — so `conversation.json`
|
|
9
|
+
* is DERIVED, never a second copy the reporter has to keep in sync.
|
|
10
|
+
*
|
|
11
|
+
* ## Derivable, and when it is not
|
|
12
|
+
*
|
|
13
|
+
* Turn markers come from the Agent loop. A bare `LLMCall`, a `Sequence` of
|
|
14
|
+
* them, a pattern — none of those fire `turn_start`, so the walk falls back to
|
|
15
|
+
* ONE synthetic turn holding the model and tool steps in order, and says so on
|
|
16
|
+
* the turn (`derived: 'no-turn-markers'`). A recording with no LLM and no tool
|
|
17
|
+
* events yields no transcript at all, and the manifest carries a note rather
|
|
18
|
+
* than an empty file that reads like an empty conversation.
|
|
19
|
+
*
|
|
20
|
+
* ## What it does NOT do
|
|
21
|
+
*
|
|
22
|
+
* It does not summarize, truncate or scrub. Whatever the events carry is what
|
|
23
|
+
* this writes — including tool arguments and results. Redaction is upstream, at
|
|
24
|
+
* commit time; the manifest lists the keys that were scrubbed so the reporter
|
|
25
|
+
* can see it happened. Anything that must never leave must never reach the
|
|
26
|
+
* event stream in the first place.
|
|
27
|
+
*/
|
|
28
|
+
const asRecord = (value) => typeof value === 'object' && value !== null ? value : {};
|
|
29
|
+
const asString = (value) => typeof value === 'string' ? value : undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Walk one conversation's events into turns.
|
|
32
|
+
*
|
|
33
|
+
* @returns the transcript, or `undefined` when nothing conversational
|
|
34
|
+
* happened — which the manifest reports as a note.
|
|
35
|
+
*/
|
|
36
|
+
export function deriveTranscript(events) {
|
|
37
|
+
const turns = [];
|
|
38
|
+
let open;
|
|
39
|
+
/** `tool_start` args, held until the matching `tool_end` names the result. */
|
|
40
|
+
const pendingTools = new Map();
|
|
41
|
+
/** Open a turn the Agent never announced — an LLMCall or a composition. */
|
|
42
|
+
const ensureTurn = () => {
|
|
43
|
+
if (open)
|
|
44
|
+
return open;
|
|
45
|
+
open = { index: turns.length, steps: [], derived: 'no-turn-markers' };
|
|
46
|
+
turns.push(open);
|
|
47
|
+
return open;
|
|
48
|
+
};
|
|
49
|
+
for (const raw of events) {
|
|
50
|
+
const event = raw;
|
|
51
|
+
const type = asString(event?.type);
|
|
52
|
+
if (!type)
|
|
53
|
+
continue;
|
|
54
|
+
const payload = asRecord(event.payload);
|
|
55
|
+
switch (type) {
|
|
56
|
+
case 'agentfootprint.agent.turn_start': {
|
|
57
|
+
open = {
|
|
58
|
+
index: typeof payload.turnIndex === 'number' ? payload.turnIndex : turns.length,
|
|
59
|
+
steps: [],
|
|
60
|
+
...(asString(payload.userPrompt) !== undefined && {
|
|
61
|
+
user: asString(payload.userPrompt),
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
turns.push(open);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
case 'agentfootprint.agent.turn_end': {
|
|
68
|
+
const turn = ensureTurn();
|
|
69
|
+
const final = asString(payload.finalContent);
|
|
70
|
+
if (final !== undefined)
|
|
71
|
+
turn.final = final;
|
|
72
|
+
open = undefined;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case 'agentfootprint.stream.llm_end': {
|
|
76
|
+
const turn = ensureTurn();
|
|
77
|
+
turn.steps.push({
|
|
78
|
+
kind: 'assistant',
|
|
79
|
+
content: asString(payload.content) ?? '',
|
|
80
|
+
...(asString(payload.stopReason) !== undefined && {
|
|
81
|
+
stopReason: asString(payload.stopReason),
|
|
82
|
+
}),
|
|
83
|
+
...(typeof payload.toolCallCount === 'number' && {
|
|
84
|
+
toolCallCount: payload.toolCallCount,
|
|
85
|
+
}),
|
|
86
|
+
});
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
case 'agentfootprint.stream.tool_start': {
|
|
90
|
+
const id = asString(payload.toolCallId);
|
|
91
|
+
const name = asString(payload.toolName) ?? 'unknown-tool';
|
|
92
|
+
if (id)
|
|
93
|
+
pendingTools.set(id, { name, args: payload.args });
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
case 'agentfootprint.stream.tool_end': {
|
|
97
|
+
const turn = ensureTurn();
|
|
98
|
+
const id = asString(payload.toolCallId);
|
|
99
|
+
const started = id ? pendingTools.get(id) : undefined;
|
|
100
|
+
if (id)
|
|
101
|
+
pendingTools.delete(id);
|
|
102
|
+
turn.steps.push({
|
|
103
|
+
kind: 'tool',
|
|
104
|
+
name: started?.name ?? 'unknown-tool',
|
|
105
|
+
...(id !== undefined && { toolCallId: id }),
|
|
106
|
+
...(started !== undefined && { args: started.args }),
|
|
107
|
+
...('result' in payload && { result: payload.result }),
|
|
108
|
+
...(payload.error === true && { error: true }),
|
|
109
|
+
});
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
default:
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (turns.length === 0)
|
|
117
|
+
return undefined;
|
|
118
|
+
// A single inferred turn with nothing in it is not a conversation.
|
|
119
|
+
if (turns.length === 1 && turns[0].steps.length === 0 && turns[0].user === undefined) {
|
|
120
|
+
return undefined;
|
|
121
|
+
}
|
|
122
|
+
return { turns: turns.map((turn) => ({ ...turn, steps: [...turn.steps] })) };
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=transcript.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript.js","sourceRoot":"","sources":["../../../../src/lib/bug-report/transcript.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAiDH,MAAM,QAAQ,GAAG,CAAC,KAAc,EAA2B,EAAE,CAC3D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAE,KAAiC,CAAC,CAAC,CAAC,EAAE,CAAC;AAExF,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAsB,EAAE,CACtD,OAAO,KAAK,KAAK,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AI,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bug-report — the types a bug report is made of.
|
|
3
|
+
*
|
|
4
|
+
* Two of them are the point of the whole sub-library:
|
|
5
|
+
*
|
|
6
|
+
* {@link BugReportUnit} the SELECTABLE piece. A reporter consents to
|
|
7
|
+
* units, not to a blob.
|
|
8
|
+
* {@link BugReportManifest} the honest statement of what a bundle contains
|
|
9
|
+
* AND what it deliberately leaves out.
|
|
10
|
+
*/
|
|
11
|
+
import type { Recording, RunRecorder } from '../../recorders/observability/recordRun.js';
|
|
12
|
+
import type { Runner } from '../../core/runner.js';
|
|
13
|
+
/**
|
|
14
|
+
* Anything a bug report can be built from.
|
|
15
|
+
*
|
|
16
|
+
* - a {@link Recording} — the canon `{ snapshot, events, structure }`, live or
|
|
17
|
+
* parsed back from JSON. **The complete source.**
|
|
18
|
+
* - a {@link RunRecorder} — the handle `recordRun()` returns; frozen for you.
|
|
19
|
+
* - a {@link Runner} — an agent / composition / pattern. Honest but PARTIAL:
|
|
20
|
+
* a finished runner can hand over its snapshot and its chart, and it cannot
|
|
21
|
+
* hand over the event stream, because the dispatcher drops events that
|
|
22
|
+
* nobody subscribed to rather than queuing them. The manifest says so in a
|
|
23
|
+
* note instead of shipping a silent gap.
|
|
24
|
+
*/
|
|
25
|
+
export type BugReportSource = Recording | RunRecorder | Runner;
|
|
26
|
+
/** One source, or several — several runs of one session are one conversation. */
|
|
27
|
+
export type BugReportInput = BugReportSource | readonly BugReportSource[];
|
|
28
|
+
/** What the reporter says happened. The prose half of the report. */
|
|
29
|
+
export interface BugReportFields {
|
|
30
|
+
/** One line, as it will read in the issue title. */
|
|
31
|
+
readonly title: string;
|
|
32
|
+
/** How to get there. Free text; numbered lines read best. */
|
|
33
|
+
readonly stepsToReproduce: string;
|
|
34
|
+
/** What should have happened. */
|
|
35
|
+
readonly expected: string;
|
|
36
|
+
/** What happened instead. */
|
|
37
|
+
readonly actual: string;
|
|
38
|
+
/** The reporting APPLICATION's version, when it has one (not this library's
|
|
39
|
+
* — that is read from the package and cannot be mistyped). */
|
|
40
|
+
readonly appVersion?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* A selectable piece of the bundle.
|
|
44
|
+
*
|
|
45
|
+
* Two kinds, and the difference is what a reporter is deciding:
|
|
46
|
+
*
|
|
47
|
+
* `conversation` — one conversation's evidence (its recordings, its slice of
|
|
48
|
+
* the transcript and of the narrative). Keyed by session id
|
|
49
|
+
* when the run was session-bound, else by run id.
|
|
50
|
+
* `file` — one derived file that is not per-conversation: the
|
|
51
|
+
* readable transcript, the narrative, the environment block.
|
|
52
|
+
*
|
|
53
|
+
* `manifest.json` is not a unit: it is the statement of the selection, and a
|
|
54
|
+
* bundle that could omit its own statement is not an honest bundle.
|
|
55
|
+
*/
|
|
56
|
+
export interface BugReportUnit {
|
|
57
|
+
/** Stable within one manifest — `conv-1`, `file-narrative`. Selection is by
|
|
58
|
+
* this id, and the oversize trim hints name these ids. */
|
|
59
|
+
readonly id: string;
|
|
60
|
+
readonly kind: 'conversation' | 'file';
|
|
61
|
+
/** One line a human reads in a consent dialog. */
|
|
62
|
+
readonly label: string;
|
|
63
|
+
/** Bytes this unit contributes to the bundle, uncompressed. */
|
|
64
|
+
readonly bytes: number;
|
|
65
|
+
/** Typed events in this conversation. Conversation units only. */
|
|
66
|
+
readonly eventCount?: number;
|
|
67
|
+
/** Agent turns derived from those events. Conversation units only. */
|
|
68
|
+
readonly turnCount?: number;
|
|
69
|
+
/** Runs folded into this conversation. Conversation units only. */
|
|
70
|
+
readonly runCount?: number;
|
|
71
|
+
/** The hosting session id, when the runs carried one. */
|
|
72
|
+
readonly sessionId?: string;
|
|
73
|
+
/** Files this unit puts in the bundle (a `file` unit has exactly one). */
|
|
74
|
+
readonly files: readonly string[];
|
|
75
|
+
}
|
|
76
|
+
/** One file in the bundle, as the manifest reports it. */
|
|
77
|
+
export interface BugReportFileSummary {
|
|
78
|
+
/** Path inside the zip. */
|
|
79
|
+
readonly name: string;
|
|
80
|
+
readonly bytes: number;
|
|
81
|
+
/** The unit that produced it, when one did. `manifest.json` has none. */
|
|
82
|
+
readonly unitId?: string;
|
|
83
|
+
readonly eventCount?: number;
|
|
84
|
+
readonly turnCount?: number;
|
|
85
|
+
}
|
|
86
|
+
/** What the reporter chose to leave out — stated, never silently absent. */
|
|
87
|
+
export interface BugReportExcluded {
|
|
88
|
+
readonly conversations: number;
|
|
89
|
+
readonly files: number;
|
|
90
|
+
readonly events: number;
|
|
91
|
+
readonly turns: number;
|
|
92
|
+
/** The unit ids that were offered and not included. */
|
|
93
|
+
readonly unitIds: readonly string[];
|
|
94
|
+
}
|
|
95
|
+
/** Versions, and deliberately nothing that identifies a machine or a person. */
|
|
96
|
+
export interface BugReportEnvironment {
|
|
97
|
+
/** This library's version, read from its own package manifest. */
|
|
98
|
+
readonly agentfootprint: string;
|
|
99
|
+
/** The engine underneath it. */
|
|
100
|
+
readonly footprintjs: string;
|
|
101
|
+
/** `process.version`, e.g. `v20.11.0`. `'unknown'` off Node. */
|
|
102
|
+
readonly node: string;
|
|
103
|
+
/** `process.platform` / `process.arch` — a platform is not an identity. */
|
|
104
|
+
readonly platform: string;
|
|
105
|
+
readonly arch: string;
|
|
106
|
+
/** The reporting application's own version, when it told us. */
|
|
107
|
+
readonly appVersion?: string;
|
|
108
|
+
}
|
|
109
|
+
/** The oversize verdict, with hints that name real, droppable unit ids. */
|
|
110
|
+
export interface BugReportOversize {
|
|
111
|
+
readonly totalBytes: number;
|
|
112
|
+
readonly limitBytes: number;
|
|
113
|
+
/** Sentences naming unit ids and what dropping each one saves. */
|
|
114
|
+
readonly trimHints: readonly string[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* The honest summary of a bundle — what a human reads BEFORE consenting, and
|
|
118
|
+
* what rides inside the zip as `manifest.json` afterwards.
|
|
119
|
+
*
|
|
120
|
+
* `describeBugReport` returns one with every unit selected and no reporter
|
|
121
|
+
* prose. `exportBugReport` returns one that reflects the SELECTION, carries
|
|
122
|
+
* the reporter's fields, and states the exclusions.
|
|
123
|
+
*/
|
|
124
|
+
export interface BugReportManifest {
|
|
125
|
+
readonly manifestVersion: 1;
|
|
126
|
+
/** ISO 8601, UTC. Also the timestamp stamped on every zip entry. */
|
|
127
|
+
readonly createdAt: string;
|
|
128
|
+
/** Present on an export manifest; absent on a description. */
|
|
129
|
+
readonly report?: BugReportFields;
|
|
130
|
+
/** Everything on offer, selected or not. */
|
|
131
|
+
readonly units: readonly BugReportUnit[];
|
|
132
|
+
/** The unit ids actually in this bundle. */
|
|
133
|
+
readonly selected: readonly string[];
|
|
134
|
+
readonly excluded: BugReportExcluded;
|
|
135
|
+
readonly files: readonly BugReportFileSummary[];
|
|
136
|
+
readonly counts: {
|
|
137
|
+
readonly conversations: number;
|
|
138
|
+
readonly runs: number;
|
|
139
|
+
readonly events: number;
|
|
140
|
+
readonly turns: number;
|
|
141
|
+
readonly files: number;
|
|
142
|
+
};
|
|
143
|
+
/** Sum of every file in the bundle, uncompressed (the zip is stored). */
|
|
144
|
+
readonly totalBytes: number;
|
|
145
|
+
/**
|
|
146
|
+
* The state keys whose values arrived already scrubbed, BY NAME ONLY.
|
|
147
|
+
*
|
|
148
|
+
* Redaction happens upstream at commit time (footprintjs `RedactionPolicy`),
|
|
149
|
+
* so a bundle never carries the values. This list is derived from the
|
|
150
|
+
* evidence itself — the placeholders that are actually in it — so a human
|
|
151
|
+
* can see WHICH secrets were protected and consent knowing it.
|
|
152
|
+
*/
|
|
153
|
+
readonly redactedKeys: readonly string[];
|
|
154
|
+
/** Loud, human-readable problems: oversize, a missing timeline, an empty run. */
|
|
155
|
+
readonly warnings: readonly string[];
|
|
156
|
+
/** Quiet, true facts about how the bundle was assembled. */
|
|
157
|
+
readonly notes: readonly string[];
|
|
158
|
+
/** Present when the bundle is over the size ceiling. */
|
|
159
|
+
readonly oversize?: BugReportOversize;
|
|
160
|
+
readonly environment: BugReportEnvironment;
|
|
161
|
+
}
|
|
162
|
+
/** One file, as bytes, ready to write or to zip. */
|
|
163
|
+
export interface BugReportFile {
|
|
164
|
+
/** Path inside the bundle, `/`-separated and relative. */
|
|
165
|
+
readonly name: string;
|
|
166
|
+
/** The bytes. UTF-8 for every file this library produces. */
|
|
167
|
+
readonly bytes: Uint8Array;
|
|
168
|
+
/** The same content as text, for a consumer that would only decode it again. */
|
|
169
|
+
readonly text: string;
|
|
170
|
+
}
|
|
171
|
+
/** The finished bundle. */
|
|
172
|
+
export interface BugReport {
|
|
173
|
+
/** The manifest, reflecting the selection. Also `manifest.json` inside the zip. */
|
|
174
|
+
readonly manifest: BugReportManifest;
|
|
175
|
+
/** The pieces, named. `files[0]` is always `manifest.json`. */
|
|
176
|
+
readonly files: readonly BugReportFile[];
|
|
177
|
+
/** A real, stored (uncompressed) zip of exactly those files. */
|
|
178
|
+
readonly zip: Uint8Array;
|
|
179
|
+
/** `<yyyy-mm-dd>-<slug>.zip` — a reporter may override it. */
|
|
180
|
+
readonly filename: string;
|
|
181
|
+
}
|
|
182
|
+
export interface ExportBugReportOptions extends BugReportFields {
|
|
183
|
+
/**
|
|
184
|
+
* Unit ids to bundle. Default: all of them.
|
|
185
|
+
*
|
|
186
|
+
* This is the consent seam: show `describeBugReport(input).units` to the
|
|
187
|
+
* reporter, take back the ids they ticked, pass them here. Anything left out
|
|
188
|
+
* is COUNTED in `manifest.excluded` — the maintainer learns that a subset
|
|
189
|
+
* was sent rather than wondering why turn 4 refers to a turn 3 that is not
|
|
190
|
+
* there.
|
|
191
|
+
*/
|
|
192
|
+
readonly include?: readonly string[];
|
|
193
|
+
/**
|
|
194
|
+
* Byte ceiling that flips `oversize` and the loud warning. Default 20 MB —
|
|
195
|
+
* comfortably under what an issue tracker will take, and the point at which
|
|
196
|
+
* a bundle stops being reviewable by a person.
|
|
197
|
+
*/
|
|
198
|
+
readonly warnOverBytes?: number;
|
|
199
|
+
/** Override the timestamp — the only thing that makes the zip deterministic. */
|
|
200
|
+
readonly now?: Date;
|
|
201
|
+
}
|
|
202
|
+
/** `describeBugReport` takes nothing but the input, and the same size dial. */
|
|
203
|
+
export interface DescribeBugReportOptions {
|
|
204
|
+
readonly warnOverBytes?: number;
|
|
205
|
+
readonly now?: Date;
|
|
206
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* bug-report — the types a bug report is made of.
|
|
3
|
+
*
|
|
4
|
+
* Two of them are the point of the whole sub-library:
|
|
5
|
+
*
|
|
6
|
+
* {@link BugReportUnit} the SELECTABLE piece. A reporter consents to
|
|
7
|
+
* units, not to a blob.
|
|
8
|
+
* {@link BugReportManifest} the honest statement of what a bundle contains
|
|
9
|
+
* AND what it deliberately leaves out.
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/bug-report/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zipStore — a real `.zip` file, STORED (no compression), in ~150 lines and
|
|
3
|
+
* zero dependencies.
|
|
4
|
+
*
|
|
5
|
+
* ## Why store-only is the honest choice here
|
|
6
|
+
*
|
|
7
|
+
* This writer exists for ONE payload: a bug-report bundle, which is JSON and
|
|
8
|
+
* text. Deflate would shrink it well — and would cost this library either a
|
|
9
|
+
* dependency (a zlib binding in a package that has none) or `node:zlib` (which
|
|
10
|
+
* makes the export Node-only, when building the bundle in a browser is exactly
|
|
11
|
+
* the flow the consent manifest is for). Store-only keeps the export
|
|
12
|
+
* environment-neutral and the writer small enough to read in one sitting.
|
|
13
|
+
*
|
|
14
|
+
* The trade is stated rather than hidden: **a stored bundle is roughly the sum
|
|
15
|
+
* of its files.** A 9 MB recording produces a ~9 MB zip. Every unzip tool reads
|
|
16
|
+
* it — `unzip`, Finder, Explorer, `zipfile.ZipFile`, `jar` — because method 0
|
|
17
|
+
* is the oldest thing in the format. If a bundle is too big to attach, the
|
|
18
|
+
* answer is to send fewer conversations (which the manifest's trim hints name),
|
|
19
|
+
* not to compress harder; that is the same answer a deflated bundle would give
|
|
20
|
+
* one doubling later.
|
|
21
|
+
*
|
|
22
|
+
* ## What it writes, exactly
|
|
23
|
+
*
|
|
24
|
+
* One local file header + data per entry, then one central-directory header per
|
|
25
|
+
* entry, then the end-of-central-directory record — the classic three-part
|
|
26
|
+
* layout from APPNOTE.TXT, no data descriptors, no zip64, no archive comment.
|
|
27
|
+
* Names are UTF-8 with the language-encoding flag (bit 11) set, so a non-ASCII
|
|
28
|
+
* name is not mojibake on a reader that honours the flag.
|
|
29
|
+
*
|
|
30
|
+
* ## What it refuses
|
|
31
|
+
*
|
|
32
|
+
* A path that would escape the extraction directory (`/leading`, `..`, a drive
|
|
33
|
+
* letter, a backslash) is refused BY NAME rather than written — a bug-report
|
|
34
|
+
* bundle is opened by a maintainer on their own machine, and "zip slip" is the
|
|
35
|
+
* one way a report could hurt the person reading it. Duplicate names, empty
|
|
36
|
+
* names, an entry over 4 GB and more than 65,535 entries are refused too: those
|
|
37
|
+
* are the boundaries of the non-zip64 format, and writing past them silently
|
|
38
|
+
* produces a file that fails to open.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const bytes = zipStore([
|
|
43
|
+
* { name: 'manifest.json', data: new TextEncoder().encode('{}') },
|
|
44
|
+
* ]);
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @internal Not a public export. `exportBugReport` is the door.
|
|
48
|
+
*/
|
|
49
|
+
/** One file in the archive. Directories are implied by `/` in a name. */
|
|
50
|
+
export interface ZipEntry {
|
|
51
|
+
/** Path inside the archive, `/`-separated and relative (`docs/a.json`). */
|
|
52
|
+
readonly name: string;
|
|
53
|
+
/** The bytes. Text is the caller's `TextEncoder` output. */
|
|
54
|
+
readonly data: Uint8Array;
|
|
55
|
+
}
|
|
56
|
+
export interface ZipStoreOptions {
|
|
57
|
+
/**
|
|
58
|
+
* Timestamp stamped on every entry. Default: now. Passing one makes the
|
|
59
|
+
* output byte-for-byte deterministic, which is what makes a zip testable.
|
|
60
|
+
* DOS timestamps start in 1980; anything earlier is clamped to it.
|
|
61
|
+
*/
|
|
62
|
+
readonly modified?: Date;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Build a stored (uncompressed) zip archive.
|
|
66
|
+
*
|
|
67
|
+
* @throws TypeError naming the offending entry when a name is unsafe or
|
|
68
|
+
* duplicated, or when the archive would exceed the non-zip64 limits.
|
|
69
|
+
*/
|
|
70
|
+
export declare function zipStore(entries: readonly ZipEntry[], options?: ZipStoreOptions): Uint8Array;
|
|
71
|
+
export declare function crc32(bytes: Uint8Array): number;
|