├── packages ├── schema │ ├── index.ts │ ├── .vscode │ │ ├── extensions.json │ │ └── settings.json │ ├── scripts │ │ └── print-schema.ts │ ├── src │ │ └── utils.ts │ ├── dev.ts │ └── README.md ├── api │ ├── src │ │ ├── ui │ │ │ ├── README.md │ │ │ ├── worker │ │ │ │ ├── schema │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── keyboard.ts │ │ │ │ │ └── markdown.ts │ │ │ │ └── components │ │ │ │ │ ├── interfaces.ts │ │ │ │ │ ├── common.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── markdown.ts │ │ │ │ │ └── icon.ts │ │ │ ├── api │ │ │ │ ├── deno.ts │ │ │ │ └── worker-ui.ts │ │ │ └── server │ │ │ │ ├── __tests__ │ │ │ │ └── fs.test.ts │ │ │ │ └── utils.ts │ │ ├── permissions │ │ │ └── index.ts │ │ ├── commands │ │ │ ├── common.ts │ │ │ ├── utils.ts │ │ │ ├── mdns.ts │ │ │ ├── index.ts │ │ │ ├── path.ts │ │ │ └── mac-security.ts │ │ ├── index.ts │ │ ├── utils │ │ │ ├── __tests__ │ │ │ │ └── path.test.ts │ │ │ └── permission-check.ts │ │ ├── models │ │ │ ├── apps.ts │ │ │ ├── index.ts │ │ │ └── mdns.ts │ │ └── runtime │ │ │ └── deno.ts │ ├── .npmrc │ ├── patch-version.ts │ ├── typedoc.json │ └── build.ts ├── supabase │ ├── supabase │ │ ├── seed.sql │ │ ├── .gitignore │ │ └── functions │ │ │ └── _shared │ │ │ └── cors.ts │ ├── index.ts │ ├── .vscode │ │ ├── extensions.json │ │ └── settings.json │ ├── README.md │ └── package.json ├── tauri-plugin-jarvis │ ├── guest-js │ │ └── index.ts │ ├── src │ │ ├── models.rs │ │ ├── server │ │ │ ├── grpc │ │ │ │ └── mod.rs │ │ │ ├── tls.rs │ │ │ └── model.rs │ │ ├── setup │ │ │ ├── mod.rs │ │ │ └── server.rs │ │ ├── model │ │ │ ├── mod.rs │ │ │ ├── app_state.rs │ │ │ └── extension.rs │ │ ├── utils │ │ │ ├── mod.rs │ │ │ ├── time.rs │ │ │ └── plist.rs │ │ ├── commands │ │ │ ├── utils.rs │ │ │ ├── mod.rs │ │ │ ├── path.rs │ │ │ └── security.rs │ │ ├── desktop.rs │ │ └── error.rs │ ├── README.md │ ├── examples │ │ └── tauri-app │ │ │ ├── src-tauri │ │ │ ├── build.rs │ │ │ ├── .gitignore │ │ │ ├── icons │ │ │ │ ├── 32x32.png │ │ │ │ ├── icon.icns │ │ │ │ ├── icon.ico │ │ │ │ ├── icon.png │ │ │ │ ├── 128x128.png │ │ │ │ └── 128x128@2x.png │ │ │ └── src │ │ │ │ ├── main.rs │ │ │ │ └── lib.rs │ │ │ ├── src │ │ │ ├── vite-env.d.ts │ │ │ ├── main.js │ │ │ └── lib │ │ │ │ └── Greet.svelte │ │ │ ├── .vscode │ │ │ └── extensions.json │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── README.md │ │ │ └── package.json │ ├── .gitignore │ ├── self_signed_certs │ │ ├── key.pem │ │ └── cert.pem │ ├── proto │ │ └── helloworld.proto │ ├── tsconfig.json │ ├── permissions │ │ ├── autogenerated │ │ │ └── commands │ │ │ │ ├── mute.toml │ │ │ │ ├── sleep.toml │ │ │ │ ├── unzip.toml │ │ │ │ ├── reboot.toml │ │ │ │ ├── unmute.toml │ │ │ │ ├── shutdown.toml │ │ │ │ ├── get_peers.toml │ │ │ │ ├── app_is_dev.toml │ │ │ │ ├── open_trash.toml │ │ │ │ ├── set_volume.toml │ │ │ │ ├── empty_trash.toml │ │ │ │ ├── file_search.toml │ │ │ │ ├── get_history.toml │ │ │ │ ├── logout_user.toml │ │ │ │ ├── path_exists.toml │ │ │ │ ├── stop_server.toml │ │ │ │ ├── toggle_mute.toml │ │ │ │ ├── verify_auth.toml │ │ │ │ ├── show_desktop.toml │ │ │ │ ├── start_server.toml │ │ │ │ ├── load_manifest.toml │ │ │ │ ├── open_devtools.toml │ │ │ │ ├── plist_to_json.toml │ │ │ │ ├── quit_all_apps.toml │ │ │ │ ├── add_to_history.toml │ │ │ │ ├── close_devtools.toml │ │ │ │ ├── create_command.toml │ │ │ │ ├── restart_server.toml │ │ │ │ ├── run_powershell.toml │ │ │ │ ├── sleep_displays.toml │ │ │ │ ├── turn_volume_up.toml │ │ │ │ ├── eject_all_disks.toml │ │ │ │ ├── get_server_port.toml │ │ │ │ ├── toggle_devtools.toml │ │ │ │ ├── compress_tarball.toml │ │ │ │ ├── create_extension.toml │ │ │ │ ├── get_applications.toml │ │ │ │ ├── is_devtools_open.toml │ │ │ │ ├── run_apple_script.toml │ │ │ │ ├── toggle_bluetooth.toml │ │ │ │ ├── turn_volume_down.toml │ │ │ │ ├── get_command_by_id.toml │ │ │ │ ├── get_ext_label_map.toml │ │ │ │ ├── server_is_running.toml │ │ │ │ ├── decompress_tarball.toml │ │ │ │ ├── get_all_extensions.toml │ │ │ │ ├── load_all_extensions.toml │ │ │ │ ├── toggle_hidden_files.toml │ │ │ │ ├── delete_command_by_id.toml │ │ │ │ ├── get_extension_folder.toml │ │ │ │ ├── set_extension_folder.toml │ │ │ │ ├── toggle_stage_manager.toml │ │ │ │ ├── update_command_by_id.toml │ │ │ │ ├── create_extension_data.toml │ │ │ │ ├── ext_store_wrapper_get.toml │ │ │ │ ├── ext_store_wrapper_has.toml │ │ │ │ ├── ext_store_wrapper_set.toml │ │ │ │ ├── search_extension_data.toml │ │ │ │ ├── ext_store_wrapper_keys.toml │ │ │ │ ├── ext_store_wrapper_load.toml │ │ │ │ ├── ext_store_wrapper_save.toml │ │ │ │ ├── get_commands_by_ext_id.toml │ │ │ │ ├── ext_store_wrapper_clear.toml │ │ │ │ ├── ext_store_wrapper_reset.toml │ │ │ │ ├── delete_extension_by_path.toml │ │ │ │ ├── ext_store_wrapper_delete.toml │ │ │ │ ├── ext_store_wrapper_length.toml │ │ │ │ ├── ext_store_wrapper_values.toml │ │ │ │ ├── get_dev_extension_folder.toml │ │ │ │ ├── get_extension_data_by_id.toml │ │ │ │ ├── set_dev_extension_folder.toml │ │ │ │ ├── toggle_system_appearance.toml │ │ │ │ ├── ext_store_wrapper_entries.toml │ │ │ │ ├── refresh_applications_list.toml │ │ │ │ ├── register_extension_window.toml │ │ │ │ ├── delete_extension_by_ext_id.toml │ │ │ │ ├── get_default_extensions_dir.toml │ │ │ │ ├── is_window_label_registered.toml │ │ │ │ ├── check_screen_capture_access.toml │ │ │ │ ├── delete_extension_data_by_id.toml │ │ │ │ ├── get_extension_by_identifier.toml │ │ │ │ ├── unregister_extension_window.toml │ │ │ │ ├── update_extension_data_by_id.toml │ │ │ │ ├── get_unique_extension_by_path.toml │ │ │ │ ├── request_screen_capture_access.toml │ │ │ │ ├── delete_extension_by_identifier.toml │ │ │ │ ├── hide_all_apps_except_frontmost.toml │ │ │ │ ├── refresh_applications_list_in_bg.toml │ │ │ │ ├── get_all_extensions_by_identifier.toml │ │ │ │ ├── get_default_extensions_storage_dir.toml │ │ │ │ ├── get_unique_extension_by_identifier.toml │ │ │ │ ├── register_extension_spawned_process.toml │ │ │ │ └── get_selected_files_in_file_explorer.toml │ │ └── store-all.toml │ └── CHANGELOG.md ├── model │ ├── index.ts │ ├── workflow │ │ ├── events │ │ │ └── clipboard.ts │ │ ├── inputs │ │ │ ├── script-filter.ts │ │ │ └── file-filter.ts │ │ └── payload │ │ │ └── index.ts │ ├── README.md │ ├── package.json │ └── tsconfig.json ├── jsonrpc-js │ ├── index.ts │ ├── package.json │ └── README.md ├── gql │ ├── index.ts │ ├── README.md │ └── src │ │ └── operations │ │ ├── allExtensions.graphql │ │ └── findLatestExt.graphql ├── ci │ ├── dev.ts │ ├── README.md │ ├── package.json │ └── utils.ts ├── dance │ ├── README.md │ ├── package.json │ └── __tests__ │ │ └── index.test.ts ├── mac-security-rs │ ├── build.rs │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── runtime │ ├── README.md │ └── package.json └── db │ ├── src │ ├── main.rs │ └── schema.rs │ └── Cargo.toml ├── templates ├── index.html ├── template-ext-sveltekit │ ├── .npmrc │ ├── src │ │ ├── routes │ │ │ ├── +layout.ts │ │ │ ├── about │ │ │ │ └── +page.svelte │ │ │ └── +layout.svelte │ │ ├── lib │ │ │ ├── index.ts │ │ │ └── components │ │ │ │ └── ThemeCustomizer.svelte │ │ ├── app.d.ts │ │ └── app.html │ ├── .prettierignore │ ├── postcss.config.js │ ├── static │ │ └── favicon.png │ ├── vite.config.ts │ ├── CHANGELOG.md │ ├── .gitignore │ ├── .prettierrc │ └── components.json ├── template-ext-nuxt │ ├── app.vue │ ├── server │ │ └── tsconfig.json │ ├── public │ │ └── favicon.ico │ ├── tsconfig.json │ ├── CHANGELOG.md │ ├── pages │ │ └── about.vue │ ├── .gitignore │ └── nuxt.config.ts ├── template-ext-react │ ├── src │ │ ├── vite-env.d.ts │ │ ├── index.css │ │ └── main.tsx │ ├── postcss.config.js │ ├── vite.config.ts │ ├── tsconfig.json │ ├── CHANGELOG.md │ ├── tailwind.config.js │ ├── tsconfig.node.json │ ├── .gitignore │ ├── index.html │ └── .eslintrc.cjs ├── template-ext-vue │ ├── src │ │ ├── vite-env.d.ts │ │ ├── main.ts │ │ ├── lib │ │ │ └── utils.ts │ │ └── assets │ │ │ └── vue.svg │ ├── .vscode │ │ └── extensions.json │ ├── postcss.config.js │ ├── tsconfig.json │ ├── CHANGELOG.md │ ├── tsconfig.node.json │ ├── .gitignore │ ├── index.html │ ├── components.json │ └── vite.config.ts ├── template-ext-next │ ├── .eslintrc.json │ ├── src │ │ ├── app │ │ │ ├── favicon.ico │ │ │ ├── globals.css │ │ │ ├── about │ │ │ │ └── page.tsx │ │ │ ├── page.tsx │ │ │ └── layout.tsx │ │ └── components │ │ │ ├── about.tsx │ │ │ └── main.tsx │ ├── CHANGELOG.md │ ├── postcss.config.mjs │ ├── next.config.mjs │ ├── .gitignore │ ├── tailwind.config.ts │ └── public │ │ └── vercel.svg ├── template-ext-svelte │ ├── .vscode │ │ └── extensions.json │ ├── src │ │ ├── vite-env.d.ts │ │ ├── main.ts │ │ └── lib │ │ │ ├── Counter.svelte │ │ │ └── components │ │ │ └── ThemeCustomizer.svelte │ ├── postcss.config.js │ ├── svelte.config.js │ ├── CHANGELOG.md │ ├── vite.config.ts │ ├── components.json │ ├── tsconfig.node.json │ ├── .gitignore │ └── index.html └── template-ext-worker │ └── src │ └── i18n │ ├── en.ts │ ├── zh.ts │ └── index.ts ├── .husky ├── commit-msg └── pre-commit ├── apps ├── desktop │ ├── supabase │ │ └── .temp │ │ │ └── cli-latest │ ├── src-tauri │ │ ├── src │ │ │ ├── commands │ │ │ │ ├── clipboard.rs │ │ │ │ └── mod.rs │ │ │ ├── setup │ │ │ │ ├── deeplink.rs │ │ │ │ └── mod.rs │ │ │ └── utils │ │ │ │ └── mod.rs │ │ ├── .taurignore │ │ ├── build.rs │ │ ├── icons │ │ │ ├── 32x32.png │ │ │ ├── icon.icns │ │ │ ├── icon.ico │ │ │ ├── icon.png │ │ │ ├── 128x128.png │ │ │ ├── 128x128@2x.png │ │ │ ├── StoreLogo.png │ │ │ ├── Square30x30Logo.png │ │ │ ├── Square44x44Logo.png │ │ │ ├── Square71x71Logo.png │ │ │ ├── Square89x89Logo.png │ │ │ ├── Square107x107Logo.png │ │ │ ├── Square142x142Logo.png │ │ │ ├── Square150x150Logo.png │ │ │ ├── Square284x284Logo.png │ │ │ ├── Square310x310Logo.png │ │ │ ├── ios │ │ │ │ ├── AppIcon-512@2x.png │ │ │ │ ├── AppIcon-20x20@1x.png │ │ │ │ ├── AppIcon-20x20@2x.png │ │ │ │ ├── AppIcon-20x20@3x.png │ │ │ │ ├── AppIcon-29x29@1x.png │ │ │ │ ├── AppIcon-29x29@2x.png │ │ │ │ ├── AppIcon-29x29@3x.png │ │ │ │ ├── AppIcon-40x40@1x.png │ │ │ │ ├── AppIcon-40x40@2x.png │ │ │ │ ├── AppIcon-40x40@3x.png │ │ │ │ ├── AppIcon-60x60@2x.png │ │ │ │ ├── AppIcon-60x60@3x.png │ │ │ │ ├── AppIcon-76x76@1x.png │ │ │ │ ├── AppIcon-76x76@2x.png │ │ │ │ ├── AppIcon-20x20@2x-1.png │ │ │ │ ├── AppIcon-29x29@2x-1.png │ │ │ │ ├── AppIcon-40x40@2x-1.png │ │ │ │ └── AppIcon-83.5x83.5@2x.png │ │ │ └── android │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ │ └── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ ├── .gitignore │ │ └── capabilities │ │ │ └── desktop.json │ ├── assets │ │ └── css │ │ │ └── app.css │ ├── layouts │ │ ├── empty.vue │ │ ├── dev.vue │ │ └── ui-only.vue │ ├── server │ │ └── tsconfig.json │ ├── components │ │ ├── extension-store │ │ │ └── index.ts │ │ ├── Metadata │ │ │ ├── separator.vue │ │ │ ├── tags.vue │ │ │ ├── tag.vue │ │ │ └── link.vue │ │ ├── ExtTemplate │ │ │ └── Markdown.vue │ │ ├── ui │ │ │ ├── dialog │ │ │ │ ├── DialogClose.vue │ │ │ │ ├── DialogTrigger.vue │ │ │ │ ├── DialogFooter.vue │ │ │ │ ├── DialogHeader.vue │ │ │ │ ├── Dialog.vue │ │ │ │ └── index.ts │ │ │ └── command │ │ │ │ ├── CommandShortcut.vue │ │ │ │ ├── index.ts │ │ │ │ └── CommandEmpty.vue │ │ ├── debug │ │ │ ├── DebugPage.vue │ │ │ └── CodeEditorHtml.vue │ │ ├── Kbd.vue │ │ ├── StrikeSeparator.vue │ │ ├── tauri │ │ │ └── link.vue │ │ └── settings │ │ │ ├── General │ │ │ └── index.ts │ │ │ └── Extensions │ │ │ └── ExtRow.vue │ ├── public │ │ ├── favicon.ico │ │ └── img │ │ │ ├── logo.png │ │ │ └── logo-w-bg.png │ ├── lib │ │ ├── utils │ │ │ ├── dom.ts │ │ │ ├── path.ts │ │ │ ├── supabase.ts │ │ │ ├── window.ts │ │ │ ├── index.ts │ │ │ ├── graphql.ts │ │ │ ├── request.ts │ │ │ ├── search.ts │ │ │ ├── format.ts │ │ │ ├── keycomb.ts │ │ │ └── watch-config.ts │ │ ├── themes │ │ │ └── styles.ts │ │ ├── stores │ │ │ ├── appConfig.ts │ │ │ └── toast.ts │ │ └── dev │ │ │ └── exp.ts │ ├── tsconfig.json │ ├── i18n │ │ ├── types.ts │ │ ├── i18n.config.ts │ │ └── utils.ts │ ├── pages │ │ ├── dev │ │ │ └── index.vue │ │ ├── init-page.vue │ │ ├── onboarding.vue │ │ └── iframe.vue │ ├── app.vue │ ├── stores │ │ └── types.ts │ ├── .gitignore │ ├── components.json │ ├── utils │ │ └── commands.ts │ ├── uno.config.ts │ ├── i18n.d.ts │ ├── scripts │ │ └── download-dance.ts │ └── composables │ │ └── useShortcuts.ts ├── cli │ ├── src │ │ ├── commands │ │ │ ├── index.ts │ │ │ └── build.ts │ │ ├── types.ts │ │ ├── logger.ts │ │ └── docker │ │ │ └── entrypoint.sh │ ├── mod.ts │ └── README.md └── create-kunkun │ ├── README.md │ └── src │ ├── __tests__ │ └── util.test.ts │ └── constants.ts ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ └── config.yml └── workflows │ └── jsr-publish.yml ├── .npmrc ├── README.assets ├── main.png └── store.png ├── extensions └── demo-worker-template-ext │ ├── buffer.ts │ ├── deno-src │ ├── deno.json │ ├── rpc.ts │ └── deno.lock │ ├── CHANGELOG.md │ ├── README.md │ └── rollup.config.js ├── .cargo └── config.toml ├── .prettierignore ├── pnpm-workspace.yaml ├── commitlint.config.js ├── .vscode ├── extensions.json └── settings.json ├── .changeset ├── config.json └── README.md ├── .gitmodules ├── .prettierrc └── Cargo.toml /packages/schema/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/api/src/ui/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/supabase/supabase/seed.sql: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 |

