Skip to content

Commit 2029b90

Browse files
committed
Agent plugin
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
1 parent 1deab8c commit 2029b90

19 files changed

+4024
-36
lines changed

.github/workflows/appkit-agent.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: appkit-agent
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "integrations/appkit-agent/**"
9+
- ".github/workflows/appkit-agent.yml"
10+
pull_request:
11+
types:
12+
- opened
13+
- synchronize
14+
- reopened
15+
- ready_for_review
16+
paths:
17+
- "integrations/appkit-agent/**"
18+
- ".github/workflows/appkit-agent.yml"
19+
workflow_dispatch:
20+
21+
defaults:
22+
run:
23+
working-directory: integrations/appkit-agent
24+
25+
jobs:
26+
test:
27+
runs-on: ubuntu-latest
28+
name: "test (node: ${{ matrix.node-version }})"
29+
strategy:
30+
matrix:
31+
node-version: ["18", "20", "22"]
32+
timeout-minutes: 10
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v4
36+
37+
- name: Install pnpm
38+
uses: pnpm/action-setup@v4
39+
40+
- name: Setup Node.js
41+
uses: actions/setup-node@v4
42+
with:
43+
node-version: ${{ matrix.node-version }}
44+
cache: "pnpm"
45+
46+
- name: Install dependencies
47+
run: pnpm install --frozen-lockfile
48+
49+
- name: Run tests
50+
run: pnpm run test
51+
52+
typecheck:
53+
runs-on: ubuntu-latest
54+
name: typecheck
55+
timeout-minutes: 10
56+
steps:
57+
- name: Checkout code
58+
uses: actions/checkout@v4
59+
60+
- name: Install pnpm
61+
uses: pnpm/action-setup@v4
62+
63+
- name: Setup Node.js
64+
uses: actions/setup-node@v4
65+
with:
66+
node-version: "20"
67+
cache: "pnpm"
68+
69+
- name: Install dependencies
70+
run: pnpm install --frozen-lockfile
71+
72+
- name: Run typecheck
73+
run: pnpm run typecheck
74+
75+
format:
76+
runs-on: ubuntu-latest
77+
name: format
78+
timeout-minutes: 10
79+
steps:
80+
- name: Checkout code
81+
uses: actions/checkout@v4
82+
83+
- name: Install pnpm
84+
uses: pnpm/action-setup@v4
85+
86+
- name: Setup Node.js
87+
uses: actions/setup-node@v4
88+
with:
89+
node-version: "20"
90+
cache: "pnpm"
91+
92+
- name: Install dependencies
93+
run: pnpm install --frozen-lockfile
94+
95+
- name: Check formatting
96+
run: pnpm run format:check
97+
98+
build:
99+
runs-on: ubuntu-latest
100+
name: build
101+
timeout-minutes: 10
102+
steps:
103+
- name: Checkout code
104+
uses: actions/checkout@v4
105+
106+
- name: Install pnpm
107+
uses: pnpm/action-setup@v4
108+
109+
- name: Setup Node.js
110+
uses: actions/setup-node@v4
111+
with:
112+
node-version: "20"
113+
cache: "pnpm"
114+
115+
- name: Install dependencies
116+
run: pnpm install --frozen-lockfile
117+
118+
- name: Build package
119+
run: pnpm run build
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Release @databricks/appkit-agent
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
production:
7+
description: "Publish to npm? (If unchecked, will publish with --tag next)"
8+
required: true
9+
default: false
10+
type: boolean
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
16+
permissions:
17+
id-token: write
18+
contents: write
19+
environment:
20+
name: ${{ inputs.production && 'npm' || 'npm-next' }}
21+
url: https://www.npmjs.com/package/@databricks/appkit-agent
22+
defaults:
23+
run:
24+
working-directory: integrations/appkit-agent
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install pnpm
29+
uses: pnpm/action-setup@v4
30+
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: "20"
34+
registry-url: "https://registry.npmjs.org"
35+
cache: "pnpm"
36+
37+
- name: Install dependencies
38+
run: pnpm install --frozen-lockfile
39+
40+
- name: Get package version
41+
id: get-version
42+
run: |
43+
PKG_VERSION=$(node -p "require('./package.json').version")
44+
echo "version=$PKG_VERSION" >> $GITHUB_OUTPUT
45+
46+
- name: Clean
47+
run: pnpm run clean
48+
49+
- name: Build
50+
run: pnpm run build
51+
52+
- name: Test
53+
run: pnpm run test
54+
55+
- name: Typecheck
56+
run: pnpm run typecheck
57+
58+
- name: Publish to npm
59+
if: inputs.production
60+
run: pnpm publish --access public --provenance --no-git-checks
61+
62+
- name: Publish to npm (next tag)
63+
if: ${{ !inputs.production }}
64+
run: pnpm publish --access public --tag next --provenance --no-git-checks
65+
66+
- name: Wait for registry propagation
67+
run: sleep 15
68+
69+
- name: Smoke test (production)
70+
if: inputs.production
71+
run: |
72+
PKG_VERSION=${{ steps.get-version.outputs.version }}
73+
mkdir -p /tmp/smoke-test
74+
cd /tmp/smoke-test
75+
npm install @databricks/appkit-agent@$PKG_VERSION
76+
INSTALLED_VERSION=$(node -p "require('./node_modules/@databricks/appkit-agent/package.json').version")
77+
echo "Expected: $PKG_VERSION"
78+
echo "Installed: $INSTALLED_VERSION"
79+
if [ "$PKG_VERSION" != "$INSTALLED_VERSION" ]; then
80+
echo "Version mismatch!"
81+
exit 1
82+
fi
83+
echo "Smoke test passed!"
84+
85+
- name: Smoke test (next tag)
86+
if: ${{ !inputs.production }}
87+
run: |
88+
mkdir -p /tmp/smoke-test
89+
cd /tmp/smoke-test
90+
npm install @databricks/appkit-agent@next
91+
INSTALLED_VERSION=$(node -p "require('./node_modules/@databricks/appkit-agent/package.json').version")
92+
echo "Installed @next version: $INSTALLED_VERSION"
93+
echo "Smoke test passed!"
94+
95+
- name: Generate package link
96+
run: |
97+
PKG_VERSION=${{ steps.get-version.outputs.version }}
98+
if [ "${{ inputs.production }}" == "true" ]; then
99+
LINK="https://www.npmjs.com/package/@databricks/appkit-agent/v/$PKG_VERSION"
100+
echo "## :rocket: Package Released" >> $GITHUB_STEP_SUMMARY
101+
echo "" >> $GITHUB_STEP_SUMMARY
102+
echo "**@databricks/appkit-agent v$PKG_VERSION** has been published to npm!" >> $GITHUB_STEP_SUMMARY
103+
echo "" >> $GITHUB_STEP_SUMMARY
104+
echo ":link: [$LINK]($LINK)" >> $GITHUB_STEP_SUMMARY
105+
else
106+
LINK="https://www.npmjs.com/package/@databricks/appkit-agent?activeTab=versions"
107+
echo "## :test_tube: Package Released (next tag)" >> $GITHUB_STEP_SUMMARY
108+
echo "" >> $GITHUB_STEP_SUMMARY
109+
echo "**@databricks/appkit-agent v$PKG_VERSION** has been published to npm with --tag next!" >> $GITHUB_STEP_SUMMARY
110+
echo "" >> $GITHUB_STEP_SUMMARY
111+
echo ":link: [$LINK]($LINK)" >> $GITHUB_STEP_SUMMARY
112+
fi
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"name": "@databricks/appkit-agent",
3+
"version": "0.1.0",
4+
"description": "Agent plugin for Databricks AppKit — LangGraph AI agent with streaming Responses API and MCP tool support",
5+
"type": "module",
6+
"main": "./dist/index.cjs",
7+
"module": "./dist/index.mjs",
8+
"types": "./dist/index.d.cts",
9+
"exports": {
10+
".": {
11+
"import": {
12+
"types": "./dist/index.d.mts",
13+
"default": "./dist/index.mjs"
14+
},
15+
"require": {
16+
"types": "./dist/index.d.cts",
17+
"default": "./dist/index.cjs"
18+
}
19+
}
20+
},
21+
"files": [
22+
"dist",
23+
"README.md",
24+
"LICENSE",
25+
"NOTICE"
26+
],
27+
"scripts": {
28+
"build": "tsdown",
29+
"dev": "tsdown --watch",
30+
"clean": "rm -rf dist",
31+
"test": "vitest run",
32+
"test:watch": "vitest",
33+
"typecheck": "tsc --noEmit",
34+
"lint": "eslint 'src/**/*.ts'",
35+
"format": "prettier --write 'src/**/*.ts'",
36+
"format:check": "prettier --check 'src/**/*.ts'"
37+
},
38+
"engines": {
39+
"node": ">=18.0.0"
40+
},
41+
"peerDependencies": {
42+
"@databricks/appkit": ">=0.21.0",
43+
"@databricks/langchainjs": ">=0.1.0",
44+
"@langchain/core": ">=1.0.0",
45+
"@langchain/langgraph": ">=1.0.0",
46+
"@langchain/mcp-adapters": ">=1.0.0",
47+
"express": ">=4.0.0"
48+
},
49+
"peerDependenciesMeta": {
50+
"@databricks/langchainjs": {
51+
"optional": true
52+
},
53+
"@langchain/core": {
54+
"optional": true
55+
},
56+
"@langchain/langgraph": {
57+
"optional": true
58+
},
59+
"@langchain/mcp-adapters": {
60+
"optional": true
61+
}
62+
},
63+
"dependencies": {
64+
"zod": "^4.3.5"
65+
},
66+
"devDependencies": {
67+
"@databricks/appkit": "^0.21.0",
68+
"@types/express": "^4.17.25",
69+
"@types/node": "^22.0.0",
70+
"prettier": "^3.0.0",
71+
"tsdown": "^0.9.0",
72+
"typescript": "^5.4.0",
73+
"vitest": "^4.0.18"
74+
},
75+
"author": {
76+
"name": "Databricks",
77+
"email": "agent-feedback@databricks.com"
78+
},
79+
"repository": {
80+
"type": "git",
81+
"url": "https://github.com/databricks/databricks-ai-bridge.git",
82+
"directory": "integrations/appkit-agent"
83+
},
84+
"homepage": "https://github.com/databricks/databricks-ai-bridge/tree/main/integrations/appkit-agent",
85+
"bugs": {
86+
"url": "https://github.com/databricks/databricks-ai-bridge/issues"
87+
},
88+
"keywords": [
89+
"databricks",
90+
"appkit",
91+
"agent",
92+
"ai",
93+
"langchain",
94+
"langgraph",
95+
"mcp",
96+
"llm"
97+
],
98+
"license": "Databricks License"
99+
}

0 commit comments

Comments
 (0)