@semiont/core 0.5.26 → 0.5.27
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/{chunk-FMFOBVTE.js → chunk-CUPZGI7I.js} +8 -3
- package/dist/chunk-CUPZGI7I.js.map +1 -0
- package/dist/{chunk-XQTWEBJ5.js → chunk-JWTQJVKM.js} +35 -27
- package/dist/chunk-JWTQJVKM.js.map +1 -0
- package/dist/{chunk-I3ZOWCTH.js → chunk-PPUO5IPX.js} +6 -5
- package/dist/chunk-PPUO5IPX.js.map +1 -0
- package/dist/config/node-config-loader.d.ts +2 -2
- package/dist/config/node-config-loader.js +1 -1
- package/dist/index.d.ts +197 -65
- package/dist/index.js +20 -9
- package/dist/index.js.map +1 -1
- package/dist/testing/axioms.js +2 -2
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-FMFOBVTE.js.map +0 -1
- package/dist/chunk-I3ZOWCTH.js.map +0 -1
- package/dist/chunk-XQTWEBJ5.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1353,12 +1353,14 @@ interface paths {
|
|
|
1353
1353
|
};
|
|
1354
1354
|
};
|
|
1355
1355
|
responses: {
|
|
1356
|
-
/** @description Event accepted and published
|
|
1356
|
+
/** @description Event accepted and published. The body reports how many subscribers the target subject had at dispatch; zero means the signal reached nobody. */
|
|
1357
1357
|
202: {
|
|
1358
1358
|
headers: {
|
|
1359
1359
|
[name: string]: unknown;
|
|
1360
1360
|
};
|
|
1361
|
-
content
|
|
1361
|
+
content: {
|
|
1362
|
+
"application/json": components["schemas"]["BusEmitAccepted"];
|
|
1363
|
+
};
|
|
1362
1364
|
};
|
|
1363
1365
|
/** @description Missing/invalid channel, payload, or scope; or payload failed schema validation for the channel */
|
|
1364
1366
|
400: {
|
|
@@ -2082,9 +2084,10 @@ interface components {
|
|
|
2082
2084
|
refreshToken: string;
|
|
2083
2085
|
isNewUser: boolean;
|
|
2084
2086
|
};
|
|
2085
|
-
/** @description Emitted when an annotation receives focus for beckoning */
|
|
2087
|
+
/** @description Emitted when an annotation receives focus for beckoning. resourceId is a guard, not navigation: it names the resource this focus applies to, and a viewer currently showing a different resource ignores the event — a deliberate ignore rather than a silent no-op. Focus never moves the viewer; driving the Browser to a resource is browse:resource-open's job. */
|
|
2086
2088
|
BeckonFocusEvent: {
|
|
2087
2089
|
annotationId?: string;
|
|
2090
|
+
/** @description Guard: the resource this focus applies to. A viewer showing a different resource ignores the event. Never causes navigation. */
|
|
2088
2091
|
resourceId?: string;
|
|
2089
2092
|
};
|
|
2090
2093
|
/** @description Emitted when an annotation is hovered over for beckoning */
|
|
@@ -2210,10 +2213,9 @@ interface components {
|
|
|
2210
2213
|
correlationId: string;
|
|
2211
2214
|
response: components["schemas"]["GetAnnotationsResponse"];
|
|
2212
2215
|
};
|
|
2213
|
-
/** @description
|
|
2216
|
+
/** @description An annotation was clicked — open it: the viewer selects its entry in the annotations panel and relays a focus signal to scroll to it. The annotation id is the whole address; it identifies exactly one annotation on exactly one resource, so no resource field is carried and none is needed to scope the event. Motivation is NOT on the wire either: the viewer derives it from the annotation the id names, so the wire states the fact once. A viewer that has not loaded that annotation finds nothing and does nothing. Emitted locally by every clickable annotation surface, and over the wire by a driver opening an annotation on another participant's screen. */
|
|
2214
2217
|
BrowseClickEvent: {
|
|
2215
2218
|
annotationId: string;
|
|
2216
|
-
motivation: components["schemas"]["Motivation"];
|
|
2217
2219
|
};
|
|
2218
2220
|
/** @description Request to browse a directory listing */
|
|
2219
2221
|
BrowseDirectoryRequest: {
|
|
@@ -2281,8 +2283,12 @@ interface components {
|
|
|
2281
2283
|
BrowsePanelToggleEvent: {
|
|
2282
2284
|
panel: string;
|
|
2283
2285
|
};
|
|
2284
|
-
/** @description
|
|
2285
|
-
|
|
2286
|
+
/** @description Domain intent to open a resource in the viewer (GUIDED-TOUR D1/D2): emitted locally by in-app link handlers and remotely by the launcher's tour verbs; the viewer translates it to host routing (nav:push). Deliberately not named 'navigate' — that word and the nav:* prefix belong to the host-local framework layer. */
|
|
2287
|
+
BrowseResourceOpenEvent: {
|
|
2288
|
+
resourceId: string;
|
|
2289
|
+
};
|
|
2290
|
+
/** @description REPORT that a resource has loaded in a viewer — emitted on arrival by ANY means: a followed cue, an in-app link, the back button, a typed URL (GUIDED-TOUR D6). Deliberately distinct from the imperative browse:resource-open: drive and report never share a channel, or the driver hears its own commands and one viewer's arrival steers another's page. */
|
|
2291
|
+
BrowseResourceViewedEvent: {
|
|
2286
2292
|
resourceId: string;
|
|
2287
2293
|
};
|
|
2288
2294
|
/** @description Request to browse annotations that reference a resource */
|
|
@@ -2373,6 +2379,11 @@ interface components {
|
|
|
2373
2379
|
correlationId: string;
|
|
2374
2380
|
response: components["schemas"]["GetTagSchemasResponse"];
|
|
2375
2381
|
};
|
|
2382
|
+
/** @description Result of publishing one event. `subscribers` is the number of observers attached to the target subject at dispatch — the GLOBAL subject for an unscoped emit, the scoped one when `scope` is set. Zero means the signal reached nobody: /bus/subscribe enforces no channel allowlist and the emit handler publishes unconditionally, so a client can emit a channel no participant subscribes to and otherwise receive a clean 202 with no way to tell. Deliberately NOT named `delivered`: this is the count at dispatch, and a subscriber may still drop the frame downstream, so the field is named after what the server can actually observe. */
|
|
2383
|
+
BusEmitAccepted: {
|
|
2384
|
+
/** @description Observers on the target subject when the event was dispatched. */
|
|
2385
|
+
subscribers: number;
|
|
2386
|
+
};
|
|
2376
2387
|
/** @description Emit an event on the Semiont bus. Channel names come from bus-protocol.ts; payload shape is validated against the channel's registered schema (CHANNEL_SCHEMAS). An optional scope routes resource-scoped broadcasts (e.g. mark:added, job:complete) to per-resource subscribers via eventBus.scope(scope); leave it unset for unscoped/global events. */
|
|
2377
2388
|
BusEmitRequest: {
|
|
2378
2389
|
/** @description Channel name from bus-protocol.ts EventMap */
|
|
@@ -2412,6 +2423,8 @@ interface components {
|
|
|
2412
2423
|
agent: components["schemas"]["Agent"];
|
|
2413
2424
|
/** @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. */
|
|
2414
2425
|
servesJobTypes?: components["schemas"]["JobType"][];
|
|
2426
|
+
/** @description Discovered context/output ceilings for this agent's model; absent when discovery is currently unavailable. */
|
|
2427
|
+
limits?: components["schemas"]["InferenceLimits"];
|
|
2415
2428
|
};
|
|
2416
2429
|
/** @description Error response for failed bus commands. Replaces native Error objects on the EventBus so payloads are serializable and OpenAPI-typed. */
|
|
2417
2430
|
CommandError: {
|
|
@@ -2792,6 +2805,35 @@ interface components {
|
|
|
2792
2805
|
/** @description LLM-generated summary of the focal anchor's relationships in the knowledge graph */
|
|
2793
2806
|
inferredRelationshipSummary?: string;
|
|
2794
2807
|
};
|
|
2808
|
+
/** @description Params bag for `job:create` with `jobType: 'generation'` — exactly the shape yield.fromContext(context, options) takes: options + the gathered context. The job's ids are DERIVED from context.focus at the dispatcher (resource focus → focus.resource; annotation focus → focus.sourceResource, with the worker auto-binding to focus.annotation); a caller-supplied referenceId is rejected. Carried inside JobCreateCommand.params; this schema is the generation shape's contract, including its requiredness. */
|
|
2809
|
+
GenerationJobParams: {
|
|
2810
|
+
/** @description Title of the generated resource. */
|
|
2811
|
+
title: string;
|
|
2812
|
+
/** @description Storage URI for the generated resource's content. */
|
|
2813
|
+
storageUri: string;
|
|
2814
|
+
/** @description The gathered context that grounds the generation. Its `focus` names the anchor (the sdk derives the job's resourceId — and referenceId, for annotation focus — from it); under `cite`, the ids its embedding carries are the only valid citation targets. */
|
|
2815
|
+
context: components["schemas"]["GatheredContext"];
|
|
2816
|
+
/** @description Refining instruction, composed with `task` (task = what, prompt = how). */
|
|
2817
|
+
prompt?: string;
|
|
2818
|
+
/** @description Entity-type tags to stamp on the synthesized resource. Used both as a prompt bias for the generation worker and as the `entityTypes` set on the resulting resource. */
|
|
2819
|
+
entityTypes?: string[];
|
|
2820
|
+
/** @description Annotation/resource body locale — language the generated resource is written in (typically the user's UI locale). BCP-47. */
|
|
2821
|
+
language?: string;
|
|
2822
|
+
/** @description Source-resource locale — language of the resource being referenced, used in the prompt so the LLM understands embedded source-context snippets when source ≠ target language. BCP-47. */
|
|
2823
|
+
sourceLanguage?: string;
|
|
2824
|
+
/** @description Sampling temperature forwarded to the model. */
|
|
2825
|
+
temperature?: number;
|
|
2826
|
+
/** @description Output token budget forwarded to the model. Length never determines structure. */
|
|
2827
|
+
maxTokens?: number;
|
|
2828
|
+
/** @description Requested media type of the generated resource's content. Default `text/markdown` at the worker, which validates it against its supported output set and FAILS the job for anything it can't write — not a silent fallback. */
|
|
2829
|
+
outputMediaType?: components["schemas"]["SupportedMediaType"];
|
|
2830
|
+
/** @description What the model is asked to produce — the prompt's framing verb. Canonical values ('resource', 'answer', 'summary') map to the worker's tested framings; any other string is used VERBATIM as the framing instruction (loud degrade: the worker warns, never silently falls back). Unset ⇒ 'resource' (article framing). */
|
|
2831
|
+
task?: string;
|
|
2832
|
+
/** @description How the output is internally segmented — shape for text-bearing media, subordinate to `outputMediaType` (never its peer). Canonical values: 'prose' (flowing paragraphs), 'sections' (titled sections + title), 'chat' (speaker-labeled turns); any other string becomes a freeform "organize as: …" directive (loud degrade). Unset ⇒ NO structure directive at all — the task framing and the model determine shape. */
|
|
2833
|
+
structure?: string;
|
|
2834
|
+
/** @description Ask the model to cite: emit [[<id>]] transport tokens after each claim, using the ids the context embedding provides. The worker validates each id against the embedded context (unknown ids are dropped loudly), strips the tokens from the stored content, and mints W3C linking annotations on the derived resource. */
|
|
2835
|
+
cite?: boolean;
|
|
2836
|
+
};
|
|
2795
2837
|
GetAnnotationHistoryResponse: {
|
|
2796
2838
|
events: components["schemas"]["StoredEventResponse"][];
|
|
2797
2839
|
total: number;
|
|
@@ -2861,6 +2903,13 @@ interface components {
|
|
|
2861
2903
|
database: "connected" | "disconnected" | "unknown";
|
|
2862
2904
|
environment: string;
|
|
2863
2905
|
};
|
|
2906
|
+
/** @description A provider's actual ceilings for a model, discovered from the provider itself (Anthropic Models API; Ollama /api/show) — never hand-maintained constants. Semantics differ by provider shape: Anthropic reports maximum input tokens in contextTokens with a separate output ceiling in maxOutputTokens; Ollama reports the shared input+output window and mirrors it into both fields (there is no separate output ceiling), so maxOutputTokens === contextTokens signals a shared window. */
|
|
2907
|
+
InferenceLimits: {
|
|
2908
|
+
/** @description The context window in tokens. Anthropic: maximum input tokens (output has its own ceiling). Ollama: the shared input+output window. */
|
|
2909
|
+
contextTokens: number;
|
|
2910
|
+
/** @description Maximum output tokens per generation. Equal to contextTokens when the provider has a single shared window. */
|
|
2911
|
+
maxOutputTokens: number;
|
|
2912
|
+
};
|
|
2864
2913
|
/** @description Result of a completed assessment-annotation job. */
|
|
2865
2914
|
JobAssessmentAnnotationResult: {
|
|
2866
2915
|
assessmentsFound: number;
|
|
@@ -2907,7 +2956,6 @@ interface components {
|
|
|
2907
2956
|
resultResourceId?: string;
|
|
2908
2957
|
/** @description For generation: URI of annotation that triggered generation */
|
|
2909
2958
|
annotationUri?: string;
|
|
2910
|
-
message?: string;
|
|
2911
2959
|
/** @description Full result object for extensibility */
|
|
2912
2960
|
result?: {
|
|
2913
2961
|
[key: string]: unknown;
|
|
@@ -2919,7 +2967,8 @@ interface components {
|
|
|
2919
2967
|
/** @description Authenticated user's DID, injected by the /bus/emit gateway. Clients do not set this. */
|
|
2920
2968
|
_userId?: string;
|
|
2921
2969
|
jobType: components["schemas"]["JobType"];
|
|
2922
|
-
|
|
2970
|
+
/** @description Resource the job operates on. REQUIRED for every jobType EXCEPT 'generation', where it must be ABSENT: the dispatcher derives it from params.context.focus (the context is authoritative) and REJECTS a supplied value via job:create-failed. Both directions are enforced at the dispatcher — this schema cannot express the per-jobType conditionality. */
|
|
2971
|
+
resourceId?: string;
|
|
2923
2972
|
params: {
|
|
2924
2973
|
[key: string]: unknown;
|
|
2925
2974
|
};
|
|
@@ -2950,12 +2999,10 @@ interface components {
|
|
|
2950
2999
|
*/
|
|
2951
3000
|
declined: true;
|
|
2952
3001
|
/**
|
|
2953
|
-
* @description Why the resource could not be read.
|
|
3002
|
+
* @description Why the resource could not be read. A CODE, not a sentence: the client owns the wording, so a browser renders it in the user's language and the CLI renders English terminal copy from the same value. The prose `message` this schema used to carry was composed backend-side and was therefore English everywhere (ASSIST-PROGRESS-CONSOLIDATION P5).
|
|
2954
3003
|
* @enum {string}
|
|
2955
3004
|
*/
|
|
2956
3005
|
reason: "no-text-layer" | "encrypted" | "corrupt" | "too-large" | "empty";
|
|
2957
|
-
/** @description Human-readable explanation, suitable for showing to the user. */
|
|
2958
|
-
message: string;
|
|
2959
3006
|
};
|
|
2960
3007
|
/** @description Payload for job:failed domain event */
|
|
2961
3008
|
JobFailedPayload: {
|
|
@@ -2978,59 +3025,74 @@ interface components {
|
|
|
2978
3025
|
highlightsFound: number;
|
|
2979
3026
|
highlightsCreated: number;
|
|
2980
3027
|
};
|
|
2981
|
-
/** @description Progress report from a running job.
|
|
3028
|
+
/** @description Progress report from a running job. The required field is `percentage`; `message` carries the coded phase and the rest are optional job-shape fields. This is the single progress shape for every job type — annotation workers and generation alike. `stage` and `currentEntityType` were REMOVED (ASSIST-PROGRESS-CONSOLIDATION P5): both were redundant denormalization of `message`. Terminality is signalled on `job:complete` / `job:fail`, not here. The per-flow progress vocabularies (`processedEntityTypes`/`totalEntityTypes` for references, `processedCategories`/`totalCategories`/`currentCategory` for tags) were replaced by one `current`/`processed`/`total` triple (CLEAN-PROGRESS D2): both flows iterate a user-chosen list, so they report the same shape and the client stops guessing which flow it is drawing. */
|
|
2982
3029
|
JobProgress: {
|
|
2983
|
-
/** @description Current processing stage (e.g. 'analyzing', 'creating', 'complete', 'error') */
|
|
2984
|
-
stage: string;
|
|
2985
3030
|
/** @description Completion percentage (0-100) */
|
|
2986
3031
|
percentage: number;
|
|
2987
|
-
/** @description
|
|
2988
|
-
message
|
|
2989
|
-
/** @description Annotation this job is attached to, when applicable. Echoed inside JobProgress (in addition to the outer command envelope) so consumers that only see the inner progress object (e.g. client.yield.
|
|
3032
|
+
/** @description What the job is doing right now, as a code plus typed params; the client renders the sentence. Optional: pure percentage heartbeats carry none, and consumers render nothing message-shaped when it is absent (this is also the whole tolerance story for pre-2026-08 persisted events that carried prose here). */
|
|
3033
|
+
message?: components["schemas"]["JobProgressMessage"];
|
|
3034
|
+
/** @description Annotation this job is attached to, when applicable. Echoed inside JobProgress (in addition to the outer command envelope) so consumers that only see the inner progress object (e.g. client.yield.fromContext's Observable) can still route visual feedback to a specific annotation. */
|
|
2990
3035
|
annotationId?: string;
|
|
2991
|
-
/** @description
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
3036
|
+
/** @description What the run is working on right now. `kind` is a CODE the client renders a localized name for; `value` is KB data (an entity type, a tag category) shown verbatim — the same split as `requestParams`. Absent on flows that iterate nothing, such as generation. */
|
|
3037
|
+
current?: {
|
|
3038
|
+
/**
|
|
3039
|
+
* @description What sort of thing `value` is. Adding a variant means adding client copy for it in every locale.
|
|
3040
|
+
* @enum {string}
|
|
3041
|
+
*/
|
|
3042
|
+
kind: "entity-type" | "category";
|
|
3043
|
+
/** @description The item itself, shown verbatim and never translated. */
|
|
3044
|
+
value: string;
|
|
3045
|
+
};
|
|
3046
|
+
/** @description Items completed so far, zero-based — the item in `current` is the one after these. Paired with `total`. */
|
|
3047
|
+
processed?: number;
|
|
3048
|
+
/** @description Items this run will process in all. */
|
|
3049
|
+
total?: number;
|
|
2995
3050
|
/** @description Entities found so far (reference-annotation) */
|
|
2996
3051
|
entitiesFound?: number;
|
|
2997
3052
|
/** @description Annotations emitted so far (reference-annotation) */
|
|
2998
3053
|
entitiesEmitted?: number;
|
|
2999
|
-
/** @description
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3054
|
+
/** @description Per-item results for the items already finished, for the UI's completed log. Generic across flows for the same reason `current` is. */
|
|
3055
|
+
completedItems?: {
|
|
3056
|
+
/** @description The item, shown verbatim. */
|
|
3057
|
+
value: string;
|
|
3058
|
+
/** @description Annotations found for it. */
|
|
3004
3059
|
foundCount: number;
|
|
3005
3060
|
}[];
|
|
3006
|
-
/** @description
|
|
3007
|
-
processedCategories?: number;
|
|
3008
|
-
/** @description Total categories (tag-annotation) */
|
|
3009
|
-
totalCategories?: number;
|
|
3010
|
-
/** @description Category currently being processed (tag-annotation) */
|
|
3011
|
-
currentCategory?: string;
|
|
3012
|
-
/** @description Echoed job parameters for display in the progress UI (e.g. entity types or categories the user asked to detect) */
|
|
3061
|
+
/** @description Echoed job parameters for display in the progress UI. `label` is a CODE, not a sentence — the client owns the wording, same rule as the progress message. `value` is the user's own input (an entity-type list, their instructions) and is deliberately NOT translated: it is their words, not ours. */
|
|
3013
3062
|
requestParams?: {
|
|
3014
|
-
|
|
3063
|
+
/**
|
|
3064
|
+
* @description Which parameter this is. The client renders a localized name for it.
|
|
3065
|
+
* @enum {string}
|
|
3066
|
+
*/
|
|
3067
|
+
label: "entity-types" | "instructions" | "tone" | "density";
|
|
3068
|
+
/** @description The user's own input, shown verbatim. */
|
|
3015
3069
|
value: string;
|
|
3016
3070
|
}[];
|
|
3017
3071
|
};
|
|
3018
|
-
/** @description
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
/** @
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
/** @description
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
}
|
|
3072
|
+
/** @description What a running job is doing right now, as a code plus typed params — never a prose sentence. The producer reports what happened; each client renders it in the user's language (react-ui from its translations, the Go launcher from its English map). The vocabulary is the census of every onProgress call site in @semiont/jobs (.plans/ASSIST-PROGRESS-CONSOLIDATION.md P1, 2026-08-12); extending it means adding a variant here and copy in every client, gated by the locale-completeness check. */
|
|
3073
|
+
JobProgressMessage: {
|
|
3074
|
+
/** @enum {string} */
|
|
3075
|
+
code: "loading" | "analyzing" | "analyzing-tags" | "generating-resource" | "creating-resource";
|
|
3076
|
+
} | {
|
|
3077
|
+
/** @enum {string} */
|
|
3078
|
+
code: "detecting-entities";
|
|
3079
|
+
/** @description Entity type currently being detected */
|
|
3080
|
+
entityType: string;
|
|
3081
|
+
} | {
|
|
3082
|
+
/** @enum {string} */
|
|
3083
|
+
code: "creating-annotations" | "creating-tag-annotations";
|
|
3084
|
+
/** @description How many annotations are being created */
|
|
3085
|
+
count: number;
|
|
3086
|
+
} | {
|
|
3087
|
+
/** @enum {string} */
|
|
3088
|
+
code: "complete-created";
|
|
3089
|
+
/** @description How many annotations were created */
|
|
3090
|
+
count: number;
|
|
3091
|
+
/**
|
|
3092
|
+
* @description What kind of annotation was created; clients pluralize/translate
|
|
3093
|
+
* @enum {string}
|
|
3094
|
+
*/
|
|
3095
|
+
kind: "highlight" | "comment" | "assessment" | "reference" | "tag";
|
|
3034
3096
|
};
|
|
3035
3097
|
/** @description Event indicating a job has been queued */
|
|
3036
3098
|
JobQueuedEvent: {
|
|
@@ -3152,6 +3214,11 @@ interface components {
|
|
|
3152
3214
|
total: number;
|
|
3153
3215
|
offset: number;
|
|
3154
3216
|
limit: number;
|
|
3217
|
+
/**
|
|
3218
|
+
* @description What kind of answer this is: 'lexical' — the resources matched the query text; 'semantic' — no lexical match existed, and these resources discuss the query per the vector index (SEMANTIC-FALLBACK). Required so every producer labels its answer; a UI can render semantic results as a different kind of page ('no title matches, but these documents discuss it').
|
|
3219
|
+
* @enum {string}
|
|
3220
|
+
*/
|
|
3221
|
+
matchKind: "lexical" | "semantic";
|
|
3155
3222
|
};
|
|
3156
3223
|
/** @description Bus command to archive a resource and optionally remove its file. */
|
|
3157
3224
|
MarkArchiveCommand: {
|
|
@@ -3538,6 +3605,20 @@ interface components {
|
|
|
3538
3605
|
/** @description True when this passage's text was recognized from pixels (OCR of a scanned page) rather than read from the document. Absent means read directly — the common case — so the flag is only present where it changes how the text should be trusted. It travels with the passage because a consumer receives the chunk with no document attached and cannot recompute how the text was obtained. */
|
|
3539
3606
|
machineRead?: boolean;
|
|
3540
3607
|
};
|
|
3608
|
+
/** @description A participant opened a live connection to this KB — an SSE stream on /bus/subscribe. Presence is CONNECTION lifecycle, not login: a token can be minted and sit unused, so what this reports is that someone is WATCHING. One person with two tabs produces two of these, which is why connectionId is required — the DID alone cannot tell two connections apart, and a consumer that counts DIDs will undercount viewers. */
|
|
3609
|
+
SessionJoinedEvent: {
|
|
3610
|
+
/** @description DID of the authenticated principal on that connection. A person or a software agent — the bus does not distinguish. */
|
|
3611
|
+
participant: string;
|
|
3612
|
+
/** @description Identifies this connection for its lifetime. The matching session:left carries the same value. */
|
|
3613
|
+
connectionId: string;
|
|
3614
|
+
};
|
|
3615
|
+
/** @description A participant's live connection to this KB ended — the SSE stream aborted. Carries the same connectionId as the session:joined that opened it, so a consumer tracking who is present can retire the right connection rather than assuming one per participant. */
|
|
3616
|
+
SessionLeftEvent: {
|
|
3617
|
+
/** @description DID of the authenticated principal on that connection. */
|
|
3618
|
+
participant: string;
|
|
3619
|
+
/** @description The connectionId announced by the matching session:joined. */
|
|
3620
|
+
connectionId: string;
|
|
3621
|
+
};
|
|
3541
3622
|
/** @description Emitted when the hover delay setting changes */
|
|
3542
3623
|
SettingsHoverDelayChangedEvent: {
|
|
3543
3624
|
hoverDelayMs: number;
|
|
@@ -4024,7 +4105,6 @@ type PersistedEventCatalog = {
|
|
|
4024
4105
|
'frame:entity-type-added': components['schemas']['EntityTypeAddedPayload'];
|
|
4025
4106
|
'frame:tag-schema-added': components['schemas']['TagSchemaAddedPayload'];
|
|
4026
4107
|
'job:started': components['schemas']['JobStartedPayload'];
|
|
4027
|
-
'job:progress': components['schemas']['JobProgressPayload'];
|
|
4028
4108
|
'job:completed': components['schemas']['JobCompletedPayload'];
|
|
4029
4109
|
'job:failed': components['schemas']['JobFailedPayload'];
|
|
4030
4110
|
};
|
|
@@ -4054,7 +4134,7 @@ type PersistedEventType = PersistedEvent['type'];
|
|
|
4054
4134
|
* also adding it here: forgetting fails to typecheck rather than silently
|
|
4055
4135
|
* dropping the event from the events-stream.
|
|
4056
4136
|
*/
|
|
4057
|
-
declare const PERSISTED_EVENT_TYPES: readonly ["yield:created", "yield:cloned", "yield:updated", "yield:moved", "yield:representation-added", "yield:representation-removed", "mark:added", "mark:removed", "mark:body-updated", "mark:archived", "mark:unarchived", "mark:entity-tag-added", "mark:entity-tag-removed", "frame:entity-type-added", "frame:tag-schema-added", "job:started", "job:
|
|
4137
|
+
declare const PERSISTED_EVENT_TYPES: readonly ["yield:created", "yield:cloned", "yield:updated", "yield:moved", "yield:representation-added", "yield:representation-removed", "mark:added", "mark:removed", "mark:body-updated", "mark:archived", "mark:unarchived", "mark:entity-tag-added", "mark:entity-tag-removed", "frame:entity-type-added", "frame:tag-schema-added", "job:started", "job:completed", "job:failed"];
|
|
4058
4138
|
/** Input type for appendEvent — PersistedEvent without id/timestamp (assigned at persistence time). */
|
|
4059
4139
|
type EventInput = Omit<PersistedEvent, 'id' | 'timestamp'>;
|
|
4060
4140
|
|
|
@@ -4420,7 +4500,8 @@ type EventMap = {
|
|
|
4420
4500
|
'browse:click': components['schemas']['BrowseClickEvent'] & {
|
|
4421
4501
|
anchorRect?: AnchorRect;
|
|
4422
4502
|
};
|
|
4423
|
-
'browse:
|
|
4503
|
+
'browse:resource-open': components['schemas']['BrowseResourceOpenEvent'];
|
|
4504
|
+
'browse:resource-viewed': components['schemas']['BrowseResourceViewedEvent'];
|
|
4424
4505
|
'browse:entity-type-clicked': components['schemas']['BrowseEntityTypeClickedEvent'];
|
|
4425
4506
|
'panel:toggle': components['schemas']['BrowsePanelToggleEvent'];
|
|
4426
4507
|
'panel:open': components['schemas']['BrowsePanelOpenEvent'] & {
|
|
@@ -4439,7 +4520,6 @@ type EventMap = {
|
|
|
4439
4520
|
'beckon:focus': components['schemas']['BeckonFocusEvent'];
|
|
4440
4521
|
'beckon:sparkle': components['schemas']['BeckonSparkleEvent'];
|
|
4441
4522
|
'job:started': StoredEvent<EventOfType<'job:started'>>;
|
|
4442
|
-
'job:progress': StoredEvent<EventOfType<'job:progress'>>;
|
|
4443
4523
|
'job:completed': StoredEvent<EventOfType<'job:completed'>>;
|
|
4444
4524
|
'job:failed': StoredEvent<EventOfType<'job:failed'>>;
|
|
4445
4525
|
'job:start': components['schemas']['JobStartCommand'];
|
|
@@ -4539,6 +4619,8 @@ type EventMap = {
|
|
|
4539
4619
|
lastSeenId?: string;
|
|
4540
4620
|
reason: string;
|
|
4541
4621
|
};
|
|
4622
|
+
'session:joined': components['schemas']['SessionJoinedEvent'];
|
|
4623
|
+
'session:left': components['schemas']['SessionLeftEvent'];
|
|
4542
4624
|
};
|
|
4543
4625
|
|
|
4544
4626
|
/**
|
|
@@ -4724,8 +4806,9 @@ declare const CHANNEL_SCHEMAS: {
|
|
|
4724
4806
|
readonly 'browse:directory-requested': "BrowseDirectoryRequest";
|
|
4725
4807
|
readonly 'browse:directory-result': "BrowseDirectoryResult";
|
|
4726
4808
|
readonly 'browse:directory-failed': null;
|
|
4727
|
-
readonly 'browse:click':
|
|
4728
|
-
readonly 'browse:
|
|
4809
|
+
readonly 'browse:click': "BrowseClickEvent";
|
|
4810
|
+
readonly 'browse:resource-open': "BrowseResourceOpenEvent";
|
|
4811
|
+
readonly 'browse:resource-viewed': "BrowseResourceViewedEvent";
|
|
4729
4812
|
readonly 'browse:entity-type-clicked': "BrowseEntityTypeClickedEvent";
|
|
4730
4813
|
readonly 'panel:toggle': "BrowsePanelToggleEvent";
|
|
4731
4814
|
readonly 'panel:open': null;
|
|
@@ -4740,7 +4823,6 @@ declare const CHANNEL_SCHEMAS: {
|
|
|
4740
4823
|
readonly 'beckon:focus': "BeckonFocusEvent";
|
|
4741
4824
|
readonly 'beckon:sparkle': "BeckonSparkleEvent";
|
|
4742
4825
|
readonly 'job:started': null;
|
|
4743
|
-
readonly 'job:progress': null;
|
|
4744
4826
|
readonly 'job:completed': null;
|
|
4745
4827
|
readonly 'job:failed': null;
|
|
4746
4828
|
readonly 'job:start': "JobStartCommand";
|
|
@@ -4775,6 +4857,8 @@ declare const CHANNEL_SCHEMAS: {
|
|
|
4775
4857
|
readonly 'stream-connected': null;
|
|
4776
4858
|
readonly 'replay-window-exceeded': null;
|
|
4777
4859
|
readonly 'bus:resume-gap': null;
|
|
4860
|
+
readonly 'session:joined': "SessionJoinedEvent";
|
|
4861
|
+
readonly 'session:left': "SessionLeftEvent";
|
|
4778
4862
|
};
|
|
4779
4863
|
/** Channels where `/bus/emit` validates the payload (non-null schema). */
|
|
4780
4864
|
type EmittableChannel = {
|
|
@@ -4795,6 +4879,13 @@ type EmittableChannel = {
|
|
|
4795
4879
|
|
|
4796
4880
|
type Selector = components['schemas']['TextPositionSelector'] | components['schemas']['TextQuoteSelector'] | components['schemas']['SvgSelector'] | components['schemas']['FragmentSelector'];
|
|
4797
4881
|
type GatheredContext = components['schemas']['GatheredContext'];
|
|
4882
|
+
/**
|
|
4883
|
+
* The `job:create` params shape for `jobType: 'generation'` — one type shared
|
|
4884
|
+
* by the write side (sdk `yield.fromContext` → `runGeneration`) and the read
|
|
4885
|
+
* side (the generation worker's `isGenerationJobParams` narrowing), so the two
|
|
4886
|
+
* ends of the wire cannot drift a field apart silently.
|
|
4887
|
+
*/
|
|
4888
|
+
type GenerationJobParams = components['schemas']['GenerationJobParams'];
|
|
4798
4889
|
type SelectionData = components['schemas']['SelectionData'];
|
|
4799
4890
|
type JobType = components['schemas']['JobType'];
|
|
4800
4891
|
/**
|
|
@@ -5885,8 +5976,15 @@ interface ITransport {
|
|
|
5885
5976
|
* `resourceScope`, when set, marks the emit as a resource-scoped
|
|
5886
5977
|
* broadcast — only delivered to subscribers attached to that
|
|
5887
5978
|
* resource's scope.
|
|
5979
|
+
*
|
|
5980
|
+
* Resolves with the number of subscribers the emit reached
|
|
5981
|
+
* (`/bus/emit` responds `{subscribers: n}`; GUIDED-TOUR P1), or `-1`
|
|
5982
|
+
* when the count is unknown — an older backend, an unreadable body, or
|
|
5983
|
+
* an in-process transport where the question does not apply. `-1` is
|
|
5984
|
+
* the same sentinel the Go client uses: a parse failure must stay
|
|
5985
|
+
* distinguishable from a genuine empty room.
|
|
5888
5986
|
*/
|
|
5889
|
-
emit<K extends keyof EventMap>(channel: K, payload: EventMap[K], resourceScope?: ResourceId): Promise<
|
|
5987
|
+
emit<K extends keyof EventMap>(channel: K, payload: EventMap[K], resourceScope?: ResourceId): Promise<number>;
|
|
5890
5988
|
on<K extends keyof EventMap>(channel: K, handler: (payload: EventMap[K]) => void): () => void;
|
|
5891
5989
|
stream<K extends keyof EventMap>(channel: K): Observable<EventMap[K]>;
|
|
5892
5990
|
/**
|
|
@@ -6348,7 +6446,7 @@ type BusOperationKey = keyof typeof BUS_OPERATIONS;
|
|
|
6348
6446
|
* and SSE infrastructure. A reply channel must NOT go here — declare its
|
|
6349
6447
|
* operation in `BUS_OPERATIONS` instead.
|
|
6350
6448
|
*/
|
|
6351
|
-
declare const BRIDGED_BROADCASTS: readonly ["job:report-progress", "job:complete", "job:fail", "frame:entity-type-added", "frame:tag-schema-added", "beckon:focus", "beckon:sparkle", "bus:resume-gap"];
|
|
6449
|
+
declare const BRIDGED_BROADCASTS: readonly ["job:report-progress", "job:complete", "job:fail", "frame:entity-type-added", "frame:tag-schema-added", "beckon:focus", "beckon:sparkle", "bus:resume-gap", "browse:resource-open", "browse:resource-viewed", "session:joined", "session:left", "browse:click"];
|
|
6352
6450
|
type OpSpecs = (typeof BUS_OPERATIONS)[keyof typeof BUS_OPERATIONS];
|
|
6353
6451
|
type ProgressChannel<O> = O extends {
|
|
6354
6452
|
progress: infer P extends EventName;
|
|
@@ -6384,7 +6482,12 @@ declare class BusRequestError extends SemiontError {
|
|
|
6384
6482
|
* can satisfy it without round-tripping through HTTP.
|
|
6385
6483
|
*/
|
|
6386
6484
|
interface BusRequestPrimitive {
|
|
6387
|
-
|
|
6485
|
+
/**
|
|
6486
|
+
* Matches `ITransport.emit`'s return: the subscriber count (`-1` =
|
|
6487
|
+
* unknown). `busRequest` itself ignores it — the reply channel is its
|
|
6488
|
+
* ack — but the primitive must stay assignable from every ITransport.
|
|
6489
|
+
*/
|
|
6490
|
+
emit<K extends keyof EventMap>(channel: K, payload: EventMap[K]): Promise<number>;
|
|
6388
6491
|
stream<K extends keyof EventMap>(channel: K): Observable<EventMap[K]>;
|
|
6389
6492
|
/**
|
|
6390
6493
|
* Connection state of the stream that carries replies. Required, not
|
|
@@ -7222,6 +7325,35 @@ declare function isNullish(value: unknown): value is null | undefined;
|
|
|
7222
7325
|
* Check if value is defined (not null or undefined)
|
|
7223
7326
|
*/
|
|
7224
7327
|
declare function isDefined<T>(value: T | null | undefined): value is T;
|
|
7328
|
+
/**
|
|
7329
|
+
* Boundary guard for `job:create` generation params (YIELD-FROM-CONTEXT P1).
|
|
7330
|
+
*
|
|
7331
|
+
* Checks the REQUIRED trio the schema declares (`title`, `storageUri`,
|
|
7332
|
+
* `context`) plus basic shape — deliberately NOT a full schema validation
|
|
7333
|
+
* (that depth belongs to the spec and its generated types); this is the
|
|
7334
|
+
* runtime half of the contract for values whose type history was severed:
|
|
7335
|
+
* wire JSON, storage, casts. For well-typed callers it is dead code, and
|
|
7336
|
+
* that is the correct price for a trust-boundary check.
|
|
7337
|
+
*/
|
|
7338
|
+
declare function isGenerationJobParams(value: unknown): value is GenerationJobParams;
|
|
7339
|
+
/**
|
|
7340
|
+
* Boundary guard for a `GatheredContext` whose type history was severed —
|
|
7341
|
+
* today that is exactly one place: the wizard stashes the context in
|
|
7342
|
+
* `sessionStorage` on the way to the compose page, which reads it back and
|
|
7343
|
+
* `JSON.parse`s it.
|
|
7344
|
+
*
|
|
7345
|
+
* Checks what consumers actually dereference rather than the whole schema:
|
|
7346
|
+
* `focus` (every view branches on `focus.kind`) and `graph.nodes` / `graph.edges`,
|
|
7347
|
+
* which `deriveViews` maps over without a guard. Both are `required` in
|
|
7348
|
+
* `GatheredContext.json` / `KnowledgeGraph.json`, so this is dead code for every
|
|
7349
|
+
* well-typed caller — the price of a trust boundary, same as
|
|
7350
|
+
* `isGenerationJobParams` above.
|
|
7351
|
+
*
|
|
7352
|
+
* The failure it prevents is not cosmetic: `deriveViews` runs during render, so a
|
|
7353
|
+
* stale stash (a tab held open across a deploy) throws inside React rather than
|
|
7354
|
+
* degrading, unmounting the flow to the nearest error boundary.
|
|
7355
|
+
*/
|
|
7356
|
+
declare function isGatheredContext(value: unknown): value is GatheredContext;
|
|
7225
7357
|
|
|
7226
7358
|
/**
|
|
7227
7359
|
* DID (Decentralized Identifier) and W3C Agent utilities
|
|
@@ -7727,8 +7859,8 @@ interface ServicesConfig {
|
|
|
7727
7859
|
database?: DatabaseServiceConfig;
|
|
7728
7860
|
graph?: GraphServiceConfig;
|
|
7729
7861
|
mcp?: McpServiceConfig;
|
|
7730
|
-
vectors
|
|
7731
|
-
embedding
|
|
7862
|
+
vectors: VectorsServiceConfig;
|
|
7863
|
+
embedding: EmbeddingServiceConfig;
|
|
7732
7864
|
[k: string]: unknown;
|
|
7733
7865
|
}
|
|
7734
7866
|
/**
|
|
@@ -8149,5 +8281,5 @@ declare function getShardPath(key: string, numBuckets?: number): [string, string
|
|
|
8149
8281
|
*/
|
|
8150
8282
|
declare const DISCOVERY_URL_PATH = "/discovery/kbs.json";
|
|
8151
8283
|
|
|
8152
|
-
export { AUTHORABLE_MEDIA_TYPES, BRIDGED_CHANNELS, BUS_OPERATIONS, BusRequestError, CHANNEL_SCHEMAS, CONTEXT_FULL_WEIGHT, CONTEXT_PARTIAL_WEIGHT, ConfigurationError, ConflictError, DEFAULT_CHUNKING_CONFIG, DISCOVERY_URL_PATH, EMBEDDABLE_MEDIA_TYPES, EventBus, GENERATABLE_MEDIA_TYPES, JWTTokenSchema, LOCALES, MEDIA_TYPES, NotFoundError, PERSISTED_EVENT_TYPES, POSITION_WEIGHT_MAX, POSITION_WINDOW, RESOURCE_BROADCAST_TYPES, STARTUP_FETCH_RETRY, ScopedEventBus, ScriptError, SemiontError, UnauthorizedError, ValidationError, accessToken, agentToDid, anchorAnnotation, anchorRuns, annotationId, annotationUri, applyBodyOperations, assembleAnnotation, authCode, baseMediaType, baseUrl, buildContentCache, burstBuffer, busLog, busLogEnabled, busRequest, capabilitiesOf, chunkText, cloneToken, createCircleSvg, createFragmentSelector, createPolygonSvg, createRectangleSvg, createTomlConfigLoader, decodeRepresentation, decodeWithCharset, deriveViews, didToAgent, email, entityType, errField, estimateTokens, extensionForMediaType, extractBoundingBox, extractCharset, extractContext, findBestTextMatch, findBodyItem, findClaimSpan, 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, getShardPath, 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, isTextRun, isTransientFetchError, isUndefined, isValidEmail, isValidPlatformType, jobId, jumpConsistentHash, kbDid, loadTomlConfig, locate, mcpToken, mediaTypeForExtension, normalizeCoordinates, normalizeText, parseEnvironment, parseFragmentSelector, parseSvgSelector, reconcileSelector, refreshToken, resourceAnnotationUri, resourceId, resourceUri, retryWithBackoff, scaleSvgToNative, searchQuery, serializePerKey, setBusLogTraceIdProvider, softwareToAgent, textExtractionOf, textUnder, userDID, userId, userToAgent, userToDid, uuidV4, validateData, validateEnvironment, validateSvgMarkup, verifyPosition };
|
|
8153
|
-
export type { AccessToken, AnchorConfidence, AnchorMethod, AnchorRect, AnchorSelectors, AnchorStrategy, AnchoredText, AnchoringModel, Annotation, AnnotationCategory, AnnotationId, AnnotationUri, AnthropicProviderConfig, AppConfig, AssembledAnnotation, AuthCode, BackendDownload, BackendServiceConfig, BaseUrl, BodyItem, BodyItemIdentity, BodyOperation, BoundingBox, Brand, BridgedChannel, BurstBufferOptions, BusOp, BusOperationKey, BusOperationSpec, BusRequestErrorCode, BusRequestPrimitive, ChunkingConfig, CloneToken, CollaboratorEntry, ConnectionState, ContentCache, ContentFormat, CreateAnnotationInternal, DatabaseServiceConfig, DiscoveredKB, DiscoveryDocument, Email, EmbeddingServiceConfig, EmittableChannel, EntityType, EntityTypeStats, Environment, EnvironmentConfig, EventBase, EventInput, EventMap, EventMetadata, EventName, EventOfType, EventQuery, EventSignature, ExtractionOutcome, 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, PdfTextItem, PdfTextRun, PersistedEvent, PersistedEventType, PlatformType, Point, ProgressCallback, ProgressEvent, PutBinaryOptions, PutBinaryProgress, PutBinaryRequest, ReconciledSelector, RefreshToken, RenderMode, RenderedAnchor, ResourceAnnotationUri, ResourceAnnotations, ResourceBroadcastType, ResourceDescriptor, ResourceFilter, ResourceId, ResourceUri, RetryAttemptInfo, RetryPolicy, 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 };
|
|
8284
|
+
export { AUTHORABLE_MEDIA_TYPES, BRIDGED_CHANNELS, BUS_OPERATIONS, BusRequestError, CHANNEL_SCHEMAS, CONTEXT_FULL_WEIGHT, CONTEXT_PARTIAL_WEIGHT, ConfigurationError, ConflictError, DEFAULT_CHUNKING_CONFIG, DISCOVERY_URL_PATH, EMBEDDABLE_MEDIA_TYPES, EventBus, GENERATABLE_MEDIA_TYPES, JWTTokenSchema, LOCALES, MEDIA_TYPES, NotFoundError, PERSISTED_EVENT_TYPES, POSITION_WEIGHT_MAX, POSITION_WINDOW, RESOURCE_BROADCAST_TYPES, STARTUP_FETCH_RETRY, ScopedEventBus, ScriptError, SemiontError, UnauthorizedError, ValidationError, accessToken, agentToDid, anchorAnnotation, anchorRuns, annotationId, annotationUri, applyBodyOperations, assembleAnnotation, authCode, baseMediaType, baseUrl, buildContentCache, burstBuffer, busLog, busLogEnabled, busRequest, capabilitiesOf, chunkText, cloneToken, createCircleSvg, createFragmentSelector, createPolygonSvg, createRectangleSvg, createTomlConfigLoader, decodeRepresentation, decodeWithCharset, deriveViews, didToAgent, email, entityType, errField, estimateTokens, extensionForMediaType, extractBoundingBox, extractCharset, extractContext, findBestTextMatch, findBodyItem, findClaimSpan, 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, getShardPath, getStorageUri, getSvgSelector, getTargetSelector, getTargetSource, getTextPositionSelector, getTextQuoteSelector, googleCredential, hasTargetSelector, isAnnotationId, isArchived, isArray, isAssessment, isBodyResolved, isBoolean, isComment, isDefined, isDraft, isEventRelatedToAnnotation, isFunction, isGatheredContext, isGenerationJobParams, isHighlight, isNull, isNullish, isNumber, isObject, isReference, isResolvedReference, isResourceId, isStoredEvent, isString, isStubReference, isSupportedMediaType, isTag, isTextRun, isTransientFetchError, isUndefined, isValidEmail, isValidPlatformType, jobId, jumpConsistentHash, kbDid, loadTomlConfig, locate, mcpToken, mediaTypeForExtension, normalizeCoordinates, normalizeText, parseEnvironment, parseFragmentSelector, parseSvgSelector, reconcileSelector, refreshToken, resourceAnnotationUri, resourceId, resourceUri, retryWithBackoff, scaleSvgToNative, searchQuery, serializePerKey, setBusLogTraceIdProvider, softwareToAgent, textExtractionOf, textUnder, userDID, userId, userToAgent, userToDid, uuidV4, validateData, validateEnvironment, validateSvgMarkup, verifyPosition };
|
|
8285
|
+
export type { AccessToken, AnchorConfidence, AnchorMethod, AnchorRect, AnchorSelectors, AnchorStrategy, AnchoredText, AnchoringModel, Annotation, AnnotationCategory, AnnotationId, AnnotationUri, AnthropicProviderConfig, AppConfig, AssembledAnnotation, AuthCode, BackendDownload, BackendServiceConfig, BaseUrl, BodyItem, BodyItemIdentity, BodyOperation, BoundingBox, Brand, BridgedChannel, BurstBufferOptions, BusOp, BusOperationKey, BusOperationSpec, BusRequestErrorCode, BusRequestPrimitive, ChunkingConfig, CloneToken, CollaboratorEntry, ConnectionState, ContentCache, ContentFormat, CreateAnnotationInternal, DatabaseServiceConfig, DiscoveredKB, DiscoveryDocument, Email, EmbeddingServiceConfig, EmittableChannel, EntityType, EntityTypeStats, Environment, EnvironmentConfig, EventBase, EventInput, EventMap, EventMetadata, EventName, EventOfType, EventQuery, EventSignature, ExtractionOutcome, FragmentSelector, FrontendServiceConfig, GatheredContext, GenerationJobParams, 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, PdfTextItem, PdfTextRun, PersistedEvent, PersistedEventType, PlatformType, Point, ProgressCallback, ProgressEvent, PutBinaryOptions, PutBinaryProgress, PutBinaryRequest, ReconciledSelector, RefreshToken, RenderMode, RenderedAnchor, ResourceAnnotationUri, ResourceAnnotations, ResourceBroadcastType, ResourceDescriptor, ResourceFilter, ResourceId, ResourceUri, RetryAttemptInfo, RetryPolicy, 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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { createTomlConfigLoader, loadTomlConfig } from './chunk-
|
|
2
|
-
import { BUS_OPERATIONS } from './chunk-
|
|
3
|
-
export { BRIDGED_CHANNELS, BUS_OPERATIONS, EventBus, ScopedEventBus, accessToken, annotationUri, authCode, baseUrl, busLog, busLogEnabled, cloneToken, email, entityType, googleCredential, jobId, mcpToken, refreshToken, resourceAnnotationUri, resourceUri, searchQuery, setBusLogTraceIdProvider, userDID } from './chunk-
|
|
1
|
+
export { createTomlConfigLoader, loadTomlConfig } from './chunk-JWTQJVKM.js';
|
|
2
|
+
import { BUS_OPERATIONS } from './chunk-CUPZGI7I.js';
|
|
3
|
+
export { BRIDGED_CHANNELS, BUS_OPERATIONS, EventBus, ScopedEventBus, accessToken, annotationUri, authCode, baseUrl, busLog, busLogEnabled, cloneToken, email, entityType, googleCredential, jobId, mcpToken, refreshToken, resourceAnnotationUri, resourceUri, searchQuery, setBusLogTraceIdProvider, userDID } from './chunk-CUPZGI7I.js';
|
|
4
4
|
import { Observable, merge, TimeoutError, throwError, firstValueFrom } from 'rxjs';
|
|
5
5
|
import { filter, map, take, timeout, catchError, defaultIfEmpty } from 'rxjs/operators';
|
|
6
6
|
|
|
@@ -45,7 +45,6 @@ var PERSISTED_EVENT_TYPES = [
|
|
|
45
45
|
"frame:entity-type-added",
|
|
46
46
|
"frame:tag-schema-added",
|
|
47
47
|
"job:started",
|
|
48
|
-
"job:progress",
|
|
49
48
|
"job:completed",
|
|
50
49
|
"job:failed"
|
|
51
50
|
];
|
|
@@ -218,9 +217,10 @@ var CHANNEL_SCHEMAS = {
|
|
|
218
217
|
"browse:directory-result": "BrowseDirectoryResult",
|
|
219
218
|
"browse:directory-failed": null,
|
|
220
219
|
// { correlationId; path } & CommandError
|
|
221
|
-
"browse:click":
|
|
220
|
+
"browse:click": "BrowseClickEvent",
|
|
222
221
|
// includes runtime `anchorRect?: AnchorRect`
|
|
223
|
-
"browse:
|
|
222
|
+
"browse:resource-open": "BrowseResourceOpenEvent",
|
|
223
|
+
"browse:resource-viewed": "BrowseResourceViewedEvent",
|
|
224
224
|
"browse:entity-type-clicked": "BrowseEntityTypeClickedEvent",
|
|
225
225
|
// ── SHELL (app-scoped UI events, fire on SemiontBrowser bus) ────
|
|
226
226
|
"panel:toggle": "BrowsePanelToggleEvent",
|
|
@@ -243,7 +243,6 @@ var CHANNEL_SCHEMAS = {
|
|
|
243
243
|
// ── JOB FLOW ────────────────────────────────────────────────────
|
|
244
244
|
"job:started": null,
|
|
245
245
|
// StoredEvent
|
|
246
|
-
"job:progress": null,
|
|
247
246
|
"job:completed": null,
|
|
248
247
|
"job:failed": null,
|
|
249
248
|
"job:start": "JobStartCommand",
|
|
@@ -291,8 +290,10 @@ var CHANNEL_SCHEMAS = {
|
|
|
291
290
|
// Record<string, never>
|
|
292
291
|
"replay-window-exceeded": null,
|
|
293
292
|
// inline payload
|
|
294
|
-
"bus:resume-gap": null
|
|
293
|
+
"bus:resume-gap": null,
|
|
295
294
|
// inline payload
|
|
295
|
+
"session:joined": "SessionJoinedEvent",
|
|
296
|
+
"session:left": "SessionLeftEvent"
|
|
296
297
|
};
|
|
297
298
|
|
|
298
299
|
// src/event-utils.ts
|
|
@@ -1928,6 +1929,16 @@ function isNullish(value) {
|
|
|
1928
1929
|
function isDefined(value) {
|
|
1929
1930
|
return value !== null && value !== void 0;
|
|
1930
1931
|
}
|
|
1932
|
+
function isGenerationJobParams(value) {
|
|
1933
|
+
if (!isObject(value)) return false;
|
|
1934
|
+
return typeof value.title === "string" && typeof value.storageUri === "string" && isObject(value.context);
|
|
1935
|
+
}
|
|
1936
|
+
function isGatheredContext(value) {
|
|
1937
|
+
if (!isObject(value)) return false;
|
|
1938
|
+
if (!isObject(value.focus)) return false;
|
|
1939
|
+
if (!isObject(value.graph)) return false;
|
|
1940
|
+
return isArray(value.graph.nodes) && isArray(value.graph.edges);
|
|
1941
|
+
}
|
|
1931
1942
|
|
|
1932
1943
|
// src/did-utils.ts
|
|
1933
1944
|
function kbDid(domain) {
|
|
@@ -2141,6 +2152,6 @@ function getShardPath(key, numBuckets = 65536) {
|
|
|
2141
2152
|
// src/discovery.ts
|
|
2142
2153
|
var DISCOVERY_URL_PATH = "/discovery/kbs.json";
|
|
2143
2154
|
|
|
2144
|
-
export { AUTHORABLE_MEDIA_TYPES, BusRequestError, CHANNEL_SCHEMAS, CONTEXT_FULL_WEIGHT, CONTEXT_PARTIAL_WEIGHT, ConfigurationError, ConflictError, DEFAULT_CHUNKING_CONFIG, DISCOVERY_URL_PATH, EMBEDDABLE_MEDIA_TYPES, GENERATABLE_MEDIA_TYPES, JWTTokenSchema, LOCALES, MEDIA_TYPES, NotFoundError, PERSISTED_EVENT_TYPES, POSITION_WEIGHT_MAX, POSITION_WINDOW, RESOURCE_BROADCAST_TYPES, STARTUP_FETCH_RETRY, ScriptError, SemiontError, UnauthorizedError, ValidationError, agentToDid, anchorAnnotation, anchorRuns, annotationId, applyBodyOperations, assembleAnnotation, baseMediaType, buildContentCache, burstBuffer, busRequest, capabilitiesOf, chunkText, createCircleSvg, createFragmentSelector, createPolygonSvg, createRectangleSvg, decodeRepresentation, decodeWithCharset, deriveViews, didToAgent, errField, estimateTokens, extensionForMediaType, extractBoundingBox, extractCharset, extractContext, findBestTextMatch, findBodyItem, findClaimSpan, 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, getShardPath, getStorageUri, getSvgSelector, getTargetSelector, getTargetSource, getTextPositionSelector, getTextQuoteSelector, 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, isTextRun, isTransientFetchError, isUndefined, isValidEmail, isValidPlatformType, jumpConsistentHash, kbDid, locate, mediaTypeForExtension, normalizeCoordinates, normalizeText, parseEnvironment, parseFragmentSelector, parseSvgSelector, reconcileSelector, resourceId, retryWithBackoff, scaleSvgToNative, serializePerKey, softwareToAgent, textExtractionOf, textUnder, userId, userToAgent, userToDid, uuidV4, validateData, validateEnvironment, validateSvgMarkup, verifyPosition };
|
|
2155
|
+
export { AUTHORABLE_MEDIA_TYPES, BusRequestError, CHANNEL_SCHEMAS, CONTEXT_FULL_WEIGHT, CONTEXT_PARTIAL_WEIGHT, ConfigurationError, ConflictError, DEFAULT_CHUNKING_CONFIG, DISCOVERY_URL_PATH, EMBEDDABLE_MEDIA_TYPES, GENERATABLE_MEDIA_TYPES, JWTTokenSchema, LOCALES, MEDIA_TYPES, NotFoundError, PERSISTED_EVENT_TYPES, POSITION_WEIGHT_MAX, POSITION_WINDOW, RESOURCE_BROADCAST_TYPES, STARTUP_FETCH_RETRY, ScriptError, SemiontError, UnauthorizedError, ValidationError, agentToDid, anchorAnnotation, anchorRuns, annotationId, applyBodyOperations, assembleAnnotation, baseMediaType, buildContentCache, burstBuffer, busRequest, capabilitiesOf, chunkText, createCircleSvg, createFragmentSelector, createPolygonSvg, createRectangleSvg, decodeRepresentation, decodeWithCharset, deriveViews, didToAgent, errField, estimateTokens, extensionForMediaType, extractBoundingBox, extractCharset, extractContext, findBestTextMatch, findBodyItem, findClaimSpan, 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, getShardPath, getStorageUri, getSvgSelector, getTargetSelector, getTargetSource, getTextPositionSelector, getTextQuoteSelector, hasTargetSelector, isAnnotationId, isArchived, isArray, isAssessment, isBodyResolved, isBoolean, isComment, isDefined, isDraft, isEventRelatedToAnnotation, isFunction, isGatheredContext, isGenerationJobParams, isHighlight, isNull, isNullish, isNumber, isObject, isReference, isResolvedReference, isResourceId, isStoredEvent, isString, isStubReference, isSupportedMediaType, isTag, isTextRun, isTransientFetchError, isUndefined, isValidEmail, isValidPlatformType, jumpConsistentHash, kbDid, locate, mediaTypeForExtension, normalizeCoordinates, normalizeText, parseEnvironment, parseFragmentSelector, parseSvgSelector, reconcileSelector, resourceId, retryWithBackoff, scaleSvgToNative, serializePerKey, softwareToAgent, textExtractionOf, textUnder, userId, userToAgent, userToDid, uuidV4, validateData, validateEnvironment, validateSvgMarkup, verifyPosition };
|
|
2145
2156
|
//# sourceMappingURL=index.js.map
|
|
2146
2157
|
//# sourceMappingURL=index.js.map
|