@semiont/core 0.5.19 → 0.5.21
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 +74 -48
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/testing.d.ts +69 -47
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1865,6 +1865,20 @@ interface components {
|
|
|
1865
1865
|
BeckonSparkleEvent: {
|
|
1866
1866
|
annotationId: string;
|
|
1867
1867
|
};
|
|
1868
|
+
/** @description One edit to a linking annotation's body list: add or remove a body item, or replace an existing one. */
|
|
1869
|
+
BindBodyOperation: {
|
|
1870
|
+
/**
|
|
1871
|
+
* @description The type of body operation
|
|
1872
|
+
* @enum {string}
|
|
1873
|
+
*/
|
|
1874
|
+
op: "add" | "remove" | "replace";
|
|
1875
|
+
/** @description Body item for add operations */
|
|
1876
|
+
item?: components["schemas"]["AnnotationBody"];
|
|
1877
|
+
/** @description Previous body item for replace operations */
|
|
1878
|
+
oldItem?: components["schemas"]["AnnotationBody"];
|
|
1879
|
+
/** @description Replacement body item for replace operations */
|
|
1880
|
+
newItem?: components["schemas"]["AnnotationBody"];
|
|
1881
|
+
};
|
|
1868
1882
|
/** @description Void success reply emitted on the bind:body-updated channel after bind:update-body has been applied, matched to the originating command by correlationId. */
|
|
1869
1883
|
BindBodyUpdated: {
|
|
1870
1884
|
/** @description Correlation id echoed from the originating bind:update-body command so busRequest can match the reply. */
|
|
@@ -1891,20 +1905,8 @@ interface components {
|
|
|
1891
1905
|
annotationId: string;
|
|
1892
1906
|
/** @description Branded ResourceId of the resource the annotation belongs to */
|
|
1893
1907
|
resourceId: string;
|
|
1894
|
-
/** @description
|
|
1895
|
-
operations:
|
|
1896
|
-
/**
|
|
1897
|
-
* @description The type of body operation
|
|
1898
|
-
* @enum {string}
|
|
1899
|
-
*/
|
|
1900
|
-
op: "add" | "remove" | "replace";
|
|
1901
|
-
/** @description Body item for add operations */
|
|
1902
|
-
item?: components["schemas"]["AnnotationBody"];
|
|
1903
|
-
/** @description Previous body item for replace operations */
|
|
1904
|
-
oldItem?: components["schemas"]["AnnotationBody"];
|
|
1905
|
-
/** @description Replacement body item for replace operations */
|
|
1906
|
-
newItem?: components["schemas"]["AnnotationBody"];
|
|
1907
|
-
}[];
|
|
1908
|
+
/** @description Ordered body-list edits to apply. */
|
|
1909
|
+
operations: components["schemas"]["BindBodyOperation"][];
|
|
1908
1910
|
};
|
|
1909
1911
|
BodyOperationAdd: {
|
|
1910
1912
|
/** @enum {string} */
|
|
@@ -2043,7 +2045,7 @@ interface components {
|
|
|
2043
2045
|
BrowsePanelOpenEvent: {
|
|
2044
2046
|
panel: string;
|
|
2045
2047
|
scrollToAnnotationId?: string;
|
|
2046
|
-
motivation?:
|
|
2048
|
+
motivation?: components["schemas"]["Motivation"];
|
|
2047
2049
|
};
|
|
2048
2050
|
/** @description Emitted when a browse panel is toggled */
|
|
2049
2051
|
BrowsePanelToggleEvent: {
|
|
@@ -2356,6 +2358,15 @@ interface components {
|
|
|
2356
2358
|
/** @description The gathered annotation context (unified GatheredContext, focus.kind:'annotation') */
|
|
2357
2359
|
response: components["schemas"]["GatheredContext"];
|
|
2358
2360
|
};
|
|
2361
|
+
/** @description Optional configuration for an annotation-focus gather, which windows text around a mark. Distinct from the resource-focus options (depth / maxResources / includeContent / includeSummary), which traverse the resource graph. */
|
|
2362
|
+
GatherAnnotationOptions: {
|
|
2363
|
+
/** @description Whether to include source context in the gathered result */
|
|
2364
|
+
includeSourceContext?: boolean;
|
|
2365
|
+
/** @description Whether to include target context in the gathered result */
|
|
2366
|
+
includeTargetContext?: boolean;
|
|
2367
|
+
/** @description Characters of surrounding text context to include */
|
|
2368
|
+
contextWindow?: number;
|
|
2369
|
+
};
|
|
2359
2370
|
/** @description Request payload sent on the gather:requested bus channel to gather context for an annotation. */
|
|
2360
2371
|
GatherAnnotationRequest: {
|
|
2361
2372
|
/** @description Client-generated correlation ID to thread the response back to the originating request */
|
|
@@ -2364,15 +2375,7 @@ interface components {
|
|
|
2364
2375
|
annotationId: string;
|
|
2365
2376
|
/** @description Branded ResourceId of the resource the annotation belongs to */
|
|
2366
2377
|
resourceId: string;
|
|
2367
|
-
|
|
2368
|
-
options?: {
|
|
2369
|
-
/** @description Whether to include source context in the gathered result */
|
|
2370
|
-
includeSourceContext?: boolean;
|
|
2371
|
-
/** @description Whether to include target context in the gathered result */
|
|
2372
|
-
includeTargetContext?: boolean;
|
|
2373
|
-
/** @description Characters of surrounding text context to include */
|
|
2374
|
-
contextWindow?: number;
|
|
2375
|
-
};
|
|
2378
|
+
options?: components["schemas"]["GatherAnnotationOptions"];
|
|
2376
2379
|
};
|
|
2377
2380
|
/** @description Progress payload emitted on the gather:annotation-progress SSE channel during LLM context gathering. */
|
|
2378
2381
|
GatherProgress: {
|
|
@@ -2972,12 +2975,8 @@ interface components {
|
|
|
2972
2975
|
MatchSearchResult: {
|
|
2973
2976
|
correlationId: string;
|
|
2974
2977
|
referenceId: string;
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
score?: number;
|
|
2978
|
-
/** @description Human-readable reason for the match */
|
|
2979
|
-
matchReason?: string;
|
|
2980
|
-
})[];
|
|
2978
|
+
/** @description The scored candidates, best first. */
|
|
2979
|
+
response: components["schemas"]["ScoredResource"][];
|
|
2981
2980
|
};
|
|
2982
2981
|
MediaTokenRequest: {
|
|
2983
2982
|
/** @description The resource ID to generate a media token for */
|
|
@@ -3179,6 +3178,13 @@ interface components {
|
|
|
3179
3178
|
contentChecksum: string;
|
|
3180
3179
|
contentByteSize?: number;
|
|
3181
3180
|
};
|
|
3181
|
+
/** @description A resource returned by a search, carrying its relevance score and the reason it matched. */
|
|
3182
|
+
ScoredResource: components["schemas"]["ResourceDescriptor"] & {
|
|
3183
|
+
/** @description Relevance score assigned by the matcher; higher is a better candidate. */
|
|
3184
|
+
score?: number;
|
|
3185
|
+
/** @description Human-readable reason for the match. */
|
|
3186
|
+
matchReason?: string;
|
|
3187
|
+
};
|
|
3182
3188
|
/** @description Selection data for user-initiated annotations. Captures the text range and optional selector information from a user's highlight in the UI. */
|
|
3183
3189
|
SelectionData: {
|
|
3184
3190
|
/** @description The exact selected text */
|
|
@@ -3787,6 +3793,23 @@ interface ResourceAnnotations {
|
|
|
3787
3793
|
updatedAt: string;
|
|
3788
3794
|
}
|
|
3789
3795
|
|
|
3796
|
+
/**
|
|
3797
|
+
* Viewport-space rectangle of a clicked annotation element — runtime-only
|
|
3798
|
+
* view geometry riding UI events (never wire vocabulary; deliberately not in
|
|
3799
|
+
* the OpenAPI schemas). Structurally satisfied by a DOM `DOMRect`, spelled
|
|
3800
|
+
* out here because this package compiles without the DOM lib.
|
|
3801
|
+
*/
|
|
3802
|
+
interface AnchorRect {
|
|
3803
|
+
x: number;
|
|
3804
|
+
y: number;
|
|
3805
|
+
width: number;
|
|
3806
|
+
height: number;
|
|
3807
|
+
top: number;
|
|
3808
|
+
right: number;
|
|
3809
|
+
bottom: number;
|
|
3810
|
+
left: number;
|
|
3811
|
+
}
|
|
3812
|
+
|
|
3790
3813
|
/**
|
|
3791
3814
|
* Bus Protocol
|
|
3792
3815
|
*
|
|
@@ -3830,22 +3853,6 @@ type BindUpdateBodyCommand = components['schemas']['BindUpdateBodyCommand'] & {
|
|
|
3830
3853
|
* - Commands/reads/results/UI: OpenAPI schema refs — plain strings
|
|
3831
3854
|
* - void: UI-only signals with no payload
|
|
3832
3855
|
*/
|
|
3833
|
-
/**
|
|
3834
|
-
* Viewport-space rectangle of a clicked annotation element — runtime-only
|
|
3835
|
-
* view geometry riding UI events (never wire vocabulary; deliberately not in
|
|
3836
|
-
* the OpenAPI schemas). Structurally satisfied by a DOM `DOMRect`, spelled
|
|
3837
|
-
* out here because this package compiles without the DOM lib.
|
|
3838
|
-
*/
|
|
3839
|
-
interface AnchorRect {
|
|
3840
|
-
x: number;
|
|
3841
|
-
y: number;
|
|
3842
|
-
width: number;
|
|
3843
|
-
height: number;
|
|
3844
|
-
top: number;
|
|
3845
|
-
right: number;
|
|
3846
|
-
bottom: number;
|
|
3847
|
-
left: number;
|
|
3848
|
-
}
|
|
3849
3856
|
type EventMap = {
|
|
3850
3857
|
'yield:created': StoredEvent<EventOfType<'yield:created'>>;
|
|
3851
3858
|
'yield:cloned': StoredEvent<EventOfType<'yield:cloned'>>;
|
|
@@ -3924,8 +3931,23 @@ type EventMap = {
|
|
|
3924
3931
|
'mark:cancel-pending': void;
|
|
3925
3932
|
'mark:submit': components['schemas']['MarkSubmitEvent'];
|
|
3926
3933
|
'mark:assist-request': components['schemas']['MarkAssistRequestEvent'];
|
|
3927
|
-
'mark:assist-cancelled': void;
|
|
3928
3934
|
'mark:progress-dismiss': void;
|
|
3935
|
+
'mark:assist-timeout': {
|
|
3936
|
+
resourceId: string;
|
|
3937
|
+
motivation: components['schemas']['Motivation'];
|
|
3938
|
+
};
|
|
3939
|
+
'mark:create-error': {
|
|
3940
|
+
resourceId: string;
|
|
3941
|
+
message: string;
|
|
3942
|
+
};
|
|
3943
|
+
'mark:delete-error': {
|
|
3944
|
+
resourceId: string;
|
|
3945
|
+
message: string;
|
|
3946
|
+
};
|
|
3947
|
+
'bind:body-error': {
|
|
3948
|
+
resourceId: string;
|
|
3949
|
+
message: string;
|
|
3950
|
+
};
|
|
3929
3951
|
'frame:entity-type-added': StoredEvent<EventOfType<'frame:entity-type-added'>>;
|
|
3930
3952
|
'frame:tag-schema-added': StoredEvent<EventOfType<'frame:tag-schema-added'>>;
|
|
3931
3953
|
'frame:add-entity-type': components['schemas']['FrameAddEntityTypeCommand'];
|
|
@@ -4168,6 +4190,7 @@ type EventMap = {
|
|
|
4168
4190
|
reason: string;
|
|
4169
4191
|
};
|
|
4170
4192
|
};
|
|
4193
|
+
|
|
4171
4194
|
/**
|
|
4172
4195
|
* Any valid channel name on the EventBus — `keyof EventMap`, the root channel
|
|
4173
4196
|
* type. Two subsets matter, and confusing them is a silent-failure trap:
|
|
@@ -4290,8 +4313,11 @@ declare const CHANNEL_SCHEMAS: {
|
|
|
4290
4313
|
readonly 'mark:cancel-pending': null;
|
|
4291
4314
|
readonly 'mark:submit': "MarkSubmitEvent";
|
|
4292
4315
|
readonly 'mark:assist-request': "MarkAssistRequestEvent";
|
|
4293
|
-
readonly 'mark:assist-cancelled': null;
|
|
4294
4316
|
readonly 'mark:progress-dismiss': null;
|
|
4317
|
+
readonly 'mark:assist-timeout': null;
|
|
4318
|
+
readonly 'mark:create-error': null;
|
|
4319
|
+
readonly 'mark:delete-error': null;
|
|
4320
|
+
readonly 'bind:body-error': null;
|
|
4295
4321
|
readonly 'bind:initiate': "BindInitiateCommand";
|
|
4296
4322
|
readonly 'bind:update-body': "BindUpdateBodyCommand";
|
|
4297
4323
|
readonly 'bind:body-updated': "BindBodyUpdated";
|
package/dist/index.js
CHANGED
|
@@ -197,10 +197,16 @@ var CHANNEL_SCHEMAS = {
|
|
|
197
197
|
// void
|
|
198
198
|
"mark:submit": "MarkSubmitEvent",
|
|
199
199
|
"mark:assist-request": "MarkAssistRequestEvent",
|
|
200
|
-
"mark:assist-cancelled": null,
|
|
201
|
-
// void
|
|
202
200
|
"mark:progress-dismiss": null,
|
|
203
201
|
// void
|
|
202
|
+
"mark:assist-timeout": null,
|
|
203
|
+
// { resourceId; motivation } — client-local UI signal
|
|
204
|
+
"mark:create-error": null,
|
|
205
|
+
// { resourceId; message } — client-local UI signal
|
|
206
|
+
"mark:delete-error": null,
|
|
207
|
+
// { resourceId; message } — client-local UI signal
|
|
208
|
+
"bind:body-error": null,
|
|
209
|
+
// { resourceId; message } — client-local UI signal
|
|
204
210
|
// ── BIND FLOW ───────────────────────────────────────────────────
|
|
205
211
|
"bind:initiate": "BindInitiateCommand",
|
|
206
212
|
"bind:update-body": "BindUpdateBodyCommand",
|