Merge main

This commit is contained in:
Daniel 2023-10-19 17:14:31 +08:00
commit 9e97440c2e
29 changed files with 120 additions and 54440 deletions

View File

@ -1,29 +0,0 @@
name: Jan Docs Test Build
on:
pull_request:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/deploy-jan-docs.yml'
- '.github/workflows/jan-docs-test.yml'
jobs:
deploy:
name: Test Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: './docs/yarn.lock'
- name: Install dependencies
run: yarn install
working-directory: docs
- name: Test Build Command
run: sed -i '/process.env.DEBUG = namespaces;/c\// process.env.DEBUG = namespaces;' ./node_modules/debug/src/node.js && yarn build
working-directory: docs

View File

@ -1,4 +1,4 @@
name: Deploy to GitHub Pages name: Jan Docs
on: on:
push: push:
@ -6,7 +6,12 @@ on:
- main - main
paths: paths:
- 'docs/**' - 'docs/**'
- '.github/workflows/deploy-jan-docs.yml' pull_request:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/jan-docs.yml'
# Review gh actions docs if you want to further define triggers, paths, etc # Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
@ -19,8 +24,6 @@ jobs:
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 18 node-version: 18
cache: 'yarn'
cache-dependency-path: './docs/yarn.lock'
- name: Install dependencies - name: Install dependencies
run: yarn install run: yarn install
@ -30,11 +33,13 @@ jobs:
working-directory: docs working-directory: docs
- name: Add Custome Domain file - name: Add Custome Domain file
if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository
run: echo "${{ vars.DOCUSAURUS_DOMAIN }}" > ./docs/build/CNAME run: echo "${{ vars.DOCUSAURUS_DOMAIN }}" > ./docs/build/CNAME
# Popular action to deploy to GitHub Pages: # Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v3
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,4 +1,4 @@
name: Jan Build MacOS App name: Jan Build Electron App
on: on:
push: push:

View File

@ -1,11 +1,11 @@
name: Linter & Test name: Jan Electron Linter & Test
on: on:
push: push:
branches: branches:
- main - main
paths: paths:
- 'electron/**' - 'electron/**'
- .github/workflows/linter-and-test.yml - .github/workflows/jan-electron-linter-and-test.yml
- 'web/**' - 'web/**'
- 'package.json' - 'package.json'
- 'node_modules/**' - 'node_modules/**'

View File

@ -1,11 +1,17 @@
name: Publish plugin core Package to npmjs name: Plugin Core
on: on:
push: push:
branches: branches:
- main - main
paths: paths:
- "core/**" - "core/**"
- ".github/workflows/publish-core.yml" - "!core/package.json"
pull_request:
branches:
- main
paths:
- "core/**"
- ".github/workflows/jan-plugin-core.yml"
- "!core/package.json" - "!core/package.json"
jobs: jobs:
build-and-publish-plugins: build-and-publish-plugins:
@ -50,11 +56,13 @@ jobs:
- run: npm install && npm run build - run: npm install && npm run build
working-directory: ./core working-directory: ./core
- run: npm publish --access public - run: npm publish --access public
if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: ./core working-directory: ./core
- name: "Commit new version to main and create tag" - name: "Commit new version to main and create tag"
if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository
run: | run: |
version=$(jq -r '.version' core/package.json) version=$(jq -r '.version' core/package.json)
git config --global user.email "service@jan.ai" git config --global user.email "service@jan.ai"

View File

@ -1,11 +1,17 @@
name: Publish plugins/$dir Package to npmjs name: Jan Default Plugins
on: on:
push: push:
branches: branches:
- main - main
paths: paths:
- "plugins/**" - "plugins/**"
- ".github/workflows/publish-plugins.yml" - "!plugins/*/package.json"
pull_request:
branches:
- main
paths:
- "plugins/**"
- ".github/workflows/jan-plugins.yml"
- "!plugins/*/package.json" - "!plugins/*/package.json"
jobs: jobs:
build: build:
@ -69,13 +75,16 @@ jobs:
echo $dir echo $dir
cd $dir cd $dir
npm install && npm run build npm install && npm run build
npm publish --access public if [[ $GITHUB_EVENT_NAME == 'push' && $GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME != $GITHUB_REPOSITORY ]]; then
npm publish --access public
fi
cd .. cd ..
done done
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: "Commit new version to main and create tag" - name: "Commit new version to main and create tag"
if: github.event_name == 'push' && github.event.pull_request.head.repo.full_name != github.repository
run: | run: |
for dir in $(cat /tmp/change_dir.txt) for dir in $(cat /tmp/change_dir.txt)
do do

