Commit graph

148 commits

Author SHA1 Message Date
anthrodjear
30b0dfdc04 Merge upstream/main: sync with sipeed/picoclaw 2026-05-08 09:32:45 +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
dbdcb9211a feat(api): add research endpoints and register routes 2026-05-08 08:21:06 +03: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
anthrodjear
9d48e39d09 feat(backend): add MCP server REST API (list, add, update, delete, test) 2026-05-07 14:11:11 +03:00
anthrodjear
7432c6856c refactor(backend): use pkg/agent/manager directly, remove duplicated CRUD logic 2026-05-07 13:51:54 +03:00
anthrodjear
9ae9583be6 feat(backend): add cron job REST API (list, add, delete, enable, disable) 2026-05-07 13:39:19 +03: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
5b31787db3 feat(api): add vault API endpoints placeholder
- /api/vault/list - vault note listing
- /api/vault/note - read note with frontmatter
- /api/vault/tags - tag listing
- /api/sessions/search - session search
- /api/tools/skills - tool skills listing

Note: RegisterVaultRoutes() needs to be called from main.go
2026-05-07 05:52:34 +01: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
4ac0b52882 redesign: compact tool display and anchored permission prompt
- Replace heavy card layout with compact inline tool calls
- Move permission prompt near input box (only shows when needed)
- Add request_permission tool to tool catalog for frontend display
- Create CompactToolCall component with expandable details
- Fix TypeScript errors (removed unused props, simplified icons)
- Preserve showAssistantDetails filter for non-request_permission tools
2026-05-06 04:57:18 +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
Mauro
828a7cba70
Merge pull request #2681 from afjcjsbx/fix/gemini-mcp-schema-sanitization
fix(mcp): sanitize MCP tool schemas for Gemini function calling
2026-05-03 20:25:35 +02:00
Guoguo
fc24676924
Add cross-platform serial tool support (#2673)
* feat(tools): add cross-platform serial hardware tool

* feat(config): wire serial tool into runtime and dashboard

* hardware/serial: tighten validation and error handling

* hardware/serial: improve unix cancellation and timeout polling

* hardware/serial: improve windows I/O handling

* hardware/serial: fix darwin cross-compilation build

* docs(design): summarize hardware support and serial limits

* build: keep go generate on host during cross builds

* onboard: drop unrelated go generate change from serial work

* style(tools): wrap serial lines for golines
2026-04-28 13:10:32 +08:00
SiYue-ZO
2114e1a53f feat(config): wire serial tool into runtime and dashboard 2026-04-28 12:56:27 +08:00
afjcjsbx
23df824c77 fix test 2026-04-27 21:27:02 +02:00
Mauro
c731ecdc74
Merge branch 'main' into fix/gemini-mcp-schema-sanitization 2026-04-27 21:14:25 +02:00
afjcjsbx
cd7717bc15 feat(tool): tool schema semplification 2026-04-27 21:10:30 +02:00
SiYue-ZO
ddf2d7c655 fix gateway boot signature after pico setup 2026-04-26 22:09:00 +08:00
SiYue-ZO
02d9a0d190 feat: track channel and web search restart requirements 2026-04-26 22:09:00 +08:00
lc6464
6d04d15ce0
fix(tool-feedback): dedupe duplicate content and keep full explanations 2026-04-26 00:40:55 +08:00
lc6464
5cd10b594a
feat(pico): add support for tool_calls in chat messages 2026-04-25 23:43:10 +08:00
美電球
77be169db4
Merge pull request #2654 from SiYue-ZO/fix/launcher-hide-windows-console-flash
fix(launcher): hide windows child-process console flashes
2026-04-25 18:00:50 +08:00
美電球
41f4d95597
Merge pull request #2657 from lc6464/fix-deepseek-v4-thinking-history
fix(reasoning): persist canonical history for DeepSeek and web chat
2026-04-25 15:08:48 +08:00
lc6464
ae162a72b1
fix(message): ignore transient assistant thoughts in message count and history truncation 2026-04-25 12:26:28 +08:00
SiYue
b4a5965602 refactor(onboard,api): harden copydir repo-root detection and use platform-neutral proc attrs naming
Address latest review comments from sky5454 in PR #2654.

scripts/copydir.go:

- Improve repository root detection in a safer, more deterministic way.

- Prefer locating repo root from the script source path via runtime.Caller(), then fallback to upward search from current working directory.

- Replace .git-only root detection with repository anchor validation: go.sum, LICENSE, and .github must exist.

- Keep \ placeholder expansion and existing in-repo path guards.

- Preserve destination safety check to prevent deleting/copying to repo root.

web/backend/api:

- Rename applyLauncherWindowsProcAttrs() to applyLauncherProcAttrs() to expose a platform-independent interface name.

- Keep platform-specific behavior split by build tags: windows keeps HideWindow SysProcAttr setup, non-windows remains no-op.

- Update gateway startup path to call the renamed helper.

Why:

- Follow reviewer feedback to avoid relying on .git detection alone and prefer runtime/file-anchor based repository location.

- Improve naming clarity by making cross-platform interfaces generic while preserving OS-specific implementation details internally.

Validation:

- go test ./cmd/picoclaw/internal/onboard

- go test ./web/backend/api
2026-04-25 00:31:36 +08:00
afjcjsbx
dce29c181f fix lint 2026-04-24 18:21:01 +02:00
SiYue
e1863234f0 fix(launcher): hide windows child-process console flashes
- hide windows when launching gateway process from launcher

- hide windows for powershell/tasklist process inspection commands
2026-04-24 23:31:04 +08:00
lc6464
bb0f983708
fix(reasoning): persist canonical history for DeepSeek and web chat 2026-04-24 21:45:41 +08:00
Junghwan
293477b02a
Keep launcher locale changes from mutating shared web-search routing (#2573)
The launcher wired UI language changes into a process-global backend
switch that changed auto web-search provider selection and the
reported current service for every handler in the same process.

This narrows the fix to the validated leak: remove backend sync from
frontend locale changes, drop the now-unused UI endpoint, and make
auto selection fall back to a stable default when the query itself
does not contain a script hint.

Constraint: Keep the patch small and mergeable without redesigning per-user preference storage
Rejected: Add per-user backend language state | larger scope than the validated bug and unclear maintainer preference
Rejected: Persist preferred language in config | still shares mutable state across clients of the same instance
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If locale-aware provider routing is reintroduced later, scope it to explicit config or request context instead of package-global state
Tested: go test ./web/backend/api ./pkg/tools -count=1; pnpm lint; pnpm build
Not-tested: Full make check; live multi-browser manual launcher run after the backend endpoint removal
2026-04-24 13:45:25 +08:00
wenjie
cac4f21746
fix(tools): improve web search provider fallback (#2629)
- centralize web search provider readiness and resolution logic
- fall back when the configured provider is unavailable or invalid
- allow native-search-capable models to use built-in search without the client tool
- simplify the tools page and add direct access to web search settings
- add backend, agent, and integration tests for the new selection behavior
2026-04-23 15:39:16 +08:00
lxowalle
451db2f5d8
Feat(channels): unify animated tool feedback across chat channels and Pico (#2622)
* feat(channels): unify tool feedback animation across discord telegram and feishu

* fix(tool-feedback): unify fallback and single-message delivery

* fix(channels): finalize tool feedback in place

* fix ci

* feat: improve tool feedback

* fix review blockers in pico token cache and tool feedback

fix(provider): preserve function thought signatures

fix(feishu): recover tool feedback after edit fallback

* * delete dead code

* fix(pico): clean up tool feedback progress state

* fix ci

* fix(web): preserve tool feedback line breaks in chat

* fix(channels): preserve tool feedback progress state

fix(pico): preserve context usage when finalizing tool feedback

chore: record branch review pass

fix: preserve tool feedback finalization state

fix(web): handle pico history update fallback

* fix ci
2026-04-23 10:35:50 +08:00
wenjie
f367a9c010
fix(web): use raw token for Pico media proxy and refresh chat attachment UI (#2618) 2026-04-22 15:14:20 +08:00
lxowalle
77b0c43392
refactor: support explicit provider field in model list entries (#2609)
* refactor: support explicit model list providers

* fix(web): preserve explicit model providers

* fix(web): preserve legacy provider prefixes on model updates

fix(models): normalize explicit provider-prefixed ids

fix(api): preserve legacy model updates across providers

fix(agent): preserve config identity for explicit provider refs

* fix ci
2026-04-22 11:28:47 +08:00
Mauro
3316ee6923
feat(web): download files on frontend (#2563)
* feat(web): download attachments in frontend

* fix: proxy pico media and force svg downloads

* feat(web): hide ephemeral media refs from persisted session history
2026-04-22 11:28:04 +08:00
wenjie
71c877a67f
refactor(web): switch dashboard auth from tokens to passwords (#2608)
- replace token-based launcher auth with password-based login and sessions
- migrate legacy launcher_token values into bcrypt-backed password storage
- add one-shot local auto-login bootstrap
- update config UI, i18n strings, docs, and auth-related tests
2026-04-21 18:04:15 +08:00
wenjie
ba6992234f
feat(web): support list editing for channel array fields (#2595)
Add reusable channel array list controls and parsing utilities for channel forms.
Normalize channel string-array payloads in the backend, including pasted values,
numeric IDs, hidden characters, duplicates, and empty clears.
Also allow FlexibleStringSlice to unmarshal null values and cover the new behavior
with backend and config tests.
2026-04-21 16:04:28 +08:00
wenjie
dcb4b67e00
fix(web): clean up restored chat transcripts and optimize chat UI (#2605)
Filter raw tool messages from session history and avoid duplicate summaries for visible message-tool output. Preserve final assistant replies after tool delivery and add coverage for visible transcript counts.

Also refine the chat UI with collapsible reasoning blocks, send shortcut hints, command-style user messages, stable scroll gutters, and updated i18n strings.
2026-04-21 11:52:58 +08:00
lxowalle
6421f146a9
Revert "Feat/channel tool feedback animation (#2569)" (#2596)
This reverts commit e556a816e4.
2026-04-20 18:30:29 +08:00
lxowalle
e556a816e4
Feat/channel tool feedback animation (#2569)
* feat(channels): unify tool feedback animation across discord telegram and feishu

* fix(tool-feedback): unify fallback and single-message delivery

* fix(channels): finalize tool feedback in place

* fix ci

* feat: improve tool feedback
2026-04-20 15:20:26 +08:00
wenjie
f8190f04b7 fix(web): stop pinning Pico WebSocket origins during setup
- remove request-origin seeding from `EnsurePicoChannel`
- keep `allow_origins` empty by default for auto-configured Pico channels
- relax launcher Pico WebSocket proxy origin validation
- update Pico backend tests for the new setup and proxy behavior
2026-04-20 10:11:03 +08:00
wenjie
d002e1517b fix(web): improve Pico URL and origin handling behind proxies
- read client scheme from X-Forwarded-Proto and RFC 7239 Forwarded
- derive client-visible ports from forwarded host information
- add coverage for HTTPS origins without explicit ports
- verify behavior when proxies omit forwarded protocol headers
2026-04-20 10:11:03 +08:00
wenjie
4b76196e2c refactor(web): secure Pico websocket access behind launcher auth
- stop exposing the raw Pico token to the frontend
- add /api/pico/info for non-secret Pico connection metadata
- proxy /pico/ws through the launcher with same-origin and dashboard auth checks
- inject the upstream Pico websocket protocol server-side
- update frontend chat connection flow and Vite websocket proxy path
- refresh related docs and tests
2026-04-20 10:11:03 +08:00
wenjie
a8d0b03515
fix(web): save channel configs with nested channel_list patches (#2530)
Persist channel settings through the current channel_list schema, keeping common
channel fields at the top level and channel-specific fields under settings.
Return common fields and default config shapes from channel config endpoints, and
add coverage for nested patches, missing channel defaults, and secret handling.
2026-04-16 10:30:16 +08:00
SiYue-ZO
2784223ad5 Make web search auto-switch with UI language
Default the sample web search provider to auto, route Sogou vs DuckDuckGo dynamically based on query/UI language, and sync frontend language changes back to the backend so Current Service and runtime selection stay aligned.
2026-04-15 18:45:28 +08:00
SiYue-ZO
bb953b788b test(api): fix web tools lint issues 2026-04-15 13:35:39 +08:00
SiYue-ZO
75e93b5189 Merge remote-tracking branch 'upstream/main' into feature/sogou-web-search-default
# Conflicts:
#	pkg/tools/web.go
#	pkg/tools/web_test.go
2026-04-15 13:28:05 +08:00