@intelliweave/embedded 2.0.72-beta.5 → 2.0.72-beta.7
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/component/chunk-FSRPMVAS.js +1 -0
- package/dist/component/component.d.ts +77 -0
- package/dist/component/component.js +265 -47
- package/dist/component/ort-wasm-simd-threaded.wasm +0 -0
- package/dist/component/ort.bundle.min-5QOPZPPI.js +1834 -0
- package/dist/intelliweave-wordpress.zip +0 -0
- package/dist/node/node.d.ts +78 -1
- package/dist/node/node.js +22 -15
- package/dist/react/react.d.ts +73 -0
- package/dist/react/react.js +141 -33
- package/dist/script-tag/script-tag.js +176 -68
- package/dist/webpack/index.d.ts +78 -1
- package/dist/webpack/index.js +144 -36
- package/package.json +1 -1
- package/tests/common.html +357 -0
- package/tests/fullscreen.html +37 -0
- package/tests/images.html +35 -0
- package/tests/index.html +32 -0
- package/tests/local-hub.html +34 -0
- package/tests/subagents.html +128 -0
- package/vitest.config.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
|
|
@@ -456,8 +456,16 @@ declare class KnowledgeBase {
|
|
|
456
456
|
lastResults: KnowledgeBaseItem[];
|
|
457
457
|
/** Individual knowledge base entries added manually by the application */
|
|
458
458
|
manualEntries: KnowledgeBaseItem[];
|
|
459
|
+
/** If true, allows using globally defined sources from the browser window events */
|
|
460
|
+
allowWindowSources: boolean;
|
|
461
|
+
/** If true, allows using knowledge specified in the global configuration object */
|
|
462
|
+
allowGlobalConfigSources: boolean;
|
|
459
463
|
/** Constructor */
|
|
460
464
|
constructor(ai: IntelliWeave);
|
|
465
|
+
/** Ensures the internal knowledge is set correctly */
|
|
466
|
+
ensureInternalKnowledge(): void;
|
|
467
|
+
/** Clears all knowledge back to the default */
|
|
468
|
+
reset(): void;
|
|
461
469
|
/**
|
|
462
470
|
* Register a new knowledge base source. You can pass either just a query function, or an ID and a query function.
|
|
463
471
|
*
|
|
@@ -537,6 +545,25 @@ interface KnowledgeBaseItem {
|
|
|
537
545
|
action?: (input: any, ai: IntelliWeave) => (any | Promise<any>);
|
|
538
546
|
/** If specified, will hide this action from the default UI after the AI finishes running it, or always hide it */
|
|
539
547
|
hideActionInUI?: 'always' | 'after-complete';
|
|
548
|
+
/** Attachments such as images, etc */
|
|
549
|
+
attachments?: KnowledgeBaseItemAttachment[];
|
|
550
|
+
}
|
|
551
|
+
/** Knowledge base item attachment, such as an image, file, etc. */
|
|
552
|
+
interface KnowledgeBaseItemAttachment {
|
|
553
|
+
/** UUID */
|
|
554
|
+
uuid: string;
|
|
555
|
+
/** Attachment mime type */
|
|
556
|
+
mimeType: string;
|
|
557
|
+
/** File name */
|
|
558
|
+
name: string;
|
|
559
|
+
/** Full URL to access the file. This is required for the AI to be able to see the attachment. */
|
|
560
|
+
url?: string;
|
|
561
|
+
/** UNIX timestamp (milliseconds since epoch) when the file was added */
|
|
562
|
+
dateAdded?: number;
|
|
563
|
+
/** Internal path to where the file is stored */
|
|
564
|
+
path?: string;
|
|
565
|
+
/** File size */
|
|
566
|
+
size?: number;
|
|
540
567
|
}
|
|
541
568
|
/** Parameter definition used by IntelliWeave */
|
|
542
569
|
interface IntelliWeaveParameterDefinition {
|
|
@@ -983,6 +1010,43 @@ declare class IntelliWeaveMessageParser {
|
|
|
983
1010
|
toolResult(toolCallInstanceID: string): TokenWindowGroupItemSection | null;
|
|
984
1011
|
}
|
|
985
1012
|
|
|
1013
|
+
/** Handles subagents. This allows your Persona to use other Personas as tools. */
|
|
1014
|
+
declare class SubAgents {
|
|
1015
|
+
/** Reference to the main IntelliWeave instance */
|
|
1016
|
+
ai: IntelliWeave;
|
|
1017
|
+
/** Constructor */
|
|
1018
|
+
constructor(ai: IntelliWeave);
|
|
1019
|
+
/** Subagents */
|
|
1020
|
+
subagents: SubAgentConfig[];
|
|
1021
|
+
/** Cached subagents */
|
|
1022
|
+
cachedSubagents: Record<string, IntelliWeave>;
|
|
1023
|
+
/** Register a sub-agent */
|
|
1024
|
+
register(config: SubAgentConfig): void;
|
|
1025
|
+
/** Unregister subagent */
|
|
1026
|
+
remove(id: string): void;
|
|
1027
|
+
/** Run the subagent */
|
|
1028
|
+
runQuery(config: SubAgentConfig, query: string): Promise<string>;
|
|
1029
|
+
}
|
|
1030
|
+
/** Sub-agent config */
|
|
1031
|
+
interface SubAgentConfig {
|
|
1032
|
+
/** ID of the sub-agent */
|
|
1033
|
+
id: string;
|
|
1034
|
+
/** API key for the persona. If not specified, uses the same api key as the main agent. */
|
|
1035
|
+
apiKey?: string;
|
|
1036
|
+
/** Name of the sub-agent */
|
|
1037
|
+
name?: string;
|
|
1038
|
+
/** Instructions for the main agent to use this sub agent */
|
|
1039
|
+
usageInstructions?: string;
|
|
1040
|
+
/** If true, will remove all Persona knowledge entries */
|
|
1041
|
+
clearExistingKnowledge?: boolean;
|
|
1042
|
+
/** Extra knowledge base sources for the sub-agent */
|
|
1043
|
+
knowledge?: KnowledgeFetcher;
|
|
1044
|
+
/** Optional extra configuration for the subagent instance */
|
|
1045
|
+
config?: Partial<WebWeaverGPTConfig>;
|
|
1046
|
+
/** Called when the subagent is loaded */
|
|
1047
|
+
onAgentLoaded?: (agent: IntelliWeave) => Promise<void> | void;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
986
1050
|
/** Built-in action flags for the persona */
|
|
987
1051
|
interface BuiltInActionFlags {
|
|
988
1052
|
/** Allows the AI to display follow-up suggestions */
|
|
@@ -1032,6 +1096,8 @@ interface WebWeaverGPTConfig {
|
|
|
1032
1096
|
offsetX?: number;
|
|
1033
1097
|
/** Vertical offset from edge in pixels (default: 20) - only used when positioningMode is 'fixed' */
|
|
1034
1098
|
offsetY?: number;
|
|
1099
|
+
/** Identifier of an external app or service which manages this persona, if any. (eg. "chatterly") */
|
|
1100
|
+
managedBy?: string;
|
|
1035
1101
|
/** Voice information */
|
|
1036
1102
|
voice?: {
|
|
1037
1103
|
/** Provider ID */
|
|
@@ -1058,6 +1124,8 @@ interface WebWeaverGPTConfig {
|
|
|
1058
1124
|
flags?: BuiltInActionFlags;
|
|
1059
1125
|
/** Allow custom chat provider */
|
|
1060
1126
|
onCreateProvider?: (config: ChatBaseConfig) => ChatBase;
|
|
1127
|
+
/** Subagents */
|
|
1128
|
+
subagents?: SubAgentConfig[];
|
|
1061
1129
|
}
|
|
1062
1130
|
/**
|
|
1063
1131
|
* IntelliWeave interface, loads a Persona from the hub and allows you to interact with it. This is the main entry point into the IntelliWeave
|
|
@@ -1085,6 +1153,8 @@ declare class IntelliWeave extends EventTarget {
|
|
|
1085
1153
|
conversationID: string;
|
|
1086
1154
|
/** Knowledge database interface */
|
|
1087
1155
|
knowledgeBase: KnowledgeBase;
|
|
1156
|
+
/** Subagent interface */
|
|
1157
|
+
subAgents: SubAgents;
|
|
1088
1158
|
/** Last KB search that was performed */
|
|
1089
1159
|
private _lastKBsearch;
|
|
1090
1160
|
/** If set, the next time a request is made this is the KB result items that will be used, once-off. */
|
|
@@ -1145,7 +1215,10 @@ declare class IntelliWeave extends EventTarget {
|
|
|
1145
1215
|
/** @private Called when the AI wants to run a KB action */
|
|
1146
1216
|
toolRunKBAction(kb: KnowledgeBaseItem, input: any): Promise<any>;
|
|
1147
1217
|
/** Submit an analytics event asynchronously. These events are for use in the Conversation Analytics code. For anonymous statistic analysis, use track() instead. */
|
|
1218
|
+
private activeAnalyticsPromises;
|
|
1148
1219
|
submitAnalyticsEvent(data: any): void;
|
|
1220
|
+
/** Wait for all analytics events to finish */
|
|
1221
|
+
waitForAnalytics(): Promise<void>;
|
|
1149
1222
|
/** Reset the conversation */
|
|
1150
1223
|
resetConversation(): void;
|
|
1151
1224
|
/** Insert a message as if the assistant has written it */
|
|
@@ -1290,6 +1363,10 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1290
1363
|
onSuggestionClick(e: Event, suggestion: string): void;
|
|
1291
1364
|
/** Called when an LLM model is selected */
|
|
1292
1365
|
onLLMModelSelect(e: CustomEvent): void;
|
|
1366
|
+
/** Called when the content area is scrolled */
|
|
1367
|
+
onContentScroll(e: Event): void;
|
|
1368
|
+
/** Displays whitelabeled branding for known apps */
|
|
1369
|
+
private updateBrandingFor;
|
|
1293
1370
|
}
|
|
1294
1371
|
|
|
1295
1372
|
/**
|