20 Commits

Author SHA1 Message Date
Huakun
bb9a46935c
Feature: add drizzle (#264)
* feat: add drizzle orm

* feat: update drizzle configuration and schema management

- Added a check for DB_FILE_NAME in drizzle.config.ts to ensure it's set.
- Updated package.json to change the package name to @kksh/drizzle and added exports for schema and relations.
- Enhanced README.md with instructions for using the schema generation.
- Refactored schema.ts for improved readability and organization of imports.

* add tauri-plugin-sql

* feat: add database select and execute commands

- Introduced `select` and `execute` functions in the database module to facilitate querying and executing SQL commands.
- Updated the Tauri plugin to expose these commands, allowing for database interactions from the frontend.
- Added corresponding permissions for the new commands in the permissions configuration.
- Enhanced the database library with JSON value handling for query parameters.

* fix: sqlite select command

* drizzle ORM verified working

* refactor: clean up database module by removing unused SelectQueryResult type and disabling eslint for explicit any usage

* pnpm lock update

* Update enum definition for type safety

- Changed enum to use 'as const' for better type inference
- Ensured more robust handling of extension publish sources

* reimplemented most db command functions with ORM (migrate from tauri command invoke

* fixed searchExtensionData orm function

* Refactor ORM commands and searchExtensionData function for improved readability and consistency

- Reformatted import statements for better organization.
- Cleaned up whitespace and indentation in searchExtensionData function.
- Enhanced readability of SQL conditions and query building logic.
- Disabled eslint for explicit any usage in the troubleshooters page.

* Fix test assertions in database module to use array indexing for results

format rust code

* update deno lock

* move drizzle from desktop to drizzle package

* update pnpm version and lock

* refactor: migrate db tauri commands to drizzle

* refactor: remove unused extension and command CRUD operations from db module
2025-04-01 06:15:10 -04:00
Huakun
c39e98258c
Fix: kkrpc serialization backward compatibility (#256)
* update deno lock

* chore: update kkrpc and tauri-api-adapter versions, enhance serialization handling

- Bump kkrpc version to 0.2.2 in multiple packages including desktop and api.
- Update tauri-api-adapter version to 0.3.27.
- Introduce a new utility function to determine kkrpc serialization based on API version.
- Refactor RPC channel initialization to include serialization version in desktop extension handling.
- Increment desktop package version to 0.1.36 and api package version to 0.1.7.

* chore: update dependencies in pnpm-lock and package.json

- Upgrade postcss version for autoprefixer to 8.5.3 in pnpm-lock.yaml.
- Add semver package with version 7.7.1 in package.json.
- Update CHANGELOG.md to reflect recent kkrpc upgrades and changes.
2025-03-19 03:01:40 -04:00
Huakun
97cd20906f
Feature: add extension api (hide and paste) (#210)
* feat: add paste API to extension API

* feat(desktop): enhance clipboard and hotkey utilities

- Add `hideAndPaste` utility function to simplify window hiding and clipboard pasting
- Adjust key press and sleep timings for more reliable input simulation
- Implement window focus listener in clipboard extension
- Bind input element reference for automatic focus management

* feat(permissions): enhance clipboard permission handling

- Update clipboard permission schema to include paste permission
- Modify clipboard API to check for paste permission before executing
- Refactor permission map and schema for more flexible permission management

* feat(desktop): refactor extension command search and rendering

- Add `svelte-inspect-value` for debugging
- Implement new `ExtCmds` component to replace `ExtCmdsGroup`
- Enhance extension command search with separate Fuse.js instances for installed and dev extensions
- Simplify extension command filtering and rendering logic
- Add derived stores for extension commands with improved type safety

* feat(desktop): improve extension command search filtering

* bump @kksh/api version

* feat(permissions): add clipboard paste permission description
2025-02-26 04:47:43 -05:00
Huakun
a92c266d32
Feature: fine grain kill API for extension (#201)
* upgrade tauri-plugin-shellx

* feat(shell): add killPid method to shell API with new permission

* fix: extension new window

* feat(shell): enhance process management and logging in extensions

- Add debug logging for extension process events
- Implement process tracking in UI worker
- Update shell API to support custom process recording
- Modify extension template to demonstrate process spawning
- Refactor shell command handling with improved error handling

* Add killPid extension API to @kksh/api

* chore(deps): update tauri-plugin-shellx-api to version 2.0.15

* pnpm lock

* chore(deps): update dependencies and lock file

- Upgrade ESLint to version 9.21.0
- Update @types/bun to version 1.2.3
- Bump various development dependencies
- Reorganize package.json dependencies in ui package

* chore(deps): update SvelteKit template dependencies

- Add @eslint/js version 9.21.0
- Update package.json dependency order
- Sync pnpm-lock.yaml with package.json changes

* chore: add eslint to desktop

* chore(deps): remove local tauri-plugin-shellx and use published version 2.0.15

* bump desktop to 0.1.28
2025-02-26 02:06:06 -05:00
Huakun
ed20f9a142
Fix: linux extension loading (#188)
* fix: change escape key behavior to navigate home instead of back

* feat: load custom ui extension with http server on Linux

Linux now uses the same loading approach as Windows due to a bug https://github.com/tauri-apps/tauri/issues/12767

* feat: add tauri-plugin-system-info-api dependency to deno.lock
2025-02-22 04:36:44 -05:00
Huakun Shen
7b6c0934ab
Feature: add helper api (#95)
* feat: add helper API for installation guides and update UI components

- Implement helperAPI with methods to navigate to installation guides for Deno, FFmpeg, and Homebrew
- Update extension and help page components to use new helper API
- Modify command filtering in builtin commands
- Adjust page navigation in help pages to use goHome instead of goBack
- Remove unused imports and clean up components

* chore: bump @kksh/api to 0.1.2 and update dependent packages
2025-02-07 02:41:50 -05:00
Huakun Shen
46d6872614
refactor: Command class rename (#90)
* refactor: rename WorkerExtension to TemplateUiCommand, HeadlessWorkerExtension to HeadlessCommand

* ci: update npm publish workflow to include refactor branch

* ci: add push trigger for JSR publish workflow and bump API package version

* ci: add pnpm setup to npm publish workflow

* chore: add repository field to package.json for @kksh/api
2025-02-05 12:16:33 -05:00
Huakun Shen
0bb59e4f66
Fix: ext window loading (#82)
* fix: extension new window loading with localStorage

* fix: extension loading in new window

* upgrade: @kksh/svelte5

* refactor: update SideBar import to Sidebar across desktop app

* fix: safely remove test directories with existsSync check

* feat: add open preference command with platform-specific shortcut

* chore: clean up vite config trailing comma

* fix: iframe custom ext loading

* fix: fix template extension loading

* feat: add progress bar to extension form and list views

* feat: add optional description to form view template
2025-01-28 09:44:46 -05:00
Huakun Shen
c93ebd895e
Fix: ext window loading (#81)
* fix: extension new window loading with localStorage

* fix: extension loading in new window

* upgrade: @kksh/svelte5

* refactor: update SideBar import to Sidebar across desktop app

* fix: safely remove test directories with existsSync check

* feat: add open preference command with platform-specific shortcut

* chore: clean up vite config trailing comma
2025-01-28 04:58:54 -05:00
Huakun Shen
b115e0a574
Feature: i18n (#70)
* chore: add @inlang/paraglide-sveltekit to @kksh/ui

* feat: add i18n to desktop

* fix: add shrink-0 class to mode-toggle button for consistent styling

* feat: add i18n to settings, not working yet

* feat: i18 working

* feat: add i18n for about

* feat: migrate all goto to use i18n.resolveRoute

* feat: finish translating settings to chinese

* feat: add Chinese i18n for troubleshooters

* feat: add russian translation (by AI)

* format: run prettier

* format

* chore: update .prettierignore to exclude src/lib/paraglide/**
2025-01-19 23:22:15 -05:00
Huakun Shen
e4d1441d73
Feature: support npm extension publish (#62)
* feat: npm package registry API

* refactor: move package registry files

* refactor: move jsr and npm api to a new package

* ci: add verify-package-export

* test: implement tests for npm package validation as kunkun extension

* chore: add missing dep for package-registry pkg

* feat: make provenance an optional input for npm validation function

* ci: add verify-package-export as dev dep to 2 packages that uses it

* feat: add rekor log API, and return commit from jsr & npm package in validation function

* feat: return github repo info from validation function of jsr and npm

* feat: extend ExtPublishMetadata to include optional GitHub repository details

* fix: eslint for ui package

* refactor: format desktop

* fix: eslint errors in desktop

* format: all code

* ci: add lint to CI

* feat: add more info to validation function returned from package-registry npm jsr

* pnpm lock

* feat: add 2 more variables to supabase extension metadata model

* format

* feat: add provenance card

* feat: add workflow path to ExtPublishMetadata and jsr/npm validation

* update provenance

* feat: make store extension and provenance more responsive

* chore: add globals to ui package

* fix: remove unnecessary any to fix eslint

* fix: svg sanitize

* chore: add @typescript-eslint/eslint-plugin to ui package to fix eslint

* fix: update eslint dep to fix error

* fix: try fixing eslint

* fix: update eslint configuration for improved compatibility

* chore: add globals package and update README for Discord invite

* fix: update eslint rules and upgrade typescript-eslint dependency

- Disabled additional eslint rules to resolve errors:
  - @typescript-eslint/no-unused-expressions
  - svelte/no-inner-declarations
- Upgraded typescript-eslint from version 8.19.1 to 8.20.0 for improved compatibility.

* update pnpm lock

---------

Co-authored-by: Huakun Shen <huaukun.shen@huakunshen.com>
2025-01-16 06:00:07 -05:00
Huakun Shen
130608cd92 fix: fixed some small extension loading and installation bug 2025-01-12 12:56:13 -05:00
Huakun Shen
f89cf8fe6a
Feature: Headless Command (#44)
* chore: add check-types

* refactor: api package file structure update

* feat: add headless worker extension API

* feat: add HeadlessCmd to manifest schema

* feat: make each type of cmds optional in manifest

There may be more types of cmds in the future, this makes backward compatibility easier.

* feat: implement headless extension command in app

A demo cmd implemented as well.

* refactor: move api package's API server files

* refactor: reformat all
2025-01-05 21:12:56 -05:00
Huakun Shen
caa252b4dd
feature: splashscreen (#36)
* feat: move all pages to app folder, add splashscreen

* feat: use Dance as splashscreen

* feat: add zoom in for splashscreen logo

* refactor: move svelte files into app folder

* fix: url prefix with /app

* refactor: remove platform-specific tauri conf

Merge windows back to main tauri config. The reason I separated them was
because I need decoration: true on mac and false on windows and linux.
Now I use tauri rust API to set decorations to false for win and linux.
2024-12-21 04:04:05 -05:00
Huakun Shen
7b9be980b9
feat: implement extension spawned process auto cleanup
If extension doesn't kill the processes it spawns, Kunkun will auto clean up all spawned processes on exit/window close
2024-11-12 14:40:27 -05:00
Huakun Shen
c7003326db
fix: implemented file server for custom UI commands on Windows (#24) 2024-11-12 12:25:24 -05:00
Huakun Shen
4a05c5a475
[Feature] Implement UI template worker command (#20)
* feat: add ui worker command loading code (not working yet)

* feat: add unocss

* feat: add-dev-extension page

* feat: implemented list view template

* feat: implement list view detail view width, add demo extension for dev

* fix: resize listview, add metadata component

* fix: metadata tag component  background color

* feat: implement boolean (checkbox), date fields for form template

* feat: support default, optional, placeholder for form fields

* feat: implemented form view Select Field

* feat: markdown view

* feat: fixed a markdown schema type error

* fix: markdown styling

* feat: implement action panel for UI worker template list view

* format: format all

* chore: bump desktop version

* fix: fix search term bind in list view
2024-11-08 15:12:20 -05:00
Huakun Shen
2c99f231f7
[feat] troubleshooters (#15)
* feat: add extension loading troubleshooter

* feat: add extension permission inspector

* feat: add extension window map troubleshooter (WIP)

* fix: unregister extension when window is closed
2024-11-05 06:04:34 -05:00
Huakun Shen
ad83e89e52
feat: implement pixel dance animation component, page and command (#8)
* feat: implement pixel dance animation component, page and command

* feat: make entire dance page draggable

* feat: add dance transition for ui-iframe extension loading
2024-11-03 19:34:07 -05:00
Huakun Shen
ed87fc6c12
App Setup (#2)
* chore: add vendor submodules

* feat: add packages for db,ci,schema,api,jarvis cmds

* feat: add tauri-jarvis-plugin

* feat: implement extension commands list

* fix(desktop): import path errors after packages refactor

* chore: add self signed cert

* fix: prevent prerender for desktop

* fix(desktop): desktop sveltekit static build, use csr for dynamic route

* feat: add error handling page and components

* refactor: component lib

* refactor: move more types, functions and components out of desktop

* refactor(ui): more refactor

* refactor(ui): move store components to @kksh/ui

* ci: add CI for build & test

* refactor: rename @kksh/extensions to @kksh/extension

* ci: add 2 more ci

* ci: fix

* fix: CI env var

* chore: add changeset

* feat: implement extension store item detail view

* feat: implement extension store install, uninstall, upgrade

* format

* revert: upgradable logic, the new one doesn't work yet

* refactor: make @kksh/ui dependent only on @kksh/api

Reason: @kksh/ui may be published later for building website, all its dependency packages must be also published. To avoid trouble it should be standalone, depend only on packages already published

* refactor: cleanup

* fixed: some typescript error

* chore: got typedoc working on @kksh/api

* ci: disable manifest schema upload CI on push
2024-11-03 13:54:44 -05:00