Commit graph

1414 commits

Author SHA1 Message Date
anthrodjear
30b0dfdc04 Merge upstream/main: sync with sipeed/picoclaw 2026-05-08 09:32:45 +03:00
anthrodjear
6d194ae713 chore: remove sensitive files and rotate API keys
- Remove CLAUDE.md, AGENTS.md
- Fix config.example.json with placeholder API key
- Remove exposed NVIDIA and OpenRouter keys from .env (already rotated)
2026-05-08 09:08:32 +03:00
anthrodjear
21b5e6b0d4 feat: Add research backend integration design document
- Introduced a new design document for research backend integration, outlining scope, architecture, and API specifications.
- Added frontend API service functions for managing research agents, nodes, and reports.
- Extended existing Go backend packages to support new research functionalities.

feat: Implement PicoClaw context window improvements

- Created a design document detailing seven context-window improvements to enhance performance and prevent errors.
- Improvements include token estimation fixes, structured error handling, and proactive context management strategies.

fix: Document known issues and resolutions

- Added a known issues document detailing a critical compile error related to invalid Unicode escapes in Go, including the fix applied.

docs: Add context management skill documentation

- Introduced a new skill for context management, detailing usage scenarios, project mapping, state persistence, and integration with PicoClaw.
2026-05-08 08:49:17 +03:00
anthrodjear
e0fba9b70c fix: resolve build errors in research integration
- Add stub methods to JSONLStore for Store interface compliance
- Fix import conflict in research.go (rename agent import)
- Fix TypeScript type imports (use import type)
- Fix launcherFetch response handling (call .json())
- Remove unused imports in research-page.tsx
- Fix research-reports.tsx timestamp reference
2026-05-08 08:29:31 +03:00
anthrodjear
18d331f31e feat(memory): add research report types and storage methods 2026-05-08 08:17:27 +03:00
ex-takashima
bacb9aba7c fix(line): close response body on successful SendMedia calls
Always route through classifySDKError to ensure resp.Body is
closed even when the API call succeeds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-08 14:11:15 +09:00
anthrodjear
e0de4c71e5 feat(seahorse): add research graph node types and storage methods 2026-05-08 08:08:35 +03:00
anthrodjear
749ffbb082 feat(agent): add research agent type constants and config struct 2026-05-08 08:08:20 +03:00
ex-takashima
6d7d1b0909 fix(line): capture QuoteToken for all message types and handle location
- Store QuoteToken for image, video, and sticker messages (not just text)
- Add webhook.LocationMessageContent case to forward as [location] placeholder

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-08 14:05:58 +09:00
anthrodjear
9f011dbe67 feat(agent): implement agent management and research cockpit
Introduces a comprehensive agent management system and a new research interface within the cockpit. This includes backend API endpoints for CRUD operations on agents, a new agent lifecycle manager, and frontend components for managing agents, skills, and research workflows.

- feat(backend): add REST API for agent lifecycle management (list, create, update, delete, import)
- feat(backend): implement `pkg/agent/manager` for agent lifecycle control
- feat(gateway): register agent API routes in the gateway
- feat(frontend): add cockpit tabs for Agents, Skills, and Research
- feat(frontend): implement AgentsPage and ResearchPage components
- feat(frontend): add `use-agents` and `use-cockpit-skills` hooks
- docs: add Agent Management API documentation and update project map
- refactor(tools): update ToolSkill metadata handling and regex parsing
2026-05-07 22:50:53 +03:00
ex-takashima
41d6156dce style(line): shorten long line for golines linter
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-07 16:48:45 +09:00
ex-takashima
ad78ba06ea fix(line): close HTTP response body from WithHttpInfo calls
Fix bodyclose linter errors by ensuring resp.Body is closed
after all *WithHttpInfo SDK calls.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-07 16:41:19 +09:00
ex-takashima
9b7fc7aa6c fix(line): classify SDK errors with HTTP status and add client timeout
Address review feedback:
- Use *WithHttpInfo SDK variants to get HTTP response status codes
- Map status codes via ClassifySendError (429→ErrRateLimit, 5xx→ErrTemporary, 4xx→ErrSendFailed)
- Fall back to ClassifyNetError for network-level failures
- Configure SDK with 30s timeout HTTP client

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-07 16:23:33 +09:00
Dark aura
84f4453911 feat(tools): add ToolSkill metadata handling for community tool system
- ToolSkill struct with Name, Description, Tags, UsageCount
- LoadToolSkill() to read and parse tool skill files
- Extract tags from content if not in frontmatter
2026-05-07 06:00:53 +01:00
Dark aura
4db0847677 feat(vault): integrate vault with memory graph for Obsidian-inspired system
- Add ExtractWikiLinks to vault/store.go for graph edges
- Add appendVaultGraph to api/pico.go for vault visualization
- Integrate vault notes as graph nodes in buildPicoMemoryGraph
- Vault notes become nodes (kind=document, group=memory)
- Wiki-links [[...]] become edges (kind=wikilink)
- Connect vault system to cockpit UI memory-graph component