Dev Extensions

-------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | # pnpm commitlint ${1} 2 | -------------------------------------------------------------------------------- /apps/desktop/supabase/.temp/cli-latest: -------------------------------------------------------------------------------- 1 | v1.207.9 -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/guest-js/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/models.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/src/commands/clipboard.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/src/setup/deeplink.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/.taurignore: -------------------------------------------------------------------------------- 1 | ../../../packages/** -------------------------------------------------------------------------------- /packages/api/.npmrc: -------------------------------------------------------------------------------- 1 | @jsr:registry=https://npm.jsr.io 2 | -------------------------------------------------------------------------------- /packages/model/index.ts: -------------------------------------------------------------------------------- 1 | console.log("Hello via Bun!") 2 | -------------------------------------------------------------------------------- /packages/jsonrpc-js/index.ts: -------------------------------------------------------------------------------- 1 | console.log("Hello via Bun!") 2 | -------------------------------------------------------------------------------- /packages/supabase/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./types/supabase" 2 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/src/commands/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod clipboard; 2 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/README.md: -------------------------------------------------------------------------------- 1 | # Tauri Plugin jarvis 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [HuakunShen] 2 | buy_me_a_coffee: huakun 3 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers = true 2 | @jsr:registry=https://npm.jsr.io 3 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/server/grpc/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod greeter; 2 | -------------------------------------------------------------------------------- /apps/desktop/assets/css/app.css: -------------------------------------------------------------------------------- 1 | html.dark { 2 | color-scheme: dark; 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/layouts/empty.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod log; 2 | pub mod server; 3 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /packages/api/src/ui/worker/schema/index.ts: -------------------------------------------------------------------------------- 1 | export * from "../../../models/icon" 2 | -------------------------------------------------------------------------------- /packages/supabase/supabase/.gitignore: -------------------------------------------------------------------------------- 1 | # Supabase 2 | .branches 3 | .temp 4 | .env 5 | -------------------------------------------------------------------------------- /templates/template-ext-nuxt/app.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /templates/template-ext-react/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /templates/template-ext-vue/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /apps/desktop/server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.nuxt/tsconfig.server.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/gql/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./src/gql" 2 | export * from "./src/gql/graphql" 3 | -------------------------------------------------------------------------------- /README.assets/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/README.assets/main.png -------------------------------------------------------------------------------- /README.assets/store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/README.assets/store.png -------------------------------------------------------------------------------- /packages/ci/dev.ts: -------------------------------------------------------------------------------- 1 | import { getRepoRoot } from "./utils" 2 | 3 | console.log(getRepoRoot()) 4 | -------------------------------------------------------------------------------- /templates/template-ext-next/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /packages/schema/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["denoland.vscode-deno"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/supabase/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["denoland.vscode-deno"] 3 | } 4 | -------------------------------------------------------------------------------- /templates/template-ext-vue/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["Vue.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/components/extension-store/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ExtensionStorePage } from "./store.vue" 2 | -------------------------------------------------------------------------------- /apps/desktop/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/public/favicon.ico -------------------------------------------------------------------------------- /extensions/demo-worker-template-ext/buffer.ts: -------------------------------------------------------------------------------- 1 | import Buffer from 'node:buffer' 2 | 3 | console.log(Buffer); 4 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/setup/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod db; 2 | pub mod peer_discovery; 3 | pub mod server; 4 | -------------------------------------------------------------------------------- /templates/template-ext-nuxt/server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../.nuxt/tsconfig.server.json" 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/public/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/public/img/logo.png -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["svelte.svelte-vscode"] 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/src/setup/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod clipboard; 2 | pub mod deeplink; 3 | pub mod tray; 4 | pub mod window; 5 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/src/routes/+layout.ts: -------------------------------------------------------------------------------- 1 | export const prerender = true; 2 | export const ssr = false; 3 | -------------------------------------------------------------------------------- /apps/desktop/public/img/logo-w-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/public/img/logo-w-bg.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /templates/template-ext-svelte/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/.prettierignore: -------------------------------------------------------------------------------- 1 | # Package Managers 2 | package-lock.json 3 | pnpm-lock.yaml 4 | yarn.lock 5 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/src/lib/index.ts: -------------------------------------------------------------------------------- 1 | // place files you want to import through the `$lib` alias in this folder. 2 | -------------------------------------------------------------------------------- /apps/cli/src/commands/index.ts: -------------------------------------------------------------------------------- 1 | export { default as verifyCmd } from "./verify" 2 | export { default as buildCmd } from "./build" 3 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/dom.ts: -------------------------------------------------------------------------------- 1 | export function getActiveElementNodeName() { 2 | return document.activeElement?.nodeName 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /apps/desktop/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // https://nuxt.com/docs/guide/concepts/typescript 3 | "extends": "./.nuxt/tsconfig.json" 4 | } 5 | -------------------------------------------------------------------------------- /extensions/demo-worker-template-ext/deno-src/deno.json: -------------------------------------------------------------------------------- 1 | { 2 | "imports": { 3 | "@kunkun/api": "jsr:@kunkun/api@^0.0.14" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/api/src/permissions/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./description" 2 | export * from "./schema" 3 | export * from "./permission-map" 4 | -------------------------------------------------------------------------------- /templates/template-ext-nuxt/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/templates/template-ext-nuxt/public/favicon.ico -------------------------------------------------------------------------------- /apps/desktop/i18n/types.ts: -------------------------------------------------------------------------------- 1 | export type RecursivePartial = { 2 | [P in keyof T]?: T[P] extends object ? RecursivePartial : T[P] 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/model/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod app_state; 2 | pub mod clipboard_history; 3 | pub mod extension; 4 | pub mod manifest; 5 | -------------------------------------------------------------------------------- /templates/template-ext-next/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/templates/template-ext-next/src/app/favicon.ico -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {} 5 | } 6 | }; 7 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-512@2x.png -------------------------------------------------------------------------------- /packages/api/src/ui/api/deno.ts: -------------------------------------------------------------------------------- 1 | import type { DenoSysOptions } from "../../permissions/schema" 2 | import type { DenoRunConfig } from "../client" 3 | -------------------------------------------------------------------------------- /packages/supabase/README.md: -------------------------------------------------------------------------------- 1 | ```bash 2 | npx supabase gen types typescript --project-id "$PROJECT_REF" --schema public > types/supabase.ts 3 | ``` 4 | -------------------------------------------------------------------------------- /templates/template-ext-nuxt/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // https://nuxt.com/docs/guide/concepts/typescript 3 | "extends": "./.nuxt/tsconfig.json" 4 | } 5 | -------------------------------------------------------------------------------- /templates/template-ext-react/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {} 5 | } 6 | }; 7 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/templates/template-ext-sveltekit/static/favicon.png -------------------------------------------------------------------------------- /templates/template-ext-vue/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/path.ts: -------------------------------------------------------------------------------- 1 | export function isExtPathInDev(extPath: string, devExtPath: string) { 2 | return !devExtPath.startsWith(extPath) 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-20x20@1x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-20x20@2x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-20x20@3x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-29x29@1x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-29x29@2x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-29x29@3x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-40x40@1x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-40x40@2x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-40x40@3x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-60x60@2x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-60x60@3x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-76x76@1x.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-76x76@2x.png -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-20x20@2x-1.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-29x29@2x-1.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-40x40@2x-1.png -------------------------------------------------------------------------------- /templates/template-ext-worker/src/i18n/en.ts: -------------------------------------------------------------------------------- 1 | const en = { 2 | welcome: "Welcome to Kunkun" 3 | } 4 | export default en 5 | export type Translation = typeof en 6 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/supabase.ts: -------------------------------------------------------------------------------- 1 | export function getFileUrl(path: string) { 2 | return useSupabaseClient().storage.from("extensions").getPublicUrl(path) 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/ios/AppIcon-83.5x83.5@2x.png -------------------------------------------------------------------------------- /templates/template-ext-next/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # template-ext-next 2 | 3 | ## 0.1.1 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - @kksh/api@0.0.4 9 | -------------------------------------------------------------------------------- /templates/template-ext-vue/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from "vue" 2 | import "./index.css" 3 | import App from "./App.vue" 4 | 5 | createApp(App).mount("#app") 6 | -------------------------------------------------------------------------------- /templates/template-ext-worker/src/i18n/zh.ts: -------------------------------------------------------------------------------- 1 | import type { Translation } from "./en" 2 | 3 | export default { 4 | welcome: "欢迎来到Kunkun" 5 | } satisfies Translation 6 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /extensions/demo-worker-template-ext/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # demo-template-extension 2 | 3 | ## 0.0.3 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - @kksh/api@0.0.9 9 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["svelte.svelte-vscode", "tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] 3 | } 4 | -------------------------------------------------------------------------------- /apps/desktop/components/Metadata/separator.vue: -------------------------------------------------------------------------------- 1 | 4 | 7 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/window.ts: -------------------------------------------------------------------------------- 1 | import { getCurrentWindow } from "@tauri-apps/api/window" 2 | 3 | export function isInMainWindow() { 4 | return getCurrentWindow().label == "main" 5 | } 6 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/dance/README.md: -------------------------------------------------------------------------------- 1 | This package is a library for deserialize and decompress the data from dance video from https://dance.kunkun.sh 2 | 3 | https://github.com/HuakunTech/kun-dance 4 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/schema/scripts/print-schema.ts: -------------------------------------------------------------------------------- 1 | import { ExtPackageJson } from "@kksh/api/models" 2 | import { getJsonSchema } from "../src/utils" 3 | 4 | console.log(getJsonSchema(ExtPackageJson)) 5 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /templates/template-ext-next/src/app/globals.css: -------------------------------------------------------------------------------- 1 | @import url("@kksh/react/css"); 2 | @import url("@kksh/react/themes"); 3 | 4 | @tailwind base; 5 | @tailwind components; 6 | @tailwind utilities; 7 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/apps/desktop/src-tauri/icons/android/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-kunkun/dev/packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/server/tls.rs: -------------------------------------------------------------------------------- 1 | pub const CERT_PEM: &[u8] = include_bytes!("../../self_signed_certs/cert.pem"); 2 | pub const KEY_PEM: &[u8] = include_bytes!("../../self_signed_certs/key.pem"); 3 | -------------------------------------------------------------------------------- /templates/template-ext-next/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [target.x86_64-pc-windows-msvc] 2 | rustflags = ["-C", "link-arg=/STACK:8000000"] 3 | 4 | # 64 bit Mingw 5 | [target.x86_64-pc-windows-gnu] 6 | rustflags = ["-C", "link-arg=-Wl,--stack,8000000"] 7 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | cargo fmt --all -- --check 2 | # bun --bun prettier --check "./packages/**/*.{ts,tsx,md,vue,json,yaml,yml,svelte}" 3 | # bun --bun prettier --check "./apps/**/*.{ts,tsx,md,vue,json,yaml,yml,svelte}" -------------------------------------------------------------------------------- /packages/schema/src/utils.ts: -------------------------------------------------------------------------------- 1 | import { toJSONSchema } from "@gcornut/valibot-json-schema" 2 | 3 | export function getJsonSchema(schema: any) { 4 | return JSON.stringify(toJSONSchema({ schema }), null, 2) 5 | } 6 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | import { defineConfig } from 'vite'; 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()] 6 | }); 7 | -------------------------------------------------------------------------------- /templates/template-ext-vue/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.app.json" 6 | }, 7 | { 8 | "path": "./tsconfig.node.json" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/index.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /packages/ci/README.md: -------------------------------------------------------------------------------- 1 | # CI 2 | 3 | This package contains code about the CI/CD pipeline of the project. 4 | 5 | The `test` script will be run in CI/CD. General non-package-specific CI/CD code should be placed here. 6 | -------------------------------------------------------------------------------- /packages/supabase/supabase/functions/_shared/cors.ts: -------------------------------------------------------------------------------- 1 | export const corsHeaders = { 2 | "Access-Control-Allow-Origin": "*", 3 | "Access-Control-Allow-Headers": "authorization, x-client-info, apikey, content-type" 4 | } 5 | -------------------------------------------------------------------------------- /apps/desktop/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Generated by Tauri 6 | # will have schema files for capabilities auto-completion 7 | /gen/schemas 8 | -------------------------------------------------------------------------------- /packages/api/src/commands/common.ts: -------------------------------------------------------------------------------- 1 | export const JarvisPluginCommandPrefix = "plugin:jarvis" 2 | 3 | export function generateJarvisPluginCommand(command: string) { 4 | return `${JarvisPluginCommandPrefix}|${command}` 5 | } 6 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod fs; 2 | pub mod icns; 3 | pub mod manifest; 4 | pub mod path; 5 | pub mod plist; 6 | pub mod script; 7 | pub mod settings; 8 | pub mod setup; 9 | pub mod time; 10 | -------------------------------------------------------------------------------- /packages/api/src/ui/worker/components/interfaces.ts: -------------------------------------------------------------------------------- 1 | import type { FormNodeName, NodeName } from "../../../models/constants" 2 | 3 | export interface IComponent { 4 | nodeName: NodeName | FormNodeName 5 | toModel(): T 6 | } 7 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/commands/utils.rs: -------------------------------------------------------------------------------- 1 | #[tauri::command] 2 | pub async fn plist_to_json(plist_content: String) -> Result { 3 | crate::utils::plist::plist_to_json(plist_content) 4 | } 5 | -------------------------------------------------------------------------------- /templates/template-ext-next/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | output: "export", 4 | transpilePackages: ["@kksh/api", "comlink-stdio"] 5 | } 6 | 7 | export default nextConfig 8 | -------------------------------------------------------------------------------- /templates/template-ext-react/vite.config.ts: -------------------------------------------------------------------------------- 1 | import react from "@vitejs/plugin-react" 2 | import { defineConfig } from "vite" 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()] 7 | }) 8 | -------------------------------------------------------------------------------- /templates/template-ext-vue/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /packages/mac-security-rs/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | #[cfg(not(target_os = "macos"))] 3 | { 4 | println!("cargo:warning=This crate is only intended for macOS systems."); 5 | std::process::exit(0); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/schema/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "deno.enablePaths": ["supabase/functions"], 3 | "deno.lint": true, 4 | "deno.unstable": true, 5 | "[typescript]": { 6 | "editor.defaultFormatter": "denoland.vscode-deno" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src/main.js: -------------------------------------------------------------------------------- 1 | import "./style.css"; 2 | import App from "./App.svelte"; 3 | 4 | const app = new App({ 5 | target: document.getElementById("app"), 6 | }); 7 | 8 | export default app; 9 | -------------------------------------------------------------------------------- /templates/template-ext-react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { 5 | "path": "./tsconfig.app.json" 6 | }, 7 | { 8 | "path": "./tsconfig.node.json" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .nuxt/ 2 | target/ 3 | packages/tauri-plugin-jarvis/permissions/** 4 | apps/desktop/src-tauri/gen/** 5 | packages/tauri-plugin-jarvis/dist-js/** 6 | packages/api/dist/** 7 | 8 | dist/ 9 | .output/ 10 | .svelte-kit/ -------------------------------------------------------------------------------- /apps/desktop/src-tauri/capabilities/desktop.json: -------------------------------------------------------------------------------- 1 | { 2 | "identifier": "desktop-capability", 3 | "platforms": [ 4 | "macOS", 5 | "windows", 6 | "linux" 7 | ], 8 | "permissions": [ 9 | "cli:default" 10 | ] 11 | } -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "apps/*" 3 | - "packages/*" 4 | - "extensions/*" 5 | - "templates/*" 6 | - "dev/docs" 7 | - "docs" 8 | - "vendors/tauri-plugin-network" 9 | - "vendors/tauri-plugin-system-info" 10 | -------------------------------------------------------------------------------- /apps/cli/src/types.ts: -------------------------------------------------------------------------------- 1 | import type { ExtPackageJson } from "@kksh/api/models" 2 | 3 | export type BuildResult = { 4 | shasum: string 5 | tarballFilename: string 6 | tarballPath: string 7 | extPath: string 8 | pkg: ExtPackageJson 9 | } 10 | -------------------------------------------------------------------------------- /apps/desktop/layouts/dev.vue: -------------------------------------------------------------------------------- 1 | 4 | 11 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | extends: ["@commitlint/config-conventional"], 3 | rules: { 4 | "body-max-line-length": [0, "always", 500], 5 | "subject-empty": [0, "always", ""], 6 | "type-empty": [0, "always", ""] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/dance/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@kksh/dance", 3 | "module": "index.ts", 4 | "type": "module", 5 | "devDependencies": { 6 | "@types/bun": "latest" 7 | }, 8 | "peerDependencies": { 9 | "typescript": "^5.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/src/main.ts: -------------------------------------------------------------------------------- 1 | import { mount } from "svelte" 2 | import "./app.css" 3 | import App from "./App.svelte" 4 | 5 | const app = mount(App, { 6 | target: document.getElementById("app")! 7 | }) 8 | 9 | export default app 10 | -------------------------------------------------------------------------------- /packages/supabase/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@kksh/supabase", 3 | "module": "index.ts", 4 | "type": "module", 5 | "devDependencies": { 6 | "@types/bun": "latest" 7 | }, 8 | "peerDependencies": { 9 | "typescript": "^5.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /templates/template-ext-react/src/index.css: -------------------------------------------------------------------------------- 1 | @import url("@kksh/react/css"); 2 | @import url("@kksh/react/themes"); 3 | /* @tailwind base; */ 4 | /* This adds white border to command components under dark mode */ 5 | @tailwind components; 6 | @tailwind utilities; -------------------------------------------------------------------------------- /templates/template-ext-svelte/src/lib/Counter.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | -------------------------------------------------------------------------------- /packages/api/src/ui/worker/components/common.ts: -------------------------------------------------------------------------------- 1 | import { Icon } from "./icon" 2 | 3 | export type OmitNodeName = Omit 4 | export type ReplaceIcon = T & { icon?: Icon } 5 | export type IconConstructorPatch = ReplaceIcon> 6 | -------------------------------------------------------------------------------- /packages/model/workflow/events/clipboard.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod" 2 | import { BaseNode, NodeTypeEvent, Position } from "../common" 3 | 4 | export const OnClipboardUpdateNode = z 5 | .object({ type: NodeTypeEvent }) 6 | .merge(BaseNode) 7 | .merge(Position) 8 | -------------------------------------------------------------------------------- /apps/create-kunkun/README.md: -------------------------------------------------------------------------------- 1 | # Kunkun Extension Initializer 2 | 3 | ## Usage 4 | 5 | ```bash 6 | npm init kunkun@latest 7 | 8 | npx create-kunkun@latest 9 | ``` 10 | 11 | ## Develop 12 | 13 | ```bash 14 | bun index.ts --help 15 | bun index.ts 16 | ``` 17 | -------------------------------------------------------------------------------- /apps/desktop/components/ExtTemplate/Markdown.vue: -------------------------------------------------------------------------------- 1 | 6 | 11 | -------------------------------------------------------------------------------- /apps/desktop/lib/themes/styles.ts: -------------------------------------------------------------------------------- 1 | export const styles = [ 2 | { 3 | name: "default", 4 | label: "Default" 5 | }, 6 | { 7 | name: "new-york", 8 | label: "New York" 9 | } 10 | ] as const 11 | 12 | export type Style = (typeof styles)[number]["name"] 13 | -------------------------------------------------------------------------------- /packages/api/src/ui/worker/schema/keyboard.ts: -------------------------------------------------------------------------------- 1 | import { 2 | array, 3 | boolean, 4 | date, 5 | enum_, 6 | hexColor, 7 | literal, 8 | nullable, 9 | object, 10 | optional, 11 | pipe, 12 | string, 13 | union, 14 | type InferOutput 15 | } from "valibot" 16 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | tauri_app_lib::run(); 6 | } 7 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/model/app_state.rs: -------------------------------------------------------------------------------- 1 | use std::{path::PathBuf, sync::Mutex}; 2 | 3 | pub struct AppState { 4 | // pub history: Mutex>, 5 | // pub dev_extension_path: Mutex>, 6 | // pub extension_path: Mutex, 7 | } 8 | -------------------------------------------------------------------------------- /packages/api/src/ui/worker/components/index.ts: -------------------------------------------------------------------------------- 1 | export { type IComponent } from "./interfaces" 2 | export * from "./icon" 3 | export * as List from "./list-view" 4 | export * as Action from "./action" 5 | export * as Form from "./form-view" 6 | export { Markdown } from "./markdown" 7 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/.gitignore: -------------------------------------------------------------------------------- 1 | /.vs 2 | .DS_Store 3 | .Thumbs.db 4 | *.sublime* 5 | .idea/ 6 | debug.log 7 | package-lock.json 8 | .vscode/settings.json 9 | yarn.lock 10 | 11 | /.tauri 12 | /target 13 | Cargo.lock 14 | node_modules/ 15 | 16 | dist-js 17 | dist 18 | -------------------------------------------------------------------------------- /templates/template-ext-next/src/app/about/page.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import dynamic from "next/dynamic" 4 | 5 | const About = dynamic(() => import("@/components/about"), { 6 | ssr: false 7 | }) 8 | export default function AboutPage() { 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /templates/template-ext-nuxt/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # template-ext-nuxt 2 | 3 | ## 0.0.3 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - @kksh/api@0.0.4 9 | 10 | ## 0.0.2 11 | 12 | ### Patch Changes 13 | 14 | - Updated dependencies [fba6a49] 15 | - @kksh/vue@0.0.1 16 | -------------------------------------------------------------------------------- /templates/template-ext-vue/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # template-ext-vue 2 | 3 | ## 0.0.2 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - @kksh/api@0.0.4 9 | 10 | ## 0.0.1 11 | 12 | ### Patch Changes 13 | 14 | - Updated dependencies [fba6a49] 15 | - @kksh/vue@0.0.1 16 | -------------------------------------------------------------------------------- /apps/desktop/lib/stores/appConfig.ts: -------------------------------------------------------------------------------- 1 | import { createStore, Store } from "@tauri-apps/plugin-store" 2 | 3 | export function getPersistedAppConfigStore() { 4 | return createStore("appConfig.bin", { 5 | // we can save automatically after each store modification 6 | autoSave: 1 7 | }) 8 | } 9 | -------------------------------------------------------------------------------- /packages/api/src/commands/utils.ts: -------------------------------------------------------------------------------- 1 | import { invoke } from "@tauri-apps/api/core" 2 | import { generateJarvisPluginCommand } from "./common" 3 | 4 | export function plistToJson(plistContent: string) { 5 | return invoke(generateJarvisPluginCommand("plist_to_json"), { plistContent }) 6 | } 7 | -------------------------------------------------------------------------------- /templates/template-ext-react/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # template-ext-react 2 | 3 | ## 0.0.2 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - @kksh/api@0.0.4 9 | 10 | ## 0.0.1 11 | 12 | ### Patch Changes 13 | 14 | - Updated dependencies [fba6a49] 15 | - @kksh/react@0.0.2 16 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/svelte.config.js: -------------------------------------------------------------------------------- 1 | import { vitePreprocess } from "@sveltejs/vite-plugin-svelte" 2 | 3 | export default { 4 | // Consult https://svelte.dev/docs#compile-time-svelte-preprocess 5 | // for more information about preprocessors 6 | preprocess: vitePreprocess() 7 | } 8 | -------------------------------------------------------------------------------- /apps/desktop/pages/dev/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 15 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # template-ext-svelte 2 | 3 | ## 0.0.2 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - @kksh/api@0.0.4 9 | 10 | ## 0.0.1 11 | 12 | ### Patch Changes 13 | 14 | - Updated dependencies [fba6a49] 15 | - @kksh/svelte@0.0.2 16 | -------------------------------------------------------------------------------- /apps/desktop/i18n/i18n.config.ts: -------------------------------------------------------------------------------- 1 | import en from "./en" 2 | import zh from "./zh" 3 | 4 | export default defineI18nConfig(() => ({ 5 | legacy: false, 6 | locale: "en", 7 | fallbackLocale: "en", 8 | messages: { 9 | // en: { ...enMessages }, 10 | en: en, 11 | zh: zh 12 | } 13 | })) 14 | -------------------------------------------------------------------------------- /packages/api/src/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | version, 3 | breakingChangesVersionCheckpoints, 4 | isVersionBetween, 5 | isCompatible 6 | } from "./version" 7 | export { constructExtensionSupportDir } from "./ui/server/path" 8 | export * from "./constants" 9 | export { TauriShellStdio } from './ui/api/shell' -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # template-ext-sveltekit 2 | 3 | ## 0.0.3 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - @kksh/api@0.0.4 9 | 10 | ## 0.0.2 11 | 12 | ### Patch Changes 13 | 14 | - Updated dependencies [fba6a49] 15 | - @kksh/svelte@0.0.2 16 | -------------------------------------------------------------------------------- /packages/gql/README.md: -------------------------------------------------------------------------------- 1 | # gql 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.10. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/jsonrpc-js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jsonrpc-js", 3 | "module": "index.ts", 4 | "type": "module", 5 | "devDependencies": { 6 | "@types/bun": "latest" 7 | }, 8 | "peerDependencies": { 9 | "typescript": "^5.0.0" 10 | }, 11 | "dependencies": { 12 | "zod": "^3.23.8" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/desktop/app.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/model/README.md: -------------------------------------------------------------------------------- 1 | # model 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.0.13. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/runtime/README.md: -------------------------------------------------------------------------------- 1 | # runtime 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.8. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/self_signed_certs/key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgHIWwXFtJccIhUD4J 3 | r6M3DrW3n4FBa6agiLXo2XKczt2hRANCAARNjAQGuI4CGLqli3ENVShmLPMQM2KJ 4 | PR+mKdrVkXAt2SnZvEBZRJjCQv7GNHfmePS/W/e+z1MRnBOWbMpunuKG 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /packages/api/src/utils/__tests__/path.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, test } from "bun:test" 2 | import { translateScopeToPath } from "../path" 3 | 4 | test("translateScopeToPath", async () => { 5 | // const path = await translateScopeToPath("$EXTENSION/foo.txt", "abc") 6 | // expect(path).toBe("abc/foo.txt") 7 | }) 8 | -------------------------------------------------------------------------------- /packages/runtime/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@jarvis/runtime", 3 | "module": "index.ts", 4 | "type": "module", 5 | "devDependencies": { 6 | "@types/bun": "latest" 7 | }, 8 | "dependencies": { 9 | "@kksh/api": "workspace:*" 10 | }, 11 | "peerDependencies": { 12 | "typescript": "^5.0.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/proto/helloworld.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | package helloworld; 3 | 4 | service Greeter { 5 | rpc SayHello (HelloRequest) returns (HelloReply); 6 | } 7 | 8 | message HelloRequest { 9 | string name = 1; 10 | } 11 | 12 | message HelloReply { 13 | string message = 1; 14 | } -------------------------------------------------------------------------------- /templates/template-ext-nuxt/pages/about.vue: -------------------------------------------------------------------------------- 1 | 4 | 12 | -------------------------------------------------------------------------------- /templates/template-ext-react/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.tsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')!).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /apps/desktop/components/ui/dialog/DialogClose.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /packages/api/src/commands/mdns.ts: -------------------------------------------------------------------------------- 1 | import { invoke } from "@tauri-apps/api/core" 2 | import type { MdnsPeers } from "../models/mdns" 3 | import { generateJarvisPluginCommand } from "./common" 4 | 5 | export function getPeers(): Promise { 6 | return invoke(generateJarvisPluginCommand("get_peers")) 7 | } 8 | -------------------------------------------------------------------------------- /packages/api/src/ui/worker/schema/markdown.ts: -------------------------------------------------------------------------------- 1 | import { object, string, type InferOutput } from "valibot" 2 | import { NodeName, NodeNameEnum } from "../../../models/constants" 3 | 4 | export const Markdown = object({ 5 | nodeName: NodeName, 6 | content: string() 7 | }) 8 | export type Markdown = InferOutput 9 | -------------------------------------------------------------------------------- /packages/jsonrpc-js/README.md: -------------------------------------------------------------------------------- 1 | # jsonrpc-js 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.8. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/setup/server.rs: -------------------------------------------------------------------------------- 1 | use crate::server::http::Server; 2 | use tauri::{AppHandle, Manager, Runtime}; 3 | 4 | pub fn setup_server(handle: &AppHandle) -> Result<(), Box> { 5 | let server = handle.state::(); 6 | server.start()?; 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "pflannery.vscode-versionlens", 4 | "usernamehw.errorlens", 5 | "ms-vscode.vscode-typescript-next", 6 | "rust-lang.rust-analyzer", 7 | "vue.volar", 8 | "esbenp.prettier-vscode", 9 | "zxh404.vscode-proto3", 10 | "unifiedjs.vscode-mdx" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /apps/cli/mod.ts: -------------------------------------------------------------------------------- 1 | export { buildWithDocker, buildWithDockerAndValidate } from "@/utils" 2 | export type { BuildResult } from "@/types" 3 | export { 4 | verifyCustomUiCommand, 5 | verifyTemplateUiCommand, 6 | verifySingleProject, 7 | verifyCmd 8 | } from "@/commands/verify" 9 | export { buildCmd } from "@/commands/build" 10 | -------------------------------------------------------------------------------- /apps/desktop/components/ui/dialog/DialogTrigger.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /packages/api/src/models/apps.ts: -------------------------------------------------------------------------------- 1 | import { nullable, object, string, type InferOutput } from "valibot" 2 | 3 | export const AppInfo = object({ 4 | name: string(), 5 | icon_path: nullable(string()), 6 | app_path_exe: nullable(string()), 7 | app_desktop_path: string() 8 | }) 9 | export type AppInfo = InferOutput 10 | -------------------------------------------------------------------------------- /packages/schema/dev.ts: -------------------------------------------------------------------------------- 1 | import { ExtPackageJson } from "@kksh/api/models" 2 | import * as v from "valibot" 3 | 4 | const pkgJson = await Bun.file( 5 | "/Users/hacker/Dev/projects/kunkun/kunkun/extensions/demo-worker-template-ext/package.json" 6 | ).text() 7 | const parsed = v.parse(ExtPackageJson, JSON.parse(pkgJson)) 8 | console.log(parsed) 9 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/commands/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod apps; 2 | pub mod clipboard; 3 | pub mod db; 4 | pub mod dev; 5 | pub mod discovery; 6 | pub mod extension; 7 | pub mod file_search; 8 | pub mod fs; 9 | pub mod path; 10 | pub mod server; 11 | // pub mod storage; 12 | pub mod security; 13 | pub mod system; 14 | pub mod utils; 15 | -------------------------------------------------------------------------------- /templates/template-ext-next/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | // dev url: http://localhost:5173/dev-extensions/template-ext-next/out 2 | "use client" 3 | 4 | import dynamic from "next/dynamic" 5 | 6 | const Main = dynamic(() => import("@/components/main"), { 7 | ssr: false 8 | }) 9 | export default function Home() { 10 | return
11 | } 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: GitHub Discussions 4 | url: https://github.com/kunkunsh/kunkun/discussions 5 | about: Please ask and answer questions here. 6 | - name: 💬 Discord 7 | url: https://discord.gg/7dzw3TYeTU 8 | about: Please ask and answer questions here. 9 | -------------------------------------------------------------------------------- /apps/desktop/stores/types.ts: -------------------------------------------------------------------------------- 1 | import type { TListItem } from "~/lib/types/list" 2 | 3 | export interface IExtensionLoader { 4 | id: string 5 | extensionName: string 6 | onSelect: (item: TListItem) => Promise 7 | load: () => Promise 8 | $listItems: Ref 9 | $filteredListItems: ComputedRef 10 | } 11 | -------------------------------------------------------------------------------- /packages/schema/README.md: -------------------------------------------------------------------------------- 1 | ```bash 2 | npx supabase gen types typescript --project-id "$PROJECT_REF" --schema public > supabase/types/supabase.ts 3 | 4 | ``` 5 | 6 | Add the following to `.env`: 7 | 8 | ```bash 9 | SUPABASE_URL= 10 | SUPABASE_SERVICE_ROLE_KEY= 11 | S3_ENDPOINT= 12 | S3_ACCESS_KEY_ID= 13 | S3_SECRET_ACCESS_KEY= 14 | ``` 15 | -------------------------------------------------------------------------------- /templates/template-ext-react/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}" 6 | // "./node_modules/@kksh/react/dist/**/*.{js,ts,jsx,tsx}" 7 | ], 8 | theme: { 9 | extend: {} 10 | }, 11 | plugins: [] 12 | } 13 | -------------------------------------------------------------------------------- /extensions/demo-worker-template-ext/README.md: -------------------------------------------------------------------------------- 1 | # tempalte-ext-worker 2 | 3 | To install dependencies: 4 | 5 | ```bash 6 | bun install 7 | ``` 8 | 9 | To run: 10 | 11 | ```bash 12 | bun run index.ts 13 | ``` 14 | 15 | This project was created using `bun init` in bun v1.1.20. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 16 | -------------------------------------------------------------------------------- /apps/desktop/.gitignore: -------------------------------------------------------------------------------- 1 | # Nuxt dev/build outputs 2 | .output 3 | .data 4 | .nuxt 5 | .nitro 6 | .cache 7 | dist 8 | 9 | # Node dependencies 10 | node_modules 11 | 12 | # Logs 13 | logs 14 | *.log 15 | 16 | # Misc 17 | .DS_Store 18 | .fleet 19 | .idea 20 | 21 | # Local env files 22 | .env 23 | .env.* 24 | !.env.example 25 | 26 | assets/dance.json 27 | -------------------------------------------------------------------------------- /packages/gql/src/operations/allExtensions.graphql: -------------------------------------------------------------------------------- 1 | query AllExtensions { 2 | extensionsCollection { 3 | edges { 4 | node { 5 | identifier 6 | version 7 | api_version 8 | name 9 | downloads 10 | short_description 11 | long_description 12 | icon 13 | } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | # Output 4 | .output 5 | .vercel 6 | /.svelte-kit 7 | /build 8 | 9 | # OS 10 | .DS_Store 11 | Thumbs.db 12 | 13 | # Env 14 | .env 15 | .env.* 16 | !.env.example 17 | !.env.test 18 | 19 | # Vite 20 | vite.config.js.timestamp-* 21 | vite.config.ts.timestamp-* 22 | extensions_support/ 23 | 24 | -------------------------------------------------------------------------------- /packages/ci/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@kksh/ci", 3 | "module": "index.ts", 4 | "type": "module", 5 | "scripts": { 6 | "test": "bun test --coverage" 7 | }, 8 | "devDependencies": { 9 | "@types/bun": "latest" 10 | }, 11 | "peerDependencies": { 12 | "typescript": "^5.0.0" 13 | }, 14 | "dependencies": { 15 | "fs-extra": "^11.2.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /templates/template-ext-nuxt/.gitignore: -------------------------------------------------------------------------------- 1 | # Nuxt dev/build outputs 2 | .output 3 | .data 4 | .nuxt 5 | .nitro 6 | .cache 7 | dist 8 | 9 | # Node dependencies 10 | node_modules 11 | 12 | # Logs 13 | logs 14 | *.log 15 | 16 | # Misc 17 | .DS_Store 18 | .fleet 19 | .idea 20 | 21 | # Local env files 22 | .env 23 | .env.* 24 | !.env.example 25 | extensions_support/ 26 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/vite.config.ts: -------------------------------------------------------------------------------- 1 | import path from "path" 2 | import { svelte } from "@sveltejs/vite-plugin-svelte" 3 | import { defineConfig } from "vite" 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [svelte()], 8 | resolve: { 9 | alias: { 10 | $lib: path.resolve("./src/lib") 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": true, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 100, 6 | "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], 7 | "overrides": [ 8 | { 9 | "files": "*.svelte", 10 | "options": { 11 | "parser": "svelte" 12 | } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface PageState {} 9 | // interface Platform {} 10 | } 11 | } 12 | 13 | export {}; 14 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "restricted", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": ["@kksh/desktop", "tauri-plugin-jarvis-api"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/ci/utils.ts: -------------------------------------------------------------------------------- 1 | import path from "path" 2 | 3 | export function getRepoRoot(): string { 4 | return path.resolve(__dirname, "../..") 5 | } 6 | 7 | export function getTemplatesDir(): string { 8 | return path.resolve(getRepoRoot(), "templates") 9 | } 10 | 11 | export function getExtensionsDir(): string { 12 | return path.resolve(getRepoRoot(), "extensions") 13 | } 14 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://shadcn-svelte.com/schema.json", 3 | "style": "new-york", 4 | "tailwind": { 5 | "config": "tailwind.config.ts", 6 | "css": "src/app.css", 7 | "baseColor": "neutral" 8 | }, 9 | "aliases": { 10 | "components": "$lib/components", 11 | "utils": "$lib/utils" 12 | }, 13 | "typescript": true 14 | } -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/model/extension.rs: -------------------------------------------------------------------------------- 1 | use super::manifest::Permissions; 2 | use serde::{Deserialize, Serialize}; 3 | use std::path::PathBuf; 4 | 5 | #[derive(Debug, Clone, Serialize, Deserialize)] 6 | pub struct Extension { 7 | pub path: PathBuf, 8 | pub processes: Vec, 9 | pub dist: Option, 10 | // pub identifier: String, 11 | } 12 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 5 | "skipLibCheck": true, 6 | "module": "ESNext", 7 | "moduleResolution": "bundler", 8 | "strict": true, 9 | "noEmit": true 10 | }, 11 | "include": ["vite.config.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://shadcn-svelte.com/schema.json", 3 | "style": "new-york", 4 | "tailwind": { 5 | "config": "tailwind.config.ts", 6 | "css": "src/app.css", 7 | "baseColor": "neutral" 8 | }, 9 | "aliases": { 10 | "components": "$lib/components", 11 | "utils": "$lib/utils" 12 | }, 13 | "typescript": true 14 | } -------------------------------------------------------------------------------- /packages/model/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "model", 3 | "module": "index.ts", 4 | "type": "module", 5 | "devDependencies": { 6 | "@types/uuid": "^9.0.7", 7 | "bun-types": "latest" 8 | }, 9 | "peerDependencies": { 10 | "typescript": "^5.0.0" 11 | }, 12 | "dependencies": { 13 | "@tauri-apps/api": "^1.5.4", 14 | "uuid": "^9.0.1", 15 | "zod": "^3.23.8" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/server/model.rs: -------------------------------------------------------------------------------- 1 | use serde::Serialize; 2 | use tauri::{AppHandle, Runtime}; 3 | 4 | #[derive(Serialize)] 5 | pub struct ServerInfo { 6 | pub service_name: String, 7 | pub service_version: String, 8 | } 9 | 10 | #[derive(Clone)] 11 | pub struct ServerState { 12 | // that holds some api specific state 13 | pub app_handle: AppHandle, 14 | } 15 | -------------------------------------------------------------------------------- /packages/mac-security-rs/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mac-security-rs" 3 | version = "0.1.0" 4 | edition = "2021" 5 | build = "build.rs" 6 | 7 | [target.'cfg(target_os = "macos")'.dependencies] 8 | serde = { workspace = true, features = ["derive"] } 9 | core-foundation = "0.10.0" 10 | localauthentication-rs = "0.1.0" 11 | objc = "0.2.7" 12 | 13 | [package.metadata] 14 | target_os = "macos" 15 | -------------------------------------------------------------------------------- /templates/template-ext-vue/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 5 | "skipLibCheck": true, 6 | "module": "ESNext", 7 | "moduleResolution": "bundler", 8 | "allowSyntheticDefaultImports": true, 9 | "strict": true, 10 | "noEmit": true 11 | }, 12 | "include": ["vite.config.ts"] 13 | } 14 | -------------------------------------------------------------------------------- /packages/api/src/runtime/deno.ts: -------------------------------------------------------------------------------- 1 | import { DenoStdio, RPCChannel } from "@hk/comlink-stdio" 2 | 3 | // deno-lint-ignore no-explicit-any 4 | export function expose(api: Record) { 5 | const stdio = new DenoStdio(Deno.stdin.readable, Deno.stdout.writable) 6 | const channel = new RPCChannel(stdio, api) 7 | return channel 8 | } 9 | 10 | export { DenoStdio, RPCChannel } from "@hk/comlink-stdio" 11 | -------------------------------------------------------------------------------- /apps/cli/src/commands/build.ts: -------------------------------------------------------------------------------- 1 | import { getRootDir } from "@/constants" 2 | import { buildWithDockerAndValidate } from "@/utils" 3 | 4 | export async function buildCmd(projectPath: string) { 5 | const rootDir = getRootDir() 6 | console.log("rootDir: ", rootDir) 7 | 8 | const buildResult = await buildWithDockerAndValidate(projectPath) 9 | console.log(buildResult) 10 | } 11 | 12 | export default buildCmd 13 | -------------------------------------------------------------------------------- /apps/desktop/components/ui/dialog/DialogFooter.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | -------------------------------------------------------------------------------- /apps/desktop/components/ui/dialog/DialogHeader.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 15 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/graphql.ts: -------------------------------------------------------------------------------- 1 | import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client" 2 | import { SUPABASE_ANON_KEY, SUPABASE_GRAPHQL_ENDPOINT } from "../constants" 3 | 4 | export const gqlClient = new ApolloClient({ 5 | cache: new InMemoryCache(), 6 | link: new HttpLink({ 7 | uri: SUPABASE_GRAPHQL_ENDPOINT, 8 | headers: { 9 | apiKey: SUPABASE_ANON_KEY 10 | } 11 | }) 12 | }) 13 | -------------------------------------------------------------------------------- /packages/db/src/main.rs: -------------------------------------------------------------------------------- 1 | use db::JarvisDB; 2 | use rusqlite::{params, Connection, Result}; 3 | 4 | fn main() -> Result<()> { 5 | let db = JarvisDB::new("jarvis.db", None)?; 6 | db.init()?; 7 | db.create_extension("test", "0.1.0", true, None, None)?; 8 | let plugins = db.get_all_extensions()?; 9 | for plugin in plugins { 10 | println!("{:#?}", plugin); 11 | } 12 | Ok(()) 13 | } 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /apps/desktop/components/ui/command/CommandShortcut.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 15 | -------------------------------------------------------------------------------- /packages/api/src/models/index.ts: -------------------------------------------------------------------------------- 1 | export * as List from "../ui/worker/schema/list" 2 | export * as Action from "../ui/worker/schema/action" 3 | export * from "./constants" 4 | export * from "./icon" 5 | export * from "./apps" 6 | export * from "./extension" 7 | export * from "./sql" 8 | export * from "./manifest" 9 | export * from "./styles" 10 | export { AllKunkunPermission, SystemPermissionSchema } from "../permissions" 11 | -------------------------------------------------------------------------------- /packages/supabase/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "deno.enablePaths": ["supabase/functions"], 3 | "deno.lint": true, 4 | "deno.unstable": true, 5 | "[typescript]": { 6 | "editor.defaultFormatter": "denoland.vscode-deno" 7 | }, 8 | "workbench.colorCustomizations": { 9 | "activityBar.background": "#30284F", 10 | "titleBar.activeBackground": "#43386F", 11 | "titleBar.activeForeground": "#FBFBFD" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /templates/template-ext-react/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 5 | "skipLibCheck": true, 6 | "module": "ESNext", 7 | "moduleResolution": "bundler", 8 | "allowSyntheticDefaultImports": true, 9 | "strict": true, 10 | "noEmit": true 11 | }, 12 | "include": ["vite.config.ts"] 13 | } 14 | -------------------------------------------------------------------------------- /apps/desktop/components/debug/DebugPage.vue: -------------------------------------------------------------------------------- 1 | 5 | 13 | -------------------------------------------------------------------------------- /templates/template-ext-next/src/components/about.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { ui } from "@kksh/api/ui/iframe" 4 | import { useEffect } from "react" 5 | 6 | export default function About() { 7 | useEffect(() => { 8 | ui.showBackButton("bottom-right") 9 | }, []) 10 | return ( 11 |
12 |

