@inploi/plugin-kin 2.4.2 → 2.4.4
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/cdn/index.js +76 -68
- package/dist/highlighted-body-B3W2YXNL-8dac2ba2.js +18 -0
- package/dist/highlighted-body-B3W2YXNL-a9f26142.cjs +1 -0
- package/dist/{index-37da3520.js → index-3ffc9af2.js} +5985 -5543
- package/dist/index-516b7de7.cjs +155 -0
- package/dist/index.dev.d.ts +0 -3
- package/dist/kin.client.d.ts +4 -17
- package/dist/kin.state.d.ts +4 -32
- package/dist/mermaid-3ZIDBTTL-0b3f7dc5.js +5 -0
- package/dist/mermaid-3ZIDBTTL-f596aef3.cjs +1 -0
- package/dist/plugin-kin.cjs +1 -1
- package/dist/plugin-kin.js +1 -1
- package/package.json +4 -4
- package/dist/code-block-37QAKDTI-7eb2a6e1.cjs +0 -2
- package/dist/code-block-37QAKDTI-c0a4b004.js +0 -26
- package/dist/index-f19ff544.cjs +0 -146
- package/dist/mermaid-4DMBBIKO-6511b2b6.cjs +0 -1
- package/dist/mermaid-4DMBBIKO-9c98e510.js +0 -5
package/dist/index.dev.d.ts
CHANGED
package/dist/kin.client.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WebSocket client for Kin agents service
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
type HistoryMessage = {
|
|
5
5
|
role: 'user' | 'assistant';
|
|
6
6
|
content: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type KinMessage = {
|
|
9
9
|
type: 'user_message' | 'response_start' | 'response_chunk' | 'response_end' | 'error' | 'system' | 'authenticated' | 'data_cleared' | 'guardrail_block' | 'history' | 'quick_replies' | 'upload_received' | 'file_processing' | 'file_processed';
|
|
10
10
|
content?: string;
|
|
11
11
|
company?: string;
|
|
@@ -22,22 +22,8 @@ export type KinMessage = {
|
|
|
22
22
|
summary?: string;
|
|
23
23
|
skills?: string[];
|
|
24
24
|
};
|
|
25
|
-
/** Supported file types for upload */
|
|
26
|
-
export declare const SUPPORTED_FILE_TYPES: Record<string, {
|
|
27
|
-
maxSize: number;
|
|
28
|
-
}>;
|
|
29
25
|
export declare const FILE_ACCEPT_STRING = ".pdf,.docx,.doc,.txt,.jpg,.jpeg,.png,.webp";
|
|
30
|
-
|
|
31
|
-
valid: true;
|
|
32
|
-
} | {
|
|
33
|
-
valid: false;
|
|
34
|
-
error: string;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Validate a file before upload
|
|
38
|
-
*/
|
|
39
|
-
export declare function validateFile(file: File): FileValidationResult;
|
|
40
|
-
export type KinClientOptions = {
|
|
26
|
+
type KinClientOptions = {
|
|
41
27
|
url: string;
|
|
42
28
|
onMessage: (message: KinMessage) => void;
|
|
43
29
|
onOpen: () => void;
|
|
@@ -59,3 +45,4 @@ export declare function createKinClient({ url, onMessage, onOpen, onClose, onErr
|
|
|
59
45
|
disconnect: () => void;
|
|
60
46
|
isConnected: () => boolean;
|
|
61
47
|
};
|
|
48
|
+
export {};
|
package/dist/kin.state.d.ts
CHANGED
|
@@ -4,38 +4,8 @@ export type Message = {
|
|
|
4
4
|
id: string;
|
|
5
5
|
timestamp: Date;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare const isStreaming: import('@preact/signals').Signal<boolean>;
|
|
10
|
-
export declare const connectionState: import('@preact/signals').Signal<ConnectionState>;
|
|
11
|
-
export declare const hasUnreadMessages: import('@preact/signals').Signal<boolean>;
|
|
12
|
-
export type UploadState = 'idle' | 'uploading' | 'processing' | 'success' | 'error';
|
|
13
|
-
export declare const uploadState: import('@preact/signals').Signal<UploadState>;
|
|
14
|
-
export declare const uploadError: import('@preact/signals').Signal<string | null>;
|
|
15
|
-
export declare const uploadFileName: import('@preact/signals').Signal<string | null>;
|
|
16
|
-
export declare const messages: import('@preact/signals').Signal<Message[]>;
|
|
17
|
-
export declare const quickReplies: import('@preact/signals').Signal<string[]>;
|
|
18
|
-
export declare const addMessage: (message: Omit<Message, "id" | "timestamp">) => void;
|
|
19
|
-
export declare const setQuickReplies: (options: string[]) => void;
|
|
20
|
-
export declare const appendToLastMessage: (content: string) => void;
|
|
21
|
-
export declare const clearMessages: () => void;
|
|
22
|
-
/**
|
|
23
|
-
* Set messages from history (replaces current messages)
|
|
24
|
-
*/
|
|
25
|
-
export declare const setMessages: (newMessages: Array<{
|
|
26
|
-
role: "user" | "assistant";
|
|
27
|
-
content: string;
|
|
28
|
-
}>) => void;
|
|
29
|
-
/**
|
|
30
|
-
* Broadcast current state to other tabs (call after streaming ends)
|
|
31
|
-
*/
|
|
32
|
-
export declare const syncToOtherTabs: () => void;
|
|
33
|
-
export declare const setUploadState: (state: UploadState, fileName?: string, error?: string) => void;
|
|
34
|
-
export declare const resetUploadState: () => void;
|
|
35
|
-
/** Mark as having unread messages (call when new message arrives while closed) */
|
|
36
|
-
export declare const setHasUnreadMessages: (hasUnread: boolean) => void;
|
|
37
|
-
/** Clear unread indicator (call when user opens the chat) */
|
|
38
|
-
export declare const clearUnreadMessages: () => void;
|
|
7
|
+
type ConnectionState = 'idle' | 'connecting' | 'connected' | 'disconnected' | 'error';
|
|
8
|
+
type UploadState = 'idle' | 'uploading' | 'processing' | 'success' | 'error';
|
|
39
9
|
export declare const store: {
|
|
40
10
|
isOpen: import('@preact/signals').Signal<boolean>;
|
|
41
11
|
isStreaming: import('@preact/signals').Signal<boolean>;
|
|
@@ -59,4 +29,6 @@ export declare const store: {
|
|
|
59
29
|
setHasUnreadMessages: (hasUnread: boolean) => void;
|
|
60
30
|
clearUnreadMessages: () => void;
|
|
61
31
|
setQuickReplies: (options: string[]) => void;
|
|
32
|
+
resetState: () => void;
|
|
62
33
|
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-516b7de7.cjs");require("@inploi/sdk");exports.Mermaid=e.Nt;
|
package/dist/plugin-kin.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-516b7de7.cjs");require("@inploi/sdk");exports.BRAND_THEMES=e.BRAND_THEMES;exports.kinPlugin=e.kinPlugin;
|
package/dist/plugin-kin.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inploi/plugin-kin",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Kin - A unified Talent Agent interface for hiring. One system, many roles.",
|
|
6
6
|
"main": "dist/plugin-kin.js",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"vite": "^4.4.5",
|
|
36
36
|
"vite-plugin-dts": "^3.7.0",
|
|
37
37
|
"vite-tsconfig-paths": "^4.2.1",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
38
|
+
"tsconfig": "0.1.0",
|
|
39
|
+
"@inploi/sdk": "1.17.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"streamdown": "^2.
|
|
42
|
+
"streamdown": "^2.3.0",
|
|
43
43
|
"@inploi/colors": "1.0.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-f19ff544.cjs");require("@inploi/sdk");var m=e.b("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),b=e.x(({children:a,result:r,language:n,className:c,...g})=>{let d=e.F(()=>({backgroundColor:r.bg,color:r.fg}),[r.bg,r.fg]);return e.o("pre",{className:e.b(c,"p-4 text-sm dark:bg-(--shiki-dark-bg)!"),"data-language":n,"data-streamdown":"code-block-body",style:d,...g,children:e.o("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:r.tokens.map((s,l)=>e.o("span",{className:m,children:s.map((t,o)=>e.o("span",{className:"dark:bg-(--shiki-dark-bg)! dark:text-(--shiki-dark)!",style:{color:t.color,backgroundColor:t.bgColor,...t.htmlStyle},...t.htmlAttrs,children:t.content},o))},l))})})},(a,r)=>a.result===r.result&&a.language===r.language&&a.className===r.className),h=({className:a,language:r,style:n,...c})=>e.o("div",{className:e.b("my-4 w-full overflow-hidden rounded-xl border border-border",a),"data-language":r,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...c}),f=({language:a,children:r})=>e.o("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-language":a,"data-streamdown":"code-block-header",children:[e.o("span",{className:"ml-1 font-mono lowercase",children:a}),e.o("div",{className:"flex items-center gap-2",children:r})]}),k=({code:a,language:r,className:n,children:c,...g})=>{let{shikiTheme:d}=e.q(e.N),s=e.cr(),l=e.F(()=>({bg:"transparent",fg:"inherit",tokens:a.split(`
|
|
2
|
-
`).map(i=>[{content:i,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[a]),[t,o]=e.h(l);return e.p(()=>{if(!s){o(l);return}let i=s.highlight({code:a,language:r,themes:d},u=>{o(u)});if(i){o(i);return}o(l)},[a,r,d,s,l]),e.o(e.ao.Provider,{value:{code:a},children:e.o(h,{language:r,children:[e.o(f,{language:r,children:c}),e.o(b,{className:n,language:r,result:t,...g})]})})};exports.CodeBlock=k;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { b as m, x as h, F as u, o as r, q as f, N as k, c as p, h as x, p as N, a as v } from "./index-37da3520.js";
|
|
2
|
-
import "@inploi/sdk";
|
|
3
|
-
var y = m("block", "before:content-[counter(line)]", "before:inline-block", "before:[counter-increment:line]", "before:w-6", "before:mr-4", "before:text-[13px]", "before:text-right", "before:text-muted-foreground/50", "before:font-mono", "before:select-none"), w = h(({ children: a, result: e, language: o, className: s, ...g }) => {
|
|
4
|
-
let d = u(() => ({ backgroundColor: e.bg, color: e.fg }), [e.bg, e.fg]);
|
|
5
|
-
return r("pre", { className: m(s, "p-4 text-sm dark:bg-(--shiki-dark-bg)!"), "data-language": o, "data-streamdown": "code-block-body", style: d, ...g, children: r("code", { className: "[counter-increment:line_0] [counter-reset:line]", children: e.tokens.map((c, l) => r("span", { className: y, children: c.map((t, n) => r("span", { className: "dark:bg-(--shiki-dark-bg)! dark:text-(--shiki-dark)!", style: { color: t.color, backgroundColor: t.bgColor, ...t.htmlStyle }, ...t.htmlAttrs, children: t.content }, n)) }, l)) }) });
|
|
6
|
-
}, (a, e) => a.result === e.result && a.language === e.language && a.className === e.className), C = ({ className: a, language: e, style: o, ...s }) => r("div", { className: m("my-4 w-full overflow-hidden rounded-xl border border-border", a), "data-language": e, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...o }, ...s }), S = ({ language: a, children: e }) => r("div", { className: "flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs", "data-language": a, "data-streamdown": "code-block-header", children: [r("span", { className: "ml-1 font-mono lowercase", children: a }), r("div", { className: "flex items-center gap-2", children: e })] }), z = ({ code: a, language: e, className: o, children: s, ...g }) => {
|
|
7
|
-
let { shikiTheme: d } = f(k), c = p(), l = u(() => ({ bg: "transparent", fg: "inherit", tokens: a.split(`
|
|
8
|
-
`).map((i) => [{ content: i, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [a]), [t, n] = x(l);
|
|
9
|
-
return N(() => {
|
|
10
|
-
if (!c) {
|
|
11
|
-
n(l);
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
let i = c.highlight({ code: a, language: e, themes: d }, (b) => {
|
|
15
|
-
n(b);
|
|
16
|
-
});
|
|
17
|
-
if (i) {
|
|
18
|
-
n(i);
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
n(l);
|
|
22
|
-
}, [a, e, d, c, l]), r(v.Provider, { value: { code: a }, children: r(C, { language: e, children: [r(S, { language: e, children: s }), r(w, { className: o, language: e, result: t, ...g })] }) });
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
z as CodeBlock
|
|
26
|
-
};
|