Implements complete three-layer learning system:
1. Episodic: JSONL + frontmatter (Task 1-3)
2. Semantic: Vault with Obsidian-compatible markdown (Task 4-5)
3. Procedural: Tool skills ready (Task 6, 10)
4. UI: Vanilla JS sidebar with vault browser (Task 7-9)
2026-05-07 05:58:57 +01:00
Dark aura
d0cac40dd3 Merge branch 'main' of https://github.com/anthrodjear/picoclaw 2026-05-07 05:52:53 +01:00
Dark aura
719656e83b feat(vault): add ReadNote with frontmatter parsing for MEMORY.md 2026-05-07 05:45:09 +01:00
Dark aura
27aaa5e7d1 feat(vault): add VaultStore for managing Obsidian-compatible markdown notes 2026-05-07 05:36:39 +01:00
美電球
658961b728
Merge pull request #2531 from is-Xiaoen/feat/delegate-tool
feat(tools): add delegate tool for cross-agent task handoff
2026-05-07 11:25:41 +08:00
Mauro
788cda5c7a
Merge pull request #2762 from afjcjsbx/feat/stop-command
feat(agent): stop command
2026-05-06 18:19:14 +02:00
anthrodjear
b8b231964c Build automation and development improvements
- Add build-without-make.bat script for Windows builds without make
- Update .gitignore to exclude .gocache and dist directories
- Fix scripts/build-without-make.bat to properly handle repository root resolution
- Add CALL directive for pnpm commands in batch scripts
- Agent system improvements and health server enhancements
- Add agent cockpit UI components and memory graph visualization
- API improvements for PicoClaw web backend
- Update frontend routing and app sidebar
2026-05-06 16:20:27 +03:00
LC
81a050555d
feat(provider,web,asr): enhance model management with explicit provider metadata (#2701)
* feat(provider,web): enhance model management with provider options

* fix(asr): enhance compatibility for ElevenLabs transcription model

* fix(provider,web): align provider availability predicates and add flow gating

* fix(web,asr): preserve legacy elevenlabs transcription configs

* fix(provider,web,asr): normalize elevenlabs configs and gate default chat models

* fix: tighten provider catalog and elevenlabs compatibility
2026-05-06 16:06:49 +08:00
Dark aura
c7366cf57f feat(seahorse): add SearchByTag method to RetrievalEngine 2026-05-06 08:35:20 +01:00
Dark aura
57eb3fc169 feat(memory): add Tags and Metadata to SessionMessage for frontmatter support 2026-05-06 07:44:09 +01:00
Dark aura
2b75c88428 feat(memory): add YAML frontmatter parser for JSONL sessions
- Add ParseFrontmatter function to extract YAML frontmatter from content
- Add test coverage for valid YAML, no frontmatter, and invalid YAML cases
- Use gopkg.in/yaml.v3 for parsing
2026-05-06 07:28:21 +01:00
Dark aura
1fc04f7c77 feat: implement permission tool usage from frontend to backend
Complete end-to-end permission flow for tool execution:
- Add POST /api/permission/grant endpoint with gateway proxy
- Add permission checks for list_dir, edit_file, append_file tools
- Fix frontend PermissionPrompt to call grant API instead of chat messages
- Add grantPermission() to frontend API client
- Expose PermissionCache via AgentInstance for API access
- Wire up permission grant callback through gateway to agent loop

Inspired by opencode's permission system architecture.
2026-05-06 04:21:22 +01:00
anthrodjear
9870f46180
Merge branch 'sipeed:main' into main 2026-05-06 05:19:55 +03:00
afjcjsbx
a7e52e8a25 fix(agent): drain scoped follow-up queue when pending stop skips turn startup 2026-05-05 19:24:15 +02:00
Mauro
eb4e187550
Merge pull request #2767 from afjcjsbx/fix/leaf-summary-target-validation
fix(seahorse): enforce target token thresholds for leaf summaries
2026-05-05 19:09:06 +02:00
xp
d601b75268 fix(agent): send SVG attachments as files 2026-05-05 19:36:09 +08:00
anthrodjear
d1c6f6e44c feat(tools): implement permission prompting for filesystem operations
Integrate `PermissionCache` into `WriteFileTool`, `EditFileTool`, `AppendFileTool`, and `ListDirTool` to allow user approval for actions outside the workspace.

- Add `PermissionPrompter` interface and `TerminalPrompter` implementation.
- Update `AgentInstance` to initialize and register the permission cache and `RequestPermissionTool`.
- Refactor filesystem tools to support permission checks via a `PermissionChecker` interface.
- Add `plan.md` documenting the multi-wave permission implementation strategy.
2026-05-05 11:27:12 +03:00
anthrodjear
f46cf4c706 fix: use exported field names (PermissionCache, AskPermission) in test file 2026-05-05 06:52:02 +03:00
anthrodjear
9455c2d641 feat: wire up PermissionCache and register RequestPermissionTool in agent 2026-05-05 06:45:11 +03:00
anthrodjear
9ac94f32cf feat: modify ExecTool to check PermissionCache before executing outside-workspace commands 2026-05-05 06:39:20 +03:00
anthrodjear
d9c55dc939 Merge branch 'main' of https://github.com/anthrodjear/picoclaw 2026-05-05 06:36:57 +03:00
anthrodjear
6fb5531500
Merge branch 'sipeed:main' into main 2026-05-05 06:31:54 +03:00
anthrodjear
7804b12087 feat: add RequestPermissionTool for user permission prompts 2026-05-05 06:27:49 +03:00
anthrodjear
cf494c7b9a test: add PermissionCache unit tests (Grant, Check, Revoke, parent path) 2026-05-05 06:21:44 +03:00
anthrodjear
8feb6892af feat: add ask_permission config option to ExecConfig (default: true) 2026-05-05 06:16:44 +03:00
anthrodjear
843552ad16 feat: add PermissionCache for exec tool permission system 2026-05-05 06:13:43 +03:00
Mauro
ba4abff4a4
Merge pull request #2670 from david1gp/fix/tool-feedback-pretty-print
feat(agent): add pretty_print and disable_escape_html options for tool feedback
2026-05-04 21:47:32 +02:00
afjcjsbx
a1b55fd4f9 fix(seahorse): enforce target token thresholds for leaf summaries 2026-05-04 14:10:42 +02:00
afjcjsbx
d63430ab33 fix(agent): don't arm pending stop when /stop targets idle session 2026-05-04 13:10:02 +02:00
anthrodjear
07107384cb Merge branch 'main' of https://github.com/sipeed/picoclaw 2026-05-04 12:49:18 +03:00
anthrodjear
fcd31d15bd fixed the build issue 2026-05-04 12:48:52 +03:00
afjcjsbx
7a1f5fe8b9 fix test 2026-05-04 09:06:39 +02:00
Hoshina
057683d94c fix(agent): use runtime event kind for LLM retry 2026-05-04 15:06:34 +08:00
afjcjsbx
a0245c7b02 feat(agent): stop command 2026-05-04 08:41:29 +02:00
afjcjsbx
f3ef7090c5 feat(agent): stop command 2026-05-04 08:41:17 +02:00
Mauro
be67aed4dc
Merge pull request #2677 from alexhoshina/feat/runtime-events-plan
Feat/runtime events
2026-05-03 23:15:25 +02:00