skimpyclaw 0.3.5 → 0.3.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.
- package/dist/__tests__/api.test.js +0 -19
- package/dist/__tests__/setup.test.js +3 -2
- package/dist/api.js +0 -27
- package/dist/cli.js +35 -1
- package/dist/dashboard/assets/index-CkonC7Cd.js +65 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/setup.d.ts +2 -1
- package/dist/setup.js +44 -20
- package/dist/tools/browser-tool.js +1 -1
- package/package.json +1 -1
- package/dist/dashboard/assets/index-UVAjSXCG.js +0 -107
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>SkimpyClaw Dashboard</title>
|
|
7
7
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
8
8
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@600;700;800&display=swap" rel="stylesheet">
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-CkonC7Cd.js"></script>
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/index-EAg6lqF5.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
package/dist/setup.d.ts
CHANGED
|
@@ -21,8 +21,9 @@ interface SetupStarters {
|
|
|
21
21
|
cronWeather: boolean;
|
|
22
22
|
timezone: string;
|
|
23
23
|
weatherLocation: string;
|
|
24
|
-
skillCodeReview: boolean;
|
|
25
24
|
skillDailyNotes: boolean;
|
|
25
|
+
skillWeather: boolean;
|
|
26
|
+
skillWebSearch: boolean;
|
|
26
27
|
}
|
|
27
28
|
interface SetupBuildInput {
|
|
28
29
|
workspaceDir: string;
|
package/dist/setup.js
CHANGED
|
@@ -460,17 +460,20 @@ export function buildSetupConfig(input) {
|
|
|
460
460
|
cronWeather: false,
|
|
461
461
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC',
|
|
462
462
|
weatherLocation: 'New York, NY',
|
|
463
|
-
skillCodeReview: false,
|
|
464
463
|
skillDailyNotes: false,
|
|
464
|
+
skillWeather: false,
|
|
465
|
+
skillWebSearch: false,
|
|
465
466
|
};
|
|
466
467
|
const basePaths = ['${HOME}/.skimpyclaw'];
|
|
467
468
|
const allPaths = [...basePaths, ...(input.extraAllowedPaths || [])];
|
|
468
469
|
const starterCronJobs = buildStarterCronJobs(starters);
|
|
469
470
|
const starterSkillEntries = {};
|
|
470
|
-
if (starters.skillCodeReview)
|
|
471
|
-
starterSkillEntries['code-review'] = true;
|
|
472
471
|
if (starters.skillDailyNotes)
|
|
473
472
|
starterSkillEntries['daily-notes'] = true;
|
|
473
|
+
if (starters.skillWeather)
|
|
474
|
+
starterSkillEntries['weather'] = true;
|
|
475
|
+
if (starters.skillWebSearch)
|
|
476
|
+
starterSkillEntries['web-search'] = true;
|
|
474
477
|
return {
|
|
475
478
|
gateway: {
|
|
476
479
|
port: 18790,
|
|
@@ -595,19 +598,6 @@ const REQUIRED_TEMPLATE_DEFAULTS = {
|
|
|
595
598
|
'HEARTBEAT.md': '# HEARTBEAT\n\nIf nothing needs attention, reply HEARTBEAT_OK.\n',
|
|
596
599
|
};
|
|
597
600
|
const STARTER_SKILL_TEMPLATES = {
|
|
598
|
-
'code-review': `---
|
|
599
|
-
name: code-review
|
|
600
|
-
description: Structured code review checklist for bugs, regressions, and missing tests.
|
|
601
|
-
triggers: ["review", "pr", "regression", "tests"]
|
|
602
|
-
priority: 80
|
|
603
|
-
---
|
|
604
|
-
|
|
605
|
-
When asked to review code:
|
|
606
|
-
1. Focus on correctness and regressions first.
|
|
607
|
-
2. Call out missing or weak test coverage.
|
|
608
|
-
3. Prefer concrete file-level findings.
|
|
609
|
-
4. End with risk summary and recommended fixes.
|
|
610
|
-
`,
|
|
611
601
|
'daily-notes': `---
|
|
612
602
|
name: daily-notes
|
|
613
603
|
description: Keep daily notes organized under the configured daily notes directory.
|
|
@@ -620,6 +610,36 @@ When writing daily notes:
|
|
|
620
610
|
2. Include sections: Priorities, Schedule, Notes, Follow-ups.
|
|
621
611
|
3. Keep entries concise and actionable.
|
|
622
612
|
4. Avoid creating files outside the configured daily notes directory.
|
|
613
|
+
`,
|
|
614
|
+
'weather': `---
|
|
615
|
+
name: weather
|
|
616
|
+
description: Fetch and format weather data for daily briefings and quick checks.
|
|
617
|
+
triggers: ["weather", "forecast", "temperature", "rain"]
|
|
618
|
+
priority: 45
|
|
619
|
+
---
|
|
620
|
+
|
|
621
|
+
When asked about weather or generating a daily briefing:
|
|
622
|
+
1. Use web search to find current weather for the user's location.
|
|
623
|
+
2. Format as: conditions, high/low temps, precipitation chance.
|
|
624
|
+
3. Keep it to 2-3 sentences max.
|
|
625
|
+
4. Include any weather alerts if present.
|
|
626
|
+
5. For daily briefings: mention if rain is expected (affects outdoor plans).
|
|
627
|
+
`,
|
|
628
|
+
'web-search': `---
|
|
629
|
+
name: web-search
|
|
630
|
+
description: Search the web using the Browser tool. Opens DuckDuckGo, reads results, and returns findings.
|
|
631
|
+
triggers: ["search", "look up", "google", "find online", "web search"]
|
|
632
|
+
priority: 50
|
|
633
|
+
---
|
|
634
|
+
|
|
635
|
+
When asked to search the web:
|
|
636
|
+
1. Use the Browser tool to open https://html.duckduckgo.com/html/?q=<URL-encoded query>
|
|
637
|
+
2. Use getText to read the search results page.
|
|
638
|
+
3. If a specific result looks promising, open that URL and extract the relevant content.
|
|
639
|
+
4. Summarize findings concisely — include source URLs.
|
|
640
|
+
5. Close the browser when done.
|
|
641
|
+
|
|
642
|
+
Do NOT fabricate results. If the search returns nothing useful, say so.
|
|
623
643
|
`,
|
|
624
644
|
};
|
|
625
645
|
function ensureCoreTemplates(agentDir) {
|
|
@@ -638,10 +658,12 @@ function ensureStarterSkills(starters) {
|
|
|
638
658
|
const skillsDir = join(CONFIG_DIR, 'skills');
|
|
639
659
|
mkdirSync(skillsDir, { recursive: true });
|
|
640
660
|
const requested = [];
|
|
641
|
-
if (starters.skillCodeReview)
|
|
642
|
-
requested.push('code-review');
|
|
643
661
|
if (starters.skillDailyNotes)
|
|
644
662
|
requested.push('daily-notes');
|
|
663
|
+
if (starters.skillWeather)
|
|
664
|
+
requested.push('weather');
|
|
665
|
+
if (starters.skillWebSearch)
|
|
666
|
+
requested.push('web-search');
|
|
645
667
|
for (const skillName of requested) {
|
|
646
668
|
const dir = join(skillsDir, skillName);
|
|
647
669
|
const skillPath = join(dir, 'SKILL.md');
|
|
@@ -995,15 +1017,17 @@ export async function runSetup(options = {}) {
|
|
|
995
1017
|
const locationInput = await ask(rl, ' Weather location (city, state/country) [New York, NY]: ');
|
|
996
1018
|
weatherLocation = locationInput || 'New York, NY';
|
|
997
1019
|
}
|
|
998
|
-
const addCodeReviewSkill = /^y(es)?$/i.test(await ask(rl, ' Add starter skill: code-review? [y/N]: '));
|
|
999
1020
|
const addDailyNotesSkill = /^y(es)?$/i.test(await ask(rl, ' Add starter skill: daily-notes? [y/N]: '));
|
|
1021
|
+
const addWeatherSkill = /^y(es)?$/i.test(await ask(rl, ' Add starter skill: weather? [y/N]: '));
|
|
1022
|
+
const addWebSearchSkill = /^y(es)?$/i.test(await ask(rl, ' Add starter skill: web-search (uses Browser tool)? [y/N]: '));
|
|
1000
1023
|
const starters = {
|
|
1001
1024
|
cronTechNews: addTechNewsCron,
|
|
1002
1025
|
cronWeather: addWeatherCron,
|
|
1003
1026
|
timezone: cronTimezone,
|
|
1004
1027
|
weatherLocation,
|
|
1005
|
-
skillCodeReview: addCodeReviewSkill,
|
|
1006
1028
|
skillDailyNotes: addDailyNotesSkill,
|
|
1029
|
+
skillWeather: addWeatherSkill,
|
|
1030
|
+
skillWebSearch: addWebSearchSkill,
|
|
1007
1031
|
};
|
|
1008
1032
|
const { envContent, config: generatedConfig } = buildSetupArtifacts({
|
|
1009
1033
|
workspaceDir: extraAllowedPaths[0] || join(homedir(), '.skimpyclaw'),
|