Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
43 changes: 43 additions & 0 deletions .github/workflows/ci-nodejs-vercelsdk-sampleagent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

name: CI - Build Node.js Vercel SDK Sample Agent

on:
push:
branches: [ main, master ]
paths:
- 'nodejs/vercel-sdk/sample-agent/**/*'
pull_request:
branches: [ main, master ]
paths:
- 'nodejs/vercel-sdk/sample-agent/**/*'

jobs:
nodejs-vercelsdk-sampleagent:
name: Node.js Vercel SDK Sample Agent
permissions:
contents: read
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./nodejs/vercel-sdk/sample-agent

strategy:
matrix:
node-version: ['18', '20']

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Build
run: npm run build
5 changes: 3 additions & 2 deletions nodejs/vercel-sdk/sample-agent/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Client, getClient } from './client';

export class A365Agent extends AgentApplication<TurnState> {
agentName = "A365 Agent";
static authHandlerName: string = 'agentic';

constructor() {
super({
Expand All @@ -24,11 +25,11 @@ export class A365Agent extends AgentApplication<TurnState> {
// Route agent notifications
this.onAgentNotification("agents:*", async (context: TurnContext, state: TurnState, agentNotificationActivity: AgentNotificationActivity) => {
await this.handleAgentNotificationActivity(context, state, agentNotificationActivity);
});
}, 1, [A365Agent.authHandlerName]);

this.onActivity(ActivityTypes.Message, async (context: TurnContext, state: TurnState) => {
await this.handleAgentMessageActivity(context, state);
});
}, [A365Agent.authHandlerName]);
}

/**
Expand Down