diff --git a/.daemon/logs/signet-2026-02-19.log b/.daemon/logs/signet-2026-02-19.log index 828b53803..ab956308f 100644 --- a/.daemon/logs/signet-2026-02-19.log +++ b/.daemon/logs/signet-2026-02-19.log @@ -995,3 +995,6 @@ {"timestamp":"2026-02-19T11:01:20.496Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/debug.log"}} {"timestamp":"2026-02-19T11:01:25.513Z","level":"info","category":"git","message":"Auto-committed","data":{"message":"2026-02-19T11-01-25_auto_memory/debug.log, memory/memories.db-shm, memory/m","filesChanged":4}} {"timestamp":"2026-02-19T11:01:54.985Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/debug.log"}} +{"timestamp":"2026-02-19T11:02:00.004Z","level":"info","category":"git","message":"Auto-committed","data":{"message":"2026-02-19T11-01-59_auto_memory/debug.log","filesChanged":1}} +{"timestamp":"2026-02-19T11:02:04.277Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/debug.log"}} +{"timestamp":"2026-02-19T11:02:04.278Z","level":"info","category":"watcher","message":"File changed","data":{"path":"/home/nicholai/.agents/memory/MEMORY.md"}} diff --git a/memory/MEMORY.md b/memory/MEMORY.md index 635498411..f4cbac218 100644 --- a/memory/MEMORY.md +++ b/memory/MEMORY.md @@ -1,67 +1,39 @@ - + Current Context -Signetai architecture refactoring is in progress, consolidating duplicated utilities into a shared core package and standardizing connector implementations using the BaseConnector pattern. +Focusing on repository migration compliance, system refactoring, and template consistency across the signetai and imessage-viewer projects. Active Projects -1. Signetai Architecture Refactoring -Location: `/home/nicholai/signet/signetai/` -Status: In Progress - Core utilities created, daemon updated, connectors being refactored -Blockers: None identified -Next Steps: -- Verify connector-openclaw changes work correctly -- Check if any other packages need updates -- Review and remove any remaining local implementations of core functions -- Run full test suite to ensure no regressions - -2. Signet Agent Profile Management -Location: `~/.agents/` -Status: Setup complete -Next Steps: None - ongoing maintenance only + Apache 2.0 License Migration (`signetai` repo) + Status: Script creation in progress/verification needed. + Task: Migrate monorepo from MIT to Apache 2.0. Uses `git filter-repo` to rewrite only license files while preserving git history. Must also update NPM metadata. + iMessage Viewer Sync Refactor (`imessage-viewer` repo) + Status: Completed. + Details: Rewrote `lib/sync/ssh-pull.ts` to replace SSH+bash+tar approach with direct `rsync` calls (`rsync -az`). Deleted `scripts/remote-collect.sh`. Supports file-based sources (safari, chrome, shell) and directory sources (notes, reminders, calendar, contacts). + Signetai Skill Templates (`signetai` repo) + Status: Completed. + Details: Fixed `packages/signetai/templates/skills/recall/SKILL.md` and `packages/signetai/templates/skills/remember/SKILL.md` to use `signet recall/remember` CLI commands (e.g., `/api/memory/remember`) instead of outdated hook commands. Verified CLI functionality. Recent Work -Last 2 sessions: -- Completed refactoring of `connector-opencode` to extend `BaseConnector`, removing ~80 lines of duplicated code -- Completed refactoring of `connector-openclaw` to extend `BaseConnector` -- Both packages now import `BaseConnector` from `@signet/connector-base` -- Added necessary dependencies and updated build scripts -- All packages build successfully with no type errors - -Previous work: -- Created core utility package with `markdown.ts`, `yaml.ts`, `symlinks.ts` -- Updated `daemon.ts` and `hooks.ts` to use core utilities instead of local implementations -- Created `connector-base` package with `BaseConnector` class implementing `SignetLifecycle` interface + Rsync-based Sync Implementation: Successfully refactored the sync mechanism in `imessage-viewer` to use direct `rsync` SSH connections, eliminating the need for a temporary bash script (`scripts/remote-collect.sh`) and minimizing forensic traces on the macOS system. + Skill Template Updates: Updated template files in the signetai repo to align with CLI commands, ensuring consistency for new installations. + License Migration Planning: Set up the plan to use `git filter-repo` for the signetai repository migration. Technical Notes -Current Working Directory: `/home/nicholai/signet/signetai/` - -Tools: -- Node.js with bun for package management and building -- TypeScript for type checking -- Existing codebase uses bun-specific modules and logger types (pre-existing, not related to current changes) - -Key Technical Details: -- All connectors now extend `BaseConnector` with `harnessId` property and implement `getConfigPath()` -- `InstallResult` type used for installation responses -- `UninstallResult` type for uninstallation responses -- Config paths: `~/.config/opencode/config.yaml` for opencode, `~/.config/openclaw/` for openclaw - -Build Commands: -- `bun run install` - install dependencies -- `bun run build` - build all packages + Git Tools: `git filter-repo` is being utilized for the license migration. It allows rewriting file contents without corrupting git history or authorship metadata. + Rsync Flags: Using `-az` (archive mode with compression) for the iMessage sync refactor. + Signet Architecture: Skills are located in `~/.agents/skills/`. CLI commands should target the installed CLI skills rather than API hooks for recall/remember actions. + Bun Runtime: Dashboard skills installer fix involves replacing `execSync("which bunx")` with `Bun.which()`. Rules & Warnings -- Code Quality: Comments must explain why not just what -- File Size: Keep files under 700 LOC, max 3 indentation levels -- UI Work: Never delegate UI work to subagents when acting as Opus -- File Locations: Signet agent profile is at `~/.agents/`, not `~/.signet/` -- Database: Never delete production database without backup -- Journaling: Keep regular journal entries -- Package Management: Use pacman for official repos, yay for AUR -- Testing: Test memory from dashboard wiring, test signet memory from openclaw hook -- Voice: Use whisper (installed via pip) for voice message transcription \ No newline at end of file + File Locations: Skills and configuration files are located in `~/.agents/`, not `~/.local/share` or other standard locations. + Forensic Footprint: When running remote scripts, prefer direct `rsync` calls over temporary bash scripts to minimize shell history and system logs. + Bun API: Always use `Bun.which()` instead of `execSync("which bunx")` when checking for binaries. + Design: Use the `frontend-design` skill when working on frontend components. + Voice Transcription: Voice message transcriptions are handled via `obsidian-ai`, configured to read from `~/Library/Mobile Documents/iCloud~md~obsidian/Documents/ai-transcripts`. + Signet CLI: `/recall` and `/remember` skills should invoke the `signet recall` and `signet remember` CLI commands, not the `/api/hook/...` endpoints. \ No newline at end of file diff --git a/memory/debug.log b/memory/debug.log index 573b97b56..e46f8db3b 100644 --- a/memory/debug.log +++ b/memory/debug.log @@ -680,3 +680,5 @@ We are synthesizing a WORKING MEMORY document for Nicholai. Focus is on CURRENT 2026-02-19T04:01:20.496756 [regenerate] trying model: glm-4.7-flash 2026-02-19T04:01:54.984709 extract_memories_local: Command '['ollama', 'run', 'qwen3:4b', '/no_think\nExtract ONLY significant, contextual facts from this coding session transcript.\n\nSTRICT RULES:\n1. DO NOT save: user messages verbatim, assistant responses, temporary states, routine operations\n2. DO save: user preferences, technical decisions with reasoning, solved issues with solutions, project-specific configs\n3. Each memory MUST have enough context to be useful standalone (not "the user wants X" but "nicholai prefers X because Y")\n4. Maximum 5 memories per session. If nothing significant, return []\n5. importance scale: 0.3-0.5 (most auto-extracted should be low)\n\nReturn ONLY a JSON array:\n[{"content": "...", "type": "fact|decision|preference|issue|learning", "tags": "tag1,tag2", "importance": 0.3-0.5}]\n\nTranscript:\n{"type":"file-history-snapshot","messageId":"ad37539c-e9f8-4e93-bbc4-222a3e3d99c1","snapshot":{"messageId":"ad37539c-e9f8-4e93-bbc4-222a3e3d99c1","trackedFileBackups":{},"timestamp":"2026-02-19T10:43:20.871Z"},"isSnapshotUpdate":false}\n{"parentUuid":null,"isSidechain":false,"userType":"external","cwd":"/home/nicholai/signet/signetai","sessionId":"57b0d9d1-7200-4a18-8ec7-64a429c40aba","version":"2.1.47","gitBranch":"main","slug":"cryptic-mapping-castle","type":"progress","data":{"type":"hook_progress","hookEvent":"SessionStart","hookName":"SessionStart:clear","command":"/home/nicholai/.agents/memory/scripts/memory.py load --mode session-start --project \\"$(pwd)\\""},"parentToolUseID":"54f35352-deef-4641-99df-770056a66bf2","toolUseID":"54f35352-deef-4641-99df-770056a66bf2","timestamp":"2026-02-19T10:43:20.795Z","uuid":"5c4b6a30-25b1-499f-bd52-b97efbe89ba2"}\n{"parentUuid":"5c4b6a30-25b1-499f-bd52-b97efbe89ba2","isSidechain":false,"userType":"external","cwd":"/home/nicholai/signet/signetai","sessionId":"57b0d9d1-7200-4a18-8ec7-64a429c40aba","version":"2.1.47","gitBranch":"main","slug":"cryptic-mapping-castle","type":"user","message":{"role":"user","content":"Implement the following plan:\\n\\n# Apache 2.0 License Migration Plan\\n\\n## Context\\n\\nThe signetai monorepo is currently MIT-licensed. We need to migrate to Apache 2.0\\nacross all packages and npm metadata. The approach: use `git filter-repo` to rewrite\\nfile contents throughout history so it looks like the project was always Apache 2.0.\\nAll commits, messages, authors, and timestamps are preserved — only the license-related\\nfile *contents* change. Commit SHAs will change (unavoidable), but history structure\\nis fully intact.\\n\\n## What Changes (in every relevant commit, via filter-repo blob rewriting)\\n\\n### License file content rewrites\\n- Any blob that is `packages/signetai/LICENSE` → replace MIT text with Apache-2.0\\n- Add `LICENSE` at repo root (currently missing) → inject into first commit\\n- Add `NOTICE` file at repo root → required by Apache-2.0, inject into first commit\\n\\n### package.json license field rewrites (across all blobs)\\nIn every commit, for each package.json blob, replace:\\n `\\"license\\": \\"MIT\\"` → `\\"license\\": \\"Apache-2.0\\"`\\n\\nAlso add `\\"license\\": \\"Apache-2.0\\"` to these packages that currently have no field:\\n - `packages/core/package.json`\\n - `packages/daemon/package.json`\\n - `packages/sdk/package.json`\\n\\n### README rewrites (across all blobs)\\n- `\\"MIT — use it, fork it, ship it.\\"` → `\\"Apache-2.0 — use it, fork it, ship it.\\"`\\n- `\\"## License: MIT\\"` or `\\"License\\\\n\\\\nMIT\\"` → Apache-2.0 equivalent\\n\\n## Implementation Steps\\n\\n1. **Verify git-filter-repo is installed** (`python3 -m pip show git-filter-repo`)\\n\\n2. **Create a Python blob callback script** (`/tmp/apache-license-rewrite.py`) that:\\n - Replaces MIT LICENSE file content with the full Apache-2.0 text\\n - Replaces `\\"license\\": \\"MIT\\"` with `\\"license\\": \\"Apache-2.0\\"` in package.json files\\n - Replaces MIT badge/section text in README files\\n - Injects the NOTICE file (via `commit_callback` + `extra_refs` or by adding to first commit)\\n\\n3. **Run git filter-repo** with the blob/commit callbacks:\\n ```bash\\n git filter-repo --refs HEAD --blob-callback \\"...\\" --commit-callback \\"...\\"\\n ```\\n\\n4. **Verify** the rewrite:\\n - `git log --oneline` — same commit count, same messages\\n - `git show :LICENSE` — Apache-2.0 text\\n - `git show HEAD:packages/signetai/package.json | grep license`\\n - `bun run build` — no regressions\\n\\n5. **Force push** (required after history rewrite):\\n - `git push --force-with-lease origin main`\\n - User should coordinate with any collaborators (warn: their local branches need rebasing)\\n\\n## Apache 2.0 License Text\\n\\nThe standard Apache-2.0 LICENSE file with:\\n- Copyright: `Copyright 2025 Signet AI`\\n\\n## NOTICE File Contents\\n\\n```\\nSignet AI\\nCopyright 2025 Signet AI\\n\\nThis product includes software developed by Signet AI.\\n```\\n\\n## Verification\\n\\n1. `git log --oneline | wc -l` — same number of commits as before\\n2. `git show $(git rev-list --max-parents=0 HEAD):LICENSE` — Apache-2.0 at first commit\\n3. Check package.json in old commits: `git show :packages/signetai/package.json`\\n4. `bun run build` — all packages build clean\\n5. `grep -r \'\\"license\\"\' packages/*/package.json` — all Apache-2.0\\n\\n\\nIf you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: /home/nicholai/.claude/projects/-home-nicholai-signet-signetai/c6b2e8b2-4737-42ca-87f0-24e8fd48f68a.jsonl\\n\\nIf this plan can be broken down into multiple independent tasks, consider using the TeamCreate tool to create a team and parallelize the work."},"uuid":"ad37539c-e9f8-4e93-bbc4-222a3e3d99c1","timestamp":"2026-02-19T10:43:20.737Z","planContent":"# Apache 2.0 License Migration Plan\\n\\n## Context\\n\\nThe signetai monorepo is currently MIT-licensed. We need to migrate to Apache 2.0\\nacross all packages and npm metadata. The approach: use `git filter-repo` to rewrite\\nfile contents throughout history so it looks like the project was always Apache 2.0.\\nAll commits, messages, authors, and timestamps are preserved — only the license-related\\nfile *contents* change. Commit SHAs will change (unavoidable), but history structure\\nis fully intact.\\n\\n## What Changes (in every relevant commit, via filter-repo blob rewriting)\\n\\n### License file content rewrites\\n- Any blob that is `packages/signetai/LICENSE` → replace MIT text with Apache-2.0\\n- Add `LICENSE` at repo root (currently missing) → inject into first commit\\n- Add `NOTICE` file at repo root → required by Apache-2.0, inject into first commit\\n\\n### package.json license field rewrites (across all blobs)\\nIn every commit, for each package.json blob, replace:\\n `\\"license\\": \\"MIT\\"` → `\\"license\\": \\"Apache-2.0\\"`\\n\\nAlso add `\\"license\\": \\"Apache-2.0\\"` to these packages that currently have no field:\\n - `packages/core/package.json`\\n - `packages/daemon/package.json`\\n - `packages/sdk/package.json`\\n\\n### README rewrites (across all blobs)\\n- `\\"MIT — use it, fork it, ship it.\\"` → `\\"Apache-2.0 — use it, fork it, ship it.\\"`\\n- `\\"## License: MIT\\"` or `\\"License\\\\n\\\\nMIT\\"` → Apache-2.0 equivalent\\n\\n## Implementation Steps\\n\\n1. **Verify git-filter-repo is installed** (`python3 -m pip show git-filter-repo`)\\n\\n2. **Create a Python blob callback script** (`/tmp/apache-license-rewrite.py`) that:\\n - Replaces MIT LICENSE file content with the full Apache-2.0 text\\n - Replaces `\\"license\\": \\"MIT\\"` with `\\"license\\": \\"Apache-2.0\\"` in package.json files\\n - Replaces MIT badge/section text in README files\\n - Injects the NOTICE file (via `commit_callback` + `extra_refs` or by adding to first commit)\\n\\n3. **Run git filter-repo** with the blob/commit callbacks:\\n ```bash\\n git filter-repo --refs HEAD --blob-callback \\"...\\" --commit-callback \\"...\\"\\n ```\\n\\n4. **Verify** the rewrite:\\n - `git log --oneline` — same commit count, same messages\\n - `git show :LICENSE` — Apache-2.0 text\\n - `git show HEAD:packages/signetai/package.json | grep license`\\n - `bun run build` — no regressions\\n\\n5. **Force push** (required after history rewrite):\\n - `git push --force-with-lease origin main`\\n - User should coordinate with any collaborators (warn: their local branches need rebasing)\\n\\n## Apache 2.0 License Text\\n\\nThe standard Apache-2.0 LICENSE file with:\\n- Copyright: `Copyright 2025 Signet AI`\\n\\n## NOTICE File Contents\\n\\n```\\nSignet AI\\nCopyright 2025 Signet AI\\n\\nThis product includes software developed by Signet AI.\\n```\\n\\n## Verification\\n\\n1. `git log --oneline | wc -l` — same number of commits as before\\n2. `git show $(git rev-list --max-parents=0 HEAD):LICENSE` — Apache-2.0 at first commit\\n3. Check package.json in old commits: `git show :packages/signetai/\n']' timed out after 45 seconds 2026-02-19T04:01:54.984866 auto-save: no memories extracted +2026-02-19T04:02:04.277429 [regenerate] success with glm-4.7-flash (3067 chars) +2026-02-19T04:02:04.277610 [regenerate] wrote 3104 chars to MEMORY.md