Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "packages/embed"]
path = packages/embed
url = https://github.com/the-answerai/chat-embed.git
url = https://github.com/the-answerai/aai-embed.git
branch = a-main
1 change: 1 addition & 0 deletions apps/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ COPY packages-answers/tsconfig/package.json ./packages-answers/tsconfig/
COPY packages/ui/package.json ./packages/ui/
COPY packages/components/package.json ./packages/components/
COPY packages/embed/package.json ./packages/embed/
COPY packages/embed-react/package.json ./packages/embed-react/

# Install dependencies (skip postinstall scripts for Docker build)
RUN --mount=type=cache,id=pnpm,target=/root/.pnpm-store pnpm install --ignore-scripts
Expand Down
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@svgr/webpack": "^8.1.0",
"@textea/json-viewer": "2.14.1",
"aai-embed": "workspace:*",
"aai-embed-react": "workspace:*",
"add": "^2.0.6",
"aws-crt": "^1.27.3",
"axios": "^1.12.1",
Expand Down
1 change: 0 additions & 1 deletion packages-answers/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@mui/x-tree-view": "^7.29.1",
"@next-auth/prisma-adapter": "^1.0.7",
"@textea/json-viewer": "2.14.1",
"aai-embed-react": "~1.0.8",
"axios": "^1.12.1",
"clsx": "^1.2.1",
"cors": "^2.8.5",
Expand Down
6 changes: 5 additions & 1 deletion packages-answers/ui/src/AnswersContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,11 @@ export function AnswersProvider({
audio,
socketIOClientId: isChatFlowAvailableToStream ? socketIOClientId : undefined,
chatType: 'ANSWERAI',
action
action,
trackingMetadata: {
url: typeof window !== 'undefined' ? window.location.href : undefined,
source: 'theanswer'
}
}

if (isChatFlowAvailableToStream) {
Expand Down
44 changes: 44 additions & 0 deletions packages/components/credentials/JlincApi.credential.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { INodeParams, INodeCredential } from '../src/Interface'

class JlincApi implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]

constructor() {
this.label = 'JLINC API'
this.name = 'jlincApi'
this.version = 1.0
this.description = 'Refer to <a target="_blank" href="https://www.jlinc.com">https://www.jlinc.com</a>.'
this.inputs = [
{
label: 'Data Store API URL',
name: 'dataStoreApiUrl',
type: 'string',
placeholder: 'https://api-test.jlinc.io'
},
{
label: 'Data Store API Key',
name: 'dataStoreApiKey',
type: 'password',
placeholder: '<DATA_STORE_API_KEY>'
},
{
label: 'Archive API URL',
name: 'archiveApiUrl',
type: 'string',
placeholder: 'https://archive-test.jlinc.io'
},
{
label: 'Archive API Key',
name: 'archiveApiKey',
type: 'password',
placeholder: '<ARCHIVE_API_KEY>'
}
]
}
}

module.exports = { credClass: JlincApi }
33 changes: 33 additions & 0 deletions packages/components/nodes/analytic/JLINC/JLINC.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { INode, INodeParams } from '../../../src/Interface'

class JLINC_Analytic implements INode {
label: string
name: string
version: number
description: string
type: string
icon: string
category: string
baseClasses: string[]
inputs?: INodeParams[]
credential: INodeParams

constructor() {
this.label = 'JLINC'
this.name = 'jlinc'
this.version = 1.0
this.type = 'JLINC'
this.icon = 'jlinc.png'
this.category = 'Analytic'
this.baseClasses = [this.type]
this.inputs = []
this.credential = {
label: 'Connect Credential',
name: 'credential',
type: 'credential',
credentialNames: ['jlincApi']
}
}
}

module.exports = { nodeClass: JLINC_Analytic }
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions packages/components/nodes/tools/MCP/Atlassian/AtlassianMcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { Tool } from '@langchain/core/tools'
import { ICommonObject, INode, INodeData, INodeOptionsValue, INodeParams } from '../../../../src/Interface'
import { MCPToolkit } from '../core'
import { getCredentialData } from '../../../../src/utils'
import { ATLASSIAN_MCP_SERVER_URL } from '../../../../src/constants'

