@semiont/core 0.5.11 → 0.5.13

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/testing.d.ts CHANGED
@@ -1771,6 +1771,15 @@ interface components {
1771
1771
  domain: string;
1772
1772
  tags: components["schemas"]["TagCategory"][];
1773
1773
  };
1774
+ /** @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. */
1775
+ WeaveRebuildCommand: {
1776
+ /** @description Correlation id for request/reply matching, set by busRequest so the ok/failed reply routes back. */
1777
+ correlationId?: string;
1778
+ /** @description When present, rebuild only this resource; otherwise clear and rebuild the entire graph. */
1779
+ resourceId?: string;
1780
+ /** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
1781
+ _userId?: string;
1782
+ };
1774
1783
  /** @description Bus command to create a cloned resource from a clone token. */
1775
1784
  YieldCloneCreateCommand: {
1776
1785
  correlationId: string;
@@ -1916,6 +1925,24 @@ type Annotation = RawAnnotation & {
1916
1925
  id: AnnotationId;
1917
1926
  };
1918
1927
 
1928
+ /**
1929
+ * Graph types - Models for graph connections and relationships
1930
+ */
1931
+
1932
+ type RawResourceDescriptor = components['schemas']['ResourceDescriptor'];
1933
+ /**
1934
+ * Domain-level ResourceDescriptor type. Same shape as the OpenAPI-generated
1935
+ * `components['schemas']['ResourceDescriptor']`, but with a branded `ResourceId`
1936
+ * for the `@id` field.
1937
+ *
1938
+ * Implemented by intersection (not `Omit`) because the generated raw type
1939
+ * ends in `& { [key: string]: unknown }` — `Omit` on an intersection with
1940
+ * an index signature drops almost all named fields.
1941
+ */
1942
+ type ResourceDescriptor = RawResourceDescriptor & {
1943
+ '@id': ResourceId;
1944
+ };
1945
+
1919
1946
  /**
1920
1947
  * Persisted Events
1921
1948
  *
@@ -2055,6 +2082,22 @@ type BindUpdateBodyCommand = components['schemas']['BindUpdateBodyCommand'] & {
2055
2082
  * - Commands/reads/results/UI: OpenAPI schema refs — plain strings
2056
2083
  * - void: UI-only signals with no payload
2057
2084
  */
2085
+ /**
2086
+ * Viewport-space rectangle of a clicked annotation element — runtime-only
2087
+ * view geometry riding UI events (never wire vocabulary; deliberately not in
2088
+ * the OpenAPI schemas). Structurally satisfied by a DOM `DOMRect`, spelled
2089
+ * out here because this package compiles without the DOM lib.
2090
+ */
2091
+ interface AnchorRect {
2092
+ x: number;
2093
+ y: number;
2094
+ width: number;
2095
+ height: number;
2096
+ top: number;
2097
+ right: number;
2098
+ bottom: number;
2099
+ left: number;
2100
+ }
2058
2101
  type EventMap = {
2059
2102
  'yield:created': StoredEvent<EventOfType<'yield:created'>>;
2060
2103
  'yield:cloned': StoredEvent<EventOfType<'yield:cloned'>>;
@@ -2176,22 +2219,46 @@ type EventMap = {
2176
2219
  } & components['schemas']['CommandError'];
2177
2220
  'gather:annotation-progress': components['schemas']['GatherProgress'];
2178
2221
  'browse:resource-requested': components['schemas']['BrowseResourceRequest'];
2179
- 'browse:resource-result': components['schemas']['BrowseResourceResult'];
2222
+ 'browse:resource-result': {
2223
+ correlationId: string;
2224
+ response: Omit<components['schemas']['GetResourceResponse'], 'resource' | 'annotations' | 'entityReferences'> & {
2225
+ resource: ResourceDescriptor;
2226
+ annotations: Annotation[];
2227
+ entityReferences: Annotation[];
2228
+ };
2229
+ };
2180
2230
  'browse:resource-failed': {
2181
2231
  correlationId: string;
2182
2232
  } & components['schemas']['CommandError'];
2183
2233
  'browse:resources-requested': components['schemas']['BrowseResourcesRequest'];
2184
- 'browse:resources-result': components['schemas']['BrowseResourcesResult'];
2234
+ 'browse:resources-result': {
2235
+ correlationId: string;
2236
+ response: Omit<components['schemas']['ListResourcesResponse'], 'resources'> & {
2237
+ resources: ResourceDescriptor[];
2238
+ };
2239
+ };
2185
2240
  'browse:resources-failed': {
2186
2241
  correlationId: string;
2187
2242
  } & components['schemas']['CommandError'];
2188
2243
  'browse:annotations-requested': components['schemas']['BrowseAnnotationsRequest'];
2189
- 'browse:annotations-result': components['schemas']['BrowseAnnotationsResult'];
2244
+ 'browse:annotations-result': {
2245
+ correlationId: string;
2246
+ response: Omit<components['schemas']['GetAnnotationsResponse'], 'annotations'> & {
2247
+ annotations: Annotation[];
2248
+ };
2249
+ };
2190
2250
  'browse:annotations-failed': {
2191
2251
  correlationId: string;
2192
2252
  } & components['schemas']['CommandError'];
2193
2253
  'browse:annotation-requested': components['schemas']['BrowseAnnotationRequest'];
2194
- 'browse:annotation-result': components['schemas']['BrowseAnnotationResult'];
2254
+ 'browse:annotation-result': {
2255
+ correlationId: string;
2256
+ response: Omit<components['schemas']['GetAnnotationResponse'], 'annotation' | 'resource' | 'resolvedResource'> & {
2257
+ annotation: Annotation;
2258
+ resource: ResourceDescriptor | null;
2259
+ resolvedResource: ResourceDescriptor | null;
2260
+ };
2261
+ };
2195
2262
  'browse:annotation-failed': {
2196
2263
  correlationId: string;
2197
2264
  } & components['schemas']['CommandError'];
@@ -2239,11 +2306,15 @@ type EventMap = {
2239
2306
  correlationId: string;
2240
2307
  path: string;
2241
2308
  } & components['schemas']['CommandError'];
2242
- 'browse:click': components['schemas']['BrowseClickEvent'];
2309
+ 'browse:click': components['schemas']['BrowseClickEvent'] & {
2310
+ anchorRect?: AnchorRect;
2311
+ };
2243
2312
  'browse:reference-navigate': components['schemas']['BrowseReferenceNavigateEvent'];
2244
2313
  'browse:entity-type-clicked': components['schemas']['BrowseEntityTypeClickedEvent'];
2245
2314
  'panel:toggle': components['schemas']['BrowsePanelToggleEvent'];
2246
- 'panel:open': components['schemas']['BrowsePanelOpenEvent'];
2315
+ 'panel:open': components['schemas']['BrowsePanelOpenEvent'] & {
2316
+ anchorRect?: AnchorRect;
2317
+ };
2247
2318
  'panel:close': void;
2248
2319
  'shell:sidebar-toggle': void;
2249
2320
  'tabs:close': components['schemas']['BrowseResourceCloseEvent'];
@@ -2291,6 +2362,31 @@ type EventMap = {
2291
2362
  };
2292
2363
  };
2293
2364
  'job:cancel-failed': components['schemas']['CommandError'];
2365
+ /**
2366
+ * Emitted by the Weaver after applying an event (or a batch's last event)
2367
+ * for a resource to the graph. `sequenceNumber` is the resource-stream
2368
+ * sequence of the last applied event. Folded by `WeaveProgress`
2369
+ * (make-meaning) into the backend-local applied map that the
2370
+ * `whenApplied` barrier awaits. In-process signal today; crosses the
2371
+ * bus gateway after WEAVER-ISOLATION.
2372
+ */
2373
+ 'weave:applied': {
2374
+ resourceId: string;
2375
+ sequenceNumber: number;
2376
+ };
2377
+ 'smelt:settled': {
2378
+ resourceId: string;
2379
+ contentChecksum: string;
2380
+ outcome: 'indexed' | 'skipped';
2381
+ };
2382
+ 'weave:rebuild': components['schemas']['WeaveRebuildCommand'];
2383
+ 'weave:rebuild-ok': {
2384
+ correlationId?: string;
2385
+ };
2386
+ 'weave:rebuild-failed': {
2387
+ correlationId?: string;
2388
+ message: string;
2389
+ };
2294
2390
  'settings:theme-changed': components['schemas']['SettingsThemeChangedEvent'];
2295
2391
  'settings:line-numbers-toggled': void;
2296
2392
  'settings:locale-changed': components['schemas']['SettingsLocaleChangedEvent'];
@@ -2677,6 +2773,10 @@ declare const BUS_OPERATIONS: {
2677
2773
  readonly result: "match:search-results";
2678
2774
  readonly failure: "match:search-failed";
2679
2775
  };
2776
+ readonly 'weave:rebuild': {
2777
+ readonly result: "weave:rebuild-ok";
2778
+ readonly failure: "weave:rebuild-failed";
2779
+ };
2680
2780
  readonly 'yield:create': {
2681
2781
  readonly result: "yield:create-ok";
2682
2782
  readonly failure: "yield:create-failed";
package/dist/testing.js CHANGED
@@ -218,6 +218,9 @@ var BUS_OPERATIONS = {
218
218
  // ── MATCH ───────────────────────────────────────────────────────
219
219
  // take-1 dressed as an Observable in the SDK; no progress channel
220
220
  "match:search-requested": { result: "match:search-results", failure: "match:search-failed" },
221
+ // ── WEAVE ───────────────────────────────────────────────────────
222
+ // Graph-projection rebuild, served by the Weaver (WEAVER-ISOLATION D3)
223
+ "weave:rebuild": { result: "weave:rebuild-ok", failure: "weave:rebuild-failed" },
221
224
  // ── YIELD ───────────────────────────────────────────────────────
222
225
  // live in-process (resource-operations.ts emits + awaits via race()); the
223
226
  // client also .on()-subscribes -ok for cache invalidation