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,202 @@
|
|
|
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
|
+
/** Non-zip64 ceilings. Past either, the file this would write cannot be read. */
|
|
50
|
+
const MAX_ENTRY_BYTES = 0xffffffff;
|
|
51
|
+
const MAX_ENTRIES = 0xffff;
|
|
52
|
+
const LOCAL_SIG = 0x04034b50;
|
|
53
|
+
const CENTRAL_SIG = 0x02014b50;
|
|
54
|
+
const EOCD_SIG = 0x06054b50;
|
|
55
|
+
/** 2.0 — the version that has stored + deflated entries. */
|
|
56
|
+
const VERSION_NEEDED = 20;
|
|
57
|
+
/** Bit 11: the name (and comment) are UTF-8. */
|
|
58
|
+
const FLAG_UTF8 = 0x0800;
|
|
59
|
+
const METHOD_STORE = 0;
|
|
60
|
+
/**
|
|
61
|
+
* Build a stored (uncompressed) zip archive.
|
|
62
|
+
*
|
|
63
|
+
* @throws TypeError naming the offending entry when a name is unsafe or
|
|
64
|
+
* duplicated, or when the archive would exceed the non-zip64 limits.
|
|
65
|
+
*/
|
|
66
|
+
export function zipStore(entries, options = {}) {
|
|
67
|
+
if (entries.length > MAX_ENTRIES) {
|
|
68
|
+
throw new TypeError(`zipStore: ${entries.length} entries exceeds the ${MAX_ENTRIES}-entry limit of a ` +
|
|
69
|
+
`non-zip64 archive. Bundle fewer files (or fold them into one JSON file).`);
|
|
70
|
+
}
|
|
71
|
+
const { dosTime, dosDate } = toDosDateTime(options.modified ?? new Date());
|
|
72
|
+
const encoder = new TextEncoder();
|
|
73
|
+
const seen = new Set();
|
|
74
|
+
const locals = [];
|
|
75
|
+
const centrals = [];
|
|
76
|
+
let offset = 0;
|
|
77
|
+
for (const entry of entries) {
|
|
78
|
+
const name = checkedName(entry.name, seen);
|
|
79
|
+
seen.add(name);
|
|
80
|
+
if (entry.data.length > MAX_ENTRY_BYTES) {
|
|
81
|
+
throw new TypeError(`zipStore: entry '${name}' is ${entry.data.length} bytes, past the 4 GB ceiling of a ` +
|
|
82
|
+
`non-zip64 archive. Split it, or leave it out of the bundle.`);
|
|
83
|
+
}
|
|
84
|
+
const nameBytes = encoder.encode(name);
|
|
85
|
+
const crc = crc32(entry.data);
|
|
86
|
+
const size = entry.data.length;
|
|
87
|
+
const local = new Uint8Array(30 + nameBytes.length);
|
|
88
|
+
const lv = new DataView(local.buffer);
|
|
89
|
+
lv.setUint32(0, LOCAL_SIG, true);
|
|
90
|
+
lv.setUint16(4, VERSION_NEEDED, true);
|
|
91
|
+
lv.setUint16(6, FLAG_UTF8, true);
|
|
92
|
+
lv.setUint16(8, METHOD_STORE, true);
|
|
93
|
+
lv.setUint16(10, dosTime, true);
|
|
94
|
+
lv.setUint16(12, dosDate, true);
|
|
95
|
+
lv.setUint32(14, crc, true);
|
|
96
|
+
lv.setUint32(18, size, true); // compressed === uncompressed when stored
|
|
97
|
+
lv.setUint32(22, size, true);
|
|
98
|
+
lv.setUint16(26, nameBytes.length, true);
|
|
99
|
+
lv.setUint16(28, 0, true); // no extra field
|
|
100
|
+
local.set(nameBytes, 30);
|
|
101
|
+
const central = new Uint8Array(46 + nameBytes.length);
|
|
102
|
+
const cv = new DataView(central.buffer);
|
|
103
|
+
cv.setUint32(0, CENTRAL_SIG, true);
|
|
104
|
+
cv.setUint16(4, VERSION_NEEDED, true); // version made by
|
|
105
|
+
cv.setUint16(6, VERSION_NEEDED, true); // version needed
|
|
106
|
+
cv.setUint16(8, FLAG_UTF8, true);
|
|
107
|
+
cv.setUint16(10, METHOD_STORE, true);
|
|
108
|
+
cv.setUint16(12, dosTime, true);
|
|
109
|
+
cv.setUint16(14, dosDate, true);
|
|
110
|
+
cv.setUint32(16, crc, true);
|
|
111
|
+
cv.setUint32(20, size, true);
|
|
112
|
+
cv.setUint32(24, size, true);
|
|
113
|
+
cv.setUint16(28, nameBytes.length, true);
|
|
114
|
+
cv.setUint16(30, 0, true); // extra length
|
|
115
|
+
cv.setUint16(32, 0, true); // comment length
|
|
116
|
+
cv.setUint16(34, 0, true); // disk number start
|
|
117
|
+
cv.setUint16(36, 0, true); // internal attributes
|
|
118
|
+
cv.setUint32(38, 0, true); // external attributes
|
|
119
|
+
cv.setUint32(42, offset, true); // where this entry's local header sits
|
|
120
|
+
central.set(nameBytes, 46);
|
|
121
|
+
locals.push(local, entry.data);
|
|
122
|
+
centrals.push(central);
|
|
123
|
+
offset += local.length + size;
|
|
124
|
+
}
|
|
125
|
+
const centralSize = centrals.reduce((sum, part) => sum + part.length, 0);
|
|
126
|
+
const eocd = new Uint8Array(22);
|
|
127
|
+
const ev = new DataView(eocd.buffer);
|
|
128
|
+
ev.setUint32(0, EOCD_SIG, true);
|
|
129
|
+
ev.setUint16(4, 0, true); // this disk
|
|
130
|
+
ev.setUint16(6, 0, true); // disk with the central directory
|
|
131
|
+
ev.setUint16(8, entries.length, true);
|
|
132
|
+
ev.setUint16(10, entries.length, true);
|
|
133
|
+
ev.setUint32(12, centralSize, true);
|
|
134
|
+
ev.setUint32(16, offset, true); // central directory starts after the data
|
|
135
|
+
ev.setUint16(20, 0, true); // no archive comment
|
|
136
|
+
return concat([...locals, ...centrals, eocd]);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The one name rule: relative, `/`-separated, no traversal. A bug report is
|
|
140
|
+
* extracted by the person it was filed against; this is the line between a
|
|
141
|
+
* bundle and a payload.
|
|
142
|
+
*/
|
|
143
|
+
function checkedName(name, seen) {
|
|
144
|
+
if (!name)
|
|
145
|
+
throw new TypeError('zipStore: an entry has an empty name.');
|
|
146
|
+
if (seen.has(name)) {
|
|
147
|
+
throw new TypeError(`zipStore: two entries are both named '${name}'. A zip may hold duplicates and most ` +
|
|
148
|
+
`readers silently keep the last one, so the writer refuses instead.`);
|
|
149
|
+
}
|
|
150
|
+
const unsafe = name.startsWith('/') ||
|
|
151
|
+
name.includes('\\') ||
|
|
152
|
+
/^[a-zA-Z]:/.test(name) ||
|
|
153
|
+
name.split('/').includes('..');
|
|
154
|
+
if (unsafe) {
|
|
155
|
+
throw new TypeError(`zipStore: refusing the entry name '${name}'. Names must be RELATIVE and ` +
|
|
156
|
+
`'/'-separated, with no '..' segment, no leading '/', no backslash and no drive ` +
|
|
157
|
+
`letter — an archive is extracted on somebody else's machine, and a path that ` +
|
|
158
|
+
`escapes the extraction directory is how a report hurts the person reading it.`);
|
|
159
|
+
}
|
|
160
|
+
return name;
|
|
161
|
+
}
|
|
162
|
+
/** MS-DOS date/time, the only timestamp a base zip entry carries. */
|
|
163
|
+
function toDosDateTime(date) {
|
|
164
|
+
const when = Number.isFinite(date.getTime()) ? date : new Date();
|
|
165
|
+
const year = when.getFullYear();
|
|
166
|
+
// DOS epoch is 1980. Rather than write a negative year field (which readers
|
|
167
|
+
// render as garbage), clamp — the timestamp is provenance, not evidence.
|
|
168
|
+
if (year < 1980)
|
|
169
|
+
return { dosTime: 0, dosDate: (1 << 5) | 1 };
|
|
170
|
+
const dosTime = (when.getHours() << 11) | (when.getMinutes() << 5) | Math.floor(when.getSeconds() / 2);
|
|
171
|
+
const dosDate = ((year - 1980) << 9) | ((when.getMonth() + 1) << 5) | when.getDate();
|
|
172
|
+
return { dosTime, dosDate };
|
|
173
|
+
}
|
|
174
|
+
/** CRC-32 (IEEE 802.3), table built once on first use. */
|
|
175
|
+
let crcTable;
|
|
176
|
+
export function crc32(bytes) {
|
|
177
|
+
if (!crcTable) {
|
|
178
|
+
crcTable = new Uint32Array(256);
|
|
179
|
+
for (let i = 0; i < 256; i++) {
|
|
180
|
+
let c = i;
|
|
181
|
+
for (let bit = 0; bit < 8; bit++)
|
|
182
|
+
c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
|
|
183
|
+
crcTable[i] = c >>> 0;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
let crc = 0xffffffff;
|
|
187
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
188
|
+
crc = crcTable[(crc ^ bytes[i]) & 0xff] ^ (crc >>> 8);
|
|
189
|
+
}
|
|
190
|
+
return (crc ^ 0xffffffff) >>> 0;
|
|
191
|
+
}
|
|
192
|
+
function concat(parts) {
|
|
193
|
+
const total = parts.reduce((sum, part) => sum + part.length, 0);
|
|
194
|
+
const out = new Uint8Array(total);
|
|
195
|
+
let at = 0;
|
|
196
|
+
for (const part of parts) {
|
|
197
|
+
out.set(part, at);
|
|
198
|
+
at += part.length;
|
|
199
|
+
}
|
|
200
|
+
return out;
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=zip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/lib/bug-report/zip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAmBH,iFAAiF;AACjF,MAAM,eAAe,GAAG,UAAU,C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CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,IAAI,GAAG,GAAG,UAAU,CAAC;IACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,GAAG,GAAG,QAAQ,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC,GAAG,IAAI,CAAE,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAClC,CAAC;AAED,SAAS,MAAM,CAAC,KAA4B;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAChE,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IAClC,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAClB,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* libraryVersion — "which version of this library produced that?"
|
|
3
|
+
*
|
|
4
|
+
* Anything that ships a record of a run out of the process — an audit chain, a
|
|
5
|
+
* bug-report bundle — has to stamp the library version on it, or the person
|
|
6
|
+
* reading it months later is comparing behaviour against a version they are
|
|
7
|
+
* guessing at. That is one job, so it is one function: two copies of this walk
|
|
8
|
+
* would be two answers to a question that must have exactly one.
|
|
9
|
+
*
|
|
10
|
+
* It reads the package manifest through `lazyRequire`, trying the installed
|
|
11
|
+
* specifier first and then the relative paths that work from `dist/` and from
|
|
12
|
+
* `dist/esm/`. The `name` guard rejects any manifest that is not ours — a
|
|
13
|
+
* relative walk in a consumer's tree can otherwise find THEIR package.json and
|
|
14
|
+
* stamp a record with the application's version.
|
|
15
|
+
*
|
|
16
|
+
* Never throws, and answers `'unknown'` when it cannot tell. A version that
|
|
17
|
+
* cannot be read is a stamp that says so; a thrown error here would take down
|
|
18
|
+
* the export that merely wanted to label itself.
|
|
19
|
+
*/
|
|
20
|
+
/** This library's own version, or `'unknown'`. */
|
|
21
|
+
export declare function libraryVersion(): string;
|
|
22
|
+
/** The engine underneath, or `'unknown'` — the other half of "which versions?". */
|
|
23
|
+
export declare function engineVersion(): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* libraryVersion — "which version of this library produced that?"
|
|
3
|
+
*
|
|
4
|
+
* Anything that ships a record of a run out of the process — an audit chain, a
|
|
5
|
+
* bug-report bundle — has to stamp the library version on it, or the person
|
|
6
|
+
* reading it months later is comparing behaviour against a version they are
|
|
7
|
+
* guessing at. That is one job, so it is one function: two copies of this walk
|
|
8
|
+
* would be two answers to a question that must have exactly one.
|
|
9
|
+
*
|
|
10
|
+
* It reads the package manifest through `lazyRequire`, trying the installed
|
|
11
|
+
* specifier first and then the relative paths that work from `dist/` and from
|
|
12
|
+
* `dist/esm/`. The `name` guard rejects any manifest that is not ours — a
|
|
13
|
+
* relative walk in a consumer's tree can otherwise find THEIR package.json and
|
|
14
|
+
* stamp a record with the application's version.
|
|
15
|
+
*
|
|
16
|
+
* Never throws, and answers `'unknown'` when it cannot tell. A version that
|
|
17
|
+
* cannot be read is a stamp that says so; a thrown error here would take down
|
|
18
|
+
* the export that merely wanted to label itself.
|
|
19
|
+
*/
|
|
20
|
+
import { lazyRequire } from './lazyRequire.js';
|
|
21
|
+
function versionOf(packageName, candidates) {
|
|
22
|
+
for (const specifier of candidates) {
|
|
23
|
+
try {
|
|
24
|
+
const pkg = lazyRequire(specifier);
|
|
25
|
+
if (pkg.name === packageName && typeof pkg.version === 'string')
|
|
26
|
+
return pkg.version;
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
/* try the next candidate */
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return 'unknown';
|
|
33
|
+
}
|
|
34
|
+
/** This library's own version, or `'unknown'`. */
|
|
35
|
+
export function libraryVersion() {
|
|
36
|
+
return versionOf('agentfootprint', [
|
|
37
|
+
'agentfootprint/package.json',
|
|
38
|
+
'../../package.json',
|
|
39
|
+
'../../../package.json',
|
|
40
|
+
]);
|
|
41
|
+
}
|
|
42
|
+
/** The engine underneath, or `'unknown'` — the other half of "which versions?". */
|
|
43
|
+
export function engineVersion() {
|
|
44
|
+
return versionOf('footprintjs', ['footprintjs/package.json']);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=libraryVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libraryVersion.js","sourceRoot":"","sources":["../../../src/lib/libraryVersion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,SAAS,SAAS,CAAC,WAAmB,EAAE,UAA6B;IACnE,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,WAAW,CAAsC,SAAS,CAAC,CAAC;YACxE,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;gBAAE,OAAO,GAAG,CAAC,OAAO,CAAC;QACtF,CAAC;QAAC,MAAM,CAAC;YACP,4BAA4B;QAC9B,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,cAAc;IAC5B,OAAO,SAAS,CAAC,gBAAgB,EAAE;QACjC,6BAA6B;QAC7B,oBAAoB;QACpB,uBAAuB;KACxB,CAAC,CAAC;AACL,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,aAAa;IAC3B,OAAO,SAAS,CAAC,aAAa,EAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -50,6 +50,22 @@ export interface OpenableRecording {
|
|
|
50
50
|
readonly events?: readonly unknown[];
|
|
51
51
|
readonly structure?: unknown;
|
|
52
52
|
}
|
|
53
|
+
/** A recorder row as it rides `snapshot.recorders`. */
|
|
54
|
+
interface RecorderRow {
|
|
55
|
+
readonly id?: string;
|
|
56
|
+
readonly name?: string;
|
|
57
|
+
readonly data?: unknown;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The narrative recorder's row: `data` is an array of `{ text, depth }`.
|
|
61
|
+
*
|
|
62
|
+
* @internal Exported for the bug-report bundler, which writes the same lines to
|
|
63
|
+
* `narrative.txt`. One shape-detector, one answer to "is there a narrative in
|
|
64
|
+
* this snapshot?" — two copies would disagree the first time the row changes.
|
|
65
|
+
*/
|
|
66
|
+
export declare function narrativeFrom(snapshot: {
|
|
67
|
+
recorders?: readonly RecorderRow[];
|
|
68
|
+
}): string[] | undefined;
|
|
53
69
|
/**
|
|
54
70
|
* Reopen a saved recording as toolpack artifacts.
|
|
55
71
|
*
|
|
@@ -62,3 +78,4 @@ export interface OpenableRecording {
|
|
|
62
78
|
* never be given by mistake.
|
|
63
79
|
*/
|
|
64
80
|
export declare function openRecording(recording: OpenableRecording): TraceToolpackArtifacts;
|
|
81
|
+
export {};
|
|
@@ -38,8 +38,14 @@
|
|
|
38
38
|
* toolpack navigates what a run DID, and the chart says what it COULD do.
|
|
39
39
|
* It is left on the recording for the viewers that draw it.
|
|
40
40
|
*/
|
|
41
|
-
/**
|
|
42
|
-
|
|
41
|
+
/**
|
|
42
|
+
* The narrative recorder's row: `data` is an array of `{ text, depth }`.
|
|
43
|
+
*
|
|
44
|
+
* @internal Exported for the bug-report bundler, which writes the same lines to
|
|
45
|
+
* `narrative.txt`. One shape-detector, one answer to "is there a narrative in
|
|
46
|
+
* this snapshot?" — two copies would disagree the first time the row changes.
|
|
47
|
+
*/
|
|
48
|
+
export function narrativeFrom(snapshot) {
|
|
43
49
|
const rows = snapshot.recorders;
|
|
44
50
|
if (!Array.isArray(rows))
|
|
45
51
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openRecording.js","sourceRoot":"","sources":["../../../../src/lib/trace-toolpack/openRecording.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AA0BH
|
|
1
|
+
{"version":3,"file":"openRecording.js","sourceRoot":"","sources":["../../../../src/lib/trace-toolpack/openRecording.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AA0BH;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,QAE7B;IACC,MAAM,IAAI,GAAG,QAAQ,CAAC,SAAS,CAAC;IAChC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,GAAG,EAAE,IAAI,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QACxD,0EAA0E;QAC1E,yEAAyE;QACzE,2CAA2C;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAoD,CAAC;QACzE,IAAI,OAAO,KAAK,EAAE,IAAI,KAAK,QAAQ,IAAI,OAAO,KAAK,EAAE,KAAK,KAAK,QAAQ;YAAE,SAAS;QAClF,OAAQ,IAA6B,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,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AE,CAAC;QAC7C,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAwC,EAAE,CAAC;KACnF,CAAC;AACJ,CAAC"}
|
|
@@ -51,3 +51,5 @@ export { otelObservability, type OtelObservabilityOptions, type OtelObservabilit
|
|
|
51
51
|
export { fileObservability, type FileObservabilityOptions, type FileSinkFs, } from './adapters/observability/file.js';
|
|
52
52
|
export { auditExport, verifyAuditBundle, AUDIT_BUNDLE_FORMAT, AUDIT_GENESIS_EVENT_TYPE, AUDIT_ZERO_HASH, type AuditBundle, type AuditBundleHeader, type AuditExportOptions, type AuditExportStrategy, type AuditRecord, type AuditVerifyResult, } from './adapters/observability/audit.js';
|
|
53
53
|
export { canonicalJson, CANONICAL_JSON_VERSION } from './lib/canonicalJson.js';
|
|
54
|
+
export { githubBugReporter, type BugReporter, type FiledBugReport, type GithubBugReporterOptions, } from './adapters/observability/githubBugReporter.js';
|
|
55
|
+
export { githubDeviceSignIn, type GithubDeviceIdentity, type GithubDeviceSignIn, type GithubDeviceSignInOptions, } from './adapters/observability/githubDeviceSignIn.js';
|
|
@@ -57,4 +57,13 @@ export { fileObservability, } from './adapters/observability/file.js';
|
|
|
57
57
|
// imported the same way the vendor SDKs are).
|
|
58
58
|
export { auditExport, verifyAuditBundle, AUDIT_BUNDLE_FORMAT, AUDIT_GENESIS_EVENT_TYPE, AUDIT_ZERO_HASH, } from './adapters/observability/audit.js';
|
|
59
59
|
export { canonicalJson, CANONICAL_JSON_VERSION } from './lib/canonicalJson.js';
|
|
60
|
+
// File a bug report WITH the run attached (9.9.0). Two vendor-free adapters
|
|
61
|
+
// over plain `fetch` — no SDK, `apiBase` for GitHub Enterprise Server, and a
|
|
62
|
+
// `_fetch` seam so the whole path is testable without a network:
|
|
63
|
+
// • `githubBugReporter` — commits the evidence zip and files the issue.
|
|
64
|
+
// TWIN TARGETS: the issue and the evidence may live in different repos.
|
|
65
|
+
// • `githubDeviceSignIn` — the reporter signs in as themselves, so the issue
|
|
66
|
+
// carries their name (OAuth device flow; browser-safe).
|
|
67
|
+
export { githubBugReporter, } from './adapters/observability/githubBugReporter.js';
|
|
68
|
+
export { githubDeviceSignIn, } from './adapters/observability/githubDeviceSignIn.js';
|
|
60
69
|
//# sourceMappingURL=observability-providers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability-providers.js","sourceRoot":"","sources":["../../src/observability-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EACL,sBAAsB,GAEvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,uBAAuB,GAExB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,iBAAiB,GAGlB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,iBAAiB,GAQlB,MAAM,kCAAkC,CAAC;AAC1C,qEAAqE;AACrE,yEAAyE;AACzE,wEAAwE;AACxE,OAAO,EACL,iBAAiB,GAGlB,MAAM,kCAAkC,CAAC;AAC1C,sEAAsE;AACtE,sEAAsE;AACtE,8CAA8C;AAC9C,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,GAOhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"observability-providers.js","sourceRoot":"","sources":["../../src/observability-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EACL,sBAAsB,GAEvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,uBAAuB,GAExB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,iBAAiB,GAGlB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,iBAAiB,GAQlB,MAAM,kCAAkC,CAAC;AAC1C,qEAAqE;AACrE,yEAAyE;AACzE,wEAAwE;AACxE,OAAO,EACL,iBAAiB,GAGlB,MAAM,kCAAkC,CAAC;AAC1C,sEAAsE;AACtE,sEAAsE;AACtE,8CAA8C;AAC9C,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,eAAe,GAOhB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAC/E,4EAA4E;AAC5E,6EAA6E;AAC7E,iEAAiE;AACjE,0EAA0E;AAC1E,4EAA4E;AAC5E,+EAA+E;AAC/E,4DAA4D;AAC5D,OAAO,EACL,iBAAiB,GAIlB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EACL,kBAAkB,GAInB,MAAM,gDAAgD,CAAC"}
|
package/dist/esm/observe.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export { boundaryRecorder, BoundaryRecorder, type ActorArrow, type BoundaryAggre
|
|
|
39
39
|
export { buildRunSteps, RunStepRecorder, runStepRecorder, type BuildRunStepsOptions, type RunStep, type RunStepGraph, type RunStepKind, type RunStepMeta, type RunStepRecorderOptions, type RunStepTransition, } from './recorders/observability/RunStepRecorder.js';
|
|
40
40
|
export { attachFlowchart, buildStepGraph, buildStepGraphFromEvents, type StepGraph, type StepNode, type StepEdge, type SlotBoundary, type ContextInjection, type FlowchartOptions, type FlowchartHandle, } from './recorders/observability/FlowchartRecorder.js';
|
|
41
41
|
export { recordRun, type Recording, type RecordRunOptions, type RunRecorder, } from './recorders/observability/recordRun.js';
|
|
42
|
+
export { describeBugReport, exportBugReport, type BugReport, type BugReportEnvironment, type BugReportExcluded, type BugReportFields, type BugReportFile, type BugReportFileSummary, type BugReportInput, type BugReportManifest, type BugReportOversize, type BugReportSource, type BugReportUnit, type DescribeBugReportOptions, type ExportBugReportOptions, type Transcript, type TranscriptStep, type TranscriptTurn, } from './lib/bug-report/index.js';
|
|
42
43
|
export { summarizeEmbeddings, summarizeVector, type EmbeddingSummary, } from './recorders/observability/embeddingSummary.js';
|
|
43
44
|
export { serializeTrace, redactContent, traceToStepGraph, type Trace, type TraceSummary, type TraceRedaction, type SerializeTraceOptions, } from './recorders/observability/trace.js';
|
|
44
45
|
export { attachLocalObservability, type LocalObservabilityHandle, type LocalObservabilityOptions, } from './recorders/observability/localObservability.js';
|
package/dist/esm/observe.js
CHANGED
|
@@ -45,6 +45,12 @@ export { attachFlowchart, buildStepGraph, buildStepGraphFromEvents, } from './re
|
|
|
45
45
|
// which is the shape the UIs consume (lens's `observeRecording`) and the one
|
|
46
46
|
// every integration used to assemble by hand, each missing a different piece.
|
|
47
47
|
export { recordRun, } from './recorders/observability/recordRun.js';
|
|
48
|
+
// exportBugReport — a bug report IS the evidence. `describeBugReport` measures
|
|
49
|
+
// the run first (selectable units, sizes, the redacted keys by NAME) so a human
|
|
50
|
+
// can consent to exactly what leaves; `exportBugReport` bundles the units they
|
|
51
|
+
// kept as named files plus a real (stored) zip. `githubBugReporter` — in this
|
|
52
|
+
// same door, from the providers barrel — files that bundle.
|
|
53
|
+
export { describeBugReport, exportBugReport, } from './lib/bug-report/index.js';
|
|
48
54
|
// What a recording keeps of a vector: `{ dims, norm }`, not the bytes (8.20.0).
|
|
49
55
|
// Applied by BoundaryRecorder and recordRun unless `recordEmbeddings: true`;
|
|
50
56
|
// exported so consumers that render or post-process recordings can apply or
|
package/dist/esm/observe.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observe.js","sourceRoot":"","sources":["../../src/observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,4BAA4B;AAC5B,OAAO,EAAE,eAAe,EAA+B,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,cAAc,EAA8B,MAAM,oCAAoC,CAAC;AAEhG,+BAA+B;AAC/B,OAAO,EAC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