Commit Graph
43 Commits
Author SHA1 Message Date
thuanle a499841b1e docs: reorganize readme and architecture docs
CI / staticcheck (pull_request) Successful in 1m39s
CI / fmt (pull_request) Successful in 5s
CI / test (pull_request) Successful in 1m27s
CI / vet (pull_request) Successful in 57s
2026-04-29 00:50:08 +07:00
thuanle fac874e747 skill create-adr 2026-04-29 00:38:11 +07:00
thuanle c616fcf037 update DoD 2026-04-29 00:27:30 +07:00
thuanleandClaude Opus 4.7 c08ae01d0a ci: use node-go image instead of setup-go to reduce CI time
CI / fmt (pull_request) Successful in 4s
CI / test (pull_request) Successful in 1m24s
CI / staticcheck (pull_request) Successful in 1m18s
CI / vet (pull_request) Successful in 3m47s
Switch all CI jobs (fmt, test, vet, staticcheck) to use the
pre-built git.thuanle.me/public/node-go container image, removing
the dynamic Go setup step from each job.

Closes #11

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 11:12:29 +07:00
thuanleandClaude Opus 4.7 6af6da1d99 fix: typo Alway -> Always in AGENT.md
CI / fmt (pull_request) Successful in 4m58s
CI / test (pull_request) Successful in 11m0s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 11:07:31 +07:00
thuanleandClaude Opus 4.7 f978ed44b8 feat: support http/https proxy for IMAP via HTTP CONNECT tunnel
CI / fmt (pull_request) Successful in 4m45s
CI / test (pull_request) Successful in 10m47s
Extend IMAP_PROXY_URL to accept http:// and https:// schemes in addition
to the existing socks5:// support. HTTP CONNECT tunneling is used for
both new schemes, with TLS to the proxy for https://. Proxy auth via
user:pass@ in the URL is supported for all schemes.

Refactors dialTLSViaSOCKS5 into a generic dialTLSViaProxy dispatcher.

