Commit Graph

566 Commits

Author SHA1 Message Date
gavrielc
acb0abaf8b fix: broken tests and stale .env.example
- Fix container-runner bug: stopContainer() returns void but was
  passed to exec() as a command string. Replace with direct call
  and try/catch.
- Mock container-runtime in tests so they don't need Docker running.
- Increase claw-skill test timeout to handle slower python startup.
- Clear .env.example (telegram token was added by mistake).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 23:19:07 +03:00
gavrielc
4f1b09fcb6 fix: migrate x-integration host.ts from pino to built-in logger
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 22:36:54 +03:00
github-actions[bot]
fa4ace423c docs: update token count to 42.4k tokens · 21% of context window 2026-03-27 18:42:42 +00:00
github-actions[bot]
e6e0c6fa9e chore: bump version to 1.2.40 2026-03-27 18:42:36 +00:00
gavrielc
c5e0001637 Merge pull request #1497 from qwibitai/fix/message-history-overflow
fix: prevent full message history from being sent to container agents
2026-03-27 21:42:24 +03:00
gavrielc
e73bf2f324 Merge branch 'main' into fix/message-history-overflow 2026-03-27 21:39:41 +03:00
exe.dev user
c98205ca0d fix: prevent full message history from being sent to container agents
When lastAgentTimestamp was missing (new group, corrupted state, or
startup recovery), the empty-string fallback caused getMessagesSince to
return up to 200 messages — the entire group history. This sent a
massive prompt to the container agent instead of just recent messages.

Fix: recover the cursor from the last bot reply timestamp in the DB
(proof of what we already processed), and cap all prompt queries to a
configurable MAX_MESSAGES_PER_PROMPT (default 10). Covers all three
call sites: processGroupMessages, the piping path, and
recoverPendingMessages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:38:40 +00:00
github-actions[bot]
2faf1c6e19 docs: update token count to 42.1k tokens · 21% of context window 2026-03-27 14:15:56 +00:00
github-actions[bot]
842ec5fd30 chore: bump version to 1.2.39 2026-03-27 14:15:52 +00:00
gavrielc
017a72d57d Merge pull request #1475 from foxsky/fix/security-stopcontainer-mount
fix(security): prevent command injection in stopContainer and mount path injection
2026-03-27 17:15:38 +03:00
gavrielc
bd94c8144a Merge branch 'main' into fix/security-stopcontainer-mount 2026-03-27 17:15:06 +03:00
github-actions[bot]
6e602a1f5b chore: bump version to 1.2.38 2026-03-27 14:10:36 +00:00
gavrielc
415a1cfd44 Merge pull request #1477 from snw35/ipc-fix
fix: Preserve isMain on IPC updates
2026-03-27 17:10:22 +03:00
gavrielc
fee05f7ee8 Merge branch 'main' into ipc-fix 2026-03-27 17:10:13 +03:00
github-actions[bot]
877650541a chore: bump version to 1.2.37 2026-03-27 14:10:01 +00:00
gavrielc
c923f07829 Merge pull request #1476 from foxsky/fix/env-parser-single-char
fix(env): prevent crash on single-character .env values
2026-03-27 17:09:49 +03:00
gavrielc
f138f25c79 Merge branch 'main' into fix/env-parser-single-char 2026-03-27 17:09:38 +03:00
gavrielc
e9e9e05290 Merge branch 'main' into ipc-fix 2026-03-27 17:02:42 +03:00
gavrielc
5b7b0867da Merge pull request #1484 from Jimbo1167/docs/k8s-image-gc-known-issue
docs: add k8s image GC known issue to debug checklist
2026-03-27 16:56:34 +03:00
gavrielc
e606eac91d Merge branch 'main' into docs/k8s-image-gc-known-issue 2026-03-27 16:56:25 +03:00
James Schindler
8935e4f636 docs: add k8s image GC known issue to debug checklist
Kubernetes image garbage collection silently deletes the nanoclaw-agent
image when disk usage is high because ephemeral containers don't
protect the image from GC. Documents symptoms, cause, fix, and diagnosis.
2026-03-27 08:29:53 -04:00
github-actions[bot]
f900670aaf docs: update token count to 42.0k tokens · 21% of context window 2026-03-27 12:13:56 +00:00
github-actions[bot]
62fc8c7708 chore: bump version to 1.2.36 2026-03-27 12:13:53 +00:00
gavrielc
7e7492ebba style: apply prettier formatting to logger
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:13:39 +03:00
gavrielc
7b22e23761 chore: replace pino/pino-pretty with built-in logger
Drop 23 transitive dependencies by replacing pino + pino-pretty with a
~70-line logger that matches the same output format and API. All 80+
call sites work unchanged. Production deps now: @onecli-sh/sdk,
better-sqlite3, cron-parser.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:13:34 +03:00
gavrielc
2f472a8600 feat: add opt-in model management tools to ollama skill setup
Update SKILL.md to ask users during setup whether they want model
management tools (pull, delete, show, list-running) and set
OLLAMA_ADMIN_TOOLS=true in .env accordingly. Core inference tools
remain always available.

