service-bridge 1.8.5-dev.49 → 2.0.0-alpha
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/LICENSE +21 -0
- package/README.md +386 -1053
- package/dist/http/express/index.d.ts +31 -0
- package/dist/http/express/index.js +2765 -0
- package/dist/http/express/index.js.map +1 -0
- package/dist/http/fastify/index.d.ts +38 -0
- package/dist/http/fastify/index.js +2726 -0
- package/dist/http/fastify/index.js.map +1 -0
- package/dist/http/hono/index.d.ts +39 -0
- package/dist/http/hono/index.js +2706 -0
- package/dist/http/hono/index.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +14907 -2722
- package/dist/index.js.map +1 -0
- package/dist/service-bridge-CPmirNES.d.ts +2261 -0
- package/package.json +107 -123
- package/dist/express.d.ts +0 -51
- package/dist/express.js +0 -129
- package/dist/fastify.d.ts +0 -43
- package/dist/fastify.js +0 -122
- package/dist/trace.d.ts +0 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/telemetry/context.ts","../../../src/telemetry/ops.ts","../../../src/pb/servicebridge/v1/telemetry.ts","../../../src/telemetry/trace-context.ts","../../../src/http/_common/body-capture.ts","../../../src/telemetry/wire-trace.ts","../../../src/http/_common/trace-wrap.ts","../../../src/http/endpoint.ts","../../../src/http/hono/plugin.ts"],"sourcesContent":["// context.ts — AsyncLocalStorage-based trace context carrier.\n// Consumers import runWithTrace + currentTraceContext.\n// @internal — см. ./README.md\n\nimport { AsyncLocalStorage } from \"node:async_hooks\";\nimport type { TraceContext } from \"./trace-context\";\n\n/**\n * @internal — exported only for hook-style frameworks (Fastify) that need\n * `als.enterWith(ctx)` because they don't expose a next() callback.\n */\nexport const als = new AsyncLocalStorage<TraceContext>();\n\n/**\n * Run fn inside a trace context scope. All async continuations spawned from fn\n * inherit the context automatically via Node/Bun AsyncLocalStorage.\n */\nexport function runWithTrace<T>(ctx: TraceContext, fn: () => T): T {\n\treturn als.run(ctx, fn);\n}\n\n/**\n * Return the active trace context, or undefined if outside any runWithTrace scope.\n */\nexport function currentTraceContext(): TraceContext | undefined {\n\treturn als.getStore();\n}\n\n// streamWithContext wraps an async-generator factory so that each chunk\n// iteration runs inside the given ALS context. This is necessary because\n// Bun/Node ALS does NOT propagate through async-generator continuations\n// based solely on where the generator object was constructed — each .next()\n// inherits the context of its call-site, not the construction site.\nexport async function* streamWithContext<T>(\n\tctx: TraceContext,\n\tgen: () => AsyncIterable<T>,\n): AsyncIterable<T> {\n\tconst iter = gen()[Symbol.asyncIterator]();\n\twhile (true) {\n\t\tconst result = await als.run(ctx, () => iter.next());\n\t\tif (result.done) break;\n\t\tyield result.value;\n\t}\n}\n","// ops.ts — OpHandle for SDK-side operation lifecycle (START + END frames).\n// START frame = OpReport without finished_at_ms.\n// END frame = OpReport with finished_at_ms set.\n// @public — см. ./README.md\n\nimport { uuidv7 } from \"uuidv7\";\nimport {\n\tChannel,\n\ttype OpReport,\n\ttype PayloadAttachment,\n\tStatus,\n} from \"../pb/servicebridge/v1/telemetry\";\nimport { currentTraceContext } from \"./context\";\nimport {\n\ttype CapturedAttachment,\n\ttype CaptureMode,\n\tcapPayload,\n\tDEFAULT_PAYLOAD_MAX_BYTES,\n\tresolveCaptureMode,\n} from \"./payload-capture\";\nimport type { TelemetryRing } from \"./ring\";\nimport { ZERO_OP_ID } from \"./trace-context\";\n\nexport { Channel, Status };\n\n// Runtime queues `meta`/`attrs` JSON via `jsonOrNull(buf)` — an empty buffer\n// becomes SQL NULL, which violates the NOT NULL constraint on operations.meta\n// and operations.attrs. Default to '{}' so the START frame always carries a\n// valid JSON object.\nconst EMPTY_JSON_OBJECT = Buffer.from(\"{}\");\n\n// OpKind numeric values per-channel (mirrors Go enums.go).\nexport const RpcCall = 1;\nexport const EventPublish = 1;\nexport const EventDeliver = 2;\nexport const WorkflowRun = 1;\nexport const WorkflowSleep = 2;\nexport const WorkflowWaitEvent = 3;\nexport const WorkflowWaitSignal = 4;\nexport const JobExec = 1;\nexport const HttpHandle = 1;\nexport const UserSubOp = 1;\n\nexport interface StartOpParams {\n\t/** Required when called directly without ALS context. Otherwise inherited. */\n\ttraceId?: string;\n\t/** Auto-minted UUIDv7 when omitted. */\n\topId?: string;\n\t/** Auto-resolved from currentTraceContext().parentOpId when omitted. */\n\tparentOpId?: string;\n\tchannel: Channel;\n\tkind: number;\n\tsubject: string;\n\tpeerServiceId?: string;\n\tbusinessKey?: string;\n\tattempt?: number;\n\tstartedAtMs?: number;\n\tmetaJson?: Buffer;\n\tattrsJson?: Buffer;\n\t/**\n\t * Per-handler capture override. May only narrow the runtime-pushed effective\n\t * mode (privacy ordering none < errors < all), never widen it.\n\t */\n\tcaptureMode?: CaptureMode;\n\t/**\n\t * Runtime-pushed effective capture mode (from the registry stream). The\n\t * single authority for what may be captured. Defaults to \"none\" until the\n\t * first registry snapshot arrives (fail-safe).\n\t */\n\teffectiveCaptureMode?: CaptureMode;\n\t/**\n\t * Per-direction payload byte cap for captured payloads. Defaults to\n\t * DEFAULT_PAYLOAD_MAX_BYTES; threaded from ServiceBridgeOptions.payloadMaxBytes.\n\t */\n\tpayloadMaxBytes?: number;\n}\n\ninterface ResolvedParams {\n\ttraceId: string;\n\topId: string;\n\tparentOpId: string;\n\tchannel: Channel;\n\tkind: number;\n\tsubject: string;\n\tpeerServiceId: string;\n\tbusinessKey: string;\n\tattempt: number;\n\tmetaJson: Buffer;\n\tattrsJson: Buffer;\n\tcaptureMode: CaptureMode;\n\tpayloadMaxBytes: number;\n}\n\n// OpHandle controls the END frame for an in-flight operation.\n// @public — см. ./README.md\nexport class OpHandle {\n\tprivate readonly ring: TelemetryRing;\n\tprivate readonly params: ResolvedParams;\n\tprivate readonly startedAtMs: number;\n\tprivate ended = false;\n\t// Buffered attachments for \"errors\" mode — emitted on ERROR end, dropped on\n\t// OK. Keyed by direction (1=IN, 2=OUT) so a re-capture of the same direction\n\t// (e.g. OUT on retry) overwrites last-wins instead of buffering a duplicate.\n\tprivate readonly bufferedPayloads = new Map<number, CapturedAttachment>();\n\n\tprivate constructor(\n\t\tring: TelemetryRing,\n\t\tparams: ResolvedParams,\n\t\tstartedAtMs: number,\n\t) {\n\t\tthis.ring = ring;\n\t\tthis.params = params;\n\t\tthis.startedAtMs = startedAtMs;\n\t}\n\n\t/**\n\t * Start an operation, enqueue the START frame, return a handle for END.\n\t * traceId / parentOpId default to the active TraceContext from ALS\n\t * (set via runWithTrace). opId is auto-minted as a fresh UUIDv7.\n\t */\n\tstatic start(ring: TelemetryRing, params: StartOpParams): OpHandle {\n\t\tconst ctx = currentTraceContext();\n\t\tconst traceId = params.traceId ?? ctx?.traceId ?? uuidv7();\n\t\tconst parentOpId = params.parentOpId ?? ctx?.parentOpId ?? ZERO_OP_ID;\n\t\tconst opId = params.opId ?? uuidv7();\n\t\tconst startedAtMs = params.startedAtMs ?? Date.now();\n\n\t\tconst resolved: ResolvedParams = {\n\t\t\ttraceId,\n\t\t\topId,\n\t\t\tparentOpId,\n\t\t\tchannel: params.channel,\n\t\t\tkind: params.kind,\n\t\t\tsubject: params.subject,\n\t\t\tpeerServiceId: params.peerServiceId ?? \"\",\n\t\t\tbusinessKey: params.businessKey ?? \"\",\n\t\t\tattempt: params.attempt ?? 0,\n\t\t\tmetaJson: params.metaJson ?? EMPTY_JSON_OBJECT,\n\t\t\tattrsJson: params.attrsJson ?? EMPTY_JSON_OBJECT,\n\t\t\tcaptureMode: resolveCaptureMode(\n\t\t\t\tparams.effectiveCaptureMode ?? \"none\",\n\t\t\t\tparams.captureMode,\n\t\t\t),\n\t\t\tpayloadMaxBytes: params.payloadMaxBytes ?? DEFAULT_PAYLOAD_MAX_BYTES,\n\t\t};\n\n\t\tconst handle = new OpHandle(ring, resolved, startedAtMs);\n\t\thandle.enqueueStartFrame();\n\t\treturn handle;\n\t}\n\n\t/** Op identifier for this in-flight op (UUIDv7). */\n\tget opId(): string {\n\t\treturn this.params.opId;\n\t}\n\n\t/**\n\t * Record the retry attempt count on this in-flight op. The END frame carries\n\t * the final value so a single RPC.CALL row reflects how many tries it took\n\t * (ADR-0037..0042). No new row is minted per attempt.\n\t */\n\tsetAttempt(attempt: number): void {\n\t\tthis.params.attempt = attempt;\n\t}\n\n\t/** Trace identifier this op belongs to. */\n\tget traceId(): string {\n\t\treturn this.params.traceId;\n\t}\n\n\t/**\n\t * Capture the inbound (request/input) payload for this op. Direction = IN.\n\t * \"all\" emits immediately; \"errors\" buffers until end; \"none\" is a no-op.\n\t */\n\tcaptureIn(bytes: Uint8Array, contractHash: string): void {\n\t\tthis.capture(1, bytes, contractHash);\n\t}\n\n\t/**\n\t * Capture the outbound (response/output) payload for this op. Direction = OUT.\n\t */\n\tcaptureOut(bytes: Uint8Array, contractHash: string): void {\n\t\tthis.capture(2, bytes, contractHash);\n\t}\n\n\tprivate capture(\n\t\tdirection: number,\n\t\tbytes: Uint8Array,\n\t\tcontractHash: string,\n\t): void {\n\t\tif (this.params.captureMode === \"none\") return;\n\t\tconst { bytes: capped, originalSize } = capPayload(\n\t\t\tbytes,\n\t\t\tthis.params.payloadMaxBytes,\n\t\t);\n\t\tconst att: CapturedAttachment = {\n\t\t\tdirection,\n\t\t\tbytes: capped,\n\t\t\toriginalSize,\n\t\t\tcontractHash,\n\t\t};\n\t\tif (this.params.captureMode === \"all\") {\n\t\t\tthis.emitPayload(att);\n\t\t} else {\n\t\t\t// \"errors\": hold until end() learns the status. Last-wins per direction.\n\t\t\tthis.bufferedPayloads.set(direction, att);\n\t\t}\n\t}\n\n\tprivate emitPayload(att: CapturedAttachment): void {\n\t\tconst msg: PayloadAttachment = {\n\t\t\ttraceId: this.params.traceId,\n\t\t\topId: this.params.opId,\n\t\t\tdirection: att.direction,\n\t\t\tbytes: Buffer.from(att.bytes),\n\t\t\toriginalSize: att.originalSize,\n\t\t\tcontractHash: att.contractHash,\n\t\t};\n\t\tthis.ring.push(\"payloads\", msg);\n\t}\n\n\t/**\n\t * End the operation, enqueue the END frame.\n\t * Idempotent — calling end() twice is a no-op.\n\t */\n\tend(status: Status, statusMessage?: string): void {\n\t\tif (this.ended) return;\n\t\tthis.ended = true;\n\t\tthis.flushBufferedPayloads(status);\n\t\tthis.enqueueEndFrame(status, statusMessage ?? \"\");\n\t}\n\n\t// flushBufferedPayloads emits \"errors\"-mode buffered attachments when the op\n\t// failed, and clears the buffer either way. Statuses other than OK/RUNNING\n\t// (ERROR, TIMEOUT, ABANDONED) count as failures worth capturing.\n\tprivate flushBufferedPayloads(status: Status): void {\n\t\tconst failed = status !== Status.SUCCESS && status !== Status.PENDING;\n\t\tif (failed) {\n\t\t\tfor (const att of this.bufferedPayloads.values()) this.emitPayload(att);\n\t\t}\n\t\tthis.bufferedPayloads.clear();\n\t}\n\n\tprivate enqueueStartFrame(): void {\n\t\tconst report: OpReport = {\n\t\t\ttraceId: this.params.traceId,\n\t\t\topId: this.params.opId,\n\t\t\tparentOpId: this.params.parentOpId,\n\t\t\tchannel: this.params.channel,\n\t\t\tkind: this.params.kind,\n\t\t\tsubject: this.params.subject,\n\t\t\tpeerServiceId: this.params.peerServiceId,\n\t\t\tbusinessKey: this.params.businessKey,\n\t\t\tattempt: this.params.attempt,\n\t\t\tstartedAtMs: this.startedAtMs,\n\t\t\tfinishedAtMs: undefined,\n\t\t\tstatus: Status.PENDING,\n\t\t\tstatusMessage: \"\",\n\t\t\tmetaJson: this.params.metaJson,\n\t\t\tattrsJson: this.params.attrsJson,\n\t\t};\n\t\tthis.ring.push(\"ops\", report);\n\t}\n\n\tprivate enqueueEndFrame(status: Status, statusMessage: string): void {\n\t\t// END delta: only fields that change from START. Runtime upserts finished op.\n\t\tconst report: OpReport = {\n\t\t\ttraceId: this.params.traceId,\n\t\t\topId: this.params.opId,\n\t\t\tparentOpId: \"\",\n\t\t\tchannel: this.params.channel,\n\t\t\tkind: this.params.kind,\n\t\t\tsubject: \"\",\n\t\t\tpeerServiceId: \"\",\n\t\t\tbusinessKey: \"\",\n\t\t\tattempt: this.params.attempt,\n\t\t\tstartedAtMs: 0,\n\t\t\tfinishedAtMs: Date.now(),\n\t\t\tstatus,\n\t\t\tstatusMessage,\n\t\t\tmetaJson: Buffer.alloc(0),\n\t\t\tattrsJson: Buffer.alloc(0),\n\t\t};\n\t\tthis.ring.push(\"ops\", report);\n\t}\n}\n","// Code generated by protoc-gen-ts_proto. DO NOT EDIT.\n// versions:\n// protoc-gen-ts_proto v2.11.8\n// protoc unknown\n// source: servicebridge/v1/telemetry.proto\n\n/* eslint-disable */\nimport { BinaryReader, BinaryWriter } from \"@bufbuild/protobuf/wire\";\nimport {\n type CallOptions,\n type ChannelCredentials,\n Client,\n type ClientDuplexStream,\n type ClientOptions,\n type ClientUnaryCall,\n type handleBidiStreamingCall,\n type handleUnaryCall,\n makeGenericClientConstructor,\n type Metadata,\n type ServiceError,\n type UntypedServiceImplementation,\n} from \"@grpc/grpc-js\";\n\n/**\n * Channel classifies the transport/execution context of an operation.\n * Mirrors the SQL CHECK constraint in migration 051.\n * source of truth: migrations/051_operations.up.sql\n */\nexport enum Channel {\n CHANNEL_UNSPECIFIED = 0,\n HTTP = 1,\n RPC = 2,\n EVENT = 3,\n WORKFLOW = 4,\n JOB = 5,\n USER = 6,\n UNRECOGNIZED = -1,\n}\n\n/** Status represents the lifecycle state of an operation. */\nexport enum Status {\n STATUS_UNSPECIFIED = 0,\n PENDING = 1,\n SUCCESS = 2,\n ERROR = 3,\n TIMEOUT = 4,\n ABANDONED = 5,\n UNRECOGNIZED = -1,\n}\n\nexport enum LogLevel {\n LOG_LEVEL_UNSPECIFIED = 0,\n LOG_LEVEL_DEBUG = 1,\n LOG_LEVEL_INFO = 2,\n LOG_LEVEL_WARN = 3,\n LOG_LEVEL_ERROR = 4,\n UNRECOGNIZED = -1,\n}\n\nexport enum MetricKind {\n METRIC_KIND_UNSPECIFIED = 0,\n METRIC_KIND_COUNTER = 1,\n METRIC_KIND_GAUGE = 2,\n METRIC_KIND_HISTOGRAM = 3,\n UNRECOGNIZED = -1,\n}\n\n/**\n * TelemetryBatch is the request message for the Report bidi stream.\n * Each batch carries exactly one kind of payload.\n * @public — см. ./README.md\n */\nexport interface TelemetryBatch {\n ops?: OpBatch | undefined;\n logs?: LogBatch | undefined;\n metrics?: MetricBatch | undefined;\n payloads?: PayloadBatch | undefined;\n}\n\nexport interface OpBatch {\n items: OpReport[];\n}\n\nexport interface LogBatch {\n items: Log[];\n}\n\nexport interface MetricBatch {\n items: MetricPoint[];\n}\n\nexport interface PayloadBatch {\n items: PayloadAttachment[];\n}\n\n/**\n * OpReport is a single operation lifecycle event.\n * finished_at_ms absent = START frame; present = END frame (T-014).\n * actor identity is taken from the mTLS cert on the server side (ADR-T-026).\n * @public — см. ./README.md\n */\nexport interface OpReport {\n /** UUIDv7 canonical string */\n traceId: string;\n /** UUIDv7 canonical string */\n opId: string;\n /** empty for root */\n parentOpId: string;\n channel: Channel;\n /** per-channel kind value; see enums.go */\n kind: number;\n /** T-019 format: \"channel.kind:actor/target\" */\n subject: string;\n /** UUID canonical string, optional */\n peerServiceId: string;\n /** idempotency/correlation key per kind */\n businessKey: string;\n attempt: number;\n /** unix-ms */\n startedAtMs: number;\n /** unix-ms; absent = START, present = END */\n finishedAtMs?: number | undefined;\n status: Status;\n statusMessage: string;\n /** per-kind structured meta; cap 8KB */\n metaJson: Buffer;\n /** free-form key-value; cap 2KB */\n attrsJson: Buffer;\n}\n\n/**\n * Log is a structured log entry.\n * trace_id and op_id are optional UUID canonical strings.\n * @public — см. ./README.md\n */\nexport interface Log {\n atUnixMs: number;\n level: LogLevel;\n message: string;\n /** JSON-encoded Record<string, unknown> */\n fieldsJson: Buffer;\n /** UUID canonical, optional */\n traceId: string;\n /** UUID canonical, optional (renamed from span_id) */\n opId: string;\n instanceId: string;\n /** 'sdk' | 'console' | 'runtime' */\n source: string;\n}\n\n/**\n * MetricPoint is a single metric observation.\n * @public — см. ./README.md\n */\nexport interface MetricPoint {\n atUnixMs: number;\n name: string;\n kind: MetricKind;\n labels: { [key: string]: string };\n instanceId: string;\n value: number;\n /** UCUM: 's', 'By', '1' */\n unit: string;\n /** [{le, count}] JSON for histograms */\n bucketsJson: Buffer;\n}\n\nexport interface MetricPoint_LabelsEntry {\n key: string;\n value: string;\n}\n\n/**\n * PayloadAttachment carries a captured request/response payload.\n * @public — см. ./README.md\n */\nexport interface PayloadAttachment {\n /** UUID canonical */\n traceId: string;\n /** UUID canonical */\n opId: string;\n /** 1=IN, 2=OUT */\n direction: number;\n bytes: Buffer;\n originalSize: number;\n contractHash: string;\n}\n\n/**\n * TelemetryAck is sent periodically by the server on the Report stream.\n * It provides flow control and signals drain.\n * @public — см. ./README.md\n */\nexport interface TelemetryAck {\n receivedBytesHighWater: number;\n /** 0=normal, 1=slow, 2=pause */\n backpressureLevel: number;\n dropCountServerSide: number;\n /** non-empty → graceful close requested */\n drainReason: string;\n}\n\nexport interface ListTracesRequest {\n channelFilter: Channel[];\n statusFilter: Status[];\n fromMs: number;\n toMs: number;\n serviceId: string;\n /** searched in subject + business_key */\n textQuery: string;\n limit: number;\n cursor: string;\n}\n\nexport interface TraceSummary {\n /** UUIDv7 */\n traceId: string;\n rootSubject: string;\n rootServiceId: string;\n startedAtMs: number;\n durationMs: number;\n opCount: number;\n overallStatus: Status;\n hasRunning: boolean;\n}\n\nexport interface ListTracesResponse {\n traces: TraceSummary[];\n nextCursor: string;\n}\n\nexport interface GetTraceRequest {\n traceId: string;\n limit: number;\n cursor: string;\n}\n\nexport interface OperationView {\n opId: string;\n traceId: string;\n parentOpId: string;\n channel: Channel;\n kind: number;\n subject: string;\n actorServiceId: string;\n actorInstanceId: string;\n peerServiceId: string;\n businessKey: string;\n attempt: number;\n startedAtMs: number;\n finishedAtMs?: number | undefined;\n status: Status;\n statusMessage: string;\n metaJson: Buffer;\n attrsJson: Buffer;\n}\n\nexport interface GetTraceResponse {\n ops: OperationView[];\n nextCursor: string;\n truncated: boolean;\n}\n\nexport interface GetOperationRequest {\n opId: string;\n}\n\nexport interface GetOperationResponse {\n op?: OperationView | undefined;\n}\n\nexport interface GetPayloadRequest {\n traceId: string;\n opId: string;\n /** 1=IN, 2=OUT */\n direction: number;\n}\n\nexport interface GetPayloadResponse {\n rawBytes: Buffer;\n decodedBytes: Buffer;\n originalSize: number;\n contractHash: string;\n schemaDrift: boolean;\n}\n\nexport interface QueryLogsRequest {\n serviceId: string;\n instanceId: string;\n fromUnixMs: number;\n toUnixMs: number;\n minLevel: LogLevel;\n /** UUID canonical, optional filter */\n traceId: string;\n textQuery: string;\n limit: number;\n cursor: string;\n}\n\nexport interface QueryLogsResponse {\n entries: Log[];\n nextCursor: string;\n}\n\nexport interface QueryMetricsRequest {\n serviceId: string;\n instanceId: string;\n name: string;\n fromUnixMs: number;\n toUnixMs: number;\n labelFilters: { [key: string]: string };\n stepSeconds: number;\n percentiles: number[];\n}\n\nexport interface QueryMetricsRequest_LabelFiltersEntry {\n key: string;\n value: string;\n}\n\nexport interface MetricSeries {\n name: string;\n labels: { [key: string]: string };\n instanceId: string;\n tsUnixMs: number[];\n /** bucket average */\n values: number[];\n /** bucket peak (parallel to values), preserves spikes hidden by the average */\n maxValues: number[];\n}\n\nexport interface MetricSeries_LabelsEntry {\n key: string;\n value: string;\n}\n\nexport interface QueryMetricsResponse {\n series: MetricSeries[];\n}\n\nfunction createBaseTelemetryBatch(): TelemetryBatch {\n return { ops: undefined, logs: undefined, metrics: undefined, payloads: undefined };\n}\n\nexport const TelemetryBatch: MessageFns<TelemetryBatch> = {\n encode(message: TelemetryBatch, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.ops !== undefined) {\n OpBatch.encode(message.ops, writer.uint32(10).fork()).join();\n }\n if (message.logs !== undefined) {\n LogBatch.encode(message.logs, writer.uint32(18).fork()).join();\n }\n if (message.metrics !== undefined) {\n MetricBatch.encode(message.metrics, writer.uint32(26).fork()).join();\n }\n if (message.payloads !== undefined) {\n PayloadBatch.encode(message.payloads, writer.uint32(34).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): TelemetryBatch {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTelemetryBatch();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.ops = OpBatch.decode(reader, reader.uint32());\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.logs = LogBatch.decode(reader, reader.uint32());\n continue;\n }\n case 3: {\n if (tag !== 26) {\n break;\n }\n\n message.metrics = MetricBatch.decode(reader, reader.uint32());\n continue;\n }\n case 4: {\n if (tag !== 34) {\n break;\n }\n\n message.payloads = PayloadBatch.decode(reader, reader.uint32());\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<TelemetryBatch>, I>>(base?: I): TelemetryBatch {\n return TelemetryBatch.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<TelemetryBatch>, I>>(object: I): TelemetryBatch {\n const message = createBaseTelemetryBatch();\n message.ops = (object.ops !== undefined && object.ops !== null) ? OpBatch.fromPartial(object.ops) : undefined;\n message.logs = (object.logs !== undefined && object.logs !== null) ? LogBatch.fromPartial(object.logs) : undefined;\n message.metrics = (object.metrics !== undefined && object.metrics !== null)\n ? MetricBatch.fromPartial(object.metrics)\n : undefined;\n message.payloads = (object.payloads !== undefined && object.payloads !== null)\n ? PayloadBatch.fromPartial(object.payloads)\n : undefined;\n return message;\n },\n};\n\nfunction createBaseOpBatch(): OpBatch {\n return { items: [] };\n}\n\nexport const OpBatch: MessageFns<OpBatch> = {\n encode(message: OpBatch, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.items) {\n OpReport.encode(v!, writer.uint32(10).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): OpBatch {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseOpBatch();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.items.push(OpReport.decode(reader, reader.uint32()));\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<OpBatch>, I>>(base?: I): OpBatch {\n return OpBatch.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<OpBatch>, I>>(object: I): OpBatch {\n const message = createBaseOpBatch();\n message.items = object.items?.map((e) => OpReport.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseLogBatch(): LogBatch {\n return { items: [] };\n}\n\nexport const LogBatch: MessageFns<LogBatch> = {\n encode(message: LogBatch, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.items) {\n Log.encode(v!, writer.uint32(10).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): LogBatch {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseLogBatch();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.items.push(Log.decode(reader, reader.uint32()));\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<LogBatch>, I>>(base?: I): LogBatch {\n return LogBatch.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<LogBatch>, I>>(object: I): LogBatch {\n const message = createBaseLogBatch();\n message.items = object.items?.map((e) => Log.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseMetricBatch(): MetricBatch {\n return { items: [] };\n}\n\nexport const MetricBatch: MessageFns<MetricBatch> = {\n encode(message: MetricBatch, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.items) {\n MetricPoint.encode(v!, writer.uint32(10).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): MetricBatch {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMetricBatch();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.items.push(MetricPoint.decode(reader, reader.uint32()));\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<MetricBatch>, I>>(base?: I): MetricBatch {\n return MetricBatch.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<MetricBatch>, I>>(object: I): MetricBatch {\n const message = createBaseMetricBatch();\n message.items = object.items?.map((e) => MetricPoint.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBasePayloadBatch(): PayloadBatch {\n return { items: [] };\n}\n\nexport const PayloadBatch: MessageFns<PayloadBatch> = {\n encode(message: PayloadBatch, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.items) {\n PayloadAttachment.encode(v!, writer.uint32(10).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): PayloadBatch {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePayloadBatch();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.items.push(PayloadAttachment.decode(reader, reader.uint32()));\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<PayloadBatch>, I>>(base?: I): PayloadBatch {\n return PayloadBatch.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<PayloadBatch>, I>>(object: I): PayloadBatch {\n const message = createBasePayloadBatch();\n message.items = object.items?.map((e) => PayloadAttachment.fromPartial(e)) || [];\n return message;\n },\n};\n\nfunction createBaseOpReport(): OpReport {\n return {\n traceId: \"\",\n opId: \"\",\n parentOpId: \"\",\n channel: 0,\n kind: 0,\n subject: \"\",\n peerServiceId: \"\",\n businessKey: \"\",\n attempt: 0,\n startedAtMs: 0,\n finishedAtMs: undefined,\n status: 0,\n statusMessage: \"\",\n metaJson: Buffer.alloc(0),\n attrsJson: Buffer.alloc(0),\n };\n}\n\nexport const OpReport: MessageFns<OpReport> = {\n encode(message: OpReport, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.traceId !== \"\") {\n writer.uint32(10).string(message.traceId);\n }\n if (message.opId !== \"\") {\n writer.uint32(18).string(message.opId);\n }\n if (message.parentOpId !== \"\") {\n writer.uint32(26).string(message.parentOpId);\n }\n if (message.channel !== 0) {\n writer.uint32(32).int32(message.channel);\n }\n if (message.kind !== 0) {\n writer.uint32(40).uint32(message.kind);\n }\n if (message.subject !== \"\") {\n writer.uint32(50).string(message.subject);\n }\n if (message.peerServiceId !== \"\") {\n writer.uint32(74).string(message.peerServiceId);\n }\n if (message.businessKey !== \"\") {\n writer.uint32(82).string(message.businessKey);\n }\n if (message.attempt !== 0) {\n writer.uint32(88).int32(message.attempt);\n }\n if (message.startedAtMs !== 0) {\n writer.uint32(96).int64(message.startedAtMs);\n }\n if (message.finishedAtMs !== undefined) {\n writer.uint32(104).int64(message.finishedAtMs);\n }\n if (message.status !== 0) {\n writer.uint32(112).int32(message.status);\n }\n if (message.statusMessage !== \"\") {\n writer.uint32(122).string(message.statusMessage);\n }\n if (message.metaJson.length !== 0) {\n writer.uint32(130).bytes(message.metaJson);\n }\n if (message.attrsJson.length !== 0) {\n writer.uint32(138).bytes(message.attrsJson);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): OpReport {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseOpReport();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.traceId = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.opId = reader.string();\n continue;\n }\n case 3: {\n if (tag !== 26) {\n break;\n }\n\n message.parentOpId = reader.string();\n continue;\n }\n case 4: {\n if (tag !== 32) {\n break;\n }\n\n message.channel = reader.int32() as any;\n continue;\n }\n case 5: {\n if (tag !== 40) {\n break;\n }\n\n message.kind = reader.uint32();\n continue;\n }\n case 6: {\n if (tag !== 50) {\n break;\n }\n\n message.subject = reader.string();\n continue;\n }\n case 9: {\n if (tag !== 74) {\n break;\n }\n\n message.peerServiceId = reader.string();\n continue;\n }\n case 10: {\n if (tag !== 82) {\n break;\n }\n\n message.businessKey = reader.string();\n continue;\n }\n case 11: {\n if (tag !== 88) {\n break;\n }\n\n message.attempt = reader.int32();\n continue;\n }\n case 12: {\n if (tag !== 96) {\n break;\n }\n\n message.startedAtMs = longToNumber(reader.int64());\n continue;\n }\n case 13: {\n if (tag !== 104) {\n break;\n }\n\n message.finishedAtMs = longToNumber(reader.int64());\n continue;\n }\n case 14: {\n if (tag !== 112) {\n break;\n }\n\n message.status = reader.int32() as any;\n continue;\n }\n case 15: {\n if (tag !== 122) {\n break;\n }\n\n message.statusMessage = reader.string();\n continue;\n }\n case 16: {\n if (tag !== 130) {\n break;\n }\n\n message.metaJson = Buffer.from(reader.bytes());\n continue;\n }\n case 17: {\n if (tag !== 138) {\n break;\n }\n\n message.attrsJson = Buffer.from(reader.bytes());\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<OpReport>, I>>(base?: I): OpReport {\n return OpReport.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<OpReport>, I>>(object: I): OpReport {\n const message = createBaseOpReport();\n message.traceId = object.traceId ?? \"\";\n message.opId = object.opId ?? \"\";\n message.parentOpId = object.parentOpId ?? \"\";\n message.channel = object.channel ?? 0;\n message.kind = object.kind ?? 0;\n message.subject = object.subject ?? \"\";\n message.peerServiceId = object.peerServiceId ?? \"\";\n message.businessKey = object.businessKey ?? \"\";\n message.attempt = object.attempt ?? 0;\n message.startedAtMs = object.startedAtMs ?? 0;\n message.finishedAtMs = object.finishedAtMs ?? undefined;\n message.status = object.status ?? 0;\n message.statusMessage = object.statusMessage ?? \"\";\n message.metaJson = object.metaJson ?? Buffer.alloc(0);\n message.attrsJson = object.attrsJson ?? Buffer.alloc(0);\n return message;\n },\n};\n\nfunction createBaseLog(): Log {\n return {\n atUnixMs: 0,\n level: 0,\n message: \"\",\n fieldsJson: Buffer.alloc(0),\n traceId: \"\",\n opId: \"\",\n instanceId: \"\",\n source: \"\",\n };\n}\n\nexport const Log: MessageFns<Log> = {\n encode(message: Log, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.atUnixMs !== 0) {\n writer.uint32(8).int64(message.atUnixMs);\n }\n if (message.level !== 0) {\n writer.uint32(16).int32(message.level);\n }\n if (message.message !== \"\") {\n writer.uint32(26).string(message.message);\n }\n if (message.fieldsJson.length !== 0) {\n writer.uint32(34).bytes(message.fieldsJson);\n }\n if (message.traceId !== \"\") {\n writer.uint32(42).string(message.traceId);\n }\n if (message.opId !== \"\") {\n writer.uint32(50).string(message.opId);\n }\n if (message.instanceId !== \"\") {\n writer.uint32(58).string(message.instanceId);\n }\n if (message.source !== \"\") {\n writer.uint32(66).string(message.source);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): Log {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseLog();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 8) {\n break;\n }\n\n message.atUnixMs = longToNumber(reader.int64());\n continue;\n }\n case 2: {\n if (tag !== 16) {\n break;\n }\n\n message.level = reader.int32() as any;\n continue;\n }\n case 3: {\n if (tag !== 26) {\n break;\n }\n\n message.message = reader.string();\n continue;\n }\n case 4: {\n if (tag !== 34) {\n break;\n }\n\n message.fieldsJson = Buffer.from(reader.bytes());\n continue;\n }\n case 5: {\n if (tag !== 42) {\n break;\n }\n\n message.traceId = reader.string();\n continue;\n }\n case 6: {\n if (tag !== 50) {\n break;\n }\n\n message.opId = reader.string();\n continue;\n }\n case 7: {\n if (tag !== 58) {\n break;\n }\n\n message.instanceId = reader.string();\n continue;\n }\n case 8: {\n if (tag !== 66) {\n break;\n }\n\n message.source = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<Log>, I>>(base?: I): Log {\n return Log.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<Log>, I>>(object: I): Log {\n const message = createBaseLog();\n message.atUnixMs = object.atUnixMs ?? 0;\n message.level = object.level ?? 0;\n message.message = object.message ?? \"\";\n message.fieldsJson = object.fieldsJson ?? Buffer.alloc(0);\n message.traceId = object.traceId ?? \"\";\n message.opId = object.opId ?? \"\";\n message.instanceId = object.instanceId ?? \"\";\n message.source = object.source ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMetricPoint(): MetricPoint {\n return {\n atUnixMs: 0,\n name: \"\",\n kind: 0,\n labels: {},\n instanceId: \"\",\n value: 0,\n unit: \"\",\n bucketsJson: Buffer.alloc(0),\n };\n}\n\nexport const MetricPoint: MessageFns<MetricPoint> = {\n encode(message: MetricPoint, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.atUnixMs !== 0) {\n writer.uint32(8).int64(message.atUnixMs);\n }\n if (message.name !== \"\") {\n writer.uint32(18).string(message.name);\n }\n if (message.kind !== 0) {\n writer.uint32(24).int32(message.kind);\n }\n globalThis.Object.entries(message.labels).forEach(([key, value]: [string, string]) => {\n MetricPoint_LabelsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();\n });\n if (message.instanceId !== \"\") {\n writer.uint32(42).string(message.instanceId);\n }\n if (message.value !== 0) {\n writer.uint32(49).double(message.value);\n }\n if (message.unit !== \"\") {\n writer.uint32(58).string(message.unit);\n }\n if (message.bucketsJson.length !== 0) {\n writer.uint32(66).bytes(message.bucketsJson);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): MetricPoint {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMetricPoint();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 8) {\n break;\n }\n\n message.atUnixMs = longToNumber(reader.int64());\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.name = reader.string();\n continue;\n }\n case 3: {\n if (tag !== 24) {\n break;\n }\n\n message.kind = reader.int32() as any;\n continue;\n }\n case 4: {\n if (tag !== 34) {\n break;\n }\n\n const entry4 = MetricPoint_LabelsEntry.decode(reader, reader.uint32());\n if (entry4.value !== undefined) {\n message.labels[entry4.key] = entry4.value;\n }\n continue;\n }\n case 5: {\n if (tag !== 42) {\n break;\n }\n\n message.instanceId = reader.string();\n continue;\n }\n case 6: {\n if (tag !== 49) {\n break;\n }\n\n message.value = reader.double();\n continue;\n }\n case 7: {\n if (tag !== 58) {\n break;\n }\n\n message.unit = reader.string();\n continue;\n }\n case 8: {\n if (tag !== 66) {\n break;\n }\n\n message.bucketsJson = Buffer.from(reader.bytes());\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<MetricPoint>, I>>(base?: I): MetricPoint {\n return MetricPoint.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<MetricPoint>, I>>(object: I): MetricPoint {\n const message = createBaseMetricPoint();\n message.atUnixMs = object.atUnixMs ?? 0;\n message.name = object.name ?? \"\";\n message.kind = object.kind ?? 0;\n message.labels = (globalThis.Object.entries(object.labels ?? {}) as [string, string][]).reduce(\n (acc: { [key: string]: string }, [key, value]: [string, string]) => {\n if (value !== undefined) {\n acc[key] = globalThis.String(value);\n }\n return acc;\n },\n {},\n );\n message.instanceId = object.instanceId ?? \"\";\n message.value = object.value ?? 0;\n message.unit = object.unit ?? \"\";\n message.bucketsJson = object.bucketsJson ?? Buffer.alloc(0);\n return message;\n },\n};\n\nfunction createBaseMetricPoint_LabelsEntry(): MetricPoint_LabelsEntry {\n return { key: \"\", value: \"\" };\n}\n\nexport const MetricPoint_LabelsEntry: MessageFns<MetricPoint_LabelsEntry> = {\n encode(message: MetricPoint_LabelsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.value !== \"\") {\n writer.uint32(18).string(message.value);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): MetricPoint_LabelsEntry {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMetricPoint_LabelsEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.key = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.value = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<MetricPoint_LabelsEntry>, I>>(base?: I): MetricPoint_LabelsEntry {\n return MetricPoint_LabelsEntry.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<MetricPoint_LabelsEntry>, I>>(object: I): MetricPoint_LabelsEntry {\n const message = createBaseMetricPoint_LabelsEntry();\n message.key = object.key ?? \"\";\n message.value = object.value ?? \"\";\n return message;\n },\n};\n\nfunction createBasePayloadAttachment(): PayloadAttachment {\n return { traceId: \"\", opId: \"\", direction: 0, bytes: Buffer.alloc(0), originalSize: 0, contractHash: \"\" };\n}\n\nexport const PayloadAttachment: MessageFns<PayloadAttachment> = {\n encode(message: PayloadAttachment, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.traceId !== \"\") {\n writer.uint32(10).string(message.traceId);\n }\n if (message.opId !== \"\") {\n writer.uint32(18).string(message.opId);\n }\n if (message.direction !== 0) {\n writer.uint32(24).uint32(message.direction);\n }\n if (message.bytes.length !== 0) {\n writer.uint32(34).bytes(message.bytes);\n }\n if (message.originalSize !== 0) {\n writer.uint32(40).int32(message.originalSize);\n }\n if (message.contractHash !== \"\") {\n writer.uint32(50).string(message.contractHash);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): PayloadAttachment {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBasePayloadAttachment();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.traceId = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.opId = reader.string();\n continue;\n }\n case 3: {\n if (tag !== 24) {\n break;\n }\n\n message.direction = reader.uint32();\n continue;\n }\n case 4: {\n if (tag !== 34) {\n break;\n }\n\n message.bytes = Buffer.from(reader.bytes());\n continue;\n }\n case 5: {\n if (tag !== 40) {\n break;\n }\n\n message.originalSize = reader.int32();\n continue;\n }\n case 6: {\n if (tag !== 50) {\n break;\n }\n\n message.contractHash = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<PayloadAttachment>, I>>(base?: I): PayloadAttachment {\n return PayloadAttachment.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<PayloadAttachment>, I>>(object: I): PayloadAttachment {\n const message = createBasePayloadAttachment();\n message.traceId = object.traceId ?? \"\";\n message.opId = object.opId ?? \"\";\n message.direction = object.direction ?? 0;\n message.bytes = object.bytes ?? Buffer.alloc(0);\n message.originalSize = object.originalSize ?? 0;\n message.contractHash = object.contractHash ?? \"\";\n return message;\n },\n};\n\nfunction createBaseTelemetryAck(): TelemetryAck {\n return { receivedBytesHighWater: 0, backpressureLevel: 0, dropCountServerSide: 0, drainReason: \"\" };\n}\n\nexport const TelemetryAck: MessageFns<TelemetryAck> = {\n encode(message: TelemetryAck, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.receivedBytesHighWater !== 0) {\n writer.uint32(8).uint64(message.receivedBytesHighWater);\n }\n if (message.backpressureLevel !== 0) {\n writer.uint32(16).uint32(message.backpressureLevel);\n }\n if (message.dropCountServerSide !== 0) {\n writer.uint32(24).uint64(message.dropCountServerSide);\n }\n if (message.drainReason !== \"\") {\n writer.uint32(34).string(message.drainReason);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): TelemetryAck {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTelemetryAck();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 8) {\n break;\n }\n\n message.receivedBytesHighWater = longToNumber(reader.uint64());\n continue;\n }\n case 2: {\n if (tag !== 16) {\n break;\n }\n\n message.backpressureLevel = reader.uint32();\n continue;\n }\n case 3: {\n if (tag !== 24) {\n break;\n }\n\n message.dropCountServerSide = longToNumber(reader.uint64());\n continue;\n }\n case 4: {\n if (tag !== 34) {\n break;\n }\n\n message.drainReason = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<TelemetryAck>, I>>(base?: I): TelemetryAck {\n return TelemetryAck.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<TelemetryAck>, I>>(object: I): TelemetryAck {\n const message = createBaseTelemetryAck();\n message.receivedBytesHighWater = object.receivedBytesHighWater ?? 0;\n message.backpressureLevel = object.backpressureLevel ?? 0;\n message.dropCountServerSide = object.dropCountServerSide ?? 0;\n message.drainReason = object.drainReason ?? \"\";\n return message;\n },\n};\n\nfunction createBaseListTracesRequest(): ListTracesRequest {\n return {\n channelFilter: [],\n statusFilter: [],\n fromMs: 0,\n toMs: 0,\n serviceId: \"\",\n textQuery: \"\",\n limit: 0,\n cursor: \"\",\n };\n}\n\nexport const ListTracesRequest: MessageFns<ListTracesRequest> = {\n encode(message: ListTracesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n writer.uint32(10).fork();\n for (const v of message.channelFilter) {\n writer.int32(v);\n }\n writer.join();\n writer.uint32(18).fork();\n for (const v of message.statusFilter) {\n writer.int32(v);\n }\n writer.join();\n if (message.fromMs !== 0) {\n writer.uint32(24).int64(message.fromMs);\n }\n if (message.toMs !== 0) {\n writer.uint32(32).int64(message.toMs);\n }\n if (message.serviceId !== \"\") {\n writer.uint32(42).string(message.serviceId);\n }\n if (message.textQuery !== \"\") {\n writer.uint32(50).string(message.textQuery);\n }\n if (message.limit !== 0) {\n writer.uint32(56).uint32(message.limit);\n }\n if (message.cursor !== \"\") {\n writer.uint32(66).string(message.cursor);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): ListTracesRequest {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseListTracesRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag === 8) {\n message.channelFilter.push(reader.int32() as any);\n\n continue;\n }\n\n if (tag === 10) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.channelFilter.push(reader.int32() as any);\n }\n\n continue;\n }\n\n break;\n }\n case 2: {\n if (tag === 16) {\n message.statusFilter.push(reader.int32() as any);\n\n continue;\n }\n\n if (tag === 18) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.statusFilter.push(reader.int32() as any);\n }\n\n continue;\n }\n\n break;\n }\n case 3: {\n if (tag !== 24) {\n break;\n }\n\n message.fromMs = longToNumber(reader.int64());\n continue;\n }\n case 4: {\n if (tag !== 32) {\n break;\n }\n\n message.toMs = longToNumber(reader.int64());\n continue;\n }\n case 5: {\n if (tag !== 42) {\n break;\n }\n\n message.serviceId = reader.string();\n continue;\n }\n case 6: {\n if (tag !== 50) {\n break;\n }\n\n message.textQuery = reader.string();\n continue;\n }\n case 7: {\n if (tag !== 56) {\n break;\n }\n\n message.limit = reader.uint32();\n continue;\n }\n case 8: {\n if (tag !== 66) {\n break;\n }\n\n message.cursor = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<ListTracesRequest>, I>>(base?: I): ListTracesRequest {\n return ListTracesRequest.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<ListTracesRequest>, I>>(object: I): ListTracesRequest {\n const message = createBaseListTracesRequest();\n message.channelFilter = object.channelFilter?.map((e) => e) || [];\n message.statusFilter = object.statusFilter?.map((e) => e) || [];\n message.fromMs = object.fromMs ?? 0;\n message.toMs = object.toMs ?? 0;\n message.serviceId = object.serviceId ?? \"\";\n message.textQuery = object.textQuery ?? \"\";\n message.limit = object.limit ?? 0;\n message.cursor = object.cursor ?? \"\";\n return message;\n },\n};\n\nfunction createBaseTraceSummary(): TraceSummary {\n return {\n traceId: \"\",\n rootSubject: \"\",\n rootServiceId: \"\",\n startedAtMs: 0,\n durationMs: 0,\n opCount: 0,\n overallStatus: 0,\n hasRunning: false,\n };\n}\n\nexport const TraceSummary: MessageFns<TraceSummary> = {\n encode(message: TraceSummary, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.traceId !== \"\") {\n writer.uint32(10).string(message.traceId);\n }\n if (message.rootSubject !== \"\") {\n writer.uint32(18).string(message.rootSubject);\n }\n if (message.rootServiceId !== \"\") {\n writer.uint32(26).string(message.rootServiceId);\n }\n if (message.startedAtMs !== 0) {\n writer.uint32(32).int64(message.startedAtMs);\n }\n if (message.durationMs !== 0) {\n writer.uint32(40).int64(message.durationMs);\n }\n if (message.opCount !== 0) {\n writer.uint32(48).uint32(message.opCount);\n }\n if (message.overallStatus !== 0) {\n writer.uint32(56).int32(message.overallStatus);\n }\n if (message.hasRunning !== false) {\n writer.uint32(64).bool(message.hasRunning);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): TraceSummary {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseTraceSummary();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.traceId = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.rootSubject = reader.string();\n continue;\n }\n case 3: {\n if (tag !== 26) {\n break;\n }\n\n message.rootServiceId = reader.string();\n continue;\n }\n case 4: {\n if (tag !== 32) {\n break;\n }\n\n message.startedAtMs = longToNumber(reader.int64());\n continue;\n }\n case 5: {\n if (tag !== 40) {\n break;\n }\n\n message.durationMs = longToNumber(reader.int64());\n continue;\n }\n case 6: {\n if (tag !== 48) {\n break;\n }\n\n message.opCount = reader.uint32();\n continue;\n }\n case 7: {\n if (tag !== 56) {\n break;\n }\n\n message.overallStatus = reader.int32() as any;\n continue;\n }\n case 8: {\n if (tag !== 64) {\n break;\n }\n\n message.hasRunning = reader.bool();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<TraceSummary>, I>>(base?: I): TraceSummary {\n return TraceSummary.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<TraceSummary>, I>>(object: I): TraceSummary {\n const message = createBaseTraceSummary();\n message.traceId = object.traceId ?? \"\";\n message.rootSubject = object.rootSubject ?? \"\";\n message.rootServiceId = object.rootServiceId ?? \"\";\n message.startedAtMs = object.startedAtMs ?? 0;\n message.durationMs = object.durationMs ?? 0;\n message.opCount = object.opCount ?? 0;\n message.overallStatus = object.overallStatus ?? 0;\n message.hasRunning = object.hasRunning ?? false;\n return message;\n },\n};\n\nfunction createBaseListTracesResponse(): ListTracesResponse {\n return { traces: [], nextCursor: \"\" };\n}\n\nexport const ListTracesResponse: MessageFns<ListTracesResponse> = {\n encode(message: ListTracesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.traces) {\n TraceSummary.encode(v!, writer.uint32(10).fork()).join();\n }\n if (message.nextCursor !== \"\") {\n writer.uint32(18).string(message.nextCursor);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): ListTracesResponse {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseListTracesResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.traces.push(TraceSummary.decode(reader, reader.uint32()));\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.nextCursor = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<ListTracesResponse>, I>>(base?: I): ListTracesResponse {\n return ListTracesResponse.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<ListTracesResponse>, I>>(object: I): ListTracesResponse {\n const message = createBaseListTracesResponse();\n message.traces = object.traces?.map((e) => TraceSummary.fromPartial(e)) || [];\n message.nextCursor = object.nextCursor ?? \"\";\n return message;\n },\n};\n\nfunction createBaseGetTraceRequest(): GetTraceRequest {\n return { traceId: \"\", limit: 0, cursor: \"\" };\n}\n\nexport const GetTraceRequest: MessageFns<GetTraceRequest> = {\n encode(message: GetTraceRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.traceId !== \"\") {\n writer.uint32(10).string(message.traceId);\n }\n if (message.limit !== 0) {\n writer.uint32(16).uint32(message.limit);\n }\n if (message.cursor !== \"\") {\n writer.uint32(26).string(message.cursor);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): GetTraceRequest {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGetTraceRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.traceId = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 16) {\n break;\n }\n\n message.limit = reader.uint32();\n continue;\n }\n case 3: {\n if (tag !== 26) {\n break;\n }\n\n message.cursor = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<GetTraceRequest>, I>>(base?: I): GetTraceRequest {\n return GetTraceRequest.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<GetTraceRequest>, I>>(object: I): GetTraceRequest {\n const message = createBaseGetTraceRequest();\n message.traceId = object.traceId ?? \"\";\n message.limit = object.limit ?? 0;\n message.cursor = object.cursor ?? \"\";\n return message;\n },\n};\n\nfunction createBaseOperationView(): OperationView {\n return {\n opId: \"\",\n traceId: \"\",\n parentOpId: \"\",\n channel: 0,\n kind: 0,\n subject: \"\",\n actorServiceId: \"\",\n actorInstanceId: \"\",\n peerServiceId: \"\",\n businessKey: \"\",\n attempt: 0,\n startedAtMs: 0,\n finishedAtMs: undefined,\n status: 0,\n statusMessage: \"\",\n metaJson: Buffer.alloc(0),\n attrsJson: Buffer.alloc(0),\n };\n}\n\nexport const OperationView: MessageFns<OperationView> = {\n encode(message: OperationView, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.opId !== \"\") {\n writer.uint32(10).string(message.opId);\n }\n if (message.traceId !== \"\") {\n writer.uint32(18).string(message.traceId);\n }\n if (message.parentOpId !== \"\") {\n writer.uint32(26).string(message.parentOpId);\n }\n if (message.channel !== 0) {\n writer.uint32(32).int32(message.channel);\n }\n if (message.kind !== 0) {\n writer.uint32(40).uint32(message.kind);\n }\n if (message.subject !== \"\") {\n writer.uint32(50).string(message.subject);\n }\n if (message.actorServiceId !== \"\") {\n writer.uint32(58).string(message.actorServiceId);\n }\n if (message.actorInstanceId !== \"\") {\n writer.uint32(66).string(message.actorInstanceId);\n }\n if (message.peerServiceId !== \"\") {\n writer.uint32(74).string(message.peerServiceId);\n }\n if (message.businessKey !== \"\") {\n writer.uint32(82).string(message.businessKey);\n }\n if (message.attempt !== 0) {\n writer.uint32(88).int32(message.attempt);\n }\n if (message.startedAtMs !== 0) {\n writer.uint32(96).int64(message.startedAtMs);\n }\n if (message.finishedAtMs !== undefined) {\n writer.uint32(104).int64(message.finishedAtMs);\n }\n if (message.status !== 0) {\n writer.uint32(112).int32(message.status);\n }\n if (message.statusMessage !== \"\") {\n writer.uint32(122).string(message.statusMessage);\n }\n if (message.metaJson.length !== 0) {\n writer.uint32(130).bytes(message.metaJson);\n }\n if (message.attrsJson.length !== 0) {\n writer.uint32(138).bytes(message.attrsJson);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): OperationView {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseOperationView();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.opId = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.traceId = reader.string();\n continue;\n }\n case 3: {\n if (tag !== 26) {\n break;\n }\n\n message.parentOpId = reader.string();\n continue;\n }\n case 4: {\n if (tag !== 32) {\n break;\n }\n\n message.channel = reader.int32() as any;\n continue;\n }\n case 5: {\n if (tag !== 40) {\n break;\n }\n\n message.kind = reader.uint32();\n continue;\n }\n case 6: {\n if (tag !== 50) {\n break;\n }\n\n message.subject = reader.string();\n continue;\n }\n case 7: {\n if (tag !== 58) {\n break;\n }\n\n message.actorServiceId = reader.string();\n continue;\n }\n case 8: {\n if (tag !== 66) {\n break;\n }\n\n message.actorInstanceId = reader.string();\n continue;\n }\n case 9: {\n if (tag !== 74) {\n break;\n }\n\n message.peerServiceId = reader.string();\n continue;\n }\n case 10: {\n if (tag !== 82) {\n break;\n }\n\n message.businessKey = reader.string();\n continue;\n }\n case 11: {\n if (tag !== 88) {\n break;\n }\n\n message.attempt = reader.int32();\n continue;\n }\n case 12: {\n if (tag !== 96) {\n break;\n }\n\n message.startedAtMs = longToNumber(reader.int64());\n continue;\n }\n case 13: {\n if (tag !== 104) {\n break;\n }\n\n message.finishedAtMs = longToNumber(reader.int64());\n continue;\n }\n case 14: {\n if (tag !== 112) {\n break;\n }\n\n message.status = reader.int32() as any;\n continue;\n }\n case 15: {\n if (tag !== 122) {\n break;\n }\n\n message.statusMessage = reader.string();\n continue;\n }\n case 16: {\n if (tag !== 130) {\n break;\n }\n\n message.metaJson = Buffer.from(reader.bytes());\n continue;\n }\n case 17: {\n if (tag !== 138) {\n break;\n }\n\n message.attrsJson = Buffer.from(reader.bytes());\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<OperationView>, I>>(base?: I): OperationView {\n return OperationView.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<OperationView>, I>>(object: I): OperationView {\n const message = createBaseOperationView();\n message.opId = object.opId ?? \"\";\n message.traceId = object.traceId ?? \"\";\n message.parentOpId = object.parentOpId ?? \"\";\n message.channel = object.channel ?? 0;\n message.kind = object.kind ?? 0;\n message.subject = object.subject ?? \"\";\n message.actorServiceId = object.actorServiceId ?? \"\";\n message.actorInstanceId = object.actorInstanceId ?? \"\";\n message.peerServiceId = object.peerServiceId ?? \"\";\n message.businessKey = object.businessKey ?? \"\";\n message.attempt = object.attempt ?? 0;\n message.startedAtMs = object.startedAtMs ?? 0;\n message.finishedAtMs = object.finishedAtMs ?? undefined;\n message.status = object.status ?? 0;\n message.statusMessage = object.statusMessage ?? \"\";\n message.metaJson = object.metaJson ?? Buffer.alloc(0);\n message.attrsJson = object.attrsJson ?? Buffer.alloc(0);\n return message;\n },\n};\n\nfunction createBaseGetTraceResponse(): GetTraceResponse {\n return { ops: [], nextCursor: \"\", truncated: false };\n}\n\nexport const GetTraceResponse: MessageFns<GetTraceResponse> = {\n encode(message: GetTraceResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.ops) {\n OperationView.encode(v!, writer.uint32(10).fork()).join();\n }\n if (message.nextCursor !== \"\") {\n writer.uint32(18).string(message.nextCursor);\n }\n if (message.truncated !== false) {\n writer.uint32(24).bool(message.truncated);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): GetTraceResponse {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGetTraceResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.ops.push(OperationView.decode(reader, reader.uint32()));\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.nextCursor = reader.string();\n continue;\n }\n case 3: {\n if (tag !== 24) {\n break;\n }\n\n message.truncated = reader.bool();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<GetTraceResponse>, I>>(base?: I): GetTraceResponse {\n return GetTraceResponse.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<GetTraceResponse>, I>>(object: I): GetTraceResponse {\n const message = createBaseGetTraceResponse();\n message.ops = object.ops?.map((e) => OperationView.fromPartial(e)) || [];\n message.nextCursor = object.nextCursor ?? \"\";\n message.truncated = object.truncated ?? false;\n return message;\n },\n};\n\nfunction createBaseGetOperationRequest(): GetOperationRequest {\n return { opId: \"\" };\n}\n\nexport const GetOperationRequest: MessageFns<GetOperationRequest> = {\n encode(message: GetOperationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.opId !== \"\") {\n writer.uint32(10).string(message.opId);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): GetOperationRequest {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGetOperationRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.opId = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<GetOperationRequest>, I>>(base?: I): GetOperationRequest {\n return GetOperationRequest.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<GetOperationRequest>, I>>(object: I): GetOperationRequest {\n const message = createBaseGetOperationRequest();\n message.opId = object.opId ?? \"\";\n return message;\n },\n};\n\nfunction createBaseGetOperationResponse(): GetOperationResponse {\n return { op: undefined };\n}\n\nexport const GetOperationResponse: MessageFns<GetOperationResponse> = {\n encode(message: GetOperationResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.op !== undefined) {\n OperationView.encode(message.op, writer.uint32(10).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): GetOperationResponse {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGetOperationResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.op = OperationView.decode(reader, reader.uint32());\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<GetOperationResponse>, I>>(base?: I): GetOperationResponse {\n return GetOperationResponse.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<GetOperationResponse>, I>>(object: I): GetOperationResponse {\n const message = createBaseGetOperationResponse();\n message.op = (object.op !== undefined && object.op !== null) ? OperationView.fromPartial(object.op) : undefined;\n return message;\n },\n};\n\nfunction createBaseGetPayloadRequest(): GetPayloadRequest {\n return { traceId: \"\", opId: \"\", direction: 0 };\n}\n\nexport const GetPayloadRequest: MessageFns<GetPayloadRequest> = {\n encode(message: GetPayloadRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.traceId !== \"\") {\n writer.uint32(10).string(message.traceId);\n }\n if (message.opId !== \"\") {\n writer.uint32(18).string(message.opId);\n }\n if (message.direction !== 0) {\n writer.uint32(24).uint32(message.direction);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): GetPayloadRequest {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGetPayloadRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.traceId = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.opId = reader.string();\n continue;\n }\n case 3: {\n if (tag !== 24) {\n break;\n }\n\n message.direction = reader.uint32();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<GetPayloadRequest>, I>>(base?: I): GetPayloadRequest {\n return GetPayloadRequest.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<GetPayloadRequest>, I>>(object: I): GetPayloadRequest {\n const message = createBaseGetPayloadRequest();\n message.traceId = object.traceId ?? \"\";\n message.opId = object.opId ?? \"\";\n message.direction = object.direction ?? 0;\n return message;\n },\n};\n\nfunction createBaseGetPayloadResponse(): GetPayloadResponse {\n return {\n rawBytes: Buffer.alloc(0),\n decodedBytes: Buffer.alloc(0),\n originalSize: 0,\n contractHash: \"\",\n schemaDrift: false,\n };\n}\n\nexport const GetPayloadResponse: MessageFns<GetPayloadResponse> = {\n encode(message: GetPayloadResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.rawBytes.length !== 0) {\n writer.uint32(10).bytes(message.rawBytes);\n }\n if (message.decodedBytes.length !== 0) {\n writer.uint32(18).bytes(message.decodedBytes);\n }\n if (message.originalSize !== 0) {\n writer.uint32(24).int32(message.originalSize);\n }\n if (message.contractHash !== \"\") {\n writer.uint32(34).string(message.contractHash);\n }\n if (message.schemaDrift !== false) {\n writer.uint32(40).bool(message.schemaDrift);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): GetPayloadResponse {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseGetPayloadResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.rawBytes = Buffer.from(reader.bytes());\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.decodedBytes = Buffer.from(reader.bytes());\n continue;\n }\n case 3: {\n if (tag !== 24) {\n break;\n }\n\n message.originalSize = reader.int32();\n continue;\n }\n case 4: {\n if (tag !== 34) {\n break;\n }\n\n message.contractHash = reader.string();\n continue;\n }\n case 5: {\n if (tag !== 40) {\n break;\n }\n\n message.schemaDrift = reader.bool();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<GetPayloadResponse>, I>>(base?: I): GetPayloadResponse {\n return GetPayloadResponse.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<GetPayloadResponse>, I>>(object: I): GetPayloadResponse {\n const message = createBaseGetPayloadResponse();\n message.rawBytes = object.rawBytes ?? Buffer.alloc(0);\n message.decodedBytes = object.decodedBytes ?? Buffer.alloc(0);\n message.originalSize = object.originalSize ?? 0;\n message.contractHash = object.contractHash ?? \"\";\n message.schemaDrift = object.schemaDrift ?? false;\n return message;\n },\n};\n\nfunction createBaseQueryLogsRequest(): QueryLogsRequest {\n return {\n serviceId: \"\",\n instanceId: \"\",\n fromUnixMs: 0,\n toUnixMs: 0,\n minLevel: 0,\n traceId: \"\",\n textQuery: \"\",\n limit: 0,\n cursor: \"\",\n };\n}\n\nexport const QueryLogsRequest: MessageFns<QueryLogsRequest> = {\n encode(message: QueryLogsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.serviceId !== \"\") {\n writer.uint32(10).string(message.serviceId);\n }\n if (message.instanceId !== \"\") {\n writer.uint32(18).string(message.instanceId);\n }\n if (message.fromUnixMs !== 0) {\n writer.uint32(24).int64(message.fromUnixMs);\n }\n if (message.toUnixMs !== 0) {\n writer.uint32(32).int64(message.toUnixMs);\n }\n if (message.minLevel !== 0) {\n writer.uint32(40).int32(message.minLevel);\n }\n if (message.traceId !== \"\") {\n writer.uint32(50).string(message.traceId);\n }\n if (message.textQuery !== \"\") {\n writer.uint32(58).string(message.textQuery);\n }\n if (message.limit !== 0) {\n writer.uint32(64).uint32(message.limit);\n }\n if (message.cursor !== \"\") {\n writer.uint32(74).string(message.cursor);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): QueryLogsRequest {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseQueryLogsRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.serviceId = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.instanceId = reader.string();\n continue;\n }\n case 3: {\n if (tag !== 24) {\n break;\n }\n\n message.fromUnixMs = longToNumber(reader.int64());\n continue;\n }\n case 4: {\n if (tag !== 32) {\n break;\n }\n\n message.toUnixMs = longToNumber(reader.int64());\n continue;\n }\n case 5: {\n if (tag !== 40) {\n break;\n }\n\n message.minLevel = reader.int32() as any;\n continue;\n }\n case 6: {\n if (tag !== 50) {\n break;\n }\n\n message.traceId = reader.string();\n continue;\n }\n case 7: {\n if (tag !== 58) {\n break;\n }\n\n message.textQuery = reader.string();\n continue;\n }\n case 8: {\n if (tag !== 64) {\n break;\n }\n\n message.limit = reader.uint32();\n continue;\n }\n case 9: {\n if (tag !== 74) {\n break;\n }\n\n message.cursor = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<QueryLogsRequest>, I>>(base?: I): QueryLogsRequest {\n return QueryLogsRequest.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<QueryLogsRequest>, I>>(object: I): QueryLogsRequest {\n const message = createBaseQueryLogsRequest();\n message.serviceId = object.serviceId ?? \"\";\n message.instanceId = object.instanceId ?? \"\";\n message.fromUnixMs = object.fromUnixMs ?? 0;\n message.toUnixMs = object.toUnixMs ?? 0;\n message.minLevel = object.minLevel ?? 0;\n message.traceId = object.traceId ?? \"\";\n message.textQuery = object.textQuery ?? \"\";\n message.limit = object.limit ?? 0;\n message.cursor = object.cursor ?? \"\";\n return message;\n },\n};\n\nfunction createBaseQueryLogsResponse(): QueryLogsResponse {\n return { entries: [], nextCursor: \"\" };\n}\n\nexport const QueryLogsResponse: MessageFns<QueryLogsResponse> = {\n encode(message: QueryLogsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.entries) {\n Log.encode(v!, writer.uint32(10).fork()).join();\n }\n if (message.nextCursor !== \"\") {\n writer.uint32(18).string(message.nextCursor);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): QueryLogsResponse {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseQueryLogsResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.entries.push(Log.decode(reader, reader.uint32()));\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.nextCursor = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<QueryLogsResponse>, I>>(base?: I): QueryLogsResponse {\n return QueryLogsResponse.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<QueryLogsResponse>, I>>(object: I): QueryLogsResponse {\n const message = createBaseQueryLogsResponse();\n message.entries = object.entries?.map((e) => Log.fromPartial(e)) || [];\n message.nextCursor = object.nextCursor ?? \"\";\n return message;\n },\n};\n\nfunction createBaseQueryMetricsRequest(): QueryMetricsRequest {\n return {\n serviceId: \"\",\n instanceId: \"\",\n name: \"\",\n fromUnixMs: 0,\n toUnixMs: 0,\n labelFilters: {},\n stepSeconds: 0,\n percentiles: [],\n };\n}\n\nexport const QueryMetricsRequest: MessageFns<QueryMetricsRequest> = {\n encode(message: QueryMetricsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.serviceId !== \"\") {\n writer.uint32(10).string(message.serviceId);\n }\n if (message.instanceId !== \"\") {\n writer.uint32(18).string(message.instanceId);\n }\n if (message.name !== \"\") {\n writer.uint32(26).string(message.name);\n }\n if (message.fromUnixMs !== 0) {\n writer.uint32(32).int64(message.fromUnixMs);\n }\n if (message.toUnixMs !== 0) {\n writer.uint32(40).int64(message.toUnixMs);\n }\n globalThis.Object.entries(message.labelFilters).forEach(([key, value]: [string, string]) => {\n QueryMetricsRequest_LabelFiltersEntry.encode({ key: key as any, value }, writer.uint32(50).fork()).join();\n });\n if (message.stepSeconds !== 0) {\n writer.uint32(56).uint32(message.stepSeconds);\n }\n writer.uint32(66).fork();\n for (const v of message.percentiles) {\n writer.double(v);\n }\n writer.join();\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): QueryMetricsRequest {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseQueryMetricsRequest();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.serviceId = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.instanceId = reader.string();\n continue;\n }\n case 3: {\n if (tag !== 26) {\n break;\n }\n\n message.name = reader.string();\n continue;\n }\n case 4: {\n if (tag !== 32) {\n break;\n }\n\n message.fromUnixMs = longToNumber(reader.int64());\n continue;\n }\n case 5: {\n if (tag !== 40) {\n break;\n }\n\n message.toUnixMs = longToNumber(reader.int64());\n continue;\n }\n case 6: {\n if (tag !== 50) {\n break;\n }\n\n const entry6 = QueryMetricsRequest_LabelFiltersEntry.decode(reader, reader.uint32());\n if (entry6.value !== undefined) {\n message.labelFilters[entry6.key] = entry6.value;\n }\n continue;\n }\n case 7: {\n if (tag !== 56) {\n break;\n }\n\n message.stepSeconds = reader.uint32();\n continue;\n }\n case 8: {\n if (tag === 65) {\n message.percentiles.push(reader.double());\n\n continue;\n }\n\n if (tag === 66) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.percentiles.push(reader.double());\n }\n\n continue;\n }\n\n break;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<QueryMetricsRequest>, I>>(base?: I): QueryMetricsRequest {\n return QueryMetricsRequest.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<QueryMetricsRequest>, I>>(object: I): QueryMetricsRequest {\n const message = createBaseQueryMetricsRequest();\n message.serviceId = object.serviceId ?? \"\";\n message.instanceId = object.instanceId ?? \"\";\n message.name = object.name ?? \"\";\n message.fromUnixMs = object.fromUnixMs ?? 0;\n message.toUnixMs = object.toUnixMs ?? 0;\n message.labelFilters = (globalThis.Object.entries(object.labelFilters ?? {}) as [string, string][]).reduce(\n (acc: { [key: string]: string }, [key, value]: [string, string]) => {\n if (value !== undefined) {\n acc[key] = globalThis.String(value);\n }\n return acc;\n },\n {},\n );\n message.stepSeconds = object.stepSeconds ?? 0;\n message.percentiles = object.percentiles?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseQueryMetricsRequest_LabelFiltersEntry(): QueryMetricsRequest_LabelFiltersEntry {\n return { key: \"\", value: \"\" };\n}\n\nexport const QueryMetricsRequest_LabelFiltersEntry: MessageFns<QueryMetricsRequest_LabelFiltersEntry> = {\n encode(message: QueryMetricsRequest_LabelFiltersEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.value !== \"\") {\n writer.uint32(18).string(message.value);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): QueryMetricsRequest_LabelFiltersEntry {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseQueryMetricsRequest_LabelFiltersEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.key = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.value = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<QueryMetricsRequest_LabelFiltersEntry>, I>>(\n base?: I,\n ): QueryMetricsRequest_LabelFiltersEntry {\n return QueryMetricsRequest_LabelFiltersEntry.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<QueryMetricsRequest_LabelFiltersEntry>, I>>(\n object: I,\n ): QueryMetricsRequest_LabelFiltersEntry {\n const message = createBaseQueryMetricsRequest_LabelFiltersEntry();\n message.key = object.key ?? \"\";\n message.value = object.value ?? \"\";\n return message;\n },\n};\n\nfunction createBaseMetricSeries(): MetricSeries {\n return { name: \"\", labels: {}, instanceId: \"\", tsUnixMs: [], values: [], maxValues: [] };\n}\n\nexport const MetricSeries: MessageFns<MetricSeries> = {\n encode(message: MetricSeries, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.name !== \"\") {\n writer.uint32(10).string(message.name);\n }\n globalThis.Object.entries(message.labels).forEach(([key, value]: [string, string]) => {\n MetricSeries_LabelsEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join();\n });\n if (message.instanceId !== \"\") {\n writer.uint32(26).string(message.instanceId);\n }\n writer.uint32(34).fork();\n for (const v of message.tsUnixMs) {\n writer.int64(v);\n }\n writer.join();\n writer.uint32(42).fork();\n for (const v of message.values) {\n writer.double(v);\n }\n writer.join();\n writer.uint32(50).fork();\n for (const v of message.maxValues) {\n writer.double(v);\n }\n writer.join();\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): MetricSeries {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMetricSeries();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.name = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n const entry2 = MetricSeries_LabelsEntry.decode(reader, reader.uint32());\n if (entry2.value !== undefined) {\n message.labels[entry2.key] = entry2.value;\n }\n continue;\n }\n case 3: {\n if (tag !== 26) {\n break;\n }\n\n message.instanceId = reader.string();\n continue;\n }\n case 4: {\n if (tag === 32) {\n message.tsUnixMs.push(longToNumber(reader.int64()));\n\n continue;\n }\n\n if (tag === 34) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.tsUnixMs.push(longToNumber(reader.int64()));\n }\n\n continue;\n }\n\n break;\n }\n case 5: {\n if (tag === 41) {\n message.values.push(reader.double());\n\n continue;\n }\n\n if (tag === 42) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.values.push(reader.double());\n }\n\n continue;\n }\n\n break;\n }\n case 6: {\n if (tag === 49) {\n message.maxValues.push(reader.double());\n\n continue;\n }\n\n if (tag === 50) {\n const end2 = reader.uint32() + reader.pos;\n while (reader.pos < end2) {\n message.maxValues.push(reader.double());\n }\n\n continue;\n }\n\n break;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<MetricSeries>, I>>(base?: I): MetricSeries {\n return MetricSeries.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<MetricSeries>, I>>(object: I): MetricSeries {\n const message = createBaseMetricSeries();\n message.name = object.name ?? \"\";\n message.labels = (globalThis.Object.entries(object.labels ?? {}) as [string, string][]).reduce(\n (acc: { [key: string]: string }, [key, value]: [string, string]) => {\n if (value !== undefined) {\n acc[key] = globalThis.String(value);\n }\n return acc;\n },\n {},\n );\n message.instanceId = object.instanceId ?? \"\";\n message.tsUnixMs = object.tsUnixMs?.map((e) => e) || [];\n message.values = object.values?.map((e) => e) || [];\n message.maxValues = object.maxValues?.map((e) => e) || [];\n return message;\n },\n};\n\nfunction createBaseMetricSeries_LabelsEntry(): MetricSeries_LabelsEntry {\n return { key: \"\", value: \"\" };\n}\n\nexport const MetricSeries_LabelsEntry: MessageFns<MetricSeries_LabelsEntry> = {\n encode(message: MetricSeries_LabelsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n if (message.key !== \"\") {\n writer.uint32(10).string(message.key);\n }\n if (message.value !== \"\") {\n writer.uint32(18).string(message.value);\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): MetricSeries_LabelsEntry {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseMetricSeries_LabelsEntry();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.key = reader.string();\n continue;\n }\n case 2: {\n if (tag !== 18) {\n break;\n }\n\n message.value = reader.string();\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<MetricSeries_LabelsEntry>, I>>(base?: I): MetricSeries_LabelsEntry {\n return MetricSeries_LabelsEntry.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<MetricSeries_LabelsEntry>, I>>(object: I): MetricSeries_LabelsEntry {\n const message = createBaseMetricSeries_LabelsEntry();\n message.key = object.key ?? \"\";\n message.value = object.value ?? \"\";\n return message;\n },\n};\n\nfunction createBaseQueryMetricsResponse(): QueryMetricsResponse {\n return { series: [] };\n}\n\nexport const QueryMetricsResponse: MessageFns<QueryMetricsResponse> = {\n encode(message: QueryMetricsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {\n for (const v of message.series) {\n MetricSeries.encode(v!, writer.uint32(10).fork()).join();\n }\n return writer;\n },\n\n decode(input: BinaryReader | Uint8Array, length?: number): QueryMetricsResponse {\n const reader = input instanceof BinaryReader ? input : new BinaryReader(input);\n const end = length === undefined ? reader.len : reader.pos + length;\n const message = createBaseQueryMetricsResponse();\n while (reader.pos < end) {\n const tag = reader.uint32();\n switch (tag >>> 3) {\n case 1: {\n if (tag !== 10) {\n break;\n }\n\n message.series.push(MetricSeries.decode(reader, reader.uint32()));\n continue;\n }\n }\n if ((tag & 7) === 4 || tag === 0) {\n break;\n }\n reader.skip(tag & 7);\n }\n return message;\n },\n\n create<I extends Exact<DeepPartial<QueryMetricsResponse>, I>>(base?: I): QueryMetricsResponse {\n return QueryMetricsResponse.fromPartial(base ?? ({} as any));\n },\n fromPartial<I extends Exact<DeepPartial<QueryMetricsResponse>, I>>(object: I): QueryMetricsResponse {\n const message = createBaseQueryMetricsResponse();\n message.series = object.series?.map((e) => MetricSeries.fromPartial(e)) || [];\n return message;\n },\n};\n\n/**\n * Telemetry — unified channel for ops, logs, metrics, payloads.\n *\n * One bidi stream per SDK instance carries TelemetryBatch (oneof kind).\n * Server-side acks via TelemetryAck provide flow control.\n * Read-side unary RPCs serve the UI dashboard.\n *\n * ADR T-025: single stream per identity binding → one disconnect event for\n * ABANDONED sweep, one HTTP/2 stream per SDK instance.\n */\nexport type TelemetryService = typeof TelemetryService;\nexport const TelemetryService = {\n report: {\n path: \"/servicebridge.v1.Telemetry/Report\" as const,\n requestStream: true as const,\n responseStream: true as const,\n requestSerialize: (value: TelemetryBatch): Buffer => Buffer.from(TelemetryBatch.encode(value).finish()),\n requestDeserialize: (value: Buffer): TelemetryBatch => TelemetryBatch.decode(value),\n responseSerialize: (value: TelemetryAck): Buffer => Buffer.from(TelemetryAck.encode(value).finish()),\n responseDeserialize: (value: Buffer): TelemetryAck => TelemetryAck.decode(value),\n },\n listTraces: {\n path: \"/servicebridge.v1.Telemetry/ListTraces\" as const,\n requestStream: false as const,\n responseStream: false as const,\n requestSerialize: (value: ListTracesRequest): Buffer => Buffer.from(ListTracesRequest.encode(value).finish()),\n requestDeserialize: (value: Buffer): ListTracesRequest => ListTracesRequest.decode(value),\n responseSerialize: (value: ListTracesResponse): Buffer => Buffer.from(ListTracesResponse.encode(value).finish()),\n responseDeserialize: (value: Buffer): ListTracesResponse => ListTracesResponse.decode(value),\n },\n getTrace: {\n path: \"/servicebridge.v1.Telemetry/GetTrace\" as const,\n requestStream: false as const,\n responseStream: false as const,\n requestSerialize: (value: GetTraceRequest): Buffer => Buffer.from(GetTraceRequest.encode(value).finish()),\n requestDeserialize: (value: Buffer): GetTraceRequest => GetTraceRequest.decode(value),\n responseSerialize: (value: GetTraceResponse): Buffer => Buffer.from(GetTraceResponse.encode(value).finish()),\n responseDeserialize: (value: Buffer): GetTraceResponse => GetTraceResponse.decode(value),\n },\n getOperation: {\n path: \"/servicebridge.v1.Telemetry/GetOperation\" as const,\n requestStream: false as const,\n responseStream: false as const,\n requestSerialize: (value: GetOperationRequest): Buffer => Buffer.from(GetOperationRequest.encode(value).finish()),\n requestDeserialize: (value: Buffer): GetOperationRequest => GetOperationRequest.decode(value),\n responseSerialize: (value: GetOperationResponse): Buffer =>\n Buffer.from(GetOperationResponse.encode(value).finish()),\n responseDeserialize: (value: Buffer): GetOperationResponse => GetOperationResponse.decode(value),\n },\n getPayload: {\n path: \"/servicebridge.v1.Telemetry/GetPayload\" as const,\n requestStream: false as const,\n responseStream: false as const,\n requestSerialize: (value: GetPayloadRequest): Buffer => Buffer.from(GetPayloadRequest.encode(value).finish()),\n requestDeserialize: (value: Buffer): GetPayloadRequest => GetPayloadRequest.decode(value),\n responseSerialize: (value: GetPayloadResponse): Buffer => Buffer.from(GetPayloadResponse.encode(value).finish()),\n responseDeserialize: (value: Buffer): GetPayloadResponse => GetPayloadResponse.decode(value),\n },\n queryLogs: {\n path: \"/servicebridge.v1.Telemetry/QueryLogs\" as const,\n requestStream: false as const,\n responseStream: false as const,\n requestSerialize: (value: QueryLogsRequest): Buffer => Buffer.from(QueryLogsRequest.encode(value).finish()),\n requestDeserialize: (value: Buffer): QueryLogsRequest => QueryLogsRequest.decode(value),\n responseSerialize: (value: QueryLogsResponse): Buffer => Buffer.from(QueryLogsResponse.encode(value).finish()),\n responseDeserialize: (value: Buffer): QueryLogsResponse => QueryLogsResponse.decode(value),\n },\n queryMetrics: {\n path: \"/servicebridge.v1.Telemetry/QueryMetrics\" as const,\n requestStream: false as const,\n responseStream: false as const,\n requestSerialize: (value: QueryMetricsRequest): Buffer => Buffer.from(QueryMetricsRequest.encode(value).finish()),\n requestDeserialize: (value: Buffer): QueryMetricsRequest => QueryMetricsRequest.decode(value),\n responseSerialize: (value: QueryMetricsResponse): Buffer =>\n Buffer.from(QueryMetricsResponse.encode(value).finish()),\n responseDeserialize: (value: Buffer): QueryMetricsResponse => QueryMetricsResponse.decode(value),\n },\n} as const;\n\nexport interface TelemetryServer extends UntypedServiceImplementation {\n report: handleBidiStreamingCall<TelemetryBatch, TelemetryAck>;\n listTraces: handleUnaryCall<ListTracesRequest, ListTracesResponse>;\n getTrace: handleUnaryCall<GetTraceRequest, GetTraceResponse>;\n getOperation: handleUnaryCall<GetOperationRequest, GetOperationResponse>;\n getPayload: handleUnaryCall<GetPayloadRequest, GetPayloadResponse>;\n queryLogs: handleUnaryCall<QueryLogsRequest, QueryLogsResponse>;\n queryMetrics: handleUnaryCall<QueryMetricsRequest, QueryMetricsResponse>;\n}\n\nexport interface TelemetryClient extends Client {\n report(): ClientDuplexStream<TelemetryBatch, TelemetryAck>;\n report(options: Partial<CallOptions>): ClientDuplexStream<TelemetryBatch, TelemetryAck>;\n report(metadata: Metadata, options?: Partial<CallOptions>): ClientDuplexStream<TelemetryBatch, TelemetryAck>;\n listTraces(\n request: ListTracesRequest,\n callback: (error: ServiceError | null, response: ListTracesResponse) => void,\n ): ClientUnaryCall;\n listTraces(\n request: ListTracesRequest,\n metadata: Metadata,\n callback: (error: ServiceError | null, response: ListTracesResponse) => void,\n ): ClientUnaryCall;\n listTraces(\n request: ListTracesRequest,\n metadata: Metadata,\n options: Partial<CallOptions>,\n callback: (error: ServiceError | null, response: ListTracesResponse) => void,\n ): ClientUnaryCall;\n getTrace(\n request: GetTraceRequest,\n callback: (error: ServiceError | null, response: GetTraceResponse) => void,\n ): ClientUnaryCall;\n getTrace(\n request: GetTraceRequest,\n metadata: Metadata,\n callback: (error: ServiceError | null, response: GetTraceResponse) => void,\n ): ClientUnaryCall;\n getTrace(\n request: GetTraceRequest,\n metadata: Metadata,\n options: Partial<CallOptions>,\n callback: (error: ServiceError | null, response: GetTraceResponse) => void,\n ): ClientUnaryCall;\n getOperation(\n request: GetOperationRequest,\n callback: (error: ServiceError | null, response: GetOperationResponse) => void,\n ): ClientUnaryCall;\n getOperation(\n request: GetOperationRequest,\n metadata: Metadata,\n callback: (error: ServiceError | null, response: GetOperationResponse) => void,\n ): ClientUnaryCall;\n getOperation(\n request: GetOperationRequest,\n metadata: Metadata,\n options: Partial<CallOptions>,\n callback: (error: ServiceError | null, response: GetOperationResponse) => void,\n ): ClientUnaryCall;\n getPayload(\n request: GetPayloadRequest,\n callback: (error: ServiceError | null, response: GetPayloadResponse) => void,\n ): ClientUnaryCall;\n getPayload(\n request: GetPayloadRequest,\n metadata: Metadata,\n callback: (error: ServiceError | null, response: GetPayloadResponse) => void,\n ): ClientUnaryCall;\n getPayload(\n request: GetPayloadRequest,\n metadata: Metadata,\n options: Partial<CallOptions>,\n callback: (error: ServiceError | null, response: GetPayloadResponse) => void,\n ): ClientUnaryCall;\n queryLogs(\n request: QueryLogsRequest,\n callback: (error: ServiceError | null, response: QueryLogsResponse) => void,\n ): ClientUnaryCall;\n queryLogs(\n request: QueryLogsRequest,\n metadata: Metadata,\n callback: (error: ServiceError | null, response: QueryLogsResponse) => void,\n ): ClientUnaryCall;\n queryLogs(\n request: QueryLogsRequest,\n metadata: Metadata,\n options: Partial<CallOptions>,\n callback: (error: ServiceError | null, response: QueryLogsResponse) => void,\n ): ClientUnaryCall;\n queryMetrics(\n request: QueryMetricsRequest,\n callback: (error: ServiceError | null, response: QueryMetricsResponse) => void,\n ): ClientUnaryCall;\n queryMetrics(\n request: QueryMetricsRequest,\n metadata: Metadata,\n callback: (error: ServiceError | null, response: QueryMetricsResponse) => void,\n ): ClientUnaryCall;\n queryMetrics(\n request: QueryMetricsRequest,\n metadata: Metadata,\n options: Partial<CallOptions>,\n callback: (error: ServiceError | null, response: QueryMetricsResponse) => void,\n ): ClientUnaryCall;\n}\n\nexport const TelemetryClient = makeGenericClientConstructor(\n TelemetryService,\n \"servicebridge.v1.Telemetry\",\n) as unknown as {\n new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): TelemetryClient;\n service: typeof TelemetryService;\n serviceName: string;\n};\n\ntype Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;\n\ntype DeepPartial<T> = T extends Builtin ? T\n : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>\n : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>\n : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }\n : Partial<T>;\n\ntype KeysOfUnion<T> = T extends T ? keyof T : never;\ntype Exact<P, I extends P> = P extends Builtin ? P\n : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };\n\nfunction longToNumber(int64: { toString(): string }): number {\n const num = globalThis.Number(int64.toString());\n if (num > globalThis.Number.MAX_SAFE_INTEGER) {\n throw new globalThis.Error(\"Value is larger than Number.MAX_SAFE_INTEGER\");\n }\n if (num < globalThis.Number.MIN_SAFE_INTEGER) {\n throw new globalThis.Error(\"Value is smaller than Number.MIN_SAFE_INTEGER\");\n }\n return num;\n}\n\ninterface MessageFns<T> {\n encode(message: T, writer?: BinaryWriter): BinaryWriter;\n decode(input: BinaryReader | Uint8Array, length?: number): T;\n create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;\n fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;\n}\n","// trace-context.ts — UUID-based trace context (ADR T-017).\n// traceId and parentOpId are RFC 9562 UUID strings.\n// @internal — см. ./README.md\n\nimport { uuidv7 } from \"uuidv7\";\n\n/** All-zeros UUID used as sentinel parentOpId for root operations. */\nexport const ZERO_OP_ID = \"00000000-0000-0000-0000-000000000000\";\n\nexport interface TraceContext {\n\ttraceId: string;\n\tparentOpId: string;\n}\n\n/** Mint a new root trace context with a fresh UUIDv7 traceId. */\nexport function mintRootContext(): TraceContext {\n\treturn {\n\t\ttraceId: uuidv7(),\n\t\tparentOpId: ZERO_OP_ID,\n\t};\n}\n\n/**\n * Derive a child context: inherits traceId, sets parentOpId to newOpId.\n * Use when a parent operation (newOpId) spawns a nested call and needs\n * to propagate the trace with the parent as the new context root.\n */\nexport function childContext(\n\tparent: TraceContext,\n\tnewOpId: string,\n): TraceContext {\n\treturn {\n\t\ttraceId: parent.traceId,\n\t\tparentOpId: newOpId,\n\t};\n}\n","// body-capture.ts — serialize an HTTP request/response body into the raw-JSON\n// payload bytes the runtime stores verbatim (mirrors runtime\n// telemetry.ContractRawJSON). HTTP bodies have no proto schema, so they are\n// captured as-is and rendered without proto decoding.\n// @internal — см. ../README.md\n\n/** Contract-hash marker for already-JSON payloads. Must equal the runtime's\n * telemetry.ContractRawJSON so DecodePayload returns the bytes verbatim. */\nexport const RAW_JSON_CONTRACT = \"raw/json\";\n\nconst encoder = new TextEncoder();\n\n/**\n * Best-effort serialize an HTTP body to bytes for payload capture. Returns\n * null when there is nothing worth capturing (empty / `{}` / unserializable),\n * so bodyless requests (e.g. GET) don't emit empty Input payloads.\n */\nexport function bodyToBytes(body: unknown): Uint8Array | null {\n\tif (body === undefined || body === null) return null;\n\tif (body instanceof Uint8Array) return body.byteLength ? body : null;\n\tif (typeof body === \"string\") {\n\t\tconst s = body.trim();\n\t\tif (!s || s === \"{}\" || s === \"null\") return null;\n\t\treturn encoder.encode(body);\n\t}\n\ttry {\n\t\tconst json = JSON.stringify(body);\n\t\tif (!json || json === \"{}\" || json === \"null\") return null;\n\t\treturn encoder.encode(json);\n\t} catch {\n\t\treturn null;\n\t}\n}\n","// wire-trace.ts — X-SB-Trace header parse and format.\n// Format: \"<traceId>-<parentOpId>\" where both are canonical RFC 9562 UUID\n// strings. Matches runtime/internal/telemetry/header.go (T-017 / proto\n// contract). UUID itself contains '-', so the separator is identified by\n// position (36) rather than indexOf.\n// @internal — см. ./README.md\n\n// UUID pattern: 8-4-4-4-12 hex chars, case-insensitive.\nconst UUID_RE =\n\t/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\n// Canonical UUID string length: 36 chars. Header total: 36 + 1 + 36 = 73.\nconst UUID_LEN = 36;\nconst HEADER_LEN = UUID_LEN + 1 + UUID_LEN;\n\nexport interface ParsedXSbTrace {\n\ttraceId: string;\n\tparentOpId: string;\n}\n\n/**\n * Parse the X-SB-Trace header value.\n * Returns null on any malformed input — caller must mint a new root context.\n */\nexport function parseXSbTrace(\n\tvalue: string | null | undefined,\n): ParsedXSbTrace | null {\n\tif (!value) return null;\n\tif (value.length !== HEADER_LEN) return null;\n\tif (value[UUID_LEN] !== \"-\") return null;\n\tconst traceId = value.slice(0, UUID_LEN);\n\tconst parentOpId = value.slice(UUID_LEN + 1);\n\tif (!UUID_RE.test(traceId) || !UUID_RE.test(parentOpId)) return null;\n\treturn { traceId, parentOpId };\n}\n\n/**\n * Format a trace context as the X-SB-Trace header value.\n */\nexport function formatXSbTrace(traceId: string, parentOpId: string): string {\n\treturn `${traceId}-${parentOpId}`;\n}\n","// trace-wrap.ts — общий helper для HTTP plugins.\n// Парсит X-SB-Trace header в TraceContext; при отсутствии/невалидном — мин’ит новый root.\n// @internal — см. ../README.md.\n\nimport {\n\tmintRootContext,\n\ttype TraceContext,\n} from \"../../telemetry/trace-context\";\nimport { parseXSbTrace } from \"../../telemetry/wire-trace\";\n\n/**\n * Парсит входящий X-SB-Trace header. Возвращает propagated context или\n * свежий root, если header отсутствует/невалиден. Никогда не throw'ит.\n */\nexport function contextFromXSbTrace(\n\theader: string | null | undefined,\n): TraceContext {\n\tif (header == null) return mintRootContext();\n\tconst parsed = parseXSbTrace(header);\n\tif (parsed == null) return mintRootContext();\n\treturn parsed;\n}\n","/**\n * Resolve the host that an SDK instance advertises as its public HTTP server\n * (ADR 0001). Mirrors `resolveAdvertise` semantics in src/connection, but for\n * the HTTP plane:\n *\n * 1. explicit `host` argument → used as-is\n * 2. fallback \"127.0.0.1\" → одноразовый console.warn\n *\n * @internal — потребляется только интеграциями.\n */\n\nlet _warned = false;\n\n/** Сбрасывает warn-флаг (для тестов). */\nexport function _resetHostWarn(): void {\n\t_warned = false;\n}\n\nexport function resolveHttpAdvertiseHost(explicit?: string): string {\n\tif (explicit && explicit.length > 0) return explicit;\n\tif (!_warned) {\n\t\t_warned = true;\n\t\tconsole.warn(\n\t\t\t\"[ServiceBridge] http advertise host not configured — falling back to 127.0.0.1. \" +\n\t\t\t\t\"Pass { host } to the HTTP plugin for cross-host reachability.\",\n\t\t);\n\t}\n\treturn \"127.0.0.1\";\n}\n","import type { Hono } from \"hono\";\nimport type { ServiceBridge } from \"../../connection/service-bridge\";\nimport { runWithTrace } from \"../../telemetry/context\";\nimport { Channel, HttpHandle, Status } from \"../../telemetry/ops\";\nimport { bodyToBytes, RAW_JSON_CONTRACT } from \"../_common/body-capture\";\nimport { contextFromXSbTrace } from \"../_common/trace-wrap\";\nimport { resolveHttpAdvertiseHost } from \"../endpoint\";\n\n/**\n * Endpoint, на котором фактически слушает Hono-сервер (Bun.serve / @hono/node-server / Deno).\n * `port` обязателен — Hono агностичен к серверу и не запускает сокет сам.\n * `host` опционален: дефолт через `resolveHttpAdvertiseHost()`.\n *\n * @public — см. ./README.md\n */\nexport interface HonoEndpoint {\n\thost?: string;\n\tport: number;\n}\n\n/**\n * Собирает роуты из `app.routes` Hono и кладёт их в `sb.routes`. Не публикует\n * endpoint — это делает `attachHono`. Полезно как нижний слой для тестов.\n *\n * @internal\n */\nexport function collectHonoRoutes(app: Hono, sb: ServiceBridge): void {\n\t// Hono.routes: { method: string, path: string, handler: Function }[]\n\tfor (const r of app.routes) {\n\t\tif (typeof r.method !== \"string\" || typeof r.path !== \"string\") continue;\n\t\t// Hono ставит method \"ALL\" когда вызвали app.all(...) — раскладывать\n\t\t// в конкретные методы у нас нет (зависит от runtime), пропускаем.\n\t\tif (r.method.toUpperCase() === \"ALL\") continue;\n\t\tsb.routes.add({\n\t\t\tmethod: r.method.toUpperCase(),\n\t\t\tpattern: r.path,\n\t\t\tsource: \"hono\",\n\t\t});\n\t}\n}\n\n/**\n * Подключает Hono-приложение к `ServiceBridge`: сразу собирает роуты из\n * `app.routes` и регистрирует HTTP-endpoint (`host:port`) через\n * `RouteCollector.publishHttp`. Если `attachHono` вызван ДО `sb.start()` —\n * triggerRestart no-op, endpoint попадёт в первый `RegisterRequest`\n * естественным путём. После `sb.start()` — restart Registry-watch стрима.\n *\n * Hono сам не запускает сервер: пользователь поднимает `Bun.serve` /\n * `@hono/node-server` / Deno вручную. `port` должен совпадать с тем, что\n * передан в сервер.\n *\n * @public — см. ./README.md\n */\nexport function attachHono(\n\tapp: Hono,\n\tsb: ServiceBridge,\n\tendpoint: HonoEndpoint,\n): void {\n\tcollectHonoRoutes(app, sb);\n\tconst host = resolveHttpAdvertiseHost(endpoint.host);\n\tsb.routes.publishHttp({ host, port: endpoint.port });\n\tinstallHonoTracing(app, sb);\n}\n\nconst TRACE_FLAG = Symbol.for(\"servicebridge.hono.trace\");\n\nfunction installHonoTracing(app: Hono, sb: ServiceBridge): void {\n\t// biome-ignore lint/suspicious/noExplicitAny: app не хранит произвольные поля в типах\n\tconst tagged = app as any;\n\tif (tagged[TRACE_FLAG]) return;\n\ttagged[TRACE_FLAG] = true;\n\n\t// Hono.use(...) после регистрации роутов не догоняет — порядок матчит.\n\t// Поэтому оборачиваем сам fetch: парсим X-SB-Trace + запускаем downstream\n\t// chain в runWithTrace, чтобы handler и downstream user-code видели ALS,\n\t// и эмитим HTTP.HANDLE op (start/end по response.status).\n\tconst origFetch = app.fetch.bind(app);\n\t// biome-ignore lint/suspicious/noExplicitAny: env/executionCtx — рантайм-зависимы\n\t(app as any).fetch = async (req: Request, env?: any, executionCtx?: any) => {\n\t\tconst ctx = contextFromXSbTrace(req.headers.get(\"x-sb-trace\"));\n\t\tconst url = new URL(req.url);\n\t\tconst businessKey =\n\t\t\treq.headers.get(\"idempotency-key\") ?? `${req.method} ${url.pathname}`;\n\t\t// Clone the request up front so reading its body for capture never\n\t\t// consumes the stream the route handler will read.\n\t\tconst reqClone = req.clone();\n\t\treturn runWithTrace(ctx, async () => {\n\t\t\tconst handle = sb.telemetry.startOp({\n\t\t\t\tchannel: Channel.HTTP,\n\t\t\t\tkind: HttpHandle,\n\t\t\t\tsubject: `http.handle:${req.method}/${url.pathname}`,\n\t\t\t\tbusinessKey,\n\t\t\t});\n\t\t\tconst captureBodies = async (res: Response) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst inBytes = bodyToBytes(await reqClone.text());\n\t\t\t\t\tif (inBytes) handle.captureIn(inBytes, RAW_JSON_CONTRACT);\n\t\t\t\t} catch {\n\t\t\t\t\t// unreadable request body — skip IN capture\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst outBytes = bodyToBytes(await res.clone().text());\n\t\t\t\t\tif (outBytes) handle.captureOut(outBytes, RAW_JSON_CONTRACT);\n\t\t\t\t} catch {\n\t\t\t\t\t// unreadable response body — skip OUT capture\n\t\t\t\t}\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tconst res = (await origFetch(req, env, executionCtx)) as Response;\n\t\t\t\tawait captureBodies(res);\n\t\t\t\tif (res.status >= 500) handle.end(Status.ERROR, `HTTP ${res.status}`);\n\t\t\t\telse if (res.status >= 400)\n\t\t\t\t\thandle.end(Status.ERROR, `HTTP ${res.status}`);\n\t\t\t\telse handle.end(Status.SUCCESS);\n\t\t\t\treturn res;\n\t\t\t} catch (err) {\n\t\t\t\thandle.end(Status.ERROR, (err as Error).message);\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t});\n\t};\n}\n"],"mappings":";AAIA,SAAS,yBAAyB;AAO3B,IAAM,MAAM,IAAI,kBAAgC;AAMhD,SAAS,aAAgB,KAAmB,IAAgB;AAClE,SAAO,IAAI,IAAI,KAAK,EAAE;AACvB;;;ACdA,SAAS,UAAAA,eAAc;;;ACEvB,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EASE;AAAA,OAIK;AA+TP,SAAS,2BAA2C;AAClD,SAAO,EAAE,KAAK,QAAW,MAAM,QAAW,SAAS,QAAW,UAAU,OAAU;AACpF;AAEO,IAAM,iBAA6C;AAAA,EACxD,OAAO,SAAyB,SAAuB,IAAI,aAAa,GAAiB;AACvF,QAAI,QAAQ,QAAQ,QAAW;AAC7B,cAAQ,OAAO,QAAQ,KAAK,OAAO,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,KAAK;AAAA,IAC7D;AACA,QAAI,QAAQ,SAAS,QAAW;AAC9B,eAAS,OAAO,QAAQ,MAAM,OAAO,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,KAAK;AAAA,IAC/D;AACA,QAAI,QAAQ,YAAY,QAAW;AACjC,kBAAY,OAAO,QAAQ,SAAS,OAAO,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,KAAK;AAAA,IACrE;AACA,QAAI,QAAQ,aAAa,QAAW;AAClC,mBAAa,OAAO,QAAQ,UAAU,OAAO,OAAO,EAAE,EAAE,KAAK,CAAC,EAAE,KAAK;AAAA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AAI,IAAI,GAAG;AAC3B,UAAM,cACL,IAAI,QAAQ,IAAI,iBAAiB,KAAK,GAAG,IAAI,MAAM,IAAI,IAAI,QAAQ;AAGpE,UAAM,WAAW,IAAI,MAAM;AAC3B,WAAO,aAAa,KAAK,YAAY;AACpC,YAAM,SAAS,GAAG,UAAU,QAAQ;AAAA,QACnC;AAAA,QACA,MAAM;AAAA,QACN,SAAS,eAAe,IAAI,MAAM,IAAI,IAAI,QAAQ;AAAA,QAClD;AAAA,MACD,CAAC;AACD,YAAM,gBAAgB,OAAO,QAAkB;AAC9C,YAAI;AACH,gBAAM,UAAU,YAAY,MAAM,SAAS,KAAK,CAAC;AACjD,cAAI,QAAS,QAAO,UAAU,SAAS,iBAAiB;AAAA,QACzD,QAAQ;AAAA,QAER;AACA,YAAI;AACH,gBAAM,WAAW,YAAY,MAAM,IAAI,MAAM,EAAE,KAAK,CAAC;AACrD,cAAI,SAAU,QAAO,WAAW,UAAU,iBAAiB;AAAA,QAC5D,QAAQ;AAAA,QAER;AAAA,MACD;AACA,UAAI;AACH,cAAM,MAAO,MAAM,UAAU,KAAK,KAAK,YAAY;AACnD,cAAM,cAAc,GAAG;AACvB,YAAI,IAAI,UAAU,IAAK,QAAO,mBAAkB,QAAQ,IAAI,MAAM,EAAE;AAAA,iBAC3D,IAAI,UAAU;AACtB,iBAAO,mBAAkB,QAAQ,IAAI,MAAM,EAAE;AAAA,YACzC,QAAO,mBAAkB;AAC9B,eAAO;AAAA,MACR,SAAS,KAAK;AACb,eAAO,mBAAmB,IAAc,OAAO;AAC/C,cAAM;AAAA,MACP;AAAA,IACD,CAAC;AAAA,EACF;AACD;","names":["uuidv7"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { A as AdvertiseConfig, C as CallOpts, a as CatchupPolicy, b as ConnectedEvent, c as CronTrigger, D as DeclaredDep, d as DelayedTrigger, e as DisconnectedEvent, E as EventDomain, I as Identity, f as IntervalTrigger, J as JobDomain, g as JobHandler, h as JobHandlerCtx, i as JobOpts, M as MethodDescriptor, j as MethodType, O as OverlapPolicy, P as PolicyViolationEvent, k as PublishOpts, R as ReconnectingEvent, l as RetryOpts, m as RetryPolicy, n as RpcDomain, o as RpcHandlerOpts, S as SchemaSpec, p as ServiceBridge, q as ServiceBridgeError, r as ServiceBridgeOptions, s as ServiceDeps, T as Trigger, t as TypedClient, W as WorkflowDomain, u as WorkflowHandlerOpts } from './service-bridge-CPmirNES.js';
|
|
2
|
+
import '@grpc/grpc-js';
|
|
3
|
+
import '@bufbuild/protobuf/wire';
|
|
4
|
+
|
|
5
|
+
declare class InvalidEventNameError extends Error {
|
|
6
|
+
readonly name = "InvalidEventNameError";
|
|
7
|
+
constructor(eventName: string);
|
|
8
|
+
}
|
|
9
|
+
declare class OutboxFullError extends Error {
|
|
10
|
+
readonly name = "OutboxFullError";
|
|
11
|
+
constructor(cap: number);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare class RpcAccessDeniedError extends Error {
|
|
15
|
+
readonly serviceName: string;
|
|
16
|
+
readonly methodName: string;
|
|
17
|
+
readonly reason: string;
|
|
18
|
+
constructor(serviceName: string, methodName: string, reason: string);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare class WorkflowAccessDeniedError extends Error {
|
|
22
|
+
readonly workflowName: string;
|
|
23
|
+
readonly reason: string;
|
|
24
|
+
constructor(workflowName: string, reason: string);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { InvalidEventNameError, OutboxFullError, RpcAccessDeniedError, WorkflowAccessDeniedError };
|