223 Commits

Author SHA1 Message Date
Nikolas de Hor
da8a4fc68c fix: prevent cron job execution from scheduling new jobs
When a cron job fires, the agent processes the scheduled message and
has access to the cron tool. If the original message resembles a
scheduling instruction (e.g. "remind me in 10 seconds"), the agent
would call cron.add again, creating an infinite feedback loop.

Add a cron-context flag to CronTool that blocks add operations during
cron job execution. The flag is set before process_direct() and cleared
in a finally block to ensure cleanup even on errors.

Fixes #1441
2026-03-03 01:02:33 -03:00
chengyongru
8f4baaa5ce feat(gateway): support multiple instances with --workspace and --config options
- Add --workspace/-w flag to specify workspace directory
- Add --config/-c flag to specify config file path
- Move cron store to workspace directory for per-instance isolation
- Enable running multiple nanobot instances simultaneously
2026-03-02 23:18:54 +08:00
chengyongru
aed1ef5529 fix: add SIGTERM, SIGHUP handling and ignore SIGPIPE
- Add handler for SIGTERM to prevent "Terminated" message on Linux
- Add handler for SIGHUP for terminal closure handling
- Ignore SIGPIPE to prevent silent process termination
- Change os._exit(0) to sys.exit(0) for proper cleanup

Fixes issue #1365

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 11:04:53 +08:00
Re-bin
f5c0c75648 Merge branch 'main' into pr-1370 2026-03-01 12:48:01 +00:00
Re-bin
a7d24192d9 fix(cron): route scheduled jobs through process_direct with english reminder prefix 2026-03-01 12:45:53 +00:00
VITOHJL
468dfc406b feat(cron): improve cron job context handling
Improve cron job execution context to ensure proper message delivery and
session history recording.

Changes:
- Add [绯荤粺瀹氭椂浠诲姟] prefix to cron reminder messages to clearly mark
  them as system-driven, not user queries
- Use user role for cron reminder messages (required by some LLM APIs)
- Properly handle MessageTool to avoid duplicate message delivery
- Correctly save turn history with proper skip count
- Ensure Runtime Context is included in the message list

This ensures that:
1. Cron jobs execute with proper context
2. Messages are correctly delivered to users
3. Session history accurately records cron job interactions
4. The LLM understands these are system-driven reminders, not user queries
2026-03-01 17:05:04 +08:00
chengyongru
82be2ae1a5 feat(tool): add web search proxy 2026-03-01 16:51:54 +08:00
Jack Lu
3ee061b879
Merge branch 'main' into main 2026-03-01 13:35:24 +08:00
Tink
80219baf25 feat(api): add OpenAI-compatible endpoint with x-session-key isolation 2026-03-01 10:53:45 +08:00
Re-bin
f9d72e2e74 feat: add reasoning_effort config to enable LLM thinking mode 2026-02-28 17:18:05 +00:00
JK_Lu
977ca725f2 style: unify code formatting and import order
- Remove trailing whitespace and normalize blank lines
- Unify string quotes and line breaks for long lines
- Sort imports alphabetically across modules
2026-02-28 20:55:43 +08:00
Re-bin
d5808bf586 refactor: streamline workspace template sync 2026-02-27 09:46:57 +00:00
Hon Jia Xuan
cb999ae826 feat: implement automatic workspace template synchronization 2026-02-27 10:39:05 +08:00
danfeiyang
22e129b514 fix:Workspace path in onboard command ignores config setting 2026-02-25 01:40:25 +08:00
Re-bin
f828a1d5d1 fix(gateway): show actual heartbeat interval in startup log 2026-02-24 12:09:19 +00:00
Re-bin
ec55f77912 fix(heartbeat): replace HEARTBEAT_OK token with virtual tool-call decision 2026-02-24 11:04:56 +00:00
Re-bin
7671239902 fix(heartbeat): suppress progress messages and deliver agent response to user 2026-02-23 13:45:09 +00:00
Re-bin
ea1c4ef025 fix: suppress heartbeat progress messages to external channels 2026-02-23 12:33:29 +00:00
Re-bin
577b3d104a refactor: move workspace/ to nanobot/templates/ for packaging 2026-02-23 08:08:01 +00:00
Re-bin
e4376896ed Merge remote-tracking branch 'origin/main' into pr-1036 2026-02-23 07:16:40 +00:00
Re-bin
df2c837e25 feat(channels): split send_progress into send_progress + send_tool_hints 2026-02-23 07:12:41 +00:00
Kim
9025c7088f fix(heartbeat): route heartbeat runs to enabled chat context 2026-02-23 12:28:21 +08:00
Yingwen Luo-LUOYW
b323087631 feat(cli): add DingTalk, QQ, and Email to channels status output 2026-02-22 12:42:33 +08:00
Re-bin
7279ff0167 refactor: route CLI interactive mode through message bus for subagent support 2026-02-20 16:45:21 +00:00
Re-bin
b97b1a5e91 fix: pass full agent config including mcp_servers to cron run command 2026-02-20 09:04:33 +00:00
Re-bin
0b34a43779 Merge branch 'main' into pr-821 2026-02-20 08:59:51 +00:00
Re-bin
2b8c082428 Merge branch 'main' into pr-763 2026-02-20 08:04:48 +00:00
chtangwin
a2379a08ac Fix: Ensure UTF-8 encoding and ensure_ascii=False for remaining file/JSON operations 2026-02-18 18:37:17 -08:00
Clayton Wilson
4367038a95 fix: make cron run command actually execute the agent
Wire up an AgentLoop with an on_job callback in the cron_run CLI
command so the job's message is sent to the agent and the response
is printed. Previously, CronService was created with no on_job
callback, causing _execute_job to skip execution silently and
always report success.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 15:42:33 -06:00
Alexander Minges
4a85cd9a11
fix(cron): add service-layer timezone validation
Adds `_validate_schedule_for_add()` to `CronService.add_job` so that
invalid or misplaced `tz` values are rejected before a job is persisted,
regardless of which caller (CLI, tool, etc.) invoked the service.