class Atlassian_MCP implements INode {
label: string
Expand Down Expand Up @@ -129,13 +130,8 @@ class Atlassian_MCP implements INode {
return []
}

if (!process.env.ATLASSIAN_MCP_SERVER_URL) {
console.error('ATLASSIAN_MCP_SERVER_URL environment variable is not set')
return []
}

const serverParams = {
url: `${process.env.ATLASSIAN_MCP_SERVER_URL}/sse`
url: `${ATLASSIAN_MCP_SERVER_URL}/sse`
}

const toolkit = new MCPToolkit(serverParams, 'sse', credentialData.access_token)
Expand Down
1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"graphql": "^16.11.0",
"html-to-text": "^9.0.5",
"ioredis": "^5.7.0",
"@jlinc/langchain": "^0.1.3",
"js-levenshtein": "^1.1.6",
"jsdom": "^22.1.0",
"json-logic-js": "^2.0.5",
Expand Down
4 changes: 3 additions & 1 deletion packages/components/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ export const GOOGLE_DRIVE_SUPPORTED_MIME_TYPES = [
'application/msword',
'application/vnd.ms-powerpoint',
'text/plain'
].join(',')
].join(',')

export const ATLASSIAN_MCP_SERVER_URL = 'https://atlassian-remote-mcp.last-rev-llc.workers.dev'
28 changes: 27 additions & 1 deletion packages/components/src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { DataSource } from 'typeorm'
import { ChatGenerationChunk } from '@langchain/core/outputs'
import { AIMessageChunk, BaseMessageLike } from '@langchain/core/messages'
import { Serialized } from '@langchain/core/load/serializable'
import { JLINCTracer } from '@jlinc/langchain'

