@semiont/core 0.5.10 → 0.5.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2295,8 +2295,7 @@ interface components {
2295
2295
  };
2296
2296
  JobStatusResponse: {
2297
2297
  jobId: string;
2298
- /** @enum {string} */
2299
- type: "reference-annotation" | "generation" | "highlight-annotation" | "assessment-annotation" | "comment-annotation" | "tag-annotation";
2298
+ type: components["schemas"]["JobType"];
2300
2299
  /** @enum {string} */
2301
2300
  status: "pending" | "running" | "complete" | "failed" | "cancelled";
2302
2301
  userId: string;
@@ -2651,6 +2650,17 @@ interface components {
2651
2650
  * @enum {string}
2652
2651
  */
2653
2652
  BodyPurpose: "assessing" | "bookmarking" | "classifying" | "commenting" | "describing" | "editing" | "highlighting" | "identifying" | "linking" | "moderating" | "questioning" | "replying" | "tagging";
2653
+ /** @description Request to browse the KB's collaborator directory (its declared Agents) */
2654
+ BrowseAgentsRequest: {
2655
+ correlationId: string;
2656
+ };
2657
+ /** @description Result of browsing the collaborator directory */
2658
+ BrowseAgentsResult: {
2659
+ correlationId: string;
2660
+ response: {
2661
+ agents: components["schemas"]["CollaboratorEntry"][];
2662
+ };
2663
+ };
2654
2664
  /** @description Request to browse the history of an annotation */
2655
2665
  BrowseAnnotationHistoryRequest: {
2656
2666
  correlationId: string;
@@ -2819,6 +2829,12 @@ interface components {
2819
2829
  correlationId: string;
2820
2830
  response: components["schemas"]["GetTagSchemasResponse"];
2821
2831
  };
2832
+ /** @description One collaborator in the KB's directory: a W3C Agent plus, for software agents declared in the KB's worker inference config, the job types it serves. Actor-role-only agents (gatherer/matcher) and Persons omit servesJobTypes. */
2833
+ CollaboratorEntry: {
2834
+ agent: components["schemas"]["Agent"];
2835
+ /** @description Job types this agent is declared to serve (from the KB's workers.* config sections). Absent for Persons and for agents declared only under actor roles. */
2836
+ servesJobTypes?: components["schemas"]["JobType"][];
2837
+ };
2822
2838
  /** @description W3C Web Annotation FragmentSelector for media fragment identifiers (RFC 3778 for PDFs) */
2823
2839
  FragmentSelector: {
2824
2840
  /** @enum {string} */
@@ -2988,8 +3004,7 @@ interface components {
2988
3004
  correlationId: string;
2989
3005
  /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
2990
3006
  _userId?: string;
2991
- /** @enum {string} */
2992
- jobType: "reference-annotation" | "highlight-annotation" | "assessment-annotation" | "comment-annotation" | "tag-annotation" | "generation";
3007
+ jobType: components["schemas"]["JobType"];
2993
3008
  resourceId: string;
2994
3009
  params: {
2995
3010
  [key: string]: unknown;
@@ -3182,10 +3197,6 @@ interface components {
3182
3197
  categories?: string[];
3183
3198
  };
3184
3199
  };
3185
- /** @description Emitted when the mark click action changes */
3186
- MarkClickChangedEvent: {
3187
- action: string;
3188
- };
3189
3200
  /** @description Bus command to create an annotation on a resource. */
3190
3201
  MarkCreateCommand: {
3191
3202
  /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
@@ -3230,20 +3241,16 @@ interface components {
3230
3241
  };
3231
3242
  /** @description Emitted when the user requests a new mark (annotation) on a resource */
3232
3243
  MarkRequestedEvent: {
3244
+ /** @description The '@id' of the resource the mark belongs to (W3C target.source). Routes the event to the right viewer/state unit when a host mounts many viewers on one session. */
3245
+ source: string;
3233
3246
  /** @description One or more W3C selectors */
3234
3247
  selector: components["schemas"]["TextPositionSelector"] | components["schemas"]["TextQuoteSelector"] | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"] | (components["schemas"]["TextPositionSelector"] | components["schemas"]["TextQuoteSelector"] | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"])[];
3235
3248
  motivation: components["schemas"]["Motivation"];
3236
3249
  };
3237
- /** @description Emitted when the active mark selection changes */
3238
- MarkSelectionChangedEvent: {
3239
- motivation: string | null;
3240
- };
3241
- /** @description Emitted when the mark shape changes */
3242
- MarkShapeChangedEvent: {
3243
- shape: string;
3244
- };
3245
3250
  /** @description Emitted when a mark is submitted with its annotation body */
3246
3251
  MarkSubmitEvent: {
3252
+ /** @description The '@id' of the resource the mark belongs to (W3C target.source). Routes the submit to the state unit bound to that resource — without it, N mounted units each create the annotation (N copies on N resources). */
3253
+ source: string;
3247
3254
  motivation: components["schemas"]["Motivation"];
3248
3255
  /** @description One or more W3C selectors */
3249
3256
  selector: components["schemas"]["TextPositionSelector"] | components["schemas"]["TextQuoteSelector"] | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"] | (components["schemas"]["TextPositionSelector"] | components["schemas"]["TextQuoteSelector"] | components["schemas"]["SvgSelector"] | components["schemas"]["FragmentSelector"])[];
@@ -3271,6 +3278,8 @@ interface components {
3271
3278
  };
3272
3279
  /** @description Bus command to replace the entity types on a resource. */
3273
3280
  MarkUpdateEntityTypesCommand: {
3281
+ /** @description Correlation id for request/reply matching, set by the SDK's busRequest so the confirmed-write ack/failure routes back. */
3282
+ correlationId?: string;
3274
3283
  resourceId: string;
3275
3284
  /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
3276
3285
  _userId?: string;
@@ -3841,6 +3850,10 @@ type EventMap = {
3841
3850
  correlationId?: string;
3842
3851
  };
3843
3852
  'mark:unarchive-failed': components['schemas']['CommandError'];
3853
+ 'mark:update-entity-types-ok': {
3854
+ correlationId?: string;
3855
+ };
3856
+ 'mark:update-entity-types-failed': components['schemas']['CommandError'];
3844
3857
  'mark:body-update-failed': components['schemas']['CommandError'];
3845
3858
  'mark:select-comment': components['schemas']['SelectionData'];
3846
3859
  'mark:select-tag': components['schemas']['SelectionData'];
@@ -3852,10 +3865,6 @@ type EventMap = {
3852
3865
  'mark:assist-request': components['schemas']['MarkAssistRequestEvent'];
3853
3866
  'mark:assist-cancelled': void;
3854
3867
  'mark:progress-dismiss': void;
3855
- 'mark:mode-toggled': void;
3856
- 'mark:selection-changed': components['schemas']['MarkSelectionChangedEvent'];
3857
- 'mark:click-changed': components['schemas']['MarkClickChangedEvent'];
3858
- 'mark:shape-changed': components['schemas']['MarkShapeChangedEvent'];
3859
3868
  'frame:entity-type-added': StoredEvent<EventOfType<'frame:entity-type-added'>>;
3860
3869
  'frame:tag-schema-added': StoredEvent<EventOfType<'frame:tag-schema-added'>>;
3861
3870
  'frame:add-entity-type': components['schemas']['FrameAddEntityTypeCommand'];
@@ -3949,6 +3958,11 @@ type EventMap = {
3949
3958
  'browse:tag-schemas-failed': {
3950
3959
  correlationId: string;
3951
3960
  } & components['schemas']['CommandError'];
3961
+ 'browse:agents-requested': components['schemas']['BrowseAgentsRequest'];
3962
+ 'browse:agents-result': components['schemas']['BrowseAgentsResult'];
3963
+ 'browse:agents-failed': {
3964
+ correlationId: string;
3965
+ } & components['schemas']['CommandError'];
3952
3966
  'browse:directory-requested': components['schemas']['BrowseDirectoryRequest'];
3953
3967
  'browse:directory-result': components['schemas']['BrowseDirectoryResult'];
3954
3968
  'browse:directory-failed': {
@@ -4147,6 +4161,8 @@ declare const CHANNEL_SCHEMAS: {
4147
4161
  readonly 'mark:archive-failed': "CommandError";
4148
4162
  readonly 'mark:unarchive-ok': null;
4149
4163
  readonly 'mark:unarchive-failed': "CommandError";
4164
+ readonly 'mark:update-entity-types-ok': null;
4165
+ readonly 'mark:update-entity-types-failed': "CommandError";
4150
4166
  readonly 'mark:body-update-failed': "CommandError";
4151
4167
  readonly 'frame:entity-type-add-ok': null;
4152
4168
  readonly 'frame:entity-type-add-failed': "CommandError";
@@ -4162,10 +4178,6 @@ declare const CHANNEL_SCHEMAS: {
4162
4178
  readonly 'mark:assist-request': "MarkAssistRequestEvent";
4163
4179
  readonly 'mark:assist-cancelled': null;
4164
4180
  readonly 'mark:progress-dismiss': null;
4165
- readonly 'mark:mode-toggled': null;
4166
- readonly 'mark:selection-changed': "MarkSelectionChangedEvent";
4167
- readonly 'mark:click-changed': "MarkClickChangedEvent";
4168
- readonly 'mark:shape-changed': "MarkShapeChangedEvent";
4169
4181
  readonly 'bind:initiate': "BindInitiateCommand";
4170
4182
  readonly 'bind:update-body': "BindUpdateBodyCommand";
4171
4183
  readonly 'bind:body-updated': "BindBodyUpdated";
@@ -4213,6 +4225,9 @@ declare const CHANNEL_SCHEMAS: {
4213
4225
  readonly 'browse:tag-schemas-requested': "BrowseTagSchemasRequest";
4214
4226
  readonly 'browse:tag-schemas-result': "BrowseTagSchemasResult";
4215
4227
  readonly 'browse:tag-schemas-failed': null;
4228
+ readonly 'browse:agents-requested': "BrowseAgentsRequest";
4229
+ readonly 'browse:agents-result': "BrowseAgentsResult";
4230
+ readonly 'browse:agents-failed': null;
4216
4231
  readonly 'browse:directory-requested': "BrowseDirectoryRequest";
4217
4232
  readonly 'browse:directory-result': "BrowseDirectoryResult";
4218
4233
  readonly 'browse:directory-failed': null;
@@ -4280,6 +4295,14 @@ type EmittableChannel = {
4280
4295
  type Selector = components['schemas']['TextPositionSelector'] | components['schemas']['TextQuoteSelector'] | components['schemas']['SvgSelector'] | components['schemas']['FragmentSelector'];
4281
4296
  type GatheredContext = components['schemas']['GatheredContext'];
4282
4297
  type SelectionData = components['schemas']['SelectionData'];
4298
+ type JobType = components['schemas']['JobType'];
4299
+ /**
4300
+ * One entry of the collaborator directory (`browse:agents-result`): a typed
4301
+ * `Agent` plus, for software agents drawn from the KB's worker config, the
4302
+ * job types it serves. Persons and actor-role-only agents omit
4303
+ * `servesJobTypes`. See .plans/COLLABORATOR-DIRECTORY.md.
4304
+ */
4305
+ type CollaboratorEntry = components['schemas']['CollaboratorEntry'];
4283
4306
 
4284
4307
  /**
4285
4308
  * Event Type Guards and Extraction Utilities
@@ -5401,6 +5424,10 @@ declare const BUS_OPERATIONS: {
5401
5424
  readonly result: "browse:tag-schemas-result";
5402
5425
  readonly failure: "browse:tag-schemas-failed";
5403
5426
  };
5427
+ readonly 'browse:agents-requested': {
5428
+ readonly result: "browse:agents-result";
5429
+ readonly failure: "browse:agents-failed";
5430
+ };
5404
5431
  readonly 'browse:directory-requested': {
5405
5432
  readonly result: "browse:directory-result";
5406
5433
  readonly failure: "browse:directory-failed";
@@ -5462,6 +5489,10 @@ declare const BUS_OPERATIONS: {
5462
5489
  readonly result: "mark:unarchive-ok";
5463
5490
  readonly failure: "mark:unarchive-failed";
5464
5491
  };
5492
+ readonly 'mark:update-entity-types': {
5493
+ readonly result: "mark:update-entity-types-ok";
5494
+ readonly failure: "mark:update-entity-types-failed";
5495
+ };
5465
5496
  readonly 'match:search-requested': {
5466
5497
  readonly result: "match:search-results";
5467
5498
  readonly failure: "match:search-failed";
@@ -7102,4 +7133,4 @@ interface GraphViews {
7102
7133
  declare function deriveViews(graph: KnowledgeGraph, mainResourceId: string, focalAnnotationId?: string): GraphViews;
7103
7134
 
7104
7135
  export { AUTHORABLE_MEDIA_TYPES, BRIDGED_CHANNELS, BusRequestError, CHANNEL_SCHEMAS, CONTEXT_FULL_WEIGHT, CONTEXT_PARTIAL_WEIGHT, ConfigurationError, ConflictError, EMBEDDABLE_MEDIA_TYPES, EventBus, JWTTokenSchema, LOCALES, MEDIA_TYPES, NotFoundError, PERSISTED_EVENT_TYPES, POSITION_WEIGHT_MAX, POSITION_WINDOW, RESOURCE_BROADCAST_TYPES, ScopedEventBus, ScriptError, SemiontError, UnauthorizedError, ValidationError, accessToken, agentToDid, anchorAnnotation, annotationId, annotationUri, applyBodyOperations, assembleAnnotation, authCode, baseMediaType, baseUrl, buildContentCache, burstBuffer, busLog, busLogEnabled, busRequest, capabilitiesOf, cloneToken, createCircleSvg, createFragmentSelector, createPolygonSvg, createRectangleSvg, createTomlConfigLoader, decodeRepresentation, decodeWithCharset, deriveViews, didToAgent, email, entityType, errField, extensionForMediaType, extractBoundingBox, extractCharset, extractContext, findBestTextMatch, findBodyItem, formatLocaleDisplay, generateUuid, getAllLocaleCodes, getAllPlatformTypes, getAnnotationExactText, getAnnotationUriFromEvent, getBodySource, getBodyType, getChecksum, getCommentText, getCreator, getDerivedFrom, getExactText, getFragmentSelector, getLanguage, getLocaleEnglishName, getLocaleInfo, getLocaleNativeName, getNodeEncoding, getPageFromFragment, getPrimaryMediaType, getPrimaryRepresentation, getPrimarySelector, getResourceEntityTypes, getResourceId, getStorageUri, getSvgSelector, getTargetSelector, getTargetSource, getTextPositionSelector, getTextQuoteSelector, googleCredential, hasTargetSelector, isAnnotationId, isArchived, isArray, isAssessment, isBodyResolved, isBoolean, isComment, isDefined, isDraft, isEventRelatedToAnnotation, isFunction, isHighlight, isNull, isNullish, isNumber, isObject, isReference, isResolvedReference, isResourceId, isStoredEvent, isString, isStubReference, isSupportedMediaType, isTag, isUndefined, isValidEmail, isValidPlatformType, jobId, loadTomlConfig, mcpToken, mediaTypeForExtension, normalizeCoordinates, normalizeText, parseEnvironment, parseFragmentSelector, parseSvgSelector, reconcileSelector, refreshToken, resourceAnnotationUri, resourceId, resourceUri, scaleSvgToNative, searchQuery, serializePerKey, setBusLogTraceIdProvider, softwareToAgent, textExtractionOf, userDID, userId, userToAgent, userToDid, validateData, validateEnvironment, validateSvgMarkup, verifyPosition };
7105
- export type { AccessToken, AnchorConfidence, AnchorMethod, AnchorSelectors, AnchorStrategy, AnchoringModel, Annotation, AnnotationCategory, AnnotationId, AnnotationUri, AnthropicProviderConfig, AppConfig, AssembledAnnotation, AuthCode, BackendDownload, BackendServiceConfig, BaseUrl, BodyItem, BodyItemIdentity, BodyOperation, BoundingBox, Brand, BridgedChannel, BurstBufferOptions, BusOp, BusRequestErrorCode, BusRequestPrimitive, CloneToken, ConnectionState, ContentCache, ContentFormat, CreateAnnotationInternal, DatabaseServiceConfig, Email, EmbeddingServiceConfig, EmittableChannel, EntityType, EntityTypeStats, Environment, EnvironmentConfig, EventBase, EventInput, EventMap, EventMetadata, EventName, EventOfType, EventQuery, EventSignature, FragmentSelector, FrontendServiceConfig, GatheredContext, GoogleAuthRequest, GoogleCredential, GraphConnection, GraphDatabaseType, GraphPath, GraphServiceConfig, GraphViews, HealthCheckResponse, IBackendOperations, IContentTransport, ITransport, InferenceProvidersConfig, JobId, ListUsersResponse, LlmSelectorInput, LocaleInfo, Logger, MCPToken, MatchQuality, McpServiceConfig, MediaTypeCapabilities, Motivation, OllamaProviderConfig, PdfCoordinate, PersistedEvent, PersistedEventType, PlatformType, Point, ProgressCallback, ProgressEvent, PutBinaryOptions, PutBinaryProgress, PutBinaryRequest, ReconciledSelector, RefreshToken, RenderMode, RenderedAnchor, ResourceAnnotationUri, ResourceAnnotations, ResourceBroadcastType, ResourceDescriptor, ResourceFilter, ResourceId, ResourceUri, SearchQuery, SelectionData, Selector, SemiontConfig, ServicePlatformConfig, ServicesConfig, SiteConfig, StateUnit, StatusResponse, StoredEvent, StoredEventLike, SupportedMediaType, SvgSelector, TagCategory, TagSchema, TextExtraction, TextPosition, TextPositionSelector, TextQuoteSelector, ActorInferenceConfig as TomlActorInferenceConfig, TomlFileReader, InferenceConfig as TomlInferenceConfig, WorkerInferenceConfig as TomlWorkerInferenceConfig, TransportErrorCode, UpdateResourceInput, UpdateUserRequest, UpdateUserResponse, UserDID, UserId, UserResponse, ValidationFailure, ValidationResult, ValidationSuccess, VectorsServiceConfig, components, operations, paths };
7136
+ export type { AccessToken, AnchorConfidence, AnchorMethod, AnchorSelectors, AnchorStrategy, AnchoringModel, Annotation, AnnotationCategory, AnnotationId, AnnotationUri, AnthropicProviderConfig, AppConfig, AssembledAnnotation, AuthCode, BackendDownload, BackendServiceConfig, BaseUrl, BodyItem, BodyItemIdentity, BodyOperation, BoundingBox, Brand, BridgedChannel, BurstBufferOptions, BusOp, BusRequestErrorCode, BusRequestPrimitive, CloneToken, CollaboratorEntry, ConnectionState, ContentCache, ContentFormat, CreateAnnotationInternal, DatabaseServiceConfig, Email, EmbeddingServiceConfig, EmittableChannel, EntityType, EntityTypeStats, Environment, EnvironmentConfig, EventBase, EventInput, EventMap, EventMetadata, EventName, EventOfType, EventQuery, EventSignature, FragmentSelector, FrontendServiceConfig, GatheredContext, GoogleAuthRequest, GoogleCredential, GraphConnection, GraphDatabaseType, GraphPath, GraphServiceConfig, GraphViews, HealthCheckResponse, IBackendOperations, IContentTransport, ITransport, InferenceProvidersConfig, JobId, JobType, ListUsersResponse, LlmSelectorInput, LocaleInfo, Logger, MCPToken, MatchQuality, McpServiceConfig, MediaTypeCapabilities, Motivation, OllamaProviderConfig, PdfCoordinate, PersistedEvent, PersistedEventType, PlatformType, Point, ProgressCallback, ProgressEvent, PutBinaryOptions, PutBinaryProgress, PutBinaryRequest, ReconciledSelector, RefreshToken, RenderMode, RenderedAnchor, ResourceAnnotationUri, ResourceAnnotations, ResourceBroadcastType, ResourceDescriptor, ResourceFilter, ResourceId, ResourceUri, SearchQuery, SelectionData, Selector, SemiontConfig, ServicePlatformConfig, ServicesConfig, SiteConfig, StateUnit, StatusResponse, StoredEvent, StoredEventLike, SupportedMediaType, SvgSelector, TagCategory, TagSchema, TextExtraction, TextPosition, TextPositionSelector, TextQuoteSelector, ActorInferenceConfig as TomlActorInferenceConfig, TomlFileReader, InferenceConfig as TomlInferenceConfig, WorkerInferenceConfig as TomlWorkerInferenceConfig, TransportErrorCode, UpdateResourceInput, UpdateUserRequest, UpdateUserResponse, UserDID, UserId, UserResponse, ValidationFailure, ValidationResult, ValidationSuccess, VectorsServiceConfig, components, operations, paths };
package/dist/index.js CHANGED
@@ -181,6 +181,8 @@ var CHANNEL_SCHEMAS = {
181
181
  "mark:archive-failed": "CommandError",
182
182
  "mark:unarchive-ok": null,
183
183
  "mark:unarchive-failed": "CommandError",
184
+ "mark:update-entity-types-ok": null,
185
+ "mark:update-entity-types-failed": "CommandError",
184
186
  "mark:body-update-failed": "CommandError",
185
187
  "frame:entity-type-add-ok": null,
186
188
  "frame:entity-type-add-failed": "CommandError",
@@ -199,11 +201,6 @@ var CHANNEL_SCHEMAS = {
199
201
  // void
200
202
  "mark:progress-dismiss": null,
201
203
  // void
202
- "mark:mode-toggled": null,
203
- // void
204
- "mark:selection-changed": "MarkSelectionChangedEvent",
205
- "mark:click-changed": "MarkClickChangedEvent",
206
- "mark:shape-changed": "MarkShapeChangedEvent",
207
204
  // ── BIND FLOW ───────────────────────────────────────────────────
208
205
  "bind:initiate": "BindInitiateCommand",
209
206
  "bind:update-body": "BindUpdateBodyCommand",
@@ -261,6 +258,9 @@ var CHANNEL_SCHEMAS = {
261
258
  "browse:tag-schemas-requested": "BrowseTagSchemasRequest",
262
259
  "browse:tag-schemas-result": "BrowseTagSchemasResult",
263
260
  "browse:tag-schemas-failed": null,
261
+ "browse:agents-requested": "BrowseAgentsRequest",
262
+ "browse:agents-result": "BrowseAgentsResult",
263
+ "browse:agents-failed": null,
264
264
  "browse:directory-requested": "BrowseDirectoryRequest",
265
265
  "browse:directory-result": "BrowseDirectoryResult",
266
266
  "browse:directory-failed": null,
@@ -366,6 +366,7 @@ var BUS_OPERATIONS = {
366
366
  "browse:referenced-by-requested": { result: "browse:referenced-by-result", failure: "browse:referenced-by-failed" },
367
367
  "browse:entity-types-requested": { result: "browse:entity-types-result", failure: "browse:entity-types-failed" },
368
368
  "browse:tag-schemas-requested": { result: "browse:tag-schemas-result", failure: "browse:tag-schemas-failed" },
369
+ "browse:agents-requested": { result: "browse:agents-result", failure: "browse:agents-failed" },
369
370
  "browse:directory-requested": { result: "browse:directory-result", failure: "browse:directory-failed" },
370
371
  // dormant — backend handler complete, no client caller yet (annotation-detail capability)
371
372
  "browse:annotation-context-requested": { result: "browse:annotation-context-result", failure: "browse:annotation-context-failed" },
@@ -389,6 +390,7 @@ var BUS_OPERATIONS = {
389
390
  "mark:delete": { result: "mark:delete-ok", failure: "mark:delete-failed" },
390
391
  "mark:archive": { result: "mark:archive-ok", failure: "mark:archive-failed" },
391
392
  "mark:unarchive": { result: "mark:unarchive-ok", failure: "mark:unarchive-failed" },
393
+ "mark:update-entity-types": { result: "mark:update-entity-types-ok", failure: "mark:update-entity-types-failed" },
392
394
  // ── MATCH ───────────────────────────────────────────────────────
393
395
  // take-1 dressed as an Observable in the SDK; no progress channel
394
396
  "match:search-requested": { result: "match:search-results", failure: "match:search-failed" },
@@ -1200,7 +1202,13 @@ async function busRequest(bus, operation, payload, timeoutMs = 3e4) {
1200
1202
  })
1201
1203
  );
1202
1204
  const resultPromise = firstValueFrom(result$);
1203
- await bus.emit(operation, fullPayload);
1205
+ try {
1206
+ await bus.emit(operation, fullPayload);
1207
+ } catch (emitError) {
1208
+ resultPromise.catch(() => {
1209
+ });
1210
+ throw emitError;
1211
+ }
1204
1212
  const result = await resultPromise;
1205
1213
  if (!result.ok) {
1206
1214
  throw result.error;