Incorporates #1456 by @bitcryptic-gw. Closes #1331.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:32:58 +03:00
gavrielc
8f01a9a05e chore: remove unused dependencies (yaml, zod, @vitest/coverage-v8)
None of these are imported or referenced by the main codebase.
yaml had zero imports; zod is only used in container/agent-runner
(which has its own package.json); coverage-v8 was never configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:24:41 +03:00
gavrielc
a4591ab5e0 Merge pull request #1449 from kenbolton/fix/text-styles
fix(skill/channel-formatting): three correctness fixes to text-styles
2026-03-27 13:42:19 +03:00
gavrielc
3332da03af Merge branch 'main' into fix/text-styles 2026-03-27 13:42:05 +03:00
snw35
f5375972c4 Preserve isMain on IPC updates 2026-03-26 23:20:30 +00:00
root
0f01fe2c07 fix(env): prevent crash on single-character .env values
A value like `X=a` would pass the startsWith/endsWith quote check
(both `"` and `'` are single chars), then slice(1, -1) would produce
an empty string, silently dropping the value. Add length >= 2 guard
before checking for surrounding quotes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 19:01:17 -03:00
root
a4fd4f2a2f fix(security): prevent command injection in stopContainer and mount path injection
**stopContainer (container-runtime.ts):**
- Validate container name against `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$` before
  passing to shell command. Rejects names with shell metacharacters
  (`;`, `$()`, backticks, etc.) that could execute arbitrary commands.
- Changed return type from string to void — callers no longer build
  shell commands from the return value.

**mount-security.ts:**
- Reject container paths containing `:` to prevent Docker `-v` option
  injection (e.g., `repo:rw` could override readonly flags).
- Don't permanently cache "file not found" for mount allowlist — the
  file may be created later without requiring a service restart. Only
  parse/structural errors are permanently cached.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 19:00:28 -03:00
