@osfactory/otel-hook 0.3.0 → 0.4.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/dist/{adapter-DXpNtnaf.d.ts → adapter-BgqtlADe.d.ts} +10 -3
- package/dist/cli.js +1001 -487
- package/dist/cli.js.map +1 -1
- package/dist/{events-VxBnDFaO.d.ts → events-C3h3GvHj.d.ts} +58 -0
- package/dist/{filesystem-store-J8jjDMTh.d.ts → filesystem-store-BAq3VGVv.d.ts} +1 -1
- package/dist/{hook-_mlO3akA.d.ts → hook-CQiNa88Q.d.ts} +12 -4
- package/dist/index.d.ts +13 -12
- package/dist/index.js +1127 -599
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +5 -4
- package/dist/install.js +99 -68
- package/dist/install.js.map +1 -1
- package/dist/integration.d.ts +15 -8
- package/dist/integration.js +505 -121
- package/dist/integration.js.map +1 -1
- package/dist/lifecycle.d.ts +3 -3
- package/dist/lifecycle.js +23 -2
- package/dist/lifecycle.js.map +1 -1
- package/dist/{memory-DXVBc8V9.d.ts → memory-kflYgZbg.d.ts} +2 -2
- package/dist/model.d.ts +2 -1
- package/dist/model.js +79 -41
- package/dist/model.js.map +1 -1
- package/dist/{otlp-log-sink-DTSa0KRF.d.ts → otlp-log-sink-BZIgYPKN.d.ts} +3 -3
- package/dist/{payload-BWV5-4n3.d.ts → payload-DpyU8F-z.d.ts} +1 -1
- package/dist/{ports-Q8x0ODhs.d.ts → ports-B_iwJQPQ.d.ts} +20 -2
- package/dist/providers.d.ts +27 -9
- package/dist/providers.js +664 -452
- package/dist/providers.js.map +1 -1
- package/dist/{registry-Dqr3VNmT.d.ts → registry-BSBS8t7S.d.ts} +1 -1
- package/dist/runtime.d.ts +87 -11
- package/dist/runtime.js +379 -67
- package/dist/runtime.js.map +1 -1
- package/dist/{semconv-CIU-2kGO.d.ts → semconv-BeUPQ7_q.d.ts} +1 -1
- package/dist/state.d.ts +4 -4
- package/dist/state.js.map +1 -1
- package/dist/target-8RfaVxp8.d.ts +83 -0
- package/dist/telemetry.d.ts +6 -6
- package/dist/telemetry.js +86 -10
- package/dist/telemetry.js.map +1 -1
- package/dist/testing.d.ts +14 -7
- package/dist/testing.js +814 -492
- package/dist/testing.js.map +1 -1
- package/package.json +4 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Clock, I as IdGenerator,
|
|
2
|
-
import { b as CanonicalEvent } from './events-
|
|
1
|
+
import { C as Clock, I as IdGenerator, e as StateStore, S as StateRecord, c as LogLevel, d as Logger, g as TelemetrySink } from './ports-B_iwJQPQ.js';
|
|
2
|
+
import { b as CanonicalEvent } from './events-C3h3GvHj.js';
|
|
3
3
|
import { b as Attributes } from './primitives-CJ8-rn-f.js';
|
|
4
4
|
|
|
5
5
|
/** Clock backed by the host process. */
|
package/dist/model.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
import { a as AttributeValue } from './primitives-CJ8-rn-f.js';
|
|
3
3
|
export { A as AttributePrimitive, b as Attributes, D as DETECTION_CONFIDENCE_RANK, c as DetectionConfidence, E as EpochMillis, d as EventId, I as InvocationId, M as MAX_ATTRIBUTE_ARRAY_LENGTH, e as MAX_ATTRIBUTE_STRING_LENGTH, f as MAX_IDENTIFIER_LENGTH, P as PROVIDER_ID_PATTERN, g as ProviderId, R as ResolvedProviderId, S as SessionId, h as SourceTransport, U as UNKNOWN_PROVIDER_ID, i as UnknownProviderId, W as WORKSPACE_ID_PATTERN, j as WorkspaceId, k as attributePrimitiveSchema, l as attributeValueSchema, m as attributesSchema, n as compareDetectionConfidence, o as detectionConfidenceSchema, p as durationMillisSchema, q as epochMillisSchema, r as eventIdSchema, s as invocationIdSchema, t as isUnknownProvider, u as nonEmptyStringSchema, v as providerIdSchema, w as resolvedProviderIdSchema, x as sequenceNumberSchema, y as sessionIdSchema, z as sourceTransportSchema, B as tokenCountSchema, C as workspaceIdSchema } from './primitives-CJ8-rn-f.js';
|
|
4
4
|
export { C as CONTENT_HASH_PATTERN, a as ContentDisclosure, b as ContentFact, c as ContentKind, d as ContentRole, e as contentDisclosureSchema, f as contentFactSchema, g as contentFactsSchema, h as contentKindSchema, i as contentRoleSchema, j as isContentFactConsistent, k as isUnavailableContentFact } from './content-M9xIKG7h.js';
|
|
5
|
-
export { C as CANONICAL_EVENT_TYPES, a as CacheCreationAccounting, b as CanonicalEvent, c as CanonicalEventInput, d as CanonicalEventOfType, e as CanonicalEventType, f as CanonicalUsage, g as CompactionPerformedEvent, h as CostFacts, E as EMPTY_DELTA_USAGE, i as ErrorRaisedEvent, j as EventOutcome, k as EventValidationResult, G as GenerationEndEvent, l as GenerationStartEvent, M as ModelDescriptor, P as PromptSubmittedEvent, m as ProviderTotalAgreement, S as SessionEndEvent, n as SessionStartEvent, o as SubagentEndEvent, p as SubagentStartEvent, T as ToolEndEvent, q as ToolKind, r as ToolStartEvent, U as UsageDeltaResult, s as UsageNormalizationError, t as UsageNormalizationIssue, u as UsageNormalizationResult, v as UsageReport, w as UsageTemporality, x as addUsage, y as cacheCreationAccountingSchema, z as canonicalEventSchema, A as canonicalEventTypeSchema, B as canonicalUsageSchema, D as compactionPerformedEventSchema, F as compareEvents, H as costFactsSchema, I as cumulativeToDelta, J as errorRaisedEventSchema, K as eventUsage, L as generationEndEventSchema, N as generationStartEventSchema, O as modelDescriptorSchema, Q as normalizeUsage, R as normalizeUsageOrThrow, V as parseCanonicalEvent, W as promptSubmittedEventSchema, X as providerTotalAgreementSchema, Y as sessionEndEventSchema, Z as sessionStartEventSchema, _ as subagentEndEventSchema, $ as subagentStartEventSchema, a0 as toReport, a1 as toolEndEventSchema, a2 as toolKindSchema, a3 as toolStartEventSchema, a4 as usageReportSchema, a5 as usageTemporalitySchema, a6 as validateCanonicalEvent } from './events-
|
|
5
|
+
export { C as CANONICAL_EVENT_TYPES, a as CacheCreationAccounting, b as CanonicalEvent, c as CanonicalEventInput, d as CanonicalEventOfType, e as CanonicalEventType, f as CanonicalUsage, g as CompactionPerformedEvent, h as CostFacts, E as EMPTY_DELTA_USAGE, i as ErrorRaisedEvent, j as EventOutcome, k as EventValidationResult, G as GenerationEndEvent, l as GenerationStartEvent, M as ModelDescriptor, P as PromptSubmittedEvent, m as ProviderTotalAgreement, S as SessionEndEvent, n as SessionStartEvent, o as SubagentEndEvent, p as SubagentStartEvent, T as ToolEndEvent, q as ToolKind, r as ToolStartEvent, U as UsageDeltaResult, s as UsageNormalizationError, t as UsageNormalizationIssue, u as UsageNormalizationResult, v as UsageReport, w as UsageTemporality, x as addUsage, y as cacheCreationAccountingSchema, z as canonicalEventSchema, A as canonicalEventTypeSchema, B as canonicalUsageSchema, D as compactionPerformedEventSchema, F as compareEvents, H as costFactsSchema, I as cumulativeToDelta, J as errorRaisedEventSchema, K as eventUsage, L as generationEndEventSchema, N as generationStartEventSchema, O as modelDescriptorSchema, Q as normalizeUsage, R as normalizeUsageOrThrow, V as parseCanonicalEvent, W as promptSubmittedEventSchema, X as providerTotalAgreementSchema, Y as sessionEndEventSchema, Z as sessionStartEventSchema, _ as subagentEndEventSchema, $ as subagentStartEventSchema, a0 as toReport, a1 as toolEndEventSchema, a2 as toolKindSchema, a3 as toolStartEventSchema, a4 as usageReportSchema, a5 as usageTemporalitySchema, a6 as validateCanonicalEvent } from './events-C3h3GvHj.js';
|
|
6
6
|
export { C as ConsumerAttributes, I as IdentityClaim, a as IdentityClaimFields, b as IdentityConflict, c as IdentityResolution, d as InvocationIdentity, R as ResolveIdentityInput, S as SourceProvenance, U as UNKNOWN_WORKSPACE_ID, W as WorkspaceIdentity, e as WorkspaceKeySource, f as consumerAttributesSchema, i as identityClaimFieldsSchema, g as identityClaimSchema, h as invocationIdentitySchema, r as resolveInvocationIdentity, s as sourceProvenanceSchema, u as unknownWorkspaceIdentity, w as workspaceIdentitySchema, j as workspaceKeySourceSchema } from './identity-BrVBs901.js';
|
|
7
|
+
export { M as MAX_TARGET_HINT_PATHS, a as MAX_TARGET_PATH_LENGTH, S as SUBAGENT_ID_PATTERN, b as SubagentId, T as TargetHint, c as TargetSource, W as WorkspaceTarget, s as subagentIdSchema, t as targetHintSchema, d as targetSourceSchema, w as workspaceTargetSchema } from './target-8RfaVxp8.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Version of the canonical event model.
|
package/dist/model.js
CHANGED
|
@@ -564,12 +564,33 @@ var resolveInvocationIdentity = (input) => {
|
|
|
564
564
|
return { status: "resolved", identity: parsed.data };
|
|
565
565
|
};
|
|
566
566
|
|
|
567
|
+
// src/model/target.ts
|
|
568
|
+
import { z as z7 } from "zod";
|
|
569
|
+
var targetSourceSchema = z7.enum(["tool-path", "shell-cwd", "session-cwd"]);
|
|
570
|
+
var MAX_TARGET_HINT_PATHS = 8;
|
|
571
|
+
var MAX_TARGET_PATH_LENGTH = 4096;
|
|
572
|
+
var localPathSchema = z7.string().min(1).max(MAX_TARGET_PATH_LENGTH).refine((value) => !value.includes("\0"), "path must not contain NUL");
|
|
573
|
+
var targetHintSchema = z7.strictObject({
|
|
574
|
+
source: targetSourceSchema,
|
|
575
|
+
paths: z7.array(localPathSchema).min(1).max(MAX_TARGET_HINT_PATHS).readonly(),
|
|
576
|
+
/** Absolute directory that relative `paths` resolve against. */
|
|
577
|
+
baseDirectory: localPathSchema.optional()
|
|
578
|
+
}).readonly();
|
|
579
|
+
var workspaceTargetSchema = z7.strictObject({
|
|
580
|
+
workspaceId: workspaceIdSchema,
|
|
581
|
+
/** Branch checked out in that worktree; absent on a detached HEAD. */
|
|
582
|
+
vcsBranchName: nonEmptyStringSchema.optional(),
|
|
583
|
+
source: targetSourceSchema
|
|
584
|
+
}).readonly();
|
|
585
|
+
var SUBAGENT_ID_PATTERN = /^[A-Za-z0-9_.:@+=-]{1,256}$/;
|
|
586
|
+
var subagentIdSchema = z7.string().regex(SUBAGENT_ID_PATTERN);
|
|
587
|
+
|
|
567
588
|
// src/model/events.ts
|
|
568
|
-
import { z as
|
|
589
|
+
import { z as z9 } from "zod";
|
|
569
590
|
|
|
570
591
|
// src/errors/taxonomy.ts
|
|
571
|
-
import { z as
|
|
572
|
-
var otelHookErrorCodeSchema =
|
|
592
|
+
import { z as z8 } from "zod";
|
|
593
|
+
var otelHookErrorCodeSchema = z8.enum([
|
|
573
594
|
/** Input was not usable at all (empty stdin, unparsable JSON). */
|
|
574
595
|
"invalid-input",
|
|
575
596
|
/** Input parsed but failed canonical schema validation. */
|
|
@@ -605,8 +626,8 @@ var otelHookErrorCodeSchema = z7.enum([
|
|
|
605
626
|
/** Anything unanticipated. Always reported, never fatal to the host. */
|
|
606
627
|
"internal-error"
|
|
607
628
|
]);
|
|
608
|
-
var errorSeveritySchema =
|
|
609
|
-
var errorPhaseSchema =
|
|
629
|
+
var errorSeveritySchema = z8.enum(["warning", "error"]);
|
|
630
|
+
var errorPhaseSchema = z8.enum([
|
|
610
631
|
"configuration",
|
|
611
632
|
"detection",
|
|
612
633
|
"identity",
|
|
@@ -617,7 +638,7 @@ var errorPhaseSchema = z7.enum([
|
|
|
617
638
|
"export",
|
|
618
639
|
"shutdown"
|
|
619
640
|
]);
|
|
620
|
-
var failurePostureSchema =
|
|
641
|
+
var failurePostureSchema = z8.enum(["fail-open", "fail-closed-attribution"]);
|
|
621
642
|
var ERROR_TAXONOMY = Object.freeze({
|
|
622
643
|
"invalid-input": {
|
|
623
644
|
code: "invalid-input",
|
|
@@ -741,7 +762,7 @@ var ERROR_TAXONOMY = Object.freeze({
|
|
|
741
762
|
summary: "An unexpected failure was contained."
|
|
742
763
|
}
|
|
743
764
|
});
|
|
744
|
-
var attributionOutcomeSchema =
|
|
765
|
+
var attributionOutcomeSchema = z8.enum([
|
|
745
766
|
/** Identity resolved; events carry provider and session identity. */
|
|
746
767
|
"attributed",
|
|
747
768
|
/** Identity could not be established safely; nothing was attributed. */
|
|
@@ -751,7 +772,7 @@ var attributionOutcomeSchema = z7.enum([
|
|
|
751
772
|
/** Input was recognized but intentionally carried no telemetry. */
|
|
752
773
|
"not-applicable"
|
|
753
774
|
]);
|
|
754
|
-
var attributionReasonSchema =
|
|
775
|
+
var attributionReasonSchema = z8.enum([
|
|
755
776
|
"provider-unknown",
|
|
756
777
|
"provider-detection-ambiguous",
|
|
757
778
|
"identity-conflict",
|
|
@@ -763,19 +784,19 @@ var attributionReasonSchema = z7.enum([
|
|
|
763
784
|
]);
|
|
764
785
|
|
|
765
786
|
// src/model/events.ts
|
|
766
|
-
var modelDescriptorSchema =
|
|
787
|
+
var modelDescriptorSchema = z9.strictObject({
|
|
767
788
|
modelId: nonEmptyStringSchema,
|
|
768
789
|
/** Vendor of the model, e.g. `anthropic`. Distinct from the agent provider. */
|
|
769
790
|
vendor: nonEmptyStringSchema.optional(),
|
|
770
791
|
family: nonEmptyStringSchema.optional()
|
|
771
792
|
});
|
|
772
|
-
var costFactsSchema =
|
|
793
|
+
var costFactsSchema = z9.strictObject({
|
|
773
794
|
/** ISO 4217 code. */
|
|
774
|
-
currency:
|
|
775
|
-
amount:
|
|
776
|
-
source:
|
|
795
|
+
currency: z9.string().length(3),
|
|
796
|
+
amount: z9.number().min(0).finite(),
|
|
797
|
+
source: z9.enum(["provider-reported", "computed"])
|
|
777
798
|
});
|
|
778
|
-
var canonicalEventTypeSchema =
|
|
799
|
+
var canonicalEventTypeSchema = z9.enum([
|
|
779
800
|
"session.start",
|
|
780
801
|
"session.end",
|
|
781
802
|
"prompt.submitted",
|
|
@@ -789,7 +810,7 @@ var canonicalEventTypeSchema = z8.enum([
|
|
|
789
810
|
"error.raised"
|
|
790
811
|
]);
|
|
791
812
|
var CANONICAL_EVENT_TYPES = canonicalEventTypeSchema.options;
|
|
792
|
-
var outcomeSchema =
|
|
813
|
+
var outcomeSchema = z9.enum(["ok", "error", "cancelled", "timeout", "denied", "unknown"]);
|
|
793
814
|
var baseEventFields = {
|
|
794
815
|
schemaVersion: canonicalSchemaVersionSchema,
|
|
795
816
|
eventId: eventIdSchema,
|
|
@@ -800,39 +821,45 @@ var baseEventFields = {
|
|
|
800
821
|
occurredAt: epochMillisSchema,
|
|
801
822
|
provenance: sourceProvenanceSchema,
|
|
802
823
|
workspace: workspaceIdentitySchema,
|
|
824
|
+
/**
|
|
825
|
+
* The provider's own id for the subagent this event was emitted inside (e.g.
|
|
826
|
+
* Claude Code's `agent_id`). Absent for the top-level agent. Set by the event
|
|
827
|
+
* factory, never by hand.
|
|
828
|
+
*/
|
|
829
|
+
subagentId: subagentIdSchema.optional(),
|
|
803
830
|
extensions: extensionsSchema.default(emptyExtensions)
|
|
804
831
|
};
|
|
805
|
-
var event = (shape) =>
|
|
832
|
+
var event = (shape) => z9.strictObject({ ...baseEventFields, ...shape });
|
|
806
833
|
var sessionStartEventSchema = event({
|
|
807
|
-
type:
|
|
808
|
-
sessionKind:
|
|
834
|
+
type: z9.literal("session.start"),
|
|
835
|
+
sessionKind: z9.enum(["interactive", "non-interactive", "unknown"]),
|
|
809
836
|
agentName: nonEmptyStringSchema.optional(),
|
|
810
837
|
agentVersion: nonEmptyStringSchema.optional(),
|
|
811
838
|
model: modelDescriptorSchema.optional()
|
|
812
839
|
});
|
|
813
840
|
var sessionEndEventSchema = event({
|
|
814
|
-
type:
|
|
815
|
-
reason:
|
|
841
|
+
type: z9.literal("session.end"),
|
|
842
|
+
reason: z9.enum(["completed", "aborted", "error", "timeout", "unknown"]),
|
|
816
843
|
durationMillis: durationMillisSchema.optional(),
|
|
817
844
|
/** Session totals, typically cumulative. */
|
|
818
845
|
usage: canonicalUsageSchema.optional(),
|
|
819
846
|
cost: costFactsSchema.optional()
|
|
820
847
|
});
|
|
821
848
|
var promptSubmittedEventSchema = event({
|
|
822
|
-
type:
|
|
823
|
-
promptSource:
|
|
849
|
+
type: z9.literal("prompt.submitted"),
|
|
850
|
+
promptSource: z9.enum(["user", "automation", "resumed", "unknown"]),
|
|
824
851
|
content: contentFactSchema.optional(),
|
|
825
|
-
turnIndex:
|
|
852
|
+
turnIndex: z9.number().int().min(0).optional()
|
|
826
853
|
});
|
|
827
854
|
var generationStartEventSchema = event({
|
|
828
|
-
type:
|
|
855
|
+
type: z9.literal("generation.start"),
|
|
829
856
|
generationId: nonEmptyStringSchema,
|
|
830
857
|
model: modelDescriptorSchema,
|
|
831
858
|
requestedMaxOutputTokens: tokenCountSchema.optional(),
|
|
832
859
|
inputContent: contentFactsSchema.optional()
|
|
833
860
|
});
|
|
834
861
|
var generationEndEventSchema = event({
|
|
835
|
-
type:
|
|
862
|
+
type: z9.literal("generation.end"),
|
|
836
863
|
generationId: nonEmptyStringSchema,
|
|
837
864
|
model: modelDescriptorSchema,
|
|
838
865
|
outcome: outcomeSchema,
|
|
@@ -842,7 +869,7 @@ var generationEndEventSchema = event({
|
|
|
842
869
|
cost: costFactsSchema.optional(),
|
|
843
870
|
outputContent: contentFactsSchema.optional()
|
|
844
871
|
});
|
|
845
|
-
var toolKindSchema =
|
|
872
|
+
var toolKindSchema = z9.enum([
|
|
846
873
|
"read",
|
|
847
874
|
"write",
|
|
848
875
|
"execute",
|
|
@@ -853,59 +880,63 @@ var toolKindSchema = z8.enum([
|
|
|
853
880
|
"unknown"
|
|
854
881
|
]);
|
|
855
882
|
var toolStartEventSchema = event({
|
|
856
|
-
type:
|
|
883
|
+
type: z9.literal("tool.start"),
|
|
857
884
|
toolCallId: nonEmptyStringSchema,
|
|
858
885
|
toolName: nonEmptyStringSchema,
|
|
859
886
|
toolKind: toolKindSchema,
|
|
860
887
|
generationId: nonEmptyStringSchema.optional(),
|
|
861
|
-
input: contentFactSchema.optional()
|
|
888
|
+
input: contentFactSchema.optional(),
|
|
889
|
+
/** The git worktree this call targeted, resolved by the core (ADR 0008). */
|
|
890
|
+
target: workspaceTargetSchema.optional()
|
|
862
891
|
});
|
|
863
892
|
var toolEndEventSchema = event({
|
|
864
|
-
type:
|
|
893
|
+
type: z9.literal("tool.end"),
|
|
865
894
|
toolCallId: nonEmptyStringSchema,
|
|
866
895
|
toolName: nonEmptyStringSchema,
|
|
867
896
|
outcome: outcomeSchema,
|
|
868
897
|
durationMillis: durationMillisSchema.optional(),
|
|
869
898
|
/** Present when the host asked for or recorded a permission decision. */
|
|
870
|
-
permissionDecision:
|
|
871
|
-
output: contentFactSchema.optional()
|
|
899
|
+
permissionDecision: z9.enum(["allowed", "denied", "deferred", "not-required"]).optional(),
|
|
900
|
+
output: contentFactSchema.optional(),
|
|
901
|
+
/** The git worktree this call targeted, resolved by the core (ADR 0008). */
|
|
902
|
+
target: workspaceTargetSchema.optional()
|
|
872
903
|
});
|
|
873
904
|
var subagentStartEventSchema = event({
|
|
874
|
-
type:
|
|
905
|
+
type: z9.literal("subagent.start"),
|
|
875
906
|
subagentInvocationId: invocationIdSchema,
|
|
876
907
|
subagentType: nonEmptyStringSchema.optional(),
|
|
877
908
|
/** 0 for the top-level agent; 1 for its direct children. */
|
|
878
|
-
delegationDepth:
|
|
909
|
+
delegationDepth: z9.number().int().min(0).max(64),
|
|
879
910
|
model: modelDescriptorSchema.optional()
|
|
880
911
|
});
|
|
881
912
|
var subagentEndEventSchema = event({
|
|
882
|
-
type:
|
|
913
|
+
type: z9.literal("subagent.end"),
|
|
883
914
|
subagentInvocationId: invocationIdSchema,
|
|
884
915
|
outcome: outcomeSchema,
|
|
885
916
|
durationMillis: durationMillisSchema.optional(),
|
|
886
917
|
usage: canonicalUsageSchema.optional()
|
|
887
918
|
});
|
|
888
919
|
var compactionPerformedEventSchema = event({
|
|
889
|
-
type:
|
|
890
|
-
trigger:
|
|
920
|
+
type: z9.literal("compaction.performed"),
|
|
921
|
+
trigger: z9.enum(["automatic", "manual", "unknown"]),
|
|
891
922
|
/** Provider-reported context size before and after compaction, if known. */
|
|
892
923
|
contextTokensBefore: tokenCountSchema.optional(),
|
|
893
924
|
contextTokensAfter: tokenCountSchema.optional(),
|
|
894
|
-
droppedMessageCount:
|
|
925
|
+
droppedMessageCount: z9.number().int().min(0).optional(),
|
|
895
926
|
usage: canonicalUsageSchema.optional()
|
|
896
927
|
});
|
|
897
928
|
var errorRaisedEventSchema = event({
|
|
898
|
-
type:
|
|
929
|
+
type: z9.literal("error.raised"),
|
|
899
930
|
errorCode: otelHookErrorCodeSchema,
|
|
900
931
|
severity: errorSeveritySchema,
|
|
901
932
|
phase: errorPhaseSchema,
|
|
902
|
-
retryable:
|
|
933
|
+
retryable: z9.boolean(),
|
|
903
934
|
/** Error text is content: it is described, never embedded verbatim by default. */
|
|
904
935
|
message: contentFactSchema.optional(),
|
|
905
936
|
/** Non-sensitive, provider-agnostic short label. */
|
|
906
937
|
detail: nonEmptyStringSchema.optional()
|
|
907
938
|
});
|
|
908
|
-
var canonicalEventSchema =
|
|
939
|
+
var canonicalEventSchema = z9.discriminatedUnion("type", [
|
|
909
940
|
sessionStartEventSchema,
|
|
910
941
|
sessionEndEventSchema,
|
|
911
942
|
promptSubmittedEventSchema,
|
|
@@ -945,8 +976,11 @@ export {
|
|
|
945
976
|
MAX_ATTRIBUTE_STRING_LENGTH,
|
|
946
977
|
MAX_EXTENSION_ENTRIES,
|
|
947
978
|
MAX_IDENTIFIER_LENGTH,
|
|
979
|
+
MAX_TARGET_HINT_PATHS,
|
|
980
|
+
MAX_TARGET_PATH_LENGTH,
|
|
948
981
|
PROVIDER_ID_PATTERN,
|
|
949
982
|
RESERVED_EXTENSION_NAMESPACES,
|
|
983
|
+
SUBAGENT_ID_PATTERN,
|
|
950
984
|
UNKNOWN_PROVIDER_ID,
|
|
951
985
|
UNKNOWN_WORKSPACE_ID,
|
|
952
986
|
UsageNormalizationError,
|
|
@@ -1008,7 +1042,10 @@ export {
|
|
|
1008
1042
|
sourceProvenanceSchema,
|
|
1009
1043
|
sourceTransportSchema,
|
|
1010
1044
|
subagentEndEventSchema,
|
|
1045
|
+
subagentIdSchema,
|
|
1011
1046
|
subagentStartEventSchema,
|
|
1047
|
+
targetHintSchema,
|
|
1048
|
+
targetSourceSchema,
|
|
1012
1049
|
toReport,
|
|
1013
1050
|
tokenCountSchema,
|
|
1014
1051
|
toolEndEventSchema,
|
|
@@ -1020,6 +1057,7 @@ export {
|
|
|
1020
1057
|
validateCanonicalEvent,
|
|
1021
1058
|
workspaceIdSchema,
|
|
1022
1059
|
workspaceIdentitySchema,
|
|
1023
|
-
workspaceKeySourceSchema
|
|
1060
|
+
workspaceKeySourceSchema,
|
|
1061
|
+
workspaceTargetSchema
|
|
1024
1062
|
};
|
|
1025
1063
|
//# sourceMappingURL=model.js.map
|