@burdenoff/be-sdk 2026.1021.5 → 2026.1021.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +87 -0
  2. package/dist/ai-credits/index.d.ts +3 -0
  3. package/dist/ai-credits/index.js +5 -0
  4. package/dist/ai-credits/index.js.map +1 -0
  5. package/dist/cache/index.js +2 -2
  6. package/dist/chunk-4KK6YJ46.js +41 -0
  7. package/dist/chunk-4KK6YJ46.js.map +1 -0
  8. package/dist/chunk-AE4PRE4N.js +731 -0
  9. package/dist/chunk-AE4PRE4N.js.map +1 -0
  10. package/dist/{chunk-HIO3DNKK.js → chunk-KCGJCY5U.js} +2 -2
  11. package/dist/{chunk-HIO3DNKK.js.map → chunk-KCGJCY5U.js.map} +1 -1
  12. package/dist/{chunk-AT52BRVL.js → chunk-OXGIVASV.js} +3 -3
  13. package/dist/{chunk-AT52BRVL.js.map → chunk-OXGIVASV.js.map} +1 -1
  14. package/dist/{chunk-V7QNQN7Y.js → chunk-PPFJTSHA.js} +3 -3
  15. package/dist/{chunk-V7QNQN7Y.js.map → chunk-PPFJTSHA.js.map} +1 -1
  16. package/dist/chunk-PYB2DKL2.js +435 -0
  17. package/dist/chunk-PYB2DKL2.js.map +1 -0
  18. package/dist/{chunk-4UABBBB4.js → chunk-QZG27OR7.js} +5 -4
  19. package/dist/chunk-QZG27OR7.js.map +1 -0
  20. package/dist/{chunk-YCSIHUYP.js → chunk-STYD3MOS.js} +3 -3
  21. package/dist/{chunk-YCSIHUYP.js.map → chunk-STYD3MOS.js.map} +1 -1
  22. package/dist/{chunk-VBUUEOHC.js → chunk-UCNTCCV6.js} +4 -39
  23. package/dist/chunk-UCNTCCV6.js.map +1 -0
  24. package/dist/{chunk-XUXSX5UX.js → chunk-X3MNBBOL.js} +3 -3
  25. package/dist/{chunk-XUXSX5UX.js.map → chunk-X3MNBBOL.js.map} +1 -1
  26. package/dist/{chunk-CJS6KURB.js → chunk-XJKVW34Q.js} +3 -3
  27. package/dist/{chunk-CJS6KURB.js.map → chunk-XJKVW34Q.js.map} +1 -1
  28. package/dist/{chunk-DTE2MHKE.js → chunk-Y2ZUUZNU.js} +3 -3
  29. package/dist/{chunk-DTE2MHKE.js.map → chunk-Y2ZUUZNU.js.map} +1 -1
  30. package/dist/{client-X4PGGWPO.js → client-WSFUJHLI.js} +4 -3
  31. package/dist/{client-X4PGGWPO.js.map → client-WSFUJHLI.js.map} +1 -1
  32. package/dist/export/index.js +5 -4
  33. package/dist/files/index.d.ts +3 -0
  34. package/dist/files/index.js +5 -0
  35. package/dist/files/index.js.map +1 -0
  36. package/dist/gateway/index.js +4 -3
  37. package/dist/gateway/security/index.js +1 -1
  38. package/dist/graph/index.js +1 -1
  39. package/dist/index-BjtgcJxt.d.ts +208 -0
  40. package/dist/index-DmxmEfAu.d.ts +145 -0
  41. package/dist/index.d.ts +2 -0
  42. package/dist/index.js +31 -28
  43. package/dist/index.js.map +1 -1
  44. package/dist/init/index.js +5 -4
  45. package/dist/prisma/index.js +2 -2
  46. package/dist/tags/index.js +1 -1
  47. package/dist/tracker/index.js +2 -2
  48. package/package.json +3 -3
  49. package/dist/chunk-4UABBBB4.js.map +0 -1
  50. package/dist/chunk-VBUUEOHC.js.map +0 -1
