Skip to content

Commit bc6e379

Browse files
committed
Agent plugin
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
1 parent 472e162 commit bc6e379

24 files changed

+8447
-0
lines changed

.github/workflows/appkit-agent.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
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: ["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+
with:
40+
version: 10
41+
42+
- name: Setup Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: ${{ matrix.node-version }}
46+
cache: "pnpm"
47+
cache-dependency-path: integrations/appkit-agent/pnpm-lock.yaml
48+
49+
- name: Install dependencies
50+
run: pnpm install --frozen-lockfile
51+
52+
- name: Run tests
53+
run: pnpm run test
54+
55+
typecheck:
56+
runs-on: ubuntu-latest
57+
name: typecheck
58+
timeout-minutes: 10
59+
steps:
60+
- name: Checkout code
61+
uses: actions/checkout@v4
62+
63+
- name: Install pnpm
64+
uses: pnpm/action-setup@v4
65+
with:
66+
version: 10
67+
68+
- name: Setup Node.js
69+
uses: actions/setup-node@v4
70+
with:
71+
node-version: "20"
72+
cache: "pnpm"
73+
cache-dependency-path: integrations/appkit-agent/pnpm-lock.yaml
74+
75+
- name: Install dependencies
76+
run: pnpm install --frozen-lockfile
77+
78+
- name: Run typecheck
79+
run: pnpm run typecheck
80+
81+
format:
82+
runs-on: ubuntu-latest
83+
name: format
84+
timeout-minutes: 10
85+
steps:
86+
- name: Checkout code
87+
uses: actions/checkout@v4
88+
89+
- name: Install pnpm
90+
uses: pnpm/action-setup@v4
91+
with:
92+
version: 10
93+
94+
- name: Setup Node.js
95+
uses: actions/setup-node@v4
96+
with:
97+
node-version: "20"
98+
cache: "pnpm"
99+
cache-dependency-path: integrations/appkit-agent/pnpm-lock.yaml
100+
101+
- name: Install dependencies
102+
run: pnpm install --frozen-lockfile
103+
104+
- name: Check formatting
105+
run: pnpm run format:check
106+
107+
build:
108+
runs-on: ubuntu-latest
109+
name: build
110+
timeout-minutes: 10
111+
steps:
112+
- name: Checkout code
113+
uses: actions/checkout@v4
114+
115+
- name: Install pnpm
116+
uses: pnpm/action-setup@v4
117+
with:
118+
version: 10
119+
120+
- name: Setup Node.js
121+
uses: actions/setup-node@v4
122+
with:
123+
node-version: "20"
124+
cache: "pnpm"
125+
cache-dependency-path: integrations/appkit-agent/pnpm-lock.yaml
126+
127+
- name: Install dependencies
128+
run: pnpm install --frozen-lockfile
129+
130+
- name: Build package
131+
run: pnpm run build
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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+
with:
31+
version: 10
32+
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version: "20"
36+
registry-url: "https://registry.npmjs.org"
37+
cache: "pnpm"
38+
cache-dependency-path: integrations/appkit-agent/pnpm-lock.yaml
39+
40+
- name: Install dependencies
41+
run: pnpm install --frozen-lockfile
42+
43+
- name: Get package version
44+
id: get-version
45+
run: |
46+
PKG_VERSION=$(node -p "require('./package.json').version")
47+
echo "version=$PKG_VERSION" >> $GITHUB_OUTPUT
48+
49+
- name: Clean
50+
run: pnpm run clean
51+
52+
- name: Build
53+
run: pnpm run build
54+
55+
- name: Test
56+
run: pnpm run test
57+
58+
- name: Typecheck
59+
run: pnpm run typecheck
60+
61+
- name: Publish to npm
62+
if: inputs.production
63+
run: pnpm publish --access public --provenance --no-git-checks
64+
65+
- name: Publish to npm (next tag)
66+
if: ${{ !inputs.production }}
67+
run: pnpm publish --access public --tag next --provenance --no-git-checks
68+
69+
- name: Wait for registry propagation
70+
run: sleep 15
71+
72+
- name: Smoke test (production)
73+
if: inputs.production
74+
run: |
75+
PKG_VERSION=${{ steps.get-version.outputs.version }}
76+
mkdir -p /tmp/smoke-test
77+
cd /tmp/smoke-test
78+
npm install @databricks/appkit-agent@$PKG_VERSION
79+
INSTALLED_VERSION=$(node -p "require('./node_modules/@databricks/appkit-agent/package.json').version")
80+
echo "Expected: $PKG_VERSION"
81+
echo "Installed: $INSTALLED_VERSION"
82+
if [ "$PKG_VERSION" != "$INSTALLED_VERSION" ]; then
83+
echo "Version mismatch!"
84+
exit 1
85+
fi
86+
echo "Smoke test passed!"
87+
88+
- name: Smoke test (next tag)
89+
if: ${{ !inputs.production }}
90+
run: |
91+
mkdir -p /tmp/smoke-test
92+
cd /tmp/smoke-test
93+
npm install @databricks/appkit-agent@next
94+
INSTALLED_VERSION=$(node -p "require('./node_modules/@databricks/appkit-agent/package.json').version")
95+
echo "Installed @next version: $INSTALLED_VERSION"
96+
echo "Smoke test passed!"
97+
98+
- name: Generate package link
99+
run: |
100+
PKG_VERSION=${{ steps.get-version.outputs.version }}
101+
if [ "${{ inputs.production }}" == "true" ]; then
102+
LINK="https://www.npmjs.com/package/@databricks/appkit-agent/v/$PKG_VERSION"
103+
echo "## :rocket: Package Released" >> $GITHUB_STEP_SUMMARY
104+
echo "" >> $GITHUB_STEP_SUMMARY
105+
echo "**@databricks/appkit-agent v$PKG_VERSION** has been published to npm!" >> $GITHUB_STEP_SUMMARY
106+
echo "" >> $GITHUB_STEP_SUMMARY
107+
echo ":link: [$LINK]($LINK)" >> $GITHUB_STEP_SUMMARY
108+
else
109+
LINK="https://www.npmjs.com/package/@databricks/appkit-agent?activeTab=versions"
110+
echo "## :test_tube: Package Released (next tag)" >> $GITHUB_STEP_SUMMARY
111+
echo "" >> $GITHUB_STEP_SUMMARY
112+
echo "**@databricks/appkit-agent v$PKG_VERSION** has been published to npm with --tag next!" >> $GITHUB_STEP_SUMMARY
113+
echo "" >> $GITHUB_STEP_SUMMARY
114+
echo ":link: [$LINK]($LINK)" >> $GITHUB_STEP_SUMMARY
115+
fi
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
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+
"@langchain/core": "^1.1.8",
69+
"@types/express": "^4.17.25",
70+
"@types/node": "^22.0.0",
71+
"prettier": "^3.0.0",
72+
"tsdown": "^0.9.0",
73+
"typescript": "^5.4.0",
74+
"vitest": "^4.0.18"
75+
},
76+
"author": {
77+
"name": "Databricks",
78+
"email": "agent-feedback@databricks.com"
79+
},
80+
"repository": {
81+
"type": "git",
82+
"url": "https://github.com/databricks/databricks-ai-bridge.git",
83+
"directory": "integrations/appkit-agent"
84+
},
85+
"homepage": "https://github.com/databricks/databricks-ai-bridge/tree/main/integrations/appkit-agent",
86+
"bugs": {
87+
"url": "https://github.com/databricks/databricks-ai-bridge/issues"
88+
},
89+
"keywords": [
90+
"databricks",
91+
"appkit",
92+
"agent",
93+
"ai",
94+
"langchain",
95+
"langgraph",
96+
"mcp",
97+
"llm"
98+
],
99+
"license": "Databricks License",
100+
"pnpm": {
101+
"onlyBuiltDependencies": [
102+
"@databricks/appkit",
103+
"esbuild",
104+
"protobufjs",
105+
"rolldown"
106+
]
107+
}
108+
}

0 commit comments

Comments
 (0)