@webority/chat-core 0.165.0 → 0.165.2
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.js +1 -1
- package/dist/links.js +1 -1
- package/dist/types/links.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sniffAudioType as e}from"./audioType.js";import{ChatApiError as t,createChatClient as n,newIdempotencyKey as r}from"./client.js";import{ChatDecodeError as i}from"./decode/primitives.js";import{decodeChatPart as a}from"./decode/parts.js";import{decodeChatConversationView as o,decodeChatMessageView as s}from"./decode/messages.js";import{CHAT_CONTRACT_VERSION as c,CHAT_HANDOFF_REQUEST_ID as l}from"./contract.js";import{createConversationList as u}from"./conversationList.js";import{decodeChatProfileView as d}from"./decode/profile.js";import{DICTATION_NO_SPEECH_MS as f,DICTATION_SILENCE_MS as p,createDictation as m}from"./dictation.js";import{decodeChatStreamEvent as h}from"./decode/events.js";import{createExplain as g}from"./explain.js";import{formatFigure as _,toFigureRuns as v,toFigureText as y}from"./figures.js";import{createFixtureClient as b}from"./fixtureClient.js";import{decodeChatFixture as x}from"./decode/fixture.js";import{formatChatDate as S,formatChatDateTime as C,formatChatDay as w,formatChatValue as T,formatFileSize as E,messagePlainText as D}from"./format.js";import{isHandoffTarget as O}from"./handoff.js";import{IDLE_CHAT_SESSION as k,IDLE_CHAT_STATE as A}from"./idleSession.js";import{DEFAULT_CHAT_LABELS as j,mergeLabels as M}from"./labels.js";import{isSafeActionHref as N,isSafeLinkUrl as P}from"./links.js";import{CHAT_RECENT_ROWS_MAX as
|
|
1
|
+
import{sniffAudioType as e}from"./audioType.js";import{ChatApiError as t,createChatClient as n,newIdempotencyKey as r}from"./client.js";import{ChatDecodeError as i}from"./decode/primitives.js";import{decodeChatPart as a}from"./decode/parts.js";import{decodeChatConversationView as o,decodeChatMessageView as s}from"./decode/messages.js";import{CHAT_CONTRACT_VERSION as c,CHAT_HANDOFF_REQUEST_ID as l}from"./contract.js";import{createConversationList as u}from"./conversationList.js";import{decodeChatProfileView as d}from"./decode/profile.js";import{DICTATION_NO_SPEECH_MS as f,DICTATION_SILENCE_MS as p,createDictation as m}from"./dictation.js";import{decodeChatStreamEvent as h}from"./decode/events.js";import{createExplain as g}from"./explain.js";import{formatFigure as _,toFigureRuns as v,toFigureText as y}from"./figures.js";import{createFixtureClient as b}from"./fixtureClient.js";import{decodeChatFixture as x}from"./decode/fixture.js";import{formatChatDate as S,formatChatDateTime as C,formatChatDay as w,formatChatValue as T,formatFileSize as E,messagePlainText as D}from"./format.js";import{isHandoffTarget as O}from"./handoff.js";import{IDLE_CHAT_SESSION as k,IDLE_CHAT_STATE as A}from"./idleSession.js";import{DEFAULT_CHAT_LABELS as j,mergeLabels as M}from"./labels.js";import{isSafeActionHref as N,isSafeLinkUrl as P,isSafePrivacyUrl as F}from"./links.js";import{CHAT_RECENT_ROWS_MAX as I,defaultChatLook as L,mergeLook as R}from"./look.js";import{pacingDelayMs as z}from"./pacing.js";import{CHAT_FEATURES as B,LOADER_STYLES as V,emptyFeatures as H,featureRecord as U,loaderView as W,resolveFeatures as G,resolveNudge as K,resolveStart as q,showsCaptchaNote as J}from"./profile.js";import{provideRuntimeCrypto as Y}from"./runtime.js";import{createChatSession as X,createTurnApi as Z,handoffSettledIds as Q}from"./session.js";import{CHAT_SPEECH_TOKEN_MARGIN_MS as $,ChatSpeechError as ee,createSpeechTokenSource as te}from"./speech.js";import{humanizeService as ne,selectStarters as re}from"./starters.js";import{createSseParser as ie,createStreamReader as ae}from"./stream.js";import{buildTranscript as oe,transcriptToText as se}from"./transcript.js";import{formatClipTime as ce,voiceClipBars as le}from"./voiceClip.js";export{c as CHAT_CONTRACT_VERSION,B as CHAT_FEATURES,l as CHAT_HANDOFF_REQUEST_ID,I as CHAT_RECENT_ROWS_MAX,$ as CHAT_SPEECH_TOKEN_MARGIN_MS,t as ChatApiError,i as ChatDecodeError,ee as ChatSpeechError,j as DEFAULT_CHAT_LABELS,f as DICTATION_NO_SPEECH_MS,p as DICTATION_SILENCE_MS,k as IDLE_CHAT_SESSION,A as IDLE_CHAT_STATE,V as LOADER_STYLES,oe as buildTranscript,n as createChatClient,X as createChatSession,u as createConversationList,m as createDictation,g as createExplain,b as createFixtureClient,te as createSpeechTokenSource,ie as createSseParser,ae as createStreamReader,Z as createTurnApi,o as decodeChatConversationView,x as decodeChatFixture,s as decodeChatMessageView,a as decodeChatPart,d as decodeChatProfileView,h as decodeChatStreamEvent,L as defaultChatLook,H as emptyFeatures,U as featureRecord,S as formatChatDate,C as formatChatDateTime,w as formatChatDay,T as formatChatValue,ce as formatClipTime,_ as formatFigure,E as formatFileSize,Q as handoffSettledIds,ne as humanizeService,O as isHandoffTarget,N as isSafeActionHref,P as isSafeLinkUrl,F as isSafePrivacyUrl,W as loaderView,M as mergeLabels,R as mergeLook,D as messagePlainText,r as newIdempotencyKey,z as pacingDelayMs,Y as provideRuntimeCrypto,G as resolveFeatures,K as resolveNudge,q as resolveStart,re as selectStarters,J as showsCaptchaNote,e as sniffAudioType,v as toFigureRuns,y as toFigureText,se as transcriptToText,le as voiceClipBars};
|
package/dist/links.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=/^https?:\/\//i,t=/^(https?:\/\/|tel:|mailto:)/i,
|
|
1
|
+
var e=/^https?:\/\//i,t=/^\/[^\/\\]/,n=/^(https?:\/\/|tel:|mailto:)/i,r=e=>typeof e==`string`&&n.test(e),i=t=>typeof t==`string`&&e.test(t),a=e=>i(e)||typeof e==`string`&&t.test(e);export{r as isSafeActionHref,i as isSafeLinkUrl,a as isSafePrivacyUrl};
|
package/dist/types/links.d.ts
CHANGED
|
@@ -2,3 +2,5 @@
|
|
|
2
2
|
export declare const isSafeActionHref: (href: string | null | undefined) => href is string;
|
|
3
3
|
/** True only for an http or https address, tested on the raw string so a leading space or control character cannot hide another scheme. */
|
|
4
4
|
export declare const isSafeLinkUrl: (url: string | null | undefined) => url is string;
|
|
5
|
+
/** The footer privacy address alone may be a same-site path, so a relative address passes here where isSafeLinkUrl refuses it. */
|
|
6
|
+
export declare const isSafePrivacyUrl: (url: string | null | undefined) => url is string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/chat-core",
|
|
3
|
-
"version": "0.165.
|
|
3
|
+
"version": "0.165.2",
|
|
4
4
|
"description": "The headless Webority Chat engine: the client over the chat routes, the session state machine over message parts, the stream reader, profile resolution with screen narrowing, the default English labels and a fixture client for sandboxes and tests. No DOM and no UI.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|