View File

@ -1,39 +0,0 @@
name: Linter & Sonarqube scanner
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-lint:
runs-on: ubuntu-latest
steps:
- name: Getting the repo
uses: actions/checkout@v2
- name: create sonar properties file
run: |
echo "Branch Name ${GITHUB_REF#refs/heads/}"
echo -e "sonar.sources = ." > sonar-project.properties
echo -e "sonar.projectKey = ${{ secrets.PROJECT_KEY }}" >> sonar-project.properties
if [[ "${{ github.event_name }}" == "push" ]]; then
echo -e "sonar.branch.name = ${GITHUB_REF#refs/heads/}" >> sonar-project.properties
fi
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# Check the Quality Gate status.
- name: SonarQube Quality Gate check
id: sonarqube-quality-gate-check
uses: sonarsource/sonarqube-quality-gate-action@master
# Force to fail step after specific time.
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} #OPTIONAL

1
.gitignore vendored
View File

@ -11,6 +11,7 @@ dist
build build
.DS_Store .DS_Store
electron/renderer electron/renderer
package-lock.json
*.log *.log
plugin-core/lib plugin-core/lib

View File

@ -1,5 +0,0 @@
newadr:
@echo "Initiating an ADR..."
@read -p "Enter ADR number (e.g. 001): " number; \
read -p "Enter ADR title: " title; \
cp $(CURDIR)/adr/adr-template.md $(CURDIR)/adr/adr-$${number}-$${title}.md

14
adr/Makefile Normal file
View File

@ -0,0 +1,14 @@
newadr:
@echo "Initiating an ADR..."
@last_number=$$(ls $(CURDIR)/adr-[0-9][0-9][0-9]-* | sort -V | tail -n 1 | cut -d '-' -f 2); \
last_number=$$(echo $$last_number | sed 's/^0*//'); \
next_number=$$(printf "%03d" $$(( $$last_number + 1 ))); \
read -p "Enter ADR title: " title; \
title=$$(echo $$title | tr ' ' '-'); \
cp $(CURDIR)/adr-template.md $(CURDIR)/adr-$$next_number-$$title.md; \
date=$$(date +%Y-%m-%d); \
usernames=$$(git config user.name); \
sed -i '' 's/{ADR-NUM}/'$$next_number'/g' $(CURDIR)/adr-$$next_number-$$title.md; \
sed -i '' 's/{TITLE}/'$$title'/g' $(CURDIR)/adr-$$next_number-$$title.md; \
sed -i '' 's/{DATE}/'$$date'/g' $(CURDIR)/adr-$$next_number-$$title.md; \
sed -i '' 's/{USERNAMES}/'$$usernames'/g' $(CURDIR)/adr-$$next_number-$$title.md

View File

@ -0,0 +1,48 @@
# ADR 005: model-installation
## Changelog
- 2023-10-18: Initial draft
## Authors
- 0xSage
## Status
Proposed
## Context
There are a few issues with our current model installation method (hardcoding jsons in /models repo):
- Users want to add their own model binaries
- Maintaining /models is too manual
## Decision
Let Users download models on their own & manually import them to Jan via a "add a model" UI
Links:
- Github issue: https://github.com/janhq/jan/issues/359
- Related issue: https://github.com/janhq/jan/issues/304
- Designs: https://www.figma.com/file/JdK7cNIBeVdYeHxKiYeWtk/JAN---Web?type=design&node-id=4092-58218&mode=design&t=8OmFSG0E6I8Y3IjY-0
## Consequences
Closed alternate solutions:
- https://github.com/janhq/jan/issues/328
## Alternatives
Thinking through the model selection experience, there are a few possibilities:
1. [current] We hardcode models (via Github) to show up in Explore Models => unnecessarily manual, missing models users want
1. We mirror HF models for a faster download => users can also do nitro add llama2
1. [CHOSEN] Users download models on their own & manually import them to Jan via a "add a model" UI => I like this option actually
1. [LATER] Users paste in a HF link and download the model in Explore Models => do we still render model cards for them?
1. Users manage their own models folder, e.g. /Users/nicole/models, then they set folder path in Jan. => this one needs a lot of designs/fe work
## Reference

