@semiont/core 0.5.10 → 0.5.12

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;
@@ -3334,6 +3343,15 @@ interface components {
3334
3343
  domain: string;
3335
3344
  tags: components["schemas"]["TagCategory"][];
3336
3345
  };
3346
+ /** @description Bus command to rebuild the graph projection from the event log — the whole graph when resourceId is absent, one resource when present. Served by the Weaver; replaces direct rebuild access, which does not survive the Weaver's container split. */
3347
+ WeaveRebuildCommand: {
3348
+ /** @description Correlation id for request/reply matching, set by busRequest so the ok/failed reply routes back. */
3349
+ correlationId?: string;
3350
+ /** @description When present, rebuild only this resource; otherwise clear and rebuild the entire graph. */
3351
+ resourceId?: string;
3352
+ /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
3353
+ _userId?: string;
3354
+ };
3337
3355
  /** @description Bus command to create a cloned resource from a clone token. */
3338
3356
  YieldCloneCreateCommand: {
3339
3357
  correlationId: string;
@@ -3776,6 +3794,22 @@ type BindUpdateBodyCommand = components['schemas']['BindUpdateBodyCommand'] & {
3776
3794
  * - Commands/reads/results/UI: OpenAPI schema refs — plain strings
3777
3795
  * - void: UI-only signals with no payload
3778
3796
  */
3797
+ /**
3798
+ * Viewport-space rectangle of a clicked annotation element — runtime-only
3799
+ * view geometry riding UI events (never wire vocabulary; deliberately not in
3800
+ * the OpenAPI schemas). Structurally satisfied by a DOM `DOMRect`, spelled
3801
+ * out here because this package compiles without the DOM lib.
3802
+ */
3803
+ interface AnchorRect {
3804
+ x: number;
3805
+ y: number;
3806
+ width: number;
3807
+ height: number;
3808
+ top: number;
3809
+ right: number;
3810
+ bottom: number;
3811
+ left: number;
3812
+ }
3779
3813
  type EventMap = {
3780
3814
  'yield:created': StoredEvent<EventOfType<'yield:created'>>;
3781
3815
  'yield:cloned': StoredEvent<EventOfType<'yield:cloned'>>;
@@ -3841,6 +3875,10 @@ type EventMap = {
3841
3875
  correlationId?: string;
3842
3876
  };
3843
3877
  'mark:unarchive-failed': components['schemas']['CommandError'];
3878
+ 'mark:update-entity-types-ok': {
3879
+ correlationId?: string;
3880
+ };
3881
+ 'mark:update-entity-types-failed': components['schemas']['CommandError'];
3844
3882
  'mark:body-update-failed': components['schemas']['CommandError'];
3845
3883
  'mark:select-comment': components['schemas']['SelectionData'];
3846
3884
  'mark:select-tag': components['schemas']['SelectionData'];
@@ -3852,10 +3890,6 @@ type EventMap = {
3852
3890
  'mark:assist-request': components['schemas']['MarkAssistRequestEvent'];
3853
3891
  'mark:assist-cancelled': void;
3854
3892
  '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
3893
  'frame:entity-type-added': StoredEvent<EventOfType<'frame:entity-type-added'>>;
3860
3894
  'frame:tag-schema-added': StoredEvent<EventOfType<'frame:tag-schema-added'>>;
3861
3895
  'frame:add-entity-type': components['schemas']['FrameAddEntityTypeCommand'];
@@ -3897,22 +3931,46 @@ type EventMap = {
3897
3931
  } & components['schemas']['CommandError'];
3898
3932
  'gather:annotation-progress': components['schemas']['GatherProgress'];
3899
3933
  'browse:resource-requested': components['schemas']['BrowseResourceRequest'];
3900
- 'browse:resource-result': components['schemas']['BrowseResourceResult'];
3934
+ 'browse:resource-result': {
3935
+ correlationId: string;
3936
+ response: Omit<components['schemas']['GetResourceResponse'], 'resource' | 'annotations' | 'entityReferences'> & {
3937
+ resource: ResourceDescriptor;
3938
+ annotations: Annotation[];
3939
+ entityReferences: Annotation[];
3940
+ };
3941
+ };
3901
3942
  'browse:resource-failed': {
3902
3943
  correlationId: string;
3903
3944
  } & components['schemas']['CommandError'];
3904
3945
  'browse:resources-requested': components['schemas']['BrowseResourcesRequest'];
3905
- 'browse:resources-result': components['schemas']['BrowseResourcesResult'];
3946
+ 'browse:resources-result': {
3947
+ correlationId: string;
3948
+ response: Omit<components['schemas']['ListResourcesResponse'], 'resources'> & {
3949
+ resources: ResourceDescriptor[];
3950
+ };
3951
+ };
3906
3952
  'browse:resources-failed': {
3907
3953
  correlationId: string;
3908
3954
  } & components['schemas']['CommandError'];
3909
3955
  'browse:annotations-requested': components['schemas']['BrowseAnnotationsRequest'];
3910
- 'browse:annotations-result': components['schemas']['BrowseAnnotationsResult'];
3956
+ 'browse:annotations-result': {
3957
+ correlationId: string;
3958
+ response: Omit<components['schemas']['GetAnnotationsResponse'], 'annotations'> & {
3959
+ annotations: Annotation[];
3960
+ };
3961
+ };
3911
3962
  'browse:annotations-failed': {
3912
3963
  correlationId: string;
3913
3964
  } & components['schemas']['CommandError'];
3914
3965
  'browse:annotation-requested': components['schemas']['BrowseAnnotationRequest'];
3915
- 'browse:annotation-result': components['schemas']['BrowseAnnotationResult'];
3966
+ 'browse:annotation-result': {
3967
+ correlationId: string;
3968
+ response: Omit<components['schemas']['GetAnnotationResponse'], 'annotation' | 'resource' | 'resolvedResource'> & {
3969
+ annotation: Annotation;
3970
+ resource: ResourceDescriptor | null;
3971
+ resolvedResource: ResourceDescriptor | null;
3972
+ };
3973
+ };
3916
3974
  'browse:annotation-failed': {
3917
3975
  correlationId: string;
3918
3976
  } & components['schemas']['CommandError'];
@@ -3949,17 +4007,26 @@ type EventMap = {
3949
4007
  'browse:tag-schemas-failed': {
3950
4008
  correlationId: string;
3951
4009
  } & components['schemas']['CommandError'];
4010
+ 'browse:agents-requested': components['schemas']['BrowseAgentsRequest'];
4011
+ 'browse:agents-result': components['schemas']['BrowseAgentsResult'];
4012
+ 'browse:agents-failed': {
4013
+ correlationId: string;
4014
+ } & components['schemas']['CommandError'];
3952
4015
  'browse:directory-requested': components['schemas']['BrowseDirectoryRequest'];
3953
4016
  'browse:directory-result': components['schemas']['BrowseDirectoryResult'];
3954
4017
  'browse:directory-failed': {
3955
4018
  correlationId: string;
3956
4019
  path: string;
3957
4020
  } & components['schemas']['CommandError'];
3958
- 'browse:click': components['schemas']['BrowseClickEvent'];
4021
+ 'browse:click': components['schemas']['BrowseClickEvent'] & {
4022
+ anchorRect?: AnchorRect;
4023
+ };
3959
4024
  'browse:reference-navigate': components['schemas']['BrowseReferenceNavigateEvent'];
3960
4025
  'browse:entity-type-clicked': components['schemas']['BrowseEntityTypeClickedEvent'];
3961
4026
  'panel:toggle': components['schemas']['BrowsePanelToggleEvent'];
3962
- 'panel:open': components['schemas']['BrowsePanelOpenEvent'];
4027
+ 'panel:open': components['schemas']['BrowsePanelOpenEvent'] & {
4028
+ anchorRect?: AnchorRect;
4029
+ };
3963
4030
  'panel:close': void;
3964
4031
  'shell:sidebar-toggle': void;
3965
4032
  'tabs:close': components['schemas']['BrowseResourceCloseEvent'];
@@ -4007,6 +4074,31 @@ type EventMap = {
4007
4074
  };
4008
4075
  };
4009
4076
  'job:cancel-failed': components['schemas']['CommandError'];
4077
+ /**
4078
+ * Emitted by the Weaver after applying an event (or a batch's last event)
4079
+ * for a resource to the graph. `sequenceNumber` is the resource-stream
4080
+ * sequence of the last applied event. Folded by `WeaveProgress`
4081
+ * (make-meaning) into the backend-local applied map that the
4082
+ * `whenApplied` barrier awaits. In-process signal today; crosses the
4083
+ * bus gateway after WEAVER-ISOLATION.
4084
+ */
4085
+ 'weave:applied': {
4086
+ resourceId: string;
4087
+ sequenceNumber: number;
4088
+ };
4089
+ 'smelt:settled': {
4090
+ resourceId: string;
4091
+ contentChecksum: string;
4092
+ outcome: 'indexed' | 'skipped';
4093
+ };
4094
+ 'weave:rebuild': components['schemas']['WeaveRebuildCommand'];
4095
+ 'weave:rebuild-ok': {
4096
+ correlationId?: string;
4097
+ };
4098
+ 'weave:rebuild-failed': {
4099
+ correlationId?: string;
4100
+ message: string;
4101
+ };
4010
4102
  'settings:theme-changed': components['schemas']['SettingsThemeChangedEvent'];
4011
4103
  'settings:line-numbers-toggled': void;
4012
4104
  'settings:locale-changed': components['schemas']['SettingsLocaleChangedEvent'];
@@ -4147,6 +4239,8 @@ declare const CHANNEL_SCHEMAS: {
4147
4239
  readonly 'mark:archive-failed': "CommandError";
4148
4240
  readonly 'mark:unarchive-ok': null;
4149
4241
  readonly 'mark:unarchive-failed': "CommandError";
4242
+ readonly 'mark:update-entity-types-ok': null;
4243
+ readonly 'mark:update-entity-types-failed': "CommandError";
4150
4244
  readonly 'mark:body-update-failed': "CommandError";
4151
4245
  readonly 'frame:entity-type-add-ok': null;
4152
4246
  readonly 'frame:entity-type-add-failed': "CommandError";
@@ -4162,10 +4256,6 @@ declare const CHANNEL_SCHEMAS: {
4162
4256
  readonly 'mark:assist-request': "MarkAssistRequestEvent";
4163
4257
  readonly 'mark:assist-cancelled': null;
4164
4258
  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
4259
  readonly 'bind:initiate': "BindInitiateCommand";
4170
4260
  readonly 'bind:update-body': "BindUpdateBodyCommand";
4171
4261
  readonly 'bind:body-updated': "BindBodyUpdated";
@@ -4213,14 +4303,17 @@ declare const CHANNEL_SCHEMAS: {
4213
4303
  readonly 'browse:tag-schemas-requested': "BrowseTagSchemasRequest";
4214
4304
  readonly 'browse:tag-schemas-result': "BrowseTagSchemasResult";
4215
4305
  readonly 'browse:tag-schemas-failed': null;
4306
+ readonly 'browse:agents-requested': "BrowseAgentsRequest";
4307
+ readonly 'browse:agents-result': "BrowseAgentsResult";
4308
+ readonly 'browse:agents-failed': null;
4216
4309
  readonly 'browse:directory-requested': "BrowseDirectoryRequest";
4217
4310
  readonly 'browse:directory-result': "BrowseDirectoryResult";
4218
4311
  readonly 'browse:directory-failed': null;
4219
- readonly 'browse:click': "BrowseClickEvent";
4312
+ readonly 'browse:click': null;
4220
4313
  readonly 'browse:reference-navigate': "BrowseReferenceNavigateEvent";
4221
4314
  readonly 'browse:entity-type-clicked': "BrowseEntityTypeClickedEvent";
4222
4315
  readonly 'panel:toggle': "BrowsePanelToggleEvent";
4223
- readonly 'panel:open': "BrowsePanelOpenEvent";
4316
+ readonly 'panel:open': null;
4224
4317
  readonly 'panel:close': null;
4225
4318
  readonly 'shell:sidebar-toggle': null;
4226
4319
  readonly 'tabs:close': "BrowseResourceCloseEvent";
@@ -4256,6 +4349,11 @@ declare const CHANNEL_SCHEMAS: {
4256
4349
  readonly 'settings:line-numbers-toggled': null;
4257
4350
  readonly 'settings:locale-changed': "SettingsLocaleChangedEvent";
4258
4351
  readonly 'settings:hover-delay-changed': "SettingsHoverDelayChangedEvent";
4352
+ readonly 'weave:applied': null;
4353
+ readonly 'smelt:settled': null;
4354
+ readonly 'weave:rebuild': "WeaveRebuildCommand";
4355
+ readonly 'weave:rebuild-ok': null;
4356
+ readonly 'weave:rebuild-failed': null;
4259
4357
  readonly 'stream-connected': null;
4260
4358
  readonly 'replay-window-exceeded': null;
4261
4359
  readonly 'bus:resume-gap': null;
@@ -4280,6 +4378,14 @@ type EmittableChannel = {
4280
4378
  type Selector = components['schemas']['TextPositionSelector'] | components['schemas']['TextQuoteSelector'] | components['schemas']['SvgSelector'] | components['schemas']['FragmentSelector'];
4281
4379
  type GatheredContext = components['schemas']['GatheredContext'];
4282
4380
  type SelectionData = components['schemas']['SelectionData'];
4381
+ type JobType = components['schemas']['JobType'];
4382
+ /**
4383
+ * One entry of the collaborator directory (`browse:agents-result`): a typed
4384
+ * `Agent` plus, for software agents drawn from the KB's worker config, the
4385
+ * job types it serves. Persons and actor-role-only agents omit
4386
+ * `servesJobTypes`. See .plans/COLLABORATOR-DIRECTORY.md.
4387
+ */
4388
+ type CollaboratorEntry = components['schemas']['CollaboratorEntry'];
4283
4389
 
4284
4390
  /**
4285
4391
  * Event Type Guards and Extraction Utilities
@@ -4480,8 +4586,7 @@ declare class ScopedEventBus {
4480
4586
  * idleTimeoutMs — How long after the last flush before returning to passthrough.
4481
4587
  * 200ms is a good default. Must be >= burstWindowMs.
4482
4588
  *
4483
- * See: BATCH-GRAPH-CONSUMER-RX.md for design rationale.
4484
- * See: packages/graph/docs/ARCHITECTURE.md for graph consumer context.
4589
+ * See: packages/graph/docs/ARCHITECTURE.md for Weaver context.
4485
4590
  */
4486
4591
 
4487
4592
  interface BurstBufferOptions {
@@ -4565,7 +4670,7 @@ declare function burstBuffer<T>(options: BurstBufferOptions): OperatorFunction<T
4565
4670
  *
4566
4671
  * Use RxJS `groupBy(keyFn) + concatMap(...)` when the work arrives as an
4567
4672
  * **event stream** that a component subscribes to once at startup. This
4568
- * is how `Smelter`, `GraphDBConsumer`, and `Gatherer` serialize their own
4673
+ * is how `Smelter`, `Weaver`, and `Gatherer` serialize their own
4569
4674
  * per-resource work — see their implementations in `packages/make-meaning`.
4570
4675
  *
4571
4676
  * Both patterns solve the same logical problem ("serialize work per key").
@@ -4658,7 +4763,7 @@ declare function busLog(op: BusOp, channel: string, payload: unknown, scope?: st
4658
4763
  * Annotation body utilities
4659
4764
  *
4660
4765
  * These are the matcher primitives used by the `mark:body-updated` event
4661
- * replay path (ViewMaterializer and GraphDBConsumer) to apply add/remove/
4766
+ * replay path (ViewMaterializer and Weaver) to apply add/remove/
4662
4767
  * replace operations against an annotation body.
4663
4768
  */
4664
4769
 
@@ -5401,6 +5506,10 @@ declare const BUS_OPERATIONS: {
5401
5506
  readonly result: "browse:tag-schemas-result";
5402
5507
  readonly failure: "browse:tag-schemas-failed";
5403
5508
  };
5509
+ readonly 'browse:agents-requested': {
5510
+ readonly result: "browse:agents-result";
5511
+ readonly failure: "browse:agents-failed";
5512
+ };
5404
5513
  readonly 'browse:directory-requested': {
5405
5514
  readonly result: "browse:directory-result";
5406
5515
  readonly failure: "browse:directory-failed";
@@ -5462,10 +5571,18 @@ declare const BUS_OPERATIONS: {
5462
5571
  readonly result: "mark:unarchive-ok";
5463
5572
  readonly failure: "mark:unarchive-failed";
5464
5573
  };
5574
+ readonly 'mark:update-entity-types': {
5575
+ readonly result: "mark:update-entity-types-ok";
5576
+ readonly failure: "mark:update-entity-types-failed";
5577
+ };
5465
5578
  readonly 'match:search-requested': {
5466
5579
  readonly result: "match:search-results";
5467
5580
  readonly failure: "match:search-failed";
5468
5581
  };
5582
+ readonly 'weave:rebuild': {
5583
+ readonly result: "weave:rebuild-ok";
5584
+ readonly failure: "weave:rebuild-failed";
5585
+ };
5469
5586
  readonly 'yield:create': {
5470
5587
  readonly result: "yield:create-ok";
5471
5588
  readonly failure: "yield:create-failed";
@@ -7102,4 +7219,4 @@ interface GraphViews {
7102
7219
  declare function deriveViews(graph: KnowledgeGraph, mainResourceId: string, focalAnnotationId?: string): GraphViews;
7103
7220
 
7104
7221
  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 };
7222
+ export type { AccessToken, AnchorConfidence, AnchorMethod, AnchorRect, 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,16 +258,21 @@ 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,
267
267
  // { correlationId; path } & CommandError
268
- "browse:click": "BrowseClickEvent",
268
+ "browse:click": null,
269
+ // includes runtime `anchorRect?: AnchorRect`
269
270
  "browse:reference-navigate": "BrowseReferenceNavigateEvent",
270
271
  "browse:entity-type-clicked": "BrowseEntityTypeClickedEvent",
271
272
  // ── SHELL (app-scoped UI events, fire on SemiontBrowser bus) ────
272
273
  "panel:toggle": "BrowsePanelToggleEvent",
273
- "panel:open": "BrowsePanelOpenEvent",
274
+ "panel:open": null,
275
+ // includes runtime `anchorRect?: AnchorRect`
274
276
  "panel:close": null,
275
277
  // void
276
278
  "shell:sidebar-toggle": null,
@@ -316,6 +318,16 @@ var CHANNEL_SCHEMAS = {
316
318
  // void
317
319
  "settings:locale-changed": "SettingsLocaleChangedEvent",
318
320
  "settings:hover-delay-changed": "SettingsHoverDelayChangedEvent",
321
+ // ── WEAVE FLOW ──────────────────────────────────────────────────
322
+ "weave:applied": null,
323
+ // { resourceId; sequenceNumber }
324
+ "smelt:settled": null,
325
+ // { resourceId; contentChecksum; outcome }
326
+ "weave:rebuild": "WeaveRebuildCommand",
327
+ "weave:rebuild-ok": null,
328
+ // { correlationId }
329
+ "weave:rebuild-failed": null,
330
+ // { correlationId; message }
319
331
  // ── SSE infrastructure ──────────────────────────────────────────
320
332
  "stream-connected": null,
321
333
  // Record<string, never>
@@ -366,6 +378,7 @@ var BUS_OPERATIONS = {
366
378
  "browse:referenced-by-requested": { result: "browse:referenced-by-result", failure: "browse:referenced-by-failed" },
367
379
  "browse:entity-types-requested": { result: "browse:entity-types-result", failure: "browse:entity-types-failed" },
368
380
  "browse:tag-schemas-requested": { result: "browse:tag-schemas-result", failure: "browse:tag-schemas-failed" },
381
+ "browse:agents-requested": { result: "browse:agents-result", failure: "browse:agents-failed" },
369
382
  "browse:directory-requested": { result: "browse:directory-result", failure: "browse:directory-failed" },
370
383
  // dormant — backend handler complete, no client caller yet (annotation-detail capability)
371
384
  "browse:annotation-context-requested": { result: "browse:annotation-context-result", failure: "browse:annotation-context-failed" },
@@ -389,9 +402,13 @@ var BUS_OPERATIONS = {
389
402
  "mark:delete": { result: "mark:delete-ok", failure: "mark:delete-failed" },
390
403
  "mark:archive": { result: "mark:archive-ok", failure: "mark:archive-failed" },
391
404
  "mark:unarchive": { result: "mark:unarchive-ok", failure: "mark:unarchive-failed" },
405
+ "mark:update-entity-types": { result: "mark:update-entity-types-ok", failure: "mark:update-entity-types-failed" },
392
406
  // ── MATCH ───────────────────────────────────────────────────────
393
407
  // take-1 dressed as an Observable in the SDK; no progress channel
394
408
  "match:search-requested": { result: "match:search-results", failure: "match:search-failed" },
409
+ // ── WEAVE ───────────────────────────────────────────────────────
410
+ // Graph-projection rebuild, served by the Weaver (WEAVER-ISOLATION D3)
411
+ "weave:rebuild": { result: "weave:rebuild-ok", failure: "weave:rebuild-failed" },
395
412
  // ── YIELD ───────────────────────────────────────────────────────
396
413
  // live in-process (resource-operations.ts emits + awaits via race()); the
397
414
  // client also .on()-subscribes -ok for cache invalidation
@@ -1200,7 +1217,13 @@ async function busRequest(bus, operation, payload, timeoutMs = 3e4) {
1200
1217
  })
1201
1218
  );
1202
1219
  const resultPromise = firstValueFrom(result$);
1203
- await bus.emit(operation, fullPayload);
1220
+ try {
1221
+ await bus.emit(operation, fullPayload);
1222
+ } catch (emitError) {
1223
+ resultPromise.catch(() => {
1224
+ });
1225
+ throw emitError;
1226
+ }
1204
1227
  const result = await resultPromise;
1205
1228
  if (!result.ok) {
1206
1229
  throw result.error;