capacitor-mobile-claw 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -998,31 +998,6 @@ function buildAgentTools() {
|
|
|
998
998
|
}),
|
|
999
999
|
execute: async (_id, params) => toToolResult(await gitDiffTool(params)),
|
|
1000
1000
|
},
|
|
1001
|
-
{
|
|
1002
|
-
name: 'apply_theme',
|
|
1003
|
-
label: 'Apply Theme',
|
|
1004
|
-
description: 'Apply a visual theme across the entire app — background, text, buttons, cards, sidebar, everything changes. Colors use oklch(L C H) format where L=lightness(0-1), C=chroma(0-0.4), H=hue(0-360). Call whenever the user asks to change their theme, vibe, or color scheme. You can call multiple times to iterate until they love it.\n\nHow to build a cohesive theme: Pick ONE hue based on the vibe. background: L=0.13-0.17, C=0.005-0.02 (barely tinted). foreground: L=0.93-0.96, C=0.005-0.015. primary: L=0.50-0.70, C=0.18-0.28 (vivid!). secondary/muted/accent: background.L+0.08, C≤0.015 (subtle elevations NOT bright colors). mutedForeground: L=0.65-0.72. border: use alpha transparency. The full hue wheel is available — warm (H≈30), amber (H≈75), green (H≈140), teal (H≈185), blue (H≈250), violet (H≈290), lavender (H≈310), rose (H≈15), red (H≈20). Be creative — translate moods into color.',
|
|
1005
|
-
parameters: Type.Object({
|
|
1006
|
-
vibe: Type.String({ description: 'Short label for this vibe (e.g. "sunset warmth", "deep ocean", "neon city")' }),
|
|
1007
|
-
background: Type.String({ description: 'Full-screen app backdrop. Dark (L ≤ 0.20). Example: "oklch(0.145 0.01 250)"' }),
|
|
1008
|
-
foreground: Type.String({ description: 'All body text. Light (L ≥ 0.90). Example: "oklch(0.94 0.01 250)"' }),
|
|
1009
|
-
primary: Type.String({ description: 'Hero accent — buttons, links, active tabs. Vivid (C ≥ 0.15). Example: "oklch(0.60 0.24 250)"' }),
|
|
1010
|
-
secondary: Type.String({ description: 'Elevated surfaces — pressed states, toggle backgrounds. background.L + 0.08. Example: "oklch(0.22 0.01 250)"' }),
|
|
1011
|
-
accent: Type.String({ description: 'Hover/highlight surfaces. Close to secondary. Example: "oklch(0.22 0.015 250)"' }),
|
|
1012
|
-
muted: Type.String({ description: 'Quiet surfaces — input fills, inactive tabs. Example: "oklch(0.22 0.005 250)"' }),
|
|
1013
|
-
mutedForeground: Type.String({ description: 'Secondary text — timestamps, placeholders. L ≈ 0.65-0.72. Example: "oklch(0.70 0.01 250)"' }),
|
|
1014
|
-
border: Type.String({ description: 'Borders and dividers. Use alpha. Example: "oklch(1 0 0 / 12%)"' }),
|
|
1015
|
-
ring: Type.String({ description: 'Focus ring outlines. Usually matches primary. Example: "oklch(0.60 0.24 250)"' }),
|
|
1016
|
-
success: Type.Optional(Type.String({ description: 'Success states (green-ish). Example: "oklch(0.70 0.17 155)"' })),
|
|
1017
|
-
warning: Type.Optional(Type.String({ description: 'Warning states (orange-ish). Example: "oklch(0.75 0.18 55)"' })),
|
|
1018
|
-
info: Type.Optional(Type.String({ description: 'Info states (blue-ish). Example: "oklch(0.62 0.21 255)"' })),
|
|
1019
|
-
destructive: Type.Optional(Type.String({ description: 'Error/danger states (red-ish). Example: "oklch(0.58 0.24 27)"' })),
|
|
1020
|
-
}),
|
|
1021
|
-
execute: async (_id, params) => {
|
|
1022
|
-
channel.send('message', { type: 'setup.theme', ...params });
|
|
1023
|
-
return toToolResult({ success: true, applied: true, vibe: params.vibe });
|
|
1024
|
-
},
|
|
1025
|
-
},
|
|
1026
1001
|
];
|
|
1027
1002
|
|
|
1028
1003
|
// Wrap tools that require approval (skipped in permissive mode)
|
|
@@ -1476,10 +1451,12 @@ async function runSetupSkill(agentId, locale = 'en', injectedConfig = null) {
|
|
|
1476
1451
|
? buildSkillTools(injectedConfig.tools, milestones)
|
|
1477
1452
|
: _legacySetupTools();
|
|
1478
1453
|
|
|
1479
|
-
// Merge setup tools with base file tools + MCP tools
|
|
1454
|
+
// Merge setup tools with base file tools + MCP tools (setup tools win on name conflict)
|
|
1480
1455
|
const baseTools = buildAgentTools();
|
|
1481
1456
|
const mcpTools = await discoverMcpTools();
|
|
1482
|
-
const
|
|
1457
|
+
const setupNames = new Set(setupTools.map(t => t.name));
|
|
1458
|
+
const filteredBase = baseTools.filter(t => !setupNames.has(t.name));
|
|
1459
|
+
const tools = [...setupTools, ...filteredBase, ...mcpTools];
|
|
1483
1460
|
|
|
1484
1461
|
const sessionKey = `setup/${Date.now()}`;
|
|
1485
1462
|
const agent = new Agent({
|
|
@@ -2091,7 +2068,11 @@ channel.addListener('message', async (event) => {
|
|
|
2091
2068
|
}
|
|
2092
2069
|
|
|
2093
2070
|
// Convert to UI message format
|
|
2094
|
-
|
|
2071
|
+
let uiMessages = _convertToUiMessages(rawMessages);
|
|
2072
|
+
// For setup sessions, drop the synthetic kickoff prompt (first user message)
|
|
2073
|
+
if (sessionKey.startsWith('setup/') && uiMessages.length > 0 && uiMessages[0].role === 'user') {
|
|
2074
|
+
uiMessages = uiMessages.slice(1);
|
|
2075
|
+
}
|
|
2095
2076
|
channel.send('message', { type: 'session.load.result', sessionKey, messages: uiMessages });
|
|
2096
2077
|
break;
|
|
2097
2078
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-mobile-claw",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "On-device AI agent engine for Capacitor apps — embedded Node.js worker with LLM, file tools, code execution, git, and extensible MCP server",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|