163 Commits

Author SHA1 Message Date
ty
2c97914ac2 ci: add Publish MCP workflow
Mirror publish-cli.yml for @moemail/mcp: trigger on mcp-v* tags or manual
dispatch, install + bun build, then npm publish --access public using
secrets.NPM_TOKEN.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cli-v1.0.0 mcp-v1.0.0
2026-06-16 00:04:13 +08:00
ty
be917e6865 chore(packages): add/update pnpm lockfiles for cli, core, mcp
CI publishes with `pnpm install` per package; commit pnpm-lock.yaml for
core and mcp (previously missing) and refresh cli's after the @moemail/core
dependency was added, so installs are reproducible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 00:03:20 +08:00
ty
b99b872791 feat(cli,mcp): extract @moemail/core and add MCP server; release 1.0.0
Extract the HTTP client and config into a new @moemail/core package shared
by the CLI and a new @moemail/mcp server, so both frontends talk to the same
MoeMail API through one code path.

- core: api client (now throws typed ConfigError/AuthError/PermissionError/
  QuotaError instead of process.exit), config, msToIso, and a transport-
  agnostic pollForNewMessage helper.
- cli: consume @moemail/core; route command errors through a shared fail()
  that preserves exit codes (config/auth = 2, else = 1). Bump to 1.0.0.
- mcp: new stdio MCP server exposing 8 tools (create/list/read/wait/send/
  delete); wait_for_email is bounded and returns a timeout status to retry.
  Configured via MOEMAIL_API_KEY / MOEMAIL_API_URL env. Release 1.0.0.

Docs:
- Fix packages/cli/README.md (config set, send --content not --body, full
  flag table).
- Add MCP section to both root READMEs; complete the CLI command list
  (send, list, message-level delete).
