Commit graph

30 commits

Author SHA1 Message Date
nayihz
8a398988d7
refactor skills loader markdown metadata parsing (#1354) 2026-03-11 18:08:00 +08:00
qs3c
536e9ac9de refactor(skills): reuse shared HTTP retry helper 2026-03-05 19:10:36 +08:00
qs3c
7a2fdc24dc fix(skills): retry ClawHub requests on 429 2026-03-05 15:00:06 +08:00
pikaxinge
3902061db1
fix(agent): invalidate system prompt cache for global/builtin skills (#845)
* fix(agent): invalidate system prompt cache for global/builtin skills

* test(agent): avoid os.Chdir in builtin skill cache test

* fix(agent): harden skill cache invalidation checks
2026-03-03 18:25:00 +08:00
Meng Zhuo
f7136b6a5d
Merge pull request #861 from p3ddd/refactor/modernize
refactor(modernize): apply safe modernize fixes
2026-03-01 15:38:59 +08:00
DM
cadcdc0b41
fix(skills): use registry-backed search for skills discovery (#929)
* fix(skills): use registry-backed search for skills discovery

Signed-off-by: dwizzle204 <25712917+dwizzle204@users.noreply.github.com>

* fix(skills): address review comments for registry search

Signed-off-by: dwizzle204 <25712917+dwizzle204@users.noreply.github.com>

---------

Signed-off-by: dwizzle204 <25712917+dwizzle204@users.noreply.github.com>
Co-authored-by: dwizzle204 <25712917+dwizzle204@users.noreply.github.com>
2026-03-01 15:20:20 +11:00
Petrichor
222d1a3086
refactor(modernize): apply safe modernize fixes 2026-02-27 16:35:07 +08:00
mosir
433af435a9 style: fix gci import grouping in config, cron, and skills installer 2026-02-26 20:38:11 +08:00
mosir
d88700971f merge: resolve conflicts with main 2026-02-26 20:29:24 +08:00
mattn
8a1fb03974
Perf/precompile regex (#687)
* perf: pre-compile regexes at package level

Move regexp.MustCompile calls from inside methods to package-level
variables in web.go (7 regexes) and loader.go (2 regexes).
This avoids repeated compilation on every invocation.

Amp-Thread-ID: https://ampcode.com/threads/T-019c79c3-ea1c-7471-b09d-be90ba0e1ca0
Co-authored-by: Amp <amp@ampcode.com>

* perf: pre-compile regexes at package level

* retain the helpful comment

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-02-26 20:44:03 +11:00
ian
f3c1162001
feat(skills): add retry for HTTP requests in skill installer (#261)
* feat(skills): add retry mechanism for HTTP requests

Implement a retry mechanism with exponential backoff for HTTP requests in the skill installer. This improves reliability when fetching skills from GitHub by automatically retrying failed requests up to 3 times.

Add comprehensive tests to verify retry behavior under different scenarios including success on different attempts and proper delay between retries.

* fix: improve http request retry logic with status code checks

Add shouldRetry helper function to determine retryable status codes.
Close response body between retry attempts and break early for non-retryable status codes.

* refactor: remove unused BuiltinSkill struct

The struct was not being used anywhere in the codebase, so it's safe to remove it to reduce clutter and improve maintainability.

* refactor(http): move retry logic to utils package

Extract HTTP retry functionality from skills package to utils for better reusability
Add context-aware sleep function and comprehensive tests

* refactor(http): extract retry delay unit to variable

Extract hardcoded retry delay unit to a variable for better testability and flexibility. Update tests to use milliseconds for faster execution while maintaining the same behavior.

* test(http_retry): remove t.Parallel from test cases

* test(http_retry): remove redundant test cases for retry success

The removed test cases for success on second and third attempts were redundant since the retry logic is already covered by other tests. This simplifies the test suite while maintaining coverage.
2026-02-26 20:35:26 +11:00
mosir
11996f1a0b refactor(pkg): move atomic file write to dedicated fileutil package 2026-02-24 23:57:13 +08:00
mosir
c56fcedcb1 refactor(pkg/utils): add unified atomic file write utility 2026-02-24 13:22:52 +08:00
Kai Xia
6fb61539d7 translate Chinese comments
Signed-off-by: Kai Xia <kaix+github@fastmail.com>
2026-02-24 10:27:49 +11:00
mattn
6fe3920a4d
perf: refactoring collecting skills (#688)
* perf: refactoring collecting skills

* Fix order to store dir.Name()

* Add tests
2026-02-24 10:07:09 +11:00
Artem Yadelskyi
0675ce7c38
feat(fmt): Fix formatting 2026-02-20 20:03:11 +02:00
Artem Yadelskyi
ad8c2d48c8
Merge branch 'main' into fix-formatting
# Conflicts:
#	cmd/picoclaw/main.go
#	pkg/agent/context.go
#	pkg/agent/loop.go
#	pkg/channels/dingtalk.go
#	pkg/channels/feishu_64.go
#	pkg/channels/line.go
#	pkg/channels/manager.go
#	pkg/config/config.go
#	pkg/migrate/migrate_test.go
#	pkg/providers/anthropic/provider_test.go
#	pkg/providers/claude_provider_test.go
#	pkg/providers/http_provider.go
#	pkg/providers/openai_compat/provider.go
#	pkg/providers/protocoltypes/types.go
#	pkg/providers/types.go
2026-02-20 20:02:53 +02:00
Harsh Bansal
d692cc0cc6
Feature: Implement Skill Discovery - With Clawhub Integration and Caching (#332)
* Add Find Skills and Install Skills

* Improvements

* fix file name

* Update pkg/skills/clawhub_registry.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix

* Comments addressed

* Resolve comments

* fix tests

* fixes

* Comments resolved

* Update pkg/skills/search_cache_repro_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* minor fix

* fix test

* fixes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-20 18:55:04 +08:00
Artem Yadelskyi
2038f04d0d
Merge branch 'main' into fix-formatting
# Conflicts:
#	pkg/agent/loop.go
#	pkg/agent/loop_test.go
#	pkg/channels/discord.go
#	pkg/channels/onebot.go
#	pkg/config/config.go
#	pkg/tools/subagent_tool_test.go
2026-02-19 22:04:48 +02:00
Kai Xia(夏恺)
d167b47431
dead code cleanup (#210) 2026-02-19 01:54:13 +01:00
harshbansal7
b122abd30f fix 2026-02-19 02:28:44 +05:30
Artem Yadelskyi
d07ac54eef
feat(fmt): Fix fmt 2026-02-18 21:55:55 +02:00
Artem Yadelskyi
5ff4a0f0ef
Merge branch 'main' into fix-formatting 2026-02-18 21:55:29 +02:00
Artem Yadelskyi
9e120f90ea
feat(fmt): Run formatters 2026-02-18 21:48:23 +02:00
harshbansal7
287100f303 Comments resolved 2026-02-18 23:13:47 +05:30
harshbansal7
02b5811b95 add support for \r as well 2026-02-18 16:58:27 +05:30
harshbansal7
994ec72d91 Fix parsing of SKILL.md file frontmatter - regex 2026-02-18 16:55:20 +05:30
ian
c6c82b3c44
feat(skills): add validation for skill info and test cases (#231)
Add validation logic for SkillInfo to ensure name and description meet requirements
Include test cases covering various validation scenarios
Add testify dependency for testing assertions
2026-02-16 02:12:50 +08:00
yinwm
21d60f63fc Add memory system, dynamic tool loading, and fix logging issues
- Add MemoryStore for persistent long-term and daily notes
- Add dynamic tool summary generation in system prompt
- Fix YAML frontmatter parsing for nanobot skill format
- Add GetSummaries() method to ToolRegistry
- Fix DebugCF logging to use structured metadata
- Improve web_search and shell tool descriptions
2026-02-11 00:14:33 +08:00
lxowalle
e17693b17c * First commit 2026-02-09 19:20:19 +08:00