clawdie-ai/package.json

61 lines
2.1 KiB
JSON
Raw Normal View History

{
"name": "clawdie",
"version": "0.10.0",
2026-03-07 23:00:52 +01:00
"description": "Personal AI assistant. Lightweight, secure, customizable.",
"license": "BSD-3-Clause",
"type": "module",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"start": "node dist/index.js",
"dev": "tsx src/index.ts",
"doctor": "tsx src/doctor.ts",
"auth": "tsx setup/telegram-auth.ts",
"typecheck": "tsc --noEmit",
"format": "prettier --write \"src/**/*.ts\"",
Refactor index (#156) * feat: add Telegram channel with agent swarm support Add Telegram as a messaging channel that can run alongside WhatsApp or standalone (TELEGRAM_ONLY mode). Includes bot pool support for agent swarms where each subagent appears as a different bot identity in the group. - Add grammy dependency for Telegram Bot API - Route messages through tg: JID prefix convention - Add storeMessageDirect for non-Baileys channels - Add sender field to IPC send_message for swarm identity - Support TELEGRAM_BOT_TOKEN, TELEGRAM_ONLY, TELEGRAM_BOT_POOL config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add index.ts refactor plan Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: extract channel abstraction, IPC, and router from index.ts Break the 1088-line monolith into focused modules: - src/channels/whatsapp.ts: WhatsAppChannel class implementing Channel interface - src/ipc.ts: IPC watcher and task processing with dependency injection - src/router.ts: message formatting, outbound routing, channel lookup - src/types.ts: Channel interface, OnInboundMessage, OnChatMetadata types Also adds regression test suite (98 tests), updates all documentation and skill files to reflect the new architecture. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: add test workflow for PRs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: remove accidentally committed pool-bot assets Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): remove grammy from base dependencies Grammy is installed by the /add-telegram skill, not a base dependency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 00:36:37 +02:00
"format:check": "prettier --check \"src/**/*.ts\"",
"setup": "tsx setup/index.ts",
"wizard": "tsx setup/index.ts --step onboarding",
"preflight-check": "tsx setup/index.ts --step preflight",
release: v0.7.1 — Control Plane Refactoring 0.7.0 — Privileged Host Daemon + PF Web Edge: - clawdie-hostd: root daemon on /var/run/clawdie-hostd.sock with whitelisted Zod-validated op handlers (bastille, zfs, pf, service, pkg, sysrc, sanoid) - setup/pf.ts: writes /etc/pf.conf with NAT egress + rdr pass 80/443 → cms jail - src/controlplane.ts: self-healing checks hostd, service jails, PF; repairs via hostd; process.exit(1) if db jail still down after fix - setup/hostd.ts: installs rc.d script, sets clawdie_hostd_enable=YES - setup/service.ts: tmux session with setup window when PI_PROFILE=setup - Preflight: 15 steps (pf at position 3, hostd at position 12) - Removed infra/ansible/playbooks/host-nginx.yaml 0.7.1 — Control Plane Refactoring: - src/infra.ts → src/controlplane.ts (runControlPlaneChecks, CONTROLPLANE_CHECK_INTERVAL_MS, ControlPlaneReport, ControlPlaneCheckResult) - Watchdog stores lastControlPlaneReport; exposed as controlplane in IPC status - doctor now queries watchdog IPC: prints WATCHDOG_* and CONTROLPLANE_* lines - Docs: README simplified, MONITORING rewritten with watchdog/controlplane layers, SECURITY updated with hostd in architecture diagram, HOST-OPERATOR-MODEL gets privilege delegation section, CMS-DEPLOYMENT-PLAN updated with implementation status - Skills: nginx fully rewritten to cms-jail model; setup + freebsd-admin updated - All stale src/infra.ts references eliminated --- Build: pass | Tests: pass — 414 passed (45 files) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --- Build: pass | Tests: pass — Tests 414 passed | 10 skipped (424) --- Build: pass | Tests: pass — Tests 414 passed | 10 skipped (424)
2026-03-15 08:50:08 +00:00
"hostd": "sudo node dist/hostd/index.js",
"hostd:dev": "sudo tsx src/hostd/index.ts",
Refactor index (#156) * feat: add Telegram channel with agent swarm support Add Telegram as a messaging channel that can run alongside WhatsApp or standalone (TELEGRAM_ONLY mode). Includes bot pool support for agent swarms where each subagent appears as a different bot identity in the group. - Add grammy dependency for Telegram Bot API - Route messages through tg: JID prefix convention - Add storeMessageDirect for non-Baileys channels - Add sender field to IPC send_message for swarm identity - Support TELEGRAM_BOT_TOKEN, TELEGRAM_ONLY, TELEGRAM_BOT_POOL config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add index.ts refactor plan Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: extract channel abstraction, IPC, and router from index.ts Break the 1088-line monolith into focused modules: - src/channels/whatsapp.ts: WhatsAppChannel class implementing Channel interface - src/ipc.ts: IPC watcher and task processing with dependency injection - src/router.ts: message formatting, outbound routing, channel lookup - src/types.ts: Channel interface, OnInboundMessage, OnChatMetadata types Also adds regression test suite (98 tests), updates all documentation and skill files to reflect the new architecture. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: add test workflow for PRs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: remove accidentally committed pool-bot assets Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): remove grammy from base dependencies Grammy is installed by the /add-telegram skill, not a base dependency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 00:36:37 +02:00
"test": "vitest run",
"test:watch": "vitest",
"gen-changelog": "npx tsx scripts/gen-changelog.ts",
"backup": "tsx scripts/backup.ts",
"sync-readme-version": "node scripts/update-readme-version.mjs",
"check-readme-version": "node scripts/update-readme-version.mjs --check",
"publish-tenant-site": "tsx setup/publish-tenant-site.ts",
"install": "tsx setup/install.ts",
"verify-agent-jails": "sudo npx tsx setup/verify-agent-jails.ts",
"install-hooks": "git config core.hooksPath hooks",
fix(multitenant): auto-activate attribution guard so reset-discipline is not load-bearing zAI — the Agent Identity fix in 8138173 is fragile as it stands. On shared-Linux setups, `user.name` lives in `.git/config` per-clone, so whichever agent set it most recently wins until the next reset. "Each agent remembers to re-run `git config user.name`" is exactly the kind of verbal invariant that silently breaks: one forgotten command and the next ten commits land under the wrong author, with no warning. The pre-commit guard I added in 8bafe79 was dormant (opt-in via `npm run install-hooks`), which preserves the same failure mode for any agent who skips the manual step. This commit removes that foot-gun: - package.json gains a `prepare` script that sets `core.hooksPath=hooks` on every `npm install`. npm runs `prepare` automatically, so the guard goes live on any fresh clone or dep refresh — no agent has to opt in. - The handoff section is re-worded to stop framing the pre-commit hook as a "nice-to-have" and starts treating it as the actual mechanism. The `git config user.name` step still matters, but it's now enforceable: the hook rejects any commit whose author does not start with `Operator & ` (legacy `Clawdie AI` still allowed). Net effect: a forgotten `user.name` reset produces an immediate commit-time error instead of a misattributed commit. Please run `npm install` at the start of your next session so the guard is live on your clone too. --- Build: pass | Tests: pass — Tests 1812 passed (1812)
2026-04-24 20:02:06 +02:00
"prepare": "git config core.hooksPath hooks 2>/dev/null || true",
"release": "node -e \"const v='v'+require('./package.json').version; require('child_process').execSync('git tag -a '+v+' -m '+v+' && git push origin '+v, {stdio:'inherit'});\""
},
"dependencies": {
2026-04-08 18:49:30 +00:00
"@opentelemetry/api": "^1.9.0",
"better-auth": "^1.6.0",
"cron-parser": "^5.5.0",
"grammy": "^1.41.1",
"openai": "^4.104.0",
"pg": "^8.20.0",
"pino": "^9.6.0",
"pino-pretty": "^13.0.0",
Skills engine v0.1 + multi-channel infrastructure (#307) * refactor: multi-channel infrastructure with explicit channel/is_group tracking - Add channels[] array and findChannel() routing in index.ts, replacing hardcoded whatsapp.* calls with channel-agnostic callbacks - Add channel TEXT and is_group INTEGER columns to chats table with COALESCE upsert to protect existing values from null overwrites - is_group defaults to 0 (safe: unknown chats excluded from groups) - WhatsApp passes explicit channel='whatsapp' and isGroup to onChatMetadata - getAvailableGroups filters on is_group instead of JID pattern matching - findChannel logs warnings instead of silently dropping unroutable JIDs - Migration backfills channel/is_group from JID patterns for existing DBs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: skills engine v0.1 — deterministic skill packages with rerere resolution Three-way merge engine for applying skill packages on top of a core codebase. Skills declare which files they add/modify, and the engine uses git merge-file for conflict detection with git rerere for automatic resolution of previously-seen conflicts. Key components: - apply: three-way merge with backup/rollback safety net - replay: clean-slate replay for uninstall and rebase - update: core version updates with deletion detection - rebase: bake applied skills into base (one-way) - manifest: validation with path traversal protection - resolution-cache: pre-computed rerere resolutions - structured: npm deps, env vars, docker-compose merging - CI: per-skill test matrix with conflict detection 151 unit tests covering merge, rerere, backup, replay, uninstall, update, rebase, structured ops, and edge cases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add Discord and Telegram skill packages Skill packages for adding Discord and Telegram channels to NanoClaw. Each package includes: - Channel implementation (add/src/channels/) - Three-way merge targets for index.ts, config.ts, routing.test.ts - Intent docs explaining merge invariants - Standalone integration tests - manifest.yaml with dependency/conflict declarations Applied via: npx tsx scripts/apply-skill.ts .claude/skills/add-discord These are inert until applied — no runtime impact. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * remove unused docs (skills-system-status, implementation-guide) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 01:55:00 +02:00
"yaml": "^2.8.2",
"zod": "^4.3.6"
},
"devDependencies": {
"@sinclair/typebox": "^0.34.49",
"@types/node": "^22.10.0",
"@types/pg": "^8.18.0",
Refactor index (#156) * feat: add Telegram channel with agent swarm support Add Telegram as a messaging channel that can run alongside WhatsApp or standalone (TELEGRAM_ONLY mode). Includes bot pool support for agent swarms where each subagent appears as a different bot identity in the group. - Add grammy dependency for Telegram Bot API - Route messages through tg: JID prefix convention - Add storeMessageDirect for non-Baileys channels - Add sender field to IPC send_message for swarm identity - Support TELEGRAM_BOT_TOKEN, TELEGRAM_ONLY, TELEGRAM_BOT_POOL config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add index.ts refactor plan Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: extract channel abstraction, IPC, and router from index.ts Break the 1088-line monolith into focused modules: - src/channels/whatsapp.ts: WhatsAppChannel class implementing Channel interface - src/ipc.ts: IPC watcher and task processing with dependency injection - src/router.ts: message formatting, outbound routing, channel lookup - src/types.ts: Channel interface, OnInboundMessage, OnChatMetadata types Also adds regression test suite (98 tests), updates all documentation and skill files to reflect the new architecture. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: add test workflow for PRs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: remove accidentally committed pool-bot assets Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): remove grammy from base dependencies Grammy is installed by the /add-telegram skill, not a base dependency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 00:36:37 +02:00
"@vitest/coverage-v8": "^4.0.18",
"prettier": "^3.8.1",
"tsx": "^4.19.0",
"typescript": "^5.9.3",
Refactor index (#156) * feat: add Telegram channel with agent swarm support Add Telegram as a messaging channel that can run alongside WhatsApp or standalone (TELEGRAM_ONLY mode). Includes bot pool support for agent swarms where each subagent appears as a different bot identity in the group. - Add grammy dependency for Telegram Bot API - Route messages through tg: JID prefix convention - Add storeMessageDirect for non-Baileys channels - Add sender field to IPC send_message for swarm identity - Support TELEGRAM_BOT_TOKEN, TELEGRAM_ONLY, TELEGRAM_BOT_POOL config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add index.ts refactor plan Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: extract channel abstraction, IPC, and router from index.ts Break the 1088-line monolith into focused modules: - src/channels/whatsapp.ts: WhatsAppChannel class implementing Channel interface - src/ipc.ts: IPC watcher and task processing with dependency injection - src/router.ts: message formatting, outbound routing, channel lookup - src/types.ts: Channel interface, OnInboundMessage, OnChatMetadata types Also adds regression test suite (98 tests), updates all documentation and skill files to reflect the new architecture. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ci: add test workflow for PRs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: remove accidentally committed pool-bot assets Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): remove grammy from base dependencies Grammy is installed by the /add-telegram skill, not a base dependency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 00:36:37 +02:00
"vitest": "^4.0.18"
},
"engines": {
"node": ">=24"
}
}