Skip to content

Commit 42b5109

Browse files
committed
init
0 parents  commit 42b5109

15 files changed

Lines changed: 210 additions & 0 deletions

File tree

.difyignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__
3+
4+
# Unit test / coverage reports
5+
tests
6+
7+
# UV
8+
uv.lock
9+
pyproject.toml
10+
.python-version
11+
12+
# Environments
13+
.env
14+
.venv
15+
16+
# IDE
17+
.vscode/
18+
.idea/
19+
20+
# Git
21+
.git/
22+
.gitignore
23+
.github/
24+
25+
# dify cli
26+
dify

.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
INSTALL_METHOD=remote
2+
REMOTE_INSTALL_HOST=debug.dify.ai
3+
REMOTE_INSTALL_PORT=5003
4+
REMOTE_INSTALL_KEY=b0895dc3-efe2-45d1-a8a7-39124d14ee46

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release Dify Plugin
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build-and-release:
12+
runs-on: ubuntu-latest
13+
env:
14+
REPO_NAME: ${{ github.event.repository.name }}
15+
16+
steps:
17+
- uses: actions/checkout@main
18+
- uses: davidkhala/uv-buildpack@main
19+
- name: Generate requirements.txt (consumed by dify)
20+
run: uv pip compile pyproject.toml -o requirements.txt
21+
- uses: davidkhala/build-dify-plugin@main
22+
with:
23+
pyproject-directory: .
24+
- name: Create Release
25+
uses: softprops/action-gh-release@master
26+
with:
27+
files: ${{ env.REPO_NAME }}.difypkg
28+
draft: false
29+
prerelease: false

.github/workflows/test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: ci
2+
on: push
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@main
9+
- uses: davidkhala/uv-buildpack@main
10+
with:
11+
test-entry-point: pytest
12+
- run: uv run --active main.py
13+
timeout-minutes: 1
14+
continue-on-error: true

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
__pycache__
2+
uv.lock
3+
requirements.txt
4+
.idea

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# dify-plugin
2+
3+
4+
**Author:** davidkhala
5+
**Type:** tool

_assets/icon.svg

Lines changed: 6 additions & 0 deletions
Loading

main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from dify_plugin import Plugin, DifyPluginEnv
2+
3+
plugin = Plugin(DifyPluginEnv(MAX_REQUEST_TIMEOUT=120))
4+
5+
if __name__ == "__main__":
6+
plugin.run()

manifest.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 0.0.0
2+
type: plugin
3+
author: davidkhala
4+
name: dify-plugin
5+
label:
6+
en_US: a dify plugin (manifest.label)
7+
description:
8+
en_US: a dify plugin (manifest.description)
9+
icon: icon.svg
10+
resource:
11+
memory: 268435456
12+
permission: {}
13+
plugins:
14+
tools:
15+
- provider.yaml
16+
meta:
17+
version: 0.0.0
18+
arch:
19+
- amd64
20+
- arm64
21+
runner:
22+
language: python
23+
version: "3.12"
24+
entrypoint: main
25+
minimum_dify_version: 1.11.4
26+
created_at: 2026-02-04T10:33:00+08:00
27+
verified: false
28+

provider.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
identity:
2+
author: davidkhala
3+
name: dify-plugin
4+
label:
5+
en_US: a dify plugin (provider.identity.label)
6+
description:
7+
en_US: HTML Extractor
8+
icon: icon.svg
9+
tags:
10+
- tools
11+
- utilities
12+
tools:
13+
- tools/tool.yaml
14+
extra:
15+
python:
16+
source: provider/__init__.py

0 commit comments

Comments
 (0)