From 556107b31c8fde9dbbaddc9d29129b91a2370779 Mon Sep 17 00:00:00 2001 From: Steven Enamakel Date: Fri, 6 Feb 2026 02:04:45 +0530 Subject: [PATCH] Update skill runtime to use QuickJS and enhance TODO list - Updated the skill runtime documentation to reflect the transition from V8 to the Rust QuickJS runtime engine. - Modified the SkillManifest interface to specify "quickjs" as the only runtime option. - Enhanced the SkillProvider to discover skills using the QuickJS runtime and added filtering for production builds. - Expanded the TODO list with new tasks for Android version release, background processes, AI message summarization, and remaining skills implementation. --- TODO.md | 5 +++++ skills | 2 +- src/lib/skills/runtime.ts | 8 ++++---- src/lib/skills/types.ts | 4 +++- src/providers/SkillProvider.tsx | 23 ++++++++++++++--------- 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/TODO.md b/TODO.md index 4e74fe9aa..20a9e9785 100644 --- a/TODO.md +++ b/TODO.md @@ -7,3 +7,8 @@ todo - integrate the payments flow properly skip the connect account page and goto the home page + +[] - get android version out +[] - get background proceeses done +[] - get ai to summarize messages in the device and upload to the cloud +[] - get all the remaining skills working diff --git a/skills b/skills index 21f64b604..0a4f7ca3d 160000 --- a/skills +++ b/skills @@ -1 +1 @@ -Subproject commit 21f64b604930a91e4639ae1d7618a75444ffb072 +Subproject commit 0a4f7ca3d25d2688aff82e9957d4e298584de40f diff --git a/src/lib/skills/runtime.ts b/src/lib/skills/runtime.ts index 83c3d2ee5..78813ede4 100644 --- a/src/lib/skills/runtime.ts +++ b/src/lib/skills/runtime.ts @@ -2,7 +2,7 @@ * Skill runtime — higher-level wrapper around SkillTransport * for managing a single skill's lifecycle. * - * With V8, skills are managed by the Rust runtime engine. + * Skills are managed by the Rust QuickJS runtime engine. * This class wraps the transport layer to provide the same API * that the SkillManager expects. */ @@ -29,7 +29,7 @@ export class SkillRuntime { /** * Set a handler for reverse RPC calls from the skill process. - * With V8, reverse RPC is handled by bridge globals, so this + * Reverse RPC is handled by bridge globals, so this * is kept for API compatibility. */ onReverseRpc(handler: ReverseRpcHandler): void { @@ -38,12 +38,12 @@ export class SkillRuntime { /** - * Start the skill in the V8 runtime engine. + * Start the skill in the QuickJS runtime engine. * The Rust engine handles process management, so we just tell it to start * and then initialize the transport for RPC routing. */ async start(): Promise { - // Start the skill in the Rust V8 runtime + // Start the skill in the Rust QuickJS runtime await invoke("runtime_start_skill", { skillId: this.manifest.id }); // Initialize the transport for RPC routing diff --git a/src/lib/skills/types.ts b/src/lib/skills/types.ts index 936a35b6d..1a2973294 100644 --- a/src/lib/skills/types.ts +++ b/src/lib/skills/types.ts @@ -14,7 +14,7 @@ export interface SkillManifest { name: string; version: string; description: string; - runtime: "python" | "node" | "deno" | "v8"; + runtime: "quickjs"; entry?: string; tick_interval?: number; env?: string[]; @@ -26,6 +26,8 @@ export interface SkillManifest { /** Platform filter. When present, only listed platforms load this skill. * When absent or empty, the skill is available on all platforms. */ platforms?: SkillPlatform[]; + /** When true, skill is hidden in production builds. */ + ignoreInProduction?: boolean; } // --------------------------------------------------------------------------- diff --git a/src/providers/SkillProvider.tsx b/src/providers/SkillProvider.tsx index bc541265a..f224c7e70 100644 --- a/src/providers/SkillProvider.tsx +++ b/src/providers/SkillProvider.tsx @@ -1,11 +1,8 @@ /** * Skill Provider — discovers and manages skill lifecycles. * - * On mount (when authenticated): discovers skills from the V8 runtime + * On mount (when authenticated): discovers skills from the QuickJS runtime * engine, registers them in Redux, and auto-starts skills with completed setup. - * - * The Rust V8 engine handles skill discovery and auto-start independently. - * This provider bridges the Rust engine state with the frontend Redux store. */ import { invoke } from '@tauri-apps/api/core'; import { type ReactNode, useEffect, useRef } from 'react'; @@ -13,7 +10,7 @@ import { type ReactNode, useEffect, useRef } from 'react'; import { skillManager } from '../lib/skills/manager'; import type { SkillManifest } from '../lib/skills/types'; import { useAppSelector } from '../store/hooks'; -import { DEV_AUTO_LOAD_SKILL } from '../utils/config'; +import { DEV_AUTO_LOAD_SKILL, IS_DEV } from '../utils/config'; // --------------------------------------------------------------------------- // Helpers @@ -21,14 +18,15 @@ import { DEV_AUTO_LOAD_SKILL } from '../utils/config'; async function discoverSkills(): Promise { const raw = await invoke>>('runtime_discover_skills'); - // Map the V8 manifest format to SkillManifest - return raw.map(m => ({ + + const manifests: SkillManifest[] = raw.map(m => ({ id: m.id as string, name: m.name as string, version: (m.version as string) || '0.0.0', description: (m.description as string) || '', - runtime: 'v8' as const, + runtime: 'quickjs' as const, entry: m.entry as string | undefined, + ignoreInProduction: (m.ignoreInProduction as boolean) ?? false, setup: m.setup ? { required: ((m.setup as Record).required as boolean) ?? false, @@ -36,6 +34,13 @@ async function discoverSkills(): Promise { } : undefined, })); + + // In production, filter out skills marked as dev-only + if (!IS_DEV) { + return manifests.filter(m => !m.ignoreInProduction); + } + + return manifests; } // --------------------------------------------------------------------------- @@ -89,7 +94,7 @@ export default function SkillProvider({ children }: { children: ReactNode }) { const init = async () => { try { - // Discover skills from the V8 runtime engine + // Discover skills from the QuickJS runtime engine const manifests = await discoverSkills(); await registerAndStart(manifests); } catch (err) {