@osfactory/otel-hook 0.13.2 → 0.14.1
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 +57 -0
- package/dist/{adapter-DyCb7y1N.d.ts → adapter-But5fFCk.d.ts} +9 -2
- package/dist/cli.js +628 -73
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +30 -4
- package/dist/config.js +161 -9
- package/dist/config.js.map +1 -1
- package/dist/{destinations-C4sSKjDO.d.ts → destinations-2KrcRslo.d.ts} +92 -2
- package/dist/{export-destinations-BjRXDots.d.ts → export-destinations-8tNkIC8a.d.ts} +110 -10
- package/dist/{filesystem-store-B3CpiIRl.d.ts → filesystem-store-Z8XgDtFj.d.ts} +1 -1
- package/dist/{hook-CKLpgrYP.d.ts → hook-D7XABd4f.d.ts} +19 -5
- package/dist/index.d.ts +14 -14
- package/dist/index.js +626 -72
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +4 -4
- package/dist/install.js.map +1 -1
- package/dist/integration.d.ts +9 -9
- package/dist/integration.js +555 -65
- package/dist/integration.js.map +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/lifecycle.js +1 -1
- package/dist/lifecycle.js.map +1 -1
- package/dist/{memory-B3r6sZtC.d.ts → memory-gipZUiXP.d.ts} +1 -1
- package/dist/{payload-DLK7QaBB.d.ts → payload-DWdx9yk3.d.ts} +1 -1
- package/dist/{ports-DhpSDIkp.d.ts → ports-qZTwK-z2.d.ts} +22 -2
- package/dist/privacy.d.ts +2 -2
- package/dist/privacy.js +42 -1
- package/dist/privacy.js.map +1 -1
- package/dist/providers.d.ts +9 -9
- package/dist/providers.js +22 -5
- package/dist/providers.js.map +1 -1
- package/dist/{registry-DM-4YvIA.d.ts → registry-D9rmMYxw.d.ts} +2 -2
- package/dist/runtime.d.ts +24 -9
- package/dist/runtime.js +282 -30
- package/dist/runtime.js.map +1 -1
- package/dist/{schema-CD61uW99.d.ts → schema-oRsbo7WO.d.ts} +45 -0
- package/dist/{service-CbI9CObT.d.ts → service-DySC7KQM.d.ts} +6 -1
- package/dist/state.d.ts +3 -3
- package/dist/state.js.map +1 -1
- package/dist/telemetry.d.ts +6 -5
- package/dist/telemetry.js +304 -17
- package/dist/telemetry.js.map +1 -1
- package/dist/testing.d.ts +8 -8
- package/dist/testing.js +185 -10
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/testing.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { O as OtelHookConfig, k as OtelHookConfigPatch } from './schema-
|
|
1
|
+
import { O as OtelHookConfig, k as OtelHookConfigPatch } from './schema-oRsbo7WO.js';
|
|
2
2
|
import { b as CanonicalEvent } from './events-fcomX6d5.js';
|
|
3
3
|
import { I as IdentityClaim, d as InvocationIdentity, S as SourceProvenance } from './identity-BrVBs901.js';
|
|
4
|
-
import { P as PrivacyService } from './service-
|
|
5
|
-
import { d as ProviderCapabilities, h as ProviderDetection, i as ProviderDetectionInput, e as ProviderContext, l as ProviderIdentityInput, f as ProviderDeliveryClaim, k as ProviderHookResponseInput, j as ProviderHookResponse, P as ProviderAdapter } from './adapter-
|
|
6
|
-
import { P as ProviderRegistry } from './registry-
|
|
7
|
-
import { I as IdGenerator, W as WorktreeLocator, P as PayloadEnricher, S as SessionContextReader } from './ports-
|
|
8
|
-
import { c as RecordingTelemetrySink, I as InMemoryStateStore, F as FixedClock, R as RecordingLogger } from './memory-
|
|
9
|
-
export { e as createDeterministicIdGenerator, f as createFixedClock, g as createInMemoryStateStore, j as createRecordingLogger, k as createRecordingTelemetrySink } from './memory-
|
|
10
|
-
import { O as OtelHook } from './hook-
|
|
4
|
+
import { P as PrivacyService } from './service-DySC7KQM.js';
|
|
5
|
+
import { d as ProviderCapabilities, h as ProviderDetection, i as ProviderDetectionInput, e as ProviderContext, l as ProviderIdentityInput, f as ProviderDeliveryClaim, k as ProviderHookResponseInput, j as ProviderHookResponse, P as ProviderAdapter } from './adapter-But5fFCk.js';
|
|
6
|
+
import { P as ProviderRegistry } from './registry-D9rmMYxw.js';
|
|
7
|
+
import { I as IdGenerator, W as WorktreeLocator, P as PayloadEnricher, S as SessionContextReader } from './ports-qZTwK-z2.js';
|
|
8
|
+
import { c as RecordingTelemetrySink, I as InMemoryStateStore, F as FixedClock, R as RecordingLogger } from './memory-gipZUiXP.js';
|
|
9
|
+
export { e as createDeterministicIdGenerator, f as createFixedClock, g as createInMemoryStateStore, j as createRecordingLogger, k as createRecordingTelemetrySink } from './memory-gipZUiXP.js';
|
|
10
|
+
import { O as OtelHook } from './hook-D7XABd4f.js';
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
import { a as ContentDisclosure, b as ContentFact } from './content-M9xIKG7h.js';
|
|
13
13
|
import './primitives-CJ8-rn-f.js';
|
package/dist/testing.js
CHANGED
|
@@ -153,6 +153,59 @@ var OTLP_HEADER_VARIABLES = Object.freeze({
|
|
|
153
153
|
logs: "OTEL_EXPORTER_OTLP_LOGS_HEADERS"
|
|
154
154
|
});
|
|
155
155
|
|
|
156
|
+
// src/config/repository-key.ts
|
|
157
|
+
var MAX_REPOSITORY_REFERENCE_LENGTH = 2048;
|
|
158
|
+
var SCHEME_PATTERN = /^[a-z][a-z0-9+.-]*:\/\//i;
|
|
159
|
+
var SCP_LIKE_PATTERN = /^(?:[^@/\s]+@)?([^:/\s]+):(?!\/\/)(.+)$/;
|
|
160
|
+
var trimTrailingSlashes = (value) => {
|
|
161
|
+
let end = value.length;
|
|
162
|
+
while (end > 0 && value.charCodeAt(end - 1) === 47) end -= 1;
|
|
163
|
+
return value.slice(0, end);
|
|
164
|
+
};
|
|
165
|
+
var keyOf = (host, pathname) => {
|
|
166
|
+
const withoutSlashes = trimTrailingSlashes(pathname);
|
|
167
|
+
const cleanedPath = trimTrailingSlashes(
|
|
168
|
+
withoutSlashes.toLowerCase().endsWith(".git") ? withoutSlashes.slice(0, -4) : withoutSlashes
|
|
169
|
+
);
|
|
170
|
+
if (host.length === 0 || cleanedPath.length === 0 || cleanedPath === "/") {
|
|
171
|
+
return void 0;
|
|
172
|
+
}
|
|
173
|
+
const withSlash = cleanedPath.startsWith("/") ? cleanedPath : `/${cleanedPath}`;
|
|
174
|
+
return `${host}${withSlash}`.toLowerCase();
|
|
175
|
+
};
|
|
176
|
+
var normalizeRepositoryKey = (reference) => {
|
|
177
|
+
const trimmed = reference.trim();
|
|
178
|
+
if (trimmed.length === 0 || trimmed.length > MAX_REPOSITORY_REFERENCE_LENGTH) {
|
|
179
|
+
return void 0;
|
|
180
|
+
}
|
|
181
|
+
if (SCHEME_PATTERN.test(trimmed)) {
|
|
182
|
+
let url;
|
|
183
|
+
try {
|
|
184
|
+
url = new URL(trimmed);
|
|
185
|
+
} catch {
|
|
186
|
+
return void 0;
|
|
187
|
+
}
|
|
188
|
+
if (url.protocol === "file:") {
|
|
189
|
+
return void 0;
|
|
190
|
+
}
|
|
191
|
+
return keyOf(url.hostname, url.pathname);
|
|
192
|
+
}
|
|
193
|
+
if (trimmed.startsWith("/") || trimmed.startsWith(".") || trimmed.includes("\\")) {
|
|
194
|
+
return void 0;
|
|
195
|
+
}
|
|
196
|
+
const scp = SCP_LIKE_PATTERN.exec(trimmed);
|
|
197
|
+
if (scp !== null && !trimmed.split(":")[0]?.includes("/")) {
|
|
198
|
+
const [, host, pathPart] = scp;
|
|
199
|
+
return host === void 0 || pathPart === void 0 ? void 0 : keyOf(host, pathPart);
|
|
200
|
+
}
|
|
201
|
+
try {
|
|
202
|
+
const url = new URL(`https://${trimmed}`);
|
|
203
|
+
return keyOf(url.hostname, url.pathname);
|
|
204
|
+
} catch {
|
|
205
|
+
return void 0;
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
156
209
|
// src/config/destinations.ts
|
|
157
210
|
var DEFAULT_DESTINATION_NAME = "default";
|
|
158
211
|
var DESTINATION_NAME_PATTERN = /^[a-z0-9][a-z0-9_-]{0,62}$/;
|
|
@@ -171,6 +224,30 @@ var headerValueSchema = z3.string().min(1).max(MAX_HEADER_VALUE_LENGTH).refine(
|
|
|
171
224
|
"an env: header reference must name an environment variable, e.g. env:COLLECTOR_TOKEN"
|
|
172
225
|
);
|
|
173
226
|
var endpointSchema = z3.string().url().max(2048);
|
|
227
|
+
var MAX_DESTINATION_SCOPES = 64;
|
|
228
|
+
var MAX_SCOPE_REPOSITORIES = 256;
|
|
229
|
+
var ALL_REPOSITORIES = "*";
|
|
230
|
+
var repositoryReferenceSchema = z3.string().min(1).max(MAX_REPOSITORY_REFERENCE_LENGTH).refine(
|
|
231
|
+
(value) => normalizeRepositoryKey(value) !== void 0,
|
|
232
|
+
"not a repository URL: use https://host/owner/repo, git@host:owner/repo.git, or host/owner/repo"
|
|
233
|
+
);
|
|
234
|
+
var destinationScopeSchema = z3.strictObject({
|
|
235
|
+
/**
|
|
236
|
+
* Repository URLs (any spelling of the remote; compared by host and path,
|
|
237
|
+
* case-insensitively, without `.git`), or `"*"` for every record that names
|
|
238
|
+
* a repository. A record that names none never matches a scope.
|
|
239
|
+
*/
|
|
240
|
+
repositories: z3.union([
|
|
241
|
+
z3.literal(ALL_REPOSITORIES),
|
|
242
|
+
z3.array(repositoryReferenceSchema).min(1).max(MAX_SCOPE_REPOSITORIES).readonly()
|
|
243
|
+
]),
|
|
244
|
+
/** Signals sent for these repositories. Default: every signal the destination takes. */
|
|
245
|
+
signals: z3.array(exportSignalSchema).min(1).max(3).readonly().optional(),
|
|
246
|
+
/** Content disclosure for these repositories, never above `privacy.contentMode`. Default: unchanged. */
|
|
247
|
+
contentMode: contentModeSchema.optional(),
|
|
248
|
+
/** False leaves `session.id` off metric data points for these repositories. Default true. */
|
|
249
|
+
includeSessionId: z3.boolean().optional()
|
|
250
|
+
});
|
|
174
251
|
var exportDestinationSchema = z3.strictObject({
|
|
175
252
|
/** Unique, lowercase, filesystem-safe. `default` is reserved for the single-endpoint settings. */
|
|
176
253
|
name: z3.string().regex(DESTINATION_NAME_PATTERN, "destination names are lowercase letters, digits, _ and -"),
|
|
@@ -204,7 +281,15 @@ var exportDestinationSchema = z3.strictObject({
|
|
|
204
281
|
* opt-in for content-bearing records leaving the host. `metrics` is never on by
|
|
205
282
|
* default: a destination receives hook-derived metrics only when it lists them.
|
|
206
283
|
*/
|
|
207
|
-
signals: z3.array(exportSignalSchema).min(1).max(3).readonly().optional()
|
|
284
|
+
signals: z3.array(exportSignalSchema).min(1).max(3).readonly().optional(),
|
|
285
|
+
/**
|
|
286
|
+
* Per-repository filter. Absent: every record goes to this destination, as
|
|
287
|
+
* before scopes existed. Present: a record goes only when its repository
|
|
288
|
+
* (`vcs.repository.url.full`) matches a scope — the first matching scope
|
|
289
|
+
* decides its signals, content mode, and session id — and a record that
|
|
290
|
+
* names no repository is not sent here at all.
|
|
291
|
+
*/
|
|
292
|
+
scopes: z3.array(destinationScopeSchema).min(1).max(MAX_DESTINATION_SCOPES).readonly().optional()
|
|
208
293
|
}).refine(
|
|
209
294
|
(destination) => destination.endpoint !== void 0 || destination.tracesEndpoint !== void 0 || destination.logsEndpoint !== void 0 || destination.metricsEndpoint !== void 0,
|
|
210
295
|
"a destination needs an endpoint, or a tracesEndpoint / logsEndpoint / metricsEndpoint"
|
|
@@ -726,6 +811,23 @@ var EMPTY_EXTENSIONS = Object.freeze({});
|
|
|
726
811
|
var emptyExtensions = () => ({});
|
|
727
812
|
|
|
728
813
|
// src/privacy/service.ts
|
|
814
|
+
var DISCLOSURE_RANK = Object.freeze({
|
|
815
|
+
omitted: 0,
|
|
816
|
+
masked: 1,
|
|
817
|
+
redacted: 2,
|
|
818
|
+
raw: 3
|
|
819
|
+
});
|
|
820
|
+
var WHITESPACE = /\s/u;
|
|
821
|
+
var withoutTrailingToken = (text) => {
|
|
822
|
+
let end = text.length;
|
|
823
|
+
while (end > 0) {
|
|
824
|
+
const low = text.charCodeAt(end - 1);
|
|
825
|
+
const width = end >= 2 && low >= 56320 && low <= 57343 ? 2 : 1;
|
|
826
|
+
if (WHITESPACE.test(text.slice(end - width, end))) break;
|
|
827
|
+
end -= width;
|
|
828
|
+
}
|
|
829
|
+
return text.slice(0, end);
|
|
830
|
+
};
|
|
729
831
|
var compilePatterns = (sources, flags) => {
|
|
730
832
|
const compiled = [];
|
|
731
833
|
for (const source of sources) {
|
|
@@ -1063,7 +1165,31 @@ var createPrivacyService = (policyInput) => {
|
|
|
1063
1165
|
flattenToAttributes,
|
|
1064
1166
|
sanitizeAttributes,
|
|
1065
1167
|
sanitizeExtensions,
|
|
1066
|
-
boundString
|
|
1168
|
+
boundString,
|
|
1169
|
+
restrictContent: (fact, mode) => {
|
|
1170
|
+
const target = CONTENT_MODE_DISCLOSURE[mode];
|
|
1171
|
+
if (fact.text === void 0 || DISCLOSURE_RANK[fact.disclosure] <= DISCLOSURE_RANK[target]) {
|
|
1172
|
+
return fact;
|
|
1173
|
+
}
|
|
1174
|
+
const { text, ...rest } = fact;
|
|
1175
|
+
switch (target) {
|
|
1176
|
+
case "omitted":
|
|
1177
|
+
return { ...rest, disclosure: "omitted", truncated: false };
|
|
1178
|
+
case "masked":
|
|
1179
|
+
return { ...rest, disclosure: "masked", text: maskText(text) };
|
|
1180
|
+
case "redacted": {
|
|
1181
|
+
const redacted = redactSecretSpans(fact.truncated ? withoutTrailingToken(text) : text);
|
|
1182
|
+
return {
|
|
1183
|
+
...rest,
|
|
1184
|
+
disclosure: "redacted",
|
|
1185
|
+
text: redacted.text,
|
|
1186
|
+
secretsRedacted: fact.secretsRedacted + redacted.count
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
case "raw":
|
|
1190
|
+
return fact;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1067
1193
|
};
|
|
1068
1194
|
};
|
|
1069
1195
|
|
|
@@ -3224,7 +3350,8 @@ var parseClaudeCode = (input, context) => {
|
|
|
3224
3350
|
status: "parsed",
|
|
3225
3351
|
events: factory.events(),
|
|
3226
3352
|
...warnings.length === 0 ? {} : { warnings },
|
|
3227
|
-
...targetHints.size === 0 ? {} : { targetHints }
|
|
3353
|
+
...targetHints.size === 0 ? {} : { targetHints },
|
|
3354
|
+
...payload.cwd === void 0 || payload.cwd.length === 0 ? {} : { workspaceDirectory: payload.cwd }
|
|
3228
3355
|
};
|
|
3229
3356
|
};
|
|
3230
3357
|
|
|
@@ -3717,6 +3844,13 @@ var deriveWorkspace = (context, payload) => {
|
|
|
3717
3844
|
}
|
|
3718
3845
|
return void 0;
|
|
3719
3846
|
};
|
|
3847
|
+
var workspaceDirectoryOf = (payload) => {
|
|
3848
|
+
const roots = (payload.workspace_roots ?? []).filter((root) => root.length > 0);
|
|
3849
|
+
if (roots.length > 0) {
|
|
3850
|
+
return roots.length === 1 ? roots[0] : void 0;
|
|
3851
|
+
}
|
|
3852
|
+
return payload.cwd !== void 0 && payload.cwd.length > 0 ? payload.cwd : void 0;
|
|
3853
|
+
};
|
|
3720
3854
|
var invocationDiscriminator = (payload) => {
|
|
3721
3855
|
switch (payload.hook_event_name) {
|
|
3722
3856
|
case "sessionStart":
|
|
@@ -4176,11 +4310,13 @@ var createCursorAdapter = (options = {}) => {
|
|
|
4176
4310
|
}
|
|
4177
4311
|
}
|
|
4178
4312
|
const targetHints = factory.targetHints();
|
|
4313
|
+
const workspaceDirectory = workspaceDirectoryOf(payload);
|
|
4179
4314
|
return {
|
|
4180
4315
|
status: "parsed",
|
|
4181
4316
|
events: factory.events(),
|
|
4182
4317
|
...warnings.length === 0 ? {} : { warnings },
|
|
4183
|
-
...targetHints.size === 0 ? {} : { targetHints }
|
|
4318
|
+
...targetHints.size === 0 ? {} : { targetHints },
|
|
4319
|
+
...workspaceDirectory === void 0 ? {} : { workspaceDirectory }
|
|
4184
4320
|
};
|
|
4185
4321
|
};
|
|
4186
4322
|
const hookResponse2 = (input) => {
|
|
@@ -4855,7 +4991,8 @@ var parse = (input, context) => {
|
|
|
4855
4991
|
status: "parsed",
|
|
4856
4992
|
events: factory.events(),
|
|
4857
4993
|
...warnings.length === 0 ? {} : { warnings },
|
|
4858
|
-
...targetHints.size === 0 ? {} : { targetHints }
|
|
4994
|
+
...targetHints.size === 0 ? {} : { targetHints },
|
|
4995
|
+
...payload.cwd === void 0 || payload.cwd.length === 0 ? {} : { workspaceDirectory: payload.cwd }
|
|
4859
4996
|
};
|
|
4860
4997
|
};
|
|
4861
4998
|
var hookResponse = () => SILENT_HOOK_RESPONSE;
|
|
@@ -5500,7 +5637,8 @@ var createGeminiCliAdapter = (options = {}) => {
|
|
|
5500
5637
|
return {
|
|
5501
5638
|
status: "parsed",
|
|
5502
5639
|
events: factory.events(),
|
|
5503
|
-
...warnings.length === 0 ? {} : { warnings }
|
|
5640
|
+
...warnings.length === 0 ? {} : { warnings },
|
|
5641
|
+
...payload.cwd === void 0 || payload.cwd.length === 0 ? {} : { workspaceDirectory: payload.cwd }
|
|
5504
5642
|
};
|
|
5505
5643
|
};
|
|
5506
5644
|
const hookResponse2 = () => SILENT_HOOK_RESPONSE;
|
|
@@ -5769,7 +5907,12 @@ var createAntigravityAdapter = (options = {}) => {
|
|
|
5769
5907
|
reason: payload.fullyIdle ? "Stop signals execution/turn completion (fullyIdle=true) but exposes no session or generation identity, so it cannot become session.end or generation.end without inventing one" : "Stop received while the agent is not fully idle; the conversation continues and the hook exposes no lifecycle fact the canonical model can represent"
|
|
5770
5908
|
};
|
|
5771
5909
|
}
|
|
5772
|
-
|
|
5910
|
+
const [onlyWorkspacePath, ...otherWorkspacePaths] = payload.workspacePaths;
|
|
5911
|
+
return {
|
|
5912
|
+
status: "parsed",
|
|
5913
|
+
events: factory.events(),
|
|
5914
|
+
...onlyWorkspacePath === void 0 || onlyWorkspacePath.length === 0 || otherWorkspacePaths.length > 0 ? {} : { workspaceDirectory: onlyWorkspacePath }
|
|
5915
|
+
};
|
|
5773
5916
|
};
|
|
5774
5917
|
const hookResponse2 = () => SILENT_HOOK_RESPONSE;
|
|
5775
5918
|
return {
|
|
@@ -6217,6 +6360,28 @@ var classifyDurability = (input) => {
|
|
|
6217
6360
|
return input.accepted === 0 ? "lost" : "partial";
|
|
6218
6361
|
};
|
|
6219
6362
|
var MAX_ERROR_EVENTS = 8;
|
|
6363
|
+
var resolveWorkspaceRepositoryKey = async (locator, directory, budgetMillis) => {
|
|
6364
|
+
if (locator?.originRepositoryKey === void 0) {
|
|
6365
|
+
return void 0;
|
|
6366
|
+
}
|
|
6367
|
+
let timer;
|
|
6368
|
+
const deadline = new Promise((resolve2) => {
|
|
6369
|
+
timer = setTimeout(() => resolve2(void 0), Math.max(0, budgetMillis));
|
|
6370
|
+
timer.unref?.();
|
|
6371
|
+
});
|
|
6372
|
+
try {
|
|
6373
|
+
return await Promise.race([
|
|
6374
|
+
locator.originRepositoryKey(directory).catch(() => void 0),
|
|
6375
|
+
deadline
|
|
6376
|
+
]);
|
|
6377
|
+
} catch {
|
|
6378
|
+
return void 0;
|
|
6379
|
+
} finally {
|
|
6380
|
+
if (timer !== void 0) {
|
|
6381
|
+
clearTimeout(timer);
|
|
6382
|
+
}
|
|
6383
|
+
}
|
|
6384
|
+
};
|
|
6220
6385
|
var collectContentFacts = (event3) => {
|
|
6221
6386
|
const facts = [];
|
|
6222
6387
|
const push = (fact) => {
|
|
@@ -6860,7 +7025,8 @@ var createOtelHook = (deps) => {
|
|
|
6860
7025
|
kind: "ready",
|
|
6861
7026
|
batch: batch2,
|
|
6862
7027
|
dropped: screened.dropped,
|
|
6863
|
-
...parsed.targetHints === void 0 ? {} : { targetHints: parsed.targetHints }
|
|
7028
|
+
...parsed.targetHints === void 0 ? {} : { targetHints: parsed.targetHints },
|
|
7029
|
+
...parsed.workspaceDirectory === void 0 ? {} : { workspaceDirectory: parsed.workspaceDirectory }
|
|
6864
7030
|
};
|
|
6865
7031
|
};
|
|
6866
7032
|
let prepared;
|
|
@@ -6928,11 +7094,19 @@ var createOtelHook = (deps) => {
|
|
|
6928
7094
|
batch,
|
|
6929
7095
|
!suppress && batch.length > 0 && deps.sessionContext !== void 0 ? await readSessionContext(deps.sessionContext, detection.providerId, identity.sessionId) : void 0
|
|
6930
7096
|
);
|
|
7097
|
+
const workspaceRepositoryKey = !suppress && batch.length > 0 && deps.routeByWorkspaceRepository === true && prepared.workspaceDirectory !== void 0 ? await resolveWorkspaceRepositoryKey(
|
|
7098
|
+
deps.worktreeLocator,
|
|
7099
|
+
prepared.workspaceDirectory,
|
|
7100
|
+
deps.targetResolutionBudgetMillis ?? DEFAULT_TARGET_RESOLUTION_BUDGET_MILLIS
|
|
7101
|
+
) : void 0;
|
|
6931
7102
|
let emitted = 0;
|
|
6932
7103
|
let exportRejected = 0;
|
|
6933
7104
|
if (!suppress && batch.length > 0) {
|
|
6934
7105
|
try {
|
|
6935
|
-
const result = await deps.sink.emit(
|
|
7106
|
+
const result = await deps.sink.emit(
|
|
7107
|
+
batch,
|
|
7108
|
+
workspaceRepositoryKey === void 0 ? void 0 : { workspaceRepositoryKey }
|
|
7109
|
+
);
|
|
6936
7110
|
emitted = result.accepted;
|
|
6937
7111
|
exportRejected = result.rejected;
|
|
6938
7112
|
diagnostics.push(...result.errors);
|
|
@@ -6991,7 +7165,8 @@ var createOtelHook = (deps) => {
|
|
|
6991
7165
|
durability,
|
|
6992
7166
|
dropped,
|
|
6993
7167
|
hookResponse: hookResponseFor(adapter, detection, "attributed", void 0, emitted, diagnostics),
|
|
6994
|
-
diagnostics
|
|
7168
|
+
diagnostics,
|
|
7169
|
+
...workspaceRepositoryKey === void 0 ? {} : { workspaceRepositoryKey }
|
|
6995
7170
|
};
|
|
6996
7171
|
} catch (thrown) {
|
|
6997
7172
|
const info = errorInfoFromThrown(thrown, { code: "internal-error", phase: "parsing" });
|