Commit graph

9 commits

Author SHA1 Message Date
8456fcc526 test: expand coverage + fix setup/ TypeScript errors
New test files (83 tests):
- src/agent-identity.test.ts — resolveAgentIdentity across locales/genders
- src/env.test.ts — readEnvFile parsing, quoting, edge cases
- src/jail-registry.test.ts — getJailIp with/without env override
- src/local-hosts.test.ts — block markers, entries, render, upsert
- src/mount-security.test.ts — validateMount allowlist enforcement
- src/transcription.test.ts — initTranscription + transcribeAudio with mocked OpenAI

setup/ TypeScript audit (tsconfig.setup.json):
- agent-jails: JAILS value serialised to JSON string for emitStatus
- environment.test: use import type for pg.Pool type cast
- onboarding: wrap showProfileMenu in normalizePiTuiProfile
- preflight.test: fix process.exit mock type + typed call array casts
- sanoid: execSync → spawnSync for multi-arg zfs invocation
- skills-memory: bracket access for legacy chunking_version field
- upstream: pass process.cwd() to isGitRepo()
- verify: import StripeKeyMode type, annotate stripeKeyMode variable

Full suite: 69 files, 1162 tests passing; tsc --noEmit clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---
Build: pass | Tests: pass — Tests  1162 passed (1162)

---
Build: pass | Tests: pass — Tests  1162 passed (1162)
2026-04-14 09:40:28 +00:00
8e661311b5 feat(db): migrate SQLite to Postgres OPS_DB (Sam & Claude)
Replace better-sqlite3 with pg Pool for all operational data (chats,
messages, tasks, sessions, router_state, registered_groups). New
OPS_DB_URL config drives a dedicated ops database alongside the
existing memory and skills databases.

All db.ts functions are now async. Callers in src/, setup/, and tests
updated accordingly. Tests use a mock pool (src/test-helpers.ts) so
they run without a live Postgres connection.

---
Build: pass | Tests: not run (Linux)
2026-04-11 12:21:27 +02:00
Clawdie
a80ec0664c Replace WhatsApp setup with Telegram auth 2026-03-07 23:08:14 +01:00
Clawdie
0a5adbe650 Remove Claude runtime path 2026-03-07 23:00:52 +01:00
Clawdie
64e8584fd1 Drop legacy container config aliases 2026-03-07 22:38:47 +01:00
Clawdie
a5c53fdd92 Remove non-FreeBSD runtime paths 2026-03-07 21:55:25 +01:00
Clawdie
d7e57e2374 Switch default runtime to pi 2026-03-07 21:15:16 +01:00
Gabi Simons
d12c3c4da3 refactor: CI optimization, logging improvements, and codebase formatting (#456)
* fix(db): remove unique constraint on folder to support multi-channel agents

* ci: implement automated skill drift detection and self-healing PRs

* fix: align registration logic with Gavriel's feedback and fix build/test issues from Daniel Mi

* style: conform to prettier standards for CI validation

* test: fix branch naming inconsistency in CI (master vs main)

* fix(ci): robust module resolution by removing file extensions in scripts

* refactor(ci): simplify skill validation by removing redundant combination tests

* style: conform skills-engine to prettier, unify logging in index.ts and cleanup unused imports

* refactor: extract multi-channel DB changes to separate branch

Move channel column, folder suffix logic, and related migrations
to feat/multi-channel-db-v2 for independent review. This PR now
contains only CI/CD optimizations, Prettier formatting, and
logging improvements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 23:13:36 +02:00
gavrielc
29ae065fde refactor: move setup scripts out of src/ to reduce build token count
Setup scripts are standalone CLI tools run via tsx with no runtime
imports from the main app. Moving them out of src/ excludes them from
the tsc build output and reduces the compiled bundle size.

- git mv src/setup/ setup/
- Fix imports to use ../src/logger.js and ../src/config.js
- Update package.json, vitest.config.ts, SKILL.md references
- Fix platform tests to be cross-platform (macOS + Linux)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:43:22 +02:00
Renamed from src/setup/environment.test.ts (Browse further)