About Page

13 | Go To Home Page 14 |
15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /templates/template-ext-vue/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | extensions_support/ 26 | 27 | -------------------------------------------------------------------------------- /apps/cli/src/logger.ts: -------------------------------------------------------------------------------- 1 | import chalk from "chalk" 2 | import debug from "debug" 3 | 4 | debug.enable("*") 5 | 6 | export function printDivider(char: string = "=") { 7 | const divider = chalk.blue(char.repeat(process.stdout.columns)) 8 | console.log(divider) 9 | } 10 | 11 | export default { 12 | debug: debug("debug"), 13 | info: debug("info"), 14 | warn: debug("warn"), 15 | error: debug("error"), 16 | printDivider 17 | } 18 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/utils/time.rs: -------------------------------------------------------------------------------- 1 | use chrono::NaiveDateTime; 2 | 3 | pub fn sqlite_timestamp_to_unix_timestamp(timestamp: &str) -> anyhow::Result { 4 | // Parse SQLite timestamp string into a `NaiveDateTime` 5 | let dt = NaiveDateTime::parse_from_str(timestamp, "%Y-%m-%d %H:%M:%S")?; 6 | 7 | // Convert `NaiveDateTime` to Unix timestamp (seconds since epoch) 8 | Ok(dt.and_utc().timestamp()) 9 | } 10 | -------------------------------------------------------------------------------- /templates/template-ext-react/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | extensions_support/ 26 | 27 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | extensions_support/ 26 | 27 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/request.ts: -------------------------------------------------------------------------------- 1 | import { fetch } from "@tauri-apps/plugin-http" 2 | 3 | /** 4 | * Verify if a given URL is valid by checking with head request 5 | * @param downloadUrl 6 | */ 7 | export async function verifyUrlAlive(downloadUrl: string): Promise { 8 | try { 9 | let response = await fetch(downloadUrl, { method: "HEAD" }) 10 | return response.ok 11 | } catch (e) { 12 | return false 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/api/src/ui/server/__tests__/fs.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, test } from "bun:test" 2 | import { minimatch } from "minimatch" 3 | import { translateScopeToPath } from "../../../utils/path" 4 | 5 | test("minimatch", () => { 6 | // console.log(minimatch("/desktop/newbi/bar.foo", "/desktop/**/*.foo")) 7 | // console.log("$DESKTOP/newbi/bar.foo".split("/")) 8 | // find the first slash of "$DESKTOP/newbi/bar.foo" 9 | }) 10 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |
%sveltekit.body%
11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/mac-security-rs/src/main.rs: -------------------------------------------------------------------------------- 1 | #![cfg(target_os = "macos")] 2 | use mac_security_rs::{ 3 | preflight_screen_capture_access, request_screen_capture_access, verify_auth, AuthPolicy, 4 | }; 5 | 6 | fn main() { 7 | #[cfg(target_os = "macos")] 8 | // println!("{}", request_screen_capture_access()); 9 | println!("{}", verify_auth(AuthPolicy::Biometrics)); 10 | } 11 | 12 | #[cfg(not(target_os = "macos"))] 13 | fn main() {} 14 | -------------------------------------------------------------------------------- /extensions/demo-worker-template-ext/deno-src/rpc.ts: -------------------------------------------------------------------------------- 1 | import { expose } from '@kunkun/api/runtime/deno' 2 | 3 | export interface API { 4 | add(a: number, b: number): Promise 5 | subtract(a: number, b: number): Promise 6 | } 7 | 8 | // Define your API methods 9 | export const apiMethods: API = { 10 | add: async (a: number, b: number) => a + b, 11 | subtract: async (a: number, b: number) => a - b 12 | } 13 | expose(apiMethods) 14 | -------------------------------------------------------------------------------- /packages/db/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "db" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | rusqlite = { version = "0.31.0", features = [ 8 | "bundled", 9 | # "bundled-sqlcipher" 10 | ] } 11 | serde = { workspace = true, features = ["derive"] } 12 | serde_json = { workspace = true } 13 | tempfile = "3.10.1" 14 | strum = { workspace = true } 15 | strum_macros = { workspace = true } 16 | anyhow.workspace = true 17 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vendors/tauri-plugin-network"] 2 | path = vendors/tauri-plugin-network 3 | url = https://github.com/HuakunShen/tauri-plugin-network.git 4 | [submodule "vendors/applications-rs"] 5 | path = vendors/applications-rs 6 | url = https://github.com/HuakunShen/applications-rs.git 7 | [submodule "vendors/tauri-plugin-system-info"] 8 | path = vendors/tauri-plugin-system-info 9 | url = https://github.com/HuakunShen/tauri-plugin-system-info.git -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/desktop.rs: -------------------------------------------------------------------------------- 1 | use serde::de::DeserializeOwned; 2 | use tauri::{plugin::PluginApi, AppHandle, Runtime}; 3 | 4 | pub fn init( 5 | app: &AppHandle, 6 | _api: PluginApi, 7 | ) -> crate::Result> { 8 | Ok(Jarvis(app.clone())) 9 | } 10 | 11 | /// Access to the jarvis APIs. 12 | pub struct Jarvis(AppHandle); 13 | 14 | impl Jarvis {} 15 | -------------------------------------------------------------------------------- /templates/template-ext-vue/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + Vue + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.workingDirectories": [ 3 | { 4 | "mode": "auto" 5 | } 6 | ], 7 | "workbench.colorCustomizations": { 8 | "activityBar.background": "#22148A", 9 | "titleBar.activeBackground": "#301DC1", 10 | "titleBar.activeForeground": "#FCFCFF" 11 | }, 12 | "json.schemas": [], 13 | "editor.tabSize": 2, 14 | "editor.indentSize": 2, 15 | "editor.insertSpaces": false, 16 | "deno.enable": false 17 | } -------------------------------------------------------------------------------- /templates/template-ext-next/src/components/main.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { ui } from "@kksh/api/ui/iframe" 4 | import { Button } from "@kksh/react" 5 | import { useEffect } from "react" 6 | 7 | export default function Home() { 8 | useEffect(() => { 9 | ui.showBackButton("bottom-right") 10 | }, []) 11 | return ( 12 |
13 |

Home Page

14 | 15 |
16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /templates/template-ext-react/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + Svelte + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /apps/cli/src/docker/entrypoint.sh: -------------------------------------------------------------------------------- 1 | . ~/.bashrc 2 | 3 | cd /workspace 4 | rm *.tgz 5 | rm -rf node_modules 6 | cp -r /workspace /workspace-copy 7 | cd /workspace-copy 8 | pnpm i 9 | pnpm run build 10 | npm pack 11 | # check number of *.tgz file in current directory 12 | # if more than 1, then exit with error 13 | if [ $(ls -1 *.tgz 2>/dev/null | wc -l) -gt 1 ]; then 14 | echo "More than one tgz file found" 15 | exit 1 16 | fi 17 | cp *.tgz /workspace 18 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2021", 4 | "module": "esnext", 5 | "moduleResolution": "bundler", 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noUnusedLocals": true, 9 | "noImplicitAny": true, 10 | "noEmit": true, 11 | "declaration": true, 12 | "declarationMap": true, 13 | "rootDir": "." 14 | }, 15 | "include": ["guest-js/*.ts"], 16 | "exclude": ["dist-js", "node_modules"] 17 | } 18 | -------------------------------------------------------------------------------- /apps/desktop/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://shadcn-vue.com/schema.json", 3 | "style": "new-york", 4 | "typescript": true, 5 | "tsConfigPath": ".nuxt/tsconfig.json", 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "assets/css/tailwind.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true 11 | }, 12 | "framework": "nuxt", 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/search.ts: -------------------------------------------------------------------------------- 1 | import type { TListItem } from "../types/list" 2 | 3 | export function filterListItem(query: string, items: TListItem[]) { 4 | return items.filter((item) => { 5 | const titleMatch = item.title.toLowerCase().includes(query.toLowerCase()) 6 | const keywordMatch = item.keywords 7 | .map((keyword) => keyword.toLowerCase().includes(query.toLowerCase())) 8 | .some((x) => x) 9 | return titleMatch || keywordMatch 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /packages/api/src/commands/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./apps" 2 | export * from "./fs" 3 | export * from "./server" 4 | export * from "./system" 5 | export * from "./tools" 6 | export * from "./extension" 7 | export * from "./store" 8 | export * as db from "./db" 9 | export { JarvisExtDB } from "./db" 10 | export * from "./clipboard" 11 | export * from "./fileSearch" 12 | export * from "./utils" 13 | export * as macSecurity from "./mac-security" 14 | export * from "./mdns" 15 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/src/routes/about/+page.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | About Page 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /templates/template-ext-vue/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://shadcn-vue.com/schema.json", 3 | "style": "new-york", 4 | "typescript": true, 5 | "tsConfigPath": "./tsconfig.json", 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "src/index.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true 11 | }, 12 | "framework": "vite", 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/api/patch-version.ts: -------------------------------------------------------------------------------- 1 | import fs from "fs" 2 | import { version } from "./package.json" 3 | 4 | const versionTsContent = fs.readFileSync("./src/version.ts", "utf-8") 5 | const lines: string[] = [] 6 | for (const line of versionTsContent.split("\n")) { 7 | if (line.includes("export const version")) { 8 | lines.push(`export const version = "${version}"`) 9 | } else { 10 | lines.push(line) 11 | } 12 | } 13 | fs.writeFileSync("./src/version.ts", lines.join("\n")) 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Tauri + Svelte 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /templates/template-ext-vue/vite.config.ts: -------------------------------------------------------------------------------- 1 | import path from "node:path" 2 | import vue from "@vitejs/plugin-vue" 3 | import autoprefixer from "autoprefixer" 4 | import { defineConfig } from "vite" 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | css: { 9 | postcss: { 10 | plugins: [autoprefixer()] 11 | } 12 | }, 13 | plugins: [vue()], 14 | resolve: { 15 | alias: { 16 | "@": path.resolve(__dirname, "./src") 17 | } 18 | } 19 | }) 20 | -------------------------------------------------------------------------------- /apps/desktop/layouts/ui-only.vue: -------------------------------------------------------------------------------- 1 | 8 | 17 | -------------------------------------------------------------------------------- /apps/desktop/utils/commands.ts: -------------------------------------------------------------------------------- 1 | import { toast } from "vue-sonner" 2 | 3 | export function toggleDevExtensionLiveLoadMode() { 4 | const appConfig = useAppConfigStore() 5 | appConfig.setDevExtLoadUrl(!appConfig.devExtLoadUrl) 6 | const appStateStore = useAppStateStore() 7 | appStateStore.setSearchTermSync("") 8 | toast.success(`Dev Extension Live Load Mode toggled to: ${appConfig.devExtLoadUrl}`) 9 | } 10 | 11 | export function onBackHome() { 12 | navigateTo("/") 13 | } 14 | -------------------------------------------------------------------------------- /packages/api/src/ui/api/worker-ui.ts: -------------------------------------------------------------------------------- 1 | // import { proxy, type Remote } from "@huakunshen/comlink" 2 | // import type { IUiWorker } from "../client" 3 | 4 | // export function constructWorkerUiAPI(api: Remote): IUiWorker { 5 | // return { 6 | // goBack: api.goBack, 7 | // render: api.render, 8 | // setScrollLoading: api.setScrollLoading, 9 | // setSearchTerm: api.setSearchTerm, 10 | // setSearchBarPlaceholder: api.setSearchBarPlaceholder, 11 | // } 12 | // } 13 | -------------------------------------------------------------------------------- /packages/api/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "entryPoints": [ 4 | "src/index.ts", 5 | "src/ui/index.ts", 6 | "src/ui/iframe/index.ts", 7 | "src/ui/worker/index.ts", 8 | "src/models/index.ts", 9 | "src/commands/index.ts", 10 | "src/ui/api/permissions.ts" 11 | ], 12 | "visibilityFilters": { 13 | "protected": false, 14 | "private": false, 15 | "inherited": true, 16 | "external": true 17 | }, 18 | "out": "docs" 19 | } 20 | -------------------------------------------------------------------------------- /templates/template-ext-nuxt/nuxt.config.ts: -------------------------------------------------------------------------------- 1 | // https://nuxt.com/docs/api/configuration/nuxt-config 2 | export default defineNuxtConfig({ 3 | compatibilityDate: "2024-04-03", 4 | css: ["@kksh/vue/css", "@kksh/vue/themes"], 5 | devtools: { enabled: true }, 6 | ssr: false, 7 | devServer: { 8 | port: 5173 // avoid conflict Desktop App in Dev Mode 9 | }, 10 | nitro: { 11 | output: { 12 | publicDir: "dist" 13 | } 14 | }, 15 | modules: ["@nuxtjs/tailwindcss"] 16 | }) 17 | -------------------------------------------------------------------------------- /apps/desktop/components/Kbd.vue: -------------------------------------------------------------------------------- 1 | 7 | 19 | -------------------------------------------------------------------------------- /apps/desktop/uno.config.ts: -------------------------------------------------------------------------------- 1 | import { 2 | defineConfig, 3 | presetAttributify, 4 | presetTagify, 5 | presetTypography, 6 | presetUno, 7 | presetWebFonts 8 | } from "unocss" 9 | 10 | export default defineConfig({ 11 | presets: [ 12 | presetAttributify(), 13 | presetUno(), 14 | presetWebFonts({ 15 | provider: "google" 16 | }), 17 | presetTagify({ 18 | prefix: "un-" 19 | }), 20 | presetTypography() 21 | ], 22 | rules: [], 23 | safelist: ["bg-red-500/30"] 24 | }) 25 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/mute.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-mute" 7 | description = "Enables the mute command without any pre-configured scope." 8 | commands.allow = ["mute"] 9 | 10 | [[permission]] 11 | identifier = "deny-mute" 12 | description = "Denies the mute command without any pre-configured scope." 13 | commands.deny = ["mute"] 14 | -------------------------------------------------------------------------------- /apps/desktop/components/ui/dialog/Dialog.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | -------------------------------------------------------------------------------- /apps/desktop/lib/stores/toast.ts: -------------------------------------------------------------------------------- 1 | import type { TauriToast } from "@/components/tauri/toast" 2 | import { atom } from "nanostores" 3 | 4 | export const $toasts = atom([]) 5 | 6 | export function enqueueToast(toast: TauriToast) { 7 | $toasts.set([toast, ...$toasts.get()]) 8 | // return $toasts.value?.unshift(toast); 9 | } 10 | 11 | export function dequeueToast() { 12 | const last = $toasts.get().pop() 13 | $toasts.set($toasts.get().slice(0, -1)) 14 | return last 15 | } 16 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/sleep.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-sleep" 7 | description = "Enables the sleep command without any pre-configured scope." 8 | commands.allow = ["sleep"] 9 | 10 | [[permission]] 11 | identifier = "deny-sleep" 12 | description = "Denies the sleep command without any pre-configured scope." 13 | commands.deny = ["sleep"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/unzip.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-unzip" 7 | description = "Enables the unzip command without any pre-configured scope." 8 | commands.allow = ["unzip"] 9 | 10 | [[permission]] 11 | identifier = "deny-unzip" 12 | description = "Denies the unzip command without any pre-configured scope." 13 | commands.deny = ["unzip"] 14 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 2, 4 | "trailingComma": "none", 5 | "semi": false, 6 | "useTabs": true, 7 | "plugins": [ 8 | "prettier-plugin-svelte", 9 | "@ianvs/prettier-plugin-sort-imports", 10 | "prettier-plugin-tailwindcss" 11 | ], 12 | "overrides": [ 13 | { 14 | "files": "*.svelte", 15 | "options": { 16 | "parser": "svelte" 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/reboot.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-reboot" 7 | description = "Enables the reboot command without any pre-configured scope." 8 | commands.allow = ["reboot"] 9 | 10 | [[permission]] 11 | identifier = "deny-reboot" 12 | description = "Denies the reboot command without any pre-configured scope." 13 | commands.deny = ["reboot"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/unmute.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-unmute" 7 | description = "Enables the unmute command without any pre-configured scope." 8 | commands.allow = ["unmute"] 9 | 10 | [[permission]] 11 | identifier = "deny-unmute" 12 | description = "Denies the unmute command without any pre-configured scope." 13 | commands.deny = ["unmute"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/README.md: -------------------------------------------------------------------------------- 1 | # Svelte + Vite 2 | 3 | This template should help get you started developing with Tauri and Svelte in Vite. 4 | 5 | ## Recommended IDE Setup 6 | 7 | [VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer). 8 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/shutdown.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-shutdown" 7 | description = "Enables the shutdown command without any pre-configured scope." 8 | commands.allow = ["shutdown"] 9 | 10 | [[permission]] 11 | identifier = "deny-shutdown" 12 | description = "Denies the shutdown command without any pre-configured scope." 13 | commands.deny = ["shutdown"] 14 | -------------------------------------------------------------------------------- /apps/create-kunkun/src/__tests__/util.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, test } from "bun:test" 2 | import { getLatestNpmPkgInfo, getLatestNpmPkgVersion } from "../utils" 3 | 4 | test("getLatestNpmPkgInfo", async () => { 5 | const pkg = await getLatestNpmPkgInfo("@kksh/vue") 6 | expect(pkg.name).toBe("@kksh/vue") 7 | expect(pkg.version).toBeDefined() 8 | }) 9 | 10 | test("getLatestNpmPkgVersion", async () => { 11 | const version = await getLatestNpmPkgVersion("@kksh/vue") 12 | expect(version).toBeDefined() 13 | }) 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_peers.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-peers" 7 | description = "Enables the get_peers command without any pre-configured scope." 8 | commands.allow = ["get_peers"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-peers" 12 | description = "Denies the get_peers command without any pre-configured scope." 13 | commands.deny = ["get_peers"] 14 | -------------------------------------------------------------------------------- /templates/template-ext-vue/src/assets/vue.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/cli/README.md: -------------------------------------------------------------------------------- 1 | # kksh 2 | 3 | This is a CLI tool for developers to develop Kunkun extensions. 4 | 5 | ## Usage 6 | 7 | ```bash 8 | # Create an extension template first 9 | npm init kunkun@latest 10 | 11 | # You can verify the extension manifest, this expect `npm run build` is done already and all generated artifacts listed in manifest is present. 12 | npx kksh verify 13 | 14 | # Build extension with docker, simulate how Kunkun's CI builds the extension 15 | npx kksh build 16 | ``` 17 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/app_is_dev.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-app-is-dev" 7 | description = "Enables the app_is_dev command without any pre-configured scope." 8 | commands.allow = ["app_is_dev"] 9 | 10 | [[permission]] 11 | identifier = "deny-app-is-dev" 12 | description = "Denies the app_is_dev command without any pre-configured scope." 13 | commands.deny = ["app_is_dev"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/open_trash.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-open-trash" 7 | description = "Enables the open_trash command without any pre-configured scope." 8 | commands.allow = ["open_trash"] 9 | 10 | [[permission]] 11 | identifier = "deny-open-trash" 12 | description = "Denies the open_trash command without any pre-configured scope." 13 | commands.deny = ["open_trash"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/set_volume.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-set-volume" 7 | description = "Enables the set_volume command without any pre-configured scope." 8 | commands.allow = ["set_volume"] 9 | 10 | [[permission]] 11 | identifier = "deny-set-volume" 12 | description = "Denies the set_volume command without any pre-configured scope." 13 | commands.deny = ["set_volume"] 14 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/src/routes/+layout.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/format.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 2500 -> 2.5k 3 | * 2500000 -> 2.5m 4 | * 250,000,000 -> 250m 5 | * 2,500,000,000 -> 2.5b 6 | * @param num 7 | * @returns 8 | */ 9 | export function humanReadableNumber(num: number): string { 10 | if (num < 1000) { 11 | return num.toString() 12 | } else if (num < 1000000) { 13 | return (num / 1000).toFixed(1) + "k" 14 | } else if (num < 1000000000) { 15 | return (num / 1000000).toFixed(1) + "m" 16 | } else { 17 | return (num / 1000000000).toFixed(1) + "b" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/empty_trash.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-empty-trash" 7 | description = "Enables the empty_trash command without any pre-configured scope." 8 | commands.allow = ["empty_trash"] 9 | 10 | [[permission]] 11 | identifier = "deny-empty-trash" 12 | description = "Denies the empty_trash command without any pre-configured scope." 13 | commands.deny = ["empty_trash"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/file_search.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-file-search" 7 | description = "Enables the file_search command without any pre-configured scope." 8 | commands.allow = ["file_search"] 9 | 10 | [[permission]] 11 | identifier = "deny-file-search" 12 | description = "Denies the file_search command without any pre-configured scope." 13 | commands.deny = ["file_search"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_history.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-history" 7 | description = "Enables the get_history command without any pre-configured scope." 8 | commands.allow = ["get_history"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-history" 12 | description = "Denies the get_history command without any pre-configured scope." 13 | commands.deny = ["get_history"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/logout_user.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-logout-user" 7 | description = "Enables the logout_user command without any pre-configured scope." 8 | commands.allow = ["logout_user"] 9 | 10 | [[permission]] 11 | identifier = "deny-logout-user" 12 | description = "Denies the logout_user command without any pre-configured scope." 13 | commands.deny = ["logout_user"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/path_exists.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-path-exists" 7 | description = "Enables the path_exists command without any pre-configured scope." 8 | commands.allow = ["path_exists"] 9 | 10 | [[permission]] 11 | identifier = "deny-path-exists" 12 | description = "Denies the path_exists command without any pre-configured scope." 13 | commands.deny = ["path_exists"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/stop_server.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-stop-server" 7 | description = "Enables the stop_server command without any pre-configured scope." 8 | commands.allow = ["stop_server"] 9 | 10 | [[permission]] 11 | identifier = "deny-stop-server" 12 | description = "Denies the stop_server command without any pre-configured scope." 13 | commands.deny = ["stop_server"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/toggle_mute.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-toggle-mute" 7 | description = "Enables the toggle_mute command without any pre-configured scope." 8 | commands.allow = ["toggle_mute"] 9 | 10 | [[permission]] 11 | identifier = "deny-toggle-mute" 12 | description = "Denies the toggle_mute command without any pre-configured scope." 13 | commands.deny = ["toggle_mute"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/verify_auth.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-verify-auth" 7 | description = "Enables the verify_auth command without any pre-configured scope." 8 | commands.allow = ["verify_auth"] 9 | 10 | [[permission]] 11 | identifier = "deny-verify-auth" 12 | description = "Denies the verify_auth command without any pre-configured scope." 13 | commands.deny = ["verify_auth"] 14 | -------------------------------------------------------------------------------- /templates/template-ext-worker/src/i18n/index.ts: -------------------------------------------------------------------------------- 1 | import i18next from "i18next" 2 | import en, { type Translation } from "./en" 3 | import zh from "./zh" 4 | 5 | export function setupI18n(language: "en" | "zh" = "en") { 6 | i18next.init({ 7 | resources: { 8 | en: { 9 | translation: en 10 | }, 11 | zh: { 12 | translation: zh 13 | } 14 | }, 15 | lng: language, // default language 16 | fallbackLng: "en" 17 | }) 18 | } 19 | 20 | export const t = (key: keyof Translation, options?: any) => i18next.t(key, options) 21 | -------------------------------------------------------------------------------- /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.github/workflows/jsr-publish.yml: -------------------------------------------------------------------------------- 1 | name: JSR Publish 2 | on: 3 | push: 4 | 5 | jobs: 6 | publish: 7 | runs-on: ubuntu-latest 8 | 9 | permissions: 10 | contents: read 11 | id-token: write 12 | 13 | steps: 14 | - uses: actions/checkout@v4 15 | - uses: denoland/setup-deno@v2 16 | with: 17 | deno-version: v2.x 18 | - name: Publish package 19 | working-directory: ./packages/api 20 | run: | 21 | deno install 22 | npx jsr publish --allow-slow-types 23 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/show_desktop.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-show-desktop" 7 | description = "Enables the show_desktop command without any pre-configured scope." 8 | commands.allow = ["show_desktop"] 9 | 10 | [[permission]] 11 | identifier = "deny-show-desktop" 12 | description = "Denies the show_desktop command without any pre-configured scope." 13 | commands.deny = ["show_desktop"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/start_server.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-start-server" 7 | description = "Enables the start_server command without any pre-configured scope." 8 | commands.allow = ["start_server"] 9 | 10 | [[permission]] 11 | identifier = "deny-start-server" 12 | description = "Denies the start_server command without any pre-configured scope." 13 | commands.deny = ["start_server"] 14 | -------------------------------------------------------------------------------- /packages/api/src/ui/server/utils.ts: -------------------------------------------------------------------------------- 1 | import { plistToJson } from "../../commands/utils" 2 | import type { IUtils } from "../client" 3 | 4 | export function constructUtilsApi(): IUtils { 5 | return { 6 | plist: { 7 | // build: (data: any) => { 8 | // return Promise.resolve(plist.build(data)) 9 | // }, 10 | /** 11 | * parse plist content to json string 12 | * @param plistContent 13 | * @returns 14 | */ 15 | parse: (plistContent: string) => { 16 | return plistToJson(plistContent) 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/load_manifest.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-load-manifest" 7 | description = "Enables the load_manifest command without any pre-configured scope." 8 | commands.allow = ["load_manifest"] 9 | 10 | [[permission]] 11 | identifier = "deny-load-manifest" 12 | description = "Denies the load_manifest command without any pre-configured scope." 13 | commands.deny = ["load_manifest"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/open_devtools.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-open-devtools" 7 | description = "Enables the open_devtools command without any pre-configured scope." 8 | commands.allow = ["open_devtools"] 9 | 10 | [[permission]] 11 | identifier = "deny-open-devtools" 12 | description = "Denies the open_devtools command without any pre-configured scope." 13 | commands.deny = ["open_devtools"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/plist_to_json.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-plist-to-json" 7 | description = "Enables the plist_to_json command without any pre-configured scope." 8 | commands.allow = ["plist_to_json"] 9 | 10 | [[permission]] 11 | identifier = "deny-plist-to-json" 12 | description = "Denies the plist_to_json command without any pre-configured scope." 13 | commands.deny = ["plist_to_json"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/quit_all_apps.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-quit-all-apps" 7 | description = "Enables the quit_all_apps command without any pre-configured scope." 8 | commands.allow = ["quit_all_apps"] 9 | 10 | [[permission]] 11 | identifier = "deny-quit-all-apps" 12 | description = "Denies the quit_all_apps command without any pre-configured scope." 13 | commands.deny = ["quit_all_apps"] 14 | -------------------------------------------------------------------------------- /extensions/demo-worker-template-ext/rollup.config.js: -------------------------------------------------------------------------------- 1 | import { visualizer } from "rollup-plugin-visualizer"; 2 | import resolve from '@rollup/plugin-node-resolve'; 3 | import typescript from "@rollup/plugin-typescript"; 4 | import commonjs from '@rollup/plugin-commonjs'; 5 | 6 | 7 | export default { 8 | input: "src/index.ts", 9 | output: { 10 | dir: "dist", 11 | format: "esm", 12 | }, 13 | plugins: [ 14 | typescript(), 15 | resolve(), 16 | commonjs(), 17 | // put it the last one 18 | visualizer(), 19 | ], 20 | }; 21 | -------------------------------------------------------------------------------- /packages/api/src/models/mdns.ts: -------------------------------------------------------------------------------- 1 | import { array, number, object, optional, record, string, type InferOutput } from "valibot" 2 | 3 | export const MdnsServiceInfo = object({ 4 | addresses: array(string()), 5 | fullname: string(), 6 | hostname: string(), 7 | port: number(), 8 | service_type: string(), 9 | subType: optional(string()) 10 | }) 11 | 12 | export type MdnsServiceInfo = InferOutput 13 | 14 | export const MdnsPeers = record(string(), MdnsServiceInfo) 15 | 16 | export type MdnsPeers = InferOutput 17 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # tauri-plugin-jarvis-api 2 | 3 | ## 0.0.2 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies [9fa3d8e] 8 | - Updated dependencies [0a1ab7c] 9 | - Updated dependencies [b48d53b] 10 | - @kksh/api@0.0.20 11 | 12 | ## 0.0.2 13 | 14 | ### Patch Changes 15 | 16 | - Updated dependencies [9fa3d8e] 17 | - Updated dependencies [0a1ab7c] 18 | - Updated dependencies [b48d53b] 19 | - @kksh/api@0.0.20 20 | 21 | ## 0.0.1 22 | 23 | ### Patch Changes 24 | 25 | - Updated dependencies 26 | - @kksh/api@0.0.4 27 | -------------------------------------------------------------------------------- /templates/template-ext-react/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:@typescript-eslint/recommended', 7 | 'plugin:react-hooks/recommended', 8 | ], 9 | ignorePatterns: ['dist', '.eslintrc.cjs'], 10 | parser: '@typescript-eslint/parser', 11 | plugins: ['react-refresh'], 12 | rules: { 13 | 'react-refresh/only-export-components': [ 14 | 'warn', 15 | { allowConstantExport: true }, 16 | ], 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/add_to_history.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-add-to-history" 7 | description = "Enables the add_to_history command without any pre-configured scope." 8 | commands.allow = ["add_to_history"] 9 | 10 | [[permission]] 11 | identifier = "deny-add-to-history" 12 | description = "Denies the add_to_history command without any pre-configured scope." 13 | commands.deny = ["add_to_history"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/close_devtools.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-close-devtools" 7 | description = "Enables the close_devtools command without any pre-configured scope." 8 | commands.allow = ["close_devtools"] 9 | 10 | [[permission]] 11 | identifier = "deny-close-devtools" 12 | description = "Denies the close_devtools command without any pre-configured scope." 13 | commands.deny = ["close_devtools"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/create_command.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-create-command" 7 | description = "Enables the create_command command without any pre-configured scope." 8 | commands.allow = ["create_command"] 9 | 10 | [[permission]] 11 | identifier = "deny-create-command" 12 | description = "Denies the create_command command without any pre-configured scope." 13 | commands.deny = ["create_command"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/restart_server.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-restart-server" 7 | description = "Enables the restart_server command without any pre-configured scope." 8 | commands.allow = ["restart_server"] 9 | 10 | [[permission]] 11 | identifier = "deny-restart-server" 12 | description = "Denies the restart_server command without any pre-configured scope." 13 | commands.deny = ["restart_server"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/run_powershell.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-run-powershell" 7 | description = "Enables the run_powershell command without any pre-configured scope." 8 | commands.allow = ["run_powershell"] 9 | 10 | [[permission]] 11 | identifier = "deny-run-powershell" 12 | description = "Denies the run_powershell command without any pre-configured scope." 13 | commands.deny = ["run_powershell"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/sleep_displays.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-sleep-displays" 7 | description = "Enables the sleep_displays command without any pre-configured scope." 8 | commands.allow = ["sleep_displays"] 9 | 10 | [[permission]] 11 | identifier = "deny-sleep-displays" 12 | description = "Denies the sleep_displays command without any pre-configured scope." 13 | commands.deny = ["sleep_displays"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/turn_volume_up.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-turn-volume-up" 7 | description = "Enables the turn_volume_up command without any pre-configured scope." 8 | commands.allow = ["turn_volume_up"] 9 | 10 | [[permission]] 11 | identifier = "deny-turn-volume-up" 12 | description = "Denies the turn_volume_up command without any pre-configured scope." 13 | commands.deny = ["turn_volume_up"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/eject_all_disks.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-eject-all-disks" 7 | description = "Enables the eject_all_disks command without any pre-configured scope." 8 | commands.allow = ["eject_all_disks"] 9 | 10 | [[permission]] 11 | identifier = "deny-eject-all-disks" 12 | description = "Denies the eject_all_disks command without any pre-configured scope." 13 | commands.deny = ["eject_all_disks"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_server_port.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-server-port" 7 | description = "Enables the get_server_port command without any pre-configured scope." 8 | commands.allow = ["get_server_port"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-server-port" 12 | description = "Denies the get_server_port command without any pre-configured scope." 13 | commands.deny = ["get_server_port"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/toggle_devtools.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-toggle-devtools" 7 | description = "Enables the toggle_devtools command without any pre-configured scope." 8 | commands.allow = ["toggle_devtools"] 9 | 10 | [[permission]] 11 | identifier = "deny-toggle-devtools" 12 | description = "Denies the toggle_devtools command without any pre-configured scope." 13 | commands.deny = ["toggle_devtools"] 14 | -------------------------------------------------------------------------------- /apps/desktop/components/StrikeSeparator.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 20 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/compress_tarball.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-compress-tarball" 7 | description = "Enables the compress_tarball command without any pre-configured scope." 8 | commands.allow = ["compress_tarball"] 9 | 10 | [[permission]] 11 | identifier = "deny-compress-tarball" 12 | description = "Denies the compress_tarball command without any pre-configured scope." 13 | commands.deny = ["compress_tarball"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/create_extension.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-create-extension" 7 | description = "Enables the create_extension command without any pre-configured scope." 8 | commands.allow = ["create_extension"] 9 | 10 | [[permission]] 11 | identifier = "deny-create-extension" 12 | description = "Denies the create_extension command without any pre-configured scope." 13 | commands.deny = ["create_extension"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_applications.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-applications" 7 | description = "Enables the get_applications command without any pre-configured scope." 8 | commands.allow = ["get_applications"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-applications" 12 | description = "Denies the get_applications command without any pre-configured scope." 13 | commands.deny = ["get_applications"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/is_devtools_open.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-is-devtools-open" 7 | description = "Enables the is_devtools_open command without any pre-configured scope." 8 | commands.allow = ["is_devtools_open"] 9 | 10 | [[permission]] 11 | identifier = "deny-is-devtools-open" 12 | description = "Denies the is_devtools_open command without any pre-configured scope." 13 | commands.deny = ["is_devtools_open"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/run_apple_script.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-run-apple-script" 7 | description = "Enables the run_apple_script command without any pre-configured scope." 8 | commands.allow = ["run_apple_script"] 9 | 10 | [[permission]] 11 | identifier = "deny-run-apple-script" 12 | description = "Denies the run_apple_script command without any pre-configured scope." 13 | commands.deny = ["run_apple_script"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/toggle_bluetooth.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-toggle-bluetooth" 7 | description = "Enables the toggle_bluetooth command without any pre-configured scope." 8 | commands.allow = ["toggle_bluetooth"] 9 | 10 | [[permission]] 11 | identifier = "deny-toggle-bluetooth" 12 | description = "Denies the toggle_bluetooth command without any pre-configured scope." 13 | commands.deny = ["toggle_bluetooth"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/turn_volume_down.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-turn-volume-down" 7 | description = "Enables the turn_volume_down command without any pre-configured scope." 8 | commands.allow = ["turn_volume_down"] 9 | 10 | [[permission]] 11 | identifier = "deny-turn-volume-down" 12 | description = "Denies the turn_volume_down command without any pre-configured scope." 13 | commands.deny = ["turn_volume_down"] 14 | -------------------------------------------------------------------------------- /apps/desktop/components/Metadata/tags.vue: -------------------------------------------------------------------------------- 1 | 10 | 18 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_command_by_id.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-command-by-id" 7 | description = "Enables the get_command_by_id command without any pre-configured scope." 8 | commands.allow = ["get_command_by_id"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-command-by-id" 12 | description = "Denies the get_command_by_id command without any pre-configured scope." 13 | commands.deny = ["get_command_by_id"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_ext_label_map.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-ext-label-map" 7 | description = "Enables the get_ext_label_map command without any pre-configured scope." 8 | commands.allow = ["get_ext_label_map"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-ext-label-map" 12 | description = "Denies the get_ext_label_map command without any pre-configured scope." 13 | commands.deny = ["get_ext_label_map"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/server_is_running.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-server-is-running" 7 | description = "Enables the server_is_running command without any pre-configured scope." 8 | commands.allow = ["server_is_running"] 9 | 10 | [[permission]] 11 | identifier = "deny-server-is-running" 12 | description = "Denies the server_is_running command without any pre-configured scope." 13 | commands.deny = ["server_is_running"] 14 | -------------------------------------------------------------------------------- /templates/template-ext-svelte/src/lib/components/ThemeCustomizer.svelte: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/decompress_tarball.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-decompress-tarball" 7 | description = "Enables the decompress_tarball command without any pre-configured scope." 8 | commands.allow = ["decompress_tarball"] 9 | 10 | [[permission]] 11 | identifier = "deny-decompress-tarball" 12 | description = "Denies the decompress_tarball command without any pre-configured scope." 13 | commands.deny = ["decompress_tarball"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_all_extensions.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-all-extensions" 7 | description = "Enables the get_all_extensions command without any pre-configured scope." 8 | commands.allow = ["get_all_extensions"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-all-extensions" 12 | description = "Denies the get_all_extensions command without any pre-configured scope." 13 | commands.deny = ["get_all_extensions"] 14 | -------------------------------------------------------------------------------- /templates/template-ext-sveltekit/src/lib/components/ThemeCustomizer.svelte: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /apps/desktop/components/Metadata/tag.vue: -------------------------------------------------------------------------------- 1 | 13 | 23 | -------------------------------------------------------------------------------- /apps/desktop/i18n.d.ts: -------------------------------------------------------------------------------- 1 | import en from "~/i18n/en" 2 | 3 | type StringKey = Extract 4 | type GenerateKeyPaths = T extends object 5 | ? { 6 | [K in StringKey]: T[K] extends object 7 | ? GenerateKeyPaths 8 | : `${Prefix}${K}` 9 | }[StringKey] 10 | : Prefix 11 | 12 | type Locale = typeof en 13 | 14 | declare global { 15 | type I18nKeys = GenerateKeyPaths 16 | } 17 | 18 | declare module "vue" { 19 | interface ComponentCustomProperties { 20 | $t(key: I18nKeys): string 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/api/build.ts: -------------------------------------------------------------------------------- 1 | import { $ } from "bun" 2 | import fs from "fs" 3 | 4 | // add package version 5 | 6 | if (fs.existsSync("dist")) { 7 | await $`rm -rf dist` 8 | } 9 | fs.mkdirSync("dist") 10 | // await $`pnpm build:rollup` 11 | // await $`cp ../schema/manifest-json-schema.json ./dist/schema.json` 12 | await $`bun ../schema/scripts/print-schema.ts > dist/schema.json` 13 | 14 | // Post Build Verify 15 | const schemaFile = Bun.file("dist/schema.json") 16 | if (!schemaFile.exists()) { 17 | throw new Error("schema.json not found") 18 | } 19 | 20 | await $`bun patch-version.ts` 21 | -------------------------------------------------------------------------------- /packages/api/src/commands/path.ts: -------------------------------------------------------------------------------- 1 | import { invoke } from "@tauri-apps/api/core" 2 | import { generateJarvisPluginCommand } from "./common" 3 | 4 | /** 5 | * @returns /extensions 6 | */ 7 | export function getDefaultExtensionsDir(): Promise { 8 | return invoke(generateJarvisPluginCommand("get_default_extensions_dir")) 9 | } 10 | 11 | /** 12 | * @returns /extensions_storage 13 | */ 14 | export function getDefaultExtensionsStorageDir(): Promise { 15 | return invoke(generateJarvisPluginCommand("get_default_extensions_storage_dir")) 16 | } 17 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src/lib/Greet.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 |
15 | 16 | 17 |
18 |

{greetMsg}

19 |
20 | -------------------------------------------------------------------------------- /apps/desktop/pages/init-page.vue: -------------------------------------------------------------------------------- 1 | 19 | 24 | -------------------------------------------------------------------------------- /packages/api/src/commands/mac-security.ts: -------------------------------------------------------------------------------- 1 | import { invoke } from "@tauri-apps/api/core" 2 | import { generateJarvisPluginCommand } from "./common" 3 | 4 | export function verifyAuth(): Promise { 5 | return invoke(generateJarvisPluginCommand("verify_auth")) 6 | } 7 | 8 | export function requestScreenCaptureAccess(): Promise { 9 | return invoke(generateJarvisPluginCommand("request_screen_capture_access")) 10 | } 11 | 12 | export function checkScreenCaptureAccess(): Promise { 13 | return invoke(generateJarvisPluginCommand("check_screen_capture_access")) 14 | } 15 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/load_all_extensions.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-load-all-extensions" 7 | description = "Enables the load_all_extensions command without any pre-configured scope." 8 | commands.allow = ["load_all_extensions"] 9 | 10 | [[permission]] 11 | identifier = "deny-load-all-extensions" 12 | description = "Denies the load_all_extensions command without any pre-configured scope." 13 | commands.deny = ["load_all_extensions"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/toggle_hidden_files.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-toggle-hidden-files" 7 | description = "Enables the toggle_hidden_files command without any pre-configured scope." 8 | commands.allow = ["toggle_hidden_files"] 9 | 10 | [[permission]] 11 | identifier = "deny-toggle-hidden-files" 12 | description = "Denies the toggle_hidden_files command without any pre-configured scope." 13 | commands.deny = ["toggle_hidden_files"] 14 | -------------------------------------------------------------------------------- /packages/dance/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from "bun:test" 2 | import { decompressFrame, deserializeFrame } from "../index" 3 | 4 | test("Test Deserialize", () => { 5 | const frame_str = "ooolloo\nllolloo" 6 | const frame = [ 7 | [0, 0, 0, 1, 1, 0, 0], 8 | [1, 1, 0, 1, 1, 0, 0] 9 | ] 10 | expect(deserializeFrame(frame_str)).toEqual(frame) 11 | }) 12 | 13 | test("Test Decompress", () => { 14 | const compressed_frame = "3o2l2o\n2lo2l2o" 15 | const decompressed_frame = "ooolloo\nllolloo" 16 | expect(decompressFrame(compressed_frame)).toBe(decompressed_frame) 17 | }) 18 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/delete_command_by_id.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-delete-command-by-id" 7 | description = "Enables the delete_command_by_id command without any pre-configured scope." 8 | commands.allow = ["delete_command_by_id"] 9 | 10 | [[permission]] 11 | identifier = "deny-delete-command-by-id" 12 | description = "Denies the delete_command_by_id command without any pre-configured scope." 13 | commands.deny = ["delete_command_by_id"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_extension_folder.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-extension-folder" 7 | description = "Enables the get_extension_folder command without any pre-configured scope." 8 | commands.allow = ["get_extension_folder"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-extension-folder" 12 | description = "Denies the get_extension_folder command without any pre-configured scope." 13 | commands.deny = ["get_extension_folder"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/set_extension_folder.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-set-extension-folder" 7 | description = "Enables the set_extension_folder command without any pre-configured scope." 8 | commands.allow = ["set_extension_folder"] 9 | 10 | [[permission]] 11 | identifier = "deny-set-extension-folder" 12 | description = "Denies the set_extension_folder command without any pre-configured scope." 13 | commands.deny = ["set_extension_folder"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/toggle_stage_manager.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-toggle-stage-manager" 7 | description = "Enables the toggle_stage_manager command without any pre-configured scope." 8 | commands.allow = ["toggle_stage_manager"] 9 | 10 | [[permission]] 11 | identifier = "deny-toggle-stage-manager" 12 | description = "Denies the toggle_stage_manager command without any pre-configured scope." 13 | commands.deny = ["toggle_stage_manager"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/update_command_by_id.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-update-command-by-id" 7 | description = "Enables the update_command_by_id command without any pre-configured scope." 8 | commands.allow = ["update_command_by_id"] 9 | 10 | [[permission]] 11 | identifier = "deny-update-command-by-id" 12 | description = "Denies the update_command_by_id command without any pre-configured scope." 13 | commands.deny = ["update_command_by_id"] 14 | -------------------------------------------------------------------------------- /packages/model/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["ESNext"], 4 | "module": "esnext", 5 | "target": "esnext", 6 | "moduleResolution": "bundler", 7 | "moduleDetection": "force", 8 | "allowImportingTsExtensions": true, 9 | "noEmit": true, 10 | "composite": true, 11 | "strict": true, 12 | "downlevelIteration": true, 13 | "skipLibCheck": true, 14 | "jsx": "react-jsx", 15 | "allowSyntheticDefaultImports": true, 16 | "forceConsistentCasingInFileNames": true, 17 | "allowJs": true, 18 | "types": [ 19 | "bun-types" // add Bun global 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/model/workflow/inputs/script-filter.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod" 2 | import { BaseNode, NodeTypeInput, Position } from "../common" 3 | 4 | export const ScriptFilterName = z.literal("script_filter") 5 | 6 | export const ScriptFilterNode = z 7 | .object({ 8 | type: NodeTypeInput, 9 | name: ScriptFilterName, 10 | keyword: z.string(), 11 | workflowIcon: z.string(), 12 | title: z.string(), 13 | subtext: z.string(), 14 | pleaseWaitSubtext: z.string().default("Please Wait..."), 15 | script: z.string(), 16 | language: z.string() 17 | }) 18 | .merge(BaseNode) 19 | .merge(Position) 20 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/create_extension_data.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-create-extension-data" 7 | description = "Enables the create_extension_data command without any pre-configured scope." 8 | commands.allow = ["create_extension_data"] 9 | 10 | [[permission]] 11 | identifier = "deny-create-extension-data" 12 | description = "Denies the create_extension_data command without any pre-configured scope." 13 | commands.deny = ["create_extension_data"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_get.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-get" 7 | description = "Enables the ext_store_wrapper_get command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_get"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-get" 12 | description = "Denies the ext_store_wrapper_get command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_get"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_has.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-has" 7 | description = "Enables the ext_store_wrapper_has command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_has"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-has" 12 | description = "Denies the ext_store_wrapper_has command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_has"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_set.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-set" 7 | description = "Enables the ext_store_wrapper_set command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_set"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-set" 12 | description = "Denies the ext_store_wrapper_set command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_set"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/search_extension_data.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-search-extension-data" 7 | description = "Enables the search_extension_data command without any pre-configured scope." 8 | commands.allow = ["search_extension_data"] 9 | 10 | [[permission]] 11 | identifier = "deny-search-extension-data" 12 | description = "Denies the search_extension_data command without any pre-configured scope." 13 | commands.deny = ["search_extension_data"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/commands/path.rs: -------------------------------------------------------------------------------- 1 | use crate::utils::path; 2 | use tauri::Runtime; 3 | 4 | #[tauri::command] 5 | pub async fn get_default_extensions_dir( 6 | app: tauri::AppHandle, 7 | ) -> Result<(), String> { 8 | path::get_default_extensions_dir(&app).map_err(|e| e.to_string())?; 9 | Ok(()) 10 | } 11 | 12 | #[tauri::command] 13 | pub async fn get_default_extensions_storage_dir( 14 | app: tauri::AppHandle, 15 | ) -> Result<(), String> { 16 | path::get_default_extensions_storage_dir(&app).map_err(|e| e.to_string())?; 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /apps/desktop/components/Metadata/link.vue: -------------------------------------------------------------------------------- 1 | 10 | 19 | -------------------------------------------------------------------------------- /packages/api/src/ui/worker/components/markdown.ts: -------------------------------------------------------------------------------- 1 | import { NodeName, NodeNameEnum } from "../../../models/constants" 2 | import { type Markdown as MarkdownSchema } from "../schema/markdown" 3 | import { type IComponent } from "./interfaces" 4 | 5 | export class Markdown implements MarkdownSchema, IComponent { 6 | nodeName: NodeName = NodeNameEnum.Markdown 7 | content: string 8 | 9 | constructor(content: string) { 10 | this.content = content 11 | } 12 | 13 | toModel(): MarkdownSchema { 14 | return { 15 | nodeName: this.nodeName, 16 | content: this.content 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_keys.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-keys" 7 | description = "Enables the ext_store_wrapper_keys command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_keys"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-keys" 12 | description = "Denies the ext_store_wrapper_keys command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_keys"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_load.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-load" 7 | description = "Enables the ext_store_wrapper_load command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_load"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-load" 12 | description = "Denies the ext_store_wrapper_load command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_load"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_save.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-save" 7 | description = "Enables the ext_store_wrapper_save command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_save"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-save" 12 | description = "Denies the ext_store_wrapper_save command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_save"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_commands_by_ext_id.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-commands-by-ext-id" 7 | description = "Enables the get_commands_by_ext_id command without any pre-configured scope." 8 | commands.allow = ["get_commands_by_ext_id"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-commands-by-ext-id" 12 | description = "Denies the get_commands_by_ext_id command without any pre-configured scope." 13 | commands.deny = ["get_commands_by_ext_id"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/commands/security.rs: -------------------------------------------------------------------------------- 1 | #![cfg(target_os = "macos")] 2 | #[tauri::command] 3 | pub async fn verify_auth() -> Result { 4 | Ok(mac_security_rs::verify_auth( 5 | mac_security_rs::AuthPolicy::Biometrics, 6 | )) 7 | } 8 | 9 | #[tauri::command] 10 | pub async fn request_screen_capture_access() -> Result { 11 | Ok(mac_security_rs::request_screen_capture_access()) 12 | } 13 | 14 | #[tauri::command] 15 | pub async fn check_screen_capture_access() -> Result { 16 | Ok(mac_security_rs::preflight_screen_capture_access()) 17 | } 18 | -------------------------------------------------------------------------------- /templates/template-ext-next/src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import { Inter } from "next/font/google"; 3 | import "./globals.css"; 4 | 5 | const inter = Inter({ subsets: ["latin"] }); 6 | 7 | export const metadata: Metadata = { 8 | title: "Create Next App", 9 | description: "Generated by create next app", 10 | }; 11 | 12 | export default function RootLayout({ 13 | children, 14 | }: Readonly<{ 15 | children: React.ReactNode; 16 | }>) { 17 | return ( 18 | 19 | {children} 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/src-tauri/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Learn more about Tauri commands at https://tauri.app/v1/guides/features/command 2 | #[tauri::command] 3 | fn greet(name: &str) -> String { 4 | format!("Hello, {}! You've been greeted from Rust!", name) 5 | } 6 | 7 | #[cfg_attr(mobile, tauri::mobile_entry_point)] 8 | pub fn run() { 9 | tauri::Builder::default() 10 | .invoke_handler(tauri::generate_handler![greet]) 11 | .plugin(tauri_plugin_jarvis::init()) 12 | .run(tauri::generate_context!()) 13 | .expect("error while running tauri application"); 14 | } 15 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_clear.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-clear" 7 | description = "Enables the ext_store_wrapper_clear command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_clear"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-clear" 12 | description = "Denies the ext_store_wrapper_clear command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_clear"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_reset.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-reset" 7 | description = "Enables the ext_store_wrapper_reset command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_reset"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-reset" 12 | description = "Denies the ext_store_wrapper_reset command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_reset"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/self_signed_certs/cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIBUTCB+aADAgECAgkA9wj7pE/H2nUwCgYIKoZIzj0EAwIwITEfMB0GA1UEAwwW 3 | cmNnZW4gc2VsZiBzaWduZWQgY2VydDAgFw03NTAxMDEwMDAwMDBaGA80MDk2MDEw 4 | MTAwMDAwMFowITEfMB0GA1UEAwwWcmNnZW4gc2VsZiBzaWduZWQgY2VydDBZMBMG 5 | ByqGSM49AgEGCCqGSM49AwEHA0IABE2MBAa4jgIYuqWLcQ1VKGYs8xAzYok9H6Yp 6 | 2tWRcC3ZKdm8QFlEmMJC/sY0d+Z49L9b977PUxGcE5Zsym6e4oajGDAWMBQGA1Ud 7 | EQQNMAuCCWxvY2FsaG9zdDAKBggqhkjOPQQDAgNHADBEAiBbqzKRw01Oeq91znQY 8 | KmCTBn/nDHSyGn5CMVsvPlOKJgIgNvf2wrefmuOzzrJx22RWV2KIvc2zt7HNBso9 9 | fJKS3PM= 10 | -----END CERTIFICATE----- 11 | -------------------------------------------------------------------------------- /templates/template-ext-next/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | extensions_support/ 38 | -------------------------------------------------------------------------------- /apps/desktop/components/tauri/link.vue: -------------------------------------------------------------------------------- 1 | 11 | 28 | -------------------------------------------------------------------------------- /apps/desktop/components/ui/command/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Command } from "./Command.vue" 2 | export { default as CommandDialog } from "./CommandDialog.vue" 3 | export { default as CommandEmpty } from "./CommandEmpty.vue" 4 | export { default as CommandGroup } from "./CommandGroup.vue" 5 | export { default as CommandInput } from "./CommandInput.vue" 6 | export { default as CommandItem } from "./CommandItem.vue" 7 | export { default as CommandList } from "./CommandList.vue" 8 | export { default as CommandSeparator } from "./CommandSeparator.vue" 9 | export { default as CommandShortcut } from "./CommandShortcut.vue" 10 | -------------------------------------------------------------------------------- /packages/gql/src/operations/findLatestExt.graphql: -------------------------------------------------------------------------------- 1 | query FindLatestExt($identifier: String) { 2 | ext_publishCollection( 3 | filter: { identifier: { eq: $identifier } } 4 | orderBy: { created_at: DescNullsFirst } 5 | first: 1 6 | ) { 7 | edges { 8 | node { 9 | nodeId 10 | id 11 | created_at 12 | name 13 | version 14 | api_version 15 | manifest 16 | shasum 17 | size 18 | tarball_path 19 | cmd_count 20 | identifier 21 | downloads 22 | demo_images 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/examples/tauri-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tauri-app", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview", 10 | "tauri": "tauri" 11 | }, 12 | "dependencies": { 13 | "@tauri-apps/api": "^2.0.0-rc.0", 14 | "tauri-plugin-jarvis-api": "link:../../" 15 | }, 16 | "devDependencies": { 17 | "@sveltejs/vite-plugin-svelte": "^1.0.1", 18 | "internal-ip": "^7.0.0", 19 | "svelte": "^4.2.19", 20 | "vite": "^5.4.9", 21 | "@tauri-apps/cli": "^2.0.0-rc.3" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/delete_extension_by_path.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-delete-extension-by-path" 7 | description = "Enables the delete_extension_by_path command without any pre-configured scope." 8 | commands.allow = ["delete_extension_by_path"] 9 | 10 | [[permission]] 11 | identifier = "deny-delete-extension-by-path" 12 | description = "Denies the delete_extension_by_path command without any pre-configured scope." 13 | commands.deny = ["delete_extension_by_path"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_delete.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-delete" 7 | description = "Enables the ext_store_wrapper_delete command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_delete"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-delete" 12 | description = "Denies the ext_store_wrapper_delete command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_delete"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_length.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-length" 7 | description = "Enables the ext_store_wrapper_length command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_length"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-length" 12 | description = "Denies the ext_store_wrapper_length command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_length"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_values.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-values" 7 | description = "Enables the ext_store_wrapper_values command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_values"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-values" 12 | description = "Denies the ext_store_wrapper_values command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_values"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_dev_extension_folder.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-dev-extension-folder" 7 | description = "Enables the get_dev_extension_folder command without any pre-configured scope." 8 | commands.allow = ["get_dev_extension_folder"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-dev-extension-folder" 12 | description = "Denies the get_dev_extension_folder command without any pre-configured scope." 13 | commands.deny = ["get_dev_extension_folder"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_extension_data_by_id.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-extension-data-by-id" 7 | description = "Enables the get_extension_data_by_id command without any pre-configured scope." 8 | commands.allow = ["get_extension_data_by_id"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-extension-data-by-id" 12 | description = "Denies the get_extension_data_by_id command without any pre-configured scope." 13 | commands.deny = ["get_extension_data_by_id"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/set_dev_extension_folder.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-set-dev-extension-folder" 7 | description = "Enables the set_dev_extension_folder command without any pre-configured scope." 8 | commands.allow = ["set_dev_extension_folder"] 9 | 10 | [[permission]] 11 | identifier = "deny-set-dev-extension-folder" 12 | description = "Denies the set_dev_extension_folder command without any pre-configured scope." 13 | commands.deny = ["set_dev_extension_folder"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/toggle_system_appearance.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-toggle-system-appearance" 7 | description = "Enables the toggle_system_appearance command without any pre-configured scope." 8 | commands.allow = ["toggle_system_appearance"] 9 | 10 | [[permission]] 11 | identifier = "deny-toggle-system-appearance" 12 | description = "Denies the toggle_system_appearance command without any pre-configured scope." 13 | commands.deny = ["toggle_system_appearance"] 14 | -------------------------------------------------------------------------------- /apps/desktop/components/debug/CodeEditorHtml.vue: -------------------------------------------------------------------------------- 1 | 24 | 27 | -------------------------------------------------------------------------------- /apps/desktop/components/ui/dialog/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Dialog } from "./Dialog.vue" 2 | export { default as DialogClose } from "./DialogClose.vue" 3 | export { default as DialogTrigger } from "./DialogTrigger.vue" 4 | export { default as DialogHeader } from "./DialogHeader.vue" 5 | export { default as DialogTitle } from "./DialogTitle.vue" 6 | export { default as DialogDescription } from "./DialogDescription.vue" 7 | export { default as DialogContent } from "./DialogContent.vue" 8 | export { default as DialogScrollContent } from "./DialogScrollContent.vue" 9 | export { default as DialogFooter } from "./DialogFooter.vue" 10 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/ext_store_wrapper_entries.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-ext-store-wrapper-entries" 7 | description = "Enables the ext_store_wrapper_entries command without any pre-configured scope." 8 | commands.allow = ["ext_store_wrapper_entries"] 9 | 10 | [[permission]] 11 | identifier = "deny-ext-store-wrapper-entries" 12 | description = "Denies the ext_store_wrapper_entries command without any pre-configured scope." 13 | commands.deny = ["ext_store_wrapper_entries"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/refresh_applications_list.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-refresh-applications-list" 7 | description = "Enables the refresh_applications_list command without any pre-configured scope." 8 | commands.allow = ["refresh_applications_list"] 9 | 10 | [[permission]] 11 | identifier = "deny-refresh-applications-list" 12 | description = "Denies the refresh_applications_list command without any pre-configured scope." 13 | commands.deny = ["refresh_applications_list"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/register_extension_window.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-register-extension-window" 7 | description = "Enables the register_extension_window command without any pre-configured scope." 8 | commands.allow = ["register_extension_window"] 9 | 10 | [[permission]] 11 | identifier = "deny-register-extension-window" 12 | description = "Denies the register_extension_window command without any pre-configured scope." 13 | commands.deny = ["register_extension_window"] 14 | -------------------------------------------------------------------------------- /apps/desktop/pages/onboarding.vue: -------------------------------------------------------------------------------- 1 | 11 | 19 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/delete_extension_by_ext_id.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-delete-extension-by-ext-id" 7 | description = "Enables the delete_extension_by_ext_id command without any pre-configured scope." 8 | commands.allow = ["delete_extension_by_ext_id"] 9 | 10 | [[permission]] 11 | identifier = "deny-delete-extension-by-ext-id" 12 | description = "Denies the delete_extension_by_ext_id command without any pre-configured scope." 13 | commands.deny = ["delete_extension_by_ext_id"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_default_extensions_dir.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-default-extensions-dir" 7 | description = "Enables the get_default_extensions_dir command without any pre-configured scope." 8 | commands.allow = ["get_default_extensions_dir"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-default-extensions-dir" 12 | description = "Denies the get_default_extensions_dir command without any pre-configured scope." 13 | commands.deny = ["get_default_extensions_dir"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/is_window_label_registered.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-is-window-label-registered" 7 | description = "Enables the is_window_label_registered command without any pre-configured scope." 8 | commands.allow = ["is_window_label_registered"] 9 | 10 | [[permission]] 11 | identifier = "deny-is-window-label-registered" 12 | description = "Denies the is_window_label_registered command without any pre-configured scope." 13 | commands.deny = ["is_window_label_registered"] 14 | -------------------------------------------------------------------------------- /templates/template-ext-next/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | const config: Config = { 4 | content: [ 5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 8 | ], 9 | theme: { 10 | extend: { 11 | backgroundImage: { 12 | "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", 13 | "gradient-conic": 14 | "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", 15 | }, 16 | }, 17 | }, 18 | plugins: [], 19 | }; 20 | export default config; 21 | -------------------------------------------------------------------------------- /packages/model/workflow/payload/index.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod" 2 | 3 | export const TextPayloadSchema = z.object({ 4 | type: z.literal("text"), 5 | value: z.array(z.string()) 6 | }) 7 | export const ListItemPayloadSchema = z.object({ 8 | // uid: z.string(), 9 | // type: z.string(), 10 | title: z.string(), 11 | subtitle: z.string(), 12 | // arg: z.string(), 13 | autocomplete: z.string() 14 | // icon: z.object({ 15 | // type: z.string(), 16 | // path: z.string(), 17 | // }), 18 | }) 19 | export const ListPayloadSchema = z.object({ 20 | type: z.literal("list"), 21 | items: z.array(ListItemPayloadSchema) 22 | }) 23 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/check_screen_capture_access.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-check-screen-capture-access" 7 | description = "Enables the check_screen_capture_access command without any pre-configured scope." 8 | commands.allow = ["check_screen_capture_access"] 9 | 10 | [[permission]] 11 | identifier = "deny-check-screen-capture-access" 12 | description = "Denies the check_screen_capture_access command without any pre-configured scope." 13 | commands.deny = ["check_screen_capture_access"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/delete_extension_data_by_id.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-delete-extension-data-by-id" 7 | description = "Enables the delete_extension_data_by_id command without any pre-configured scope." 8 | commands.allow = ["delete_extension_data_by_id"] 9 | 10 | [[permission]] 11 | identifier = "deny-delete-extension-data-by-id" 12 | description = "Denies the delete_extension_data_by_id command without any pre-configured scope." 13 | commands.deny = ["delete_extension_data_by_id"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_extension_by_identifier.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-extension-by-identifier" 7 | description = "Enables the get_extension_by_identifier command without any pre-configured scope." 8 | commands.allow = ["get_extension_by_identifier"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-extension-by-identifier" 12 | description = "Denies the get_extension_by_identifier command without any pre-configured scope." 13 | commands.deny = ["get_extension_by_identifier"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/unregister_extension_window.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-unregister-extension-window" 7 | description = "Enables the unregister_extension_window command without any pre-configured scope." 8 | commands.allow = ["unregister_extension_window"] 9 | 10 | [[permission]] 11 | identifier = "deny-unregister-extension-window" 12 | description = "Denies the unregister_extension_window command without any pre-configured scope." 13 | commands.deny = ["unregister_extension_window"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/update_extension_data_by_id.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-update-extension-data-by-id" 7 | description = "Enables the update_extension_data_by_id command without any pre-configured scope." 8 | commands.allow = ["update_extension_data_by_id"] 9 | 10 | [[permission]] 11 | identifier = "deny-update-extension-data-by-id" 12 | description = "Denies the update_extension_data_by_id command without any pre-configured scope." 13 | commands.deny = ["update_extension_data_by_id"] 14 | -------------------------------------------------------------------------------- /apps/desktop/scripts/download-dance.ts: -------------------------------------------------------------------------------- 1 | import fs from "fs" 2 | import path from "path" 3 | 4 | const res = await fetch("https://dance.kunkun.sh/api/data") 5 | // const data: { fps: number; frames: string[] } = await res.json() 6 | // get current file dir 7 | // const __dirname = path.dirname(new URL(import.meta.url).pathname) 8 | // const pkgPath = path.basename(path.dirname(__dirname)) 9 | // const pkgPath = path.dirname(__dirname) 10 | // console.log(path.dirname(__dirname)); 11 | const pkgPath = path.dirname(__dirname) 12 | 13 | const danceFilePath = path.join(pkgPath, "./assets/dance.json") 14 | fs.writeFileSync(danceFilePath, await res.text()) 15 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_unique_extension_by_path.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-unique-extension-by-path" 7 | description = "Enables the get_unique_extension_by_path command without any pre-configured scope." 8 | commands.allow = ["get_unique_extension_by_path"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-unique-extension-by-path" 12 | description = "Denies the get_unique_extension_by_path command without any pre-configured scope." 13 | commands.deny = ["get_unique_extension_by_path"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/store-all.toml: -------------------------------------------------------------------------------- 1 | "$schema" = "schemas/schema.json" 2 | 3 | [[permission]] 4 | identifier = "allow-all-store" 5 | description = "This enables all permissions for Jarvis" 6 | commands.allow = [ 7 | "ext_store_wrapper_set", 8 | "ext_store_wrapper_get", 9 | "ext_store_wrapper_has", 10 | "ext_store_wrapper_delete", 11 | "ext_store_wrapper_clear", 12 | "ext_store_wrapper_reset", 13 | "ext_store_wrapper_keys", 14 | "ext_store_wrapper_values", 15 | "ext_store_wrapper_entries", 16 | "ext_store_wrapper_length", 17 | "ext_store_wrapper_load", 18 | "ext_store_wrapper_save", 19 | ] -------------------------------------------------------------------------------- /packages/db/src/schema.rs: -------------------------------------------------------------------------------- 1 | pub const SCHEMA1: &str = include_str!("../sql/2024-10-23.sql"); 2 | pub struct Migration { 3 | pub version: u16, 4 | pub script: String, 5 | pub description: String, 6 | } 7 | impl Migration { 8 | pub fn new(version: u16, schema: &str, description: &str) -> Self { 9 | Self { 10 | version, 11 | script: schema.to_string(), 12 | description: description.to_string(), 13 | } 14 | } 15 | } 16 | 17 | use std::sync::LazyLock; 18 | 19 | pub static MIGRATIONS: LazyLock> = 20 | LazyLock::new(|| vec![Migration::new(1, SCHEMA1, "Initial Migration")]); 21 | -------------------------------------------------------------------------------- /templates/template-ext-next/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/desktop/components/settings/General/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Startup } from "./Startup.vue" 2 | export { default as MenuBar } from "./MenuBar.vue" 3 | export { default as Theme } from "./Theme.vue" 4 | export { default as ThemeCustomizer } from "./ThemeCustomizer.vue" 5 | export { default as TriggerHotkey } from "./TriggerHotkey.vue" 6 | export { default as DevExtMode } from "./DevExtMode.vue" 7 | export { default as Language } from "./Language.vue" 8 | export { default as HideOnBlur } from "./hideOnBlur.vue" 9 | export { default as ExtensionAutoUpgrade } from "./extensionAutoUpgrade.vue" 10 | export { default as BetaProgram } from "./BetaProgram.vue" 11 | -------------------------------------------------------------------------------- /apps/desktop/lib/dev/exp.ts: -------------------------------------------------------------------------------- 1 | import { db } from "@kksh/api/commands" 2 | import * as path from "@tauri-apps/api/path" 3 | import { parse, safeParse } from "valibot" 4 | 5 | export async function useTestDB() { 6 | // const appDataDirPath = await path.appDataDir() 7 | // const p = await path.resolve("/home/kevin/.local/share/kunkun/../../../.ssh/authorized_keys") 8 | // console.log("p", p); 9 | // const extDB = new db.JarvisExtDB(1) 10 | // const searchRes = await extDB.search({ 11 | // // fullTextSearch: false, 12 | // // searchText: "fullTextSearch", 13 | // fields: ["search_text"] 14 | // }) 15 | // console.log("searchRes", searchRes) 16 | } 17 | -------------------------------------------------------------------------------- /packages/api/src/ui/worker/components/icon.ts: -------------------------------------------------------------------------------- 1 | import { NodeName, NodeNameEnum } from "../../../models/constants" 2 | import type { IconNode, IconType, Icon as TIcon } from "../../../models/icon" 3 | import { type IComponent } from "./interfaces" 4 | 5 | export class Icon implements IconNode, IComponent { 6 | nodeName: NodeName = NodeNameEnum.Icon 7 | type: IconType 8 | value: string 9 | 10 | constructor(model: TIcon) { 11 | this.type = model.type 12 | this.value = model.value 13 | } 14 | 15 | toModel(): IconNode { 16 | return { 17 | nodeName: this.nodeName, 18 | type: this.type, 19 | value: this.value 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/request_screen_capture_access.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-request-screen-capture-access" 7 | description = "Enables the request_screen_capture_access command without any pre-configured scope." 8 | commands.allow = ["request_screen_capture_access"] 9 | 10 | [[permission]] 11 | identifier = "deny-request-screen-capture-access" 12 | description = "Denies the request_screen_capture_access command without any pre-configured scope." 13 | commands.deny = ["request_screen_capture_access"] 14 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/keycomb.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is used to handle key combinations 3 | */ 4 | 5 | import { GlobalEventBus } from "@/lib/utils/events" 6 | 7 | export class KeyComb { 8 | static keySet = new Set() 9 | // static listeners: ((comb: Set) => void)[] = []; 10 | 11 | static onKeyDown(e: KeyboardEvent) { 12 | KeyComb.keySet.add(e.key) 13 | if (KeyComb.keySet.size > 1) { 14 | GlobalEventBus.emitKeyCombination(KeyComb.keySet) 15 | } 16 | } 17 | 18 | static onKeyUp(e: KeyboardEvent) { 19 | KeyComb.keySet.delete(e.key) 20 | } 21 | } 22 | 23 | export const SettingsKeyComb = new Set(["Meta", ","]) // commnad + , on Mac 24 | -------------------------------------------------------------------------------- /apps/desktop/pages/iframe.vue: -------------------------------------------------------------------------------- 1 | 22 | 25 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/delete_extension_by_identifier.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-delete-extension-by-identifier" 7 | description = "Enables the delete_extension_by_identifier command without any pre-configured scope." 8 | commands.allow = ["delete_extension_by_identifier"] 9 | 10 | [[permission]] 11 | identifier = "deny-delete-extension-by-identifier" 12 | description = "Denies the delete_extension_by_identifier command without any pre-configured scope." 13 | commands.deny = ["delete_extension_by_identifier"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/hide_all_apps_except_frontmost.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-hide-all-apps-except-frontmost" 7 | description = "Enables the hide_all_apps_except_frontmost command without any pre-configured scope." 8 | commands.allow = ["hide_all_apps_except_frontmost"] 9 | 10 | [[permission]] 11 | identifier = "deny-hide-all-apps-except-frontmost" 12 | description = "Denies the hide_all_apps_except_frontmost command without any pre-configured scope." 13 | commands.deny = ["hide_all_apps_except_frontmost"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/error.rs: -------------------------------------------------------------------------------- 1 | use serde::{ser::Serializer, Serialize}; 2 | 3 | pub type Result = std::result::Result; 4 | 5 | #[derive(Debug, thiserror::Error)] 6 | pub enum Error { 7 | #[error(transparent)] 8 | Io(#[from] std::io::Error), 9 | #[cfg(mobile)] 10 | #[error(transparent)] 11 | PluginInvoke(#[from] tauri::plugin::mobile::PluginInvokeError), 12 | } 13 | 14 | impl Serialize for Error { 15 | fn serialize(&self, serializer: S) -> std::result::Result 16 | where 17 | S: Serializer, 18 | { 19 | serializer.serialize_str(self.to_string().as_ref()) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/refresh_applications_list_in_bg.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-refresh-applications-list-in-bg" 7 | description = "Enables the refresh_applications_list_in_bg command without any pre-configured scope." 8 | commands.allow = ["refresh_applications_list_in_bg"] 9 | 10 | [[permission]] 11 | identifier = "deny-refresh-applications-list-in-bg" 12 | description = "Denies the refresh_applications_list_in_bg command without any pre-configured scope." 13 | commands.deny = ["refresh_applications_list_in_bg"] 14 | -------------------------------------------------------------------------------- /apps/desktop/components/settings/Extensions/ExtRow.vue: -------------------------------------------------------------------------------- 1 | 11 | 20 | -------------------------------------------------------------------------------- /packages/api/src/utils/permission-check.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The simplest permission check function, will throw error if the user does not have the required permission instead of returning false. 3 | * Both parameters are expected to be string arrays. We use generic to make sure the type is correct. 4 | * @param userPermissions 5 | * @param requiredPermissions 6 | */ 7 | export function checkPermission( 8 | userPermissions: Permission[], 9 | requiredPermissions: Permission[] 10 | ) { 11 | if (!requiredPermissions.some((p) => userPermissions.includes(p))) { 12 | throw new Error(`${requiredPermissions.join(" or ")} permission is required`) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_all_extensions_by_identifier.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-all-extensions-by-identifier" 7 | description = "Enables the get_all_extensions_by_identifier command without any pre-configured scope." 8 | commands.allow = ["get_all_extensions_by_identifier"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-all-extensions-by-identifier" 12 | description = "Denies the get_all_extensions_by_identifier command without any pre-configured scope." 13 | commands.deny = ["get_all_extensions_by_identifier"] 14 | -------------------------------------------------------------------------------- /apps/desktop/components/ui/command/CommandEmpty.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 21 | -------------------------------------------------------------------------------- /apps/desktop/composables/useShortcuts.ts: -------------------------------------------------------------------------------- 1 | import { platform } from "@tauri-apps/plugin-os" 2 | import { useMagicKeys } from "@vueuse/core" 3 | import { newSettingsPage } from "~/lib/utils/router" 4 | 5 | export const useGoToSettingShortcuts = async () => { 6 | const { meta, comma, control, alt } = useMagicKeys() 7 | const _platform = platform() 8 | watch([meta, comma, control, alt], ([meta, comma, control, alt]) => { 9 | switch (_platform) { 10 | case "macos": 11 | if (meta && comma) { 12 | newSettingsPage() 13 | } 14 | break 15 | 16 | default: 17 | if (control && comma) { 18 | newSettingsPage() 19 | } 20 | break 21 | } 22 | }) 23 | } 24 | -------------------------------------------------------------------------------- /extensions/demo-worker-template-ext/deno-src/deno.lock: -------------------------------------------------------------------------------- 1 | { 2 | "version": "4", 3 | "specifiers": { 4 | "jsr:@hk/comlink-stdio@~0.1.5": "0.1.5", 5 | "jsr:@kunkun/api@^0.0.14": "0.0.14" 6 | }, 7 | "jsr": { 8 | "@hk/comlink-stdio@0.1.5": { 9 | "integrity": "1fd67d5d53ab4571e745584d66b480b5be402f6ca6b2c9e591230fa1d23f85ee" 10 | }, 11 | "@kunkun/api@0.0.14": { 12 | "integrity": "a21a255748164992ca93fc292451677261dffca336922a6bed7eb8703c6e880b", 13 | "dependencies": [ 14 | "jsr:@hk/comlink-stdio" 15 | ] 16 | } 17 | }, 18 | "workspace": { 19 | "dependencies": [ 20 | "jsr:@kunkun/api@^0.0.14" 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/src/utils/plist.rs: -------------------------------------------------------------------------------- 1 | pub fn plist_to_json(plist_content: String) -> Result { 2 | let reader = std::io::Cursor::new(plist_content.as_bytes()); 3 | let parsed_plist_value: plist::Value = 4 | plist::Value::from_reader(reader).expect("Failed to parse plist file"); 5 | // TODO: maybe there is a more elegant way to do this conversion 6 | let json_string = 7 | serde_json::to_string(&parsed_plist_value).expect("Failed to convert plist to json"); 8 | let json_value: serde_json::Value = 9 | serde_json::from_str(&json_string).expect("Failed to convert json to Value"); 10 | Ok(json_value) 11 | } 12 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_default_extensions_storage_dir.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-default-extensions-storage-dir" 7 | description = "Enables the get_default_extensions_storage_dir command without any pre-configured scope." 8 | commands.allow = ["get_default_extensions_storage_dir"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-default-extensions-storage-dir" 12 | description = "Denies the get_default_extensions_storage_dir command without any pre-configured scope." 13 | commands.deny = ["get_default_extensions_storage_dir"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_unique_extension_by_identifier.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-unique-extension-by-identifier" 7 | description = "Enables the get_unique_extension_by_identifier command without any pre-configured scope." 8 | commands.allow = ["get_unique_extension_by_identifier"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-unique-extension-by-identifier" 12 | description = "Denies the get_unique_extension_by_identifier command without any pre-configured scope." 13 | commands.deny = ["get_unique_extension_by_identifier"] 14 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/register_extension_spawned_process.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-register-extension-spawned-process" 7 | description = "Enables the register_extension_spawned_process command without any pre-configured scope." 8 | commands.allow = ["register_extension_spawned_process"] 9 | 10 | [[permission]] 11 | identifier = "deny-register-extension-spawned-process" 12 | description = "Denies the register_extension_spawned_process command without any pre-configured scope." 13 | commands.deny = ["register_extension_spawned_process"] 14 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | resolver = "2" 3 | 4 | members = [ 5 | "apps/desktop/src-tauri", 6 | "packages/tauri-plugin-jarvis", 7 | "packages/db", 8 | "packages/mac-security-rs", 9 | ] 10 | 11 | [workspace.dependencies] 12 | serde = { version = "1", features = ["derive"] } 13 | anyhow = "1.0.86" 14 | serde_json = "1" 15 | tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "signal"] } 16 | mdns-sd = "0.11.1" 17 | tauri-plugin-network = { path = "./vendors/tauri-plugin-network" } 18 | tauri-plugin-clipboard = "2.1.8" 19 | mac-security-rs = { path = "./packages/mac-security-rs" } 20 | log = "0.4.22" 21 | strum = "0.26" 22 | strum_macros = "0.26" 23 | chrono = "0.4.38" 24 | -------------------------------------------------------------------------------- /apps/create-kunkun/src/constants.ts: -------------------------------------------------------------------------------- 1 | import path from "path" 2 | import { fileURLToPath } from "url" 3 | import { version } from "../package.json" 4 | 5 | export const NODE_ENV = process.env.NODE_ENV ?? "development" 6 | export const isProduction = NODE_ENV === "production" 7 | export function getRootDir() { 8 | const __filename = fileURLToPath(import.meta.url) 9 | const __dirname = path.dirname(__filename) 10 | return isProduction ? __dirname : path.dirname(__dirname) 11 | } 12 | export function getTemplateRoot() { 13 | return isProduction 14 | ? path.join(getRootDir(), "templates") 15 | : path.join(getRootDir(), "../../templates") 16 | } 17 | 18 | export const createKunkunVersion = version 19 | -------------------------------------------------------------------------------- /apps/desktop/i18n/utils.ts: -------------------------------------------------------------------------------- 1 | export type NestedMessages = { 2 | [key: string]: string | NestedMessages 3 | } 4 | 5 | export type FlattenedMessages = { 6 | [key: string]: string 7 | } 8 | 9 | export function flattenMessages(obj: NestedMessages, prefix = ""): FlattenedMessages { 10 | let result: FlattenedMessages = {} 11 | 12 | for (const key in obj) { 13 | if (obj.hasOwnProperty(key)) { 14 | const value = obj[key] 15 | const newKey = prefix ? `${prefix}.${key}` : key 16 | 17 | if (typeof value === "string") { 18 | result[newKey] = value 19 | } else { 20 | result = { ...result, ...flattenMessages(value, newKey) } 21 | } 22 | } 23 | } 24 | 25 | return result 26 | } 27 | -------------------------------------------------------------------------------- /apps/desktop/lib/utils/watch-config.ts: -------------------------------------------------------------------------------- 1 | import { info } from "@tauri-apps/plugin-log" 2 | import { Store } from "@tauri-apps/plugin-store" 3 | import { useAppConfigStore } from "~/stores/appConfig" 4 | import { emitRefreshConfig } from "./tauri-events" 5 | 6 | // export function useWatchAppConfig() { 7 | // const appConfig = useAppConfigStore() 8 | // appConfig.$subscribe((mutation, state) => { 9 | // const persistAppConfig = new Store("appConfig.bin") 10 | // console.log("mutation", mutation) 11 | // info("appConfig changed, saved to disk") 12 | // persistAppConfig.set("config", state) 13 | // persistAppConfig.save() 14 | // // emitRefreshConfig() 15 | // }) 16 | // } 17 | -------------------------------------------------------------------------------- /packages/model/workflow/inputs/file-filter.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod" 2 | import { BaseNode, FileType, NodeTypeInput, Position, SortBy } from "../common" 3 | 4 | export const FileFilterName = z.literal("file_filter") 5 | 6 | export const FileFilterNode = z 7 | .object({ 8 | type: NodeTypeInput, 9 | name: FileFilterName, 10 | keyword: z.string(), 11 | workflowIcon: z.string(), 12 | title: z.string(), 13 | subtext: z.string(), 14 | searchScope: z.string().array(), 15 | filter: z.object({ 16 | extension: z.string(), 17 | regex: z.string(), 18 | fileType: FileType 19 | }), 20 | limit: z.number(), 21 | sortBy: SortBy 22 | }) 23 | .merge(BaseNode) 24 | .merge(Position) 25 | -------------------------------------------------------------------------------- /packages/tauri-plugin-jarvis/permissions/autogenerated/commands/get_selected_files_in_file_explorer.toml: -------------------------------------------------------------------------------- 1 | # Automatically generated - DO NOT EDIT! 2 | 3 | "$schema" = "../../schemas/schema.json" 4 | 5 | [[permission]] 6 | identifier = "allow-get-selected-files-in-file-explorer" 7 | description = "Enables the get_selected_files_in_file_explorer command without any pre-configured scope." 8 | commands.allow = ["get_selected_files_in_file_explorer"] 9 | 10 | [[permission]] 11 | identifier = "deny-get-selected-files-in-file-explorer" 12 | description = "Denies the get_selected_files_in_file_explorer command without any pre-configured scope." 13 | commands.deny = ["get_selected_files_in_file_explorer"] 14 | --------------------------------------------------------------------------------