@osfactory/otel-hook 0.4.1 → 0.5.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.
Files changed (43) hide show
  1. package/dist/{adapter-BgqtlADe.d.ts → adapter-BS7xHKGQ.d.ts} +2 -3
  2. package/dist/cli.js +54 -12
  3. package/dist/cli.js.map +1 -1
  4. package/dist/{events-C3h3GvHj.d.ts → events-CzZ5kukS.d.ts} +119 -1
  5. package/dist/{filesystem-store-BAq3VGVv.d.ts → filesystem-store-BcOveJYY.d.ts} +1 -1
  6. package/dist/{hook-CQiNa88Q.d.ts → hook-DxTakjAD.d.ts} +4 -4
  7. package/dist/index.d.ts +12 -13
  8. package/dist/index.js +56 -12
  9. package/dist/index.js.map +1 -1
  10. package/dist/install.d.ts +4 -5
  11. package/dist/install.js +5 -1
  12. package/dist/install.js.map +1 -1
  13. package/dist/integration.d.ts +8 -9
  14. package/dist/integration.js +54 -12
  15. package/dist/integration.js.map +1 -1
  16. package/dist/lifecycle.d.ts +3 -3
  17. package/dist/lifecycle.js +6 -2
  18. package/dist/lifecycle.js.map +1 -1
  19. package/dist/{memory-kflYgZbg.d.ts → memory-DkTohdIa.d.ts} +2 -2
  20. package/dist/model.d.ts +1 -2
  21. package/dist/model.js +7 -2
  22. package/dist/model.js.map +1 -1
  23. package/dist/{otlp-log-sink-BZIgYPKN.d.ts → otlp-log-sink-DaZDPKnR.d.ts} +3 -3
  24. package/dist/{payload-DpyU8F-z.d.ts → payload-2lnpKodw.d.ts} +1 -1
  25. package/dist/{ports-B_iwJQPQ.d.ts → ports-B0rC49b3.d.ts} +9 -1
  26. package/dist/providers.d.ts +7 -8
  27. package/dist/providers.js +5 -1
  28. package/dist/providers.js.map +1 -1
  29. package/dist/{registry-BSBS8t7S.d.ts → registry-DVnPA_b6.d.ts} +1 -1
  30. package/dist/runtime.d.ts +31 -15
  31. package/dist/runtime.js +46 -9
  32. package/dist/runtime.js.map +1 -1
  33. package/dist/{semconv-BeUPQ7_q.d.ts → semconv-CtnDdsPk.d.ts} +1 -1
  34. package/dist/state.d.ts +4 -4
  35. package/dist/state.js.map +1 -1
  36. package/dist/telemetry.d.ts +6 -6
  37. package/dist/telemetry.js +9 -3
  38. package/dist/telemetry.js.map +1 -1
  39. package/dist/testing.d.ts +7 -8
  40. package/dist/testing.js +9 -2
  41. package/dist/testing.js.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/target-8RfaVxp8.d.ts +0 -83
package/dist/testing.d.ts CHANGED
@@ -1,20 +1,19 @@
1
1
  import { O as OtelHookConfig, g as OtelHookConfigPatch } from './schema-Cn0-xz8L.js';
2
- import { b as CanonicalEvent } from './events-C3h3GvHj.js';
2
+ import { b as CanonicalEvent } from './events-CzZ5kukS.js';
3
3
  import { I as IdentityClaim, d as InvocationIdentity, S as SourceProvenance } from './identity-BrVBs901.js';
4
4
  import { P as PrivacyService } from './service-CbI9CObT.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-BgqtlADe.js';
6
- import { P as ProviderRegistry } from './registry-BSBS8t7S.js';
7
- import { c as RecordingTelemetrySink, I as InMemoryStateStore, F as FixedClock, R as RecordingLogger } from './memory-kflYgZbg.js';
8
- export { e as createDeterministicIdGenerator, f as createFixedClock, g as createInMemoryStateStore, j as createRecordingLogger, k as createRecordingTelemetrySink } from './memory-kflYgZbg.js';
9
- import { O as OtelHook } from './hook-CQiNa88Q.js';
10
- import { I as IdGenerator, W as WorktreeLocator } from './ports-B_iwJQPQ.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-BS7xHKGQ.js';
6
+ import { P as ProviderRegistry } from './registry-DVnPA_b6.js';
7
+ import { c as RecordingTelemetrySink, I as InMemoryStateStore, F as FixedClock, R as RecordingLogger } from './memory-DkTohdIa.js';
8
+ export { e as createDeterministicIdGenerator, f as createFixedClock, g as createInMemoryStateStore, j as createRecordingLogger, k as createRecordingTelemetrySink } from './memory-DkTohdIa.js';
9
+ import { O as OtelHook } from './hook-DxTakjAD.js';
10
+ import { I as IdGenerator, W as WorktreeLocator } from './ports-B0rC49b3.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';
14
14
  import './policy-CimmCfRp.js';
15
15
  import './errors.js';
16
16
  import './taxonomy-DwhTtuWd.js';
17
- import './target-8RfaVxp8.js';
18
17
 
19
18
  /**
20
19
  * Synthetic hook payload used by the reference adapter.
package/dist/testing.js CHANGED
@@ -1130,11 +1130,15 @@ var targetHintSchema = z9.strictObject({
1130
1130
  /** Absolute directory that relative `paths` resolve against. */
1131
1131
  baseDirectory: localPathSchema.optional()
1132
1132
  }).readonly();
1133
+ var worktreeKindSchema = z9.enum(["main", "linked"]);
1133
1134
  var workspaceTargetSchema = z9.strictObject({
1134
1135
  workspaceId: workspaceIdSchema,
1135
1136
  /** Branch checked out in that worktree; absent on a detached HEAD. */
1136
1137
  vcsBranchName: nonEmptyStringSchema.optional(),
1137
- source: targetSourceSchema
1138
+ source: targetSourceSchema,
1139
+ /** `git-root` handle of the repository's main worktree; absent when there is none to name. */
1140
+ repositoryId: workspaceIdSchema.optional(),
1141
+ worktreeKind: worktreeKindSchema.optional()
1138
1142
  }).readonly();
1139
1143
  var SUBAGENT_ID_PATTERN = /^[A-Za-z0-9_.:@+=-]{1,256}$/;
1140
1144
  var subagentIdSchema = z9.string().regex(SUBAGENT_ID_PATTERN);
@@ -5703,10 +5707,13 @@ var resolveHint = async (hint, locator, privacy) => {
5703
5707
  if (identity.keySource !== "git-root") {
5704
5708
  return void 0;
5705
5709
  }
5710
+ const repository = first.mainRoot === void 0 ? void 0 : deriveWorkspaceIdentity(privacy, { kind: "git-root", absolutePath: first.mainRoot });
5706
5711
  const parsed = workspaceTargetSchema.safeParse({
5707
5712
  workspaceId: identity.workspaceId,
5708
5713
  ...identity.vcsBranchName === void 0 ? {} : { vcsBranchName: identity.vcsBranchName },
5709
- source: hint.source
5714
+ source: hint.source,
5715
+ ...repository?.keySource === "git-root" ? { repositoryId: repository.workspaceId } : {},
5716
+ ...first.kind === void 0 ? {} : { worktreeKind: first.kind }
5710
5717
  });
5711
5718
  return parsed.success ? parsed.data : void 0;
5712
5719
  };