View File

@ -1,10 +1,12 @@
# ADR {ADR-NUM}: {TITLE} # ADR {ADR-NUM}: {TITLE}
## Changelog ## Changelog
- {date}: {changelog}
- {DATE}: Initial draft
## Authors ## Authors
- @usernames
- {USERNAMES}
## Status ## Status

View File

@ -6,6 +6,9 @@ export enum EventName {
OnNewMessageRequest = "onNewMessageRequest", OnNewMessageRequest = "onNewMessageRequest",
OnNewMessageResponse = "onNewMessageResponse", OnNewMessageResponse = "onNewMessageResponse",
OnMessageResponseUpdate = "onMessageResponseUpdate", OnMessageResponseUpdate = "onMessageResponseUpdate",
OnDownloadUpdate = "onDownloadUpdate",
OnDownloadSuccess = "onDownloadSuccess",
OnDownloadError = "onDownloadError",
} }
/** /**

36
core/package-lock.json generated
View File

@ -1,36 +0,0 @@
{
"name": "@janhq/core",
"version": "0.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@janhq/core",
"version": "0.1.0",
"license": "MIT",
"devDependencies": {
"@types/node": "^12.0.2",
"typescript": "^5.2.2"
}
},
"node_modules/@types/node": {
"version": "12.20.55",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz",
"integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==",
"dev": true
},
"node_modules/typescript": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
}
}
}

View File

@ -1,6 +1,6 @@
{ {
"name": "@janhq/core", "name": "@janhq/core",
"version": "0.1.2", "version": "0.1.5",
"description": "Plugin core lib", "description": "Plugin core lib",
"keywords": [ "keywords": [
"jan", "jan",

View File

@ -27,11 +27,11 @@ Jan is a fully remote team. We use the money we save from not having an office,
To help us manage RSVPs, please use the Eventbrite links below to RSVP for each event. To help us manage RSVPs, please use the Eventbrite links below to RSVP for each event.
| Day | Eventbrite Link | Signups | | Day | Eventbrite Link | Signups |
| ------------ | ------------------------------------ | ---------------------------------------------------- | | ------------ | ------------------------------------- | -------------------------------------------------------------------------------------------- |
| Mon (23 Oct) | Jan Team & Partners Dinner | Invite-only | | Mon (23 Oct) | Jan Team & Partners Dinner | Invite-only |
| Wed (25 Oct) | Intro to LLMs | [RSVP here](https://jan-tech-talks.eventbrite.sg/) | | Wed (25 Oct) | Intro to LLMs | [RSVP here](https://www.eventbrite.sg/e/intro-to-large-language-models-tickets-737819045627) |
| Fri (27 Oct) | Jan Launch Party: Build your own LLM | [RSVP here](https://jan-launch-party.eventbrite.sg/) | | Fri (27 Oct) | Jan Launch Party + Build your own LLM | [RSVP here](https://jan-launch-party.eventbrite.sg/) |
### OKRs ### OKRs

15437
docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

14031
package-lock.json generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@janhq/data-plugin", "name": "@janhq/data-plugin",
"version": "1.0.3", "version": "1.0.5",
"description": "The Data Connector provides easy access to a data API using the PouchDB engine. It offers accessible data management capabilities.", "description": "The Data Connector provides easy access to a data API using the PouchDB engine. It offers accessible data management capabilities.",
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/circle-stack.svg", "icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/circle-stack.svg",
"main": "dist/esm/index.js", "main": "dist/esm/index.js",
@ -40,7 +40,7 @@
"node_modules" "node_modules"
], ],
"dependencies": { "dependencies": {
"@janhq/core": "^0.1.1", "@janhq/core": "^0.1.3",
"pouchdb-find": "^8.0.1", "pouchdb-find": "^8.0.1",
"pouchdb-node": "^8.0.1" "pouchdb-node": "^8.0.1"
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@janhq/inference-plugin", "name": "@janhq/inference-plugin",
"version": "1.0.4", "version": "1.0.6",
"description": "Inference Plugin, powered by @janhq/nitro, bring a high-performance Llama model inference in pure C++.", "description": "Inference Plugin, powered by @janhq/nitro, bring a high-performance Llama model inference in pure C++.",
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/command-line.svg", "icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/command-line.svg",
"main": "dist/index.js", "main": "dist/index.js",
@ -26,7 +26,7 @@
"webpack-cli": "^5.1.4" "webpack-cli": "^5.1.4"
}, },
"dependencies": { "dependencies": {
"@janhq/core": "^0.1.2", "@janhq/core": "^0.1.3",
"kill-port-process": "^3.2.0", "kill-port-process": "^3.2.0",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"tcp-port-used": "^1.0.2", "tcp-port-used": "^1.0.2",

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@janhq/model-management-plugin", "name": "@janhq/model-management-plugin",
"version": "1.0.4", "version": "1.0.6",
"description": "Model Management Plugin provides model exploration and seamless downloads", "description": "Model Management Plugin provides model exploration and seamless downloads",
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/queue-list.svg", "icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/queue-list.svg",
"main": "dist/index.js", "main": "dist/index.js",
@ -27,7 +27,7 @@
"README.md" "README.md"
], ],
"dependencies": { "dependencies": {
"@janhq/core": "^0.1.1", "@janhq/core": "^0.1.3",
"ts-loader": "^9.5.0" "ts-loader": "^9.5.0"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@janhq/monitoring-plugin", "name": "@janhq/monitoring-plugin",
"version": "1.0.3", "version": "1.0.5",
"description": "Utilizing systeminformation, it provides essential System and OS information retrieval", "description": "Utilizing systeminformation, it provides essential System and OS information retrieval",
"icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/cpu-chip.svg", "icon": "https://raw.githubusercontent.com/tailwindlabs/heroicons/88e98b0c2b458553fbadccddc2d2f878edc0387b/src/20/solid/cpu-chip.svg",
"main": "dist/index.js", "main": "dist/index.js",
@ -21,7 +21,7 @@
"webpack-cli": "^5.1.4" "webpack-cli": "^5.1.4"
}, },
"dependencies": { "dependencies": {
"@janhq/core": "^0.1.1", "@janhq/core": "^0.1.3",
"systeminformation": "^5.21.8", "systeminformation": "^5.21.8",
"ts-loader": "^9.5.0" "ts-loader": "^9.5.0"
}, },

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@janhq/azure-openai-plugin", "name": "@janhq/azure-openai-plugin",
"version": "1.0.3", "version": "1.0.5",
"description": "Inference plugin for Azure OpenAI", "description": "Inference plugin for Azure OpenAI",
"icon": "https://static-assets.jan.ai/openai-icon.jpg", "icon": "https://static-assets.jan.ai/openai-icon.jpg",
"main": "dist/index.js", "main": "dist/index.js",
@ -26,7 +26,7 @@
"webpack-cli": "^5.1.4" "webpack-cli": "^5.1.4"
}, },
"dependencies": { "dependencies": {
"@janhq/core": "^0.1.1", "@janhq/core": "^0.1.3",
"azure-openai": "^0.9.4", "azure-openai": "^0.9.4",
"kill-port-process": "^3.2.0", "kill-port-process": "^3.2.0",
"tcp-port-used": "^1.0.2", "tcp-port-used": "^1.0.2",

6698
yarn.lock

File diff suppressed because it is too large Load Diff