github-actions[bot]
4383e3e61a chore: bump version to 1.2.35 2026-03-26 15:39:34 +00:00
gavrielc
1f5cc760a7 Merge pull request #1453 from qwibitai/fix/task-scripts-instructions-clean
fix: improve task scripts agent instructions
2026-03-26 17:39:22 +02:00
Daniel M
722c8ee595 Merge branch 'main' into fix/task-scripts-instructions-clean 2026-03-26 17:06:30 +02:00
NanoClaw User
730ea0d713 fix: refine task scripts intro wording
Use third-person voice and clearer terminology for the task scripts
intro paragraph.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:05:53 +00:00
gavrielc
637545dfca Merge pull request #1468 from Koshkoshinsk/docs/auth-credentials-guidance
docs: add auth credentials guidance to main group CLAUDE.md
2026-03-26 16:08:11 +02:00
Daniel M
4588579622 Merge branch 'main' into docs/auth-credentials-guidance 2026-03-26 15:22:41 +02:00
NanoClaw User
eda14f472b fix: include script field in task snapshot for current_tasks.json
The task snapshot mappings in index.ts were omitting the script field,
making it appear that scheduled tasks had no script even when one was
stored in the database.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:20:24 +00:00
NanoClaw User
a29ca0835c fix: rewrite task scripts intro for broader use cases and clarity
Broadens the trigger from "check or monitor" to "any recurring task",
adds context about API credit usage and account risk for frequent tasks,
and prompts the agent to clarify ambiguous requests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:20:24 +00:00
NanoClaw User
813e1c6fa4 fix: improve task scripts agent instructions
Reword Task Scripts opening in main template to guide agents toward
schedule_task instead of inline bash loops. Add missing Task Scripts
section to global template — non-main groups have unrestricted access
to schedule_task with script parameter, so omitting instructions just
leads to worse patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:20:24 +00:00
NanoClaw
d25b79a5a9 docs: add auth credentials guidance to main group CLAUDE.md
Clarify that only long-lived OAuth tokens (claude setup-token) or API keys
should be used — short-lived tokens from the keychain expire within hours
and cause recurring 401s. Also update native credential proxy skill to
swap the OneCLI reference when applied.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:17:07 +00:00
gavrielc
a41746530f fix(init-onecli): only offer to migrate container-facing credentials
Channel tokens (Telegram, Slack, Discord) are used by the host
process, not by containers via the gateway. Only offer to migrate
credentials that containers use for outbound API calls (OpenAI,
Parallel, etc.).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:52:25 +02:00
gavrielc
d398ba5ac6 feat(init-onecli): offer to migrate non-Anthropic .env credentials to vault
After migrating Anthropic credentials, the skill now scans .env for
other service tokens (Telegram, Slack, Discord, OpenAI, etc.) and
offers to move them into OneCLI Agent Vault as well.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:51:24 +02:00
gavrielc
8b53a95a5f feat: add /init-onecli skill for OneCLI Agent Vault setup and credential migration
Operational skill that installs OneCLI, configures the Agent Vault
gateway, and migrates existing .env credentials into the vault.
Designed to run after /update-nanoclaw introduces OneCLI as a
breaking change. Added [BREAKING] changelog entry so update-nanoclaw
automatically offers to run /init-onecli.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:31:31 +02:00
gavrielc
4c6d9241d4 docs: update README and security docs to reflect OneCLI Agent Vault adoption
Replace references to the old built-in credential proxy with OneCLI's
Agent Vault across README (feature list, FAQ) and docs/SECURITY.md
(credential isolation section, architecture diagram).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:25:18 +02:00
gavrielc
87c3640cfc Merge pull request #1346 from tomermesser/status-bar
feat(skill): add macOS menu bar status indicator
2026-03-25 23:55:47 +02:00
gavrielc
e4f15b659e rename skill to add-macos-statusbar
Co-Authored-By: tomermesser <tomeaces@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 23:55:21 +02:00
gavrielc
349b54ae9e fix(add-statusbar): derive log path from binary location, fix SKILL.md
- statusbar.swift: derive project root from binary location instead of
  hardcoding ~/Documents/Projects/nanoclaw
- SKILL.md: remove references to non-existent apply-skill.ts, compile
  directly from skill directory using ${CLAUDE_SKILL_DIR}
- SKILL.md: add xattr -cr step for Gatekeeper on macOS Sequoia+
- Remove unused manifest.yaml

Co-Authored-By: tomermesser <tomeaces@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 23:54:05 +02:00
gavrielc
9413ace113 chore: add edwinwzhe and scottgl9 to contributors
Co-Authored-By: Edwin He <edwinwzhe@users.noreply.github.com>
Co-Authored-By: Scott Glover <scottgl9@users.noreply.github.com>
2026-03-25 23:43:54 +02:00