Fixes #9

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 10:56:57 +07:00
thuanle b5941e5aa1 update agent instruction 2026-04-28 09:58:47 +07:00
thuanle b73b399c55 chore: remove superpowers spec artifact from PR scope
CI / fmt (pull_request) Successful in 4m42s
CI / vet (pull_request) Successful in 10m42s
CI / test (pull_request) Successful in 12m54s
CI / staticcheck (pull_request) Successful in 10m56s
2026-04-28 08:14:05 +07:00
thuanleandClaude Opus 4.7 6c6a6280b6 ci: add pinned staticcheck job to PR workflow
CI / fmt (pull_request) Successful in 4m45s
CI / vet (pull_request) Successful in 10m46s
CI / test (pull_request) Successful in 12m54s
CI / staticcheck (pull_request) Successful in 10m55s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 07:53:23 +07:00
thuanleandClaude Opus 4.7 3eb64338c9 ci: add go vet job to PR workflow
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 07:51:04 +07:00
thuanle c112ac37c9 docs: add design spec for issue 18 CI checks
Record the approved design to add go vet and pinned staticcheck jobs to PR CI with minimal workflow changes.
2026-04-28 07:25:52 +07:00
thuanleandClaude Opus 4.7 094bd35de4 style: gofmt client_test.go
CI / fmt (pull_request) Successful in 4m46s
CI / test (pull_request) Successful in 12m58s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 07:12:49 +07:00
thuanleandClaude Opus 4.7 c127018bc9 fix: add dispatch_context to schema docs and test buildDispatchMetadata
CI / fmt (pull_request) Failing after 4m45s
CI / test (pull_request) Successful in 10m47s
- Add dispatch_context column to requirements.md task schema section
- Export buildDispatchMetadata for test coverage
- Add tests: context forwarding, task_uuid overwrite protection, empty context

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 07:08:19 +07:00
thuanleandClaude Opus 4.7 5e7a479991 fix: protect task_uuid from DispatchContext overwrite and update acceptance criteria
CI / fmt (pull_request) Successful in 4m44s
CI / test (pull_request) Successful in 12m48s
- Skip task_uuid key when merging DispatchContext into dispatch metadata
- Update requirements.md acceptance criteria and test matrix for external rules

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 07:01:20 +07:00
thuanleandClaude Opus 4.7 562d3b01c3 fix: reorder ingress checks and update requirements.md
CI / fmt (pull_request) Successful in 4m43s
CI / test (pull_request) Failing after 21m37s
- Move idempotency before external rules per ADR-0002
- Update requirements.md: new pipeline flow, BLOCKLIST_EMAILS,
  dispatch_context metadata

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 06:53:05 +07:00
thuanleandClaude Opus 4.7 92121278bb docs: add ADR-0002, update flow and add BLOCKLIST_EMAILS
CI / fmt (pull_request) Successful in 4m47s
CI / test (pull_request) Successful in 12m54s
- ADR-0002: external rules pipeline architecture
- README: updated flow to show safety checks → rules → dispatch
- .env.example: added BLOCKLIST_EMAILS

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 06:39:50 +07:00
thuanleandClaude Opus 4.7 aa05e3f7c0 feat: wire external rules pipeline into ingress and dispatch
- Add DispatchContext field to Task model for rule metadata storage
- Add BlocklistEmails config (BLOCKLIST_EMAILS env var)
- Wire rules.Pipeline into IMAPWatcher, replacing inline whitelist check
- Pass rule metadata through DispatchContext to OpenClaw dispatch
- Remove isWhitelisted method (now handled by WhitelistRule)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 06:38:37 +07:00
thuanleandClaude Opus 4.7 ab992abc26 feat(rules): add BlocklistRule
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 06:26:56 +07:00
thuanleandClaude Opus 4.7 8006e6d64c feat(rules): add Rule interface, Pipeline, and WhitelistRule
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 06:26:01 +07:00
thuanle 2233fd232a update workflow - auto assign yourself as assignee/reviewer 2026-04-28 06:23:28 +07:00
thuanle 28224ccb9f docs: require PR discussion comments in reviews
CI / fmt (pull_request) Successful in 4m46s
CI / test (pull_request) Successful in 10m45s
2026-04-28 06:10:55 +07:00
thuanleandClaude Opus 4.7 16db5acb3a fix: update validate-issue handoff to use implement-task
CI / fmt (pull_request) Successful in 4m55s
CI / test (pull_request) Successful in 10m58s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 05:55:18 +07:00
thuanleandClaude Opus 4.7 b013c68988 docs: add ADR workflow and update skills
CI / fmt (pull_request) Successful in 4m56s
CI / test (pull_request) Successful in 10m49s
- Add docs/adr/README.md with ADR format, rules, and index
- Add ADR-0001: IMAP thread resolution via In-Reply-To + References
- Add Documentation Rules section to AGENT.md
- Update validate-issue skill: flag ADR-requiring changes
- Rename do-task → implement-task for clearer semantics
- Update review-pr skill: accept docs/adr/, reject agent artifacts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 05:47:37 +07:00
thuanleandClaude Opus 4.7 1eb9147ba1 fix: remove spec/plan artifacts from PR branch
CI / fmt (pull_request) Successful in 4m48s
CI / test (pull_request) Successful in 11m0s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 05:35:03 +07:00
thuanleandClaude Opus 4.7 4145f7a50b fix: remove out-of-scope plan files and gofmt test file
CI / fmt (pull_request) Successful in 5m54s
CI / test (pull_request) Successful in 13m1s
Address review feedback on PR #13:
- Remove docs/superpowers/plans/ files not related to issue #4
- gofmt internal/mail/resolve_thread_test.go

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 05:18:18 +07:00
thuanleandClaude Opus 4.7 c55a27d710 feat(mail): wire resolveThreadID into processMessage
CI / fmt (pull_request) Failing after 4m52s
CI / test (pull_request) Successful in 10m50s
- Add references variable to extract References header
- Replace manual inReplyTo handling with resolveThreadID call
- Maintain existing body parsing functionality
- Includes proper lambda function for database lookups

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 05:07:40 +07:00
thuanleandClaude Opus 4.7 15e697ddf3 fix(mail): remove redundant TrimSpace in parseReferences
strings.Fields already strips whitespace from each token.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 05:04:45 +07:00
thuanleandClaude Opus 4.7 c63895f4da feat(mail): implement resolveThreadID with References fallback
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 05:02:11 +07:00
thuanleandClaude Opus 4.7 aebae1cea5 test(mail): add resolveThreadID tests (RED)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 05:01:17 +07:00
thuanleandClaude Opus 4.7 270b13834a docs: add References threading implementation plan
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 04:57:00 +07:00
thuanleandClaude Opus 4.7 4090a44524 docs: add References header threading design spec
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 04:51:38 +07:00
thuanleandClaude Opus 4.7 31b31c7635 fix: graceful HTTP server shutdown on SIGINT/SIGTERM
CI / fmt (pull_request) Successful in 4m53s
CI / test (pull_request) Successful in 11m40s
Replace router.Run() with explicit http.Server + Shutdown() so the
process exits cleanly when context is cancelled.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 00:25:47 +07:00
thuanleandClaude Opus 4.7 1290e3b222 docs: require Fixes #<issue> in PR body for auto-close
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 00:22:43 +07:00
thuanleandClaude Opus 4.7 248a5bdbcd docs: add AGENT.md workflow and local skills
- AGENT.md: role-based issue-driven workflow (PO → Dev → Reviewer)
- CLAUDE.md: points to AGENT.md
- .codex/skills/: validate-issue, do-task, review-pr with phase gates

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 00:00:41 +07:00
thuanleandClaude Opus 4.7 8be84cc396 docs: consolidate project instructions into AGENT.md
Move behavioral guidelines, role-based workflow, and Gitea tooling
instructions into AGENT.md. CLAUDE.md now references AGENT.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 23:26:39 +07:00
thuanleandClaude Opus 4.7 dbe5cab56e ci: add Gitea Actions workflow with gofmt and test jobs
CI / fmt (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
Add CI workflow at .gitea/workflows/ci.yml triggered on pull_request
with two jobs: fmt (gofmt check) and test (go test ./...).

Fix gofmt issues (import ordering) in 7 files so CI passes from
the start.

Fixes #7

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:34:56 +07:00
thuanleandClaude Opus 4.7 d1c35e0b57 fix(mail): enforce end-to-end timeout for SOCKS5 IMAP dial
Use context-based SOCKS dialing and bounded TLS handshake so proxy negotiation and handshake cannot hang indefinitely, with regression tests for both paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:10:20 +07:00
thuanleandClaude Opus 4.7 d0c22a0554 fix(mail): restore IMAP SOCKS5 dial timeout behavior
Preserve the 30s dial timeout semantics for proxy connections by using a timeout-backed forward dialer, and add a regression test to lock this behavior.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 21:59:25 +07:00
thuanleandClaude Opus 4.7 14f2bd7eab feat(mail): support IMAP SOCKS5 proxy dialing
Use IMAP_PROXY_URL to route IMAP TLS connections through SOCKS5 when configured, while preserving direct dialing when unset.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 21:37:40 +07:00
thuanleandClaude Opus 4.7 2333ec3f00 chore: ignore local worktrees directory
Add .worktrees/ to .gitignore to prevent accidental tracking of isolated worktree files.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 21:34:00 +07:00
thuanleandClaude Opus 4.7 2168042edb fix default callback base URL port mismatch
Derive CALLBACK_BASE_URL fallback from LISTEN_ADDR so default local setup resolves to localhost:8080 and stays aligned with server bind port.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 20:56:47 +07:00
thuanleandClaude Opus 4.7 cc9d54afdc fix callback URL to use configurable public base
Separate callback URL generation from LISTEN_ADDR by introducing CALLBACK_BASE_URL with a localhost default for local development.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 19:02:31 +07:00
thuanleandClaude Opus 4.7 8815c20c13 Initial commit: email-openclaw bridge v1
Full pipeline: IMAP ingress -> OpenClaw dispatch -> callback -> SMTP reply.
SQLite stateful storage with idempotency, threading, and retry logic.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 18:16:57 +07:00