interface AgentRun extends Run {
actions: AgentAction[]
Expand Down Expand Up @@ -590,7 +591,12 @@ export const additionalCallbacks = async (nodeData: INodeData, options: ICommonO
organizationId: options.user?.organizationId,
aiCredentialsOwnership: aiCredentialsOwnership,
messageId: options.messageId,
sessionId: options.sessionId
sessionId: options.sessionId,
...(options.trackingMetadata &&
Object.keys(options.trackingMetadata).reduce((acc, key) => {
acc[`tracking_${key}`] = options.trackingMetadata![key]
return acc
}, {} as Record<string, any>))
}
// const trace = langfuse.trace({
// tags: [`Name:${chatflow.name}`],
Expand Down Expand Up @@ -710,6 +716,26 @@ export const additionalCallbacks = async (nodeData: INodeData, options: ICommonO

const tracer: Tracer | undefined = getOpikTracer(opikOptions)
callbacks.push(tracer)
} else if (provider === 'jlinc') {
const dataStoreApiUrl = getCredentialParam('dataStoreApiUrl', credentialData, nodeData)
const dataStoreApiKey = getCredentialParam('dataStoreApiKey', credentialData, nodeData)
const archiveApiUrl = getCredentialParam('archiveApiUrl', credentialData, nodeData)
const archiveApiKey = getCredentialParam('archiveApiKey', credentialData, nodeData)
let agreementId = analytic[provider].agreementId as string
if (!agreementId || agreementId === '') {
agreementId = '00000000-0000-0000-0000-000000000000'
}
const systemPrefix = analytic[provider].systemPrefix as string
const tracer = new JLINCTracer({
dataStoreApiUrl,
dataStoreApiKey,
archiveApiUrl,
archiveApiKey,
agreementId,
systemPrefix,
debug: false
})
callbacks.push(tracer)
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ export * from './handler'
export * from './followUpPrompts'
export * from './validator'
export * from './agentflowv2Generator'

export { ATLASSIAN_MCP_SERVER_URL } from './constants'
22 changes: 22 additions & 0 deletions packages/docs/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Marketing & Analytics
# Facebook Pixel ID for webinar tracking (defaults to production pixel if not set)
# Default: 25220750360842472
DOCUSAURUS_FACEBOOK_PIXEL=

# Google Analytics 4 Measurement ID (defaults to production GA if not set)
# Default: G-VD1X9LNG3N
DOCUSAURUS_GA_ID=

# LinkedIn Insight Tag Partner ID (optional, no default)
DOCUSAURUS_LINKEDIN_PIXEL=

# Google Tag Manager ID (optional, no default)
DOCUSAURUS_GTM_ID=

# MailerLite Configuration
DOCUSAURUS_MAILERLITE_WEBFORM_ID=
DOCUSAURUS_MAILERLITE_ENABLED=true
DOCUSAURUS_MAILERLITE_API_BASE_URL=https://assets.mailerlite.com/api
DOCUSAURUS_MAILERLITE_GROUP_IDS=
DOCUSAURUS_MAILERLITE_DOUBLE_OPT_IN=false
DOCUSAURUS_MAILERLITE_REDIRECT_URL=
4 changes: 4 additions & 0 deletions packages/docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,10 @@ const config: Config = {
],
themes: ['docusaurus-theme-openapi-docs'], // export theme components

scripts: [],

headTags: [],

themeConfig: {
// Replace with your project's social card
image: 'img/answer-angent-ai-ogimage.png',
Expand Down
9 changes: 9 additions & 0 deletions packages/docs/openapi/prediction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,15 @@ components:
type: string
description: The MIME type of the file or resource
example: image/png
trackingMetadata:
type: object
description: Custom tracking metadata for analytics and reporting purposes (optional). This data is stored in the database and sent to Langfuse with field names prefixed with 'tracking_'.
additionalProperties: true
example:
url: https://example.com/page
source: my-application
userId: user-123
customField: customValue
PredictionResponse:
type: object
properties:
Expand Down
110 changes: 0 additions & 110 deletions packages/docs/sidebars.js

This file was deleted.

4 changes: 2 additions & 2 deletions packages/docs/src/components/WebinarCalendarButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function WebinarCalendarButtons(): JSX.Element | null {
return null
}

const title = encodeURIComponent('Enterprise AI Webinar: Deploy AI Agents in 4 Weeks')
const title = encodeURIComponent('Enterprise AI Webinar: Deploy AI Agents in weeks')
const details = encodeURIComponent(
"Live 60-minute working session with Bradley Taylor & Adam Harris. You'll get the 4-week deployment playbook, ROI calculator, and security checklist."
)
Expand All @@ -32,7 +32,7 @@ export default function WebinarCalendarButtons(): JSX.Element | null {
const googleLink = `https://calendar.google.com/calendar/render?action=TEMPLATE&text=${title}&dates=${startISO}/${endISO}&details=${details}&location=${location}`
const outlookLink = `https://outlook.live.com/calendar/0/deeplink/compose?subject=${title}&body=${details}&startdt=${startISO}&enddt=${endISO}&location=${location}`

const icsContent = `BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//AnswerAI//Enterprise AI Webinar//EN\nBEGIN:VEVENT\nUID:${startISO}@theanswer.ai\nDTSTAMP:${startISO}\nDTSTART:${startISO}\nDTEND:${endISO}\nSUMMARY:Enterprise AI Webinar: Deploy AI Agents in 4 Weeks\nDESCRIPTION:Live 60-minute working session with Bradley Taylor & Adam Harris.\nLOCATION:Live Online Webinar\nEND:VEVENT\nEND:VCALENDAR`
const icsContent = `BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//AnswerAI//Enterprise AI Webinar//EN\nBEGIN:VEVENT\nUID:${startISO}@theanswer.ai\nDTSTAMP:${startISO}\nDTSTART:${startISO}\nDTEND:${endISO}\nSUMMARY:Enterprise AI Webinar: Deploy AI Agents in weeks\nDESCRIPTION:Live 60-minute working session with Bradley Taylor & Adam Harris.\nLOCATION:Live Online Webinar\nEND:VEVENT\nEND:VCALENDAR`
const icsLink = `data:text/calendar;charset=utf8,${encodeURIComponent(icsContent)}`

return (
Expand Down
Loading
Loading