Skip to content

Commit 52cb4f1

Browse files
committed
first commit
0 parents  commit 52cb4f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+9091
-0
lines changed

.github/copilot-instructions.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
<!-- hacklm-memory:start -->
3+
## Memory-Augmented Context
4+
5+
Read memory files on-demand — not all at once.
6+
7+
| File | When to read |
8+
|------|-------------|
9+
| [.memory/instructions.md](.memory/instructions.md) | How to behave |
10+
| [.memory/quirks.md](.memory/quirks.md) | When something breaks unexpectedly |
11+
| [.memory/preferences.md](.memory/preferences.md) | Style/design/naming choices |
12+
| [.memory/decisions.md](.memory/decisions.md) | Architectural changes |
13+
| [.memory/security.md](.memory/security.md) | **ALWAYS — before any code change** |
14+
15+
### Memory Tools
16+
17+
Call `queryMemory` before answering anything about architecture, conventions, or style.
18+
19+
Call `storeMemory` (with a kebab-case `slug`) when:
20+
1. User states a preference or rule → store as Instruction or Preference **before** acting
21+
2. User corrects you → store the correction
22+
3. A command or build fails → store root cause and fix
23+
4. After completing any implementation task → store each architectural decision, convention, or pattern applied that is not already in memory. Do this **before ending the turn**.
24+
25+
Same slug = update, not duplicate.
26+
27+
### Writing Style for Memory Entries
28+
Hemingway style. Short sentences. No jargon. No filler. Be blunt.
29+
Bad: "The system employs an asynchronous locking mechanism to serialise concurrent write operations."
30+
Good: "Use a lock before writing. One write at a time."
31+
32+
### Categories
33+
| Category | Use for |
34+
|----------|---------|
35+
| Instruction | How to behave |
36+
| Quirk | Project-specific weirdness |
37+
| Preference | Style/design/naming |
38+
| Decision | Architectural commitments |
39+
| Security | Rules that must NEVER be broken |
40+
<!-- hacklm-memory:end -->

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: npm
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Build
27+
run: npm run build

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
dist/
3+
*.crx
4+
*.zip
5+
*.vsix
6+
.memory/cleanup.log

.memory/decisions.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Decisions
2+
3+
4+
- [dataport-architecture] DataPort is a MV3 browser extension (Vite + CRXJS + React + TypeScript + Tailwind). Extracts chat history from ChatGPT, Claude, Gemini, Perplexity, Grok. Uses authenticated background fetches for all providers except Gemini (MAIN-world fetch interceptor). Stores chats in chrome.storage.local as Universal JSON Schema. Migration uses Context Seeding (paste prior history as prompt).
5+
6+
- [dataport-ux-decisions] UX: In-page injected buttons (Save to Vault / Restore from Vault) on supported AI sites. Full-page Options page as Vault Dashboard for browsing/managing chats. Popup is a lightweight stats summary with link to Dashboard.
7+
8+
- [dataport-extraction-content-script] Extractors run in the content-script rather than the background worker to bypass WAF preflights and SameSite cookie blocking on AI websites. The content-script fetches the data using relative/same-origin routing, builds the Universal JSON schema locally, and sends the `SAVE_EXTRACTED_DATA` message to the background worker.
9+
10+
- [hacklm-icon-component] HacklmIcon lives in src/components/HacklmIcon.tsx. Uses chrome.runtime.getURL to load PNG from public/icons/. Works in both content scripts and extension pages. manifest.ts declares web_accessible_resources for icon PNGs covering all host patterns.
11+
12+
- [architecture] Architectural commitments made in this project.
13+
14+
- [open-source-structure] Open source structure matches hacklmdev/memory repo: GPL-3.0, README, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, CHANGELOG, .gitignore, zensical.toml, CNAME, docs/ folder, .github/workflows/ci.yml.
15+
16+
- [docs-site-zensical] Docs site at migrate.hacklm.dev uses Zensical with same theme as memory.hacklm.dev. Nav: Home, Getting Started, Reference (Architecture, Schema), Development (Contributing, Roadmap, Decisions).
17+
18+
- [package-identity] Package name is hacklm-migrate. Version 0.1.0 matches manifest. License GPL-3.0. Author "HackLM contributors". Repo at github.com/hacklmdev/migrate.

.memory/instructions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Instructions
2+
3+
4+
- [mv3-background-fetch-cors-cors-rule] Never use fetch() with `credentials: "include"` inside a background service worker to target external APIs (like Claude/ChatGPT) due to CORS preflight failures and SameSite cookie blocking. Always execute extraction fetches directly from the isolated content script instead, and send the parsed results to the background script for storage.
5+
6+
- [copilot-behavior] How Copilot should behave in this project.

.memory/preferences.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Preferences
2+
3+
4+
5+
- [style-design] Style, tone, and design choices for this project.
6+
7+
- [docs-page-naming] Docs Schema page replaces API Reference. No User Guide page — Chrome extension UI is simple enough to cover in Getting Started. ADRs file named decisions.md.

.memory/quirks.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Quirks
2+
3+
4+
- [crxjs-sw-loader-bug] CRXJS beta always writes localhost:5173 imports into service-worker-loader.js even in production builds. Fix: add a `closeBundle` Vite plugin that finds `dist/assets/index.ts-*.js` and rewrites the loader with the correct relative import.
5+
6+
- [project-quirks] Project-specific weirdness — the non-obvious stuff.

.memory/security.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Security
2+
3+
4+
5+
- [hard-rules] Rules that must NEVER be broken. Always read this file.

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.1.0] - 2026-03-01
11+
12+
### Added
13+
14+
- Save conversations from five AI platforms: ChatGPT, Claude, Gemini, Perplexity, Grok
15+
- Floating dial UI injected on supported chat pages with Save and Restore buttons
16+
- Background service worker as central message router
17+
- Local vault storage via `chrome.storage.local` with index + full-thread split
18+
- Per-provider extractors implementing a common `Extractor` interface
19+
- Normalized cross-provider schema (`Thread`, `Message`, `Attachment`)
20+
- Popup showing per-provider saved conversation counts
21+
- Vault Dashboard (options page) with browse, search, filter, and message viewer
22+
- Copy Seed Prompt — generates a text block to resume a conversation in any AI
23+
- Delete individual threads from the vault
24+
- Shadow-DOM-free content script mounting with isolated inline styles
25+
- Icon generation script (`scripts/gen-icons.mjs`) using Sharp
26+
- Vite + `@crxjs/vite-plugin` build pipeline with HMR support
27+
- React 19 + Tailwind CSS v4 for all UI surfaces
28+
- TypeScript strict mode with Manifest V3
29+
30+
[Unreleased]: https://github.com/hacklmdev/migrate/compare/v0.1.0...HEAD
31+
[0.1.0]: https://github.com/hacklmdev/migrate/releases/tag/v0.1.0

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
migrate.hacklm.dev

0 commit comments

Comments
 (0)