Surfaces the resulting `ValueError` in `nanobot cron add` via a
`try/except` so the CLI exits cleanly with a readable error message.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 19:33:23 +01:00
Re-bin
715b2db24b feat: stream intermediate progress to user during tool execution 2026-02-18 14:23:51 +00:00
Re-bin
d54831a35f feat: add github copilot oauth login and improve provider status display 2026-02-18 03:09:09 +00:00
Re-bin
8f6dd8708f Merge branch 'main' into pr-312 2026-02-18 02:57:11 +00:00
Re-bin
e2a0d63909 feat: add custom provider with direct openai-compatible support 2026-02-18 02:39:15 +00:00
Jeroen Evens
16127d49f9 [github] Fix Oauth login 2026-02-17 23:07:04 +01:00
Jeroen Evens
b161fa4f9a [github] Add Github Copilot 2026-02-17 23:07:04 +01:00
Re-bin
7d7d6bcadc Merge branch 'main' into pr-746 2026-02-17 17:46:46 +00:00
Re-bin
f5c5b13ff0 refactor: use is_oauth flag instead of hardcoded provider name check 2026-02-17 08:41:09 +00:00
Re-bin
12e59ecaae Merge branch 'main' into pr-720 2026-02-17 08:33:34 +00:00
Re-bin
6bae6a617f fix(cron): fix timezone display bug, add tz validation and skill docs 2026-02-17 08:30:52 +00:00
Darye
778a93370a Enable Cron management on CLI Agent. 2026-02-17 03:52:54 +01:00
jopo
ae903e983c fix(cron): improve timezone scheduling and tz propagation 2026-02-16 17:49:19 -08:00
Darye
5033ac1759 Added Github Copilot Provider 2026-02-16 15:02:12 +01:00
Re-bin
1ce586e9f5 fix: resolve Codex provider bugs and simplify implementation 2026-02-16 11:43:36 +00:00
Re-bin
9e5f7348fe Merge branch 'main' into pr-151 2026-02-16 09:19:40 +00:00
Re-bin
52cf1da30a fix: store original MCP tool name, make close_mcp public 2026-02-15 07:00:27 +00:00
Re-bin
54d5f637e7 merge main into pr-554 2026-02-15 06:12:15 +00:00
Re-bin
f821e95d3c fix: wire max_tokens/temperature to all chat calls, clean up redundant comments 2026-02-14 01:40:37 +00:00
Re-bin
9a83301ea6 Merge branch 'main' into pr-560 2026-02-14 01:10:51 +00:00
Re-bin
12540ba8cb feat: improve onboard with merge-or-overwrite prompt 2026-02-14 00:58:43 +00:00