- SKILL.md: --json works before or after the subcommand.
- Ignore bun.lock in package gitignores.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 23:52:35 +08:00
ty
bf51e843ee fix(sharing): allowlist /api/shared in middleware
Anonymous callers to the shared mailbox API got 401 because the
middleware matcher's broad page pattern catches /api paths but the
inner allowlist only carved out /api/auth. SSR rendered the mailbox
listing, but every client-side fetch (message detail, polling,
pagination) was rejected, so opening a shared mailbox showed the list
without being able to read any message body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 18:07:06 +08:00
azerl7
faf68d0836 Update Node.js version in deploy workflow
修改 node.js 版本,构建的时候要求 22,之前是 20 会导致创建 workers 失败
2026-05-23 15:27:26 +08:00
ty
20be2b5b36 chore(cli): bump release to 0.1.2 cli-v0.1.2 2026-03-30 17:12:10 +08:00
ty
61f47626e7 feat(cli): add MoeMail AI agent skills 2026-03-30 17:08:50 +08:00
ty
adec4a50df fix(ci): exclude packages dir from Next.js TypeScript compilation
The tsconfig include pattern `**/*.ts` was picking up CLI package sources
during Next.js build, causing missing `commander` module errors in CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 23:17:37 +08:00
ty
b93b3bcf4a chore(cli): bump version to 0.1.1
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cli-v0.1.1
2026-03-22 16:15:43 +08:00
ty
033125eebf feat(cli): default api-url to https://moemail.app
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cli-v0.1.0
2026-03-22 16:11:39 +08:00
ty
f66c3e83a9 docs: add CLI section to READMEs and restore @moemail/cli package name
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 16:05:57 +08:00
ty
cb266a03dd fix(ci): install CLI dependencies separately in publish workflow
The CLI package is not part of a pnpm workspace, so its dependencies
need to be installed from within packages/cli/ directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:46:28 +08:00
ty
55c5418979 Merge branch 'feat/cli' 2026-03-22 15:42:11 +08:00
ty
b010ac5760 ci: support manual trigger for CLI publish workflow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:40:14 +08:00
BeilunYang
10257db179 Rename package from 'moemail-cli' to '@moemail/cli' 2026-03-22 15:32:31 +08:00
ty
0ac027f392 ci: add CLI publish workflow triggered by cli-v* tags 2026-03-22 15:22:29 +08:00
ty
8979649484 feat: add llms.txt for AI agent discoverability 2026-03-22 15:22:29 +08:00
ty
152059ca3d docs(cli): add README with usage guide and agent workflow 2026-03-22 15:22:29 +08:00
ty
3c238e25e6 fix(api): support API Key auth for send endpoint 2026-03-22 15:22:29 +08:00
ty
b09cc28496 feat(cli): add send command 2026-03-22 15:22:29 +08:00
ty
f29565c90d feat(cli): add delete command 2026-03-22 15:22:29 +08:00
ty
1c7cf2e5fd feat(cli): add read command 2026-03-22 15:22:29 +08:00
ty
8f4f605094 feat(cli): add wait command with client-side polling 2026-03-22 15:22:29 +08:00
ty
b891ee4655 feat(cli): add list command for mailboxes and messages 2026-03-22 15:22:29 +08:00
ty
12b5f4afeb feat(cli): add create command 2026-03-22 15:22:29 +08:00
ty
542f6ec2f8 feat(cli): add API client module 2026-03-22 15:22:29 +08:00
ty
1b9bd76b82 feat(cli): add config module and config command
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:22:29 +08:00
ty
6795719750 feat(cli): add output formatting helpers 2026-03-22 15:22:29 +08:00
ty
5b7ba3e924 feat(cli): scaffold CLI package with commander
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 15:22:29 +08:00
ty
0c096f6c9f docs: add MoeMail CLI implementation plan
15 tasks covering scaffolding, core modules, all 7 commands,
server-side send auth fix, README, llms.txt, and CI/CD workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:22:29 +08:00
ty
f7f9e2af36 docs: add CI/CD publishing, agent discoverability, rename to packages/cli
- Add publish-cli.yml workflow triggered by cli-v* tags
- Add agent discoverability section (help, README, llms.txt)
- Rename packages/moemail-cli to packages/cli

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:22:29 +08:00
ty
2168fd519a docs: fix spec issues from review — expiry mapping, send auth, JSON output shapes
- Remove 7d expiry option (not supported by API)
- Document send endpoint needs API Key auth support (server change)
- Add JSON output examples for all commands
- Add list-messages subcommand (list --email-id)
- Specify wait detection algorithm (ID-based, not count-based)
- Document field naming convention (camelCase) and timestamp format
- Add version command

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:22:29 +08:00
ty
1ce4f3e9fa docs: add MoeMail CLI design spec for agent-first CLI tool
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:22:29 +08:00
ty
10f6fd0065 docs: add MoeMail CLI implementation plan
15 tasks covering scaffolding, core modules, all 7 commands,
server-side send auth fix, README, llms.txt, and CI/CD workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 14:29:47 +08:00
ty
3d5bfad416 docs: add CI/CD publishing, agent discoverability, rename to packages/cli
- Add publish-cli.yml workflow triggered by cli-v* tags
- Add agent discoverability section (help, README, llms.txt)
- Rename packages/moemail-cli to packages/cli

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 14:21:29 +08:00
ty
00393e0443 docs: fix spec issues from review — expiry mapping, send auth, JSON output shapes
- Remove 7d expiry option (not supported by API)
- Document send endpoint needs API Key auth support (server change)
- Add JSON output examples for all commands
- Add list-messages subcommand (list --email-id)
- Specify wait detection algorithm (ID-based, not count-based)
- Document field naming convention (camelCase) and timestamp format
- Add version command

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 13:48:12 +08:00
ty
1f6b3a3b32 docs: add MoeMail CLI design spec for agent-first CLI tool
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 13:44:46 +08:00
ty
070b620c18 docs: change the default readme file language 2026-02-13 14:37:26 +08:00
BeilunYang
cef0ee0f0c Merge pull request #89 from sjcuhd/master 2026-01-18 14:24:58 +08:00
beilunyang
0d6670ebd5 feat(d1): add index for lowercased email addresses to improve query performance 2025-12-31 01:21:51 +08:00
beilunyang
71614333cc feat(d1): add indexes for improved query performance 2025-12-31 01:00:53 +08:00
sjcuhd
9736d19a46 Update index.ts
修复pushPagesSecre为json
2025-12-25 21:01:30 +08:00
beilunyang
98393c8a43 fix(deploy): add Google OAuth credentials to deployment workflow 2025-12-07 21:58:35 +08:00
beilunyang
9c303e4730 refactor(deploy): runtime environment variable checks in pushPagesSecret function 2025-12-07 21:46:37 +08:00
beilunyang
d2c8d9278b refactor(deploy): enhance environment variable handling in deployment scripts 2025-12-07 18:43:05 +08:00
beilunyang
834d3421ea docs(readme): fix v0.15.0 2025-12-07 18:08:26 +08:00
beilunyang
1a37692dc5 docs(readme): add English README file 2025-12-07 18:07:13 +08:00
beilunyang
dd109a464a feat(auth): add Google OAuth support 2025-12-07 17:50:27 +08:00
beilunyang
3ad30301a9 feat(i18n): add Korean language support 2025-12-07 11:48:08 +08:00
ty
ed48d08503 docs(readme): add documentation section with link and description for comprehensive usage guidelines 2025-10-26 01:57:01 +08:00