@semiont/core 0.5.5 → 0.5.6
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 +210 -111
- package/dist/index.js +307 -104
- package/dist/index.js.map +1 -1
- package/package.json +11 -10
package/dist/index.d.ts
CHANGED
|
@@ -4123,23 +4123,13 @@ type EventName = keyof EventMap;
|
|
|
4123
4123
|
* for one caller) does NOT belong here. Those are per-caller correlation-ID
|
|
4124
4124
|
* responses and publish globally — the caller filters by `correlationId`.
|
|
4125
4125
|
*
|
|
4126
|
-
* The
|
|
4127
|
-
*
|
|
4128
|
-
*
|
|
4129
|
-
*
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
* considered for inclusion but has only one consumer — the
|
|
4134
|
-
* yield-initiator's Observable in `packages/api-client/src/namespaces/yield.ts`.
|
|
4135
|
-
* No viewer of the resource other than the initiator subscribes to
|
|
4136
|
-
* progress. Scoping therefore serves no fan-out-narrowing purpose for
|
|
4137
|
-
* that channel, so it stays global (as a correlation-ID-shaped
|
|
4138
|
-
* response, filtered by `referenceId`). Only `yield:finished` and
|
|
4139
|
-
* `yield:failed` have a genuine multi-participant consumer (the
|
|
4140
|
-
* ResourceViewerPage toast on the source resource).
|
|
4141
|
-
*/
|
|
4142
|
-
declare const RESOURCE_BROADCAST_TYPES: readonly ["job:complete", "job:fail"];
|
|
4126
|
+
* The SDK's resource-scoped `browse.*` live queries wire these channels —
|
|
4127
|
+
* subscribing acquires the scope via the transport's `subscribeToResource`
|
|
4128
|
+
* (`scope=id&scoped=<channel>`) so the SSE route delivers them to that
|
|
4129
|
+
* participant (freshness follows observation; #847). WorkerStateUnit uses this
|
|
4130
|
+
* list to decide which emitted events to scope to their resource.
|
|
4131
|
+
*/
|
|
4132
|
+
declare const RESOURCE_BROADCAST_TYPES: readonly [];
|
|
4143
4133
|
type ResourceBroadcastType = typeof RESOURCE_BROADCAST_TYPES[number];
|
|
4144
4134
|
/**
|
|
4145
4135
|
* Authoritative map from bus channel to OpenAPI schema name.
|
|
@@ -4956,6 +4946,45 @@ declare function extractBoundingBox(svg: string): {
|
|
|
4956
4946
|
height: number;
|
|
4957
4947
|
} | null;
|
|
4958
4948
|
|
|
4949
|
+
/**
|
|
4950
|
+
* PDF viewrect FragmentSelector codec.
|
|
4951
|
+
*
|
|
4952
|
+
* `PdfCoordinate` is a bounding rectangle in PDF point space: origin at the
|
|
4953
|
+
* bottom-left of the page, Y increasing upward. The Y-flip to canvas pixels
|
|
4954
|
+
* lives in the browser (`react-ui`); the server has no canvas.
|
|
4955
|
+
*
|
|
4956
|
+
* These functions are the viewrect peer of the W3C `FragmentSelector` wrapper in
|
|
4957
|
+
* `web-annotation-utils`: they serialize/parse the RFC 3778
|
|
4958
|
+
* `page=N&viewrect=left,top,width,height` value. `@semiont/content` (geometry
|
|
4959
|
+
* from the text layer), `@semiont/jobs` (serialization at write time), and the
|
|
4960
|
+
* browser canvas all import them from here — no package reaches into the UI.
|
|
4961
|
+
*
|
|
4962
|
+
* RFC 3778 PDF Fragment Identifiers: https://tools.ietf.org/html/rfc3778
|
|
4963
|
+
*/
|
|
4964
|
+
/**
|
|
4965
|
+
* A bounding rectangle in PDF point coordinates.
|
|
4966
|
+
* Origin at the bottom-left of the page; Y increases upward.
|
|
4967
|
+
*/
|
|
4968
|
+
interface PdfCoordinate {
|
|
4969
|
+
page: number;
|
|
4970
|
+
x: number;
|
|
4971
|
+
y: number;
|
|
4972
|
+
width: number;
|
|
4973
|
+
height: number;
|
|
4974
|
+
}
|
|
4975
|
+
/**
|
|
4976
|
+
* Serialize a PdfCoordinate to an RFC 3778 FragmentSelector value.
|
|
4977
|
+
* Format: `page=N&viewrect=left,top,width,height` (all in PDF points).
|
|
4978
|
+
*/
|
|
4979
|
+
declare function createFragmentSelector(coord: PdfCoordinate): string;
|
|
4980
|
+
/**
|
|
4981
|
+
* Parse an RFC 3778 FragmentSelector value into PDF coordinates.
|
|
4982
|
+
* Returns null when the value is not a well-formed page + viewrect fragment.
|
|
4983
|
+
*/
|
|
4984
|
+
declare function parseFragmentSelector(fragment: string): PdfCoordinate | null;
|
|
4985
|
+
/** Extract the 1-indexed page number from a FragmentSelector value. */
|
|
4986
|
+
declare function getPageFromFragment(fragment: string): number | null;
|
|
4987
|
+
|
|
4959
4988
|
/**
|
|
4960
4989
|
* Helper functions for working with W3C ResourceDescriptor
|
|
4961
4990
|
*/
|
|
@@ -5226,6 +5255,12 @@ interface ITransport {
|
|
|
5226
5255
|
*
|
|
5227
5256
|
* Returns a disposer that detaches the scope when the last subscriber
|
|
5228
5257
|
* unsubscribes (ref-counted).
|
|
5258
|
+
*
|
|
5259
|
+
* SDK-internal: this is the scope primitive the SDK's resource-scoped
|
|
5260
|
+
* `browse.*` live queries drive on subscribe/teardown (freshness follows
|
|
5261
|
+
* observation; #847) — it is not part of the application-facing surface.
|
|
5262
|
+
* Single-scope at a time; multi-scope is deferred
|
|
5263
|
+
* (`.plans/MULTI-RESOURCE-SCOPE.md`).
|
|
5229
5264
|
*/
|
|
5230
5265
|
subscribeToResource(resourceId: ResourceId): () => void;
|
|
5231
5266
|
/**
|
|
@@ -5408,20 +5443,33 @@ declare function normalizeText(text: string): string;
|
|
|
5408
5443
|
* Pre-computed content strings for batch fuzzy matching.
|
|
5409
5444
|
* Avoids recomputing normalizeText(content) and content.toLowerCase()
|
|
5410
5445
|
* for every annotation when processing many annotations against the same content.
|
|
5446
|
+
*
|
|
5447
|
+
* `normalizedMap[i]` is the original-content index that normalized
|
|
5448
|
+
* character `i` came from. It has length `normalizedContent.length + 1`;
|
|
5449
|
+
* the final entry is `content.length` so a match that ends at the end of
|
|
5450
|
+
* the normalized string maps back to the end of the original. This map is
|
|
5451
|
+
* how `findBestTextMatch` recovers the *original* offset of a normalized
|
|
5452
|
+
* match — counting char-by-char with `normalizeText(singleChar)` is
|
|
5453
|
+
* wrong, because a lone whitespace char trims to `''` (contributing 0)
|
|
5454
|
+
* while in a full-string normalize it collapses to a single space
|
|
5455
|
+
* (contributing 1). That discrepancy shifted recovered offsets by the
|
|
5456
|
+
* number of whitespace runs before the match.
|
|
5411
5457
|
*/
|
|
5412
5458
|
interface ContentCache {
|
|
5413
5459
|
normalizedContent: string;
|
|
5460
|
+
normalizedMap: number[];
|
|
5414
5461
|
lowerContent: string;
|
|
5415
5462
|
}
|
|
5416
5463
|
/**
|
|
5417
5464
|
* Build a ContentCache for a given content string.
|
|
5418
|
-
* Call once per content, pass to findBestTextMatch/
|
|
5465
|
+
* Call once per content, pass to findBestTextMatch/anchorAnnotation for all annotations.
|
|
5419
5466
|
*/
|
|
5420
5467
|
declare function buildContentCache(content: string): ContentCache;
|
|
5421
5468
|
/**
|
|
5422
5469
|
* Find best match for text in content using multi-strategy search
|
|
5423
5470
|
*
|
|
5424
|
-
* Shared core logic used by both
|
|
5471
|
+
* Shared core logic used by both anchorAnnotation (render-time) and
|
|
5472
|
+
* reconcileSelector (write-time).
|
|
5425
5473
|
*
|
|
5426
5474
|
* @param content - Full text content to search within
|
|
5427
5475
|
* @param searchText - The text to find
|
|
@@ -5434,37 +5482,91 @@ declare function findBestTextMatch(content: string, searchText: string, position
|
|
|
5434
5482
|
end: number;
|
|
5435
5483
|
matchQuality: MatchQuality;
|
|
5436
5484
|
} | null;
|
|
5437
|
-
/**
|
|
5438
|
-
* Find text using exact match with optional prefix/suffix context
|
|
5439
|
-
*
|
|
5440
|
-
* When the exact text appears multiple times in the content, prefix and suffix
|
|
5441
|
-
* are used to disambiguate and find the correct occurrence.
|
|
5442
|
-
*
|
|
5443
|
-
* If exact text is not found, uses multi-strategy fuzzy matching (normalization,
|
|
5444
|
-
* case-insensitive, Levenshtein distance) to locate changed text.
|
|
5445
|
-
*
|
|
5446
|
-
* @param content - Full text content to search within
|
|
5447
|
-
* @param exact - The exact text to find
|
|
5448
|
-
* @param prefix - Optional text that should appear immediately before the match
|
|
5449
|
-
* @param suffix - Optional text that should appear immediately after the match
|
|
5450
|
-
* @param positionHint - Optional position hint (from TextPositionSelector) for fuzzy search
|
|
5451
|
-
* @returns Position of the matched text, or null if not found
|
|
5452
|
-
*
|
|
5453
|
-
* @example
|
|
5454
|
-
* ```typescript
|
|
5455
|
-
* const content = "The cat sat. The cat ran.";
|
|
5456
|
-
* // Find second "The cat" occurrence
|
|
5457
|
-
* const pos = findTextWithContext(content, "The cat", "sat. ", " ran");
|
|
5458
|
-
* // Returns { start: 13, end: 20 }
|
|
5459
|
-
* ```
|
|
5460
|
-
*/
|
|
5461
|
-
declare function findTextWithContext(content: string, exact: string, prefix: string | undefined, suffix: string | undefined, positionHint: number | undefined, cache: ContentCache): TextPosition | null;
|
|
5462
5485
|
/**
|
|
5463
5486
|
* Verify that a position correctly points to the exact text
|
|
5464
5487
|
* Useful for debugging and validation
|
|
5465
5488
|
*/
|
|
5466
5489
|
declare function verifyPosition(content: string, position: TextPosition, expectedExact: string): boolean;
|
|
5467
5490
|
|
|
5491
|
+
/**
|
|
5492
|
+
* Anchor a W3C Web Annotation to its rendered text.
|
|
5493
|
+
*
|
|
5494
|
+
* Render-time cleverness is deliberately limited to **verbatim** quote
|
|
5495
|
+
* matching. The annotation's two selectors are written to agree (the
|
|
5496
|
+
* write-side `reconcileSelector` + `buildTextAnnotation` invariant
|
|
5497
|
+
* guarantee `content.substring(start, end) === exact`). At render time the
|
|
5498
|
+
* only legitimate discrepancy is *positional drift*: the document grew or
|
|
5499
|
+
* shrank above the span after the annotation was written, so the offset is
|
|
5500
|
+
* stale but the exact text still exists, byte-identical, elsewhere. That is
|
|
5501
|
+
* the W3C-intended role of `TextQuoteSelector`, and it is safe because it
|
|
5502
|
+
* demands identical text — no normalization, no fuzzy matching, no
|
|
5503
|
+
* judgment call.
|
|
5504
|
+
*
|
|
5505
|
+
* Anything that would require *fuzzy* recovery (smart-quote folding,
|
|
5506
|
+
* whitespace collapse, Levenshtein) is out of scope here: a non-verbatim
|
|
5507
|
+
* mismatch means the content representation diverged or the stored record
|
|
5508
|
+
* is wrong, both of which are deterministic and belong upstream (canonical
|
|
5509
|
+
* content, or a corrected annotation event). The renderer does not guess —
|
|
5510
|
+
* it renders at the stored offset and flags the anchor low-confidence so
|
|
5511
|
+
* the discrepancy surfaces for an upstream fix.
|
|
5512
|
+
*
|
|
5513
|
+
* Returns `null` only when nothing usable is present; otherwise always
|
|
5514
|
+
* returns a position with a `strategy` and `confidence`.
|
|
5515
|
+
*/
|
|
5516
|
+
type AnchorStrategy =
|
|
5517
|
+
/** Position hint pointed exactly at the exact text. Unambiguous. */
|
|
5518
|
+
'fast-path'
|
|
5519
|
+
/** Exact text appears once verbatim in the content. No tiebreak needed. */
|
|
5520
|
+
| 'unique-occurrence'
|
|
5521
|
+
/** Multiple verbatim occurrences; prefix+suffix uniquely identified one. */
|
|
5522
|
+
| 'context-disambiguated'
|
|
5523
|
+
/** Multiple verbatim candidates; position closest to hint chosen. */
|
|
5524
|
+
| 'position-tiebreaker'
|
|
5525
|
+
/** Exact text not found verbatim (or no quote); raw stored offset used,
|
|
5526
|
+
* flagged for upstream correction. */
|
|
5527
|
+
| 'position-fallback';
|
|
5528
|
+
type AnchorConfidence = 'high' | 'medium' | 'low';
|
|
5529
|
+
interface RenderedAnchor {
|
|
5530
|
+
start: number;
|
|
5531
|
+
end: number;
|
|
5532
|
+
strategy: AnchorStrategy;
|
|
5533
|
+
confidence: AnchorConfidence;
|
|
5534
|
+
}
|
|
5535
|
+
interface AnchorSelectors {
|
|
5536
|
+
position?: {
|
|
5537
|
+
start: number;
|
|
5538
|
+
end: number;
|
|
5539
|
+
};
|
|
5540
|
+
quote?: {
|
|
5541
|
+
exact: string;
|
|
5542
|
+
prefix?: string;
|
|
5543
|
+
suffix?: string;
|
|
5544
|
+
};
|
|
5545
|
+
}
|
|
5546
|
+
/**
|
|
5547
|
+
* Distance window for the position tiebreaker. Candidates closer than this
|
|
5548
|
+
* to the hint receive a non-zero position score; further candidates fall
|
|
5549
|
+
* back to zero. Tuned for typical document sizes; calibration tests pin
|
|
5550
|
+
* the boundary behaviour rather than the exact value.
|
|
5551
|
+
*/
|
|
5552
|
+
declare const POSITION_WINDOW = 1024;
|
|
5553
|
+
/**
|
|
5554
|
+
* Score weights — kept as named constants so the calibration tests can
|
|
5555
|
+
* import them and pin the *relationships* rather than the magnitudes.
|
|
5556
|
+
*
|
|
5557
|
+
* Invariant: a full-context match always outranks any position score.
|
|
5558
|
+
* (`CONTEXT_FULL_WEIGHT * 2 > POSITION_WEIGHT_MAX`, accounting for
|
|
5559
|
+
* prefix+suffix each contributing the full weight.)
|
|
5560
|
+
*/
|
|
5561
|
+
declare const CONTEXT_FULL_WEIGHT = 10;
|
|
5562
|
+
declare const CONTEXT_PARTIAL_WEIGHT = 5;
|
|
5563
|
+
declare const POSITION_WEIGHT_MAX = 5;
|
|
5564
|
+
/**
|
|
5565
|
+
* Locate the best-effort anchor for an annotation against the content the
|
|
5566
|
+
* renderer is about to display. Verbatim-only — see the module doc.
|
|
5567
|
+
*/
|
|
5568
|
+
declare function anchorAnnotation(content: string, selectors: AnchorSelectors): RenderedAnchor | null;
|
|
5569
|
+
|
|
5468
5570
|
/**
|
|
5469
5571
|
* Locale information
|
|
5470
5572
|
* Copied from SDK for frontend use
|
|
@@ -5541,89 +5643,86 @@ declare function normalizeCoordinates(point: Point, displayWidth: number, displa
|
|
|
5541
5643
|
declare function scaleSvgToNative(svg: string, displayWidth: number, displayHeight: number, imageWidth: number, imageHeight: number): string;
|
|
5542
5644
|
|
|
5543
5645
|
/**
|
|
5544
|
-
*
|
|
5545
|
-
*
|
|
5546
|
-
* Provides robust prefix/suffix context extraction with word boundary detection
|
|
5547
|
-
* to ensure fuzzy anchoring works correctly when the same text appears multiple times.
|
|
5646
|
+
* Selector reconciliation for write-time annotation construction.
|
|
5548
5647
|
*
|
|
5549
|
-
*
|
|
5550
|
-
*
|
|
5648
|
+
* LLM-produced text offsets are guides, not authoritative anchors.
|
|
5649
|
+
* `reconcileSelector` takes whatever the LLM emitted and produces a
|
|
5650
|
+
* `TextQuoteSelector`-equivalent `start`/`end`/`exact`/`prefix`/`suffix`
|
|
5651
|
+
* that is provably consistent with the source content:
|
|
5551
5652
|
*
|
|
5552
|
-
*
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
/**
|
|
5556
|
-
* Extract prefix and suffix context for TextQuoteSelector
|
|
5653
|
+
* - `content.substring(start, end) === exact`
|
|
5654
|
+
* - `content.substring(start - prefix.length, start) === prefix`
|
|
5655
|
+
* - `content.substring(end, end + suffix.length) === suffix`
|
|
5557
5656
|
*
|
|
5558
|
-
*
|
|
5559
|
-
*
|
|
5560
|
-
*
|
|
5657
|
+
* No caller spreads LLM-emitted prefix/suffix into the stored selector.
|
|
5658
|
+
* The shared helper extracts both from source at the corrected position,
|
|
5659
|
+
* so the no-overlap invariant holds by construction.
|
|
5561
5660
|
*
|
|
5562
|
-
*
|
|
5563
|
-
*
|
|
5564
|
-
* @param end - End offset of selection
|
|
5565
|
-
* @returns Object with prefix and suffix (undefined if at boundaries)
|
|
5661
|
+
* Returns `null` when the LLM emitted text that doesn't appear in the
|
|
5662
|
+
* source. Callers filter; the helper doesn't decide for them.
|
|
5566
5663
|
*
|
|
5567
|
-
* @
|
|
5568
|
-
* ```typescript
|
|
5569
|
-
* const content = "The United States Congress...";
|
|
5570
|
-
* const context = extractContext(content, 4, 17); // "United States"
|
|
5571
|
-
* // Returns: { prefix: "The ", suffix: " Congress..." }
|
|
5572
|
-
* // NOT: { prefix: "nited ", suffix: "gress..." }
|
|
5573
|
-
* ```
|
|
5664
|
+
* @see https://www.w3.org/TR/annotation-model/#text-quote-selector
|
|
5574
5665
|
*/
|
|
5575
|
-
|
|
5576
|
-
prefix?: string;
|
|
5577
|
-
suffix?: string;
|
|
5578
|
-
};
|
|
5666
|
+
|
|
5579
5667
|
/**
|
|
5580
|
-
*
|
|
5581
|
-
|
|
5582
|
-
|
|
5668
|
+
* How the reconciliation arrived at the chosen offset. Carried into the
|
|
5669
|
+
* worker log so operators can audit ambiguous matches; the
|
|
5670
|
+
* `first-of-many` flag, in particular, is the signal that an annotation
|
|
5671
|
+
* *may* be anchored at the wrong occurrence and warrants review.
|
|
5672
|
+
*/
|
|
5673
|
+
type AnchorMethod =
|
|
5674
|
+
/** Exact text appears once in the source — anchored unambiguously. */
|
|
5675
|
+
'unique-match'
|
|
5676
|
+
/** Multiple occurrences; LLM-emitted prefix/suffix picked one. */
|
|
5677
|
+
| 'context-recovered'
|
|
5678
|
+
/** Exact text not found verbatim; fuzzy match recovered it. */
|
|
5679
|
+
| 'fuzzy-match'
|
|
5680
|
+
/** Multiple occurrences, no context disambiguated — risky fallback. */
|
|
5681
|
+
| 'first-of-many';
|
|
5682
|
+
interface ReconciledSelector {
|
|
5583
5683
|
start: number;
|
|
5584
5684
|
end: number;
|
|
5685
|
+
/** Always a substring of the source content — never the LLM's emission. */
|
|
5585
5686
|
exact: string;
|
|
5687
|
+
/** Extracted from source via extractContext — never the LLM's emission. */
|
|
5586
5688
|
prefix?: string;
|
|
5689
|
+
/** Extracted from source via extractContext — never the LLM's emission. */
|
|
5587
5690
|
suffix?: string;
|
|
5588
|
-
|
|
5589
|
-
|
|
5691
|
+
anchorMethod: AnchorMethod;
|
|
5692
|
+
/** Present when the fuzzy fallback recovered the match, naming how. */
|
|
5590
5693
|
matchQuality?: MatchQuality;
|
|
5591
5694
|
}
|
|
5695
|
+
interface LlmSelectorInput {
|
|
5696
|
+
exact: string;
|
|
5697
|
+
/** LLM-emitted context for disambiguation only — not for storage. */
|
|
5698
|
+
prefix?: string;
|
|
5699
|
+
/** LLM-emitted context for disambiguation only — not for storage. */
|
|
5700
|
+
suffix?: string;
|
|
5701
|
+
}
|
|
5592
5702
|
/**
|
|
5593
|
-
*
|
|
5594
|
-
*
|
|
5595
|
-
*
|
|
5596
|
-
*
|
|
5597
|
-
*
|
|
5598
|
-
* This function uses a multi-strategy approach:
|
|
5599
|
-
* 1. Check if AI's offsets are exactly correct
|
|
5600
|
-
* 2. Try exact case-sensitive search
|
|
5601
|
-
* 3. Try case-insensitive search
|
|
5602
|
-
* 4. Try fuzzy matching with Levenshtein distance (5% tolerance)
|
|
5703
|
+
* Extract prefix and suffix context for a `TextQuoteSelector` from
|
|
5704
|
+
* source content. Used internally by `reconcileSelector` after offsets
|
|
5705
|
+
* are reconciled, and exported for callers (e.g. UI-side selection
|
|
5706
|
+
* capture) that need the same extraction semantics.
|
|
5603
5707
|
*
|
|
5604
|
-
*
|
|
5605
|
-
*
|
|
5606
|
-
*
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5708
|
+
* Extracts up to 64 characters before and after the selected text,
|
|
5709
|
+
* extending up to 32 additional chars to reach a word boundary so the
|
|
5710
|
+
* prefix/suffix is meaningful context rather than mid-word fragments.
|
|
5711
|
+
*/
|
|
5712
|
+
declare function extractContext(content: string, start: number, end: number): {
|
|
5713
|
+
prefix?: string;
|
|
5714
|
+
suffix?: string;
|
|
5715
|
+
};
|
|
5716
|
+
/**
|
|
5717
|
+
* Reconcile LLM-emitted offsets against the source. Returns a selector
|
|
5718
|
+
* whose `start`/`end` are verified to bracket `exact` in `content`, and
|
|
5719
|
+
* whose `prefix`/`suffix` are extracted from source — never carried
|
|
5720
|
+
* verbatim from the LLM.
|
|
5613
5721
|
*
|
|
5614
|
-
*
|
|
5615
|
-
*
|
|
5616
|
-
* // AI said start=1143, but actual text is at 1161
|
|
5617
|
-
* const result = validateAndCorrectOffsets(
|
|
5618
|
-
* content,
|
|
5619
|
-
* 1143,
|
|
5620
|
-
* 1289,
|
|
5621
|
-
* "the question \"whether..."
|
|
5622
|
-
* );
|
|
5623
|
-
* // Returns: { start: 1161, end: 1303, exact: "...", corrected: true, matchQuality: 'exact', ... }
|
|
5624
|
-
* ```
|
|
5722
|
+
* Returns `null` if `exact` cannot be found anywhere in the content,
|
|
5723
|
+
* even via fuzzy match. Callers filter null and log the drop.
|
|
5625
5724
|
*/
|
|
5626
|
-
declare function
|
|
5725
|
+
declare function reconcileSelector(content: string, llm: LlmSelectorInput): ReconciledSelector | null;
|
|
5627
5726
|
|
|
5628
5727
|
/**
|
|
5629
5728
|
* Text encoding utilities for consistent charset handling
|
|
@@ -6625,5 +6724,5 @@ declare function getAllPlatformTypes(): PlatformType[];
|
|
|
6625
6724
|
declare const CORE_TYPES_VERSION = "0.1.0";
|
|
6626
6725
|
declare const SDK_VERSION = "0.1.0";
|
|
6627
6726
|
|
|
6628
|
-
export { BRIDGED_CHANNELS, CHANNEL_SCHEMAS, CORE_TYPES_VERSION, ConfigurationError, ConflictError, EventBus, JWTTokenSchema, LOCALES, NotFoundError, PERSISTED_EVENT_TYPES, RESOURCE_BROADCAST_TYPES, SDK_VERSION, ScopedEventBus, ScriptError, SemiontError, UnauthorizedError, ValidationError, accessToken, agentToDid, annotationId, annotationUri, applyBodyOperations, assembleAnnotation, authCode, baseUrl, buildContentCache, burstBuffer, busLog, busLogEnabled, cloneToken, createCircleSvg, createPolygonSvg, createRectangleSvg, createTomlConfigLoader, decodeRepresentation, decodeWithCharset, didToAgent, email, entityType, errField, extractBoundingBox, extractCharset, extractContext, findBestTextMatch, findBodyItem,
|
|
6629
|
-
export type { AccessToken, Annotation, AnnotationCategory, AnnotationId, AnnotationUri, AnthropicProviderConfig, AppConfig, AssembledAnnotation, AuthCode, BackendDownload, BackendServiceConfig, BaseUrl, BodyItem, BodyItemIdentity, BodyOperation, BoundingBox, Brand, BridgedChannel, BurstBufferOptions, BusOp, 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, HealthCheckResponse, IBackendOperations, IContentTransport, ITransport, InferenceProvidersConfig, JobId, ListUsersResponse, LocaleInfo, Logger, MCPToken, MatchQuality, McpServiceConfig, MimeCategory, Motivation, OllamaProviderConfig, PersistedEvent, PersistedEventType, PlatformType, Point, ProgressCallback, ProgressEvent, PutBinaryOptions, PutBinaryProgress, PutBinaryRequest, RefreshToken, ResourceAnnotationUri, ResourceAnnotations, ResourceBroadcastType, ResourceDescriptor, ResourceFilter, ResourceId, ResourceUri, SearchQuery, SelectionData, Selector, SemiontConfig, ServicePlatformConfig, ServicesConfig, SiteConfig, StatusResponse, StoredEvent, StoredEventLike, SvgSelector, TagCategory, TagSchema, TextPosition, TextPositionSelector, TextQuoteSelector, ActorInferenceConfig as TomlActorInferenceConfig, TomlFileReader, InferenceConfig as TomlInferenceConfig, WorkerInferenceConfig as TomlWorkerInferenceConfig, TransportErrorCode, UpdateResourceInput, UpdateUserRequest, UpdateUserResponse, UserDID, UserId, UserResponse,
|
|
6727
|
+
export { BRIDGED_CHANNELS, CHANNEL_SCHEMAS, CONTEXT_FULL_WEIGHT, CONTEXT_PARTIAL_WEIGHT, CORE_TYPES_VERSION, ConfigurationError, ConflictError, EventBus, JWTTokenSchema, LOCALES, NotFoundError, PERSISTED_EVENT_TYPES, POSITION_WEIGHT_MAX, POSITION_WINDOW, RESOURCE_BROADCAST_TYPES, SDK_VERSION, ScopedEventBus, ScriptError, SemiontError, UnauthorizedError, ValidationError, accessToken, agentToDid, anchorAnnotation, annotationId, annotationUri, applyBodyOperations, assembleAnnotation, authCode, baseUrl, buildContentCache, burstBuffer, busLog, busLogEnabled, cloneToken, createCircleSvg, createFragmentSelector, createPolygonSvg, createRectangleSvg, createTomlConfigLoader, decodeRepresentation, decodeWithCharset, didToAgent, email, entityType, errField, extractBoundingBox, extractCharset, extractContext, findBestTextMatch, findBodyItem, formatLocaleDisplay, generateUuid, getAllLocaleCodes, getAllPlatformTypes, getAnnotationExactText, getAnnotationUriFromEvent, getBodySource, getBodyType, getChecksum, getCommentText, getCreator, getDerivedFrom, getExactText, getExtensionForMimeType, getFragmentSelector, getLanguage, getLocaleEnglishName, getLocaleInfo, getLocaleNativeName, getMimeCategory, 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, isImageMimeType, isNull, isNullish, isNumber, isObject, isPdfMimeType, isReference, isResolvedReference, isResourceId, isStoredEvent, isString, isStubReference, isTag, isTextMimeType, isUndefined, isValidEmail, isValidPlatformType, jobId, loadTomlConfig, mcpToken, normalizeCoordinates, normalizeText, parseEnvironment, parseFragmentSelector, parseSvgSelector, reconcileSelector, refreshToken, resourceAnnotationUri, resourceId, resourceUri, scaleSvgToNative, searchQuery, serializePerKey, setBusLogTraceIdProvider, softwareToAgent, userDID, userId, userToAgent, userToDid, validateData, validateEnvironment, validateSvgMarkup, verifyPosition };
|
|
6728
|
+
export type { AccessToken, AnchorConfidence, AnchorMethod, AnchorSelectors, AnchorStrategy, Annotation, AnnotationCategory, AnnotationId, AnnotationUri, AnthropicProviderConfig, AppConfig, AssembledAnnotation, AuthCode, BackendDownload, BackendServiceConfig, BaseUrl, BodyItem, BodyItemIdentity, BodyOperation, BoundingBox, Brand, BridgedChannel, BurstBufferOptions, BusOp, 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, HealthCheckResponse, IBackendOperations, IContentTransport, ITransport, InferenceProvidersConfig, JobId, ListUsersResponse, LlmSelectorInput, LocaleInfo, Logger, MCPToken, MatchQuality, McpServiceConfig, MimeCategory, Motivation, OllamaProviderConfig, PdfCoordinate, PersistedEvent, PersistedEventType, PlatformType, Point, ProgressCallback, ProgressEvent, PutBinaryOptions, PutBinaryProgress, PutBinaryRequest, ReconciledSelector, RefreshToken, RenderedAnchor, ResourceAnnotationUri, ResourceAnnotations, ResourceBroadcastType, ResourceDescriptor, ResourceFilter, ResourceId, ResourceUri, SearchQuery, SelectionData, Selector, SemiontConfig, ServicePlatformConfig, ServicesConfig, SiteConfig, StatusResponse, StoredEvent, StoredEventLike, SvgSelector, TagCategory, TagSchema, 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 };
|