package/README.md CHANGED
@@ -137,6 +137,7 @@ await sdk.translation.upsertProductTranslations({
137
137
  - **platform**: Scale primitives (see below)
138
138
  - **validation**: User-field validators and the `@rbac` coverage guard (see below)
139
139
  - **tags**: Shared entity tagging over wspace-tags-svc (see below)
140
+ - **files**: Shared client for workspace blobs owned by wspace-files-svc (see below)
140
141
 
141
142
  ### RBAC coverage guard (`@burdenoff/be-sdk/validation`)
142
143
 
@@ -211,6 +212,92 @@ export const { Query, Mutation, types } = createEntityTagResolvers({
211
212
  });
212
213
  ```
213
214
 
215
+ ### Files client (`@burdenoff/be-sdk/files`)
216
+
217
+ wspace-files-svc owns every workspace blob. Services must not presign object storage
218
+ themselves or hold storage credentials: hand the bytes to `FilesClient` and persist only
219
+ the opaque `fileId`. Every call goes through the internal workspace gateway with the
220
+ CALLER's `x-actor-*` / `x-workspace-id`, so the File row is owned by the user who asked
221
+ for it and files-svc applies quota, folder access and read permission to that user. The
222
+ service must still authorize the action itself (its own `@rbac` plus a scoped row lookup).
223
+
224
+ - `uploadFile` runs the files-svc protocol: `initiateUpload` → presigned PUT (DIRECT) or
225
+ per-part PUTs + `registerUploadedPart` (MULTIPART, which files-svc picks above 5 MiB) →
226
+ `completeUpload` with the same `fileSize` string (required). The SHA-256 is declared at
227
+ both ends; a failed upload aborts its session.
228
+ - `requireFile` proves a caller-supplied `fileId` is an ACTIVE, actor-readable File in the
229
+ actor's workspace (throws `NOT_FOUND`, never a permission error) before you store it.
230
+ - `getDownloadUrl` mints a short-lived URL on demand (clamped to 60 s – 7 days, the S3
231
+ presign cap); never persist it. `downloadFile` / `downloadFileAsBase64` fetch the bytes
232
+ for server-side processing with a size cap. `deleteFile` trashes (or `permanent`).
233
+ - `FileReference` (`toFileReference`, `isFileReference`) is the JSON-safe pointer that node
234
+ outputs, attachments and evidence rows carry instead of inline base64.
235
+ - Only scalar `File` fields are read through the ROOT `getFile` field: files-svc's `File`
236
+ entity has no `__resolveReference`, so never select federated `file { name }` elsewhere.
237
+ - Errors are `FilesClientError` with a stable `code` (`NOT_FOUND`, `QUOTA_EXCEEDED`,
238
+ `TOO_LARGE`, `STORAGE_ERROR`, …) and `graphqlCode`.
239
+
240
+ ```typescript
241
+ import { FilesClient, toFileReference } from '@burdenoff/be-sdk/files';
242
+
243
+ const files = new FilesClient({ serviceName: 'wspace-vibecontrols-svc' });
244
+ const actor = { actorId: ctx.actorId, workspaceId: ctx.workspaceId };
245
+
246
+ const stored = await files.uploadFile(
247
+ { fileName: 'access-review.pdf', data: pdfBytes, mimeType: 'application/pdf', description: 'SOC 2 evidence' },
248
+ actor
249
+ );
250
+ await db.securityEvidence.update({ where: { id }, data: { fileId: stored.fileId } });
251
+
252
+ const url = await files.getDownloadUrl(evidence.fileId, actor, { expiresInSeconds: 300 });
253
+ const output = { attachment: toFileReference(stored) }; // workflow node output, no base64
254
+ ```
255
+
256
+ ### AI-credit meter (`@burdenoff/be-sdk/ai-credits`)
257
+
258
+ Cost-weighted, idempotent charging of a completed assistant turn, shared by every product
259
+ that meters its assistant (replaces the VibeControls `usage-billing.ts` and HealthyBowl
260
+ `ai-credit-usage.ts` copies).
261
+
262
+ - `charge` validates the report (session, message, model, integer non-negative token
263
+ counts, ≤ 2,000,000 per report), prices it server-side with global-billing
264
+ `quoteAiCredits` (cross-layer `GatewayClient`, `GLOBAL_PUBLIC_GATEWAY_URL`) and records
265
+ it with wspace-activity `trackUsage` on `<productId>.ai.credits` through the wspace
266
+ internal gateway (`WSPACE_INT_GATEWAY_URL`, `x-workspace-id`).
267
+ - Idempotent: the usage record's hash is `<prefix>:<sessionId>:<messageId>` (components
268
+ `%`/`:`-escaped), and activity's unique `usage_records.hash` makes a replay a no-op. The
269
+ default prefix is `<productId>:aicredit`; a product that already records under another
270
+ prefix must keep it (`aicredit` for VibeControls, `hb-assistant` for HealthyBowl), or a
271
+ retry across the deploy is charged twice.
272
+ - Only a malformed report throws (`AiCreditInputError`, map to `BAD_USER_INPUT`). Pricing
273
+ or recording failures never fail the user's turn: they return
274
+ `{ status: 'skipped', reason: 'NOT_PRICED' | 'ZERO_COST' | 'GUARD_REFUSED' | 'RECORD_FAILED' }`
275
+ and are logged. A null quote never charges an invented amount.
276
+ - `guard` is an optional pre-charge hook (e.g. a per-workspace report-rate ceiling); a guard
277
+ that throws fails open.
278
+ - `readUsage(workspaceId)` returns the enforced counter (all active assignment rows summed,
279
+ as `checkWorkspaceQuota` sums them), or null when unreachable / not provisioned.
280
+ - The charging GraphQL field takes the workspace from the gateway context, carries `@rbac`,
281
+ and must NOT carry `@usage(trackUsage: true)` — that would charge a second, flat amount.
282
+ A pre-flight gate is a separate `@usage(checkQuota: true, trackUsage: false)` field.
283
+
284
+ ```typescript
285
+ import { AiCreditMeter, isAiCreditInputError } from '@burdenoff/be-sdk/ai-credits';
286
+
287
+ const meter = new AiCreditMeter({ productId: 'vibecontrols', serviceName: 'wspace-vibecontrols-svc', hashPrefix: 'aicredit' });
288
+
289
+ const result = await meter.charge({
290
+ workspaceId: requireWorkspaceId(ctx.workspace?.id), // gateway context, never the payload
291
+ userId: ctx.actor?.id,
292
+ sessionId: input.sessionId,
293
+ messageId: input.messageId,
294
+ model: input.model,
295
+ inputTokens: input.inputTokens,
296
+ outputTokens: input.outputTokens,
297
+ });
298
+ if (result.status === 'skipped') logAudit(/* … */);
299
+ ```
300
+
214
301
  ### Platform Primitives (`@burdenoff/be-sdk/platform`)
215
302
 
216
303
  Reusable building blocks consumed fleet-wide as part of the scale refactor:
@@ -0,0 +1,3 @@
1
+ export { A as AI_CREDIT_MAX_TOKENS_PER_REPORT, a as AiCreditChargeGuard, b as AiCreditChargeInput, c as AiCreditChargeResult, d as AiCreditFetch, e as AiCreditGuardVerdict, f as AiCreditInputError, g as AiCreditInputErrorCode, h as AiCreditLogger, j as AiCreditMeter, k as AiCreditMeterOptions, l as AiCreditPricingTransport, m as AiCreditSkipReason, n as AiTokenUsageReport, o as AiTokenUsageValidationError, p as AiTokenUsageViolation, W as WorkspaceQuotaUsage, q as aiCreditIdempotencyHash, r as aiCreditQuotaName, s as defaultAiCreditHashPrefix, t as encodeAiCreditHashComponent, u as isAiCreditInputError, v as validateAiTokenUsage } from '../index-DmxmEfAu.js';
2
+ import '../types-B376RbyK.js';
3
+ import '../layer-GNAVXBMf.js';
@@ -0,0 +1,5 @@
1
+ export { AI_CREDIT_MAX_TOKENS_PER_REPORT, AiCreditInputError, AiCreditMeter, aiCreditIdempotencyHash, aiCreditQuotaName, defaultAiCreditHashPrefix, encodeAiCreditHashComponent, isAiCreditInputError, validateAiTokenUsage } from '../chunk-PYB2DKL2.js';
2
+ import '../chunk-RU266375.js';
3
+ import '../chunk-XE4OXN2W.js';
4
+ //# sourceMappingURL=index.js.map
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -1,6 +1,6 @@
1
- export { CacheFactory, CacheProviderType, MemoryCacheProvider, ValkeyGlideProvider, assertCacheEndpointConfigured, closeAllCaches, createCache, getCache, getValkeyClient, warnOnLayerDefaultEndpoint } from '../chunk-AT52BRVL.js';
2
- import '../chunk-KO2ZXZ7W.js';
1
+ export { CacheFactory, CacheProviderType, MemoryCacheProvider, ValkeyGlideProvider, assertCacheEndpointConfigured, closeAllCaches, createCache, getCache, getValkeyClient, warnOnLayerDefaultEndpoint } from '../chunk-OXGIVASV.js';
3
2
  import '../chunk-A5F6Z5UE.js';
3
+ import '../chunk-KO2ZXZ7W.js';
4
4
  import '../chunk-YFOHAHZE.js';
5
5
  import '../chunk-RU266375.js';
6
6
  import '../chunk-XE4OXN2W.js';
@@ -0,0 +1,41 @@
1
+ import { __name } from './chunk-XE4OXN2W.js';
2
+
3
+ // src/gateway/types.ts
4
+ var CircuitState = /* @__PURE__ */ (function(CircuitState2) {
5
+ CircuitState2["CLOSED"] = "CLOSED";
6
+ CircuitState2["OPEN"] = "OPEN";
7
+ CircuitState2["HALF_OPEN"] = "HALF_OPEN";
8
+ return CircuitState2;
9
+ })({});
10
+ var GatewayErrorType = /* @__PURE__ */ (function(GatewayErrorType2) {
11
+ GatewayErrorType2["NETWORK_ERROR"] = "NETWORK_ERROR";
12
+ GatewayErrorType2["TIMEOUT_ERROR"] = "TIMEOUT_ERROR";
13
+ GatewayErrorType2["CIRCUIT_OPEN"] = "CIRCUIT_OPEN";
14
+ GatewayErrorType2["GRAPHQL_ERROR"] = "GRAPHQL_ERROR";
15
+ GatewayErrorType2["UNKNOWN_ERROR"] = "UNKNOWN_ERROR";
16
+ return GatewayErrorType2;
17
+ })({});
18
+ var GatewayError = class _GatewayError extends Error {
19
+ static {
20
+ __name(this, "GatewayError");
21
+ }
22
+ type;
23
+ gatewayUrl;
24
+ statusCode;
25
+ graphqlErrors;
26
+ cause;
27
+ constructor(message, type, gatewayUrl, options) {
28
+ super(message);
29
+ this.name = "GatewayError";
30
+ this.type = type;
31
+ this.gatewayUrl = gatewayUrl;
32
+ this.statusCode = options?.statusCode;
33
+ this.graphqlErrors = options?.graphqlErrors;
34
+ this.cause = options?.cause;
35
+ Object.setPrototypeOf(this, _GatewayError.prototype);
36
+ }
37
+ };
38
+
39
+ export { CircuitState, GatewayError, GatewayErrorType };
40
+ //# sourceMappingURL=chunk-4KK6YJ46.js.map
41
+ //# sourceMappingURL=chunk-4KK6YJ46.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/gateway/types.ts"],"names":["CircuitState","GatewayErrorType","GatewayError","Error","type","gatewayUrl","statusCode","graphqlErrors","cause","message","options","name","Object","setPrototypeOf","prototype"],"mappings":";;;AA2EO,IAAKA,YAAAA,6BAAAA,aAAAA,EAAAA;;;;AAAAA,EAAAA,OAAAA,aAAAA;;AA8ML,IAAKC,gBAAAA,6BAAAA,iBAAAA,EAAAA;;;;;;AAAAA,EAAAA,OAAAA,iBAAAA;;AAWL,IAAMC,YAAAA,GAAN,MAAMA,aAAAA,SAAqBC,KAAAA,CAAAA;EApSlC;;;AAqSEC,EAAAA,IAAAA;AACAC,EAAAA,UAAAA;AACAC,EAAAA,UAAAA;AACAC,EAAAA,aAAAA;AACSC,EAAAA,KAAAA;EAET,WAAA,CACEC,OAAAA,EACAL,IAAAA,EACAC,UAAAA,EACAK,OAAAA,EAKA;AACA,IAAA,KAAA,CAAMD,OAAAA,CAAAA;AACN,IAAA,IAAA,CAAKE,IAAAA,GAAO,cAAA;AACZ,IAAA,IAAA,CAAKP,IAAAA,GAAOA,IAAAA;AACZ,IAAA,IAAA,CAAKC,UAAAA,GAAaA,UAAAA;AAClB,IAAA,IAAA,CAAKC,aAAaI,OAAAA,EAASJ,UAAAA;AAC3B,IAAA,IAAA,CAAKC,gBAAgBG,OAAAA,EAASH,aAAAA;AAC9B,IAAA,IAAA,CAAKC,QAAQE,OAAAA,EAASF,KAAAA;AACtBI,IAAAA,MAAAA,CAAOC,cAAAA,CAAe,IAAA,EAAMX,aAAAA,CAAaY,SAAS,CAAA;AACpD,EAAA;AACF","file":"chunk-4KK6YJ46.js","sourcesContent":["/**\n * Gateway Client Types\n *\n * Type definitions for the unified gateway client with\n * circuit breaker and retry logic.\n *\n * @module gateway/types\n * @category Gateway\n */\n\nimport type { ServiceLayer, CircuitBreakerConfig, GatewayRetryConfig, GatewayRequestHeaders } from '../types/layer.js';\n\n/**\n * Gateway client configuration\n */\nexport interface GatewayClientConfig {\n /**\n * Layer this client belongs to\n */\n layer: ServiceLayer;\n\n /**\n * Service name (for logging and headers)\n */\n serviceName: string;\n\n /**\n * Service identity for bypass headers\n * @default serviceName\n */\n serviceIdentity?: string;\n\n /**\n * Internal gateway URL (same layer M2M)\n * @default Resolved from layer defaults or environment\n */\n internalGatewayUrl?: string;\n\n /**\n * Cross-layer gateway URL (cross layer via public gateway)\n * @default Resolved from layer defaults or environment\n */\n crossLayerGatewayUrl?: string;\n\n /**\n * Request timeout in milliseconds\n * @default 30000 (30 seconds)\n */\n timeout?: number;\n\n /**\n * Circuit breaker configuration\n */\n circuitBreaker?: Partial<CircuitBreakerConfig>;\n\n /**\n * Retry configuration\n */\n retry?: Partial<GatewayRetryConfig>;\n\n /**\n * Enable request logging\n * @default true\n */\n enableLogging?: boolean;\n\n /**\n * Default headers to include in all requests\n */\n defaultHeaders?: GatewayRequestHeaders;\n}\n\n/**\n * Circuit breaker states\n */\nexport enum CircuitState {\n CLOSED = 'CLOSED',\n OPEN = 'OPEN',\n HALF_OPEN = 'HALF_OPEN',\n}\n\n/**\n * Circuit breaker instance interface\n */\nexport interface ICircuitBreaker {\n /**\n * Get current circuit state\n */\n getState(): CircuitState;\n\n /**\n * Record a successful call\n */\n recordSuccess(): void;\n\n /**\n * Record a failed call\n */\n recordFailure(): void;\n\n /**\n * Check if circuit allows calls\n */\n allowRequest(): boolean;\n\n /**\n * Force open the circuit\n */\n forceOpen(): void;\n\n /**\n * Force close the circuit\n */\n forceClose(): void;\n\n /**\n * Get circuit statistics\n */\n getStats(): CircuitBreakerStats;\n}\n\n/**\n * Circuit breaker statistics\n */\nexport interface CircuitBreakerStats {\n state: CircuitState;\n failures: number;\n successes: number;\n consecutiveFailures: number;\n lastFailureTime: number | null;\n lastSuccessTime: number | null;\n openedAt: number | null;\n}\n\n/**\n * GraphQL request options\n */\nexport interface GraphQLRequestOptions {\n /**\n * GraphQL query or mutation string\n */\n query: string;\n\n /**\n * GraphQL variables\n */\n variables?: Record<string, unknown>;\n\n /**\n * Operation name (for multi-operation documents)\n */\n operationName?: string;\n\n /**\n * Additional headers for this request\n */\n headers?: GatewayRequestHeaders;\n\n /**\n * Override timeout for this request\n */\n timeout?: number;\n\n /**\n * Skip circuit breaker for this request\n * @default false\n */\n skipCircuitBreaker?: boolean;\n\n /**\n * Skip retry logic for this request\n * @default false\n */\n skipRetry?: boolean;\n}\n\n/**\n * GraphQL response\n */\nexport interface GraphQLResponse<T = unknown> {\n /**\n * Response data\n */\n data?: T;\n\n /**\n * GraphQL errors\n */\n errors?: GraphQLError[];\n}\n\n/**\n * GraphQL error structure\n */\nexport interface GraphQLError {\n message: string;\n locations?: Array<{ line: number; column: number }>;\n path?: Array<string | number>;\n extensions?: Record<string, unknown>;\n}\n\n/**\n * Gateway client interface\n */\nexport interface IGatewayClient {\n /**\n * Execute internal (same layer) GraphQL query/mutation\n *\n * Uses internal gateway with bypass headers for M2M communication.\n *\n * @param options - Request options\n * @returns GraphQL response\n */\n internalQuery<T = unknown>(options: GraphQLRequestOptions): Promise<GraphQLResponse<T>>;\n\n /**\n * Execute cross-layer GraphQL query/mutation\n *\n * Uses public gateway for cross-layer communication.\n *\n * @param options - Request options\n * @returns GraphQL response\n */\n crossLayerQuery<T = unknown>(options: GraphQLRequestOptions): Promise<GraphQLResponse<T>>;\n\n /**\n * Execute GraphQL query/mutation with explicit gateway URL\n *\n * @param gatewayUrl - Gateway URL to use\n * @param options - Request options\n * @returns GraphQL response\n */\n query<T = unknown>(gatewayUrl: string, options: GraphQLRequestOptions): Promise<GraphQLResponse<T>>;\n\n /**\n * Get internal gateway circuit breaker\n */\n getInternalCircuitBreaker(): ICircuitBreaker;\n\n /**\n * Get cross-layer gateway circuit breaker\n */\n getCrossLayerCircuitBreaker(): ICircuitBreaker;\n\n /**\n * Get client health status\n */\n getHealthStatus(): GatewayClientHealth;\n\n /**\n * Update default headers\n */\n updateDefaultHeaders(headers: Partial<GatewayRequestHeaders>): void;\n}\n\n/**\n * Gateway client health status\n */\nexport interface GatewayClientHealth {\n /**\n * Internal gateway status\n */\n internal: {\n url: string;\n circuitState: CircuitState;\n stats: CircuitBreakerStats;\n };\n\n /**\n * Cross-layer gateway status\n */\n crossLayer: {\n url: string;\n circuitState: CircuitState;\n stats: CircuitBreakerStats;\n };\n}\n\n/**\n * Gateway error types\n */\nexport enum GatewayErrorType {\n NETWORK_ERROR = 'NETWORK_ERROR',\n TIMEOUT_ERROR = 'TIMEOUT_ERROR',\n CIRCUIT_OPEN = 'CIRCUIT_OPEN',\n GRAPHQL_ERROR = 'GRAPHQL_ERROR',\n UNKNOWN_ERROR = 'UNKNOWN_ERROR',\n}\n\n/**\n * Gateway error class\n */\nexport class GatewayError extends Error {\n type: GatewayErrorType;\n gatewayUrl: string;\n statusCode?: number;\n graphqlErrors?: GraphQLError[];\n override cause?: Error;\n\n constructor(\n message: string,\n type: GatewayErrorType,\n gatewayUrl: string,\n options?: {\n statusCode?: number;\n graphqlErrors?: GraphQLError[];\n cause?: Error;\n }\n ) {\n super(message);\n this.name = 'GatewayError';\n this.type = type;\n this.gatewayUrl = gatewayUrl;\n this.statusCode = options?.statusCode;\n this.graphqlErrors = options?.graphqlErrors;\n this.cause = options?.cause;\n Object.setPrototypeOf(this, GatewayError.prototype);\n }\n}\n\n/**\n * Request context for logging and tracing\n */\nexport interface RequestContext {\n /**\n * Request ID for tracing\n */\n requestId: string;\n\n /**\n * Actor ID making the request\n */\n actorId?: string;\n\n /**\n * Workspace ID context\n */\n workspaceId?: string;\n\n /**\n * Timestamp when request started\n */\n startTime: number;\n\n /**\n * Call type\n */\n callType: 'internal' | 'cross-layer' | 'direct';\n}\n"]}